News for hackers. Stuff that matters.

FrancisStokes

Re:I Don't Like Debuggers (2000) on Friday March 22, 2019 @04:17AM (#19460446)
Reading these old Linus exchanges always has me in two minds. On the one hand, it's great to peer into the mind of a genius and see the thought process, but on the other - and in light of his stepping back after recognising his own highly unprofessional behaviour over the years - I wonder if we should repost and idolise these emails.

Are people - especially young and impressionable developers - able to separate the two sides of the coin, or does it serve to plant a seed of normalisation for this kind of communication?

construct-js uses DataView under the hood. I wrote construct-js to ease working with binary data by allowing you to name and reference sections, and handle things like endianess easily in one place. With a DataView, I still need to calculate offsets into a structure manually, whereas construct-js has .getOffset(name) and .getDeepOffset(path). If performance is key however, use the lowest level of course.
Map wouldn't have really brought a lot of clarity or control. You'd have to specify an array of array-pairs, which is noisy IMO, and then you wouldn't have the benefit of being able to programatically/conditionally add fields.

I might consider a static `Struct.fromMap(name, mapObject)`, but as a complimentary API.

Really well put!
Thanks! When it comes to performance I can understand choosing a more low level approach. construct-js trades performance for declarativeness (though I suspsect that I can do a lot of optimising under the hood).

As for DEFLATE, I'm working on an automatic bit level structure at the moment which would allow for unaligned structures. Should be in the lib in a couple of days.

Thanks!
Thanks! I really appreciate you saying so, and I'm glad you enjoyed it

Older »