GNU Artanis – A fast web application framework for Scheme

(artanis.dev)

206 points | by smartmic 12 hours ago ago

29 comments

  • rcarmo 15 minutes ago ago

    I have to wonder why Guile hasn’t become more popular over the years, frameworks or not. It ships with so many distributions that the ease of access is there, but I’ve yet to come across any significant code base using it for web apps.

  • neilv 10 hours ago ago

    Just a comment on APIs in Scheme...

    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.)
    • shakna 3 hours ago ago

      Guile's builtin server is similar:

          (define (hello-world-handler request request-body)
            (values '((content-type . (text/plain)))
                "Hello World!"))
  • shakna 10 hours ago ago

    I've used this in production once.

    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.

    • whizzter 3 hours ago ago

      Maybe you can answer one thing that pickled my mind, no mention of CSRF protections,etc in the documentation that seems to cover quite a few bases. (apart from one xss symbol application that I couldn't fully decipher).

  • iameli 11 hours ago ago

    Is this named after the Protoss Executor Artanis?

    • shakna 10 hours ago ago

      > Has a Sinatra-like style route, hence the name "Artanis" ;-)

    • maz1b 3 hours ago ago

      My first thought as well. State your will!

    • stackghost 10 hours ago ago

      "Artanis" backwards is "Sinatra" which happens to be the name of a popular Ruby gem for web dev.

      • vincent-manis 9 hours ago ago

        And was a gag in the ancient Dick van Dyke show, where Dick's character gets a painting signed by `Artanis', and thinks it worthless, until someone spells it backward.

  • rolandog 10 hours ago ago

    Beautiful and clean website (loads well without JS and fonts); not sure why some people are reacting negatively to some poetry... I swear, HN crowd can be often worse than Mean Girls.

    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.

    • neilv 10 hours ago ago

      > Scheme is such a nice language to code and hack with; but, how safe would it be to expose it directly?

      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.)

      • zeroq 8 hours ago ago

        In my experience this sentiment could be applied to anything. It's more about getting paid for "getting thing done" versus "working on thing".

        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.

        • nine_k an hour ago ago

          I can't fail to remember a joke about a law firm where the son of the most senior partner graduates from an ivy league university, joins the firm, and on the first day says he single-handedly sorted out one long-standing case. His father is angry: "You have just put an end to the case which was feeding us for last three years!"

      • evertedsphere 9 hours ago ago

        > A system in Scheme was the first to get a particular certification for sensitive data hosting on cloud servers.

        What system was this?

    • Tadpole9181 8 hours ago ago

      > not sure why some people are reacting negatively to some poetry...

      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.

      • nine_k an hour ago ago

        Facing an avalanche of troubling, attention-grabbing, manipulative, and often misleading information, people protect their sanity by irony and nonchalance. A genuine expression, which does not employ irony and invites the reader to also cast away the shield of cynicism, feels both like an attack and the pull of something desirable but unattainable. The resulting pain, modulated by the protective irony, is expressed as cringe.

    • 29athrowaway 9 hours ago ago

      - The text is unusually large.

      - 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.

      • akho 19 minutes ago ago

        - The text is of adequate size

        - 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

      • fiddlerwoaroof 9 hours ago ago

        The very first text on the page tells you what it is: “ GNU Artanis - A fast web application framework for Scheme”

      • plumbees 9 hours ago ago

        I can finally read a website without squinting despite having glasses on already. Yay!

        • busterarm 8 hours ago ago

          As a newly old, I really appreciate websites with large text.

      • bigstrat2003 6 hours ago ago

        > 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!

  • aorlov_a 10 hours ago ago

    I so appreciate the website. So easy to read makes it appealing to try the framework, especially taking into account the most recent experience writing on Scheme was back in college 15 years ago.

  • aaron_m04 11 hours ago ago

    Projects using it is 404.

  • mmargerum an hour ago ago

    Disappointed they didn’t use hiccup to generate html. Format?