Hacker News new | past | comments | ask | show | jobs | submit | madmax96's comments login

Is bandwidth the limiting factor or is it ping?


I love nix on macOS. But one word of caution: nix uses a very outdated, EOL’d, macOS SDK (https://github.com/NixOS/nixpkgs/issues/101229).


In practice, it's not that restricting. It's pretty rare to find something actually requiring a more recent version. (And there's slow progress in updating it)


Randy Eckenrode is doing work pushing this forward almost every day, and constantly posting little updates on Matrix in the Nix on macOS channel. If anyone reading this is invested in that work, you can track it just by idling in the room. I'm sure he'd appreciate help or even just sincere expressions of encouragement or gratitude.


You can also sponsor the work https://opencollective.com/nix-macos


Granted, it’s not restrictive if you only want to use Nix for general utilities and Unix libraries. But it’s extremely restricting if you want to use Nix to manage macOS apps. And I love Nix, so of course I want to do that :)

Thanks for posting the link to sponsor this work.


This post contains a number of statements that mislead the reader into believing that we are overreacting to memory safety bugs. For example:

> An oft-quoted number is that “70%” of programming language-caused CVEs (reported security vulnerabilities) in C and C++ code are due to language safety problems... That 70% is of the subset of security CVEs that can be addressed by programming language safety

I can’t figure out what the author means by “programming language-caused CVE”. No analysis defines a “programming language-caused CVE”. They just look at CVEs and look at CWEs. The author invented this term but did not define it.

I can’t figure out what the author means by “of the subset of security CVEs that can be addressed by programming language safety”. First, aren’t all CVEs security CVEs? Why qualify the statement? Second, the very post the author cites ([1]) states:

> If you have a very large (millions of lines of code) codebase, written in a memory-unsafe programming language (such as C or C++), you can expect at least 65% of your security vulnerabilities to be caused by memory unsafety.

The figure is unqualified. But the author adds multiple qualifications. Why?

[1] https://alexgaynor.net/2020/may/27/science-on-memory-unsafet...


>Prove it.

Proofs are good evidence that pure functions are easier to reason about. Many proof assistants (Coq, Lean, F*) use the Calculus of Inductive Constructions, a language that only has pure, total functions, as their theoretical foundation. The fact that state of the art tools to reason about programs use pure functions is a a pretty good hint that pure functions are a good tool to reason about behavior. At least, they're the best way we have so far.

This is because of referential transparency. If I see `f n` in a language with pure functions, I can simply lookup the definition of `f` and copy/paste it in the call site with all occurrences of `f`'s parameter replaced with `n`. I can simplify the function as far as possible. Not so in an imperative language. There could be global variables whose state matters. There could be aliasing that changes the behavior of `f`. To actually understand what the imperative version of `f` does, I have to trace the execution of `f`. In the worst case, __every time__ I use `f` I must repeat this work.


And if I go to a flat earth conference, I will find that they produce lots of “proof” for flat earth.

I don’t really accept “this group of people who’s heads are super far up the ‘pure functions’ ass choose purity for their solutions” as “evidence” that purity is better.

I’m not saying that purity is bad by any stretch. I just consider it a tool that is occasionally useful. For methods modifying internal state, I think you’ll have a hard time with the assertion that “purity is easier to reason about”.


>For methods modifying internal state, I think you’ll have a hard time with the assertion that “purity is easier to reason about”.

Modeling the method that modifies internal state as a function from old state to new state is the simplest way to accomplish this goal. I.e., preconditions and postconditions.


Dependently typed languages make it even better.

For example, in Lean4:

  def myDiv (numerator : Nat) {denominator : Nat} (denominatorNotZero : denominator ≠ 0) : Nat
    :=
    if denominator > numerator then
      0
    else 
      1 + myDiv (numerator - denominator) denominatorNotZero
  
  -- Example usage.
  example : myDiv 1 (denominator := 1) (by simp) = 1 := rfl
  example : myDiv 120 (denominator := 10) (by simp) = 12 := rfl
You have to submit a proof that the denominator is non-zero in order to use `myDiv`. No monad required ;).


It doesn’t matter if students know what to expect.

An oral exam isn’t the same as reading a written exam out loud. There are a set of learning outcomes defined in the syllabus. The examiner uses the learning outcomes to ask probing questions that start a conversation - emphasis on conversation. A conversation can’t be faked. A simple follow up question can reveal a student only has a shallow understanding of material. Or, the student could remember everything they’ve been told, but fail to make connections between learning outcomes. You can’t cram for an oral exam. You have to digest the course material and think about what things mean in context.

After all, students know what to expect on standardized tests. Some still do better than others :-).


>"a conversation can't be faked"

It can. An examiner questions are gonna be parsed via covert Voice recognition,processed by ai and replies played back via a e. g. small headset(a magnet inside an ear cavity, accompanied by an induction loop wire around the neck(works fine,google "микронаушник магнит" in russian, it's popular here) , and it's not as hard as you may think.


Why does Ubuntu almost always perform better on the vec GPU benchmarks but not the scalar benchmarks? Is there a trade off here?


The whole situation is really confusing.

Some people already ``adjust'' their names for a Western audience, and others don't. So, given the <name 1> <name 2> of a Japanese person, I don't know if <name 1> is the family name or given name. Some people already make the adjustment so that Westerners get it right, some don't.

I don't care either way -- I'd just prefer things be consistent so that when I recognize a Japanese name I can call them by the proper name faster :).


FWIW, family name is almost one syllable (Li, Yang, Wu, etc.)

Though that only helps a little because loads of given names are also one syllable.

Fun Fact: 300,000 people have the name "Zhang Wei" [1]

[1] https://www.xinhuanet.com/english/2020-01/20/c_138721082.htm


Modern Chinese family names are often one syllable, but China and Japan do not share language nor have much ancestral connections, and Japanese family names are usually not one syllable.


You could look up the n most common Japanese family names (myoji ,名字). You probably would get a list like Yamaha, Suzuki, Watanabe, Tanaka, etc. Of course, this wouldn't cover every case, but it might help. 頑張ってください!


Even dynamically typed languages like CL have type systems. However, CL implementations are under no obligation to statically check that a program is type-safe. Those checks are deferred until run time — hence the author’s complaints.


Airbnbs only make sense in rural areas. Hotels are more competitive in terms of price and location inside of cities. Cities have enough to do that I don’t want to be inside of my room that much during my trip, so space and TV simply don’t matter to me.


> Airbnbs only make sense in rural areas.

Not in my experience. The competition between hosts in cities make Airbnbs a much better value vs hotels in many cases.


Even in cities, would you rather have a clean well furnished apartment with plenty of space, nice tv, nice kitchern and a nice view or a hotel? The only pro I can think of by comparison is room service and maids cleaning up or if you actually make use of concierge services.


No. Some of us like interacting with people. Your dystopian and lonely viewpoint does not resonate.


Fair enough. You're right about me wanting to avoid interacting with people, especially when tipping is involved. But keep in mind, many people travel with others and airbnb is still a better option if you want to party a bit or have kids. Can't beat a private pool at an airbnb house or to entertain guests at a fancy airbnb.


Some of us also like not having to check every lamp and decoration in a bedroom/bathroom wondering if there's hidden cameras in it placed there by the "host"


Consider applying for YC's W25 batch! Applications are open till Nov 12.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: