Readit News logoReadit News
cel1ne commented on Things I Was Wrong About: Types   v5.chriskrycho.com/journa... · Posted by u/abyx
cel1ne · 5 years ago
Types are important and necessary.

Can you skip them in a typed language? Yes, just use any, Object or whatever the equivalent.

Can you add them to an untyped language? No.

They are not needed anywhere. But I argue that especially JavaScript module-systems would have benefited greatly from them.

A million lost hours in fixing obscure "undefined is not a function"-errors from output of highly dynamic pluggable build/transpiler-systems like webpack, requirejs, babel, buck etc. could have been avoided.

cel1ne · 5 years ago
"They are not needed anywhere." -> This should have been "They are not needed everywhere."
cel1ne commented on Things I Was Wrong About: Types   v5.chriskrycho.com/journa... · Posted by u/abyx
cel1ne · 5 years ago
Types are important and necessary.

Can you skip them in a typed language? Yes, just use any, Object or whatever the equivalent.

Can you add them to an untyped language? No.

They are not needed anywhere. But I argue that especially JavaScript module-systems would have benefited greatly from them.

A million lost hours in fixing obscure "undefined is not a function"-errors from output of highly dynamic pluggable build/transpiler-systems like webpack, requirejs, babel, buck etc. could have been avoided.

fn1 commented on Are we living at the 'hinge of history'?   bbc.com/future/article/20... · Posted by u/Thevet
hn_throwaway_99 · 5 years ago
I'm surprised none of the responses here are discussing climate change. Unlike other concerns, higher average global temps are baked in for centuries, even if we stopped all greenhouse gas emissions today (which, obviously, is not happening).

I put in a "yes" vote for the hinge of history simple due to the fact that our inability to drastically restructure our economy today will severely negativity affect billions in the future. Keeping global warming below 2°C is a pipe dream IMO, and the big question remains to be seen of whether we see big positive feedback loops that result in greatly increased warming (8°C or so). If that happens, WWII will look inconsequential by comparison.

fn1 · 5 years ago
> Keeping global warming below 2°C is a pipe dream

I think/hope it's possible by a war-mobilization type of effort, where industries start working together for the goal.

We not only have to stop all emissions to zero, but should probably start removing co2 from the atmosphere as well:

https://arstechnica.com/science/2018/02/carbon-dioxide-remov...

https://arstechnica.com/science/2018/03/wanna-limit-global-w...

But there are a lot of social issues going along with this: Up to 8% of greenhouse-gas emissions come from concrete, so building things.

I cannot imagine a world without construction, there are so many business processes and jobs involved with that.

fn1 commented on A Pipeline Made of Airbags   ferd.ca/a-pipeline-made-o... · Posted by u/bshanks
gorgoiler · 5 years ago
I always admired PHP’s runtime for the way it serves web requests. I think it’s a similar ethos to that described in the post, even though Erlang and PHP are quite different.

Start from nothing. No shared state with previous requests. Plough right through as many errors as you can. Log them, but don’t stop. Keep executing code until you run out of things to do.

fn1 · 5 years ago
This is probable the reason for why it's so popular (meaning wordpress), but also why it's so full of security exploits.

Fail-fast leads to more stable systems.

cel1ne commented on Quarkus 1.8.1 – Kubernetes native Java framework   quarkus.io/... · Posted by u/based2
davnicwil · 5 years ago
A little bit of a tangent but just out of curiosity, what would be your preferred option for persistence?
cel1ne · 5 years ago
JDBI.
cel1ne commented on Ask HN: How do I learn to write better code?    · Posted by u/momofuku
cel1ne · 5 years ago
1. Try a completely functional language like Haskell once to learn about side-effects.

2. If you do multi threading: Look into Immutability and communicating sequential processes

3. Use static analysis / linters / code checkers for every language you use. They provide a lot of tips. There are linters for bash and Dockerfiles as well.

cel1ne commented on The Presence of One’s Own Smartphone Reduces Available Cognitive Capacity (2017)   journals.uchicago.edu/doi... · Posted by u/wtracy
qz2 · 5 years ago
I had the same problem for a bit. I used windows at work and OSX at home. The context switching was hell. I gave in eventually and use windows at home now as well. And you know what? It turned out cheaper, better and faster even though 99% of what I do is on Linux, in a VM.
cel1ne · 5 years ago
I wrote an autohotkey script for windows to assign alt-* to most shortcuts which would require ctrl-*. Alt is physically where Macs Cmd is, so I had Alt-A for Cmd-A, Alt-F for Cmd-F, Cmd-W and so forth. This made a big difference.

Also I installed EasyWindowSwitcher and assigned it to a shortcut, which gave me window-cycling like in mac.

cel1ne commented on On Browser Tabs   abuqader.substack.com/p/o... · Posted by u/aqader
ssivark · 5 years ago
I... have a problem. I recently had ~1600 tabs open in Firefox. With a lot of painstaking effort I cut it down to ~750. Quite some distance to go still.

The default interface sucks once you have more than 50 tabs. I wish there were easy REPL-ish programmatic access to the list/dict of tabs (so I could filter out all GitHub tabs, or close all stackoverflow tabs, etc) and that was a first class citizen in the browser interface. This is one reason I’m really excited about the Nyxt browser.

PS: Part of it might be FOMO, but part of it is also that these links represent certain threads of thought/exploration and are like bookmarks of things to revisit at a later time. Yes, in principle I could export the list of tabs to a text file, and begin anew, but that’s not a fully satisfactory solution. I think we need tools & interfaces to better (more holistically) accommodate people’s intellectual workflows; what we have today is geared much more towards consumption.

As an example: why can’t we easily group tabs into projects and have bidirectional sync between the browser and project related resources (Eg: Some markdown/org file, or sync with Evernote/Notion/Roam, etc) so that whenever I resume working on the project, I get a warm start with the context mapped out (continuing from the previous session). And I want a much tighter relationship between my tabs and my project notes (akin to bibliography of references), including annotations on webpages, etc. If we are to use the web more effectively, the ecosystem surrounding browsers needs to grow up and help us get there.

cel1ne · 5 years ago
Have you tried a combination of quick-reading and taking notes.

If it's about train of thoughts: for each tab try formulating and writing down a question that came to your mind while reading it.

That is the creative takeaway and it might ease your mind enough to close the tab.

cel1ne commented on How can we, as web professionals, help to make the web more energy efficient?   cmhb.de/web-design-and-ca... · Posted by u/giuliomagnifico
cel1ne · 5 years ago
Use CDNs for delivering JavaScript libraries instead of including everything into custom bundles.

React could be transferred ONCE to the browser-cache instead of hundreds of times.

u/cel1ne

KarmaCake day2479February 23, 2014View Original