lainchan / λ
Interesting (research) languages
Recursion without an exit · 2020-10-23 12:58
Hi, lainons, let's collect a list of interesting non-mainstream languages.
I have a list of lisps, it was related to my private research project, could post it later.
I think the main segment with such languages is functional programming, actually. There are languages to study algebraic effects: Eff, Effekt, Koka, languages about formal verification and type-safety: Coq, Habit, F*, C0.
string · 2020-10-23 16:03
Idris2 is my favorite experimental language. Powerful totality checker and uses Quantitative Type Theory.
https://github.com/idris-lang/Idris2
Carp is a statically typed Lisp. No GC, made for real time applications.
https://github.com/carp-lang/Carp
Unison is a very ambitious language. I don't fully understand how it works, but it's meant to create programs that are perfectly reproducible and have no dependency problems by enforcing content addressabilty and declarativity. Basically Nix and Guix principles applied to every program, I think.
https://github.com/unisonweb/unison
Recursion without an exit · 2020-10-23 16:29
>>21579
Unison is the only language I didn't heart before of. Syntax look pretty standard for ML family.
Recursion without an exit · 2020-10-23 16:53
Now I'll count lisps i know:
Scheme — a pretty cute lisp, has hygienic macro and first-class functions.
Arc — a minimal lisp made by a lisp cultist, Paul Graham.
Clojure — a JVM based lisp language. One of the most popular dialects, has pretty unlispy syntax.
Common Lisp — the language, which is associated with the word "Lisp" in lisp community. Too dirty IMO.
EchoLisp — I don't get it. It's hard to find anything on this language except to reference manual.
Emacs Lisp — DSL language for Emacs, popular OS text editor.
Hy — Lisp embedded in Python.
Urn — Lisp embedded in Lua.
LFE — Lisp embedded in Erlang.
Egison — a language with non-linear pattern matching, now has syntax with less parenthesis.
newlisp — a lisp made for scripting, has first-class macro.
Otus Lisp — an implementation of Scheme.
PicoLisp — a minimal lisp.
Racket — a superset of Scheme with additions towards language-orientated programming.
Shen — a lisp, embedded in other languages, with Turing-complete type-system.
EuLisp — a language with the best logo.
uLisp — a lisp for micro controllers.
FuzzyLisp — a lisp made for joying with fuzzy logic.
Kernel — a lisp, in which "everything is first-class object". Probably the most interesting language to research in free time.
Recursion without an exit · 2020-10-23 17:35
Another interesting language is Boomerang, https://www.seas.upenn.edu/~harmony/, a language for bidirectional transformations.
Recursion without an exit · 2020-10-23 17:49
>>21579
Unison looks really interesting, it is a language which never forgets, as I see, so you can always search some solution in your code-base.
Functions are stored in compiled parts not as name-references, but as hash-references, so yeah, it should not broke because of some name-change in past code.
Smart solution, but its code-base probably shall grow too big, isn't it so?
Recursion without an exit · 2020-10-23 19:35
In Scheme there's a really interesting thing, called call-with-current-continuation.
With first-order continuations a lot of flow-control structures could be built, for example exceptions and algebraic effects.
gavr · 2020-10-24 16:26
A little-known language - Vala.
I'll tell the story from the beginning. KDE (Kool/K Desktop Environment) was on Qt with a closed license (first released in 1996), the free community did not like it and they made GNOME (GNU Network Object Model Environment) as an alternative(first released in 1997)
Soon the GObject object system appeared (it is problematic to develop a GUI without OOP), the main goal of which was to provide the possibility of transparent cross-language interaction to provide the ability to use GTK from all languages.
It was designed with the ability to create bindings to languages with GC and even dynamic typing (https://developer.gnome.org/gobject/stable/chapter-intro.html#id-1.3.2.5).
Thus, 2 problems were solved at once - the lack of OOP and the need to update bindings to libraries for other languages
(GObject Introspection: https://gi.readthedocs.io/en/latest/)
Writing in C using GObject's OOP was inconvenient due to the large amount of boilerplate, so in 2006 the Vala language was created.
The language itself tries to be similar to the allknown C#/Java syntax, but is transpiled to C (more or less human-readable C) using GObject.
So the GLib(https://developer.gnome.org/glib/2.66/) library is like Vala's STD.
Characteristics of language:
Typing: Static, strong
Type system: C# like Reference Type
Compiler language: self-hosting(https://gitlab.gnome.org/GNOME/vala)
Memory managment: Vala has 3 ways to manage memory:
1) ARC as in Swift with weak and strong references to avoid loops
2) by ownership using owned semantics(owned/unowned references)
3) Manually, using the usual &, *, delete operators. ( 1: https://wiki.gnome.org/Projects/Vala/ReferenceHandling)
Features: Anonymous functions, signals(like Qt but on lang level), properties, generics, assisted memory management, exception handling, type inference, with kw, Python like slices syntax.
C Compiler: It can be compiled by any C99 compiler, this can be useful during the development cycle when compiling for example with TCC, which gives a significant increase in speed.
Debug: I often hear the argument that it is impossible to debage what is transpiled in C.
This is not true. In the debug build, Vala substitutes the #line pragmas in C code, so it can debug with GDB, ofc its not perfect in some edge cases. (demo: https://youtu.be/3yyDdA5IMLI)
IDE: VS Code, Vim, Neovim, Emacs, GNOME Builder(and others LS protocol supported IDE) with Vala Language Server (https://github.com/benwaffle/vala-language-server), also there an IDEA/CLion plugin in dev.
Build Systems: main build system for Vala (as for all GNOME software) is Meson(https://mesonbuild.com/Vala.html),
but CMake(1 https://github.com/jakobwesthoff/Vala_CMake, 2 https://github.com/nemequ/gnome-cmake), Automake(https://www.gnu.org/software/automake/manual/automake.html#Vala-Support), BuilDj and Waf aslo supported.
C ABI: Of course, because of the transpilation in C, the interaction with it is very transparent.
Files describing Vala to C bindings have the. vapi format.
Here are some ready-made examples: https://gitlab.gnome.org/GNOME/vala-extra-vapis
Also there are great API references site: https://valadoc.org/index.htm
Others
Benchmarks: Vala is actually close to C in performance. https://github.com/kostya/benchmarks, https://github.com/arrufat/vala-benchmarks
GIR examples(using vala from other langs): https://gitlab.gnome.org/GNOME/gxml/-/tree/master/examples, https://gitlab.com/gavr123456789/call-vala-from-all-languages/-/tree/master/JS/GJS, https://notabug.org/grindhold/libgtkflow/src/master/examples
Apps examples:
Font editor: https://birdfont.org,
Mail client: https://gitlab.gnome.org/GNOME/geary
Games Launcher/LibRetro GUI wrapper: https://wiki.gnome.org/Apps/Games
Multimedia Lib: https://gitlab.gnome.org/GNOME/rygel,
Parallel processing Lib: https://gitlab.com/kosmospredanie/gpseq
all Elementary OS stuff,
etc... https://awesomeopensource.com/projects/vala
My opinion: I believe that the three main characteristics of Vala are simplicity(I figured it out in 1 day using one of these tutorials [url]https://wiki.gnome.org/Projects/Vala/Documentation[/url], previously only familiar with Qt), high-level features and performance.
fsociety · 2020-10-24 21:49
>>10805
Meddler · 2020-10-25 00:44
I like Hoon for the aesthetic value, but it's ultimately a niche vanity project only used for one thing.
Recursion without an exit · 2020-10-25 16:50
>>21617
This thread is not only about esoteric ones
Lunch · 2020-10-25 18:10
>>21579
Would Carp and Guile be a good combo?
Segfault · 2020-10-26 10:36
>>21643
What?
McCarthy · 2020-10-26 13:30
>>21657
Using Carp to write the program and using Guile as the scripting/configuration language, like how Guile is used with C in GNU programs.
Drano · 2020-10-27 12:41
>>21577
How you define "interesting" tho?
Cutter · 2020-10-27 13:45
>>21579
woah carp looks really good
Crash Override · 2020-10-27 13:56
>>21579
In completion to idris2, there is also granule that is really interesting in that vain.
I really like that multiplicity is not tied to 0 and 1
藤原純一 · 2020-10-27 13:59
One of my favorite is adga because of HoTT (homotopy type theory)
Recursion without an exit · 2020-10-28 16:21
>>21670
Agda is hot, yeah. How to you like using so much Unicode? As I know, unicode sybols in Agda were one of the reason of creation Idris(1).
Recursion without an exit · 2020-11-04 16:10
BUMP
Anamika · 2020-11-05 05:58
There's Worm++, it was created by the same schizophrenic as the Love Bug and Love Shack OS's, Shawn T. Cook.
This is his OS
https://www.youtube.com/user/Flash0213/videos
And this is him.
https://www.youtube.com/channel/UCxPf_PBn5GSIW_OrKBm-sgQ/videos
RABBITHOLE WARNING.
Colmerauer · 2020-11-08 20:57
>>21850
What is it with schizophrenics and doing really interesting things in the space of computing. I wonder if its something like some forms of autism making you very effective at certain professions.
Tank · 2020-11-08 22:42
>>22039
My guess is that computers are controllable. A lot of the schizophrenics I've met felt like the world was this horrible dystopian nightmare (moreso than it actually is I mean), and they tend to gravitate towards things where they feel like they're in control.
Wintermute · 2020-11-09 02:01
http://users.rcn.com/david-moon/Lunar/introduction.html
https://en.wikipedia.org/wiki/ColorForth
https://github.com/mlochbaum/BQN
https://github.com/urbit/urbit
Also, learn Esperanto.
https://archive.org/details/FundamentoDeEsperanto
inivekin · 2020-11-09 22:30
Concatenative langs:
Factor: https://factorcode.org/ - the classic choice
kitten: https://kittenlang.org/ - static-typed written in haskell
mirth: https://github.com/mirth-lang/mirth - static-typed, compiles to c
popr: https://github.com/HackerFoo/poprc - compiles to c AND verilog
parable: https://github.com/crcx/parable - vm, static-typed
edsger: https://github.com/john-ml/edsger - pattern matching
alma: https://github.com/cassowarii/alma - statically-typed, written in c
I'm interested to hear people thoughts on using languages such as these.
car · 2020-11-10 18:43
>>22053
Lunar looks interesting - at a quick glance, I see a few very nice ideas.
def fibonacci(n)
if n < 2 then 1
else fibonacci(n - 1) + fibonacci(n - 2)
So far, an indentation-based language with lightweight syntax.
def gcd(x integer, y integer)
[...]
I see, it has type hints - type inferrence is used to make them optional. Nice, but nothing new.
;; Construct an integer from a string in any base between 2 and 36 (default base 10)
def integer(s string, named: base = 10 2..36)
;; Get the digit value of a character, assuming ASCII (Unicode) encoding
def digit(char '0'..'9') char.code - '0'.code
def digit(char 'A'..'Z') char.code - 'A'.code + 10
def digit(char 'a'..'z') char.code - 'a'.code + 10
def digit(char) 999 ; force error("'$char' is not a digit in base $base")
[...]
And here's where the good stuff begins. First, the 'base' argument is declared to have a default value AND to be a named argument, separately - lately, I've found it very frustrating not to be able to give an argument a name without also making it optional in the process (in Python, specifically).
But second and more important, the argument is declared to belong to... An anonymous type composed of a given integer range? This is enormously awesome. Why is, to the best of my knowledge, Ada the only 'big' language with built-in, compiler-enforced subset/range sub-types? Such a waste (and a risk) to have a type-checking compiler and still have to manually verify that your arguments are within the valid range!
Finally, I see that, like Elixir, it supports multiple function definitions with different signatures, with the correct one being dispatched to depending on the given arguments.