Hacker News new | past | comments | ask | show | jobs | submit | tusharsadhwani's comments login

that's because it's not a reimplementation, it is cpython recompiled to wasm.


I finished this book, wrote the two implementations in Python and Zig, genuinely one of the best set of projects I've ever built.


Hmmm, I started the book once in powershell. I think, I finished chapter 2. Maybe I should finish the whole book with it finally. Just for the fun.

(Yes, powershell. Because I didn't have any other toolchain/compiler on the windows machine at some old work place and no admin rights to install anything. So I learned powershell.)


How was the Zig experience? I am looking for an intermediate Zig project to practice Zig. Does this require advanced features of Zig?


I’ve also ported the lox vm to Zig and had a great time working through it.

Since the project is designed in C, you can mostly write the exact same code in zig, with minimal modifications. If you want to use zig features, they’re easy to integrate, but Nystrom obviously won’t be giving you any hints.

But the language offers a lot of useful features (slices, optionals, error types) and makes some C paradigms syntactic realities (tagged enums, explicit pointer casts). Even more so, the standard library comes with very useful stuff (an ArrayList, a handful of different allocators, heck I replaced the trie of keywords with a StaticStringMap).

it’s a fun project, I would definitely recommend it!


I’m also implementing it in Zig right now (and haven’t done any project other than small snippets in zig before) and it’s fine.

You can actually appreciate how much nicer it is to write than in C, while still being a fairly 1-1 translation.


This is already the best API testing client that I have found. It's lightweight, it's snappy, it's intuitive, and it can run on a VPS out of the box over an SSH connection, no proxying needed.


Thank you very much! It's definitely not feature complete yet - but I hope it can be a solid competitor in the space.


Yup, it's extract, fork process, cleanup. It's also fairly easy to extend the project to create installers and let the user choose a path to extract in, and I plan on doing that.

I also believe that sending a signal to the parent will be propagated down, but I haven't tested it.


This is brilliant stuff, a very nice high level explanation that skips everything that would make it too boring for a first time reader.

Adding other resources at the end which explain how it _really_ works under the hood would be great.


This is a similar article that I thought was pretty good: https://tenthousandmeters.com/blog/python-behind-the-scenes-...


they're beta testing `textual-serve` which does exactly this.


thanks for the non paywalled link!


It's true, the truly cursed method should never be used in a project that you actually aim to use. But, I just wanted to see how close I could get to the original idea, regardless of how "bad" the solution ended up being.

The second method indeed goes very far! I've made some very cool libraries and talks with that alone.


it does!


you're welcome!


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

Search: