

Jisp – A programmable language that compiles to JavaScript - dkyc
http://jisp.io/

======
ha292
Prediction: it will die it's natural death in 6 months.

"Terser" should not be a programming language selling point. "Expressive" yes.

~~~
brandonhsiao
I know nothing about programming languages. What makes you predict that, and
what makes you feel terseness cannot be a programming language's selling
point?

~~~
omegaham
One of the problems with terseness is that it can make code completely
unreadable. You can write perfectly readable code with it, but the fact that
it's easy to make dense, inscrutable code can make things a nightmare when
you're looking at what someone else has made. Especially if that person is a
Real Programmer[1].

Of course, a lot of people very much resent the idea of a programming language
forcing them to do what they see as pandering to the lowest common denominator
(That's what comments are for!). It really is up to the community as to how
much description they really need.

[1][https://www.cs.utah.edu/~elb/folklore/mel.html](https://www.cs.utah.edu/~elb/folklore/mel.html)

------
fake-name
How the heck is it "terser"? The /example/ on that page is 23 lines/555 chars
to produce javascript that is 17 lines/444 chars.

If you're going to boast about "terseness" as a selling point, you should at
least ensure your examples actually demonstrate that to be at all true.

~~~
bkirwi
Well, the first 10 or so lines define a macro; I suspect the author was not
counting those. This is not entirely unfair, since we're also not counting the
code Gulp used to give you that nice builder-style API.

I was thrown off by this at first as well -- the text really doesn't match the
visual impression. It might be smart to add a qualifier to the docs: "look how
simple the macro is, and then look how concise the gulp definitions are after
that."

------
Mitranim
Language author here. I feel pretty stupid for what I wrote in the
documentation. Commenters here are entirely right to bash it for claims of
terseness on the syntax level because that's not an advantage, just a
questionable tradeoff.

I'm doing a complete rewrite with 0.4, overhauling the compiler's architecture
(the current version is fairly embarrassing) and dropping some dead-end ideas
and Ruby influences. Mostly done, but moving slowly. If anyone's interested,
you're welcome to PRs. :)

~~~
rcarmo
Seriously now, and without meaning to diss your work -- ever considered
contributing to wisp? The project needs extra hands.

~~~
Mitranim
Actually never heard of wisp. There's so many lispy dialects, smaller ones
tend to get overlooked. I don't think I can get involved with another compiler
at this point — got a bunch of other libraries underway, which have even
muscled out jisp for the time being. Sorry :)

------
elwell
Really? I would definitely expect this to be an equality test instead.

    
    
      ; assignment (name binding)
      (= myVar 'myValue')

------
rcarmo
Personally, I find
[https://github.com/Gozala/wisp](https://github.com/Gozala/wisp) to be a whole
lot more coherent and readable (and probably more mature, too, even though it
has much less documentation).

wisp also generates very nice JS code (and source maps), and my only real
problem with it is that it lacks the time and resources ClojureScript clearly
commands at this point.

(edited to add: wisp also has a fair amount of activity:
[https://gitter.im/Gozala/wisp](https://gitter.im/Gozala/wisp))

------
jozi9
How does it compare to ClojureScript?

~~~
bigtunacan
Came in here to post the same thing. As another Lisp to JavaScript transpiler
and the popularity and support for ClojureScript already I think there needs
to be some pretty compelling differences.

~~~
aaron-lebo
It needs to be different than ClojureScript as well as more than a dozen other
lisp-to-js projects. [1]

These are fun projects, and I don't doubt that the authors and a few
individuals have or will get great use of of it, but the market is saturated
with languages that compile JS right now and very few stick out or are likely
to get critical mass. Even Coffeescript, which is probably the most popular
one, has a small community.

[1] [https://github.com/jashkenas/coffeescript/wiki/list-of-
langu...](https://github.com/jashkenas/coffeescript/wiki/list-of-languages-
that-compile-to-js)

------
ed0
Interesting project, but I doubt it will gain any traction. It would be good
to provide some kind of a runtime and a standard library.

------
leroy_masochist
Apologize if this is a dumb question but is the point here to make a language
that's somewhat analogous to a stenographer typewriter or a Dvorak keyboard or
something? In other words, you can write out new code in Jisp, then hit the
compile button and it compiles to JS and you paste that into Sublime Text and
you have thereby saved time?

~~~
Igglyboo
Well if we want to get technical that's how every compiler works, except the
stenographer is writing 0s and 1s instead of JS. Writing C saves you time over
writing machine code, that's what a programming language is supposed to do.
They make it easier for a human to give instructions to a computer.

------
Hello71
I hope that the proliferation of JavaScript languages does not mean we need
abandon the whole concept of "HTML static pages".

------
aliakhtar
You can do the same thing with Java using Google Web Toolkit:
[http://www.gwtproject.org/overview.html](http://www.gwtproject.org/overview.html)

It lets you write both server & client code in java, and then the client code
is compiled to highly optimized javascript.

~~~
xiata
A word of warning, there is plenty of google brain cancer in GWT, one of my
personal favorites that elicited "wtf..."s frequently in a previous
occupation:

[http://www.gwtproject.org/javadoc/latest/com/google/gwt/json...](http://www.gwtproject.org/javadoc/latest/com/google/gwt/json/client/JSONValue.html)

To this day I still can't fathom why someone thought it'd be acceptable to
violate conventions by providing is<Type>() methods that do not return boolean
results.

~~~
aliakhtar
In my 1 year of using GWT, I've never had to use that class. Also, you're
never required to use GWT's implementation of JSON, you're free to write your
own.

------
davexunit
Those macros look unhygienic, unfortunately.

~~~
hajile
Unhygenic macros isn't a drawback, just implement a hygenic macro system on
top (this isn't difficult).

That said, I don't see the need for this language. Wisp and Clojurescript seem
to have a lot more mindshare and I don't see a big enough benefit here to
warrant splitting the community.

------
igl
no source maps? :( come on!

~~~
klibertp
If you're a competent JS programmer you don't need source maps in this case.
It's hard to tell from the examples, but it looks like generated JS is not
particularly hard to read. Source maps are a must for things like FunScript,
js_of_ocaml, Whalesong; they are not very useful in langs like Coffee.

Personally I dislike usage of source maps for Coffee. I want to know what code
is being generated. It's good for your health to know this. Most serious C
programmers know at least the basics of what asm their compiler generates from
which C construct. They can read it (compiled asm) too. I see no reason why
this shouldn't be true for Coffee and JS, where it's much, much easier to do
anyway.

EDIT: also, as noted by my sibling, it's open source and on Github. You can
just go and implement source maps support, I think your pull request would be
quickly merged...

------
_random_
The correct term is 'transpilation'.

~~~
klibertp
I wonder about that. On this page
[http://en.wikipedia.org/wiki/Compiler](http://en.wikipedia.org/wiki/Compiler)
the first sentence reads:

"A compiler is a computer program (or set of programs) that transforms source
code written in a programming language (the source language) into another
computer language (the target language, often having a binary form known as
object code)"

It's even sourced. There's nothing here saying that "target language" can't be
another high level language; and if you look at CoffeeScript (for example)
implementation you'll see that it's structured as any other compiler would be.
I think "transpilation" would be a bit more precise, but I don't think
"compilation" is incorrect term.

~~~
_random_
_> "would be a bit more precise"_

I agree and stand corrected.

