Anyone know of other languages using pattern matching as a foundation? I’ve come across Refal[1], who’s creator Valentin Turchin seems like someone who hasn’t gotten the recognition he maybe deserves. As an aside, his son Peter Turchin does some interesting work in a different direction that’s def topical these days. I know SNOBOL gets labeled as one. Would Prolog count? I haven’t actually written any myself. They de…
Are you using pattern matching in the sense of Standard ML and the ML family of languages?
XL: An Extensible Programming Language
71–80 of 87 posts
Re: XL: An Extensible Programming Language
#72Anyone know of other languages using pattern matching as a foundation? I’ve come across Refal[1], who’s creator Valentin Turchin seems like someone who hasn’t gotten the recognition he maybe deserves. As an aside, his son Peter Turchin does some interesting work in a different direction that’s def topical these days. I know SNOBOL gets labeled as one. Would Prolog count? I haven’t actually written any myself. They de…
Check out Pure. https://agraef.github.io/pure-lang/ This was what convinced me to switch to LLVM. I now regret that decision, but at the time, it sounded like a lot of fun.
Re: XL: An Extensible Programming Language
#73Other than here, are there any other places online where folks writing their own languages tend to congregate? Having recently joined that tribe, I think it does take a particular worldview and type to be willing to undertake that. I suppose folks writing an OS perhaps even more so.
http://lambda-the-ultimate.org/ is one of the only PL-centric websites with discussion I can think of.
Re: XL: An Extensible Programming Language
#74Other than here, are there any other places online where folks writing their own languages tend to congregate? Having recently joined that tribe, I think it does take a particular worldview and type to be willing to undertake that. I suppose folks writing an OS perhaps even more so.
https://old.reddit.com/r/ProgrammingLanguages/ For fun: https://esolangs.org/wiki/Main_Page
Re: XL: An Extensible Programming Language
#75Earlier quoted context omitted.
Is Forth really homoiconic? I’m asking as a recent fan of Forth. I would’ve thought to describe it as having strong, interactive metaprogramming but not necessarily homoiconic. Unless ‘code = data, data = code’ because they’re all bytes… haha. Postscript would count as homoiconic, I’d think. Though I haven’t actually seen programs that so this.
I think Forth counts, in a "Turing-complete" sense of homoiconicity. A Forth program in a classic indirect threaded system can self-modify, reach in and change core interpreter words during execution. But it isn't obeying any formal soundness principle, since it's just a thin layer over the machine. Compiled Forths might opt to wall off some of those options behind the compiler interface, in effect making the languag…
Re: XL: An Extensible Programming Language
#76Earlier quoted context omitted.
Is Forth really homoiconic? I’m asking as a recent fan of Forth. I would’ve thought to describe it as having strong, interactive metaprogramming but not necessarily homoiconic. Unless ‘code = data, data = code’ because they’re all bytes… haha. Postscript would count as homoiconic, I’d think. Though I haven’t actually seen programs that so this.
Had this discussion on Discord as well. Like most things Forth it depends how you use it. If we consider the classic indirect threaded systems, then every field in a definition is an address called an execution token (XT). In most systems you can convert an XT back into a text label. This allows pretty simple de-compiling for example. It is trivial to collect those Xts as data and execute them later. CREATE XT-LIST ]…
I’m going to have to do more Forth. And I have a sudden urge to go write some silly self-modifying assembly, if current processors even allow that anymore.
Re: XL: An Extensible Programming Language
#77Re: XL: An Extensible Programming Language
#78What does "is is is" mean in this language? Maybe it's a quine? Can you define an "isn't" operator?
Let's ask the interpreter / compiler: ./xl -nobuiltins -parse /tmp/glop.xl -style debug -show (infix is is is ) So what it sees is a definition of a name 'is' as itself. Now, that name is very unlikely to be usable because `is` as an infix is so central to everything. As a matter of fact, it looks like even "is is 2" actually crashes the current implementation. Oh well. I wonder what a sensible error message on this…
Oh man, that’d be hilarious.
I’ve been hacking around with my own sorta Forth/Postscript like attempt at a language that runs on WebAssembly and does graphics in the browser.
Odds are it’ll never see the light of day. But if it does, you’ve now triggered all kinds of ideas for ridiculous ideas for error messages. Like starting them of with ‘hey bruh…’ or trotting out good ol’ Mr Clippy from Microsoft.
Re: XL: An Extensible Programming Language
#79Earlier quoted context omitted.
Where would you put Lua on this spectrum? Also, I do not find Lisp unreadable - you train your brain to ignore the parens and look at the indentation instead pretty quickly. And you can always tell Emacs to gray out the parens if you really want. ;-)
> you train your brain to ignore the parens and look at the indentation instead pretty quickly But I don’t want to train my brain to ignore useless syntactic noise, I want my brain to be guided by helpful syntactic guides.
Re: XL: An Extensible Programming Language
#80Earlier quoted context omitted.
> There are lisps without parens too Are there any that come close to the usage of lisps with proper s-expressions? I've seen them come and go, but no "lisp without parens" that seem to stick around for longer period. I guess that should say something? Maybe we just haven't found the right way of exposing it though. Personally, when I've given it a try, the indentation-based syntax always makes it hard to use without…
> Are there any that come close to the usage of lisps with proper s-expressions? If you consider Julia a Lisp, which I would argue you should, it may be the most widely-used Lisp currently. The only way you'll see an s-expression is is to call Meta.show_sexpr. If you consider Dylan a Lisp, you should consider Julia a Lisp as well. If you don't consider Dylan a Lisp, I have to conclude that you consider the s-expressi…
Maybe, but would you consider Julia a Lisp without parentheses, which was the context here? Because after looking at their documentation (https://docs.julialang.org/en/v1/manual/methods/ for example), it seems to have as many parens as any other lisp, just postfix notation rather than prefix notation, `f(Float32(2.0), 3.0)` vs `(f (Float32 2.0), 3.0)`.
Arguing about what makes or doesn't a lisp is a conversation I don't think will lead to any useful results, I feel like that's ongoing since the 60s or something. Out of my league :)