HNHacker News
TopNewBestAskShowJobs

de_keyboard

1,015 karma · joined April 8, 2021

submissionscomments
de_keyboard··on A bike parts company ditched Amazon to support indie shops instead
Segregating cycle traffic can create dangerous intersections, but well designed intersections do not. For example, you can give the cycle lane its own light phase. There is no question that well designed segregated infrastructure is safer than no cycle infrastructure at all.
de_keyboard··on A bike parts company ditched Amazon to support indie shops instead
Bike lanes where traffic has priority when turning across are a disaster:

- Gives cyclist false sense of security, since they need to yield to vehicles turning across "their lane"

- Little notice given to drivers that they need to take care, since they have right of way

- Cyclists have to stop at every side road, which can make taking the bike path as slow as walking

Experience cyclists won't use them and novice cyclists are given an unsafe and slow route; they will drive instead. What a waste of public funds.

A better solution, as seen in NL and some parts of London, is to make the motorist give way or even remove the vehicle entrance entirely. The transport mix you get is the transport mix you build for.

de_keyboard··on Performance Improvements in .NET 6
This is a fair point! Although I was more talking about the language constructs that are used for 90%+ of code, which from my own experience is:

  * let
  * discriminated unions
  * records
  * lists
  * seq
  * async
  * fun
Like all languages people actually use, F# has a long tail of advanced features!
de_keyboard··on A Visual Guide to React Rendering
When doing functional programming, immutable lists with value comparison are what you want. However with JS, you only get mutable arrays with reference equality out-of-the-box. You can use a library, as others have point out, but then your code gets very noisy.
de_keyboard··on A Visual Guide to React Rendering
This would be such a huge improvement (and records too)!
de_keyboard··on A Visual Guide to React Rendering
Great example of how the lack of custom value types really hurts JavaScript as a functional programming language.

    > [ 1, 2, 3 ] === [ 1, 2, 3 ]
    false
Ridiculous!
de_keyboard··on Performance Improvements in .NET 6
C# is more popular but actually harder to learn IMO (although this does depend on your prior experience). C# is huge, but F# achieves more with fewer language constructs. F# can also be transpiled to JavaScript, which is a huge advantage.
de_keyboard··on Ask HN: I joined a FAANG and it is awful
> not everyone can be an A player in a company with 1000s of employees, correct ?

Well if you pay top salaries and have a tough recruitment process maybe. They claim to hire the best from all over the world.

de_keyboard··on Ask HN: I joined a FAANG and it is awful
You are confusing IQ and intelligence. It would have been better to say "my co-workers do not seem to be highly intelligent".
de_keyboard··on Object-Oriented Entity-Component-System Design
Great explanation, thank you.

> This comes at a cost of making adding and removing components from an entity more expensive.

I think you could write a design-time tool that takes a simple description file (with hints) and outputs code that stores your entities and components efficiently.

Description file:

    {
      "archetypes": [
        {
          "components": [ "A", "B", "C" ]
        },
        {
          "components": [ "B" ]
        },
        {
          "components": [ "B", "C" ]
        }
      ]
    }
Output:

    class ArchetypeABC {
      A a;
      B b;
      C c;
    }

    class ArchetypeB {
      B b;
    }

    class ArchetypeBC {
      B b;
      C c;
    }

    class EntityStore {
      ArchetypeABC[] entitiesABC;
      ArchetypeB[] entitiesB;
      ArchetypeBC[] entitiesB;
    }
de_keyboard··on Object-Oriented Entity-Component-System Design
Where ECS gets muddy for me is when you have systems working on entities with multiple types of components at once.

* physics - position component + physics component

* rendering - position component + animation component

* etc..

How do we now store these components? How do we create / access aggregates efficiently?

If we have two arrays then there is lots of hopping around:

    PositionComponent[] 
    PhysicsComponent[]
Maybe we need some kind of grouping class?

    struct EntityData {
      PositionComponent position; // Null if not a position entity
      PhysicsComponent physics; // Null if not a physics entity
    }
Interfaces have their issues too, but at least it's fairly clear what to do:

    class BouncyBall : IHasPosition, IHasPhysics {
      IPosition getPosition() {
        // ...
      }

      IPhysics getPhysics() {
        // ...
      }
    }
Anyone solved this before?
de_keyboard··on Nerds don't respond to marketing; try technical documentation instead
Ha!

To anyone who believes this, I encourage you to checkout this series of blog posts: https://www.nemil.com/mongo/1.html

de_keyboard··on There’s a crack in the iPhone foundation and it could get a lot worse
What about smartphones? Increasingly, an up-to-date and unmodified Android or Apple smartphone is required to interface with the modern world. Want to use a Linux phone? Sorry no banking app for you. No check-in for flights. So you either need to accept massive day-to-day inconvenience or subject yourself to surveillance and control. This era of computing is a disaster from the perspective or user-control. You know what, Stallman was right.
de_keyboard··on BioNTech alone could lift German economy by 0.5% this year
They were probably worried about border seizures or even forced nationalisation.
de_keyboard··on Climate change: IPCC report is 'code red for humanity'
> Clearly feasible, as demonstrated by anthropogenic climate change.

No that only shows we can change the climate, not engineer it to best suit humanity.

de_keyboard··on Climate change: IPCC report is 'code red for humanity'
This is why we are screwed.

I think deep down majority knows the climate is changing, but they are not prepared to make any personal sacrifices.

de_keyboard··on Senators move to exempt Bitcoin, crypto miners from proposed U.S. tax rules
I don't think crypto can be blocked at this point - there will always be a communication channel for sharing blocks. Hell, it could be done via SMS messages if necessary.

They can significantly hurt the price but limiting reputable shops from accepting it though.

de_keyboard··on SQLite Is Dynamically Typed (2020)
I think cost drove MySQL adoption. Remember it arrived when most companies were using Oracle / IBM / MS databases.
de_keyboard··on Are dynamic languages going to replace static languages? (2003)
I think ultimately static languages will win because:

- Most things you want to express can be expressed in a static language

- Tooling is much easier to build over static languages, and I think automated checkers are the future of rapid development of robust programs

I don't think that OOP languages as they are now (particularly Java 8) are the future, but something with less ceremony like an ML. Java and C# might flourish in the long term by becoming ML languages, but only if they are prepared to remove the cruft.

de_keyboard··on The UK’s delta surge is collapsing
Most children don't go to private schools.
de_keyboard··on Six Years of Professional Clojure
The best response from the statically-typed world is functional programming and explicit dependencies (Haskell, OCaml, F#), which makes mocking unnecessary most of the time. OOP (Java, C#) is not the true standard for static-typing, just the most common one.
de_keyboard··on Lachlan Morton completes 5,510km Alt Tour, beating peloton to Paris by five days
It's a great way to have an adventure without much harm to the planet.

Here's the no-fly policy for GB Duro, which Lachlan also completed: https://www.theracingcollective.com/gbduro.html#no-fly

de_keyboard··on Lachlan Morton completes 5,510km Alt Tour, beating peloton to Paris by five days
If you are experiencing saddle pain after only one day (even a big day like you did!) of riding, it might be that your ride position needs some tweaking. A smooth pedal stroke will have you bouncing on the saddle less.
de_keyboard··on Lachlan Morton completes 5,510km Alt Tour, beating peloton to Paris by five days
Injuries are best prevented by slowly ramping up the distance. Many people see rapid progress in cardiovascular fitness but neglect strength work, quickly increase the distance and it results in injury. This is particularly true if you have led a sedentary lifestyle for years and decide to get fit!
de_keyboard··on Lachlan Morton completes 5,510km Alt Tour, beating peloton to Paris by five days
Huge kudos to Lachlan, really inspirational.

If you haven't tried an ultra endurance sport before - could be running, cycling or even walking - I would highly recommend it. The frame of mind it puts you into is like nothing else. It's as different to everyday life as deep programming work, but another experience entirely. It's also very addictive, in a good way.

de_keyboard··on Elm Compiler Written in Elm
Very cool! However, could they not compile the Haskell Elm compiler to JS using GHCJS and then write Elm bindings for it?
de_keyboard··on England’s reopening: ‘The world is looking at us with disbelief’
10-20% of cases have symptoms lasting over several months. I cannot comment on the severity.
de_keyboard··on England’s reopening: ‘The world is looking at us with disbelief’
Death is the worst case scenario, but not the only one that we would like avoid. Having months of debilitating symptoms and possibly a lifetime of disability should be taken seriously.
de_keyboard··on England’s reopening: ‘The world is looking at us with disbelief’
> But I'd like to point out that the Conservatives in the UK are nothing like Libertarians. There are a few perhaps, like the MP in the article, who would like to think of themselves that way. But the Conservatives as a whole are Authoritarian bordering on Totalitarian, and they are the most Authoritarian of all the big parties (more than the left).

I agree, however the media insists on talking about Johnson's "Libertarian instincts" and the "Libertarian wing of the party". I don't see them as very Libertarian at all! See also drug policy, protest bill, internet surveillance, housing market interventions...

de_keyboard··on England’s reopening: ‘The world is looking at us with disbelief’
> Peter Bone, a veteran Conservative MP, says: “I wholly welcome this. It goes down the route of personal responsibility. It’s spot on.”

Personal responsibility does mean you get to decide when to put others at risk, for example by going near them without a mask. Now, we might argue that there is a trade-off between respecting individual sovereignty on the one hand and lowering the friction of society on the other, but to frame this as a "personal responsibility" move is absurd. The Conservatives should read their intellectual heroes more carefully. Last I checked, Libertarians believe in the non-aggression principle.

← PreviousPage 4 of 6Next →