Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
khaledh
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
16 ms
·
151.
▲
by
khaledh
2y ago
Should have (2022) in the title.
152.
▲
by
khaledh
2y ago
Reminds me of binarylang[0] (a library for binary parsing written in Nim). I used it in a small hobby project to parse ELF binaries in a declarative manner (well just the headers + string table)[1]. [0] https://github.com/se
153.
▲
by
khaledh
2y ago
Not related but funny: Men's Brains and Women's Brains with Mark Gungor (Nothing Box) https://youtu.be/SZ6mVumHY9I?si=vWEyWbKcai0tW3CH
154.
▲
by
khaledh
2y ago
When I first started using Nim I was a snake_case person, and I was also put off by camelCase as the preferred style. Fast-forward a few years and I got used to the camelCase and moved on, focusing on what I want to build instead of persona
155.
▲
by
khaledh
2y ago
Check out the discussion on my hobby kernel written in Nim: https://news.ycombinator.com/item?id=40962767 I tried to answer that question as best as I can after having implemented a few non trivial projects in Nim.
156.
▲
by
khaledh
2y ago
I had to think hard about this, and I couldn't come up with something so obvious that it would be a no brainer to not use Nim. __MatrixMan__ and SJMG have good points. If it's anything, it wouldn't be a technical issue in the
157.
▲
by
khaledh
2y ago
I went over this in other comments, but basically the language appeals to me since: - it's close to Python in syntax (less noise, more readable) - has no garbage collector by default (it uses ARC) - has great C interop - can be optimiz
158.
▲
by
khaledh
2y ago
> Overall, are you happy with your choice of using Nim? Yes. It's a pleasant language to work with. > What would you do different? (and what unexpected positives did you find)? A couple of things I think need improvements are: (1
159.
▲
by
khaledh
2y ago
I did consider Swift for a brief moment, but was put off by the fact that targeting bare-metal was almost non-existent. It was more work than I would like to put into bootstrapping the dev environment.
160.
▲
by
khaledh
2y ago
Fair enough. Keep in mind also that Nim is not backed by big tech, which is both a blessing and a curse. The community hasn't reached a critical mass yet to take Nim into the mainstream. All I can say is ... "be the change you wan
161.
▲
by
khaledh
2y ago
To be honest, I haven't found the community size to be an issue. The Nim forum[0] has a vibrant community, and is the place I go to for help, and the response is usually quick and on point. The language is also evolving in a careful ma
162.
▲
by
khaledh
2y ago
To be honest, I haven't found this to be an issue (yet). I try to keep most of my types value types (cannot be null), which the compiler can pass by reference under the hood if it detects that it's too big, without compromising me
163.
▲
by
khaledh
2y ago
I haven't used nushell (although I'm aware of it). I'm aware that the idea of piping statically-typed objects between proceses is not new (PowerShell has had this since 2006). But the problem is that this is confined to the s
164.
▲
by
khaledh
2y ago
Batching syscalls is on my mind. The architecture of Fusion will revolve around channel-based ipc (both sync and async), including between user mode and kernel mode. The end state I'm aiming for is an async channel for syscalls, where
165.
▲
by
khaledh
2y ago
> What where the most troublesome parts of the project? Task switching. It's a very intricate process, you really have to understand how to structure everything (especially the task stack) so that you can switch everything from unde
166.
▲
by
khaledh
2y ago
I haven't faced such issue. I think the only issue I faced was when I upgraded to 2.0, they made `--threads:on` the default, so I had to turn it off, but that's about it.
167.
▲
by
khaledh
2y ago
A file is a manufactured concept that has served us well for a long while. But I'm not convinced that it's the right abstraction for everything. Files are just binary blobs (even if they're text), with no uniform interface to
168.
▲
by
khaledh
2y ago
I use VuePress[0]. You can find the source code for the site here[1]. [0] https://vuepress.vuejs.org [1] https://github.com/khaledh/khaledh.github.io
169.
▲
by
khaledh
2y ago
Thanks! Actually writing has helped me so many times in improving the design and implementation. It forces me to question my assumptions, and ask myself: would the reader be able to understand why I made such decision? I have to justify eve
170.
▲
by
khaledh
2y ago
As others mentioned, Nim is a statically typed programming language that compiles down to C, C++, and JavaScript. It has great C interop, which makes systems programming easy. As for why Nim, here's an excerpt from my accompanying site
171.
▲
by
khaledh
2y ago
That would be great! I'd love to follow along if you ever decide to build an RTOS.
172.
▲
by
khaledh
2y ago
I just added a few screenshots, including one from the graphics branch that is still a wip.
173.
▲
by
khaledh
2y ago
Thanks! As @Tiberium mentioned, Nim 2.0 defaults to using ARC (Automatic Reference Counting), so no runtime GC. The Nim compiler is quite smart about when to copy/move and when to destruct, with some hints like lent/sink for when
174.
▲
by
khaledh
2y ago
Author here. Thanks for posting this <3 Happy to answer questions.
175.
▲
by
khaledh
2y ago
No. UEFI firmware creates a completely different environment for a UEFI bootloader than the legacy BIOS environment (real-address mode). The UEFI firmware enters 64-bit long mode directly on modern systems, and sets up a flat memory model G
176.
▲
by
khaledh
2y ago
I'm creating a hobby operating system in Nim (early stages). After an initial attempt[0] I decided to start over[1] and document my journey in building it[2]. The focus for me is on learning low-level systems programming and enjoying t
177.
▲
by
khaledh
2y ago
For macOS (and Fish shell): caffeinate -d -i -t (math "((7*60)+30)*60") to prevent my laptop from sleeing for a specific period of time. I usually run it at the beginning of every day.
178.
▲
by
khaledh
2y ago
"Weeks of coding can save you hours of planning." - Unknown.
179.
▲
by
khaledh
2y ago
dupe: https://news.ycombinator.com/item?id=40092886
180.
▲
by
khaledh
2y ago
I recently developed an extension to "dim" HN stories based on keywords and/or domain names[0]. You can also dim/undim stories manually. The list of keywords/domains is currently hard-coded (based on my preferences)
More ›