- 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 223 days ago [-]
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.
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 223 days ago [-]
Isn't that the point of well designed persistent data structures?
zvrba 219 days ago [-]
Depends on how you define "persistent data structure". In most definitions that I've encountered, a new version is made after each update. This code makes a new version only when you explicitly request it with Fork(). This allows you to
- Use the data structure as a "standard" tree, sharing one instance across threads and use locking for thread-safety
- Use it as a fully-persistent structure by calling "Fork" before every modification
- Or anything in between
I needed the 3rd case: a cache manager gives out a forked view of the actual cache contents to its clients. Thus the cache is always in control of the "master" copy, and if a client modifies its own fork, the cache and other clients are not affected.
coldtea 223 days ago [-]
>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.
dleink 223 days ago [-]
> 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.
zelphirkalt 223 days ago [-]
Does it feature implementations of lots of purely functional data structures then? Or does it only apply to a few builtins?
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...
[more features, works in browsers vis webassembly too]
rurban 223 days ago [-]
tests/theorem-rand.scm is beautiful!
e.g.
theorem vec-zip
∀ v ∊ (Vector-of Short)
(vector-zip + v v) = (vector-map (λ (x) (* x 2)) v)
tmtvl 223 days ago [-]
I wonder why it's called 'Owl Lisp' instead of 'Owl Scheme'. Could make a funny parallel to Chicken Scheme.
KineticLensman 223 days ago [-]
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]
I suppose because it is not a Scheme and is a Lisp. :)
Pet_Ant 223 days ago [-]
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 223 days ago [-]
If it implements a subset of a scheme standard then it is not an implementation of a scheme standard. Is that not obvious?
kazinator 222 days ago [-]
Something that implements a subset of Scheme is not a complete implementation of the Scheme specification, but to the extent that it is complete, mit is a Scheme dialect.
There are Scheme programs which the implementation handles, and programs developed with that incomplete implementation can be run by more complete implementations.
A Scheme programmer informed on the limits of the subset (what is not in it) implementation can jump in and start programming using what is in the subset.
A subset language can be useful to practitioners of the full language.
ThinLisp is an incomplete implementation of Common Lisp, but one which compiles to C that doesn't need garbage collection. You can develop ThinLisp programs as Common Lisp programs (with certain care). Then ThinLisp translates them to C. I think that (by default?) these translated programs don't need garbage collection.
Pet_Ant 223 days ago [-]
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.
binary132 222 days ago [-]
Lisp is a very general category (I would consider Clojure a Lisp, with some extras) while Scheme is not, it is defined by a specification. If some implementation does not implement the entire specification of a given protocol, it doesn't implement that protocol, right? Would a C++ compiler that doesn't accept "new" and "delete" be C++? No, it's some subset of C++, not C++. And some implementation of HTTP that doesn't have any verbs wouldn't be HTTP. An implementation of a Scheme specification that doesn't implement the full specification is not a Scheme. No?
A mammal is a creature that has X, Y, and Z characteristics. A creature having only X and Y characteristics is therefore not a mammal.
lispm 222 days ago [-]
Scheme is a general category of probably 100+ implementations of various versions of the language based on various specs and standards. Small educational languages based on R4RS, R5RS. Then there is the more controversial R6RS and later a R7RS small and attempts to define a R7RS large. Then there are 100+ of language extensions in various states described in SRFIs. The there is an official language standard IEEE Scheme, which is not widely used (AFAIK). Then there are various subsets of the language Scheme used in education. For example in SICP there is a minimal Scheme subset used in the book. Scheme also spawned its own dialects (or maybe derived language), like Racket, which then has a new dialect Rhombus...
Lisp is either a family of language families (Lisps, Scheme, Logo, ML, MDL, JavaScript, Dylan, Racket, R, ...)
or
a more narrowly defined family of languages (often recognizable because they identify as Lisp in their name) and based on the core from Lisp 1: Lisp 1, Lisp 1.5, BBN Lisp, Interlisp, Maclisp, Franz Lisp, ZetaLisp, Le_Lisp, EuLisp, muLisp, Common Lisp (a standardized language), Emacs Lisp, Standard Lisp, ISLISP (a standardized language), ...
You'll find often in the Scheme literature Lisp described as a different, but related/derived, language (more symbolic, less functional, more procedural, procedural macros, less clean, less systematic, more dynamic, ...). Scheme is seen more functional, more lexical binding, less procedural, more minimal, one namespace, cleaner, ...).
kazinator 222 days ago [-]
> Would a C++ compiler that doesn't accept "new" and "delete" be C++
Believe it or not, yes it would. It would not be a conforming implementation of any ISO C++ dialect, but it would be recongizable as a C++ dialect and mutually intelligible. Someone who knows C++ would understand programs written in that dialect, and could write new ones in it.
Something which is not a conforming ISO C++ implementation probably has good company; most production compilers are likely not fully conforming. Just not in gaping ways like new and delete being absent.
drweevil 222 days ago [-]
Indeed. And even if it was a Scheme, it would be a Lisp. All Schemes are Lisps, not all Lisps are Schemes.
xdavidliu 223 days ago [-]
it's right in the title of this thread, which comes from the project information of the repo
ianbicking 224 days ago [-]
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 224 days ago [-]
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 223 days ago [-]
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.
dark-star 223 days ago [-]
"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 λ, ∀, ∊, 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....
fithisux 214 days ago [-]
I thought the project was dead.
djaouen 223 days ago [-]
> $ echo '(λ (args) (print "Hello, world!"))' | ol -x c | gcc -x c -o hello - && ./hello
This is frightening, yet awesome.
medo-bear 223 days ago [-]
Im curious, how many people comenting here program in lisp/scheme?
LanternLight83 223 days ago [-]
I thought hackernews sounded like an akward poll platform, so (just for fun) anyone who would like to vote can contribute here:
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
The challenge I guess is figuring out how variables captures by lambdas should be dealt with.
It's great, one of the many awesome features Clojure has.
I didn't see links on that page, but IIRC, there's a particular paper they reference as the main idea.
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".
- Use the data structure as a "standard" tree, sharing one instance across threads and use locking for thread-safety
- Use it as a fully-persistent structure by calling "Fork" before every modification
- Or anything in between
I needed the 3rd case: a cache manager gives out a forked view of the actual cache contents to its clients. Thus the cache is always in control of the "master" copy, and if a client modifies its own fork, the cache and other clients are not affected.
Yes, many languages (and libs, e.g. for JS) do that.
obviously something a lisp that had designated itself ultimate and was keen to take over the world would say.
And would other Schemes be free to copy those?
I just found out there's a rust port: https://github.com/microsoft/rusty-radamsa
https://github.com/yuriy-chumak/ol
[more features, works in browsers vis webassembly too]
e.g.
[0] https://en.wikipedia.org/wiki/Web_Ontology_Language#Acronym
[1] https://en.wikiquote.org/wiki/A._A._Milne
> Owl Lisp is a functional dialect of the Scheme programming language. It is mainly based on the applicative subset of the R7RS standard.
There are Scheme programs which the implementation handles, and programs developed with that incomplete implementation can be run by more complete implementations.
A Scheme programmer informed on the limits of the subset (what is not in it) implementation can jump in and start programming using what is in the subset.
A subset language can be useful to practitioners of the full language.
ThinLisp is an incomplete implementation of Common Lisp, but one which compiles to C that doesn't need garbage collection. You can develop ThinLisp programs as Common Lisp programs (with certain care). Then ThinLisp translates them to C. I think that (by default?) these translated programs don't need garbage collection.
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.
A mammal is a creature that has X, Y, and Z characteristics. A creature having only X and Y characteristics is therefore not a mammal.
Lisp is either a family of language families (Lisps, Scheme, Logo, ML, MDL, JavaScript, Dylan, Racket, R, ...)
or
a more narrowly defined family of languages (often recognizable because they identify as Lisp in their name) and based on the core from Lisp 1: Lisp 1, Lisp 1.5, BBN Lisp, Interlisp, Maclisp, Franz Lisp, ZetaLisp, Le_Lisp, EuLisp, muLisp, Common Lisp (a standardized language), Emacs Lisp, Standard Lisp, ISLISP (a standardized language), ...
You'll find often in the Scheme literature Lisp described as a different, but related/derived, language (more symbolic, less functional, more procedural, procedural macros, less clean, less systematic, more dynamic, ...). Scheme is seen more functional, more lexical binding, less procedural, more minimal, one namespace, cleaner, ...).
Believe it or not, yes it would. It would not be a conforming implementation of any ISO C++ dialect, but it would be recongizable as a C++ dialect and mutually intelligible. Someone who knows C++ would understand programs written in that dialect, and could write new ones in it.
Something which is not a conforming ISO C++ implementation probably has good company; most production compilers are likely not fully conforming. Just not in gaping ways like new and delete being absent.
Is there something that describes what is notable about this Lisp dialect?
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.
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.
Also, from the examples it looks like it requires (or at least recommends) an APL keyboard, or around a dozen macros for characters like λ, ∀, ∊, 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....
This is frightening, yet awesome.
https://www.rkursem.com/poll/view.php?id=e954c5a89f228a3e1