News for hackers. Stuff that matters.
Re:Mobl - A new open source language for mobile devices by lolizbak on Wednesday March 23, 2011 @07:31AM (#2358917)
Testing it right now, but your best use-case would be to have your OWN site developed with mobl-lang... Accessing it with a mobile device is pretty difficult. No mobile version?
Re:Mobl - A new open source language for mobile devices by davidw on Wednesday March 23, 2011 @08:41AM (#2359085)
I had a go in this space a while ago with Hecl ( http://www.hecl.org ) but I think things, sooner or later, will probably head towards Javascript. Way too many people know it, and it's already deployed everywhere.
Re:Mobl - A new open source language for mobile devices by DanielRibeiro on Wednesday March 23, 2011 @08:55AM (#2359134)
Not to mention that thera are tons[1] of great languages that compiled down to it, including but not limited to Coffeescript.

[1] https://github.com/jashkenas/coffee-script/wiki/List-of-lang...

Re:Mobl - A new open source language for mobile devices by zefhemel on Wednesday March 23, 2011 @09:03AM (#2359166)
and mobl
Re:Mobl - A new open source language for mobile devices by MatthewPhillips on Wednesday March 23, 2011 @07:45AM (#2358944)
I've been playing around with it for a few weeks. It's pretty nice. I especially like their web services api.

My complaint with it is that the documentation is sparse at this point. Whether because of that, or because of something else, the language feels claustrophobic to me, like I'm limited to the standard library.

For example, I'm not sure it's possible (or I never figured out how) to do things synchronously. Let's say you want to apply some jquery plugin to an object, but it must be done after the object exists; I'm not sure that's possible with mobl.

Re:Mobl - A new open source language for mobile devices by zefhemel on Wednesday March 23, 2011 @07:54AM (#2358970)
Documentation is definitely an issue at this point. Although it's expanding.

Not sure what you mean with your synchronous question and the "object that exists".

Re:Mobl - A new open source language for mobile devices by MatthewPhillips on Wednesday March 23, 2011 @08:13AM (#2359008)
Mobl is control-based. From what I can tell, I can't do arbitrary (javascript) logic on the DOM unless it is wrapped in a control.
Re:Mobl - A new open source language for mobile devices by zefhemel on Wednesday March 23, 2011 @08:28AM (#2359051)
right, well you can also do that from any piece of logic using the JQuery API, if you have to: http://docs.mobl-lang.org/mobl/JQuery
Re:Mobl - A new open source language for mobile devices by MatthewPhillips on Wednesday March 23, 2011 @09:45AM (#2359314)
That example has the logic being performed from an event callback. How can I perform logic when a control is created? For example, I want to insert some html div into the DOM, then instantiate some jquery plugin on the inserted div. I have tried this and the compiler complained. I'm sure I'm doing it wrong but the documentation doesn't help. For example

screen root() {

  header("Title")

  $("#div").someplugin();
}

Can't do that. I tried to get around this by creating a control, but from what I can tell controls return html, not objects.

Re:Mobl - A new open source language for mobile devices by Zef on Thursday March 24, 2011 @02:30AM (#2363100)
Not sure this is the place for it (maybe ask on the google group?) But there's two ways:

screen root() { mydiv@<div/> script { mydiv.someplugin(); } }

mydiv will be bound to a JQuery object representing the div. You can also just do this:

screen root() { script { $("#div").someplugin(); } }

So generally your answer is: put it in a script { ... } block.

Re:Mobl - A new open source language for mobile devices by jrnkntl on Wednesday March 23, 2011 @06:46AM (#2358838)
Another language to learn? What is the problem in using Phonegap to accomplish the same?
Re:Mobl - A new open source language for mobile devices by Zef on Wednesday March 23, 2011 @07:36AM (#2358928)
Generate your mobile web application using mobl. Then wrap it as a PhoneGap native app. They're complementary.
Re:Mobl - A new open source language for mobile devices by tluyben2 on Wednesday March 23, 2011 @10:08AM (#2359409)
Did anyone try this; seems like a cool option?
Re:Mobl - A new open source language for mobile devices by zefhemel on Wednesday March 23, 2011 @10:50AM (#2359613)
I experimented with it. Works fine. There's an ongoing effort to also wrap the PhoneGap-specific APIs (such as camera, contacts) as mobl libraries: https://github.com/mobl/mobl-lib/tree/master/phonegap
Re:Mobl - A new open source language for mobile devices by MatthewPhillips on Wednesday March 23, 2011 @07:48AM (#2358951)
You write mobl apps in just mobl. You don't write any css, js, or html. It compiles to those. Phonegap just deploys already written web apps.
Re:Mobl - A new open source language for mobile devices by rgbrgb on Wednesday March 23, 2011 @08:48PM (#2362257)
"syntax similar to Javascript"

I kind of choked when I read that. Why would you ever do such a thing?

Re:Mobl - A new open source language for mobile devices by clojurerocks on Wednesday March 23, 2011 @09:34AM (#2359273)
Hello. Can you compare this to whats already out there? Meaning PhoneGap Rhomobile and Appcelarator?