HNHacker News
TopNewBestAskShowJobs

mercurial

6,385 karma · joined August 19, 2011

A mercurial software engineer.
submissionscomments
mercurial··on How Rust Is Tilde’s Competitive Advantage [pdf]
> If you’re expecting the F# (and .NET) ecosystem, you’ll likely be satisfied. In fact, it might be better.

Not even close (100k unique packages on nuget, 13k crates on crates.io). On the other hand, you have easy interop with C (which doesn't give you stuff like safety, idiomatic error handling or nice APIs, but it's occasionally better than coding it yourself).

mercurial··on Google’s Fuchsia OS on the Pixelbook
Well, I mean, one of the issues listed is "getting a lockup with ls * on the default directory". Sure, Rust (or any other language, even something like Idris) is not a magic pill, but at that stage of development, you can't expect much. I would still say that it is, on average, a lot easier to shoot yourself in the foot in C than in Rust.
mercurial··on Google’s Fuchsia OS on the Pixelbook
Redox is not "Mozilla's operating system" in any way or form. It is an immature OS whose primary contributor works at System 76. The only thing Mozilla-related about it is that it's written in Rust.
mercurial··on Maintaining an Independent Browser Is Expensive
With Gecko ? It's their original engine. You probably mean Servo (the experimental Rust engine).
mercurial··on Firefox 57.0 Released
You can try vimium-ff (FF 57-compatible). There is also Tridactyl [1] currently in development.

1: https://github.com/cmcaine/tridactyl

mercurial··on New Zealand to ban foreigners from buying existing houses
As a data point, here in Denmark, EU citizens need have been residing in the country for at least five years in order to buy. I don't know what the minimum time period is for non-EU citizens, but probably longer.
mercurial··on Raddit: An open source alternative to Reddit
Reddit is as "toxic" as the Internet as large, considering that it's made up of very disparate communities.
mercurial··on Wind Energy Is One of the Cheapest, and It's Getting Cheaper
> EPR on time or on budget

Sure, on one hand, this kind of project is likely to get into cost overruns. On the other hand, Areva looks like a fairly dysfunctional company following the tenure of Anne Lauvergeon, so it's not only a technical problem.

mercurial··on Things Reacters do that Re-framers avoid
Well, that's not really the idea behind React. You could say local storage is more a convenience than anything, React is primarily about rendering your data.

The problem is that, with Redux at least, composing data stores is a major pain. The only pattern supported out-of-the-box is horizontal slicing (have different reducer for separate pieces of data). This may work for separate pages, but it does nothing for you as soon as you need data sharing. I don't think React itself should change, but I haven't found a really satisfactory solution to the problem of sharing stored data.

mercurial··on Things Reacters do that Re-framers avoid
No, it's really about knowing what is global and what is local. You have plenty of things for which local state makes sense.
mercurial··on The Unreasonable Effectiveness of Dynamic Typing for Practical Programs [video]
The thing is, it's pretty good at telling you when you haven't been paying enough attention.
mercurial··on Lessons learned from implementing a text editor related to front-end development
> I believe that React and similar frameworks run a diffing procedure to find out which parts of the UI actually need to be updated (so a more minimal set of updates is actually applied)

That's true. React diffs the virtual DOM and applies the changes to the actual DOM. However, the fastest is still to diff the actual data to be rendered, and determine whether the render function needs to run at all (this is opt-in via React's shouldComponentUpdate() lifecycle method).

mercurial··on My grandfather at Dunkirk
I don't think this is common knowledge in France, but I did know about it.
mercurial··on Mozilla launches voice search, file-sharing and note-taking tools for Firefox
Can't say it has ever bothered me, but the future of Vim extensions on Firefox once XUL in extensions is phased out for good is dire. Right now, there is a port of Vimium (which I suspect gets my FF 55 to hang). I don't think any of the other extensions are likely to make it.
mercurial··on Why I’m Frustrated with Go
Well, the dynamic version won't complain until runtime the day you mix up the order of your parameters and invoke "create(params, conn)", for instance. Besides, you can make it statically impossible to generate an invalid user object with a static language. In a dynamic language, an invalid user object is just an assignation away.

Now, if we are talking about error handling, the way it is done in Go is not particularly representative. Most static languages would go with exceptions (or maybe checked exceptions in Java). Haskell/Rust/Scala would probably go with a Result type, and then it's more a question of the language giving you the tools to propagate the errors and wrap them (Rust with error-chain is excellent at this kind of thing).

mercurial··on A deep dive into Multicore OCaml garbage collector
> Idiomatic rust avoids heap allocations, but it very much encourages immutable stack allocation...something that OCaml also tries to encourage.

No doubt, but most of your OCaml data structures will, in a typical program, still be on the heap, while idiomatic Rust will avoid Box whenever possible.

Apart from that, I know about the links between the two (and I think the blend between the OCaml/Java (for the generics) and Ruby syntax (lambdas) works really well in practice. But I think the underlying philosophy, and the way of structuring code are really different. This is a much more fundamental concern than surface-level considerations.

mercurial··on A deep dive into Multicore OCaml garbage collector
On the other hand, it may be possible to use F# on Linux with .NET Core now.
mercurial··on A deep dive into Multicore OCaml garbage collector
> jbuilder (https://github.com/janestreet/jbuilder) has markedly improved the build system story. Importantly, the community understands that this is an issue and is actively working towards making the situation better.

Well, that's good to know.

> Type declaration at the code level is optional. You could always annotate your code with types, and the type checker will ensure that the annotated types are compatible with the inferred ones. If you would like to know "what type is this 'e' variable", there is merlin (https://github.com/ocaml/merlin), which integrates with popular editors.

I am aware of that. I shouldn't have to use Merlin to read third-party code from github, and god forbid that you have to do code review on a "let's all rely on type inference" codebase in a web browser. I think Rust strikes the right balance here, by enforcing the use of type signatures at function boundaries (which also lets it offer world-class error messages).

> Reg. typeclasses, there has been enormous amount of work put into modular implicits (http://ocamllabs.io/doc/implicits.html). It is likely to be the next major features in OCaml along with multicore.

I know about implicits. I also know that multicore has been "just around the corner" for a few years now, this does not bode well for implicits (which have also been "in progress" for a long time). This also touches another issue with the OCaml maintainers: little in the way of information seems to filter down to the unwashed masses, and let us not speak of the word "roadmap"...

mercurial··on A deep dive into Multicore OCaml garbage collector
I'm not particularly attached to Reason syntax myself, but there are some bits of OCaml syntax that do annoy me, such as the right-to-left direction for parametrized types ('a list instead of a more usual list 'a).

As for classes, well... They're not really used outside of specific situations (eg, UI widgets), so it's not really a terribly convenient solution (especially since, for a really useful to_string implementation, you would want the member fields of your class to also implement to_string, so that would mean objects everywhere).

mercurial··on A deep dive into Multicore OCaml garbage collector
Haskell for hobby programming coupled with professional Perl experience gave me enough idea of what creative programmers could come up with in terms of ASCII art.
mercurial··on A deep dive into Multicore OCaml garbage collector
IMHO, it's not so much that as the ASCII operator galore. $, <*>, the horrible lambda syntax... Sometimes it looks an opinionated Perl.
mercurial··on A deep dive into Multicore OCaml garbage collector
I can imagine the .NET interop is a big deal, especially if you need to do anything on Windows. Also, parallelism can be occasionally useful.
mercurial··on A deep dive into Multicore OCaml garbage collector
> Having said that, reasoning about performance is even better in Rust, which is heavily inspired by OCaml but allows to to reason about memory access, closing the gap that you can reason about OCaml's performance only while ignoring the GC.

Rust is a really different topic. It's an imperative low-level language with functional trappings, not the reverse. First off, "reasoning about memory access" really means "think about what part of code owns which data", which is non-trivial, especially considering the various ways for sharing data in Rust.

Secondly, trying to do idiomatic OCaml in Rust is a terrible idea. Idiomatic OCaml is all about immutability and recursion. Immutability means allocation, and idiomatic Rust is pretty much all about avoiding allocations. And recursion is also a bad idea, especially considering Rust does not have TCO. It's not a dig at Rust, which is an exceedingly interesting language of its own, but Rust and OCaml have completely different philosophies.

mercurial··on A deep dive into Multicore OCaml garbage collector
F# is pretty much Microsoft's version of OCaml, but it diverges in some key features (for instance, it can do multicore but it does not have OCaml's functors).
mercurial··on A deep dive into Multicore OCaml garbage collector
People often don't like the syntax too much (which is why Facebook invented Reason). There are other weaknesses as well:

- the stdlib is good for data structures and not much else, which in turn gave rise to at least three different stdlib extensions

- it does not have typeclasses, so implementing a generic "to_string" for your data type is not a thing

- it has some really unfortunate ideas like "universal compare"

- in general, there is little focus on creature comforts (this is 2017 and despite often relying on exceptions for error handling, there is no "finally" clause in the language)

- in the same spirit, strings are simply bytes, it's up to the developer to ensure they have the right encoding

- the language separates the code itself from the type declaration, a feature which, combined with its type inference, can make reading OCaml code similar to reading Python (in the "what type is this 'e' variable" sense)

- its most widely used build system is pretty terrible

That said, it has some solid features as well, despite the small community size. The packaging system is top-notch, it has good text editor integration via Merlin, and while not always numerous, the libraries are often high-quality, and it is an exceedingly pleasant language to develop with. It strikes a really good balance between solidity and ease-of-use.

mercurial··on Rocket, Rust Web Framework, v0.3: Fairings, TLS, Private Cookies
I'm not sure it is an issue of complexity. From what I have seen, it is more a problem of ergonomics. Currently, programming something fairly simple with a few loops and if statements using Futures is painful, but I could see a Futures-based async/await version take off.
mercurial··on Rocket, Rust Web Framework, v0.3: Fairings, TLS, Private Cookies
How so?
mercurial··on How Norwegian Air Upended Travel With Its Cheap Flights
The real thing is Denmark vs Sweden.
mercurial··on Typing Nix
Also Perl, Python, Javascript and Rust.
mercurial··on Crony capitalism may be cannibalizing productive capitalism in the U.S.
I am well aware of the French revolution and its causes, thank you. As I said, Guillotin did not invent the machine. He did not like death penalty, but if it had to be done, he would rather have had it done by a machine than by axe or sword (for the nobility) which occasionally did not kill in one hit, or by hanging (for the ordinary populace).

The actual inventor of the guillotine is one Antoine Louis [1].

1: https://en.wikipedia.org/wiki/Antoine_Louis

← PreviousPage 2 of 34Next →