News for hackers. Stuff that matters.
Re:The Lx Programming Language by c3d on Friday November 01, 2019 @04:24AM (#21417024)
Disclaimer: Author of the language / web page speaking.

This one is hopelessly outdated. See https://github.com/c3d/xl for the current state of things. A bit of history of the language here: https://github.com/c3d/xl/blob/master/doc/HISTORY.md.

Warning: this is currently under heavy repair / refactoring, so Nothing Works™.

An interesting (if old, 2010) application of the language here: http://tao3d.sourceforge.net.

Contributions and ideas welcome.

Re:The Lx Programming Language by axilmar on Friday November 01, 2019 @06:19AM (#21417429)
What you did there is very cool! I am speaking for both LX as presented in the old link and the new work that you are doing.

Personally I have given up creating a new programming language about a decade ago because I realized no matter what language I create, people will not use it, it it comes from a random github page.

Also, existing languages cover almost all business needs and while languages like LX provide a lot of improvements, the cost of change seems to be greater than the cost of not having these improvements.

As for ideas, what I'd like to see in a programming language is signal-based programming: the execution flow of a program is not 'one instruction after the other' but reactions to signals. A program shall be built by wiring output signals to input signals.

I'd also like to see types morph based on run-time conditions.

The most fundamental problem of all the current programming languages is that types are too rigid and don't allow for catching all the possible outcomes. For example, a File morphs between a closed file and an opened file, however in current systems any operation can be applied to a file, irrespectively of whether the file is actually opened or closed.

I believe that the combination of signal-based programming and type morphing will increase the reliability of programs, leaving only bugs that cannot be proven to be solved due to their nature (aka like the halting problem).

I may not be necessarily correct, but I have a strong belief in the above.

Re:The Lx Programming Language by hyperpallium on Saturday November 02, 2019 @12:42AM (#21425932)
> no matter what language I create, people will not use it, it it comes from a random github page.

Speaking as a fellow sufferer, how did perl, python, php, lua, ruby start getting used? They were pre-github, but jq really did start that way: https://github.com/stedolan/jq.

The key to being used is a usage: a problem to apply it to. If there's a problem that people need solved, and your language is much better than the alternatives, then people will use it, post about it, rave about it. If JSON wasn't popular, jq wouldn't be popular.

OTOH your actual interest is in more abstract ideals. This is crucially important work, but you may be right that no one will use it... instead, they'll be interested in the ideas you are interested in. Finding a needed application of your ideas will generate use.

Re:The Lx Programming Language by axilmar on Monday November 04, 2019 @04:20AM (#21440038)
'Random github page' means there is a plethora of new programming languages to chose from (due to easiness of sharing projects that github allows) and studying of them all to see if they solve any new issues or improve things so much that it makes economic sense to work on this new language becomes increasingly more difficult.

In the pre-github days, candidate programming languages were fewer and solved yet-almost-unsolved important problems. The more you go into the past, the easier it is to get your foot in the door.

Re:The Lx Programming Language by hyperpallium on Monday November 04, 2019 @11:35AM (#21443250)
> studying of them all to see if they solve any new issues

But you don't find them that way - you look for a solution to your problem, and you come across them. That's why they say "scratch your own itch"; someone else might have that itch too.

You search for JSON transformation, you get jq (that's how I found it, some years ago).

You're right that it was easier earlier. But there are new-unsolved-important problems all the time --- and "solutions to problems" radically narrows the search space.

Re:The Lx Programming Language by Shoop on Friday November 01, 2019 @07:55PM (#21424925)
The thing you are referring to with open and closed files is called typestate. Check out its implementation in the Plaid programming language: http://www.cs.cmu.edu/~aldrich/papers/onward2009-state.pdf
Re:The Lx Programming Language by codetrotter on Friday November 01, 2019 @10:42PM (#21425566)
There was a post here on HN about typestates in Rust too yesterday. For anyone that didn’t see it: https://news.ycombinator.com/item?id=21413174
Re:The Lx Programming Language by RossBencina on Saturday November 02, 2019 @07:03AM (#21426989)
Re:The Lx Programming Language by heavenlyblue on Friday November 01, 2019 @04:50PM (#21423569)
>> For example, a File morphs between a closed file and an opened file, however in current systems any operation can be applied to a file, irrespectively of whether the file is actually opened or closed.

But not in Rust. As a matter of fact anything based on intuitionistic logic could do that for you (e.g. use-only-once, must-use, etc).

Re:The Lx Programming Language by _bxg1 on Friday November 01, 2019 @09:09PM (#21425228)
My own realization that I'll probably never do anything on the frontier of language design hasn't killed my interest in designing a language, but redirected it.

These days my thoughts drift towards novelty and niche domains. What would be the most interesting way of describing a subset of things? The most fun? The most intuitive? What's a way to break a specific domain down into a vocabulary that lets you populate it while forgetting you're even using a computer?

I think there's still a lot to explore even if you aren't shooting for maximum productivity or even general-purpose programming.

Re:The Lx Programming Language by wwright on Friday November 01, 2019 @06:48AM (#21417555)
You should check out Idris: https://www.idris-lang.org/
Re:The Lx Programming Language by dhash on Friday November 01, 2019 @11:20PM (#21425678)
others say typestates, but Scala and Haskell have had IndexedStateT for the purpose of typelevel-state-machinery and it works really well with (somewhat lesser) boilerplate and semantics + FP. To me, it's particularly useful for anything resembling a protocol.

Signal based processing is Observables/reactive streams, which provide a sane interface to use.

This is (one of) the problem with new languages: library ecosystem access. It's why Scala/Clojure/Kotlin is one camp of languages and Zig/Rust is in another - both Java and C have a ton of great libraries written in them, with ones that add signals-first approaches via libraries.

Re:The Lx Programming Language by jcelerier on Saturday November 02, 2019 @04:08AM (#21426457)
You can look into SIGNAL, esterel, lustre, Céu... dataflow programming has been developped since the 80s and has some markets where it is extensively used (avionics, digital audio and digital art, simulation...)
Re:The Lx Programming Language by nunodonato on Saturday November 02, 2019 @02:56AM (#21426269)
Interesting thoughts about signals. Aren't callbacks somewhat similar? (As in JavaScript for example)
Re:The Lx Programming Language by ptrott2017 on Friday November 01, 2019 @03:33PM (#21422822)
Having played around with XL, Tao3D and Elfe, I have to say there was/is a lot of fun to be had and some very compelling concepts and unique ideas in these projects. Its great to see them mentioned on HN. I found the parse tree approach very educational and its a very nice and powerful alternative to S-expressions. Tao3D was an very quick way to build simple interactive graphics apps and a lot of fun. ELFE has some interesting concepts for distributed computing. While I ended up using Erlang and LISP rather than ELFE it was defintely eye opening in a good way and reminded me of the fun and creativity to be had - - so a huge thank you for the past projects and good luck with the next evolution.
Re:The Lx Programming Language by yiyus on Friday November 01, 2019 @09:12PM (#21425234)
> I found the parse tree approach very educational and its a very nice and powerful alternative to S-expressions.

Do you have at hand a link where I can read more about this? Thank you in advance!

Re:The Lx Programming Language by c3d on Saturday November 02, 2019 @04:11AM (#21426471)
Well, a starting point would be this: https://github.com/c3d/xl/tree/master/doc. It's not finished, but it gives you a good idea.

For Tao3D, you have https://tao3d.sf.net.

Re:The Lx Programming Language by yiyus on Saturday November 02, 2019 @05:58AM (#21426770)
Thank you!

I was actually looking for something specific about parse trees vs S-expressions. That would be https://github.com/c3d/xl/blob/master/doc/HANDBOOK_1-syntax....

But I'm reading the whole thing now. Very interesting language! I don't see myself using it in production any time soon, but it looks like a wonderful tool for programming languages research. Thank you again!

Re:The Lx Programming Language by WesternStar on Friday November 01, 2019 @05:38AM (#21417275)
So I was thinking about something similar to this in the sense of a language where syntax was extendable but with making different choices. I was interested in forming some sort of base lingua franca with additional composable dialects that are available per translation unit. Imagine if you could take go know for sure you don't have any concurrency in a section or the memory management section is missing so no worries about memory management. Increasing expressiveness but also reducing cognitive load to the calling code and its interfaces and nowhere else. Want to run very complicated domain specific code and not have the guy who designs the webserver know anymore than what is nessecary to rout it great. Want to add hot code,io, complexity annotations in the code, Great(Obviously this isn't free you need good tooling and to do sampled profiling and for complexity you need to make choices about what code is complex, etc.But if we're dreaming why not dream big.). Metrics,Explicit resource bounds etc. In this context for the things most people would want i.e. concurrency you would have a readily available dialect that fits 80% of use cases which would be infrequently changed. I don't know if that makes much sense in what you have in mind but I did find what you're doing interesting.
Re:The Lx Programming Language by dang on Friday November 01, 2019 @08:21PM (#21425044)
Ok, we changed the URL from http://mozart-dev.sourceforge.net/lx.html to the github.com page. If you'd prefer a different URL just let us know. Thanks!
Re:The Lx Programming Language by earenndil on Friday November 01, 2019 @08:47PM (#21425144)
Since the github page is current, the (2002) should probably be removed.
Re:The Lx Programming Language by dang on Saturday November 02, 2019 @12:10AM (#21425841)
Removed. Thanks!
Re:The Lx Programming Language by fluffything on Saturday November 02, 2019 @04:18AM (#21426495)
Hows the performance compared to say C++ or Rust ?