Hacker Newsnew | past | comments | ask | show | jobs | submit | himujjal's commentslogin

You know a better dsl? jquery.


Not really. Operating with Chrome Devtools Protocol over WS is completely different. You cannot move your mouse, you cannot open tabs, you cannot control the browser in the same way. It's not really comparable, sorry.

Here is a reference for you to read up on: https://chromedevtools.github.io/devtools-protocol/


what is the specific domain of jquery ?>


I don't think he understands what CDP is vs Client Side JavaScript.


I think this is against HN’s policies. @dang


I thought exceptions tended to be made when its highly relevant to the technical topic at hand and also non controversial.

Outside a few weird online bubbles and pockets of the US, hardly anyone disputes the claim you are objecting to.


Regardless, it's just noise.


If you don't understand that politics, ideology and technology are deeply intertwined and they simply CANNOT be considered separately, you should start educating yourself


This. Writing a parser in Zig is so simple. Just allocate once, and then start writing your parser.

One allocator for parser, one for scanner. One for type allocation. Keep them all for semantic analysis. Write the output renderer (binary/language). Deallocate.

In this whole process, it makes it so easy to not think about memory anymore. Just enjoy writing your program.


The scanner can probably be zero allocation though - zig should be able to express an iterator over the input byte array that returns a token on dereference without needing more state than the position in the array


Is there a detailed blog post or a book or something you can share that shows how easy it is to write a parser in zig?


Neovim user detected!


This is state of the art. It will take time before Tigerbeetle themselves release their state machine as a library.

They have done some incredible job. Implementing things I didnt know existed about software/hardware.


I dont know if you want to monetize this. But I suggest make it open source.

You will receive tons of improvements and updates. I love this idea!


I loved Nim when I used it first.

But I left it because of recursive imports. I had to basically put all my types into one file and use them from various others. For a relatively medium sized project (~10LOC), its a but of a hassle. Refactoring is an issue.

That being said, the language is fantastic. Can anybody with experience suggest me what HTTP library/framework do they prefer for servers?


The lack of recursive imports can be annoying, but I found I don't mind it. It keeps your module tree into a DAG.

Chronos is probably the most feature rich and uses async. Mummy is newer and uses a threading model. Both are used in production.


Node and Python also don't really work with circular imports.


Python doesn't work with circular imports. NodeJS does. After using NodeJS for such a long time, I think it is a feature that is taken for granted.

That being said, the Nim team is working on it as per a few issues: [1] https://github.com/nim-lang/rfcs/issues/6 [2] https://forum.nim-lang.org/t/2114

I love the language, and this is probably the only bottleneck for me.


Node really doesn't work with circular imports. There are runtime gotchas with it, for example destructuring a cyclic import via require() will give undefined for the destructured values as they "don't exist yet".

Glad to see progress on the Nim side!


Go through Zig’s Async. Its a bit like co-routines but low level. You are required to keep track of memory allocations and pointers to function “frames”. For someone coming from a high-level language POV, frames were a new concept. But Zig does it so superb.

Zig just needs some runtime event loop like Tokio or AsyncIO from Rust to get up and running with its fantastic async model.


Did you check their Wiki? Have a nice set of gifs


So, its not just me!


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: