-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathrss.xml
126 lines (126 loc) · 61.9 KB
/
rss.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>zserge's blog</title><link>https://zserge.com/</link><description>Recent content on zserge's blog</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><lastBuildDate>Sat, 28 Dec 2024 00:00:00 +0000</lastBuildDate><atom:link href="https://zserge.com/rss.xml" rel="self" type="application/rss+xml"/><item><title>Emulating 6502</title><link>https://zserge.com/posts/6502/</link><pubDate>Sat, 28 Dec 2024 00:00:00 +0000</pubDate><guid>https://zserge.com/posts/6502/</guid><description>Last year, I noticed that routine programming no longer brought me the same joy it did decades ago. So, my New Year&rsquo;s resolution was to engage in more &ldquo;useless&rdquo; programming &ndash; coding small, fun projects without any specific end goal in mind. Of all the possible topics, the one that captivated me throughout the year was retrocomputing.
I didn’t have a computer until I was 14, but I remember seeing grey 8-bit machines at school or friends' houses.</description></item><item><title>On Music Tabs</title><link>https://zserge.com/posts/tab/</link><pubDate>Fri, 22 Nov 2024 00:00:00 +0000</pubDate><guid>https://zserge.com/posts/tab/</guid><description>I love music. I love playing music. I love making musical instruments and music software. I don&rsquo;t have formal musical training. I’ve never taken lessons, and honestly, I’m a pretty bad musician. What I do excel at, though, is hoarding musical instruments.
At this point, name any instrument, and there’s a decent chance I have it somewhere in my room. Some of these instruments never played anything better than &ldquo;Twinkle, Twinkle Little Star&rdquo;, others featured in a recording or two, and only a few see regular play.</description></item><item><title>On Poetry</title><link>https://zserge.com/posts/poetry/</link><pubDate>Wed, 18 Sep 2024 00:00:00 +0000</pubDate><guid>https://zserge.com/posts/poetry/</guid><description>Recently with friends we talked about an early web site I&rsquo;ve programmed, probably the very first web service I&rsquo;ve ever done. It was a simple dictionary.
Back then, we had Nokia phones without real web browsers, just something called the WAP protocol and WML markup. Since I struggled with foreign languages as a student (I still do!), I decided to create a mobile site in WAP/WML to help me translate words, show definitions, thesaurus entries, pronunciations, and more.</description></item><item><title>Tiny Great Languages: PL/0</title><link>https://zserge.com/posts/langs-pl0/</link><pubDate>Tue, 17 Sep 2024 00:00:00 +0000</pubDate><guid>https://zserge.com/posts/langs-pl0/</guid><description>This is part 6 from series &ldquo;Tiny Great Languages&rdquo;.
Final code is on Github. Part 1: Assembly. Part 2: BASIC. Part 3: Forth/MOUSE. Part 4: Lisp. Part 5: APL/K. Part 6: PL/0. Let&rsquo;s talk about Pascal. It&rsquo;s the language I first learned many years ago, and it becomes the final one we cover in this series. Well, not the full version of Pascal, but a tiny educational subset defined by the legendary Niklaus Wirth.</description></item><item><title>Tiny Great Languages: APL</title><link>https://zserge.com/posts/langs-apl/</link><pubDate>Fri, 13 Sep 2024 00:00:00 +0000</pubDate><guid>https://zserge.com/posts/langs-apl/</guid><description>This is part 5 from series &ldquo;Tiny Great Languages&rdquo;.
Final code is on Github. Part 1: Assembly. Part 2: BASIC. Part 3: Forth/MOUSE. Part 4: Lisp. Part 5: APL/K. Part 6: PL/0. This would be a controversial language, but it fits perfectly into the 50-lines-of-less code category. Let&rsquo;s talk about APL family, and specifically &ndash; K.
Created by Arthur Whitney the language is known for its terse and cryptic syntax.</description></item><item><title>Tiny Great Languages: Lisp</title><link>https://zserge.com/posts/langs-lisp/</link><pubDate>Thu, 12 Sep 2024 00:00:00 +0000</pubDate><guid>https://zserge.com/posts/langs-lisp/</guid><description>This is part 4 from series &ldquo;Tiny Great Languages&rdquo;.
Final code is on Github. Part 1: Assembly. Part 2: BASIC. Part 3: Forth/MOUSE. Part 4: Lisp. Part 5: APL/K. Part 6: PL/0. Done with the concatenative language MOUSE, we can now turn our attention to another small and elegant language from way back: Lisp. Lisp is famous for its minimalist syntax (similar to Forth, the parser is almost nonexistent) and its clear, logical evaluation rules.</description></item><item><title>Tiny Great Languages: MOUSE</title><link>https://zserge.com/posts/langs-mouse/</link><pubDate>Wed, 11 Sep 2024 00:00:00 +0000</pubDate><guid>https://zserge.com/posts/langs-mouse/</guid><description>This is part 3 from series &ldquo;Tiny Great Languages&rdquo;.
Final code is on Github. Part 1: Assembly. Part 2: BASIC. Part 3: Forth/MOUSE. Part 4: Lisp. Part 5: APL/K. Part 6: PL/0. Let&rsquo;s go Forth. A concatenative language available on early computers, a great example of how small, elegant languages can be both powerful and efficient.
I&rsquo;ve already covered building a proper Forth from the ground up in an earlier post.</description></item><item><title>Tiny Great Languages: BASIC</title><link>https://zserge.com/posts/langs-basic/</link><pubDate>Tue, 10 Sep 2024 00:00:00 +0000</pubDate><guid>https://zserge.com/posts/langs-basic/</guid><description>This is part 2 from series &ldquo;Tiny Great Languages&rdquo;.
Final code is on Github. Part 1: Assembly. Part 2: BASIC. Part 3: Forth/MOUSE. Part 4: Lisp. Part 5: APL/K. Part 6: PL/0. Meet BASIC, the king of home computing in the late 1970s. Originally designed to promote computer literacy in schools, BASIC inspired a whole generation of professional software engineers.
BASIC typically combined a simple text editor with a command shell and interpreter.</description></item><item><title>Tiny Great Languages: Assembly</title><link>https://zserge.com/posts/langs-asm/</link><pubDate>Sun, 08 Sep 2024 00:00:00 +0000</pubDate><guid>https://zserge.com/posts/langs-asm/</guid><description>This is part 1 from series &ldquo;Tiny Great Languages&rdquo;.
Final code is on Github. Part 1: Assembly. Part 2: BASIC. Part 3: Forth/MOUSE. Part 4: Lisp. Part 5: APL/K. Part 6: PL/0. Decades ago, I wrote my first interpreter &ndash; a Turtle Graphics IDE designed to help kids at my school learn programming. I built it in Pascal, and to this day, I still wonder how I managed to make it work without any formal knowledge of writing interpreters.</description></item><item><title>AI or ain't: LLMs</title><link>https://zserge.com/posts/ai-llm/</link><pubDate>Thu, 04 Jan 2024 00:00:00 +0000</pubDate><guid>https://zserge.com/posts/ai-llm/</guid><description>Previously we covered early chatbots, bots talking gibberish, and self-taught number crunchers.
But what we got so far is still boring. AI was promised to overthrow the world order and not just classify arrays of floats. Can we have a chat?
GPT As unimpressive as it is, neural networks take arrays of numbers and return arrays of numbers. Just like our brain takes electric signals and emits electric signals. It&rsquo;s only a matter of how we encode such inputs and outputs.</description></item><item><title>AI or ain't: Neural Networks</title><link>https://zserge.com/posts/ai-nn/</link><pubDate>Wed, 03 Jan 2024 00:00:00 +0000</pubDate><guid>https://zserge.com/posts/ai-nn/</guid><description>Previously we explored early &ldquo;intelligent&rdquo; software based on rules and Markov chains, but the results were not too convincing. Modern AI is all about neural networks, so let&rsquo;s fast-forward to the time when neural networks have been invented, which is&hellip; 1944? Correct, the idea of an artificial neuron dates many decades back, and it&rsquo;s a very simple one, really.
neural network in 6 lines of code A neural network is nothing but a few multiplications and additions.</description></item><item><title>AI or ain't: Markov Chains</title><link>https://zserge.com/posts/ai-markov/</link><pubDate>Tue, 02 Jan 2024 00:00:00 +0000</pubDate><guid>https://zserge.com/posts/ai-markov/</guid><description>Eliza was an impressive chatbot of its era. But all its success was hidden in a carefully crafted set of rules that made it sound like a therapist. Markov chains are more flexible, as they don&rsquo;t rely on strict guidelines, but rather use patterns and statistics to generate responses. Let&rsquo;s explore how Markov chains work and how to build one yourself.
Markov chains A Markov chain is a mathematical model that describes a sequence of events where the outcome of each event depends solely on the state of the system at the previous event.</description></item><item><title>AI or ain't: Eliza</title><link>https://zserge.com/posts/ai-eliza/</link><pubDate>Mon, 01 Jan 2024 00:00:00 +0000</pubDate><guid>https://zserge.com/posts/ai-eliza/</guid><description>In the year 2023, AI took center stage in the media, stirring up discussions about whether it was mere hype or real progress.
However, the concept of non-human intelligence isn&rsquo;t a recent fascination; it has been a dream since ancient times. As we learned more about how neurons communicate through electronic pulses in our brains, it seemed plausible to simulate our &ldquo;intelligence&rdquo; with similar electronic circuits. The term &ldquo;machine intelligence&rdquo; was coined in the 1950s, around the same time the Turing test was introduced.</description></item><item><title>Minimal cross-platform graphics</title><link>https://zserge.com/posts/fenster/</link><pubDate>Sun, 15 Jan 2023 00:00:00 +0000</pubDate><guid>https://zserge.com/posts/fenster/</guid><description>I grew up with BASIC and Turbo Pascal. My first programs were very simple graphical games. I still miss the era of BGI and BASIC&rsquo;s painting commands. Those graphics were neither beautiful nor fast, but they were simple. Simple enough for a kid with only elemental geometry knowledge to build something exciting.
Even today, whenever I want to prototype or visualise something, to experiment with generative art or to write a toy graphical app &ndash; I feel nostalgic for the old days.</description></item><item><title>What is Git made of?</title><link>https://zserge.com/posts/git/</link><pubDate>Sun, 04 Dec 2022 00:00:00 +0000</pubDate><guid>https://zserge.com/posts/git/</guid><description>Git can be confusing. Git can be scary. Git CLI may be the least intuitive tool you have to use on a daily basis.
But also Git is a wonderfully simple and cleverly designed version control system that definitely deserves its popularity.
To prove this point I invite you to implement your own tiny Git that would be able to create a local repository, commit a single file to it, view commit logs and checkout a certain revision of that file.</description></item><item><title>Post-apocalyptic programming</title><link>https://zserge.com/posts/post-apocalyptic-programming/</link><pubDate>Thu, 04 Aug 2022 00:00:00 +0000</pubDate><guid>https://zserge.com/posts/post-apocalyptic-programming/</guid><description>We got deadly viruses, nuclear war threats, economy heading from one crisis to another deeper crisis, politicians going out of control&hellip; You know that feeling. The end is near, isn&rsquo;t it?
But let&rsquo;s talk about brighter things &ndash; technology. We are all smart people, working on valuable and complex software projects in great agile teams, copying code from Stack Overflow and using GitHub co-pilot to help us with the routine.</description></item><item><title>On Transpilers</title><link>https://zserge.com/posts/transpilers/</link><pubDate>Wed, 06 Jul 2022 00:00:00 +0000</pubDate><guid>https://zserge.com/posts/transpilers/</guid><description>Transpilers, or source-to-source compilers, is a type of a translator app that converts source code from one programming language to the other. You might argue that compiler does the same thing, translating it into assembly or machine code. Transpilers are different in a sense that they operate at the similar abstraction levels: they convert high-level languages into high-level languages, keeping the semantics and using equivalent code constructs where possible.
There are plenty of transpilers that offer new syntax for existing languages (Google Closure Compiler, CoffeeScript, Dart, Haxe or TypeScript and many others).</description></item><item><title>Learn a language by writing too many Forths</title><link>https://zserge.com/posts/too-many-forths/</link><pubDate>Tue, 05 Jul 2022 00:00:00 +0000</pubDate><guid>https://zserge.com/posts/too-many-forths/</guid><description>Every developer eventually wants to explore new programming languages. As motivating as it gets, there&rsquo;s always a question of finding a suitable project for that noble goal.
You can rewrite classical games, you can make a text editor, a UNIX shell or clones of traditional UNIX core utils. If you can afford it - build a web server, write an emulator, a ray tracer or even an operating system. To each his own.</description></item><item><title>Zig, the small language</title><link>https://zserge.com/posts/zig-the-small-language/</link><pubDate>Wed, 01 Jun 2022 00:00:00 +0000</pubDate><guid>https://zserge.com/posts/zig-the-small-language/</guid><description>If you look at the HackerNews headlines and comments - you may notice that every now and then people praise Zig, a relatively young programming language for low-level programming. Maybe not as low-level as assembler, but definitely as low-level as C or C++.
I&rsquo;m usually very skeptical about new languages, so naturally I wanted to give Zig a try. But after playing around and building a few toy projects with it - I shall say, I really enjoyed coding in Zig.</description></item><item><title>How do One-Time passwords work?</title><link>https://zserge.com/posts/one-time-passwords/</link><pubDate>Wed, 28 Apr 2021 00:00:00 +0000</pubDate><guid>https://zserge.com/posts/one-time-passwords/</guid><description>One-time passwords (OTP) are short sequences of numbers that authenticate user for a single login. They are often used as an additional layer of security when the 2-factor authorisation is enabled.
A picture is worth a thousand words, here&rsquo;s what I&rsquo;m talking about:
How are these numbers generated and can we reproduce them?
Import the secret Let&rsquo;s take Google&rsquo;s 2-factor authorization as an example. It all starts with telling the authenticator app the secret key from your account.</description></item><item><title>Poor Man's Web</title><link>https://zserge.com/posts/small-web/</link><pubDate>Tue, 27 Apr 2021 00:00:00 +0000</pubDate><guid>https://zserge.com/posts/small-web/</guid><description>The Small Web. &ldquo;Smol Internet&rdquo; or even &ldquo;The Dork Web&rdquo;. Many names for the modern phenomena of people getting away from the Big Internet of corporate gatekeepers, where data is money and users don&rsquo;t own any of it anymore.
The Small Web is a reboot of the Internet as we know it. No, it&rsquo;s not going to replace the Big Internet, but rather to create a niche for enthusiasts where people can freely express themselves, the tech stack is simple and transparent, where publishers have all the freedoms and consumers have a choice what to read.</description></item><item><title>Ray tracer for those who skipped the math class</title><link>https://zserge.com/posts/raytracer/</link><pubDate>Thu, 22 Apr 2021 00:00:00 +0000</pubDate><guid>https://zserge.com/posts/raytracer/</guid><description>There is a strong belief that every programmer in their life must write a ray tracer. But unlike many other programming exercises, ray tracers often require some mathematical background. Even those who were good at math back in the school days - might hesitate to dust off the rust from their brains to only write a pointless (although, very cool) toy program.
For those who don&rsquo;t know what I&rsquo;m talking about - ray tracer is an app that renders 3-dimensional objects, lights, reflections, all done by tracing the rays of light through the world of objects, shapes, and materials.</description></item><item><title>Scalable, Resilient Brainf∗ck</title><link>https://zserge.com/posts/bfaas/</link><pubDate>Thu, 01 Apr 2021 00:00:00 +0000</pubDate><guid>https://zserge.com/posts/bfaas/</guid><description>You probably shouldn&rsquo;t read this article.
If you want to start learning a programming language - write a BF interpreter in it. For many years this has been a common suggestion to the newcomers into programming. And we all know how the typical solution would look like:
s[999],*r=s,*d,c;main(a,b){char*v=1[d=b];for(;c=*v++%93;)for(b=c%7?a&amp;&amp;(c&amp;17?c&amp;1? (*r-=c-44):(r+=c-61):c&amp;2?putchar(*r):(*r=getchar()),0):v;b&amp;&amp;c|a**r;v=d)main(!c,&amp; b-1);d=v;} Well, or something a bit more readable in ~100 lines of code.
But, hey, that&rsquo;s not how things should be done these days!</description></item><item><title>A "Better C" Benchmark</title><link>https://zserge.com/posts/better-c-benchmark/</link><pubDate>Thu, 18 Mar 2021 00:00:00 +0000</pubDate><guid>https://zserge.com/posts/better-c-benchmark/</guid><description>C is almost 50 years old. A great age for a bottle of wine, not so great for a programming language in the fast-moving industry. Over the past 10 years many new languages have emerged, with different flavours, all trying to become a C replacement to some extent.
When a new language becomes more or less popular &ndash; developers start writing benchmarks, showing how performant the software in this language is, how much CPU power and how much memory is uses, how big are the binaries and so on.</description></item><item><title>How do ones and zeros sound?</title><link>https://zserge.com/posts/1-bit-music/</link><pubDate>Sun, 14 Mar 2021 00:00:00 +0000</pubDate><guid>https://zserge.com/posts/1-bit-music/</guid><description>1-bit music is probably the most challenging electronic music genre, and definitely not the most mellifluous one. It originated long time ago when the early personal computers had a periodic timer and a connected piezo buzzer rather than a proper sound card with a speaker. We are now used to the electronic music with all the synthesizers, they are used in almost every song we hear. And we hear the songs only because the digital device converts a stream of digital signals into varying amplitude of a nicely constructed magnetic loudspeaker.</description></item><item><title>CSS-in-JS in 200 bytes</title><link>https://zserge.com/posts/css-in-js/</link><pubDate>Mon, 08 Feb 2021 00:00:00 +0000</pubDate><guid>https://zserge.com/posts/css-in-js/</guid><description>CSS-in-JS is a relatively new and a very contradictory way of writing CSS. On the one hand, it tries to overcome the limitations of traditional CSS to make it more reusable, especially when it comes to styling components. On the other hand, it&rsquo;s different from traditional CSS and has it&rsquo;s own disadvantages.
There is no single CSS-in-JS library, there is even no sight of a clear winner in this race. However, all CSS-in-JS implementations have a lot in common - they allow creating isolated reusable styles for components and use JavaScript as a language for writing styles.</description></item><item><title>Let's make the worst VueJS ever!</title><link>https://zserge.com/posts/worst-vuejs-ever/</link><pubDate>Sun, 07 Feb 2021 00:00:00 +0000</pubDate><guid>https://zserge.com/posts/worst-vuejs-ever/</guid><description>Some time ago I wrote a similar post about React, in which with a few lines of code we have built a tiny ReactJS clone from scratch. But React is not the only choice in the modern frontend world, and VueJS is constantly gaining its popularity, so why don&rsquo;t we look deeper into how it works and maybe create a silly educational VueJS-like framework.
Reactivity Like ReactJS, Vue is reactive, meaning that all the changes in the application state are automatically reflected in DOM.</description></item><item><title>The old way to the modern web services</title><link>https://zserge.com/posts/go-web-services/</link><pubDate>Wed, 20 Jan 2021 00:00:00 +0000</pubDate><guid>https://zserge.com/posts/go-web-services/</guid><description>Yes, modern web development is complex. Frameworks change each other, cognitive load increases, hype-driven development introduces new risks that lead to &ldquo;the Big Rewrite&rdquo;, which at the end rarely goes well. But does it have to be this way?
Looking back, we may notice that the websites written in plain HTML+CSS still open and work perfectly. Boring technologies survive. Similarly, web services built with a dull tech stack are surprisingly robust.</description></item><item><title>Beep, beep, I'm a sheep</title><link>https://zserge.com/posts/beep/</link><pubDate>Sun, 13 Dec 2020 00:00:00 +0000</pubDate><guid>https://zserge.com/posts/beep/</guid><description>Audio I/O is a complex topic, which scares away many inspired musicians who are into programming (or programmers who are into music). Let&rsquo;s try making it look less complex and see how audio works on each modern desktop platform.
Our show case today will be a simple beeper. Remeber that annoying thing inside your PC boxes producing the irritating buzzing sound? It&rsquo;s long time gone, but I suggest to sumon its soul and make a library that plays beeps across all the platforms.</description></item><item><title>Étude in C minor</title><link>https://zserge.com/posts/etude-in-c/</link><pubDate>Thu, 15 Oct 2020 00:00:00 +0000</pubDate><guid>https://zserge.com/posts/etude-in-c/</guid><description>Let me start with a picture.
int main() {float f ;char c;int d,o;while(scanf( &#34;%d%c%d &#34;,&amp;d,&amp;c,&amp;o) &gt;0){c&amp;=31;for(f=!(c&gt;&gt;4)*55,c=(c*8/5+8)%12+o* 12-24;c--;f*=1.0595); for(d=16e3/d;d--; putchar(d*f *.032)) ;}} I don&rsquo;t really draw well, so I used formatted C code instead. That was supposed to be a triangular sound wave written in C. In fact, this very C code plays two-octave melodies written in text notation from stdin.
It&rsquo;s only 160 bytes, fits into a modern-day tweet, and the reason it&rsquo;s there is to show how simple it is to create minimal music with code in any programming language, not just the special languages like CSound, ChucK, or SonicPi.</description></item><item><title>Nokia Composer in 512 bytes</title><link>https://zserge.com/posts/nokia/</link><pubDate>Tue, 13 Oct 2020 00:00:00 +0000</pubDate><guid>https://zserge.com/posts/nokia/</guid><description>Those who ever owned an old Nokia phone like 3310 or 3210 might still remember its wonderful ability to compose your own ringtones straight on the phone&rsquo;s keyboard. By arranging notes and pauses you could end up with a popular tune beeped out of the phone&rsquo;s speaker, and furthermore, you could share it with your friends! If you missed that era, here&rsquo;s how it looked like:
Unimpressed? Well, trust me, it was really cool back then especially if you are into music.</description></item><item><title>World smallest office suite</title><link>https://zserge.com/posts/awfice/</link><pubDate>Sun, 11 Oct 2020 00:00:00 +0000</pubDate><guid>https://zserge.com/posts/awfice/</guid><description>We are all familiar with a traditional office suite - a word processor, a spreadsheet, a presentation program, maybe a diagramming or note-taking app. We have seen it all in Microsoft Office and Google Docs. Those are really powerful and large. But what would be the most minimal amount of code required to build an office suite?
platform Obviously, our office suite won&rsquo;t be a desktop GUI app - those require plenty of code and efforts to build one.</description></item><item><title>Minimal code editor in JavaScript</title><link>https://zserge.com/posts/js-editor/</link><pubDate>Mon, 24 Aug 2020 00:00:00 +0000</pubDate><guid>https://zserge.com/posts/js-editor/</guid><description>How would one write a code editor in JavaScript? A long time ago one would take a regular textarea to handle user input and would create another div that would do syntax highlighting etc. However, this approach quickly becomes unusable when someone opens it on mobile. That&rsquo;s why CodeMirror has been rewritten to use contenteditable and many other editors followed this approach.
contenteditable Contenteditable, as the name suggests, allows users to edit the contents of the element using the browser-native techniques - all shortcuts for text selection and navigation work as expected, so does the clipboard and other minor editing features.</description></item><item><title>Making a tiny 2x3 bitmap font</title><link>https://zserge.com/posts/tiny-font/</link><pubDate>Sun, 26 Jul 2020 00:00:00 +0000</pubDate><guid>https://zserge.com/posts/tiny-font/</guid><description>Somehow I got curious: what would be the smallest bitmap font that would still be readable?
why 2x3 grid There are plenty of existing retro 8x16 bitmap fonts, like the ones used in VGA graphics and text-mode consoles. We should probably be able to go much smaller than that. We only need to encode 26 different symbols. If our encoding is perfect - we need roughly 5 bits of information, or 5 pixels, each being either black or white.</description></item><item><title>Java agent - Bond or Smith?</title><link>https://zserge.com/posts/javaagent/</link><pubDate>Sat, 06 Jun 2020 00:00:00 +0000</pubDate><guid>https://zserge.com/posts/javaagent/</guid><description>The previous post about JVM turned out to be well-received, so I would like to uncover another fun topic related to JVM - Java agents. Although not everyone gets a chance to write custom Java agents in his career, they are still a wonderful field to explore and open an endless way to customize JVM behavior.
Java agents are special in the way that JVM allows them to do much more than a regular Java app is allowed to: they can instrument or profile code, hot-swap classes, patch methods, etc.</description></item><item><title>How to write a (toy) JVM</title><link>https://zserge.com/posts/jvm/</link><pubDate>Mon, 01 Jun 2020 00:00:00 +0000</pubDate><guid>https://zserge.com/posts/jvm/</guid><description>Whether we like it or not, but Java is one of the most widely used programming languages. However, since most of the applications in Java are either too boring or too complex - not every Java developer has enough curiosity to look under the hood and see how JVM works.
In this post I will try to write a toy (and incomplete) JVM to show the core principles behind it and hopefully sparkle some interest in you to learn it further.</description></item><item><title>KVM host in a few lines of code</title><link>https://zserge.com/posts/kvm/</link><pubDate>Sun, 10 May 2020 00:00:00 +0000</pubDate><guid>https://zserge.com/posts/kvm/</guid><description>KVM is a virtualization technology that comes with the Linux kernel. In other words, it allows you to run multiple virtual machines (VMs) on a single Linux VM host. VMs in this case are known as guests. If you ever used QEMU or VirtualBox on Linux - you know what KVM is capable of.
But how does it work under the hood?
ioctl KVM provides an API via a special device node - /dev/kvm.</description></item><item><title>Linux containers in a few lines of code</title><link>https://zserge.com/posts/containers/</link><pubDate>Sun, 10 May 2020 00:00:00 +0000</pubDate><guid>https://zserge.com/posts/containers/</guid><description>This post is meant to be a counterpart to the previous KVM post, but about containers instead. The idea is to show how exactly containers work by running a busybox Docker image in our own small container runner.
Unlike a VM, container is very vague term. Normally, we call containers a self-contained bundle of code and its dependencies, that can be shipped together and run in an isolated environment inside some host operating system.</description></item><item><title>Tmux for mere mortals</title><link>https://zserge.com/posts/tmux/</link><pubDate>Sat, 25 Apr 2020 00:00:00 +0000</pubDate><guid>https://zserge.com/posts/tmux/</guid><description>Tmux has liberated me from tiling window mangers. Not that I didn&rsquo;t like those, but I occasionally have to work with macOS or default GNOME setups. And over the years I realised that I only need a terminal multiplexor to do terminal tiling for me, the rest of the windows are just fine to be full-screen in separate workspaces.
So, I ended up doing 80% of my work in terminals with tmux.</description></item><item><title>Ode to J</title><link>https://zserge.com/posts/j/</link><pubDate>Tue, 31 Mar 2020 00:00:00 +0000</pubDate><guid>https://zserge.com/posts/j/</guid><description>While self-isolating orchestras and amateur musicians are playing &lsquo;Ode to Joy&rsquo; from their open windows, I would like to give it a try with my ode to J.
If you read the Hacker News or other programming resources, you probably have read the following passage:
&ldquo;One summer weekend in 1989, Arthur Whitney visited Ken Iverson at Kiln Farm and produced—on one page and in one afternoon—an interpreter fragment on the AT&amp;T 3B1 computer.</description></item><item><title>RSS is dead</title><link>https://zserge.com/posts/rss/</link><pubDate>Mon, 30 Mar 2020 00:00:00 +0000</pubDate><guid>https://zserge.com/posts/rss/</guid><description>(The story of github.com/zserge/headline).
About seven years ago Google decided to shut down Google Reader, a world known and beloved RSS reader, and I think no other service has been so genuinely lamented since then. I remember the warm feeling when I opened Reader on a tiny HTC Wildfire that fit well in my palm and read stories from dozens of blogs of interesting and unusual people I was subscribed to.</description></item><item><title>Let's write a tiny chess engine in Go</title><link>https://zserge.com/posts/carnatus/</link><pubDate>Sat, 21 Mar 2020 00:00:00 +0000</pubDate><guid>https://zserge.com/posts/carnatus/</guid><description>In this article we will try to understand how chess engines work by porting the sunfish chess engine to Go. Sunfish is notable for its simplicity and small size, while still being capable of playing decent chess. Go is also known as a simple and highly readable language, so I hope the two of them could make a great couple.
To build a chess engine one has to decide on three important topics:</description></item><item><title>Let's make the worst React ever!</title><link>https://zserge.com/posts/worst-react-ever/</link><pubDate>Fri, 01 Nov 2019 00:00:00 +0000</pubDate><guid>https://zserge.com/posts/worst-react-ever/</guid><description>Turns out we got a bank holiday here in Germany, and it freed up some unexpected time and suddenly my thoughts broke loose. I love React. Yet, I never use it. I normally end up with smaller alternatives like Preact, superfine, hyperapp or Mithril. I choose those, because I like that satisfying feeling, when you skim through the source code and understand how things are implemented. Also, I must inform you upfront, that I am not a frontend developer at all, so please take my following words with a grain of salt.</description></item><item><title>Distraction free writing in Vim</title><link>https://zserge.com/posts/vim-distraction-free/</link><pubDate>Thu, 10 Oct 2019 00:00:00 +0000</pubDate><guid>https://zserge.com/posts/vim-distraction-free/</guid><description>I use Vim as a plain text editor for everything. Apart from coding, I write blog posts in vim, create quick notes and draft design documents. Surprisingly, I haven&rsquo;t customized it a lot and am very lean about the plugins. While keeping my setup austerely simple, I rarely lack any of the functionality.
However, recently I wondered if I can achieve a &ldquo;distraction free&rdquo; experience with Vim, like when you see a full screen text, nicely centered, and nothing else:</description></item><item><title>Implementing metrics in Go</title><link>https://zserge.com/posts/metrics/</link><pubDate>Sun, 10 Jun 2018 00:00:00 +0000</pubDate><guid>https://zserge.com/posts/metrics/</guid><description>Metrics are data points representing your system behaviour over time. People instrument their long-running apps with metrics to see if there are or were any problems and if the system behaves as expected.
There are various metric types, but most common ones are counters, gauges and histograms.
Metric types Counter is simply an increasing number. You may use counters to track the number of served requests, number of errors, and so on.</description></item><item><title>How to configure zsh</title><link>https://zserge.com/posts/terminal/</link><pubDate>Mon, 07 May 2018 00:00:00 +0000</pubDate><guid>https://zserge.com/posts/terminal/</guid><description>Over the years of using Linux as my primary and only OS I had to embrace some unavoidable facts. First, things tend to change and complex things tend to break. Second, reinventing the wheel almost never pays off. And finally, it&rsquo;s not that hard to make a new habit and sometimes it&rsquo;s better than adjusting your workstation to your &ldquo;intuitive&rdquo; understanding that may change very soon.
So years ago I decided to only use the most common software and only the very minimal personalized configuration on top of it.</description></item><item><title>Cross-platform web UI for C and Go</title><link>https://zserge.com/posts/webview/</link><pubDate>Sun, 20 Aug 2017 00:00:00 +0000</pubDate><guid>https://zserge.com/posts/webview/</guid><description>Cross-platform GUI has always been a painful part of software development.
Today the biggest horror for an old-school C developer is to look at the list of Electron apps on their website. Simple, often trivial utilities, each taking over a hundred of megabytes of disk space and consuming hundreds of RAM once launched.
I&rsquo;m not going to start a rant here, people of HackerNews have said enough on this topic. Electron wins because it is easy to use and everyone knows how to write HTML/CSS (unlike, say, QML or XAML).</description></item><item><title>Syntactic sugar in C - (ab)using "for" loops</title><link>https://zserge.com/posts/c-for-loop-tricks/</link><pubDate>Mon, 17 Jul 2017 00:00:00 +0000</pubDate><guid>https://zserge.com/posts/c-for-loop-tricks/</guid><description>The for loop is one of the most powerful constructions in the C language.
It consists of three different parts. The first one is initialization, performed exactly once at the beginning of the loop. The second one is the conditional part, called every time before the loop body. The last one is the increment part, executed on every iteration right after the loop body. Such a loop combines both, linear code and branching in a very customizable manner, which we will explore below.</description></item><item><title>Partcl - a tiny command language</title><link>https://zserge.com/posts/tcl-interpreter/</link><pubDate>Thu, 11 Aug 2016 00:00:00 +0000</pubDate><guid>https://zserge.com/posts/tcl-interpreter/</guid><description>Minimalist interpreters have always attracted me. First of all, they are a good fit for embedded systems whenever you need a custom domain-specific language.
If one needs a scripting language for a microcontroller - there is not so many choices. Instead there are lots of constraints, like the size of the compiled binary code, RAM usage and memory management. Of course the language itself is important, too.
Lua, a very stable, pragmatic and minimal language.</description></item><item><title>My experience with asm.js</title><link>https://zserge.com/posts/my-experience-with-asmjs/</link><pubDate>Mon, 18 Jul 2016 00:00:00 +0000</pubDate><guid>https://zserge.com/posts/my-experience-with-asmjs/</guid><description>It all started with Glitch, a tiny algorithmic music composer. I spent lots of time deciding whether I should choose a native approach (e.g. C++, Qt, RtAudio) or an HTML5 way. After all I decided to give HTML5 a try - there is JavaScript which I still like, WebAudio that runs everywhere, UI that can be ported to desktop thanks to Electron, and I&rsquo;ve heard browsers are really good at performance these days.</description></item><item><title>Anvil 0.4.0 + support libraries</title><link>https://zserge.com/posts/anvil-support-libraries/</link><pubDate>Wed, 11 May 2016 00:00:00 +0000</pubDate><guid>https://zserge.com/posts/anvil-support-libraries/</guid><description>Previously on Anvil: version 0.1 was the first one to use incremental rendering approach instead of virtual tree diff&rsquo;ing. Version 0.2 added support for XML layouts and binding data to existing views. Version 0.3 was about two-way data bindings - most views got simplified lambas for handling user input and many related bugs have been fixed.
Today&rsquo;s version 0.4 takes care of support libraries.
I personally rarely use support libraries (at work we don&rsquo;t target regular consumer devices so material niceties or fragments or action bars are not used a lot).</description></item><item><title>How to architect Anvil apps</title><link>https://zserge.com/posts/anvil-app-architecture/</link><pubDate>Tue, 29 Mar 2016 00:00:00 +0000</pubDate><guid>https://zserge.com/posts/anvil-app-architecture/</guid><description>If you only have a few UI elements, a small data class and your controllers have only a few actions to perform - you may consider using no architecture at all.
Just make a global &ldquo;controller&rdquo; object and/or a global data object. By &ldquo;global&rdquo; I mean you may use dependency injection, or propagate the instance from the root activity to its child views, or make it a singleton.
Simply bind data to your views and call controller methods from your event listeners.</description></item><item><title>The Stockholm syndrome of Android XML</title><link>https://zserge.com/posts/anvil-xml-support/</link><pubDate>Tue, 29 Mar 2016 00:00:00 +0000</pubDate><guid>https://zserge.com/posts/anvil-xml-support/</guid><description>When people first hear about Anvil they don&rsquo;t trust it because at first glance Anvil seems to be just a replacement for XML layouts. It&rsquo;s not. It&rsquo;s a library to build predictable reactive views.
There are many known disadvantages of XMLs (poor code reuse, no type-safety, no variables, very limited styling support etc etc). Yet the developers are so much used to XMLs that they started liking them!
Let&rsquo;s see how one can use Anvil in all its power and still have XMLs in their projects.</description></item><item><title>Anvil howto: view styling</title><link>https://zserge.com/posts/anvil-howto-style-views/</link><pubDate>Mon, 28 Mar 2016 00:00:00 +0000</pubDate><guid>https://zserge.com/posts/anvil-howto-style-views/</guid><description>A common question I hear about Anvil is how to style views.
Let&rsquo;s recall how it&rsquo;s been traditionally done in Android. Here&rsquo;s an example from the Android Developers website:
&lt;TextView android:layout_width=&#34;fill_parent&#34; android:layout_height=&#34;wrap_content&#34; android:textColor=&#34;#00FF00&#34; android:typeface=&#34;monospace&#34; android:text=&#34;@string/hello&#34; /&gt; If you have a lot of views like this - most likely you would like to move repetitive code into a single place and just keep a reference to them in the layout. That&rsquo;s what we call a style - a reusable set of view attributes.</description></item><item><title>The evolution of Android architecture</title><link>https://zserge.com/posts/android-mvp-mvvm-redux-history/</link><pubDate>Mon, 28 Mar 2016 00:00:00 +0000</pubDate><guid>https://zserge.com/posts/android-mvp-mvvm-redux-history/</guid><description>Android is probably the second most popular development platform after the web. Web development practices tend to change every month if not every week. As soon as a tool or a library becomes mature and stable - they call it deprecated and seek for a new replacement. Now let&rsquo;s see how Android development tools and paradigms have evolved over the past few years and how it compares to the web.</description></item><item><title>Two way data bindings in Anvil</title><link>https://zserge.com/posts/anvil-two-way-bindings/</link><pubDate>Tue, 15 Mar 2016 00:00:00 +0000</pubDate><guid>https://zserge.com/posts/anvil-two-way-bindings/</guid><description>New Anvil 0.3.0 has been released. The major focus for this release has been on user input widgets and two-way data bindings.
Issues There have been two types of issues in this two-way data binding milestone: bloated inconvenient event listeners and recursion.
Listeners The first one is easy. Java 8 and Kotlin are the primary languages for Anvil, so when people bind an event listener to a view - they use either a lambda or a method reference.</description></item><item><title>painless publishing of android libraries</title><link>https://zserge.com/posts/jitpack/</link><pubDate>Fri, 11 Dec 2015 00:00:00 +0000</pubDate><guid>https://zserge.com/posts/jitpack/</guid><description>Libraries are only good when it&rsquo;s easy to share them. Android has done this wrong for a very long time.
Node.js has npm and a new library can be published in a couple of minutes, usage is as simple as adding library name to package.json.
Go has no package manager at all and publishing a library is as simple as &ldquo;git push&rdquo; and using is as simple as &ldquo;import github.com/user/library&rdquo;.</description></item><item><title>Anvil: time for a change</title><link>https://zserge.com/posts/anvil-forge-merged/</link><pubDate>Thu, 01 Oct 2015 00:00:00 +0000</pubDate><guid>https://zserge.com/posts/anvil-forge-merged/</guid><description>Those of you who regularly check my blog may remember that I was going to redesign Anvil from scratch. Unfortunately, it was an unavoidable step. We had performance issues and it turned out that blindly copying modern web metaphors to Android doesn&rsquo;t work well.
I am sorry, I had to change a lot of Anvil APIs since then. Those of you who have their apps written with Anvil 0.0.12 most likely would prefer to stick with the older version.</description></item><item><title>Anvil: move fast and break things</title><link>https://zserge.com/posts/anvil-breaking-changes/</link><pubDate>Sun, 13 Sep 2015 00:00:00 +0000</pubDate><guid>https://zserge.com/posts/anvil-breaking-changes/</guid><description>Dear users, those who were early followers of Anvil. I&rsquo;m now heavily working on the next version of Anvil, but it&rsquo;s likely to make you rewrite your code, and I&rsquo;m deeply sorry about that.
Below I will describe why the changes are necessary and I hope you will find that your code would not be modified a lot and embrace the benefist it brings.
how anvil works now Currently we have Renderables which have a view() method returning a virtual layout.</description></item><item><title>Benchmarking Go in the cloud</title><link>https://zserge.com/posts/go-cloud-benchmark/</link><pubDate>Fri, 04 Sep 2015 00:00:00 +0000</pubDate><guid>https://zserge.com/posts/go-cloud-benchmark/</guid><description>Benchmarking Go in the cloud Go now seems to be a natural choice for writing your next microservice or web app. It&rsquo;s mature and fast.
But where would you host your app? In this post I will compare some popular PaaS (platform-as-a-service) and how the same primitive Go web app performs on each of them.
Go I&rsquo;m using the latest Go compiler and the latest version of Gin framework with zero-allocation router.</description></item><item><title>lua-sh: calling shell commands as functions</title><link>https://zserge.com/posts/luash/</link><pubDate>Thu, 03 Sep 2015 00:00:00 +0000</pubDate><guid>https://zserge.com/posts/luash/</guid><description>Lua is one of my favourite languages. It&rsquo;s tiny, it&rsquo;s fast, it has simple grammar and is very easy to learn.
I also often write shell scripts - from simple one-liners, to bigger ones containing business logic and binding together smaller app components. In fact, this blog is powered by a few shell scripts to generate list of posts, rss xml etc.
I had an experience in the past when Bash script became hard to maintain.</description></item><item><title>How to sign release apk with gradle</title><link>https://zserge.com/posts/android-signing/</link><pubDate>Sun, 09 Aug 2015 00:00:00 +0000</pubDate><guid>https://zserge.com/posts/android-signing/</guid><description>Whenever I prepare my APK for the release - I used to do the following steps:
Copy keystore to the project directory Copy gradle.properties into the project directory with keystore name, alias and password defined Copy some code from some blog that would load the properties and set up the signing Finally, do gradle build But why not to move the boilderplate out of build.gradle?
Helper signing script I wrote a tiny helper script that can be included into the projects:</description></item><item><title>How Palette was made</title><link>https://zserge.com/posts/palette/</link><pubDate>Thu, 06 Aug 2015 00:00:00 +0000</pubDate><guid>https://zserge.com/posts/palette/</guid><description>Palette is an open source lightweight color picker for the most famous color schemes, like Material Design, Flat UI, iOS, Windows Phone etc.
Despite being color blind, I like apps and websites with the right selection of colors. And sometimes when starting a new project it&rsquo;s easier to pick a color palette from the existing ones. Or, if you want to meet the guidelines for the certain platform - you&rsquo;d better use the colors they offer.</description></item><item><title>Anvil: Double O Seven</title><link>https://zserge.com/posts/anvil-0.0.7/</link><pubDate>Thu, 25 Jun 2015 00:00:00 +0000</pubDate><guid>https://zserge.com/posts/anvil-0.0.7/</guid><description>Anvil: version 0.0.7 released! If you missed the news - Anvil is a tiny reactive UI library for Android. It&rsquo;s based on the concept of the virtual layout (much like React.js) and brings declarative layouts with data bindings, componentization, styles, animations etc in pure Java.
It also supports Kotlin, which is a great language and I hope it will replace Java on Android some day.
Version 0.0.6 was suprisingly stable, but life goes on, and here&rsquo;s version 0.</description></item><item><title>log - a drop-in replacement for android Log class</title><link>https://zserge.com/posts/log/</link><pubDate>Sun, 14 Jun 2015 00:00:00 +0000</pubDate><guid>https://zserge.com/posts/log/</guid><description>Once upon a time I was making a pretty large app for Android. When everything was almost finished I wondered how shall I remove all my logs before publishing the app? Looks like many other developers are interested in the same question as well.
Surprisingly, the recommented way out is to strip off the Log class from the production builds using ProGuard. Maybe Proguard is nice, but to me it&rsquo;s really weird why instead of having a nice out-of-box API for logging I need to modify my byte code with some 3rd party tool?</description></item><item><title>Buck - life is too short to spend a minute for each build</title><link>https://zserge.com/posts/buck-build-system/</link><pubDate>Wed, 27 May 2015 00:00:00 +0000</pubDate><guid>https://zserge.com/posts/buck-build-system/</guid><description>Gradle is too slow, Ant is too basic. Buck is fast and super-configurable and I&rsquo;d like to tell you how I use it for Android development.
I own a pretty old thinkpad laptop so I don&rsquo;t expect the builds to be too fast. Ant used to spend 10..40 seconds for each build on my laptop depending on how large the project is. Gradle takes about a minute in average and that&rsquo;s too long for me - I just lose focus when I just sit and wait for the build results.</description></item><item><title>Anvil: big progress for a small library</title><link>https://zserge.com/posts/anvil-2/</link><pubDate>Thu, 16 Apr 2015 00:00:00 +0000</pubDate><guid>https://zserge.com/posts/anvil-2/</guid><description>Anvil: big progress for a small library I have just released Anvil 0.0.2. So many changes have been made and now I am absolutely confident that Anvil has its strong points even though I&rsquo;m the only active user of it.
What is Anvil? This section is for those who missed the early steps of Anvil.
Anvil is a tiny reactive UI library for Android. What does this mean? It means that you can declare your UI in Java, bind your data to the views, bind event listeners to the views and leave it running.</description></item><item><title>Where Anvil meets Kotlin</title><link>https://zserge.com/posts/anvil-kotlin/</link><pubDate>Thu, 16 Apr 2015 00:00:00 +0000</pubDate><guid>https://zserge.com/posts/anvil-kotlin/</guid><description>Kotlin is a very nice language for JVM. I wrote about it in the past.
Anvil is a very nice UI library for Android. How do these two play together?
The first attempt My favourite example to demonstrate Anvil syntax is a simple click counter. It demonstrates the use of layouts, views, data binding and event binding. In Java it looks like this:
public ViewNode view() { return v(LinearLayout.class, orientation(LinearLayout.VERTICAL), v(TextView.</description></item><item><title>Anvil: the story of automatic rendering</title><link>https://zserge.com/posts/anvil-1/</link><pubDate>Thu, 22 Jan 2015 00:00:00 +0000</pubDate><guid>https://zserge.com/posts/anvil-1/</guid><description>Reading my previous blog post some people asking why I&rsquo;m so strongly against XMLs if they are really good? I think I shall clarify that I&rsquo;m not against XMLs per se, I&rsquo;m against the way many developers organize their apps. Let&rsquo;s look at a simple example - a button and a textview showing how many times the button was pressed.
Here&rsquo;s a typical implementation in Java+XML:
&lt;LinearLayout ....&gt; &lt;TextView android:id=&quot;@+id/text&quot; .</description></item><item><title>android UI development made easy</title><link>https://zserge.com/posts/android-mvx/</link><pubDate>Wed, 14 Jan 2015 00:00:00 +0000</pubDate><guid>https://zserge.com/posts/android-mvx/</guid><description>TL;DR: I offer declarative strongly typed layouts with data bindings in pure Java.
Android UI development is broken. It normally ends up with lots of boilerplate code and poor architecture. Here are some (very subjective) issues:
There is no MVC (or M-V-Whatever). XMLs always contain lots of copy-pasted code, very poor code reuse. XMLs are very fragile, so you can type &ldquo;TextVeiw&rdquo; and it will not warn you during the compilation but will throw an InflateException in runtime.</description></item><item><title>moved to new static site generator (again)</title><link>https://zserge.com/posts/new-site-generator2/</link><pubDate>Sat, 20 Dec 2014 00:00:00 +0000</pubDate><guid>https://zserge.com/posts/new-site-generator2/</guid><description>As you may have noticed, the site has changed its look. That&rsquo;s because I made a small rewrite and it resulted in a new static site generator. It&rsquo;s my another NIH product, this time it&rsquo;s written in Go.
stash away I used stash before. It was written in UNIX Shell and was really perfect for my needs. Then it became slower and slower. The reason is that it could not track the timestamps of the web pages so it regenerated every page every time.</description></item><item><title>ultimately minimal unit testing</title><link>https://zserge.com/posts/minimal-testing/</link><pubDate>Tue, 16 Dec 2014 00:00:00 +0000</pubDate><guid>https://zserge.com/posts/minimal-testing/</guid><description>Most large software projects include automated testing and the reasons are obvious. But what about smaller, even toy projects? There should be some extremely lightweight unit-testing frameworks/libraries that would easily fit even the smallest project needs.
Unit testing should be easy to start. Otherwise people won&rsquo;t bother with writing tests at all (unless they are forced to). People don&rsquo;t like learning complex frameworks to run just a dozen of tests.</description></item><item><title>simple library publishing with Gradle</title><link>https://zserge.com/posts/gradle-maven-publish/</link><pubDate>Sun, 10 Aug 2014 00:00:00 +0000</pubDate><guid>https://zserge.com/posts/gradle-maven-publish/</guid><description>So, you switched to Gradle and just finished you new shiny Android library (or java library). And of course you want to share it with the community.
Here&rsquo;s a quick guide for those who never published their libraries before.
What is maven central? In java world libraries are usually stored in a big repository called Maven Central. You may think of it as of the NPM repository for Node.js or as of PyPI for Python.</description></item><item><title>mucks: now with the dvtm flavor!</title><link>https://zserge.com/posts/mucks2/</link><pubDate>Sat, 07 Jun 2014 00:00:00 +0000</pubDate><guid>https://zserge.com/posts/mucks2/</guid><description>Somehow refactoring turned info rewriting from scratch&hellip; So, meet the new shiny mucks app written in AWK language (instead of UNIX Shell).
I played with quotes in tmux &ldquo;send-keys&rdquo; command, and it turned out that different shells treat quotes in the &ldquo;read&rdquo; command very differently, and I found no easy way to overcome it.
That&rsquo;s how AWK came to the rescue. A more mature, yet much simpler language made my code cleaner and shorter.</description></item><item><title>mucks: automating screen and tmux</title><link>https://zserge.com/posts/mucks/</link><pubDate>Fri, 25 Apr 2014 00:00:00 +0000</pubDate><guid>https://zserge.com/posts/mucks/</guid><description>I can&rsquo;t imagine my daily work in terminal without multiplexers. I used to use GNU Screen a couple of years ago, then I switched to Tmux.
There has been a lot of talks about screen vs tmux, and then vs byubu. I still use both, and I still like both. What I was really missing is session management.
Since my laptop&rsquo;s uptime is normally more than a month - I just created windows manually and started programs manually and then just attached/detached until the next reboot.</description></item><item><title>lambda support for Android</title><link>https://zserge.com/posts/android-lambda/</link><pubDate>Thu, 09 Jan 2014 00:00:00 +0000</pubDate><guid>https://zserge.com/posts/android-lambda/</guid><description>Lambda support for Android Note: big thanks to orfjackal (Esko Luontola), the author of Retrolambda, for making it possible. I just used his tool to produce Android apk.
So, you&rsquo;re jealous about new JDK8 upcoming to most Java developers except for you, Android coders? Then I have good news - there is a way to use lambdas in Android right now (warning: it&rsquo;s still a hack)!
But I already have local classes!</description></item><item><title>kotlin - a new hope</title><link>https://zserge.com/posts/kotlin/</link><pubDate>Thu, 28 Nov 2013 00:00:00 +0000</pubDate><guid>https://zserge.com/posts/kotlin/</guid><description>I&rsquo;ve been looking for Java alternatives since my first days of Android development. I can&rsquo;t say I don&rsquo;t like Java. It&rsquo;s a nice language, very easy to learn and pretty logical. But the lack of proper functional style constructions often inspires me to check what&rsquo;s new in the field of JVM languages.
So far I&rsquo;ve tried (tried, I never learnt these languages properly):
Mirah - a very nice Ruby-translated-to-Java language.</description></item><item><title>moved to new static site generator</title><link>https://zserge.com/posts/new-site-generator/</link><pubDate>Thu, 18 Jul 2013 00:00:00 +0000</pubDate><guid>https://zserge.com/posts/new-site-generator/</guid><description>This website has been powered by poole for a long time. I don&rsquo;t think I have any real reasons to migrate from poole.
Do you know there are static site generators written in UNIX Shell? I think it&rsquo;s a good choice for old-school programmers, who feel uncomfortable with Ruby, Python and even Node.js.
All that shell madness started with werc, a nice tool used by suckless and cat-v. Then sw appeared.</description></item><item><title>logdog - a colorized Android logcat</title><link>https://zserge.com/posts/logdog/</link><pubDate>Mon, 20 May 2013 00:00:00 +0000</pubDate><guid>https://zserge.com/posts/logdog/</guid><description>Sometimes I do Android development. I never liked using debuggers, neither I use IDE. So my choice is to write Android apps with Vim+Terminal. With the lack of debugger I have to use logcat frequently, and using plain adb logcat (even with grepping output) is far from being pleasant.
Then I found there are nicer alternatives, like coloredlogcat or proclogcat. I tried them, but they lacked other output formats, like &ldquo;time&rdquo;.</description></item><item><title>AAML - another android markup language</title><link>https://zserge.com/posts/aaml/</link><pubDate>Tue, 02 Apr 2013 00:00:00 +0000</pubDate><guid>https://zserge.com/posts/aaml/</guid><description>Sometimes I do android apps development. I use terminal, tmux and vim - no Eclipse, no IntelliJ Idea or other IDEs.
What I don&rsquo;t like in android development is XMLs. It&rsquo;s a lot of typing, and I don&rsquo;t like to type a lot. So, here&rsquo;s my attempt to make it easier for those who use minimal tools for android development. Maybe it would work for Eclipse, too.
Goals Simple syntax: minimal punctuation, no closing tags Should suit for most XMLs: layouts, values, strings etc.</description></item><item><title>new project: jknav</title><link>https://zserge.com/posts/update-jknav/</link><pubDate>Fri, 30 Nov 2012 00:00:00 +0000</pubDate><guid>https://zserge.com/posts/update-jknav/</guid><description>I like Vim and I like using &lsquo;J&rsquo; and &lsquo;K&rsquo; to scroll text down and up.
I know about Vimperator/Vimium, but they seem too powerful to me. That&rsquo;s why I started my NIH browser extension. At the moment, Firefox and Chrome are supported.
Here are the sources.
Any advice or comments are welcome!</description></item><item><title>cucu: a compiler you can understand (3/3)</title><link>https://zserge.com/posts/cucu-part3/</link><pubDate>Thu, 25 Oct 2012 00:00:00 +0000</pubDate><guid>https://zserge.com/posts/cucu-part3/</guid><description>Let&rsquo;s talk about compiler backends. C should be a portable language, and there is no need to rewrite the whole compiler if you want to port it to the new CPU architecture.
Backend is a part of the compiler that generates low-level byte code. Compiler itself just calls backend functions. Good backend design makes the compiler highly portable.
I wanted CUCU to be a portable compiler (actually, a cross-compiler). So, I decided to move backend code generator to a separate module.</description></item><item><title>cucu: a compiler you can understand (2/3)</title><link>https://zserge.com/posts/cucu-part2/</link><pubDate>Wed, 24 Oct 2012 00:00:00 +0000</pubDate><guid>https://zserge.com/posts/cucu-part2/</guid><description>So far, we have defined language grammar and have written a lexer. In this part we will write a parser for our language. Before we start, we need some helper functions:
int peek(char *s) { return (strcmp(tok, s) == 0); } int accept(char *s) { if (peek(s)) { readtok(); return 1; } return 0; } int expect(char *s) { if (accept(s) == 0) { error(&#34;Error: expected &#39;%s&#39;\n&#34;, s); } } peek() returns non-zero value if the next token is equal to the given string.</description></item><item><title>cucu: a compiler you can understand (1/3)</title><link>https://zserge.com/posts/cucu-part1/</link><pubDate>Tue, 23 Oct 2012 00:00:00 +0000</pubDate><guid>https://zserge.com/posts/cucu-part1/</guid><description>Let talk about the compilers. Have you ever thought of writing your own one?
I will try to show you how simple it is. The first part will be pretty much theoretical, so keep patience.
what we&rsquo;re going to achieve? CUCU is a toy compiler for a toy language. I want it to be as close to ANSI C as possible, so that every valid CUCU program could be compiled with a C compiler without any errors.</description></item><item><title>textizer: hack your android widgets</title><link>https://zserge.com/posts/android-widget-for-geeks/</link><pubDate>Sat, 25 Aug 2012 00:00:00 +0000</pubDate><guid>https://zserge.com/posts/android-widget-for-geeks/</guid><description>I like the idea of Android home screen widgets. I like to visualize information, to get it quickly and perform common tasks in a single tap. Even though Android market is flooded with useful and not-so-useful widgets of any type and price, I was looking for a geeky way to make my own widgets.
why? Normally, I need either very simple widgets (like clock, calendar, weather, battery level) or very specific ones (say, a calendar that draws a date in red if it&rsquo;s a holiday in my country).</description></item><item><title>my minimalistic agile issue tracker</title><link>https://zserge.com/posts/agile-issue-tracker/</link><pubDate>Thu, 02 Aug 2012 00:00:00 +0000</pubDate><guid>https://zserge.com/posts/agile-issue-tracker/</guid><description>I don&rsquo;t know if you share my point of view, but I have a confession to make: I hate issue trackers. I usually work on small projects with small teams, and I find monsters like Bugzilla or Redmine an overkill.
Another thing is that in my head the word &ldquo;issue&rdquo; has a bitter taste. I prefer the word &ldquo;task&rdquo; instead, because it doesn&rsquo;t make much difference to me when I&rsquo;m implementing a new long-expected feature or fixing an annoying bug.</description></item><item><title>the first post</title><link>https://zserge.com/posts/hello/</link><pubDate>Wed, 01 Aug 2012 00:00:00 +0000</pubDate><guid>https://zserge.com/posts/hello/</guid><description>Normally, people don&rsquo;t read &lsquo;hello&rsquo; posts. I consider them useless, they teach nothing, mean nothing but still take time to write and to read. So, I strongly hope that I will be the only person who read this.
I started another blog. I already have one (in Russian), but I hope they both will co-exists in future. Some posts will be translated, some will be adopted, others will not. Anyway, I can&rsquo;t promise too much, but the idea of this site/blog seems to be inspiring at the moment.</description></item></channel></rss>