Live data from Hacker News

XL: An Extensible Programming Language

xlr.sourceforge.io

71–80 of 87 posts

Re: XL: An Extensible Programming Language

#71

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?

Probably but I don’t know any ML… lol. I’ll def check it out though so thx!

Re: XL: An Extensible Programming Language

#72
post #42

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…

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.

Thx, I’ll check it out.

Re: XL: An Extensible Programming Language

#73
post #44

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

Ah yes. I know it but haven’t been there in a long, long while. Thx.

Re: XL: An Extensible Programming Language

#74

Other 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

Thx. I’ll check them out.

Re: XL: An Extensible Programming Language

#75
post #64

Earlier 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…

I could see that. Which I guess would put assembly into the homoiconic bucket. I think it fits the concept but sure isn’t the same as what people think of with Lisp, etc… lol.

Re: XL: An Extensible Programming Language

#76

Earlier 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 ]…

Aha, that’s pretty awesome. I’m familiar with XT’s but hadn’t thought of using them that way. And didn’t know that you can convert back to text.

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

#77

Earlier quoted context omitted.

“is is is” would be called BillClintonLang, no?

Or TrumpLang. "It is what it is". https://www.google.com/search?q=Trump+it+is+what+it+is 2nd hit onwards.

Oh man. I’d missed that Trumpism.

Re: XL: An Extensible Programming Language

#78
post #40

What 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…

> "Bill Clinton denied to comment on the meaning of that statement".

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

#79
post #49

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

Good point, but if you start treating indentation as part of the syntax, we all know where it would lead...

Re: XL: An Extensible Programming Language

#80
post #14

Earlier 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…

> If you consider Julia a Lisp

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

Post reply on HN