hey, so gambit is really awesome; especially the debugger; however I'm running into some trivial practical issues -- and curious how others are solving it 1) sed/awk/grep/perl if possible, i'd like to use gambit for these type of apps instead (being slower is fine; i just want everything in scheme for now) -- is there a good way to do regex matching in gambit? 2) fprintf/format pp and display are cool -- but sometimes, I really really want control over my output; how is this generally done in gambit? things like "print this number with 8 chars width, 3 digits after the decimal point" seems kind of hard to phrase thanks! keep up the good work
Afficher les réponses par date
lowly coder <lowlycoder@huoyanjinjing.com> writes:
1) sed/awk/grep/perl if possible, i'd like to use gambit for these type of apps instead (being slower is fine; i just want everything in scheme for now) -- is there a good way to do regex matching in gambit?
http://synthcode.com/scheme/irregex/
2) fprintf/format pp and display are cool -- but sometimes, I really really want control over my output; how is this generally done in gambit? things like "print this number with 8 chars width, 3 digits after the decimal point" seems kind of hard to phrase
http://synthcode.com/scheme/fmt/ Both are fully portable R5RS Scheme and much more flexible than the standard alternatives. -- Alex
On Thu, Feb 5, 2009 at 1:55 AM, Alex Shinn <alexshinn@gmail.com> wrote:
lowly coder <lowlycoder@huoyanjinjing.com> writes:
1) sed/awk/grep/perl if possible, i'd like to use gambit for these type of apps instead (being slower is fine; i just want everything in scheme for now) -- is there a good way to do regex matching in gambit?
IrRegex is indeed a great regex implementation. Using JazzScheme you can access it with (import irregex) as it is standard module.
On 5-Feb-09, at 1:55 AM, Alex Shinn wrote:
lowly coder <lowlycoder@huoyanjinjing.com> writes:
1) sed/awk/grep/perl if possible, i'd like to use gambit for these type of apps instead (being slower is fine; i just want everything in scheme for now) -- is there a good way to do regex matching in gambit?
I concur. Irregex is my favourite portable regular expression library.
2) fprintf/format pp and display are cool -- but sometimes, I really really want control over my output; how is this generally done in gambit? things like "print this number with 8 chars width, 3 digits after the decimal point" seems kind of hard to phrase
Thanks for the suggestion. I did not know it existed and it looks really nice. Marc
2009/2/5 Marc Feeley <feeley@iro.umontreal.ca>:
I concur. Irregex is my favourite portable regular expression library.
I gave up portability a while ago. Could those libraries benefit from Gambit's extentions of Scheme? Trading portability for more efficiency shouldn't be that bad (considering that those libs are not to change a lot in the next few decades), and finding the Gambit-specific versions in the dumping ground would be nice too… P! -- Français, English, 日本語, 한국어
Adrien Piérard <pierarda@iro.umontreal.ca> writes:
2009/2/5 Marc Feeley <feeley@iro.umontreal.ca>:
I concur. Irregex is my favourite portable regular expression library.
I gave up portability a while ago.
Could those libraries benefit from Gambit's extentions of Scheme?
Trading portability for more efficiency shouldn't be that bad (considering that those libs are not to change a lot in the next few decades), and finding the Gambit-specific versions in the dumping ground would be nice too…
Actually, Irregex will likely change quite a lot in the short-term. It's algorithmically fast, but the code hasn't been bummed at all yet which will make a huge difference. So you could fine-tune some things for Gambit, but will have a lot of work to do keeping sync with the upstream changes (at least for now). Given time I also want to do a non-backtracking NFA matcher for when you want a lighter footprint, and a sublinear-time DFA just to show off on benchmarks :) -- Alex
participants (5)
-
Adrien Piérard -
Alex Shinn -
Guillaume Cartier -
lowly coder -
Marc Feeley