Live data from Hacker News

Opa replaces Javascript, HTML, CSS, PHP, and SQL with one unified language.

opalang.org

71–80 of 88 posts

Re: Opa replaces Javascript, HTML, CSS, PHP, and SQL with one unified language.

#71

Opa is neat, but the two license options of AGPL or "talk to us for a price" basically ensure it will never achieve anything close to mainstream usage.

Opa reminds me of Curl, MIT's "Lisp with curly braces" programming language for web development. MIT spun out Curl as a company in 1998. Their business model was to charge customers per-byte served!

https://en.wikipedia.org/wiki/Curl_%28programming_language%2...

Re: Opa replaces Javascript, HTML, CSS, PHP, and SQL with one unified language.

#73
post #60
post #13

Opa however extends the classical syntax with advanced features specific to the web. HTML fragments can be inserted directly without quotes: line = bar ; I'm not sure that this helps readability, feels like reverse php (html inside code, vs code inside html).

Reminds me of XML literals in .NET.

Or Scala

Re: Opa replaces Javascript, HTML, CSS, PHP, and SQL with one unified language.

#74
post #17

Earlier quoted context omitted.

It's much more readable than complex combinations of " and '. Furthermore, with the static typing, all your structures are checked at compile time: Try it, you'll see how helpful it is.

Oh yes. The mess of " and '. I'd love to be able to avoid that. Especially for stuff like this: ' ' Did you notice the bug? EDIT: Whoops, I made some other bug accidentally.

I count four bugs.

Re: Opa replaces Javascript, HTML, CSS, PHP, and SQL with one unified language.

#75
post #64
post #55

Earlier quoted context omitted.

We've heard this all before, though. 40 years ago, Machine Code was where it was it, and people scoffed at those who were lazy enough to use an assembler. Then Assembly was where it was at, and the abstraction that C provided was leaky and poor, and compiled code could never be as good as hand-written assembly coded directly against the individual processor instruction set. The problem with this argument is that it a…

It doesn't -- C is analogous to the coffeescript case; it's not at all like Opa. It's the minimal portable abstraction over digital computers. Given some C code, it's not hard to predict roughly what instructions it compiles into. It precisely illustrates the point, because there were dozens of more complicated abstractions (languages) that failed. They claimed to do more for you, but what they did conflicted with re…

Doesn't the C compiler do all sorts of optimization magic that makes the output of the compiler sometimes hard to predict? C is also not the only language that succeeded; C++ and Java are doing pretty well, and I've used them quite alot without delving into the sausage factory of GCC/javac. Scala is doing pretty well too, with it's 20 stage compilation process!

I disagree that anything trying to abstract away network communications will fail; I doubt that every engineer at google is a full-stack expert who single-handedly sets up a massive-scale service every day by hand. More likely, they have developed a set of somewhat-reusable abstractions that they can build upon for a variety of services. Hadoop is another example where the whole network thing is abstracted away. Amazon S3/Cloudfront is yet another. Difficult, but not impossible.

Perhaps Opa is trying to be the minimal portable abstraction over a full-stack service. I know GWT tried to be the same thing and failed, but one failure doesn't mean you give up, and I'm glad they're still trying.

Re: Opa replaces Javascript, HTML, CSS, PHP, and SQL with one unified language.

#76
I actually tried to run one of the featured projects on github: OPAcman.

This was my experience:

1. install OPA. Get surprised by the AGPL license because the main page mentions that it can be used to develop closed source apps.

2. git clone OPAcman.

3. run make, fail. Read error message (in color, with a little unicode "flag" symbol right where the error is!)

4. change makefile to use --parser classic, also fails

5. hack off score.opa because --parser classic database directives are irrevocably broken and I can't be arsed to figure out the new syntax, also patch opacman.opa with a stubbed out Score object.

6. Run make, get ocaml errors: Error: This expression has type Bsl_init_.CR.t = QmlClosureRuntime.t but an expression was expected of type QmlFlatServerLib.record = ServerLib.ty_record

7. Take a look at some of the ml code generated

let _v686_const = ((Obj.magic) (((QmlFlatServerLib.unsafe_init_static) ([| (((Obj.repr) (( (* ["label" ; "ty"] ) Link_opacman_001._v5_shared_vtable)))) ; (((Obj.repr) (None))) ; (((Obj.repr) (Link_opacman_002._v226_const))) ; (((Obj.repr) (_v685_const))) |])))) let _v687_const = ((Obj.magic) (((QmlFlatServerLib.unsafe_init_static) ([| (((Obj.repr) (( ( ["hd" ; "tl"] *) Link_opacman_001._v6_shared_vtable)))) ; (((Obj.repr) (None))) ; (((Obj.repr) (_v686_const))) ; (((Obj.repr) (Link_opacman_001._v8_const))) |]))))

8. Run AWAY.

Re: Opa replaces Javascript, HTML, CSS, PHP, and SQL with one unified language.

#77
post #16

Opa is neat, but the two license options of AGPL or "talk to us for a price" basically ensure it will never achieve anything close to mainstream usage.

Thanks for your comment. You raise insightful questions and we are aware that our current licensing must change. Expect to read about this soon!

Can you please tell me why you changed you syntax to JS-like syntax? The previous syntax was good enough, at least from my point of view.

Re: Opa replaces Javascript, HTML, CSS, PHP, and SQL with one unified language.

#78

Opa is neat, but the two license options of AGPL or "talk to us for a price" basically ensure it will never achieve anything close to mainstream usage.

thanks for pointing out its AGPL.. i was going to mention it as an additional alternative in the switch from PHP to one of Java/Node.js/Python/Ruby.

but AGPL for a language is a deal breaker. i accept AGPL for an application, but not for our language (we will make sites for our clients that dont want their stuff open source, and we dont want to be back in license-hell)

on tip for opa: pick a license that is common for languages.

besides the license i think the language looks _very_ useful (more compile time checks, pretty syntax, same user created data types on both client and server).

Re: Opa replaces Javascript, HTML, CSS, PHP, and SQL with one unified language.

#80
post #16

Earlier quoted context omitted.

Thanks for your comment. You raise insightful questions and we are aware that our current licensing must change. Expect to read about this soon!

Can you please tell me why you changed you syntax to JS-like syntax? The previous syntax was good enough, at least from my point of view.

I don't work on or speak for the Opa team, but I assume they adopted JS-like syntax for the same reason Dart did -- familiarity is important when it comes to language adoption.

Regardless of whether or not you think this is a good thing or whether programmers worry too much about superficial syntax issues, this is a practical issue you have to worry about if doing PL design for the real world.

Post reply on HN