8 ms·
i like the author's writing style, and i think he's onto something. i've long hoped for a decent language for writing low-level stuff. so far, c++ is the worst,
by allenbrunson 17y ago
i like the author's writing style, and i think he's onto something. i've long hoped for a decent language for writing low-level stuff. so far, c++ is the worst, except for all the alternatives.
i think this is a grave 'leaky abstraction' waiting to happen, though. when his 'amplify' system screws up, it's going to do so in a way that nobody else can understand.
- csmeder 17y ago" i've long hoped for a decent language for writing low-level stuff." Have you tried Forth? It is great at low-level stuff.
- allenbrunson 17y agowell, how am i going to compile forth into my iphone app? it usually comes down to something like that.
- jrockway 17y agoProbably the same way you compile C into an iPhone app. But you said low-level. iPhone apps are high-level.
- eru 17y agoForth isn't compiled most of the time. So go and write yourself a Forth interpreter in C or Assembler for your iPhone. It's (relatively) easy.
- allenbrunson 17y agoso my options boil down to dealing with c++'s warts or writing my own forth interpreter? heh! i think i can see why the status quo has persisted for so long. (not trying to be snarky. if you have written your own forth interpreter, then you are a lot more hardcore than me.)
- eru 17y agoI have written my own Forth Interpreter in Scheme. But it was almost meta-circular.
- silentbicycle 17y agoSeriously, it's not that hard. A hell of a lot easier than "dealing with C++'s warts". (And unlike writing a Scheme, you don't have to figure out how to implement continuations.) Here's the source to one (http://www.annexia.org/forth http://www.annexia.org/forth), it's great reading. If you're looking for a practical "low level but high level" setup, I'd recommend Lua + C first. I haven't done iphone dev, but if you can work with C, you're golden. Forth is fun, though.
- akkartik 17y ago"i've long hoped for a decent language for writing low-level stuff." brace was on HN a few months ago: http://sam.nipl.net/brace http://sam.nipl.net/brace
- jedbrown 17y agoBrace isn't really anything more than stripping out braces and semicolons in favor of significant whitespace. This amplify thing offers a slightly higher level of abstraction by providing syntactic macros.
- eru 17y agoI agree that amplify seems to offer more abstraction. But the Brace homepage says its more than just using significant whitespace: "Brace has coroutines, hygenic macros, header generation, #! scripting and cached executables, libraries with graphics and sound, and many animated demos." (http://sam.nipl.net/brace/ http://sam.nipl.net/brace/)
- mst 17y agoI'm not really sure that's true; he seems to have gone to a fair amount of trouble to make sure that the expanded form is readable, at which point debugging it should be no trickier than debugging any other macro expansion - just keep expanding step by step until you find the thing that went wrong. If anything I'd expect this to be easier to deal with than multiple layers of plain C macros given it's going to be a lot easier to introspect - at least for the same level of complexity of expanded result. Of course, if you do substantially more complex things with it then, yes, it's going to be more complex to debug. But that's always the price paid for using complex abstractions - complexity can be corralled, compartmentalised and contained but rarely eliminated entirely.