I happened to have 2h free, so I decided to write a text adventure game engine with #chickenscheme. Lisps still are really fun languages, and #paredit in #emacs is awesome!
#chickenscheme #paredit #emacs #scheme
I prototyped my heatmapper tool https://github.com/masukomi/heatmapper in #ruby, before writing the final thing in #ChickenScheme ... now I want it in ruby, but generating HTML color blocks instead of ANSI escape coded CLI stuff* So now I've got chicken scheme on the top of the window and ruby on the bottom and i'm live translating the improvements as i read and it's weird.
* yes, i could just shell out and use https://github.com/masukomi/oho but i've already got the ruby code. Yes, heatmapper works with oho ;)
Current code is reimplementation of some code i've written in #ChickenScheme, #Racket, & #Raku
This time it's in #Ruby & #Rails
I am getting so much done, so much faster, in so much less code simply because of the incredible ecosystem of tools. Having a good ORM means no piles-o-raw sql and different sql to create, update, delete etc. The Octokit github library means trivially sucking down the data I need.
Both happy and frustrated at how easy this is. Wishing #raku had more libraries.
#chickenscheme #racket #Raku #ruby #rails
@dekkzz76 There's some post about #Guile #scheme having acquired or started a backend to the compiler for that, which is nice.
Unfortunately something like #ECL would still make for pretty fat wasm bundles that'd run significantly worse than native.
I'm somewhat happy about #GuileWASM as a prospect because it's much lower friction than the hack of using #ChickenScheme or #Gambit with #Emscripten.
#guile #scheme #ecl #guilewasm #chickenscheme #Gambit #emscripten #commonlisp
There is a scheme called Chicken, it has a debugger, written in scheme you might wonder?
Nope its written in Tcl/Tk - quelle surprise
#ChickenScheme #Tcl $Tk
Turns out that error was because I didn't import `chicken.base'. I'm a bit surprised it didn't just tell me `case-lambda' was unknown. Oh well.
The next error was the same but for `foreign-lambda*':
Syntax error: illegal atomic form: ()
inside expression `(foreign-lambda* ...)'
Which is because I didn't import `chicken.foreign'.
Now I'm looking at a big list of unknown identifiers, but that should be easy to fix up.
trying to parse the output of `git show --word-diff=porcelain --format=raw` using #ChickenScheme `comparse` and feeling a bit stuck, can anybody point me at source code to read?
specifically, i've got a bunch of it parsed but now i want to say "discard everything until you see `+++` then let's parse the remainder as a diff hunk"
The `xinerama' egg was pretty easy to get ported and installed too. Now trying to compile `xlib-utils' I'm getting the error:
Syntax error: illegal atomic form: ()
inside expression `(case-lambda ...)'
I thought I ran in to this before, I don't remember what I did to fix it. I should have taken better notes.
Sometimes #RakuLang 's error messages are great.
Sometimes I have absolutely no clue what it's on about. Today's:
lang-call cannot invoke object of type 'VMNull' belonging to no language
I'll figure it out eventually but even Google is finding no results.
🤔 thinking of my #ChickenScheme comments. I have 100% confidence I'll fix this within 10 mins.
If it were chicken i'd expect at least an hour. Apparently Raku's devs have made it easy enough that I have confidence in my abilities here.
I've got a lot of code in #ChickenScheme that i _really_ don't want to rewrite in #RakuLang (or anything else) but I'm _so_ sick of spending hours banging my head against problems that should be trivial, but no-one bothers to provide usage examples. Just a method signature and a whole lot of nothing.
I KNOW the chicken scheme devs are good people, but the docs make me feel like they just absolutely don't give a fuck about anyone who dares to be new and ignorant.
example of why i generally avoid using #ChickenScheme these days.
I want to write to the standard in of a script, and read from its standard out.
(process "path/to/executable")
gives me the input and output ports
but figuring out how the eff to write multiple lines to the out or read everything the in has to give me?
Hah! Hah! I say. Fuck You and your desire for ANY kind of useful example of even the most common use case.
@seancorfield fundamentally yes.
Protocols aren't perfect though. For example there's no orphan rule like there is for traits in #Rust, which means you kind of have to enforce that on your own by convention.
Unfortunately though even if we could manage orphaned protocols at the module level, it doesn't look like there's a portable or fast way to unlock something like that in #Scheme. Most Schemes go the other direction (like Common Lisp) and try for a fully generic meta-object protocol (e.g. COOPS, GOOPS).
I suppose #CHICKENScheme does have fast-generic, but that isn't as expressive as protocols.
I guess Chicken changed the way they do compilations and packaging of projects. I'll need to figure out how to port it over. This would be a good place to start, I suppose: http://wiki.call-cc.org/porting-c4-to-c5
I guess I should also open an issue so it's known I'm looking at it. Or so someone more familiar with Chicken and / or mowedline can do it before I figure it out.
schemers, do any schemes or srfis implement the equivalent of clojure's update-in
for nested alists?
https://clojuredocs.org/clojure.core/update-in
(update-in alist keys function)
'Updates' a value in a nested alist, where ks is a sequence of keys and f is a function that will take the old value and return the new value, and returns a new nested structure.
(if not, how do schemers usually manipulate data deep within complex trees of data sexps?)
Not that anyone cares, and not that I think you should use it, but I've just pushed the updates to the original #ChickenScheme version of Hey that updates it to work in chicken v5 and has better build scripts.
https://github.com/masukomi/hey
Really there's no good reason to use this when the Raku version exists. This does less, and some of the graphing stuff requires a web component that will probably go away.
Added the "darkhub" theme to heatmapper
https://github.com/masukomi/heatmapper
I noticed what #DarkReader had done to the colors of the heatmap on GitHub, and thought it looked cool. So, I added in support for it because I want to use it.
Hey! ( https://interrupttracker.com/ ) was written a #ChickenScheme script that i just kept adding to organically. It was, understandably, a mess. I organized my thoughts, and rewrote it in #CrystalLang
I quit the job-of-constant-interruptions years ago. Now I have another use for its core functionality. Since then, Chicken has gone from v4 to v5 and Crystal has gone from v0.33.0 to v1.6.2
Crystal devs NEVER promised stability back at v0.33.0 and they shouldn't have. But...
🧵 1/?
Just went to compile my interruption tracker i ported to #CrystalLang in 2019.
My logical 🧠 knows that it's way better, and more maintainable than the #ChickenScheme version which started as a wee script and just grew out of control.
My ❤️ just doesn't want to fight with types. I also feel kinda betrayed by the language doing... 🤷♀️ whatever it did since 2019 that broke my code.
That's not fair to #Crystal since it's so young but... ❤️s aren't fair.
#crystallang #chickenscheme #crystal
Just went to compile my interruption tracker i ported to #CrystalLang in 2019.
My logical 🧠 knows that it's way better, and more maintainable than the #ChickenScheme version which started as a wee script and just grew out of control.
My ❤️ just doesn't want to fight with types. I also feel kinda betrayed by the language doing... 🤷♀️ whatever it did since 2019 that broke my code.
That's not fair to #Crystal since it's so young but... ❤️s aren't fair.
#crystallang #chickenscheme #crystal