HNHacker News
TopNewBestAskShowJobs

chucksmash

2,817 karma · joined December 16, 2014

submissionscomments
chucksmash··on What the interns have wrought, 2018 edition
Also the original Rust compiler was written in OCaml and the language draws inspiration from the same.

Also (perhaps this is encompassed by your statement already) there is ReasonML[0]. Switching over from the JS Quickstart to the OCaml Quickstart, one finds the very first line:

> Since Reason is just another syntax for OCaml, [...]

Side note: just finished a small project in ReasonML and it was a lovely experience. As someone who has been using Flow for gradually typed JS for a while now, I would totally recommend at least playing with it.

[0]: https://reasonml.github.io/docs/en/convert-from-ocaml

chucksmash··on What the interns have wrought, 2018 edition
Respectfully disagree.

PHP suffers from a contempt of the familiar. Lots of programmers of a certain age started off writing PHP poorly before they knew how to properly do their craft (in PHP or otherwise). When you mention PHP, the immediate association for some people is invariably going to be "that really bad PHP 3.5 site I made that one time." Leaving aside any positive or negative points to be made about the language itself, you're dealing with that.

On the other hand, if you work in a generally well regarded but less used language like OCaml IMO you're much more likely to trigger a "huh, I've been meaning to play around with that," or maybe a "gee, if you could pick up an ML while interning you must be pretty adaptable." The relative obscurity might even work in your favor if the person interviewing you is familiar with The Blub Paradox[0] and suspects OCaml might be higher up the language power continuum than the languages they know and you get cred for being a language wonk.

[0]: http://www.paulgraham.com/avg.html

chucksmash··on DoD: Turn Off Your Fitbit, Garmin, Apple Watch GPS
You can board a flight in the United States without ID as well, though I'm not sure you're strictly allowed to.

This happened to me in 2007. Arrived at a regional airport at 6am bleary eyed and without my wallet. Had to jump through some hoops and I assume some regulations might have been bent/broken but I made my flight. Someone made a judgment call and waved me through.

chucksmash··on An update on uBlock
Thanks for the background. The relevant Wikipedia page doesn't provide detail beyond "a fork happened" and I was curious how the project creator ended up on the side of the fork with a different name and no access to the original domain.
chucksmash··on Keeping a plaintext “did” file
I've settled on a couple of helper functions in bash to accomplish a similar thing (daily journaling):

  #######################################
  # Normalizes date arguments            
  # Globals:                             
  #   None                               
  # Arguments:                           
  #   date (defaults to today)           
  # Returns:                             
  #   string of format 'YYYY-MM-DD'      
  #######################################
  function getDate {
      local DATE=${1:-$(date -I)};
      if [[ "${DATE}" =~ [+]+ ]]; then
          DATE=$(date -I -d" ${DATE} days");
      elif [[ "${DATE}" =~ ^- ]]; then
          DATE=$(date -I -d" ${DATE} days");
      elif [[ "${DATE}" == "tomorrow" ]]; then
          DATE=$(date -I -d" +1 days");
      elif [[ "${DATE}" == "yesterday" ]]; then
          DATE=$(date -I -d" -1 days");
      fi
      echo "${DATE}";
  }
  
  #######################################
  # Load a journal file                  
  # Globals:                             
  #   None                               
  # Arguments:                           
  #   date (defaults to today)           
  # Returns:                             
  #   None                               
  #######################################
  function journal {
      local DATE=$(getDate "$1");
      emacs ~/notes/journal/${DATE}.md;
  }
chucksmash··on “I'm basically giving myself a permanent vacation from being BDFL”
GPs example is perfectly valid as well - this is just a restatement of the same logic in a way that keeps the logic contained within the loop at the cost of using a conditional plus a break inside of an unconditional loop. See [0]:

  Another motivating code pattern is the "loop and a half".
 
  It was once common for processing a file by line, but that 
  has been solved by making file objects iterable; however 
  other non-iterable interfaces still suffer from patterns 
  like:
  
  line = f.readline()
  while line:
      ...  # process line
      line = f.readline()
  
  or like this:
  
  while True:
      line = f.readline()
      if not line:
          break
      ... # process line

  Either of those could be replaced with a much more clear
  and concise version using an assignment expression:

  while line := f.readline():
      ... # process line
[0]: https://lwn.net/Articles/757713/
chucksmash··on Why Use OpenStreetMap Instead of Google Maps?
Google Maps also offers offline maps.
chucksmash··on Talent vs. Luck: the role of randomness in success and failure
"The Drunkard's Walk: How Randomness Rules Our Lives" by Leonard Mlodinow seems topical based on the abstract. I would recommend it as a fairly quick read that presents a perspective you might not have thought much about.

I avoided it when I first came across it because I was worried (based off of the subtitle) that it'd just be fodder for learned helplessness. It turned out quite good though, and anything but (unless you're a movie studio executive).

chucksmash··on Cities don't have to offer huge subsidies to companies like Apple and Amazon
> Voters should be able to control their reps, via votes. If they can't, then the representative democracy is flawed and needs new legislation to fix it

The ballot box is a very low resolution feedback tool and an election cycle is a very long iteration cycle.

Imagine you only had performance reviews every two years and the feedback from your boss was either "you're not as good as the next best choice, so you're fired" or "you're not fired right now."

Voter willpower is diffuse (different people care about different things at different times) and only infrequently expressed. Special interest willpower can be much more acutely and frequently applied. It's hard to see how you can correct the imbalance between these two things given the current system and the inertia of incumbents who benefit from it.

chucksmash··on Python 3 at Facebook
There's also Mononoke[0], a "Mercurial source control server, specifically designed to support large monorepos" which they're working on in Rust.

[0]: https://github.com/facebookexperimental/mononoke

chucksmash··on Why nobody ever wins the car at the mall
Likewise. I'm usually at least decent at general knowledge quizzes and was more than 20 questions into the episode I picked before I knew an answer 100%.

The episodes available in the US at the GP's link are all Semi-Finals and Finals. Could any regular listeners comment as to whether they tweak the difficulty for the tournament or if it's always such a relentlessly high bar?

chucksmash··on Machine Learning: The High Interest Credit Card of Technical Debt (2014)
"Show HN: Hacker News Classics" might fit the bill.

Discussion: https://news.ycombinator.com/item?id=16442888

App: http://jsomers.net/hn/

Source: https://github.com/jsomers/hacker-classics

chucksmash··on Yam, cultivate and cook
Would also recommend. I watched nearly all of these videos without captions when I first came across the channel before I realized there were captions.

It's fun to "play along at home" and try to figure out why he's doing something without the captions.

chucksmash··on IQ scores have been in decline for cohorts born since 1975
If I used to do arithmetic mentally or by hand and you gave me a basic adding calculator that let me do the math more quickly, would my increased productivity really signify anything w.r.t. my intelligence?
chucksmash··on ReactOS can finally build itself
First thought when I saw "React" and "OS" together was "surely that can't be what it sounds like it might be."

For others for whom this is new, from wikipedia[0]:

  ReactOS is a free and open-source operating system for x86/x64 personal computers 
  intended to be binary-compatible with computer programs and device drivers made 
  for Windows Server 2003.
 
  Development began in 1996, as a Windows 95 clone project, and was continued as 
  ReactOS in 1998, with the incremental addition of features of later Windows versions. 
  ReactOS has been noted as a potential open-source drop-in replacement for Windows and 
  for its information on undocumented Windows APIs. As formerly stated on the official 
  website:
 
  > The main goal of the ReactOS project is to provide an operating system which is 
  > binary compatible with Windows such that people accustomed to the familiar user 
  > interface of Windows would find using ReactOS straightforward. The ultimate goal of 
  > ReactOS is to allow you to remove Windows and install ReactOS without the end user 
  > noticing the change.
[0]: https://en.wikipedia.org/wiki/ReactOS
chucksmash··on Facebook Tools Are Used to Screen Out Older Job Seekers, Lawsuit Claims
I don't know how you're qualifying "even the highest qualified young engineers are struggling to get offers" but that doesn't jive with my experience these past couple of years. I'm not young any more but it still feels like a job seeker's market (spoken from the viewpoint of a fine but not outstanding engineer in his mid 30s, in a tech hub)
chucksmash··on If its ratings don’t really matter, why is Netflix canceling many shows?
In general I agree (see: Linodes and D.O. droplets, domains for possible side projects) but I'm pretty quick to cancel extraneous streaming services now that every media company is trying to get their own $10/mo IP silo off the ground.
chucksmash··on If its ratings don’t really matter, why is Netflix canceling many shows?
That's an interesting way to think about it - similar to β and α in the portfolio analysis sense.

I don't know how well that model holds up in practice though. To use HBO Now as an example: when Game of Thrones was the only show I was interested in, I would sub for 3 months to watch a new season live and then cancel. Once I caught the Westworld bug I was that much less likely to cancel my subscription during the down time.

chucksmash··on The aging mind: neuroplasticity in response to cognitive training (2013)
> it may also be your diabetes or pre-diabetes, which I assume you have

That seems a bit presumptuous.

chucksmash··on Microsoft, Google, Mozilla, and Apple Object to W3C Fork of DOM Spec
Fair point, but I think it is somewhat orthogonal to the discussion. I don't imagine Cisco cares which DOM spec is used in rendering the application layer bytes of the packets it routes.
chucksmash··on Spotify opens on NYSE, valuing company at almost $30B
what.cd would have had it in FLAC, Ogg Vorbis, AAC and six different bitrates of MP3.

Leaving legality aside, I was always really impressed with the level of curation people put into that particular private tracker. You could find every vinyl and CD release of Miles Davis' Kind of Blue in just about every file format you could hope for.

I hope eventually streaming services become so low-friction and commonly used that enforcing copyright takedowns on sites like what.cd will become a thing of the past and we can benefit from their value as a deep archive of esoterica.

chucksmash··on B-Heap vs. Binary Heap (2010)
"You're doing it wrong" was a pretty common meme in 2011, I wouldn't take too much from it being the title of the piece other than the author was trying to be playful.
chucksmash··on B-Heap vs. Binary Heap (2010)
Do you have an article you would recommend on the route planning optimizations? That sounds interesting.
chucksmash··on PhantomJS: Archiving the project, suspending development
+1 on Puppeteer. Using it for something now. For small projects, the ability to have the JS you want to run within the context of the page itself live side by side with your browser instrumentation code feels magical. Head and shoulders nicer experience than in cases where half of your logic is second class code-as-a-string (e.g. trying to work directly with Gremlin Server from a non-JVM language by POSTing Groovy-as-a-string)
chucksmash··on Show HN: A Chrome extension that tracks front-end JavaScript at runtime
Another reply touched on the possible differences in extending devtools, I can't speak to that.

I've built several extensions now that worked seamlessly in both Firefox and Chrome. Firefox exposes a `chrome` object that very nearly matches the Chrome extension API and a `browser` object that goes beyond it (e.g. Promise-based async handling instead of callbacks, some additional functionality).

The only incompatibility between the two that I've specifically come across is that Firefox doesn't allow background pages to be specified as persistent. Otherwise if you're doing fairly standard stuff with content scripts, background scripts, browser actions and page actions everything should Just Work.

chucksmash··on Show HN: A Chrome extension that tracks front-end JavaScript at runtime
Re: the limitations section, you can execute your extension content scripts within iframes as well via this manifest.json setting:

https://developer.chrome.com/extensions/content_scripts#all_...

Though that comes with challenges of its own.

chucksmash··on Rust things I miss in C
Bought a Pi 3 starter kit from a local place near me. It came with:

- Raspberry Pi 3

- 1⁄2-sized breadboard

- 4GiB microSD card

- microSD card USB adapter

- CP2102 USB TTL adapter w/4 jumper cables

- 10 female-male DuPont jumper cables

And I had to buy:

- 10 multicolored LEDs

- 4 100 ohm resistors

- 4 1k ohm resistors

- 10 male-male DuPont jumper cables

Specifically this kit: http://tinkersphere.com/raspberry-pi-orange-pi-boards/1538-r...

chucksmash··on Rust things I miss in C
Tangential, but if you're looking for a project to do as you learn Rust, there's an ongoing Operating Systems class being taught at Stanford in Rust right now[1]. The "Ferris Wheel" portion of assignment #1 was particularly useful for language knowledge; 25 source files which you must make compile/not compile/pass tests (along the lines of the Ruby/Kotlin Koans), along with a test harness you can run locally.

[1]: https://web.stanford.edu/class/cs140e/syllabus/

chucksmash··on Turning a Job Opening into a Dream Job for Top Talent
The difference in pay between US and EU has always left me scratching my head. Is development universally treated as a cost center by business people there? Isn't there anybody trying to attract those top N% of engineers with big salaries so those engineers make them a fortune? A 50-80% haircut on salary is a big whammy for the same position in places with similar COL.
chucksmash··on ICE is about to start tracking license plates across the US
It would be nice to see voters react to these sorts of technologies (whether they're provided by private companies or not) the way people reacted to the idea of being filmed via Google Glass when they went to a bar on a Friday night.
← PreviousPage 19 of 27Next →