Readit News logoReadit News
Fraterkes commented on Lisp from Nothing, Second Edition   t3x.org/lfn/index.html... · Posted by u/nils-m-holm
nils-m-holm · 2 days ago
There are always the sample chapters, and the code from the book is in the public domain. :)

The book is basically a modern and more complete version of the "Small C Handbook" of the 1980's. I goes through all the stages of compilation, including simple optimizations, but keeps complexity to a minimum. So if you just want to learn about compiler writing and see what a complete C compiler look like under the hood, without investing too much into theory, then this is probably one of very few books that will deliver.

Edit: and then Warren Toomey has written "A Compiler Writing Journey" based on PCC, which may shed a bit more light on the book: https://github.com/DoctorWkt/acwj

Fraterkes · 2 days ago
Thx, I’m going to buy it I think!
Fraterkes commented on Lisp from Nothing, Second Edition   t3x.org/lfn/index.html... · Posted by u/nils-m-holm
Fraterkes · 2 days ago
Has anyone here read his “Practical Compiler Construction”? It’s on of the shorter compiler books Ive seen, seems like it might be a good way to learn a bit more about assembly
Fraterkes commented on That boolean should probably be something else   ntietz.com/blog/that-bool... · Posted by u/vidyesh
Fraterkes · 3 days ago
I’m not a very experienced programmer, but the first example immediately strikes me as weird. The consideration for choosing types is often to communicate intend to others (and your future self). I think that’s also why code is often broken up into functions, even if the logic does not need to be modular / repeatable: the function signature kind of “summarizes” that bit of code.

Making a boolean a datetime, just in case you ever want to use the data, is not the kind of pattern that makes your code clearer in my opinion. The fact that you only save a binary true/false value tells the person looking at the code a ton about what the program currently is meant to do.

Fraterkes commented on Scientist exposes anti-wind groups as oil-funded, now they want to silence him   electrek.co/2025/08/25/sc... · Posted by u/xbmcuser
narrator · 5 days ago
Yup, and George Soros does actually funds pro-wind groups. Open Society Foundation gives $400 million over 8 years to green economic development. That said, I think that's a bullshit argument for not supporting wind, and I'd much rather have an argument with data about the long-term economics.
Fraterkes · 5 days ago
You’ll notice these are not at all comparable because Soros does not have an obvious financial interest in wind supplanting oil

Deleted Comment

Fraterkes commented on Shader Academy: Learn computer graphics by solving challenges   shaderacademy.com/... · Posted by u/pykello
Fraterkes · 8 days ago
@dang I think something might be going wrong with the automatic flagging in this thread. I’m seeing a few pretty normal comments that are all dead.
Fraterkes commented on California teens are ditching office jobs – and making $100K before they turn 21   sfgate.com/bayarea/articl... · Posted by u/dragonbonheur
Fraterkes · 9 days ago
I’m not from California, and I’m not a teen, but this hasn’t been my experience
Fraterkes commented on We rewrote the Ghostty GTK application   mitchellh.com/writing/gho... · Posted by u/tosh
rvrb · 17 days ago
I haven't worked with GTK, but what you are describing here sounds reminiscent of what we have been dealing with trying to build Godot bindings in Zig with a nice API. the project is in mid-flight, but Godot:

  - has tons of OOP concepts: classes, virtual methods, properties, signals, etc
  - a C API to work with all of those concepts, define your own objects, properties, and so on
  - manages the lifetimes of any engine objects (you can attach userdata to any of them)
  - a whole tree of reference counted objects
it's a huge headache trying to figure out how to tie it into Zig idioms in a way that is an optimal API (specifically, dealing with lifetimes). we've come pretty far, but I am wondering if you have any additional insights or code snippets I should look at.

working on this problem produced this library, which I am not proud of: https://github.com/gdzig/oopz

here's a snippet that kind of demonstrates the state of the API at the moment: https://github.com/gdzig/gdzig/blob/master/example/src/Signa...

also.. now I want to attempt to write a Ghostty frontend as a Godot extension

Fraterkes · 17 days ago
Thx for the work you're doing! Just out of curiosity, I sometimes struggle to write performant C# Godot code because it's hard to interface with the engine without doing a lot of back and forth conversions to engine types. You end up doing a lot of allocations. Did you run into that kind of stuff while creating your bindings?
Fraterkes commented on Bezier-rs – algorithms for Bézier segments and shapes   graphite.rs/libraries/bez... · Posted by u/jarek-foksa
tonyedgecombe · 19 days ago
Interesting, I’m writing some code to find the interception of two clipping paths at the moment. I can’t use this because I have a no dependency rule but will take a look.
Fraterkes · 18 days ago
In case you end up coming up with your own solution: this is one of the best collections of info for what is currently out there Ive seen: https://github.com/linebender/kurbo/issues/277
Fraterkes commented on Bezier-rs – algorithms for Bézier segments and shapes   graphite.rs/libraries/bez... · Posted by u/jarek-foksa
Fraterkes · 19 days ago
Almost even more interesting is the Bezier Boolean-Operations lib they use (it’s a rewrite of Pathbool.js (https://github.com/r-flash/PathBool.js) in Rust)

https://github.com/GraphiteEditor/Graphite/tree/master/libra...

There’s not a ton of robust curve boolean libs out there that aren’t just part of some huge package of tools. This is the only one I know of that isn’t Js.

(Edit: added a link)

u/Fraterkes

KarmaCake day1714July 20, 2016View Original