[HN Gopher] Owl Lisp - A functional Scheme for world domination
       ___________________________________________________________________
        
       Owl Lisp - A functional Scheme for world domination
        
       Author : Lyngbakr
       Score  : 90 points
       Date   : 2024-11-24 20:37 UTC (1 days ago)
        
 (HTM) web link (gitlab.com)
 (TXT) w3m dump (gitlab.com)
        
       | ianbicking wrote:
       | The repo doesn't say much... I thought maybe the docs would
       | justify "world domination" in some fashion, but they are rather
       | dry: https://haltp.org/posts/owl.html
       | 
       | Is there something that describes what is notable about this Lisp
       | dialect?
        
         | vincent-manis wrote:
         | I haven't looked at it, but it's purely functional (so no
         | destructive operations such as set!). It can't be called
         | Scheme, because it's a subset of RnRS Scheme; that's why Racket
         | isn't called PLT-Scheme any more. I can imagine this as a
         | teaching tool (though the FAQ says the error messages aren't
         | good), or perhaps usable as an extension language.
         | 
         | I'm going to look at it as a scripting tool that compiles to C.
         | 
         | I used to work for a company whose internal communication often
         | claimed "world domination" as its ultimate goal. I just looked
         | at revenue estimates for its market sector, this company isn't
         | in the top 5, and is far behind the leader. Let's just leave
         | Owl's world domination goal as aspirational.
        
           | tonyg wrote:
           | It's the other way around for Racket, where R5RS and R6RS are
           | subsets :-)
           | 
           | IIUC Racket's new name came about from, basically, brand
           | confusion: to avoid being (mis)understood as "yet another
           | implementation of Scheme" rather than as the thing-in-itself
           | it had become.
        
       | foundry27 wrote:
       | The big-picture view is here: https://gitlab.com/owl-
       | lisp/owl/-/blob/master/doc/manual.md
       | 
       | Key points include:
       | 
       | - 100% immutable datastructures
       | 
       | - Immutability is leveraged to make a lot of core operations
       | concurrent
       | 
       | - Continuation-based threading model and Actor-based concurrency
       | 
       | - Fun little VM implemented behind the scenes
       | 
       | That being said, the documentation strongly contradicts the
       | title!
       | 
       | > The goal has not at any point been to become an ultimate Lisp
       | and take over the world
        
         | ValentinA23 wrote:
         | I'm wondering if a language could optimize immutable data
         | structures to use mutable, in place semantics instead of
         | duplication or structural sharing when it is possible. When an
         | immutable data structure only has one consumer (only has one
         | descendant in the flow graph), then it can easily be turned
         | into a mutable version. Generalizing, any linear subgraph in
         | the program's flow graph could be made to use in place
         | semantics on the same mutable variable.
         | 
         | The challenge I guess is figuring out how variables captures by
         | lambdas should be dealt with.
        
           | zvrba wrote:
           | I implemented an academic paper (join tree) in C# here
           | https://github.com/zvrba/Pfm
           | 
           | It provides the opposite: a mutable CoW data structure that
           | is extremely cheap to "fork" so that all subsequent updates
           | occur only on the new "fork" and are invisible to the old
           | "fork".
        
             | zelphirkalt wrote:
             | Isn't that the point of well designed persistent data
             | structures?
        
           | masijo wrote:
           | This is how Clojure does it, take a look at this:
           | https://clojure.org/reference/transients
           | 
           | It's great, one of the many awesome features Clojure has.
        
           | zellyn wrote:
           | This is the bet Roc is taking. They call it "Opportunistic
           | Mutation" and you can read about it at https://www.roc-
           | lang.org/functional
           | 
           | I didn't see links on that page, but IIRC, there's a
           | particular paper they reference as the main idea.
        
             | ketralnis wrote:
             | Python also detects this situation (at runtime using
             | refcounts) and does in-place mutations where possible https
             | ://github.com/python/cpython/blob/a2ee89968299fc4f0da4b...
        
           | coldtea wrote:
           | > _I 'm wondering if a language could optimize immutable data
           | structures to use mutable, in place semantics instead of
           | duplication or structural sharing when it is possible._
           | 
           | Yes, many languages (and libs, e.g. for JS) do that.
        
         | zelphirkalt wrote:
         | Does it feature implementations of lots of purely functional
         | data structures then? Or does it only apply to a few builtins?
         | 
         | And would other Schemes be free to copy those?
        
         | dleink wrote:
         | > The goal has not at any point been to become an ultimate Lisp
         | and take over the world
         | 
         | obviously something a lisp that had designated itself ultimate
         | and was keen to take over the world would say.
        
       | tmtvl wrote:
       | I wonder why it's called 'Owl Lisp' instead of 'Owl Scheme'.
       | Could make a funny parallel to Chicken Scheme.
        
         | binary132 wrote:
         | I suppose because it is not a Scheme and is a Lisp. :)
        
           | Pet_Ant wrote:
           | It is a Scheme:
           | 
           | > Owl Lisp is a functional dialect of the Scheme programming
           | language. It is mainly based on the applicative subset of the
           | R7RS standard.
        
             | binary132 wrote:
             | If it implements a subset of a scheme standard then it is
             | not an implementation of a scheme standard. Is that not
             | obvious?
        
               | Pet_Ant wrote:
               | I can't tell if you are joking or not.
               | 
               | If a platypus lays eggs, but it meets other criteria of
               | being a mammal, it's still called a mammal. Owl may not
               | be a full conforming Scheme implementation, but it seems
               | to be member of the Scheme sub-family.
               | 
               | I'd say if you are a Lisp-1 (ie one namespace for
               | variables and functions) and generally use the function
               | names used by the Scheme standard then you are a Scheme
               | (or Scheme-like-Lisp if you are very taxonomically
               | retentive). However, if you are a Lisp-2 and use the
               | function names of Common Lisp you're a Lisp.
               | 
               | Maybe if one were doing a deep dive on the history of
               | Lisp and are into S-expressions vs M-expressions then it
               | might be too loose, but I believe what is above is what
               | most people would agree with in this context.
        
           | xdavidliu wrote:
           | it's right in the title of this thread, which comes from the
           | project information of the repo
        
         | KineticLensman wrote:
         | Perhaps it's some sort of Web Ontology Language (OWL) [0]. Or a
         | reference to Winnie the Pooh, as in "Owl took Christopher
         | Robin's notice from Rabbit and looked at it nervously. He could
         | spell his own name WOL, and he could spell Tuesday so that you
         | knew it wasn't Wednesday" [1]
         | 
         | [0] https://en.wikipedia.org/wiki/Web_Ontology_Language#Acronym
         | 
         | [1] https://en.wikiquote.org/wiki/A._A._Milne
        
       | rurban wrote:
       | tests/theorem-rand.scm is beautiful!
       | 
       | e.g.                     theorem vec-zip              [?] v [?]
       | (Vector-of Short)                 (vector-zip + v v) = (vector-
       | map (l (x) (* x 2)) v)
        
       | dark-star wrote:
       | "Scheme for world domination", yet it has no Windows builds ;-)
       | 
       | Also, from the examples it looks like it requires (or at least
       | recommends) an APL keyboard, or around a dozen macros for
       | characters like l, [?], [?], etc.
       | 
       | Still, this has to be one of the most practically useful Scheme
       | (or Lisp) implementations that I've seen in a while.... Although
       | it probably needs some getting used to for a Schemer who is used
       | to having set! and friends....
        
       | agambrahma wrote:
       | Or, consider Yuriy's fork, *Otus* Lisp
       | 
       | https://github.com/yuriy-chumak/ol
       | 
       | [more features, works in browsers vis webassembly too]
        
       | psiconaut wrote:
       | I _knew_ that name (author, and lisp) was familiar:
       | https://issues.chromium.org/issues/40054453
        
         | psiconaut wrote:
         | For additional context (I think some was lost on a bug tracker
         | migration), he's the author of
         | https://gitlab.com/akihe/radamsa, a fuzzer implemented in owl,
         | that was quite popular finding vulns in the chrome codebase
         | some time ago...
         | 
         | I just found out there's a rust port:
         | https://github.com/microsoft/rusty-radamsa
        
       | medo-bear wrote:
       | Im curious, how many people comenting here program in
       | lisp/scheme?
        
       | djaouen wrote:
       | > $ echo '(l (args) (print "Hello, world!"))' | ol -x c | gcc -x
       | c -o hello - && ./hello
       | 
       | This is frightening, yet awesome.
        
       ___________________________________________________________________
       (page generated 2024-11-25 23:01 UTC)