Better HN
topnewbestaskshowjobs
Log inSign up

yosbelms

11 karma · joined Nov 12, 2015 (11y ago) · 29 submissions

Submissions

comment 6y ago · link · parent

Watchdog algorithm explained:

The Runner receivers JS code, I wrote a babel plugin [1] to insert watchdog checks inside each loop (for, while, dowhile), also in each arrow function, that checks each time a function executes.

If the check scope is async, the watchdog awaits for a Promise that resolves immediately to give the opportunity to other functions in the thread, this function collaborative, does not hijack nodejs thread, so, it is allowed to run 10 minutes default.

If the scope is not async, the nodejs thread can be hijacked, so, it is allowed to run 100 milliseconds.

The watchdog stops the function by throwing a TimeoutError if the time is consumed in each case.

Finally, a check in inserted on each `catch`, and `finally` statements for the following cases:

    try {
      // infinite loop
    } catch(e) {
      // infinite loop
    } finally {
      // infinite loop
    }
[1] https://github.com/yosbelms/remote-func/blob/master/server/f...

comment 6y ago · link · parent

Yes theres is, its name is watchdog, see https://github.com/yosbelms/remote-func/blob/master/server/w...

3.

Show HN: A library to use JavaScript as the query language for your API(dev.to ↗)

2 points · by yosbelms · 6y ago · 5 comments

4.

Show HN: React Progressive Loader(github.com ↗)

1 points · by yosbelms · 8y ago · discuss

5.

Show HN: React declarative control flow(github.com ↗)

1 points · by yosbelms · 8y ago · discuss

6.

Show HN: Crazy fast trie-based library for http routes lookup(github.com ↗)

1 points · by yosbelms · 8y ago · discuss

7.

RamdaScript has now a playground(yosbelms.github.io ↗)

1 points · by yosbelms · 9y ago · discuss

8.

Show HN: RamdaScript, Clojure-esque Lisp that compiles to Ramda.js(github.com ↗)

1 points · by yosbelms · 9y ago · discuss

comment 9y ago · link · parent

I've made a Lisp that compiles to Ramda.js, the source code is simple, http://github.com/yosbelms/ramdascript

10.

Show HN: HFactory, Small library to create Virtual DOM elements factories(github.com ↗)

3 points · by yosbelms · 10y ago · 1 comment

comment 10y ago · link · parent

Yes, js-csp is a great project. The main difference is that unlike js-csp, Getjs is bases on promises, is like a mix of co and js-csp

comment 10y ago · link · parent

Motivation:

This library started as a research project for https://github.com/yosbelms/cor. It got frozen months ago, but suddenly I got motivated after read https://medium.com/@theflapjack103/the-way-of-the-gopher-669.... This lib shows that JavaScript also owns resources to deal with concurrency.

13.

JavaScript library to express concurrency patterns(github.com ↗)

9 points · by yosbelms · 10y ago · 3 comments

14.

Show HN: Getjs, a JavaScript library to make sequential your asynchronous code(github.com ↗)

1 points · by yosbelms · 10y ago · discuss

15.

Cor 0.6.0 released

1 points · by yosbelms · 10y ago · discuss

16.

Cor takes aim at JavaScript bloat(infoworld.com ↗)

1 points · by yosbelms · 10y ago · discuss

comment 10y ago · link · parent

Most of the design of ES6 is like this due to backward compatibility. I'm very sure if the comunity behind ES6 specs designs a language for the web regardless backward compatibility, ES would be very different to what it actually is. These features you are mentioning are awesome, for sure. But ES6 is bloated for sake of having features plus backward compatibility. Cor is different, it is simple but modern, it is going in the opposite direction.

comment 10y ago · link · parent

Looking for simplicity. One of the goals of Cor is to have few keywords, to make it easy to learn, to get involved, and to work with. I had three possible solutions to solve the variable scoping problem.

1- `var` keyword. Like javascript. It assumes all variables are global if not declared with `var`. 2- `global` keyword. Like PHP. It assumes all variables are local unlike that is annotated with `global`. 3- Ruby-like, Coffeescript-like.

A mixing of options number 1 and 3 was chosen.

I will open an issue regarding this subject, considering your proposal for future versions.

comment 10y ago · link · parent

"Variable announcing" solves that issue, please see the example in the following link:

http://yosbelms.github.io/cor/docs/playground/index.html#lin...

comment 10y ago · link · parent

Release notes: http://ost.io/@yosbelms/cor/topics/5

21.

Cor 0.3.0 released(yosbelms.github.io ↗)

13 points · by yosbelms · 10y ago · 9 comments

22.

Cor 0.2.6 released(ost.io ↗)

1 points · by yosbelms · 10y ago · discuss

23.

Cor 0.1.4 is out, now with playground to toy with(yosbelms.github.io ↗)

2 points · by yosbelms · 10y ago · discuss

comment 11y ago · link · parent

You got it. Cor borrows from Go, C# and Python(its philosophy). The idea behind is to take the simplest parts of the those language syntaxes, combine it, and make a new one focused on productivity and readability.

comment 11y ago · link · parent

yes, it is possible. It is primarily designed to run in the browser.

You can use every javascript library out there, through CommonJS using "use" statement, or using globals.

comment 11y ago · link · parent

just a play on words

comment 11y ago · link · parent

A language that compiles to javascript. Focused on simplicity, productivity and organization. Designed for large application development.

28.

Show HN: Cor - the language of the web(yosbelms.github.io ↗)

4 points · by yosbelms · 11y ago · 7 comments