Mostly able to because Guile's web server is standard, and if you need to bypass the framework, you can rather easily.
It's more than fast enough for most people's needs. Flexible, because Scheme, and Artanis' design will be familiar to all the Flask/etc devs.
I do not know, whether GNU Artanis makes use of SXML all the way, but I think it is very likely, since SXML is in GNU Guile's standard library.
But, specifying your own headers is easy, and we had it in a macro we used for our routes.
So instead, to rip from the manual:
(response-emit
body
#:status 200
#:headers '(
(Content-Type . application/json)
(X-Frame-Options . DENY)
)
#:mtime (current-time))
About Artanis itself... It looks really cool! Scheme is such a nice language to code and hack with; but, how safe would it be to expose it directly?
I see they are dogfooding on the Guix packages website, so... I'm guessing it's pretty well tested.
If you have really good Scheme programmers, who know their system, and built it competently, it's probably safer to expose that than your average conventional system.
(Example: A system in Scheme was the first to get a particular certification for sensitive data hosting on cloud servers. Partly because the very small team that developed it knew the stack inside and out, and could do whatever needed to be done, in a smart way.)
(Meanwhile, say, a consulting firm-led team who got a contract for a comparably complex system, and billed for 10 or 100 times the seat-warmers, with huge and ridiculously complex stacks they didn't understand... would just flounder, focus on appearances in sprint tasks, and churn out things implemented in poor ways, and with a large number of vulnerabilities, and probably take a lot longer before they could deliver a system that would survive the first day of use.)
What system was this?
I have particular personal experience with an app that could be done within several months with handful of people but was developed over several years by team of 50. I was flabbergasted at first but you need to understand politics first.
- Irrelevant noise at the beginning of the landing page.
- "What is it" is under the FAQ section, which has a heading that is the same size as the parent heading.
- It consumes all horizontal space.
That's a great thing. Sites which restrict text to a narrow column are a horrible reading experience. I have a large monitor and I wish to use a large monitor!
- At least there are no images of fake people
- It's in an <h1> on top of the page
- `max-width: 60em` is absolutely reasonable
It's a weird time for art. A lot of people's immediate reaction to genuine expression these days is "cringe".
I suppose that's always been the case to some degree, but it feels more prevalent now with internet-level attention span and broadcasting breadth.
That is no country for old men. The young
In one another's arms, birds in the trees,
—Those dying generations—at their song
If you're defining a Web server route handler, it's reasonable to do it as you would in most languages, like this package's example:
(get "/hello/:who"
(lambda (rc)
(format #f "<p>hello ~a</p> " (params rc "who"))))
But the following might be easier syntax extension in Scheme, in which each variable URL path element can be mapped for the programmer directly to a Scheme variable binding in the closure: (define-http-get-route ("/hello/" who)
(format #f "<p>hello ~a</p> " who))
(Of course, you'd also have a function to sanitize/escape `who` before injecting it into the HTML.) (define (hello-world-handler request request-body)
(values '((content-type . (text/plain)))
"Hello World!"))
Very little visibility as well, Scheme is already a niche. By catering to only the most FOSS oriented/adamant part of the public, your pool of devs is very tiny.
Most guile libs can also only be installed through Guix or failing that, tar files.
The ergonomics of the language are bad and there no concerted community story and publicity around it either imo.
It's sad because it's a cool language and the efforts Wingo and people like the Spritely institute have put into it, are amazing.
Compared to some other languages, the ecosystem is small though. While in Python often you have 3 or 4 libraries solving the same or similar problem, in GNU Guile you often only have 1 or need to write your own. Knowledgeable people are able to quickly throw something together, or call out to C libraries using FFI, but I have not done FFI yet. Some day I really should look into that ... And into Hoot by Spritely Institute [1]
If one wants to check out more algorithmic stuff, I also have some stuff on that: AoC 2024[2] (and previous years too), and guile-algorithms[3] (not that much yet, but useful things, and trying to keep it fully functional). Some time ago I also wrote a toy implementation of a decision tree in Guile[4]. It is even parallelized and achieves linear speedup in my tests. I call it a toy, because you will have to do all the data preparation yourself, because it only deals with numbers, and there are probably smarter ways of storing the data for each node, maybe even avoiding duplication. There is also no library like numpy or dataframes like in Python, so I am using possibly not so optimal data structures. But it is probably worth checking out and adapting, if anyone wants to make a proper decision tree library. It is a start.
[1]: https://spritely.institute/ [2]: https://codeberg.org/ZelphirKaltstahl/advent-of-code-2024 [3]: https://codeberg.org/ZelphirKaltstahl/guile-algorithms [4]: https://codeberg.org/ZelphirKaltstahl/guile-ml
aaron_m04•14h ago
em-bee•14h ago
eisvogel•59m ago