Hacker Newsnew | past | comments | ask | show | jobs | submit | mfourcade's commentslogin

pure gold ! I think bataille of the Marne starts in episode 2. https://www.dancarlin.com/product/hardcore-history-51-bluepr...


beware before using fibers because it won't access Thread.current[:vars].

So if you plan on going with fiber on an existing app, double check first if Thread.current[:vars] is a must have for you & you dependencies (ex: the I18n gem


Are you sure about that ? If you search `Ruby Thread Locals are also Fiber-Local` there will be a blog post from 2012 about that, and the code sample works fine for me on ruby 2.5


I'm sorry, my previous comment was not clear. I should have written beware before using fibers because it won't access Thread.current[:vars] _as you might expect_.

Here is an example:

  fiber = Fiber.new do # Thread.current locals are copied to the Fiber when fiber it is built
    puts "1. #{Thread.current[:test]}" 
    Thread.current[:test] = false # the fiber has it's own stack, won't leak away
    puts "2. #{Thread.current[:test]}"
  end

  Thread.current[:test] = true
  fiber.resume

  puts "3. #{Thread.current[:test]}"

Output:

  1. 
  2. false
  3. true

So fibers comes with their _own stack_, including threads locals, yes, but from _when_ you instantiated them. Not from Thread.current :/ Also writing Thread.current[] won't apply outside the Fiber.

I was confused, and not alone: https://github.com/rails/rails/pull/30361.

So my conclusion about Fiber is always be careful with Fiber / Thread.current.

edit: style/explanation


US ±100 years ago: "If we will not endure a king as a political power we should not endure a king over the production, transportation, and sale of any of the necessaries of life." ( https://en.wikipedia.org/wiki/History_of_United_States_antit... )

Feels like AMZN is becoming a political power, a king of production, transporation and sale... Is it too big ?

Any risk Trump answers with a New Deal à la Roosevelt ?


Was the US an european colony? With people speaking French, English, Spanish and Portuguese? I guess it was a mix and match of many human being that decided to be free : no more, no less. Freedom was the driver, not the enemy.

Also maybe you should consider the actual state of US : What's the percentage of english/spanish people speaking? What about Catholics/Jews/Muslim? Should we expect an USbreak ?

Saying that, I do not believe that we need a common enemy to be united. There is better values and challenges for all of us : environment, peace, love. Europe will stand strong, refine its vision to the current context. After a few years, UK we be back and we will all make love peacefully in a better environment.

Long live to Europe.


Actually German came very close to being an official language of the USA at one point.



Love it!

Reviews of my peers are great inputs to validate my interest with add-ons!


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: