HNHacker News
TopNewBestAskShowJobs

nv-vn

1,960 karma · joined August 14, 2015

Github: https://github.com/nv-vn
submissionscomments
nv-vn··on The chronic suffering of the VB.NET community
One thing the author failed to consider when discussing F# was that F#'s community leans heavily towards compiler/programming language people. Historically, MLs have been extremely popular for writing compilers and a lot of the folks using F# today either come from that background or have been exposed to people from that background and learned about some aspects of compilers. I would wager that maybe 25% of F# users are _capable_ of somehow contributing to the F# compiler compared to maybe 5-10% for C# and VB.NET. I also imagine the F# compiler's source code to be drastically smaller and simpler given both its history and the ease of writing compilers in F#.
nv-vn··on Substantial undocumented infection facilitates rapid dissemination of SARS-CoV2
It's also due to them actually testing people and having accurate numbers. 1% lines up with the diamond princess numbers
nv-vn··on AvastSvc.exe contains a full, unsandboxed JavaScript/DOM implementation
Re-read the comment. GP is not saying to make an interpreter for C++, they are saying that there should be no interpreter. If the language is compiled there's no need for one. C++ can obviously be insecure, but the scale of a JS interpreter + the fact that it's meant for executing arbitrary code leads to a huge security flaw that isn't present in just a normal C++ app.
nv-vn··on Functional Programming in OCaml
There's a few legitimate issues with OCaml syntax that have been fixed by Reason at least. E.g. `match`/`if` not having an `end` means you need to use parens or `begin`/`end` to nest match and have ; inside of an `if` body. There's also some ambiguity between functional `if` and imperative `if` in some situations.
nv-vn··on Programming a space invader in OCaml and OpenGL: lessons learned
Well there is a language spec [1], it's just designed by the same people who develop the compiler. While there's only 1 de facto implementation (same as Rust, Go, etc.) there's multiple backends and lots of research work happens in different forks of the language. There's usually quite a bit of discussion and work that occurs between proposing a feature and integrating it into the language. There's also various competing forces here such as INRIA, Jane Street, OCamllabs, Reason developers, & other typical OCaml developers each with their own agenda. It's not so simple as the devs just adding something without any input.

>For their React-like goal though, Ocaml's lack of anonymous record types is the absolute worst.

The object system actually allows this to be fair & it does get a little bit of use in some Reason libraries targeting React developers

I get that SML has advantages over OCaml but I don't really get what you're trying to argue for. Clearly if you like SML you'd prefer OCaml to JavaScript...

[1] https://caml.inria.fr/pub/docs/manual-ocaml/language.html

nv-vn··on Programming a space invader in OCaml and OpenGL: lessons learned
Yep. This is an especially weird thing for some people to grasp when working with native libraries developed in Reason (like Revery, which most people assume is built on web tech).
nv-vn··on Programming a space invader in OCaml and OpenGL: lessons learned
Agreed, the choice to use obuild was also bizarre. Dune has been standard for the last ~2 years and before that Oasis was the most popular build tool I believe.
nv-vn··on Programming a space invader in OCaml and OpenGL: lessons learned
I don't see how you can say F#'s syntax is more like Reason. OCaml and F# have nearly identical syntax for the core language, with the few differences being:

1) places features diverged

2) modules

3) F#'s "light" syntax mode

None of these really seem like Reason at all. Do you have any specific places where they're similar?

nv-vn··on C++ Pattern Matching Proposal [pdf]
OCaml, F#, ReasonML don't support that, I think it's unique to SML in the ML family.
nv-vn··on Bill Gates in Byte Magazine: The Future of Software Design (1983)
Really forward-thinking stuff, but then again that's why Microsoft succeeded. It seems like all of Gates' predictions were spot-on in this article.
nv-vn··on Challenging projects every programmer should try
That kind of work is a whole lot less satisfying. Why would I want to deal with GitHub issues and fixing bugs when I could solve genuinely interesting problems?
nv-vn··on The Cornell Note-taking System (2001)
During my freshman or sophomore year my high school pushed this system really hard, making it mandatory to turn in your Cornell notes in many classes. The system was atrocious and nobody could stand it. I'm not sure if the reason was that they were forcing us to write notes and evaluating their quality or just a flaw in the Cornell system, but I really struggled to find much merit in the types of notes I was taking after. In my experience, it added a lot of clutter and a lot of work but I never actually went to look back at the summary section (which doesn't make a ton of sense for most subjects) or recall column. Based on studies though it looks like the system has very little positive effect if any, so not entirely surprising.
nv-vn··on Ask HN: Curious to know if people still use IRC?
In my experience most SWE teams just use the hangouts chat nowadays
nv-vn··on Google Cloud Worth $225B, Deutsche Bank Says
No, undervalued means the market valuation of the company is less than what it should be. I.e. Deutsche Bank believes that Google's profits summed up for the future (and discounted to account for inflation/risk) will exceed what people are buying it for. As an example, if a share is $10 and it pays $5 per year then it's undervalued because it's value ≈ $5 + .9($5) + .9²($5) + .9³($5) + .... This is essentially how Deutsche Bank is setting their price target. Since their target exceeds the equilibrium price of Google, they have decided it's undervalued.
nv-vn··on Michael Bloomberg launches $160M initiative to ban flavored e-cigarettes
How is flavor the #1 reason for use? I don't get how they determined that.
nv-vn··on Tired of Stack Overflow
I'm glad to see that HN as a whole sees flaws in SO. I've avoided using SO as much as possible for years now and it seems like other people are coming to the same conclusions as I did. Between the "why would you want to do this?" answers and the downvoting beginner's questions and the "THIS IS A DUPLICATE" answers when the "duplicate" question is totally different and the "deleted as off-topic" on every interesting question, I find it really painful to support the site at all. The site has so much potential, but I find it less and less useful these days to the point where I can't justify ever checking the site out.
nv-vn··on Elizabeth Warren Came Up with a Plan to Break Up Big Tech
Google search would not exist without AdSense
nv-vn··on CEO compensation has grown 940% since 1978
>Stock options make up a big part of CEO pay packages, and the conservative measure values the options when granted, versus when cashed in, or “realized.”

The "conservative" measure is the only correct way to measure here. Using realized gains makes no sense because that's not the value the company paid out. That's like saying you invested your salary and the gains are part of your compensation package.

nv-vn··on TSMC Talks 7nm, 5nm, Yield, and Next-Gen 5G and HPC Packaging
I think the key difference here is also competition. If Intel's foundry can't get 10nm right then Intel is SoL until that's resolved. Whereas AMD was able to ditch GF for TSMC as soon as it became clear that TSMC had the superior process.
nv-vn··on TSMC Talks 7nm, 5nm, Yield, and Next-Gen 5G and HPC Packaging
Funny how this article emphasizes their in-house manufacturing as part of Intel's success when it's very much what's holding them back these days.
nv-vn··on Owl – OCaml Scientific Computing
I actually made just that for OCaml: https://github.com/nv-vn/OCamlCSVProvider
nv-vn··on Type inference has usability problems
OOP is a part of it, but what I'm trying to get across is that knowing the type of a variable doesn't make the code substantially easier to comprehend. In small examples it might, but as code scales up abstractions are much more confusing than lack of type annotations. Specifically, complex types can hide important type information far better than type inference.
nv-vn··on Type inference has usability problems
What I mean is that there's a lot more custom types in real world code, and custom types aren't gonna be something you're already familiar with when reading new code.

Complex inheritance chains come into this because it makes it hard to track down the code you're looking for. Like let's say we have Cat : Feline & Pet, Feline : Mammal, Mammal : Animal, Pet : Property, Animal : Alive. Now when I do cat.eat(x) it's impossible to predict where eat is defined. Knowing that it's a Cat didn't make it any easier to understand the implementation of eat.

nv-vn··on Type inference has usability problems
What I mean is that the code

var a = f(x) var b = g(y, a)

Isn't any different from:

g(y, f(x))

A lot of real world code I encounter doesn't bother with temporary values for everything and giving them explicit types, which is essentially the equivalent of just using inference here. Thus in this case inference isn't doing anything negative because the code would look like that regardless.

nv-vn··on JSON Resume – 5th Birthday and New Features
As someone who doesn't do any kind of web dev it seems like this isn't designed for my use case. E.g. things like Android or iOS development didn't seem to be present, let alone more niche things like embedded, graphics, etc.
nv-vn··on Type inference has usability problems
You can't really discount the benefits of type inference if you're using the most basic form. Hindley-Milner style type inference feels 1000000x better and IMO doesn't hurt readability. What I find in real-life code is that the overall structure is way more important than types--I'm not a type checker when I'm reading code, so there's no reason for me to care about what type a function takes. Further, in languages with implicit type conversions, overloading, inheritance, etc. knowing types doesn't really give you much info.

The hardest code bases I've worked with have been very explicit with type info and that's done nothing for me. The examples here feel very contrived; very little of the code in a 100k LoC project is gonna use types like Maps and ints, especially if it's OOP. Knowing that something is an AbstractIterator does very little to help me if I don't know WTF an AbstractIterator is. And complex inheritance chains absolutely destroy my ability to find the method I'm looking for on these types.

Coming from functional programming, it really doesn't feel so different looking up a function vs. looking up a class.

Regardless, every language has some degree of inference, otherwise every function call would be:

let result : int = (f : int -> int)(x : int + y : int, 2 : int)

If your code looks like this:

f(g(x, y), a(b(c)))

then inference isn't really doing much to hurt you. And what I've found is that for any large-scale project you see a lot of type of code.

nv-vn··on Is it time to treat sugar like smoking?
Yes. The fiction that sugar is somehow equivalent to hard drugs has continuously been pedaled without any basis in reality. Opioids have measurable and easily observable psychoactive effects and cause physical dependence. They limit one's ability to function as a normal human if consumed on a regular basis and an overdose of opioids can result in instant death. Even if you claim that eating sugar is "as addictive as cocaine" as the catch phrase goes, sugar lacks the power to cause you to nod off for hours, wake up with withdrawal symptoms like diarrhea/vomiting/flu-like symptoms, and kill you on the spot from an accidental overdose. Sugar also isn't regularly consumed in ways that destroy your arteries or nasal cavity. And when is the last time you've seen somebody crash a car because they were inebriated from eating too much sugar? The comparison between the two is complete non-sense and I believe that you can see just as clear as me why that is the case.
nv-vn··on Is it time to treat sugar like smoking?
I do agree with you that access to cheap/convenient healthy foods is certainly lacking. This is definitely a problem I think we can and should tackle. I think giving people more choices is a great thing and I would happily support this. The "default" also makes a lot of sense here. Really at the end of the day what I'm skeptical of is trying to force people's hands into cutting sugar out of their diet.
nv-vn··on Is it time to treat sugar like smoking?
There is at least some evidence that the root cause of sugar addiction is limiting sugar consumption [1], and this definitely reflects my childhood experience. Blindly taking a position of taking sugar away from children could actually cause an increase in sugar addiction in the long-term.

https://link.springer.com/article/10.1007/s00394-016-1229-6

nv-vn··on Is it time to treat sugar like smoking?
How about we just let people choose what to do with their body?

As a kid my parents didn't care too much about what I ate. I regularly had sweets of any kind as a kid. I certainly have no addiction to sugar because of that. I probably drink soda less than once a month and have cake/ice cream/chocolate/candy at about the same frequency. Meanwhile, people I grew up with who were never allowed sugar seem much more addicted to it, eating sweets with every meal or as a snack. Earlier this week I heard someone at work talking about how their child has never eaten any kind of sweets before and personally this just sounds like a recipe for disaster.

← PreviousPage 4 of 25Next →