ckok

Joined 12 years ago

Karma
105
Submissions
83
Member since
Sep 15
Carlo Kok
View on Hacker News

Recent submissions

Comment · 10 months ago
The MySQL protocol is a lot saner and easier to implement than the pgsql one. I can imagine thats a factor? Once connected the sql dialect matters really little
Comment · 1 year ago
Curiously if you ask if they would consider properly supporting notifications from the mobile web version then the answer is always no. Pwa would be perfectly fine but its crippled on Zulip
Comment · 1 year ago
I believe the proper term for what i am describing is a recursive descent parser. With which it is also quite doable to generate proper error handling and even recovery. Some form of this is used in almost every production language I think.

It has been years since I've written a proper parser but before that every time I had to write one I tried the latest and greatest first. ANTLR, coco/r, combinators. All the generated ones seemed to have a fatal flaw that hand writing didnt have. For example good error handling seemed almost impossible, very slow due to Infinite look ahead or they were almost impossible to debug to find an error in the input schema.

In the end hand crafting seems to be faster and simpler. Ymmv.

My point about the article was mostly that all the formal theory is nice but all it does is scare away people, while parsing is probably the simplest thing about writing a compiler.

Comment · 1 year ago
I think this makes it sound a lot more difficult than it has to be, with the formal theory.

When it's really one of the most simple things if you divide it in parts and look at it from a tokenizer (string to list of tokens) and parser on top. Where the tokenizer can usually be very simple: a loop, large switch on the current character, where a choice is made on "what can this be", and making it into a formal token or error. Then a simple recursive parser that can almost be a 1 to 1 copy of the (E)BNF.

Comment · 2 years ago
This has been said about pretty much every subject. Writing your own Browsers, compilers, cryptography, etc. But at least for me even if nothing comes of it just knowing how it really works, What steps are involved are part of using things properly. Some people are perfectly happy using a black box, but without kowning how its made, how do we know the limits? How will the next generation of llms happen if nobody can get excited about the internal workings?
Comment · 2 years ago
Sso should be the default really. And as a starting point every language has openid connect implemented. Yes it needs work but surely better than the average password reuse?

For large and small companies surely the best way to maintain their users

Comment · 2 years ago
Macho executables don't contain debug info. Just references to .o files.
Comment · 2 years ago
The only thing missing with Json support now seems to be something like a gin index on jsonb fields to make querying efficiently on any member of the field itself.
Comment · 2 years ago
Does anyone know if SQLite has a public roadmap? This combined with a gin or gin like index would be a killer combination
Comment · 3 years ago
Does this also cover some kind of facetted search? (Counting the different colored and sized t-shirt) in an efficient way? As that is also a large part that elastic can do but PostgreSQL isn't very good at.
Comment · 3 years ago
I couldn't find it in the docs but does this also support working in a htmx like mode? Where the server renders pages and it does partial updates of parts? Or what some frameworks now call server components?

Or is everything more like a initial render on the server and pure wasm from that time on?

Comment · 3 years ago
Does it have any kind of master/slave or replication abilities? Couldn't find anything in the docs.
Comment · 5 years ago
Parser generators generally suffer from at least speed, recovery, error handling and lack of debuggability. They also require you to learn a new language, the parser generators language.

Last but not least, what you actually end up wanting to build is an ast, as at some point you want to do something with the input, for most parsers you then have to implement even more code to build up the ast.

It is much easier to hand write it. In the end its faster to write and usually faster to run.

Every few years I evaluate the new options for the languages I use (c#, pascal), every time so far I am disappointed with the tooling. Maybe one year.

Comment · 5 years ago
But that's the right way to do it really... I remember an obscure thing in c# when var was introduced that if you have a type called 'var' in scope, type inference doesn't work and it uses that type instead. This is the way new features should be introduced.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton