Better HN
topnewbestaskshowjobs
Log inSign up

afri

75 karma · joined Apr 30, 2010 (16y ago) · 14 submissions

@alexfritze
Submissions

comment 11y ago · link · parent

I think there are a couple of problems:

1 - SJS effectively 'solves' the concurrency problem, but it is not a problem that is on the top of most people's mind when they write an application. To a first approximation, the concurrency problem in JS looks "solved" to people already (promises, generators, etc), and it is only when you get down to it and look at it in detail you see that SJS is actually a substantially more complete solution to the problem.

2 - Many people see it as a 'cute' solution that doesn't scale to big applications. To counter that point we've developed a complete SJS client/server framework - https://conductance.io - and are writing big complicated apps on it (such as http://magic-angle.com/ ). It's still rough around the edges, but we're pretty confident that the upcoming release (scheduled for end March) will show just how powerful the SJS paradigm is. There is a presentation on it here: http://www.infoq.com/presentations/real-time-app-stratified-...

Disclaimer: I work on SJS!

2.

Comparing React and Conductance code(conductance.io ↗)

3 points · by afri · 12y ago · discuss

3.

HTML5 photobooth with live gallery in 250 lines of Stratified JavaScript code(conductance.io ↗)

1 points · by afri · 12y ago · discuss

4.

Stratified JavaScript 0.14: Ruby-style blocks, arrows, doubledot, quasis & more(stratifiedjs.org ↗)

2 points · by afri · 13y ago · discuss

5.

Web Worker Concurrency with StratifiedJS(onilabs.com ↗)

1 points · by afri · 14y ago · discuss

comment 14y ago · link · parent

Ah, this is one of the clever bits of StratifiedJS which differentiates it from a lot of the other async extensions out there.

In the case you describe the CNN request will automatically be cancelled by honoring any try/finally or try/retract clauses in the http.get function. (try/retract is a new SJS thing). To see how cancellation/retraction works check out the slides starting at http://onilabs.com/presentations/ugent/cancellation.html .

7.

Continuations in NodeJS(willconant.tumblr.com ↗)

7 points · by afri · 15y ago · discuss

8.

Three Routes to Spaghetti-Free Javascript(zef.me ↗)

60 points · by afri · 15y ago · 15 comments

comment 15y ago · link · parent

(Disclaimer: I work on StratifiedJS)

The point about not being able to use 'normal' JS debugging facilities with StratifiedJS (or other 'higher-level' languages compiling to JS) is certainly true, but IMO it is not nearly as bad as it sounds.

Debugging highly asynchronous programs (whether written in 'straight' JS or in a higher-level language) with a 'normal' JS debugger isn't really much help: the callstacks that the debugger spits out in no way correlate to the asynchronous actions that are going on.

Having an abstraction that sits on top of JS, as it is the case with StratifiedJS, gives us the opportunity to write a debugger that spits out stack traces that actually reflect the true causal state of your program logic.

Granted, we don't have such a debugger yet, but we will in the not-too-distant future. What is already working is that StratifiedJS will amend exceptions with the correct linenumber and module name of the original StratifiedJS sources that threw the exception. So you don't have to manually correlate the generated source code with the original SJS source code, like you would need to do in systems that do a more or less 1-to-1 translation to JS.

10.

Stratifying asynchronous storage(onilabs.com ↗)

6 points · by afri · 15y ago · discuss

11.

Fork-A-Twitter-Client: Pure client-side Twitter, StratifiedJS(fatc.onilabs.com ↗)

2 points · by afri · 16y ago · discuss

comment 16y ago · link · parent

Yes, Oni Apollo is open-source, and you've got the right repository. The assembled library, oni-apollo.js, is composed of a whole bunch of different bits and pieces and tools which we'll all be publishing on github eventually. It will take a bit of time, so please bear with us. The source code for the built-in modules is already there, see http://github.com/onilabs/apollo/tree/master/src/modules/ .

13.

Oni Apollo: Stratified JavaScript library(onilabs.com ↗)

3 points · by afri · 16y ago · 3 comments

comment 16y ago · link · parent

Delimited continuations look interesting. I'd be curious if you could implement something like SJS's ALT operator ('@') with them:

A@B follows both branches A and B simultaneously and, as soon as either one of them returns, it cancels the other one. Cancellation means that the 'losing' branch gets a chance at cleaning up after itself (close sockets, remove ui, etc) and then gets abandoned.

(Disclaimer: I work on SJS)