Skip to content

Instantly share code, notes, and snippets.

@catb0t
Created April 19, 2016 03:08
Show Gist options
  • Save catb0t/46958a8925f3af4b962decd3efd20259 to your computer and use it in GitHub Desktop.
Save catb0t/46958a8925f3af4b962decd3efd20259 to your computer and use it in GitHub Desktop.

I was browsing my mental list of interesting programming languages, and I decided to do a little research about the language to use if I wanted to, perhaps, implement a platform-independent UI for a menu / order-placing application, that looks and works the same on my computer and your computer and my phone and Richard Stallman's computer.

My first go-to was Factor, because it allows an expression of algorithmic intent alongside cool semantics and infinitely extensible syntax (think Forth plus Haskell plus LISP plus combinatorial logic and term rewriting) that makes me want to use it all day. Unfortunately, at least right now, Factor's UI toolkit is only for Linux (GTK), WIndows and Mac OSX. :(

Next, I thought about LambdaNative, a dialect of Scheme (R5RS) that attempts to target iOS, Android and the Big Three desktop platforms all at once. Unfortunately, Scheme is a very simple, tiny little useless language, and every implementation adds its own twists to make it "usable". I like Racket, with its interesting, useful semantics. gigantic standard library and tons of cool user-created packages, and LambdaNative has... none of those. LambdaNative's a little bit like trying to make a platform-independent GUI networked application in C89, or maybe ANSI FORTH: sure, it can be done, but with the tiny set of "features" you have, the only thing possibly more painful would be MIPS Assembly, or perhaps a Ginster's pasty, but with Ebola instead of pastry.

Then, I remembered Clojure! Perfect: a 1) modern 2) functional 3) LISP 4) for platform-independent development and 5) an active community!. Unfortunately, there are a few glaring problems with Clojure: 1) It's licenced under a non-GPL compatible licence, the EPL, which means I can't make my Clojure app GPL, which is a problem. 2) Its standard library is shamefully tiny for a LISP -- this is because 3) it's expected to have a high amount of Java interop, which I want to avoid. Clojure looked promising for a minute there, but that would have been too perfect.

There's also Scala, which seems like a nice imperative object-functional language that targets the JVM while fixing Java's many, many, many, many, many, many, many, many, many, many, many, many, many, many, many, many, many, stupid, actively moronic "features", but I've heard from a little bird that app development or most development in Scala requires an 80/20 Scala/Java split, which again ruins what looked promising. (It's even licenced under the modified BSD licence, which is GPL compatible! But no, Java has to ruin everything.)

I heard something about using one of the MLs (OCaml, SML/NJ, etc) or Haskell for mobile apps, which sounds interesting, but requires I learn one of those first, which I don't really want to do, because those are for people with doctorates in Computer Science; people whose hobby is Peano arithmetic -- too boring even for me.

There's one last hope: JS + HTML5 + CSS3, in some sorta frame. Web Design with JS + HTML is mostly uninteresting to me when it comes to design paradigms, but there are languages like Elm, a Haskell for the web, or Whalesong, a (dead) Racket-to-JS compiler. The trouble with Elm is that while using it will likely be really cool, I can't apply it anywhere else. Sure, it replaces JS + HTML + CSS, but (Node) JS has huge applications on the desktop as a language worth knowing, and the same cannot (I think) be said for Elm.

I can have a website, the backend written purely in Racket, Factor (yay!) or Python (...meh, why bother if it won't be interesting) on the backend with some JS, HTML and CSS or Elm for the frontend, or I can have a really lame native platform-"independent" UI in... oh, C#. Yay, WinForms. :(

Conclusion? Java sucks, C# sucks a little less, and mobile development is really lame.

Solution? A damn website. In damn Racket. Or Factor. Or Python. They all have PostgreSQL bindings. And Elm for the frontend. Maybe. Maybe not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment