News for hackers. Stuff that matters.
Re:ArcLite - Arc Ported to JavaScript by hvs on Wednesday February 03, 2010 @06:33PM (#1099249)
Along these lines, it would be cool if browsers supported some sort of "LispScript" (or at least "SchemeScript"). I hate JavaScript with a passion. This is all just wishful thinking, of course.

And yes, there is a LispScript project, but it compiles to JavaScript. I'm thinking more of a native interpreter in the browser.

Re:ArcLite - Arc Ported to JavaScript by catch23 on Wednesday February 03, 2010 @07:22PM (#1099350)
I think most people who "hate javascript", dislike working with the DOM, is that true for you? I personally think javascript is a pretty simple & beautiful language. It has its warts, but so does ruby, python, and other dynamic languages.
Re:ArcLite - Arc Ported to JavaScript by hvs on Wednesday February 03, 2010 @08:21PM (#1099479)
Yes I dislike the DOM. Maybe I it's that JS is TOO simple (or not simple enough?). I find myself having to constantly match brackets and braces. And the browsers provide little help in the area of syntax checking.

Yes, I'm aware of Firebug; it's nice (although it seems to have gotten buggier).

Re:ArcLite - Arc Ported to JavaScript by aaronblohowiak on Wednesday February 03, 2010 @10:33PM (#1099681)
Matching brackets and braces? Your editor should do more for you.
Re:ArcLite - Arc Ported to JavaScript by catch23 on Thursday February 04, 2010 @01:46AM (#1100006)
You should try Webkit's debugger (and not chrome's). It's fast and stable. Chrome's debugger is getting there, but is still missing some basic stuff compared to webkit/firebug.

I rarely find syntax a problem though -- javascript syntax is pretty simple. You could probably write a javascript parser in one day, but it would probably take you a month to write a ruby parser.

Re:ArcLite - Arc Ported to JavaScript by lsb on Wednesday February 03, 2010 @08:29PM (#1099492)
Prototype (like jQuery) has really easy DOM access. $$("div.className[attributeName=value]").pluck("innerHTML") does what you expect.
Re:ArcLite - Arc Ported to JavaScript by heat_miser on Thursday February 04, 2010 @01:30PM (#1101190)
I do wish more IDEs would integrate JSLint. I even put it into my iPhone PHP IDE Mides.
Re:ArcLite - Arc Ported to JavaScript by pmjordan on Thursday February 04, 2010 @07:18AM (#1100345)
You could try JSlint for syntax checking.
Re:ArcLite - Arc Ported to JavaScript by amock on Wednesday February 03, 2010 @07:04PM (#1099321)
What's wrong with compiling to JavaScript? It's already widely supported and if you're compiling another language to it you can pretend like it doesn't exist.

I can understand not liking JavaScript, but hating it with a passion seems excessive. Do you really hate JavaScript or just having to deal with the issues of incompatible browsers? I prefer languages like Haskell that enforce strong static typing, but as far as runtime typed languages go I think JavaScript is pretty nice.

Re:ArcLite - Arc Ported to JavaScript by hvs on Wednesday February 03, 2010 @08:23PM (#1099483)
I guess I would be concerned about compiling to JS because you're adding another layer of abstraction on an already fussy language (when being interpreted by the browser). It's hard enough to find bugs as it is.

I'm a big fan of Haskell, too. The type system alone makes it a wonderful language to work in.

Re:ArcLite - Arc Ported to JavaScript by jjs on Wednesday February 03, 2010 @09:22PM (#1099580)
I guess I would be concerned about compiling to JS because you're adding another layer of abstraction on an already fussy language (when being interpreted by the browser). It's hard enough to find bugs as it is.

On the other hand, mechanically generating the code you've abstracted away will make sure you only get the same bugs every time. ;)

Re:ArcLite - Arc Ported to JavaScript by ynniv on Wednesday February 03, 2010 @09:53PM (#1099631)
JavaScript was based on Scheme with a "C-like" syntax to make it more widely appealing, so spiritually JavaScript is LispScript. More to your point, other browser scripting languages have been done and already failed. IE supports VBScript, Firefox could at one point support Python via an extension. The reality is that browser implementors want to support all sorts of things, but the only ones that matter are those that are supported in all browsers. Since you cannot create a new browser without supporting JavaScript, and JavaScript solves the code problem, it is the only language that will ever be used in browsers.

Which leads into the second question: whats wrong with compiling to JavaScript? Compilation is historically (outside of a VM) the only way to write portable code. Most compiled languages have a toolchain that covers compiling, profiling, and debugging, and there is no reason to assume that a language compiled to JavaScript could not have these as well (ex an external profiler might look like dynaTrace Ajax).

You might not like JavaScript, but its all we're going to get. Most people don't like programming x86 assembly, but I don't see them complaining that CPUs need to support a different assembly language.

Re:ArcLite - Arc Ported to JavaScript by revorad on Wednesday February 03, 2010 @07:18PM (#1099342)
I hate JavaScript with a passion.

Pray tell us, why?

Re:ArcLite - Arc Ported to JavaScript by hvs on Wednesday February 03, 2010 @08:18PM (#1099472)
OK, maybe that's not fair. I hate the browsers' implementations of it for sure, but I'm also not a fan of prototype-based OO systems, either.
Re:ArcLite - Arc Ported to JavaScript by iamwil on Wednesday February 03, 2010 @08:06PM (#1099442)
though I dislike having to type function() { and }); all the time, and scoping rules are a bit confusing, I've rather gotten use to it. Maybe you should read, "Javascript, the Good Parts"

http://ejohn.org/apps/learn/ Resig's js tutorial also helped hammer in why people like js and what's so special about it.

Re:ArcLite - Arc Ported to JavaScript by hvs on Wednesday February 03, 2010 @08:19PM (#1099473)
Thanks for the pointers. I really dislike the scoping rules, and prototypes.
Re:ArcLite - Arc Ported to JavaScript by blasdel on Wednesday February 03, 2010 @07:38PM (#1099382)
You do realize that JavaScript was originally named LiveScript before the marketing goons licensed the name and added the curly braces?
Re:ArcLite - Arc Ported to JavaScript by hvs on Wednesday February 03, 2010 @08:16PM (#1099467)
Yeah, and now it is technically called ECMAScript as well. No marketing types had anything to do with that one! :)