HackerTrans
TopNewTrendsCommentsPastAskShowJobs

raible

no profile record

comments

raible
·2 anni fa·discuss
I'm working on a PEG-based Turing complete language. It is self-hosted, generates standalone/embedable C, is reasonably small, and comes with a fully-featured REPL. It has only a single keyword: "macro". Feel free to reach out if interested.
raible
·2 anni fa·discuss
Weed + tree = bong!
raible
·3 anni fa·discuss
Getting rear-ended is almost always the other driver's fault, but 7 years ago I was involved in a serious accident (minor injuries, both cars totaled) when the driver in the fast lane decided to pull over and pick up a hitchhiker. Crossed over two lanes, hard on the brakes, and I had no chance to even get off the gas.

The responsibility was 100% his because of "an unsafe lane change".
raible
·3 anni fa·discuss
Well, maybe. I for one _absolutely_ didn't participate b.c. I didn't want my DNA and personally identifying information owned by any company. I can't imagine that there aren't many others like me.

I would, however, love to send my DNA to a company if they could provide the results without knowing any information about me whatsoever. For instance: I would be more than willing to buy the kit with cash and send it back with a burner email. Has anyone heard of such a service?
raible
·3 anni fa·discuss
It's hard to imagine either Linux or Git if Ken Thompson and Dennis Ritchie hadn't laid the foundation.
raible
·3 anni fa·discuss
I can highly recommend libtcc (https://github.com/TinyCC/tinycc.git) for this kind of thing. I recently ported the code developed in linux on an ARM chromebook to a generic windows box in 20 minutes.
raible
·3 anni fa·discuss
Perhaps https://github.com/TinyCC/tinycc would be useful? I've had success using it to implement a repl for my language.
raible
·4 anni fa·discuss
Not exactly a diet tip, but first thing every day (after stretching) I drink a large glass of water (16oz), drink another large glass with a tablespoon or so of psyllium husk, then another large glass of water. Then whatever breakfast I feel like. Psyllium is cheap, safe, and readily available (and most of us should be eating more fiber, right?).
raible
·4 anni fa·discuss
I've had great success with a fourth way: my project language compiles to C, which is loaded at runtime with libtcc (specifically: git://repo.or.cz/tinycc). I've gone down the .so/.dll route a few times in the past, but I can safely say: never again. libtcc has the advantages of a jit (native C speed), but with an elegant API and laudable portability.
raible
·4 anni fa·discuss
This is an awesome project. In the video you mention that you might drop it... please don't!
raible
·4 anni fa·discuss
Thanks for that, it's what I had hoped for (but again, have not yet measured).

It seems to me it's a super-handy way of "modifying" a compiler-allocated array of structs. I'm sticking with it!
raible
·4 anni fa·discuss
FWIW I usefully use a "fake" linked list by adding a .next field to the struct in a compiler-allocated array of structs. On initialization I set the list head to &item[0], and in a trivial loop set the .next field of each entry (except the last) to entry+1.

Why bother? Because I can then easily add a few extra structs to the beginning of the (contiguously-allocated) linked-list without having to reallocate the whole thing.

Sure, pointer chasing with separately allocated structs is "slow", but I haven't yet measured to see if it's any different when (almost all) items are contiguous.

If you would... - what sort of cache behavior should one expect of this on a modern laptop CPU? - I haven't seen this approach before, have you?
raible
·4 anni fa·discuss
I have found the libtcc from https://github.com/TinyCC/tinycc to be absolutely fantastic. I'm using it to instantaneously compile the C output from my hobby language to create a repl. Once I had the compiler in good shape it allowed me to create a 100% compatible interpreter for (basically) free.

The libtcc API is minimal. For my needs that has been 100% sufficient and a pleasure to work with.
raible
·4 anni fa·discuss
Thanks for asking!

I've been working on a PEG-based Turing-complete language which creates completely standalone and trivially-embedded C. The "selling point" would be "A DSL for creating DSLs".

In the last few weeks I've been working on a libtcc-based add-on in order to build a REPL to help create/explore a desired grammar interactively.