Better HN
topnewbestaskshowjobs
Log inSign up

lsm

141 karma · joined Nov 27, 2014 (12y ago) · 30 submissions

Submissions

1.

Ask HN: What do you think about React Hooks?

9 points · by lsm · 8y ago · 6 comments

comment 8y ago · link · parent

30 seconds Gif demo:

https://github.com/lsm/alfa/blob/master/docs/alfa.gif

3.

Alfa: An Alternative to Redux or Mobx(github.com ↗)

2 points · by lsm · 8y ago · 2 comments

comment 8y ago · link · parent

That's very true. So the evil is not Chrome then :)

comment 8y ago · link · parent

History of people attempting to charge for using a browser?

comment 8y ago · link · parent

I’m using that too. Also try the new opera

comment 8y ago · link · parent

But, the Chrome does have better UX than Firefox.

8.

Ask HN: Since Chrome is Evil would you like to pay for a browser?

4 points · by lsm · 8y ago · 11 comments

9.

Ask HN: Do You Believe in Decentralized Apps and Why?

6 points · by lsm · 8y ago · 3 comments

10.

Blockchain White Papers(github.com ↗)

2 points · by lsm · 8y ago · discuss

11.

Learn Go by Examples(github.com ↗)

3 points · by lsm · 8y ago · discuss

12.

Fix Firefox dark text input on Ubuntu 18 with dark themes(medium.com ↗)

2 points · by lsm · 8y ago · discuss

13.

Divide and Conquer(idiallo.com ↗)

1 points · by lsm · 8y ago · discuss

comment 8y ago · link · parent

The GitHub repo is here: https://github.com/lsm/alfa

15.

Effortless React State Management(lsm.github.io ↗)

1 points · by lsm · 8y ago · 1 comment

16.

Duti – A bot to fix your PR issues automatically(github.com ↗)

1 points · by lsm · 9y ago · discuss

17.

GPU MINING IS OVERHYPED(youtube.com ↗)

3 points · by lsm · 9y ago · discuss

18.

The guy who stopped a global cyberattack has been banned from the internet(theoutline.com ↗)

3 points · by lsm · 9y ago · discuss

19.

A New Way for React State Management(github.com ↗)

3 points · by lsm · 9y ago · 1 comment

20.

'Get good at' failure(businessinsider.com ↗)

1 points · by lsm · 9y ago · discuss

comment 10y ago · link · parent

I think the main confusion is the callback thing as you can feed a function to get the returned result or emit an event and using another function somewhere else to receive that result. Javascript was designed for browser (GUI) which means its main job was to handle users' actions. So the event system was invented to decouple the "triggers" from the "actions". You can implement the exactly same paradigm in any other languages (actually a lot of GUI SDKs have equivalent facility). And if treat the callback as the return in other languages then everything would be clear.

The conclusion is 1. Throw an exception (which will stop the programm) if it's a programming error. 2. Handle it in place using callback just like you return the error code in other language if that's an operational error (e.g. user didn't input password when login). Emit an error event is really a special case of the callback when you want to handle error somewhere else (maybe globally).

So I think the article is more about when to "throw an exception" vs "return the error" if you take out those javascript special juices.

22.

Error Handling in Node.js(joyent.com ↗)

151 points · by lsm · 10y ago · 91 comments

comment 10y ago · link · parent

Be patient guys. Good things come to those who wait.

comment 11y ago · link · parent

I agree, the consistency problems should be handled inside each individual services and the layer before all the services should be as simple as normal balancer.

comment 11y ago · link · parent

Really good suggestion for the API doc. I admit that writing documentation is much harder than code;)

comment 11y ago · link · parent

There's a naive zmq RPC adapter here: https://github.com/lsm/micromono/blob/master/lib/rpc/zmq.js

Very buggy especially when clients disconnect/reconnect. But, it's good starting point if you are interested.

comment 11y ago · link · parent

Yes, you got the idea. We focus on providing developer the "ability to switch or mix between microservice and monolithic styles" so people get flexibility they need for different circumstances (e.g. development vs deployment vs testing).

comment 11y ago · link · parent

When you will support other vendors?

29.

Docker Misconceptions(valdhaus.co ↗)

76 points · by lsm · 11y ago · 20 comments