Closed phantomcraft closed 1 year ago
Chicken has the following hooks for macro readers:
set-read-syntax!
set-sharp-read-syntax!
set-parameterized-read-syntax!
copy-read-table
In case Gerbil doesn't have implemented such hooks, is it possible to implement them?
The implementation of this features are here.
This is slightly more complicated, but we do have full per module custom reader and expansion support -- see "Custom Languages" in the tutorial.
So it is possible to complrtely change the surface syntax on per module basis.
@vyzo
we do have full per module custom reader and expansion support
Awesome, looking at Wikipedia article about metaprogramming, Gerbil has a macro system, metaclasses and template metaprogramming.
I was thinking before in choosing Gerbil as my scripting/toy language, but looking all these features now I'm thinking on putting it on a higher level.
Just another question, is it possible to disable the garbage collector and manage the memory manually? If it's possible, should I use FFI and use malloc() function from C's libc. I'm asking this because I want to code for maximum performance.
It is not possible to disable the gc, but in general it is quite efficient and it is possible to allicate objects as still or immovable or even do full manual alloc with the ffi. It is not simple however.
Thanks.
Chicken has some facilities for managing the memory manually.
It would be interesting to have something like this in Gerbil, dealing with low-level stuff would be easier.
yes, indeed.
Could you please implement one day?
Yes, I'd like to have them too, but I can't commit to a specific date :)
(busy with work an all that)
I came across Gerbil by this article: https://news.ycombinator.com/item?id=15394603
Chicken and Racket sucks because they are slow despite their great standard library and extensions, seeing Gambit/Gerbil benchmarks against Chicken made me give it up completely, and for Racket, it can't produce binaries for all the platforms. With Gerbil I can emit an universal C code and compile to run anywhere.
Gerbil is really the best Scheme implementation.
@vyzo
Yes, I'd like to have them too, but I can't commit to a specific date :)
(busy with work an all that)
Managing memory at a low-level would be very welcome, good luck in implementing it.
I'm looking forward for that.
@vyzo
I don't want to pressure you, but I would appreciate if you could keep us informed of your progress.
I really don't want to go Chicken Scheme because it's too slow compared to GambitC/Gerbil.
Hey,
I cant make guarantees about when i will have time to work on such things, i am really busy with work.
I will review any incoming pr implementing such things promptly however, and tend to it with high priority.
Ok, I understand, good luck with your work.
@phantomcraft What exactly are you trying to do?
===> http://wiki.call-cc.org/man/4/Unit%20library#reader-extensions