Live data from Hacker News

I coded something dumb and I'm proud of it

plbrault.com

41–50 of 88 posts

Re: I coded something dumb and I'm proud of it

#42
post #26

Earlier quoted context omitted.

"What are letters?" "Kinda like mediaglyphs except they're all black, and they're tiny, they don't move, they're old and boring and really hard to read." -- The Diamond Age (Neal Stephenson)

How would they have learned a contraction if everything is based on glyphs/ images?

Haven’t read it, but society is quite changed in The Diamond Age, I think. In the protagonist even speaking English? If not, we could assume it is sort of “translated” into English (in the sense that most fiction that doesn’t take place on modern day Earth is).

Re: I coded something dumb and I'm proud of it

#43

Earlier quoted context omitted.

Because the animation needs to pretend to use something more efficient.

Ironically the particulars of this implementation make it much less efficient than a dumb bubble sort. Many Quicksort implementations have the worst performance on already sorted data, and in this case it will be run a lot on data that is already mostly sorted. It won't matter here because the data size is always trivially tiny, but it is something to consider in the real world.

Again, the need was not to implement an efficient sort. It was to implement an animation that pretends to execute an efficient sort. Also, quicksort gives a more interesting result visually.

Re: I coded something dumb and I'm proud of it

#44
post #33
post #27

Another way to describe what has been done: implement a pure function and avoid storing additional state. It sounds way less dumb that way. It is not really a pure function but the spirit is here. I've done the same during a refactoring of a side-project recently. It handles the input/output to a MIDI controller with many buttons, knobs and matching LEDs. Instead of computing what LED should change at regular interva…

This is how React works, or at least the illusion it presents to the developer. Where it goes awry and gets complicated is that web developers want to modify the input state directly within the same functions that produce the output state, and they also want to trigger side effects after the output state has been completed, requiring another pass. I’ve built a React variant for video compositing. Since it renders at…

I've also struggled with React's insistence on immutability. What if mutability was the only way to update state? I implemented a JSX-powered react-alike that explored the concept[1]. To my lack of surprise, I found the resulting environment easier to get stuff done in. I'm not subjecting my employer to this, but I would totally use this on a solo project that I had to support.

[1] https://github.com/tomtheisen/mutraction

Re: I coded something dumb and I'm proud of it

#45

Earlier quoted context omitted.

Personally, I disagree. I'm probably in the minority, but emojis don't helot me much when conveying information and I see them more as visual clutter that makes it difficult to distinguish what's going on. This is especially the case when there are a lot of emojis (or other icons for that matter) instead of text, e.g. in menus. It makes it much harder for me to distill the information and it takes me longer to grok w…

The young will use and understand them much more. How many years will it be before the Oxford English Dictionary begins listing definitions for individual and groups of emoji? In 100 years they will just be an ordinary feature of language somewhere between a word and a punctuation mark.

I don't think they will. The problem with them isn't that people don't understand what they mean, it's that they require a lot of context to understand even when they are used naturally and freely. There's a reason why languages have grammar. They're really used for decoration, or to disambiguate between a short list of expected responses already established in the past by using words.

i.e. a handful of emojis to explain the state of a machine is no more expressive than using a handful of colors to do the same thing. In that situation you'd react the same way to an emoji that I've thrown at you for the first time as with a color I've thrown at you for the first time. Suddenly the indicator is violet, or the indicator is smileyface emoji with big hearts for eyes: the question is what that meant to the programmer, and the emoji doesn't give any more indication than the color. "Are you trying to tell me that the server really loves my new blouse?"

Re: I coded something dumb and I'm proud of it

#46

this is an evil take but i think emojis are massively, massively underrated for use in signaling information (and massively overused in git readmes) A grimacing emoji when a process is thrashing, a fire emoji when it's eating CPU, a sweating smile emoji when the process is running longer than expected, etc etc etc. It sounds dystopian in a way but also useful - neat seeing them used here!

Emojis are great for conveying the wide and varied levels of human emotion that differ from person to person that may type the same exact sentence with an entirely different meaning.

This is especially true when you have repeated communications with someone and come to understand how and when they use certain emojis.

For this same reason, I don't think they are great for technical information. They feel antithetical to the purpose of conveying exact information. You can use them as iconography, but purpose-made iconography is still superior, in my view.

Re: I coded something dumb and I'm proud of it

#47

this is an evil take but i think emojis are massively, massively underrated for use in signaling information (and massively overused in git readmes) A grimacing emoji when a process is thrashing, a fire emoji when it's eating CPU, a sweating smile emoji when the process is running longer than expected, etc etc etc. It sounds dystopian in a way but also useful - neat seeing them used here!

Personally, I disagree. I'm probably in the minority, but emojis don't helot me much when conveying information and I see them more as visual clutter that makes it difficult to distinguish what's going on. This is especially the case when there are a lot of emojis (or other icons for that matter) instead of text, e.g. in menus. It makes it much harder for me to distill the information and it takes me longer to grok w…

Incidentally in Slack you can easily set up a workflow where "emoji response -> text macro" (aka more information, a text supplement to your emoji). Very useful if you have a Slack channel that is deluged with questions.

Re: I coded something dumb and I'm proud of it

#48
Just spent 15 mins working as the OS, it's much harder than it looks.

I just had a nice word with my browser with the 200+ tabs open, I now know how it feels.

Only upgrade I'd make is how fast my "task switching" is, I'd like to think it was subsecond, but it's not.

If you haven't played give it a shot. Then play the insane mode, with all the cores and memory it's pretty amazing to keep it all running.

As to your code, pretty interesting idea. As noted (above?) I've also done control work, we only send a message to update the display when the value actually changes. Since we are on something like a CAN bus, we can't hog things making display changes at the expense of sensor readings.

Re: I coded something dumb and I'm proud of it

#50

this is an evil take but i think emojis are massively, massively underrated for use in signaling information (and massively overused in git readmes) A grimacing emoji when a process is thrashing, a fire emoji when it's eating CPU, a sweating smile emoji when the process is running longer than expected, etc etc etc. It sounds dystopian in a way but also useful - neat seeing them used here!

https://en.wikipedia.org/wiki/Chernoff_face supports your take - humans are hard-wired to recognize and parse faces, why wouldn't we make use of that shortcut!?
Post reply on HN