News for hackers. Stuff that matters.

cglouch

where do you purchase yours out of curiosity? My incandescent light bulb dealer on Ebay stopped selling them...
Re:Debugging in Vim on Monday May 13, 2019 @03:22PM (#19902933)
one nice thing about having the terminal within vim is that you can manipulate the output like any old buffer. So for instance if you want to copy something from the terminal into a script you're editing, you can yank the text from the terminal and paste it into your script, taking advantage of vim's editing features and without needing to move your mouse.
Do you regret doing your PhD in math? Reason I ask is that I thought about going to grad school for math but decided against it. It just seemed like it would be postponing the inevitable of finding a job that had little to do with my "passion". I definitely see the appeal of doing a PhD in a field with better industry employment prospects (e.g. AI in CS if you're into that), but less so for fields like pure math that aren't as employable outside of academia. I'm curious if you felt the experience was worth it, though
I've found that I often get better results on google if I click "Tools" under the search bar and change "All results" to "Verbatim". It seems to force it to just do the query without as much of the magic.
Re:Is a Dumber Phone a Better Phone? on Thursday May 17, 2018 @03:14PM (#17094536)
I'm still using my "dumb phone" from 2010. I like it cause it has a physical keyboard, a long battery life, and I can drop it without worrying about breaking the screen. Plus I don't have to worry about the privacy issues that come from apps collecting data.

Honestly the only feature I feel like I'm missing out on is GPS. But I've actually found that not having GPS improves my sense of direction, since I force myself to actually learn the map of my surroundings instead of just always relying on the phone.

Using bit manipulation to calculate chess piece movements is really quite satisfying. If magic bitboards are too confusing, the precursor - "kindergarten bitboards" - are a bit easier to understand. I have a description here if anyone is curious: https://github.com/cglouch/snakefish#sliding-pieces

I think once you understand the principle behind kindergarten bitboards, magic bitboards start to make more sense. It's basically a more clever way of indexing into a precomputed move table, that takes advantage of the redundancy in occupancy states, and requires even fewer instructions to determine the index. Although it does still feel kinda magic!

Re:Google's C++ Class on Monday March 05, 2018 @09:12PM (#16526356)
Does anyone have any recommendations for learning to write modern, idiomatic C++? I used C++ in college for data structures and algorithms, so I have some familiarity with the basics. But we were mostly restricted to using C++98, and I'm not sure what the best practices look like these days with the changes introduced in 11, 14, and 17.
in case anyone was curious how a bitboard chess engine works, I wrote one from scratch in python and included a writeup describing my general approach (mostly focused on the move generation aspect):

https://github.com/cglouch/snakefish

(I cheated a little by not implementing castling / en-passant since it's a pain, and my engine is still really slow, but hey it works!)

Re:Implementing Malloc: Students and Systems Programming [pdf] on Wednesday December 20, 2017 @09:51PM (#15976011)
The course itself is great too - CMU actually posts the video lectures on their website, and the labs are available as well:

http://www.cs.cmu.edu/afs/cs/academic/class/15213-s16/www/sc...

http://csapp.cs.cmu.edu/3e/labs.html

Re:Ask HN: Who hires mathematicians? on Wednesday December 06, 2017 @02:00PM (#15863849)
If you find out, let me know! One thing I'll caution you about is there's sometimes a bit of a disconnect between "doing math" as perceived by someone who studied e.g. CS versus someone who studied math. For some people, doing math means maybe doing some trigonometry or some basic stats; whereas others won't be satisfied unless they're working on algebraic k-theory or something similarly next level. For people in the former category, there are certainly jobs available with just a bachelors degree and ideally some programming skills, whereas for the latter, you'll almost certainly want a PhD (and even then you may not get to use that knowledge outside of academia, depending on your area of study.) You'll want to find out where you are on that spectrum, and how you feel about grad school / work life balance / etc.

Personally, I got a bachelors in math and ended up working as a software developer. There's enough overlap in the sort of thinking required that makes it reasonably enjoyable. I do wish I had more opportunities to use math in my job though!

I prefer listening to a familiar podcast to fall asleep. It's easier to do while lying down in bed and I can do it with my eyes closed, unlike TV/Netflix. The lack of visual stimulation is nice, at least for me.
Definitely agreed. I was introduced to functional programming via Pyret, which is similar to Racket and draws from HtDP in terms of pedagogy. It's a much gentler introduction than being thrown to the wolves with Haskell or OCaml. I'm sure one could learn FP effectively with those languages too, but if you're still trying to wrap your head around the functional paradigm you don't really want to have to stumble across words like "endofunctor" while reading the documentation. I even have a good math background but I would have found that confusing at the time.

https://www.pyret.org/

Re:Singular Value Decomposition for Programmers on Tuesday October 10, 2017 @01:59PM (#15443884)
Jeremy Kun also has a couple good articles about SVD:

https://jeremykun.com/2016/04/18/singular-value-decompositio...

https://jeremykun.com/2016/05/16/singular-value-decompositio...

The first one is particularly helpful for understanding SVD conceptually.

That website seems to be under construction but I found an alternate link: https://libcom.org/library/phenomenon-bullshit-jobs-david-gr...
Re:Identity Theft, Credit Reports, and You on Saturday September 09, 2017 @06:25PM (#15209475)
Yep, for important written communications (e.g. CRAs, the IRS, debt collectors, etc.) I always use certified mail and request a return receipt. For any clueless millennials such as myself who are unfamiliar with the post office, this is a good video that shows exactly how to fill out the forms:

https://www.youtube.com/watch?v=YLQLWdV1MZE

Re:OpenAI at the Dota 2 World Championships on Friday August 11, 2017 @09:47PM (#14995894)
I know it's not the same type of AI, but in chess there's a whole scene for computer + human play. A chess engine on its own can have trouble seeing strategic ideas that humans can recognize (e.g. opposite-colored bishop endgames, certain closed positions, and fortresses) so an engine on its own will lose to that engine being assisted by a skilled human player. In other words, humans are still capable for contributing at least a little. That said, it's not much - I think a chess GM paired with an engine will probably only be able to beat an engine rated ~100 or so points higher than their own.

It will be interesting for deep learning, though, where the ideas are a bit more abstract. Perhaps humans will be useful for a while longer.

I'm guessing the reason so many companies are in Utah County is because of tax incentives, but it's still weird to me. I would think that it's harder to attract talent to an office in Provo, seeing as the stereotypical tech worker is probably going to prefer living in SLC where there's less Mormon influence and more going on socially.
Re:An Indian village addicted to chess on Friday May 19, 2017 @01:46PM (#14377884)
There's some great chess people on youtube - I'm a fan of John Bartholomew. He has playlists called "Chess Fundamentals" and "Climbing the Rating Ladder" that are geared towards beginners who know the basics but want to start improving their play. Practicing "tactics" on sites like chess.com, lichess, or chesstempo is another good way to improve.
Re:The AI Misinformation Epidemic on Tuesday March 28, 2017 @12:24PM (#13977977)
Options solve it in the sense that you limit your downside, but you can still very well lose your premium. Even if you're 100% convinced that $TSLA is overvalued, markets can remain irrational longer than you can remain solvent, and your puts may very well expire worthless.
At least for me, the "fluff" ends up being quite practical. I often remember stuff by thinking back to where I saw it in the book. With a physical book, my brain associates content with where I read it on the page (left vs right), how far into the book it was (judging by the depth of the pages), and what the book looked/felt like and weighed. All of this lets me recall information more easily, because the physical sensations jog my memory. Maybe I don't remember the proof of some theorem right away, but then I remember it was on the right page, towards the end of the book, and then for whatever reason it comes back to me.

Perhaps I'm weird in this sense but I know a couple people who remember stuff similarly. It matters more for textbooks or academic literature where I'm trying to recall specific information; with novels it's not as necessary.

Re:Dole Food Had Too Many Shares on Friday February 17, 2017 @04:37PM (#13671911)
My understanding is that short selling is still a useful tool for signaling that a company is overvalued. Without short selling we would see even more asset bubbles and then eventual crashes. Plus short selling allows for hedging strategies which allows investors to, well, invest more, which is generally a good thing.
Re:Club Penguin is shutting down on Tuesday January 31, 2017 @03:32PM (#13534910)
for those unaware, "CP" often refers to child pornography
Re:Show HN: Command Line Challenge on Friday January 27, 2017 @12:06AM (#13497853)
I really enjoyed this, it was a nice way to practice/learn some command line tricks. In particular I got better acquainted with the find command. Nice work! My only suggestion would be to have an option to show a solution (yours or perhaps even a user-submitted one) if you get stuck on a particular challenge.
I think the analysis that says that is somewhat misguided. Matt Levine (my go-to for financial stuff, his writing is insightful and accessible) wrote a good piece on it here https://www.bloomberg.com/view/articles/2015-09-03/should-do...
Re:Obama Strikes Back at Russia for Election Hacking on Thursday December 29, 2016 @04:49PM (#13280450)
Maybe I'm splitting hairs here, but it does bother anyone that the NYT title calls it "election hacking"? To me that sort of slyly suggests that the actual election / voting process was hacked, which as far as I know did not happen. Perhaps "election-related hacking" would be more accurate. I don't mean to say the DNC and other such hacks weren't a big deal, but I worry that people who just read titles are getting the wrong impression.
Re:Things I hate about Git (2012) on Monday December 26, 2016 @10:38PM (#13261141)
One resource I've found pretty useful for understanding git is http://think-like-a-git.net/ (also linked at the end of the article). It basically describes git in terms of a directed acyclic graph, where branches/tags give you starting points into the underlying DAG, and the various commands allow you to perform manipulations on it. Once I started thinking about it this way, it made a lot more sense.

That said, the command line UI really is infuriating - checkout means 3 different things depending on what the argument is, it's never clear to me whether I should be using "origin master" or "origin/master," etc. I'm also not entirely sold on the usefulness of the index, but perhaps that's cause I'm still new to using git.

I understand the basics of actual stock options, but get confused by employee stock options. What would you say is the difference?
Well as dumb as it sounds, one reason to allow hyphens instead of requiring underscores is that the former takes one keystroke to type, whereas the latter takes two. This is kind of nice when dealing with longer function names.

It's also worth noting that pyret requires spaces between all math operators, not just subtraction. In other words, 3+4 is not valid; you would need to type 3 + 4. So at least it's internally consistent in that sense.

Re:What’s Lurking in Your Showerhead on Friday December 09, 2016 @11:18AM (#13139589)
Do you also forego eating because a staggering number of people in the world don't have access to food? It's at least worth considering what it's in your showerhead since it could potentially cause a weird disease or something of the sort.