luismgz's comments

luismgz | 14 years ago | on: Dart programming language design

My first reaction to Dart was "jeez, yet another c-like, java[script] clone". I hated it, I want a world without stupid braces and semicolons. It doesn't seem to bring anything new to the table and it looks exactly like java, c#, javascript, etc... and exactly for the same reasons (to be familiar for the average programmer). Syntactically, it's dull and unexciting. However, on a second thought, I changed my mind a bit. Like it or not, it has to be this way to gain wide adoption and, indeed, anyone with experience in java or javascript can get productive in no time with Dart. But what's really interesting is the snaphot feature. Dart will load in milisecons in the browser, making startup times irrelevant. It's also designed with performance in mind, and it will have some features that will make it ideal for large code basis and team work.

As for its boring syntax, this won't be a problem. Coffeescript demonstrated that you can target a messy language and make it beatiful and fun. Dart already has a "transpiler" for compiling it down to javascript. If Dart becomes a good compilation target (and it looks so), people will start wrting their own transpilers targeting Dart. The best of both worlds. As for the concerns about the null chance of other browsers adopting Dart, this is a battle they can't win. Dart will run everywhere, either on its own VM or compiled to javascript. And it will lead to a situation where new applications run on every browser, but "work best on Chrome". How long will the other vendors keep on pushing a mediocre, substandard language such as javascript when Dart is already making developers lives easier, and applications faster and better?

luismgz | 14 years ago | on: PyPy 1.6 Released - Full Python 2.7.1 Implementation

> I wish something similar could be developed for Ruby.

There's something like Pypy for Ruby already: It is Pypy itself. Pypy is a framework for implementing jitted dynamic languages (any language, not just python). You can generate interpreters for any language you want, as long as you write them in Rpython (restricted python). So, if you want a pypy for Ruby, just write a ruby interpreter in Rpython, and then use the pypy translation toolchain to compile it down to C, while automatically generating a just in time compiler for free.

luismgz | 14 years ago | on: So you want to write a fast Python?

1) Is the JIT standalone? No easy answer. Pypy is a complex project, not just a python implementation. Pypy is a complex toolchain, a framework, for implementing dynamic languages. With pypy, you could write your own implementation of ruby, scheme, php, whatever... And once your interpreter is complete, pypy will generate the JIT automatically for you (you won't need to implement it yourself, you just have to write the interpreter, and pypy will do the rest). Pypy is writen in Rpython (restricted python) but you can implement any vm with it, for any language you may want.

2) How does it compare to c? It's pretty competitive in highly algorithmic code, cpu intensive and numerical tasks. For anything else, it depends. Overall, it on average up to 4 times faster than regular python.

3) Why there's still a difference? Pypy is a work in progress. You should compare it to other projects such as v8 or tracemonkey.

4) Restricted python: It's the static subset of python used to implement pypy. It takes the place of c in cpython. Yes, it's much faster, but also more limited and less flexible. It's nicer than c, but not as cool as full python. You can also find Shedskin and Cython. Shedskin is a true static subset of python that compiles to c++. Cython is a python-like language that adds type declarations to the language to make it closer to c.

Unladen Swallow was a separate project and it's dead now. Psyco is the predecessor of pypy. It is no longer maintained.

luismgz | 14 years ago | on: Poll: Have you moved from JavaScript to CoffeeScript?

I love cs with all my heart. It makes client-side programming fun and enjoyable. It made me forget my dream of having someday python running in the browser. Cs is just as good. My only criticism is that sometimes, leaving out parens mames the code hard to decipher. I feel that explicit parenthesis make everything clear, but that's probably because I come from python...

luismgz | 14 years ago | on: Poll: Have you moved from JavaScript to CoffeeScript?

Now seriously, it's not just the way it looks. If you never spent at least half an hour playing with a language such as python or ruby, you will probably never know what is it that makes programmers all warm and fussy about their languages. Just take a look at array comprehensions (or list comprehensions in python) to know how succint and powerful they are, and how much clear the code looks. It's about replacing four or more lines of js with just one, readable line of coffeescript (or python).

It's all about power, flexibility, succintness and readability, all things that make programming more enjoyable and fun.

luismgz | 14 years ago | on: Poll: Have you moved from JavaScript to CoffeeScript?

What's the problem with the extra compilation step? You can simple use coffeescript by adding "script type=text/coffeescript" tags to your code while developing, and when you are done, just compile and deploy. Or you can simply authomate the task (google for instructions).

luismgz | 14 years ago | on: Poll: Have you moved from JavaScript to CoffeeScript?

Dude, this poll is useless. If someone is voting here, chances are that he was looking for info on coffeescript, so he is already aware of this slanguage and is interest in it. The rest of mankind may not know wtf is coffeescript...

luismgz | 14 years ago | on: Ask HN: Any alternative to JavaScript in sight?

Not just a hack. Recognized developers such as Brendan Eich (creator of javascript) or Douglas Crockford (author of Javascript: The Good Parts) say that Coffeescript is good stuff. Coffeescript is a "transpiler", a source-to-source compiler wich translates a high level, very flexible and powerfull language such as coffeescript into plain old javascript. It doesn't change the underlying language at all, it keeps its object model and its data types. It just adds a more expressive and succinct syntax, inspired in python and ruby (and these languages have a very well deserved reputation for expressiveness and joy amongst programmers for a reason).

luismgz | 16 years ago | on: Facebook speeds up PHP

I agree with Mike Pall's view. And the current crop of Javascript engines proves that too. Simplicity wins over complexity.

Although I still hope pypy will deliver on its promisses. We have to bear in mind that pypy's goal is not just enhanced speed. Its goals are much broader and this is one reason why, perhaps, this is not the best approach if you want full speed (there are trade offs which seem acceptable considering all the other benefits, such as easier of implementation of dynamic languages on top of pypy's framework).

luismgz | 16 years ago | on: PEP 3146: Merge Unladen Swallow into CPython

Very simple: this is a PEP to improve the state of "Cpython" (this is the main python implementation right now, and has been since the invention of python).

Pypy, on the other hand, is a new implementation of Python (just like ironpython or jython), and it could eventually replace cpython in the future if it proves to be succesfull (although it would be a long way off).

In few words: Python, the language, have many implementations. Cpython is the current reference one. Unladen Swallow aims to improve it, not to replace it. Actually, even the US developers acknowledge that Pypy (or any other succesfull implementation that may come up) is the future, because it doesn't have to bear the burden imposed by the c platform.

page 1