Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
lucio
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
53 ms
·
481.
▲
by
lucio
12y ago
"This mentality amounted to a “disease” in German war ... Germany built radical weapons that would fail to turn the tide against an inevitable defeat brought about by larger economic, political and technological disadvantages." Lu
482.
▲
by
lucio
12y ago
Same here, and that's why I still use "n" as for loop variable. http://en.wikipedia.org/wiki/File:ZX_Spectrum%2B.jpg
483.
▲
by
lucio
13y ago
Desk: two sawhorses tables, + view on the left, + view on the right. Shared via G+ because we hipsters love dead technologies ;) https://plus.google.com/photos/118392785163397399948/albums/...
484.
▲
by
lucio
13y ago
Try BTSync
485.
▲
by
lucio
13y ago
Seems to be straight from The Onion
486.
▲
by
lucio
13y ago
http://in.tecnogob.com/cpus something similar, for CPUs, using D3
487.
▲
by
lucio
13y ago
constructive criticism: I'm a git user, but, if you need D3 graphics to explain a svc... can we at least accept that git concepts are not intuitive?
488.
▲
by
lucio
13y ago
Not exactly the same. LiteScript uses ES6-generators, handling also try/catch and making a readable js output code.
489.
▲
by
lucio
13y ago
Great questions!, I guess I didn't express myself correctly. I meant: LiteScript is designed with the Grammar https://github.com/luciotato/LiteScript/blob/master/source/G... separated from the
490.
▲
by
lucio
13y ago
I knew that dimension of 'literate'. LiteScript allows you to "lay out your code for narrative flow regardless of how the compiler needs your code to be sequenced" ..by not requiring a specific sequence. You can start wi
491.
▲
by
lucio
13y ago
I guess it depends on the size of the project. I've reached a point, in pure js projects, at which refactoring code was too risky. It's too easy to introduce subtle bugs in pure js, just with a typo. After hours lost debugging js
492.
▲
by
lucio
13y ago
That's the result of compiling https://github.com/luciotato/LiteScript/tree/master/devel/so...
493.
▲
by
lucio
13y ago
Javascript itself it's not too hard to compile to C. The LiteScript added value will be to be able to test & debug as js, and then compile to C for production (adding all the boilerplate required for a nodejs extension). The only
494.
▲
by
lucio
13y ago
today it depends on --harmony (only for "yield"), but it is trivial to add an option to use node-fibers instead (same functionality of ES6-generators for node>=v0.8). See https://github.com/luciotato/waitfo
495.
▲
by
lucio
13y ago
to HN readers: I can make LiteScript compile to PHP or C. To PHP: If you have only PHP in your hosting, you can have LiteScript source and compile for node.js or PHP. To C: (node native module/nginx module), when you need a ultra-fast
496.
▲
by
lucio
13y ago
1. Type guessing: - if you have a "class Token" and later do "var token", the type is guessed by name affinity. - if you do: token = .getToken() other = token the type of "other" is guessed from as
497.
▲
by
lucio
13y ago
The compiler is PEG-based, very easy to extend. Check the grammar: https://github.com/luciotato/LiteScript/blob/master/source/G...
498.
▲
by
lucio
13y ago
1. There's a compiler validation phase, it guess types from definitions and assignments, and will caught typos in object properties, saving hours of debugging subtle bugs. 2. No callback hell while keeping async programming ("yiel
499.
▲
Show HN: LiteScript
(luciotato.github.io)
76 points
by
lucio
13y ago
|
68 comments
500.
▲
by
lucio
13y ago
the compiler works fine with node-stable (v0.10.26), but if you wan to use "nice functions", "yield parallel map", etc, you'll have to run the compiled .js with node >= v0.11.9 with --harmony flag, to enable &qu
501.
▲
Keep your coder’s mind at full speed: avoid mental branch mispredictions
(luciotato.svbtle.com)
2 points
by
lucio
13y ago
|
2 comments
502.
▲
LiteScript is Literate. A highly-readable language that compiles to JavaScript.
(github.com)
2 points
by
lucio
13y ago
|
0 comments
503.
▲
by
lucio
13y ago
no, Object.create() creates the object and sets __proto__ but it does not call the function. "new" also calls the function.
504.
▲
Wait.for-ES6: End of Callback Hell, by ES6-Harmony generators (bleeding edge)
(github.com)
1 points
by
lucio
13y ago
|
0 comments
505.
▲
by
lucio
13y ago
It's not 'disguised', it's abstracted . launchFiber does what it's name implies: launchs a fiber. How it is achieved 'internally', it's irrelevant as long the abstraction is not leaky. Today launc
506.
▲
by
lucio
13y ago
- syntax - wait.for it's simpler - wait.for uses try/catch I don't know async.series deeply, but, ¿how do you use results from the first function on the second or third? wait.for: try{ data = wait.for(function1);
507.
▲
by
lucio
13y ago
node-fibers is under the hood, and works on the actual node stable. I hope ES6 generators -when stable- will provide similar tools, so wait.for will be based on ES6 generators.
508.
▲
by
lucio
13y ago
Fiber() is under the hood, and I hope ES6 generators -when stable- will provide similar tools, so wait.for could be based on ES6 generators. You don't have to wrap all your code in a call to `Fiber()` full classic node-server sample:
509.
▲
by
lucio
13y ago
-pseudo code- function wait.for ( asyncFn, params ) { //call the async fn, returns immediately asyncFn(params, function(err,data){ //here the data is ready thisFiber.err = err;
510.
▲
by
lucio
13y ago
wait.for, waits for fs.readfile to callback, and returns "data" from callback(err,data) wait.for(fs.readfile,'/etc/passwd') == fs.readfileSync('/etc/passwd') wait.for allows you to call any
More ›