HN user

zserge

586 karma

Hey, I'm Serge. Born in Ukraine, living in Munich, MSc in Software Engineering, brought up with a love for simple things, now doing all sorts of software development, mainly Go, C/C++, JavaScript and Python.

https://zserge.com

Posts23
Comments178
View on HN
github.com 6y ago

Show HN: Tiny and utterly useless ReactJS clone (exercise in minimalism)

zserge
22pts4
github.com 7y ago

Show HN: Lorca – a tiny library for building cross-platform HTML5 GUI apps in Go

zserge
14pts3
github.com 8y ago

Show HN: Tiny cross-platform web UI library for C and Go

zserge
11pts2
github.com 8y ago

Show HN: Tiny cross-platform webview library for C/Golang

zserge
12pts2
github.com 8y ago

Show HN: Tiny cross-platform webview library for C and Go

zserge
4pts0
zserge.com 9y ago

Syntactic sugar in C – (ab)using “for” loops

zserge
3pts0
trikita.co 10y ago

Show HN: Slide – an open-source plain text presentation maker

zserge
105pts40
medium.com 10y ago

Glitch: how to synthesize drums

zserge
1pts0
medium.com 10y ago

Glitch: beyond the bytebeat

zserge
2pts1
zserge.com 10y ago

Anvil how-to: styling views

zserge
1pts0
zserge.com 10y ago

The evolution of Android architecture

zserge
7pts0
medium.com 10y ago

Glitch: a noisy fusion of math and music (2016)

zserge
7pts0
zserge.com 10y ago

Benchmarking a No-Op Go Web App on Heroku, OpenShift, DigitalOcean and AWS

zserge
6pts0
zserge.com 10y ago

Lua-sh: Calling shell commands as functions

zserge
1pts0
github.com 11y ago

Show HN: A convenient drop-in replacement for android.util.Log

zserge
5pts0
zserge.com 11y ago

Show HN: Anvil – a tiny reactive android UI library

zserge
2pts3
zserge.com 12y ago

Show HN: Mucks - a session manager for GNU Screen and tmux

zserge
2pts0
zserge.com 12y ago

Lambda support for android (with retrolambda backporting tool)

zserge
1pts0
zserge.com 13y ago

Another Android Markup Language (a very simple one)

zserge
2pts2
zserge.com 13y ago

CUCU: a compiler you can understand (though it's a really ugly one)

zserge
8pts0
zserge.com 13y ago

Textizer: android widget for geeks

zserge
1pts0
zserge.com 13y ago

My minimalistic agile issue tracker

zserge
28pts13
news.ycombinator.com 14y ago

ShowHN: obsqr QR scanner - bringing minimalism to Android

zserge
7pts3

I suppose one of a few examples when a picture is totally not worth a thousand words, if a picture is made by me

I guess I miscommunicated it. I meant I'd call everything a tensor but for some smaller dimensions we have specific names. Of course, 1D can still be a tensor and so is 6D or nD.

I wish we used something else but Python as the default ML language, so that some advanced type system would work for us to ensure tensor shapes and compatibility.

A slightly larger implementation at the end of the post does that to some extent - https://github.com/zserge/kalk (CSV import export, Excel-like "locking" of rows/columns like $A$1). If there's a need for such a project - I'm happy to add ODF or XLSX, more compatibility with Excel formulas etc. I'm not sure about Vi keybindings, I personally find spreadsheets easier to use in a non-modal manner.

It's a common CPU vs RAM decision to make. Dependency graph consumes memory, while recalculating everything for a number of iterations could happen on stack one formula at a time in a loop. On 6502 it mattered. On modern CPUs, even with RAM crisis I'm sure for 99.9% of spreadsheets any options is good enough. Say, you have 10K rows and 100 columns - it's 1M calculations to make.

You might be right, but the only place where regexps are applied in code is for validating resource text fields (which is optional). Those regexps are defined in read-only schemas by the developer (if needed). Schemas are immutable. There seems to be absolutely no connection between the data transmitted over the API (i.e. what user can inject) and regexps. I'm not dismissing the idea that there might be plenty of other possible vulnerabilities in other areas of this toy project.

In hindsight, JSONL would have been much easier to deal with as a developer. But I still don't regret picking CSV -- DB interface is pluggable (so one can use JSONL if needed), and I deliberately wanted to have different formats for data storage (models) and data transfer objects (DTOs) in the API layer, just like with real databases. I agree, CSV is very limited and fragile, but it made data conversion/validation part more explicit.

Like others have guessed, I limited myself to what Go stdlib offers. Since it's a personal/educational project -- I only wanted to play around with this sort of architecture (similar to k8s apiserver and various popular BaaSes). It was never meant to run outside of my localhost, so password security or choice of the database was never a concern -- whatever is in stdlib and is "good enough" would work.

I also tried to make it a bit more flexible: to use `bcrypt` one can provide their own `pennybase.HashPasswd` function. To use SQLite one can implement five methods of `pennybase.DB` interface. It's not perfect, but at the code size of 700 lines it should be possible to customise any part of it without much cognitive difficulties.

To be fair, the project is linked to the blog post I recently wrote, so it's merely a tiny personal/educational project.

I tried to experiment with an API similar to what k8s api server offers: dynamic schemas for custom resources, generated uniform REST API with well-defined RBAC rules, watch/real-time notifications, customisation of business logic with admission hooks etc.

I also attempted to make it as small as possible. So yeah, I don't try to compete with Pocketbase and others, just trying to see what it takes to build a minimally viable backend with a similar architecture.

The choice of the "database" is dictated by the very same goals. I deliberately made it an interface, better databases exist and can be plugged in with little code changes. But for starters I went with what Go stdlib offers, and CSV is easy enough to debug.

Microjs 2 years ago

So that things like React could be distributed as a collection of hundreds of interconnected single-function tiny modules?

I appreciate the fact that it contains shortcuts for such words as "endeavour" (EDV), "ecclesiastic" (EC), "notwithstanding" (NWG) or "vehemence" (VMC) being a dictionary of the "basic and most frequently used words". Also, the suggested abbreviation for "sex" is "SEX".

Would it be possible to train an LLM from scratch that would speak Toki Pona? 120 word dictionary over a reduced alphabet would mean a tiny number of possible tokens and theoretically a model could be smaller than the ones used in "tiny stories" experiment (where a simplified almost childish English has been used). Maybe even a local machine would be enough to train it. I wonder if there is a large enough dataset for Toki Pona or if there is a sensible way to synthesize one? I'm no expert in LLMs or Toki Pona, though.

Just started learning Zig, but I'm already amazed by the language. Feels so intuitive, simple and productive, really a good choice for quick prototyping. I'm glad to see Zig being used as a "successor" to C in projects like this.