HNHacker News
TopNewBestAskShowJobs

gcmeplz

325 karma · joined October 5, 2018

personal site: https://will-keleher.com/
submissionscomments
gcmeplz··on Em dashes are fucking amazing
Agreed that it (used to be) less common. AP style (like the article mentioned) uses spaced em dashes, and I think that style of spaced em dashes are more common in writing today because that's what Claude (particularly Sonnet) likes to use (based on some half-baked investigation I did a bit ago [^1]). OpenAI models generally uses the American-style unspaced em dashes, which is why that particular style looks LLM-y to people now.

edit: Another comment recommended https://www.pbjstories.com/blog/spaces-around-em-dash which does an awesome job of diving into dash usage by style guide

[^1]: https://will-keleher.com/posts/your-dashes-suggest-which-mod...

gcmeplz··on I keep tripping over "true, false, true"
yeah, I immediately came to the comment section to look for inlay hints, and your comment is the only one that mentions them. I guess many people might not be aware that they're a standard editor option?

fwiw, while inlay hints are great, they don't work in either git-delta or github, so they're not availabe in a good chunk of the places that I'm looking at code, so for TypeScript, I do lean towards object arguments with keys the way the article suggests.

gcmeplz··on ChatGPT Images 2.0 Still Can't Draw the Seven-Legged Spider I Want
Nice! It's great to confirm that it can in fact do it, and it's interesting that even with the clear guidance from an expert it took a few tries.

https://genai-showdown.specr.net/ is fascinating btw!

gcmeplz··on ChatGPT Images 2.0 Still Can't Draw the Seven-Legged Spider I Want
Your example doesn’t quite work btw! It removes two legs rather than just one.

It’s possible for sure, but it really doesn’t match most people’s intuitions for what these models should be able to do

gcmeplz··on The 'paperwork flood': How I drowned a bureaucrat before dinner
Non-consumer printers are also pretty good! I used to teach 120 students, so printing out materials for all of them for a week would sometimes be 1,000+ pages. 500 pages? I can't picture that causing problems for any org that needed to print things regularly.

And toner? I'd wager that the printer is going to use a print drum. That does have toner inside, but you'd talk about replacing the drum–not running out of toner.

Even consumer drum printers are pretty good nowadays. I have a Brother drum printer, and I wouldn't worry about sending a 500 page job to it if I needed to.

https://help.brother-usa.com/app/answers/detail/a_id/183926/...

gcmeplz··on Show HN: SuperUtilsPlus – A Modern Alternative to Lodash
The types look great on remeda, but one thing that looks intriguing about SuperUtilsPlus is the focus on being tree-shakeable. Lodash's lack of tree-shake-ability is a drawback to using lodash on the frontend.

edit: the types on remeda look great though! If I were doing a backend-only NodeJS project, I'd be super tempted to test it out.

gcmeplz··on Mississippi Can't Possibly Have Good Schools
State-based ACT scores are also highly influenced by who takes the ACT. If more students choose to take the ACT, the scores might go down even it's because your education system is doing a better job because more kids are trying for college.

For the same reason, you'll see some surprising state scores for SAT/ACT. If you're in a state that prioritizes the ACT, the main students taking the SAT are the strongest students who are looking at out-of-state schools.

Aside from the time lag, I don't think you can look at voluntary test scores and draw many useful conclusions from it.

gcmeplz··on Advanced Shell Scripting with Bash (2006) [pdf]
I write a lot of JS/TS for my day job, so zx (https://github.com/google/zx) has been a nice tool for bash scripts that start getting a little too complex.
gcmeplz··on Most engineers have Git aliases; what are yours?
Should probably say "most engineers I've worked with," but I think that's mostly a testament to the git workflows where I've worked (lots of small commits and short-lived branches).

Plus, once you pair with one person with snazzy aliases, it might make you want to make your own

gcmeplz··on Most engineers have Git aliases; what are yours?
> Nowadays I instead just clone a repo to a ramdisk, purge the .git folder and then rsync it to my hoarded stash of git repos.

You're probably already doing this, but if you do a shallow clone (git clone --depth=1 ..) you'll limit the amount that ends up in .git that you need to purge.

Even with shallow clones, I'm still surprised that it ends up with a .git that's a decent percentage of the total. I just tried it on a repo and ended up with 16% of the total size being .git. I would have guessed that it'd be much smaller than that.

gcmeplz··on fd: A simple, fast and user-friendly alternative to 'find'
locate is nice, but I think that on most distros its index is only updated once/day (unless you adjust the cron job that updates it more often). Most of the times I'm trying to find something, I haven't modified it recently, but it can definitely lead you astray.
gcmeplz··on Just: Just a Command Runner
I love the look of `just` and have been meaning to try it out, but this feels like one of those examples where Make's dependency management shines—it lets you specify that many of these commands only need to run when particular files change:

    node_modules: package.json yarn.lock
         yarn install --pure-lockfile

    prettier: $(shell find src -type f -iname "\*.ts")
         prettier --check src

    ...

    ci: node_modules prettier eslint vitest

And as time goes on, I always end up wanting to parallelize the commands that can be parallelized (citest, lint, eslint), so I'll turn `make ci` (or `just ci`) into its own little script.
gcmeplz··on Clever code considered harmful
I think sometimes "clever" is just a term for bad code that you don't like. The clever-code react example doesn't seem like a good example of clever code to me—it just seems awful! If you were do something clever for that function, it could look like this:

  function extractDataFromResponse ([Component, props]) {
    return _.pickBy({Component, props}, Boolean);
  }
I'm cheating by using lodash, but I think this code is a fairer comparison to the unclever example that's given in the article.
gcmeplz··on Anki SRS Algorithm : Spaced repetition explained with code
Could you link to some examples of your cards? Your usage sounds cool, but I have a hard time picturing what cards I'd actually want to make.
gcmeplz··on Building a Virtual Machine Inside ChatGPT
Absolutely bonkers. It can even ^C its way out of loops.

> while true; sleep 1; echo "yay"; done

> yay > yay > yay > yay > yay > ^C

gcmeplz··on Building a Virtual Machine Inside ChatGPT
I feel like that also describes 99% of the thinking that I do.
gcmeplz··on Ask HN: Who is hiring? (June 2022)
ClassDojo | Senior Engineer (Backend, Fullstack, Data) | Fully REMOTE (Americas timezones) | competitive compensation & equity | https://www.classdojo.com/jobs/

ClassDojo is a widely loved K-8 communication tool for teachers, children, and families on a mission to give every child on earth an education they love. The engineering team is great: good people, fun problems, and a product that users love.

- fully & permanently remote. we work in small cross-functional fully autonomous teams

- stable: well funded YC company that's been around for 10 years. good work-life balance: we want people to stick around!

- engineering team FAQ: https://www.notion.so/classdojo/ClassDojo-FAQ-for-Engineerin...

- tech: TypeScript, React, Flutter, MySQL, MongoDB (delenda est), Redis, Terraform, HAProxy, AWS

https://www.classdojo.com/jobs/#open-roles

gcmeplz··on Ask HN: Who is hiring? (May 2022)
ClassDojo | Senior Engineer (Backend, Fullstack, Data) | Fully REMOTE (Americas timezones) | competitive compensation & equity | https://www.classdojo.com/jobs/

ClassDojo is a widely loved K-8 communication tool for teachers, children, and families on a mission to give every child on earth an education they love. The engineering team is great: good people, fun problems, and a product that users love.

- fully remote. we work in small cross-functional fully autonomous teams

- stable: well funded YC company that's been around for 10 years. good work-life balance: we want people to stick around!

- tech: TypeScript, React, Flutter, MySQL, MongoDB (delenda est), Redis, Terraform, HAProxy, AWS

- engineering team FAQ: https://www.notion.so/classdojo/ClassDojo-FAQ-for-Engineerin...

https://www.classdojo.com/jobs/#open-roles

gcmeplz··on Zq: An easier and faster alternative to jq
I like using `jq` to create line-delimited JSON and then using a language I know well (Node) to process it after that point. I find `jq '.[] | select(.location=="Stockholm")'` less readable than something like `nq --filter '({location}) => location === "Stockholm"'` because I'm much more used to Node syntax.

- https://github.com/thisredone/rb is a widely used ruby version of this idea

- https://github.com/KelWill/nq#readme is something similar that I wrote for my own use

gcmeplz··on Ask HN: Who is hiring? (April 2022)
ClassDojo | Senior Engineer (Backend or Fullstack), Director of Engineering | Fully REMOTE (Americas timezones) | competitive compensation & equity | https://www.classdojo.com/jobs/

ClassDojo is a widely loved K-8 communication tool for teachers, children, and families on a mission to give every child on earth an education they love. The engineering team is great: good people, fun problems, and a product that users love.

- fully remote working with small cross-functional autonomous team

- stable: well funded YC company that's been around for 10 years. good work-life balance: we want people to stick around!

- tech: TypeScript, React, Flutter, MySQL, MongoDB (delenda est), Redis, Terraform, HAProxy, AWS

- engineering team FAQ: https://classdojo.notion.site/ClassDojo-FAQ-for-Engineering-...

https://www.classdojo.com/jobs/

gcmeplz··on Ask HN: Who is hiring? (March 2022)
ClassDojo | Senior Engineer (Backend or Fullstack), Director of Engineering | Fully REMOTE (Americas timezones) | competitive compensation & equity | https://www.classdojo.com/jobs/

ClassDojo is a widely loved K-8 communication tool for teachers, children, and families used in > 90% of US K-8 schools. We're on a mission to give every child on earth an education they love.

- fully remote

- small cross-functional teams

- tech: TypeScript, React, Flutter, MySQL, MongoDB, Redis, Terraform, HAProxy, AWS

- engineering values: https://engineering.classdojo.com/about

https://www.classdojo.com/jobs/

gcmeplz··on Ask HN: Who is hiring? (January 2022)
ClassDojo | Senior Engineer (Backend or Fullstack), Director of Engineering | Fully REMOTE (Americas timezones) | competitive compensation & equity | https://www.classdojo.com/jobs/

ClassDojo is a widely loved K-8 communication tool for teachers, children, and families used in > 90% of US K-8 schools. We're on a mission to give every child on earth an education they love.

- fully remote

- small cross-functional teams

- tech: TypeScript, React, Flutter, MySQL, MongoDB, Redis, Terraform, HAProxy, AWS

- engineering values: https://engineering.classdojo.com/about

https://www.classdojo.com/jobs/

gcmeplz··on Bash patterns I use weekly
Thanks for the explanations! Tracking if anything fails is normally important for what I'm doing, so I quite like that array-based solution. I really like that `"$pid" || status=$?`; it's much nicer than `if ! wait $pid; then status=1; fi` I have in there.
gcmeplz··on Bash patterns I use weekly
> Definitely DONT'T wait for PIDs like that and if you do want to write code like that, maybe actually use the arrays bash provides?

What pattern would you recommend for waiting for PIDs / parallelizing commands & preserving exit codes? Fair point about arrays being a better fit rather than a string there.

gcmeplz··on Bash patterns I use weekly
Oh, that's way better for sure! Thanks for the explanation
gcmeplz··on Bash patterns I use weekly
"${stuff[@]}" would be turning it back into "foo bar baz" though, right? I think if you were using arrays for this, it'd be something like:

    stuff=("foo" "bar" "baz");
    array_length=${#stuff[@]};
    for i in $(seq 0 $array_length); do
      curl localhost:8080/${stuff[i]}
    done
I'm betting even that isn't right: as soon as bash arrays are a thing, I reach for a different language.

[edit]: trying to get formatting correct

gcmeplz··on Bash patterns I use weekly
Thanks for the note about the semicolon! Added it
gcmeplz··on Bash patterns I use weekly
`SECONDS` is like `PWD`: the shell keeps track of updating it somewhere, and it'll tell you how long your shell has been running.

https://www.oreilly.com/library/view/shell-scripting-expert/...

gcmeplz··on How Many People Can Someone Lead?
I'm not OP, but depending on where in the world you are, classrooms with 50+ students aren't that rare even today: https://www.economist.com/china/2018/09/13/anger-grows-in-ch...

I'm most familiar with China (I taught middle-school classrooms of 55-60 in Yunnan around 2010, and had some friends in Guangzhou teaching 75-80), but I assume there have been & are plenty of countries with similar situations.

gcmeplz··on Strange domain names that developers bought
That's cool that that works! It does trigger a serious looking warning in Chrome though:

> Fake site ahead > Attackers sometimes mimic sites by making small, hard-to-see changes to the URL.

Page 1 of 2Next →