HNHacker News
TopNewBestAskShowJobs

cdirkx

461 karma · joined December 31, 2017

submissionscomments
cdirkx··on New approaches shed light on the magnitude of sex differences in personality
Thirty points is about the difference between humans and chimps/gorillas/orangutan.

(around 70 IQ I think, but sources are very much in disagreement on this, claiming it's more around 25-50 [1]. Taking tests on animals is hard)

Last I checked they were all in the "critically endangered" category [2].

[1] https://www.quora.com/Using-human-standards-what-would-be-th...

[2] https://www.iucnredlist.org/

cdirkx··on Wikipedia Has Cancer (2017)
But this was in the hypothetical of Wikipedia being sold or taken over. If people don't agree with the practices of the new owners and rally behind a fork trusted by the community, I expect most moderators and contributors to follow.
cdirkx··on ISOC sold the .org registry to Ethos Capital for $1.1B
A lot of English-speaking people, which isn't everyone.
cdirkx··on Domes are overrated
Starting a colony on the ocean floor is also challenging and possibly leading to a lot of innovations [1]. However, compared to the efforts around Mars, there is no-one trying to settle the deep seas (that I know of). You don't need to go to another planet to find problems.

So for Mars, I don't think merely the opportunities for _any_ innovation, are a convincing enough argument, at least for those investing in Mars. For them the specific innovations around spaceflight and non-earth construction are indeed valuable, because of future expansions into space and first mover benefits, using Mars as a stepping stone.

As for the colony on Mars itself, I speculate that having somewhere outside of existing jurisdictions is also attractive for a lot of people; the new unclaimed West. Some may imagine this to become a scientist utopia, free from the restraining politics of Earth; others might be more cynical.

We will see.

[1] https://www.bbc.com/future/article/20130930-can-we-build-und...

cdirkx··on Greensboro Man Creates Dating App Where He's the Only Guy Allowed
Yes this is indeed what some dating apps do.

Other users are free to message if you two are a "match", or directly - unless they are new or receive too many messages, to "protect their inbox". This information is hidden from the popular users themselves, who often have no idea that others have to pay (directly/in-app virtual tokens/premium subscription) to message them.

Sometimes there is also the mechanic that if you are popular enough yourself, you can message other popular users, working around the problem of the people you most likely would want to connect with being drowned out by the crowd.

Edit: I should mention, this was about paying for the _ability_ to message someone, not paying per message. I think paying per message is largely avoided by legitimate dating apps because it is mostly employed by scam "hookup" sites.

cdirkx··on A new school curriculum
Still, being "friendly" and "well-liked" is an important skill for later. People tend to not want to work or have sustainable relationships with people they can't stand.
cdirkx··on A new school curriculum
> Did other people go to schools with radically different curricula?

(Not US, but I think still applicable)

In general: yes.

I myself also recognized a lot on this list; my school spent a lot of effort on extracurricular activities, personal development and responsibility, mentoring etc. However, I just looked up the national statistics, and my school was ranked among the top 10 public schools in the country, awarded a "predicate of excellence" by the education inspection.

I can totally see how not every school has access to this level of education, as technically it is all outside of the base mandatory national curriculum and likely the first thing to get cut when funding is difficult.

Making the skills mentioned in the post a part of the base curriculum, like traditional subjects as English and biology are, might give them a more even footing.

cdirkx··on What if we called it the Flax Age instead of the Iron Age?
I agree for the most part, as I'm somewhat of a mathematician myself (theoretical computer science).

However, you state "mathematics is one of the only sciences that finds absolute ground truth", which I would argue sets it apart from being a science: science does not deal with absolute truth. The scientific method and experiments allows you to inductively make more and more accurate predictions about the object of your study (most often the natural world), but it will never give the deductive truth like math.

So rather than classifying almost all sciences as lacking rigor, I myself consider math to simply be not a science, but something else, as implied with my question.

I guess it depends on ones definition of "science". Is any process resulting in knowledge a science, or does it have to involve the scientific method, hypotheses, experiments.

cdirkx··on How to make your C codebase Rusty: rewriting keyboard firmware keymap
Also, normally the array in Rust would also be a constant, with the keyword `const` instead of `static`: the reason it is static however, is so the C program can access it.
cdirkx··on Half-Life: Alyx
But in terms of viability, it is also a matter of degrees: do more than half of your users feel sick after using your product, or only very small percentage?
cdirkx··on How to make your C codebase Rusty: rewriting keyboard firmware keymap
You can have anything you want with macros :)

I just wrote a macro `array` [1] that allows you to write

  #[no_mangle]
  static keymaps: array!{ u16[1, 2, 3] } = [
    [
      [1, 2, 3],
      [4, 5, 6],
    ],
  ];
or alternatively using a type alias

  type Keymaps = array!{ u16[1, 2, 3] };

  #[no_mangle]
  static keymaps: Keymaps = ...
On a more serious note, in general Rust favors explicit simple syntax: the only syntax related to arrays you need to learn is `[TYPE; LENGTH]` which is the way to write an array of type TYPE and length LENGTH, pretty straightforward. `[[[usize; 3]; 2]; 1]` is simply a composition of such arrays, as multidimensional arrays are just arrays of arrays.

C has a few more variants: the implicit length of `keymaps[]`, the `[0] = ...` initializer , the alternative `keymaps[1,2,3]` syntax. This is nice syntactic sugar, but you don't technically need it. Although if you really don't like the raw Rust syntax, you can always use macros like shown or a library like multiarray [2].

In a way I would say this makes Rust easier to learn: there are only a few symbols and patterns you need to learn to recognize, and the rest is compositions.

[1] WARNING: macro definitions are very symbol heavy, and thus even more unreadable.

https://play.rust-lang.org/?version=nightly&mode=debug&editi...

[2] https://docs.rs/multiarray/0.1.3/multiarray/

cdirkx··on Half-Life: Alyx
I'm merely curious, as when 3D movies came out a major complaint against them was that people got sick from watching them.

From my very thorough research (googling "3D movie sick", and looking at the dates; all from the period 2010-2015) this doesn't seem to be a big problem any more. Now this could of course also be because people have just accepted that it is not for them, the people who get sick don't talk about it any more, or people in general have just moved on from 3D, but it does make me wonder. Could the motion sickness not also just be a temporary thing for VR?

cdirkx··on Half-Life: Alyx
Do people still get motion sickness from 3D movies?
cdirkx··on How to make your C codebase Rusty: rewriting keyboard firmware keymap
Could you expand on this? I have heard many people say this about Rust, and I would like to know why.

I myself am now so used to Rust's syntax that I don't know what is confusing or unreadable about it, and would like the outside perspective.

cdirkx··on How to make your C codebase Rusty: rewriting keyboard firmware keymap
That is only with procedural macros. Normal macros operate just by token substitutions.

Procedural macros are also special in that they are the only macros that can be 'unhygenic': creating new identifiers in the current scope that were not passed as an argument to the macro.

(Although knowing if something is a procedural macro or not is not obvious when using one in code)

cdirkx··on Half-Life: Alyx
But does your body and the non-rational parts of your brain know that it is not real?
cdirkx··on What if we called it the Flax Age instead of the Iron Age?
But then do you consider mathematics a science?
cdirkx··on Foetus 18 Weeks: Lennart Nilsson's prenatal photography
I recently attended a presentation of a company that is planning an eventual experiment with a birth aboard a space-plane. I can't imagine a medical benefit of this, yet they say they have already been approached by several candidate mothers.

People make decisions based on a lot of factors; being the first baby born in space or the focus of "the best photo of the 20'th century" has other (perceived) benefits.

cdirkx··on Tunnel Boring Machines (2018)
I want to dispute the claim that public transport does't work anywhere. Specificly for the points you mentioned:

> Forces people into public transportation oriented life schedules

In my city almost all busses run at 10 minute intervals and the trains to other cities run at 15-30 intervals. Whenever I go somewhere I just go to the station and the next one will be there shortly.

> Is unfriendly to those with disabilities

Every region in my country is legally obliged to have transport available for the elderly, disabled or chronic sick. My grandparents can order a free taxi-like service with trained personel and accommodated for wheelchairs etc.

> Is unfriendly to those who do shift work

Agreed, at night not much runs here, but there are other options available (nightbus, taxi).

As for the "massive overhead", I dont quite understand. The concentration of passengers and required infrastructure should lower overhead, economies of scale and such. You mention the situation in Tokio but to me that sounds like they need more public transport, not less. The trains there transport 40 million people every day [1]. In contrast, there are only around 4 million cars in Tokio. I dont think there is physically enough space to fit an additional 10-40 million cars, even if they drive themselves.

[1] https://en.m.wikipedia.org/wiki/Transport_in_Greater_Tokyo

cdirkx··on CSS Utility Classes and “Separation of Concerns” (2017)
I think utility classes _first_, and not utility classes _only_, is a reasonable approach. My purist mind would prefer something like semantic classes as a sort of 'public', 'HTML-facing' API, implemented using 'private' utility mixins, keeping the separation of concerns. But in practice, I know I have wasted a lot of time thinking about class hierarcies and separating components, especially when the design is nowhere finalized and I just want a 4px padding.
cdirkx··on ‘OK Boomer’ Marks the End of Friendly Generational Relations
What? The phrase itself is just a current meme, inspired by the recent boomer/zoomer memes.

It is partially an ironic revenge against the "are millenials killing the economy?" type sentiments, and more generally used to say that the target has an old fashioned and self absorbed worldview: resisting social change, blaming younger generations for societal issues or trivializing their problems. This is nothing new, the "crazy uncle/racist grandma at christmas dinner" is a very much a thing people already talked about years ago.

So the behaviour against the younger generation was already unfriendly (and has been so since forever [1]), and the only thing that has changed for the older generation is that someone says "okay" to them and proceeds to ignore them. That is hardly "the End of Friendly Generational Relations".

[1] https://historyhustle.com/2500-years-of-people-complaining-a...

cdirkx··on Typestates in Rust (2018)
Yes you don't need const generics, after all that is what the entire post is about.

I was merely offering a perspective on how the const generics might offer an alternative way to express the same ideas, and possibly change the idiomatic way to write them. Type level values, especially enums, IMHO offer an intuitive way to encode what is going on.

cdirkx··on Typestates in Rust (2018)
Re: associated data for a state, that's possible too!

  trait StateData {
    type Data;
  }

  struct Sender<const S: SenderState> {
    ... // sender implementation
    state_data: <Self as StateData>::Data
  }

  impl<const S: SenderState> StateData for Sender<{S}> {
    // default: no associated data
    default type Data = ();  
  }

  struct HasSentNumberData {
    sent: u32
  }

  // using a specialized impl (also an unstable feature).
  impl StateData for Sender<{SenderState::HasSentNumber}> {
    // instead of a complete struct we could also have done Data = u32, 
    // but a separate struct would enable a nicer constructor, default values, helper methods and so on.
    // (ommitted in this example though)
    type Data = HasSentNumberData;
  }

  struct HasReceivedNumberData {
    sent: u32,
    received: u32
  }

  impl StateData for Sender<{SenderState::HasReceivedNumber}> {
    type Data = HasReceivedNumberData;
  }
Example usage:

  impl Sender<{SenderState::HasReceivedNumber}> {
    ...

    fn validate_received_number(&self) -> bool {
      self.state_data.received == self.state_data.sent   
    }
  }  


  let sender = Sender::<{SenderState::HasReceivedNumber}> { state_data: HasReceivedNumberData { sent: 3, received: 28 } };
  assert_eq!(sender.validate_received_number() == false) // client sent wrong number!
Playground link to see this in action: https://play.rust-lang.org/?version=nightly&mode=release&edi...
cdirkx··on Typestates in Rust (2018)
When const generics are fully implemented (they are partially usable on nightly rust now) this will enable an even stronger version of this pattern, allowing you the full power of enums to represent the state.

  enum SenderState {
    ReadyToSendHello,
    HasSentHello,
    HasSentNumber,
    HasReceivedNumber
  }

  Sender<const S: SenderState> {
    ...
  }

  impl Sender<{SenderState::ReadyToSendHello}>{
    ...
  }
One can then give the individual states extra parameters:

  HasSentNumber {
    number: u32
  }
(Note that in this case that doesn't make much sense, the number that is sent is more associated data then an actual type parameter. There is no real difference, at the type level, between HasSentNumber { number: 3 } and HasSentNumber { number: 6 }, and the compiler generating two types for this would be unnecessary. It is only an example of the syntax.)
cdirkx··on How Untitled Goose Game became a real video game
I have mostly seen this be named IPs (intellectual property), as in "studio X confirms it is working on a new IP". I guess 'franchise' also works nowadays, as for any succesful game it will be profitable to make a sequel/spinoff/eventual remaster.
cdirkx··on What does it mean for a machine to “understand”?
I remember that when my friend got a Google Home almost 2 years ago, I was asking it some questions to explore the limitations. I asked about a certain restaurant chain, and it gave me the information, but then I asked "is there one near me". It listed all places with "one" in the name near me.

I wonder if now it would correctly take the previous context into account. Google has been working a lot on improving their search and assistants to be "conversational". [1] looks like one of the results of this endevour.

[1] https://cloud.google.com/dialogflow/docs/contexts-overview

cdirkx··on Why New Technology Is a Hard Sell
But that article mentions that lemons can only be stored a limited amount of time, thus requiring restocking during long voyages. However the infrastructure for that wasnt there yet, only those 200 years later it is mentioned that "Spain's large empire and many ports of call made it easier to acquire fresh fruit" and enabling the first long distance expedition without scurvy.

Still looks partially like a cost/benefit thing (even though there were indeed many doctors not believing lemons were the cure and instead prescribing "fizzy drinks" with sulpheric acid).

cdirkx··on Bjarne Stroustrup Answers C++ Questions
Note that there is some discussion [1] surrounding this licensing, as the content was orinally under cc by-sa 3.0 and recently (begin September) relicensed to 4.0.

The concern is if Stack Exchange Inc has the right to unilaterally and retroactively relicense the content.

[1] https://meta.stackexchange.com/questions/333615/will-concern...

cdirkx··on DNA Digital Data Storage
Isn't this mostly due to the huge redundancy? All trillion cells of that mammoth carried duplicates of the encoded information, and recovering that information involves a lot of matching incomplete degraded strings against each other.

The estimated half-life for DNA is apparently 521 years [1] (still quite a bit longer than 50 years).

[1] https://www.livescience.com/38150-dna-degradation-rate.html

cdirkx··on Timsort, the Python sorting algorithm
A "stable" sorting algorithm preserves the relative order of elements with "equal value". This doesn't really apply if you are only sorting simple values, as there is no difference between a 7 and another 7, but does if you are sorted more complicated objects by some key.

Example: sorting 2#a, 1#c, 2#b by only the first number.

An algorithm that produces 1#c, 2#b, 2#a is a correct sorting algorithm, but not stable as it changes the order of 2#a and 2#b.

← PreviousPage 4 of 5Next →