HNHacker News
TopNewBestAskShowJobs

graup

200 karma · joined July 17, 2012

meet.hn/city/59.4372155,24.7453688/Tallinn

Socials: - x.com/graycoding - linkedin.com/in/paulgrau/

---

submissionscomments
graup··on Centering in CSS
Surprisingly concise and fun article! I hadn't seen the "Fluffy Center" technique before. I'm not sure I really get it though – the video and the text showing different code is only adding to the confusion. Is it 15vmin or 10ch? What does "Word space is gap" mean?
graup··on A Modern JavaScript Tutorial
Disallowing for..of iterators is the reason I cannot use or recommend the Airbnb lint preset. A very nice example of an anno 2014-2017 cargo cult that clearly hasn't held up. https://github.com/airbnb/javascript/issues/1271
graup··on Should I Use a Carousel?
Timers can be useful, for example ensuring a slight (500ms) delay when a user expects an interaction to be non-instant (like saving or transmitting data). I wrote about this case here: https://medium.com/@graycoding/detect-slow-and-fast-asynchro...
graup··on Stanford CS248: Implement an SVG Rasterizer
The usual approach with canvas for high dpi is to increase the size of the canvas and then scale it back down afterwards: https://codepen.io/graup/pen/jOPpopR
graup··on The 2,500 year old history of why Python’s all([]) returns True
Good point. I was a bit surprised when I found out that Javascript's `Math.min(...[]) ` and `Math.max(...[])` return +Infinity and -Infinity, respectively. But after thinking about it, it makes a lot of sense. It does the right thing when the argument is an empty list.
graup··on TypeScript 3.7
The problem is that Promise.all stopped infering tuple types. Promise.all([() => A, () => B]) should be Promise<[A, B]> but is now Promise< (A | B) [] >. This issue is being tracked here and a fix seems to be already in the making: https://github.com/microsoft/TypeScript/issues/33752 https://github.com/microsoft/TypeScript/pull/33707
graup··on The Color of Noise: What Do Hues Have to Do with Sound?
There's a great talk by Adam Neely going into some interesting relations between sound and color: https://youtu.be/JiNKlhspdKg?t=1787 (timestamp where he starts talking about color, but the whole talk is interesting.)
graup··on What happens when a city bans cars from its streets?
The things you mentioned are all implementation problems not inherent to the mode of transport. Visit any Asian megapolis (HK, Seoul, Singapore...) and you can see how public transportation can be effective and convenient.
graup··on Small Seasons
A nice and simple website. I like the responsive design here. Text size scales with window size, and the table loses its first column on smaller screens.
graup··on German for Programmers
I agree. People will understand you, but they will also judge you. In my experience, Germans are much more ready to notice "wrong German" than English speakers do with "wrong English". This is just a sad fact.

My aunt, an American who has lived in German-speaking countries for 10+ years and can say almost everything she'd want to tells me she still gets treated less seriously because of subtle mistakes like that in her speech.

graup··on HTTPS-Portal: Automated HTTPS server powered by Nginx, Let’s Encrypt and Docker
Looks cool, but it's not free for commercial use. Instead of paying $25/instance/mo I can set it up myself with the https-portal docker config.
graup··on How to write a spelling corrector (2016)
I wish articles about NLP wouldn't assume by default the language to be English. Many points of this article can also apply to other languages, but may require some more thought. Either other languages should be mentioned, or the title should be "How to Write an English Spelling Corrector".
graup··on OverTime – Time overlap tables for remote teams
I made a similar web service with sharable URLs. http://awake.zone
graup··on Japanese toilet industry agrees to standardize complex bidet controls
Pretty common in South Korea.
graup··on PACELC theorem for distributed databases – improves on CAP theorem
PACLEC is pretty old. I wonder what the next thing will be? Anyone have some recent papers?
graup··on Ethereum is Doomed
Thanks for the clarification. So, Solidity is a compile-only, strongly typed language? While Javascript is usually interpreted (or JIT compiled) and dynamically typed.
graup··on Ethereum is Doomed
This is a very snarky hyperbole. Solidity has as much to do with Javascript as Java does.

For starters, Solidity is a compiled, typed language.

It is still new and has to be improved.

graup··on Deconstructing the DAO Attack: A Brief Code Tour
The repo you linked does have a "tests" directory. It contains "scenarios", so not really unit tests.

You can't really unit-test contracts at the moment.

graup··on Berlin public transport in real time
According to the website, the location information isn't exact, but "calculated" (whatever that means).
graup··on Show HN: Flexbox.io – a free video series on learning CSS Flexbox
Thanks for releasing this! Very helpful, and the code is a pleasure to read.
graup··on Show HN: Flexbox.io – a free video series on learning CSS Flexbox
93.99% is more than "support isn't there yet", in my opinion. Enough for many projects at least. Obviously if you develop sites with a big IE8/9 audience you should think twice.
graup··on “I paid $25 for an Invisible Boyfriend, and I think I might be in love”
Thanks for pointing that out. TL;DR I guess.
graup··on “I paid $25 for an Invisible Boyfriend, and I think I might be in love”
Reminds me of the movie "Her" about an invisible AI girlfriend. Worth watching!
graup··on The Roman typefaces used in Chinese and Japanese text
> I assume this is similar for Japanese and Korean

FYI Korean script (Hangul) is actually an alphabet, so relatively easy to type.

Still, the topic of font choices remains interesting. While we have been accustomed to very differently looking typefaces for Roman scripts for a few hundred years, we know relatively little about CJK fonts. Does anyone know a good article describing Asian font choices in English?

It's not just "symbols" - there's different ways to draw these lines, too, taking into account the purpose of the design.

graup··on Show HN: Improving WhatsApp
Nice ideas! I wonder how the read circles scale. How do you imagine this looking for groups of 10 or 20 or more people?
graup··on Cursors
I have a nice story from this level: http://imgur.com/0uunnrU

In the end, between start and goal there is only a single block. I was the one opening that block, everybody went through, and I was trapped. One arrow, however, stayed behind, tried to help me get out, was stuck with me for some time, and told me to not clear that last block in order to have other people help me out without just going through.

Whoever you are, thanks <3

graup··on JSON Web Tokens
JWT contain a payload, thus the token itself can contain auth information, while OAuth tokens are "dumb" and you have to store the token somewhere serverside to verify authentication. This makes JWT great for simple APIs.
graup··on Show HN: I'm building a game for the Nintendo GameBoy
Hey Ivo! Remember you from the Nintendocast days. Great to see you're still doing awesome stuff! Rock on!
graup··on Show HN: Stressed and burned out, so I created my first app – Remember Win
I like this. Last year I started writing down "one cool thing I've done" every day and it definitely helps me appreciate my life more. Recently I had a couple of days where I couldn't come up with anything to note, which reminded me to check if I'm still doing what I love and not spending too many days with only tedious work.
graup··on Something is amiss with the Interwebs: BGP is a flapping
Yup. It was 5pm in South Korea when this hit. Suddenly much less quiet than usual on the Engineering floor.
← PreviousPage 2 of 3Next →