4 ms·
Previously, previously, previously, previously, previously, ... https://news.ycombinator.com/item?id=6047576 https://news.ycombinator.com/item?id=6047576 http
by loeg 5y ago
Previously, previously, previously, previously, previously, ...
https://news.ycombinator.com/item?id=6047576 https://news.ycombinator.com/item?id=6047576
https://news.ycombinator.com/item?id=14091630 https://news.ycombinator.com/item?id=14091630
https://news.ycombinator.com/item?id=8799070 https://news.ycombinator.com/item?id=8799070
https://news.ycombinator.com/item?id=22102533 https://news.ycombinator.com/item?id=22102533
https://news.ycombinator.com/item?id=10526159 https://news.ycombinator.com/item?id=10526159
https://news.ycombinator.com/item?id=19665596 https://news.ycombinator.com/item?id=19665596
https://news.ycombinator.com/item?id=11912427 https://news.ycombinator.com/item?id=11912427
This shows up periodically and it looks pretty nightmarish (~15 years reading and writing C). If you want this kind of abstraction, I think you're better served by any of the dynamically-typed scripting languages.
- kimixa 5y agoOne of the advantages of a language is that you can get someone with experience in that language and they'll be able to understand it (with some work for code style and libraries used etc). This seems to be different enough you may as well just use another language.
- girvo 5y agoIf you want this kind of abstraction while retaining some of the upsides of C, you’re better served with Nim or similar in my opinion
- fps-hero 5y agoIt is definitely worth pointing out that this isn’t new, the idea itself is truely fascinating and the author clearly articulates this is code as art. It is definitely eye opening once you read into the details. I stumbled across this when a new chapter of crafting interpreters came out, and I ended up doing a deep dive into how to speed up CPython. My conclusion was that it wouldn’t be possible without rearchitecture of the fundamental types, and hence unpalatable, but a fun exercise none the lesser If you’d be wrong to so quick to dismiss Cello. Cello is an order of magnitude quicker than python, even cython can only achieve 3x on CPython without annotation. The ideas behind Cello put it somewhere around JavaScript speed, but far more extendable, and definitely worthy of further investigation. To expand further, fat pointers (void type, void data) could be superior to NaN boxing, and I’m not aware of any interpreted languages that have seriously implemented fat pointers, but it seems to be going well for Rust.
- freemint 5y ago> any interpreted languages that have seriously implemented fat pointers Have a look at PicoLisp. It has less than a handful of data types but i uses "Tag Bits". Julia is not really interpreted but it uses pointer tags for union types to save on boxing?