Domain: opalang.org
Stories and comments across the archive that link to opalang.org.
Comments · 31
-
I call BS
1) Why distinguish client from server?
2) Server technology is advancing.
-
Re:Dreadful summary
http://opalang.org/faq.xmlt -> "What does Opa mean"
-
Re:Link soup
Hopefully the first page of documentation should answer what Opa is. As for the licensing it's a bit more complicated as we're in the process of changing it, but this blog post should give you the answers, I hope.
-
Re:Link soup
Hopefully the first page of documentation should answer what Opa is. As for the licensing it's a bit more complicated as we're in the process of changing it, but this blog post should give you the answers, I hope.
-
Re:Dreadful summary
From the web site: "Opa is the most advanced application framework for JavaScript. All aspects are directly written in Opa: Frontend code, backend code, database queries and configuration. And everything is strongly statically typed."
So you write code in one language, and your functions are automatically translated to Javascript as needed. The same exact code can run on client and server, but if it runs on the server then it can be optimized better because Opa (unlike Javascript) is statically typed.
Opa appears to be a functional language like Haskell, OCaml, etc., which means that you can write most of the code without specifying data types, as types will be inferred automatically. It also means that data is immutable (write-once) by default. The syntax has a slightly more "conventional" appearance than some other functional languages, so it doesn't look quite as foreign to those who are new to functional programming. Opa is not object-oriented, but it does at least offer "modules" that support dot-notation.
Personally, lack of OO features always makes me uncomfortable because I'm not sure how to use the design patterns I am used to using. IMO the Opa manual should really have a chapter like "Opa for OO dummies" where it explains what the functional equivalent of each of the myriad OO design patterns. And this should be preceded by a "Opa for procedural dummies" chapter, that explains how to replace your efficient procedural code based on hashtables or arrays with Opa code. -
Better than Google groups
http://forum.opalang.org/ It looks pretty cool, and it is based on MongoDB so it is scalable as you asked for. You can download your own instance and host it offsite. Since it is still a pilot program, a preview is available for free if you want
-
MongoDB, SchmongoDB, Opa's the real story here
As someone who has downloaded this some time back and messed with it a bit, I do have to say it's kind of slick.
I had a few complaints about it early on, but it's evolving, though. Might be worth revisiting.
-
Re:Haskell !!
For functional reactive programming and HTML5, there is Opa. It's a new, but easy-to-learn, language which is progressing pretty quickly.
-
Re:the cake is a lie
This new language exists: It's Opa!
-
Re:C for serious
You should look at Opa. Opa has C-bindings when you need them, and make writing and running applications much easier.
-
Re:Don't underestimate the "no framework" option!
Indeed, that's what we followed with the Opa language.
No framework, simple code: It's really the best way to write web apps. -
Re:Not for commercial use - AGPL
Actually it *was* dual-licence from the start. Moreover for some time MLstate offers proprietary licence for free.
-
Re:who gives a fuck about this useless platform?
Well, you may not care, but obviously some people do. Also if you rant something at least you could get your facts straight; the platform is not closed (it's open source) and it's not pay-only (the AGPL licence is free and so is the proprietary one for small and medium companies, see here and here)
-
Re:who gives a fuck about this useless platform?
Well, you may not care, but obviously some people do. Also if you rant something at least you could get your facts straight; the platform is not closed (it's open source) and it's not pay-only (the AGPL licence is free and so is the proprietary one for small and medium companies, see here and here)
-
Re:It's not a bad thing
Indeed, there already is competition in that space.
Look at Opa for instance. Or Ur/Web. But of course, Google did not want to just join and contribute to an open source project :( -
Type safety for DB is great
-
Re:Wt
inventing a new programming language for that end is unnecessary and, in fact, will become a burden
Skimming through the language ref (*), this is very much ML-oid (SML, OCaml, F#).
So it doens't seem to be "new", bizarre, or some gratutitous stupidity (like Javascript, for example).
That is, except if you haven't ever looked at these functional languages. Which means that around a decade and a half of programming language state-of-the-art tech whisked right by you.
-
Re:File Uploads?
The ultimate web language with no file uploads?
https://mlstate.com/forum/feedback_on_opa/feedback/1#5
This thread is one year old. Now, we do have an upload component in our stdlib : https://opalang.org/resources/doc/index.html#upload.opa.html/!/value_stdlib.upload.Upload
-
Re:threads
How does opa handle multiple threads of execution? Any decent server nowadays just needs to have multiple threads of execution, sometimes even thousands of them to work in a non-blocking way. Opa seems to be "non-blocking" (I read from the tutorial), but you have non-blocking and non-blocking... One version simply uses one thread and an event-loop (aka non-preemptive multitasking). This is not truly non-blocking, as large I/O operations in one task still prevent other tasks from working.
We have lightweight threads can be preempted any time they are not in (Opa) kernel mode, and rely on asynchronous I/O (epoll/kqueue/completion ports) to achieve non-blocking I/O. Does this answer your question?
And does opa allow us to control the priority of different threads?
Not at the moment.
Also, does Opa have support for fallback to the underlying systems (javascript/databases etc.)? If something is not supported by Opa (very likely in the beginning), I sure want to be able to fix it myself without having to understand all the opa internals.
I am not certain I understand the question. Does this chapter answer your question? There's the same thing server-side, of course.
Caveat I'm a member of the Opa team. Well, worse than that, I'm the architect-in-chief.
-
Re:threads
Hi StripedCow, I'm one of the guys who wrote the OPA scheduler so I'll try to answer your scheduler-related questions. It uses fibers (co-operative light threads). The compiler transforms your code to a CPS representation, so our scheduler can balance the pool of computation stuff and I/O operations (we use epoll on Linux, kqueue on Mac OS). The developer can explicitly push asynchronous tasks with a simple Scheduler.push https://opalang.org/resources/doc/index.html#scheduler.opa.html/!/value_stdlib.core.rpc.core.Scheduler.push
OPA doesn't yet offer to the developer the control of the priorities.So as you can understand, it doesn't rely on the OS-scheduler, there is only one main OS-thread for all computations and I/O clients (our scheduler does the job). A common question is how to use all cores of a multi-cores machine? Well, just launch the app one more time and use your load balancer (or use our cloud tool).
The code is open-source, scheduler included
;) -
Re:needs time
There are two reasons that GCC does not cover that kind of code. One is that the mere act of compilation (a mechanical translation of the code from one form to another) does not implicate copyright. The other is that GCC includes a specific exception for standard header files and things that it compiles or links into your code as a result of the language features you use. The Opa developers explicitly reject that approach.
-
Re:CGI.pm
I confirm, no relation to CGI.pm that I can see (and I'm the architect-in-chief for Opa). That and we offer quite a nice templating system, too.
-
Re:needs time
The developers are strongly backing a particularly virulent licence, Affero GPL. That requires that not only are the Opa tools open source, but any software you write using Opa is infected as well
.The claimed alternative is to buy a commercial licence for Opa, which lifts the open source conditions, but costs an as-yet-unconfirmed amount of money.
To my knowledge, there is no programming language that is even moderately successful today that does not have a good quality, free-as-in-beer, no-strings-attached tool chain readily available.
I suspect Opa is about to become a textbook example of a project that was be stillborn because its developers were too greedy; they're just demanding too much control over other people's work instead of too much cash.
-
Re:Which open-source license?You might want to look at the original post, and RTFA (a href=http://opalang.org/#slides=1>in particular, this slide). The "application" is a single executable, containing everything needed to run, including the data store. An additional problem is that the resulting application is itself a server, not code called by a server, so each instance of your app needs to have it's own port. Not very useful at all compared to today's setups:
http://opalang.org/resources/book/index.html#_setting_up_storage
The following command line distributes 6 instances of Hello, chat on albertson, with user jeff. Each instance will be listening to a port between 7000 et 7005 included.
opa-cloud --host jeff@albertson:7000,6 hello_chat.exeSo unless you control the physical server, including the right to run stand-alone executable content as well as use ports outside of the standard ones, forget it.
-
So here's some example code
No idea whether it's viable long-term, but I thought it's really interesting. It does way more than GWT does, for example. It's also statically typed, yay.
Here's some example code from the tutorial. This is a chat room. Apart from CSS, this is the entire soure code required to create the chat room server. Yikes. Had to get rid of the comments to appease the spam filter, unfortunately.
type message = {author: string
/**The name of the author (arbitrary string)*/
; text: string /**Content entered by the user*/}
@publish room = Network.cloud("room"): Network.network(message)
user_update(x: message) =
line = <div class="line">
<div class="user">{x.author}:</div>
<div class="message">{x.text}</div>
</div>
do Dom.transform([#conversation +<- line ])
Dom.scroll_to_bottom(#conversation)
broadcast(author) =
do Network.broadcast({~author text=Dom.get_value(#entry)}, room)
Dom.clear_value(#entry)
start() =
author = Random.string(8)
<div id=#header><div id=#logo></div></div>
<div id=#conversation onready={_ -> Network.add_callback(user_update, room)}></div>
<div id=#footer>
<input id=#entry onnewline={_ -> broadcast(author)}/>
<div class="button" onclick={_ -> broadcast(author)}>Post</div>
</div>
/* Main entry point. */
server = Server.one_page_bundle("Chat",
[@static_resource_directory("resources")],
["resources/css.css"], start) -
So here's some example code
No idea whether it's viable long-term, but I thought it's really interesting. It does way more than GWT does, for example. It's also statically typed, yay.
Here's some example code from the tutorial. This is a chat room. Apart from CSS, this is the entire soure code required to create the chat room server. Yikes. Had to get rid of the comments to appease the spam filter, unfortunately.
type message = {author: string
/**The name of the author (arbitrary string)*/
; text: string /**Content entered by the user*/}
@publish room = Network.cloud("room"): Network.network(message)
user_update(x: message) =
line = <div class="line">
<div class="user">{x.author}:</div>
<div class="message">{x.text}</div>
</div>
do Dom.transform([#conversation +<- line ])
Dom.scroll_to_bottom(#conversation)
broadcast(author) =
do Network.broadcast({~author text=Dom.get_value(#entry)}, room)
Dom.clear_value(#entry)
start() =
author = Random.string(8)
<div id=#header><div id=#logo></div></div>
<div id=#conversation onready={_ -> Network.add_callback(user_update, room)}></div>
<div id=#footer>
<input id=#entry onnewline={_ -> broadcast(author)}/>
<div class="button" onclick={_ -> broadcast(author)}>Post</div>
</div>
/* Main entry point. */
server = Server.one_page_bundle("Chat",
[@static_resource_directory("resources")],
["resources/css.css"], start) -
Re:Javascript as assembly
It depends on how cleanly it maps to Javascript's concepts. I don't really see almost anything in the core Opa language that doesn't map reasonably well to JS. It shouldn't be particularly slower than JS by itself.
-
Re:Which open-source license?AGPL 3
Probably the most important implication of AGPL is that it requires you to provide a way for your users to download the sources of the application. In fact Opa facilitates that by automatically enriching the server (in release mode) to serve the source code of the application at a special
/_internal_/src_code URL.But this is not the end of the story. We believe in free software (hence the AGPL license) but we also understand that it may not be very suitable for commercial users of Opa. Such users will be able to obtain a private license (paid). This will allow them to keep their sources closed if they wish to do so and will provide us with funds to further develop and improve Opa — win-win situation
:). If you are interested in more details about obtaining such a license, do not hesitate to contact sales@mlstate.com, where we will try to answer all your questions (including pricing).http://blog.opalang.org/2011/08/opa-license-contributions.html
-
Re:Heres mine
And this one: http://opalang.org/sdfdsfafdsfsdofndsf
-
Maybe try something new
Opa is a recently released open source technology that mixes together front-end and back-end code. See http://opalang.org/ Also, there are packages for MacOSX, which is probably your environment
;) If you can try it, I'm really curious about how easy it is for a non-programmer to learn this kind of programming language. -
A strong security foundation/front-end
Have you considered using Opa? I may be biaises on this topic (I'm a member of the Opa team), but it sounds to me like it's a very good match for your issue. It's an open-source web development platform designed for security - it's an Owasp project, btw. Among other things, it guarantees that your application is invulnerable to XSS and SQL injection, and it performs a large number of analyses on your code, on the inputs, etc. to greatly improve security.
Depending on the current status of your code, you can either use this as a foundation for the whole application, or just as a front-end.
More info on the teaser website, on my blog, or on IRC (freenode, channel #opalang).