N
Nathan LeClaire
nathanleclaire.com · Personal blog · on HN since 2013
Nathan LeClaire, a developer, writes practical tutorials on Go, AngularJS, git, and Docker.
What HN saysHN links it for hands-on Go and JavaScript tips, such as map iteration order, and for a review of Sails.js.
45HN people shared it
4linked it in comments
69stories submitted
650story points
3 years agolast shared
2013people per year2026
Most-shared posts
- 1AngularJS Antipatterns and Pitfalls5 people · 19 points · first shared 2014 · 5 comments on HN
- 2Want to work with databases in Golang? Let’s try some gorp.4 people · 12 points · first shared 2013 · discussion on HN
- 3How to Unit Test Controllers In AngularJS Without Setting Your Hair On Fire3 people · 57 points · first shared 2013 · 7 comments on HN
- 4Go’s map iteration order is random3 people · 47 points · first shared 2014 · 55 comments on HN
- 5Don't Be Scared of git rebase3 people · 6 points · first shared 2014 · discussion on HN
- 6The Good, The Bad, and The Ugly of Sails.js, Realtime JavaScript MVC Framework3 people · 4 points · first shared 2013 · discussion on HN
- 7How to Wait for All Goroutines to Finish Executing Before Continuing3 people · 3 points · first shared 2014 · discussion on HN
- 8Interfaces and Composition for Effective Unit Testing in Golang3 people · 3 points · first shared 2015 · discussion on HN
- 9The (JavaScript) Question I Bombed In An Interview With a Y Combinator Startup2 people · 46 points · first shared 2013 · 62 comments on HN
- 10Cool Unix Hacks For Fun and Productivity2 people · 14 points · first shared 2013 · 5 comments on HN
- 11Demystifying Golang's io.Reader and io.Writer Interfaces2 people · 10 points · first shared 2014 · discussion on HN
- 12Automating Docker Logging: ElasticSearch, Logstash, Kibana, and Logspout2 people · 7 points · first shared 2015 · discussion on HN
- 13Banging Your Head Against an AngularJS Issue? Try This2 people · 5 points · first shared 2014 · 1 comments on HN
- 14What is this Docker thing that everyone is so hyped about?2 people · 4 points · first shared 2014 · 2 comments on HN
- 154 Smooth AngularJS Application Tips2 people · 4 points · first shared 2014 · discussion on HN
What HN people wrote when they linked it
methehack · 2015-02-28
Cool! Thanks for the offer to answer further questions. When I google for sails, as you're probably aware, I come across this article from more than a year ago:
http://nathanleclaire.com/blog/2013/12/28/the-good-the-bad-and-the-ugl…
It's a "good, bad, ugly" article, but it's old. Care to comment on any of the issues mentioned in the "bad and ugly" parts. Specifically, I wonder about the (alleged, possibly old) lack of Waterline ORM support for associations / relational data.
I'm hoping that's a softball question. I love seeing new approaches succeed!
lloeki · 2018-03-29
> They already took a few steps inside of Go to try to ensure that concurrency is quite non-deterministic
I would not be surprised as they are already proactively ensuring things like map ordering are randomised so that people just can't rely on some deterministic ordering: run the example code here[0] multiple times and it produces not just a seemingly random result (as would be for a typical hash table) but a truly different result for each run.
[0]: https://nathanleclaire.com/blog/2014/04/27/a-surprising-feature-of-gol…
unscaled · 2017-01-12
You can acheive some composability (e.g. easily awaiting multiple events) by having first-class values for the coroutines/green-threads themselves. This is what greenlet/gevent does, and it's rather pleasant to use. Try doing something like gevent.joinall() on Go though.
https://nathanleclaire.com/blog/2014/02/15/how-to-wait-for-all-gorouti…
Not fun.
The other problem is that even with gevent, what you get is a first-class _coroutine_, not a first class class _continuation_. You have to actually spawn new coroutines (creating new stacks and going through sometimes unnecessary scheduler hoops) to get a first-class coroutine out of a possibly blocking function.
Again, I'm not saying you can't do something like gevent.joinall(gevent.spawn(foo()), gevent.spawn(bar()), but:
1. Many languages don't support this (including Go and Lua, AFAIK).
2. It comes with its own tradeoffs again.
hinkley · 2016-07-29
Two separate issues.
Yes, you can capture runtime secrets in your layers, but it's pretty obvious to everyone when you're doing that and usually people clue in pretty quickly that this isn't going to work.
Build time secrets are a whole other kettle of fish and a big unsolved problem that the Docker team doesn't seem to want to own. If you have a proxy or a module repository (eg, Artifactory) with authentication you're basically screwed.
If you only had to deal with production issues there are a few obvious ways to fix this, like changing the order of your image builds to do more work prior to building your image (eg, in your project's build scripts), but then you have a situation where your build-compile-deploy-test cycle is terrible.
Which would also be pretty easy to fix if Docker weren't so opinionated about symbolic links and volumes. So at the end of the day you have security-minded folks closing tickets to fix these problems one way, and you have a different set that won't provide security concessions in the name of repeatability (which might be understandable if one of their own hadn't so famously asserted the opposite http://nathanleclaire.com/blog/2014/09/29/the-dockerfile-is-not-the-so… )
I like Docker, but I now understand why the CoreOS guys split off and started building their own tools, like rkt. It's too bad their stuff is such an ergonomics disaster. Feature bingo isn't why Docker is popular. It's because it's stupid…