• I really wanted to like Factor. But figuring out how to run code and package it and the paths and whatever was just too annoying.

    This stuff:

    Since the vocabulary was already loaded when you scaffolded it, we need a way to refresh it from disk

    “vocabulary”, “scaffold”, “refresh”?


    score 1 · canonical

    • The word “vocabulary” is as basic to Factor as “module” or “crate” is in Rust, but I don’t know about the rest.

      I generally feel negatively towards the mutable bags of state that are Smalltalk-inspired “images”, which might be rearing their heads here with the “refresh” verb.


      score 2 · canonical

      • Yeah, on top of the (now fixed?) longstanding issue of the interactive UI being objectively unusable on HiDPI displays; the main reason I never got into Factor despite being intrigued by it is because it exclusively expected you to write code vendored in the Factor source directory itself, and programs were impossible to distribute other than “extract this tarball into your Factor source folder”. Versus e.g. Common Lisp, while having the Lisp machine “bag of state” sorta thing going on, people still expect programs to be reproducible from a standalone set of source code rather than shipping a binary “image”.

        Although skimming the site it looks like they’ve added alternate “roots” and stuff now, where you can have more normal source trees? So maybe time for me to look into it again… https://docs.factorcode.org/content/article-add-vocab-roots.html


        score 2 · canonical

        • to write code vendored in the Factor source directory itself, and programs were impossible to distribute other than “extract this tarball into your Factor source folder”.

          I forgot about this. This too was wildly off-putting.


          score 1 · canonical

        • We’ve had vocabulary roots for 20 years. These are just module search paths.

          You can also ship binaries in a reproducible way using the deploy tool.

          And we ship with a “work” directory where you can conveniently add any of your own code without configuring additional locations. I appreciate the feedback, thank you.


          score 1 · canonical

            • lobsters__doublec@crustaceanson.theshelf.top
              link
              fedilink
              arrow-up
              1
              ·
              edit-2
              11 days ago

              There was never really an issue with distributing source code out-of-tree but for a long time it was just the idiomatic thing to do to add your code to Factor’s repository and let it be shipped/maintained with it. Libraries would change so fast in the early days that it made bitrot of third party code easier to manage.


              score 3 · canonical

      • “scaffold” refers to the “scaffold tool” which generates stub files for a vocabulary (module). Similar to how “cargo new” in Rust builds a stub project to work from. “refresh” refers to reloading code changed code on disk in source files into the running Factor system.


        score 1 · canonical

  • I played around with Factor a bit this year. It’s a very cool, ambitious, clickable language that’s a good workout for the mind if you’ve never tried concatenative programming (with more modern affordances like local variables instead of having to do everything on the Stack). Performance is great/competitive in the dynamically-typed, interpreted language space (like Chez Scheme). There’s been a lot of improvements recently too like GTK4 + hiDPI to deal with my initial first bad impressions starting up the listener. The biggest missing feature is aarch64 support (so you get limited on what you can actually release on), tho I hear the progress is happening.

    As an aside, if you have a functional interest, this talk, From Ivory to Metal, by Jon Purdy did a wonderful job connecting ideas from FP to concatenatitve programming while providing insight on how by almost accident, the concept of the stack can model affine, linear, ordered linear types too 🤯


    score 1 · canonical