Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
willtim
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
61 ms
·
451.
▲
by
willtim
8y ago
Sum types, not having null in every type, multiple dispatch (useful for numbers) and higher-kinded polymorphism (e.g. X can also be a type parameter in X[T]) are at least four very useful features that Haskell has and Java doesn't. Has
452.
▲
by
willtim
8y ago
The C#/.NET solution, while very good, has some problems too. By implementing generics so deeply into the runtime, it becomes very difficult to enhance the support in the future, for example adding higher-kinded types (which the F# fol
453.
▲
by
willtim
8y ago
Not necessarily, specialisation is only argubly required for unboxed types. Java actually implements "Generics" without any specialisation at all, it boxes all the primitive types (rather controversially).
454.
▲
by
willtim
8y ago
What's amazing is how little understanding we seem to have over such critical widely-used code. Java opted for a complex and arguably unproven algorithm, so it was always a risk. We now have functional languages that are able to expres
455.
▲
by
willtim
8y ago
Another successful example of language layering is Python, which sits atop many C and Fortran libraries (and must do so for efficiency).
456.
▲
by
willtim
8y ago
Not good that Java's sort still has bugs.
457.
▲
by
willtim
8y ago
Yes. Currently access to modern hardware features are either via cumbersome APIs (e.g. NUMA, AVX intrinsics), handled via the OS (e.g. paging, scheduling), or handled via the hardware itself (cache memory hierarchy). The problem will get wo
458.
▲
by
willtim
8y ago
This example looks like it should be turned into a malloc variant, i.e. needs only to be written once. Raw pointer access is also available in other languages of course, albeit it is usually made much more difficult.
459.
▲
by
willtim
8y ago
Could I not just call such a function from my alternative language?
460.
▲
by
willtim
8y ago
The only support C is giving you for this is that it has sized unboxed types (and raw pointer access). Even then, you'd have to trust the compiler and take measurements to be sure.
461.
▲
by
willtim
8y ago
High-locality of reference can be achieved in any language that supports unboxed types, it doesn't require C (even a very high-level language like Haskell has support for this). But this is a long way from having complete control how e
462.
▲
by
willtim
8y ago
C actually gives one rather limited control over modern hardware with it's memory hierarchies and superscaler CPUs. Programming language research has also moved on a lot since the 70's, which is why we should be considering less d
463.
▲
by
willtim
8y ago
This is not true in general. There is nothing intrinsic to static types that is incompatible with exploratory coding. If you want to turn all your type errors into runtime crashes, then some statically typed languages will even let you do t
464.
▲
by
willtim
8y ago
I respect your position, which was shared by the designers of Java and Go, but any language I choose to use is one that seeks to empower me. For example, the purity restriction in Haskell exists to ultimately empower me, not because the lan
465.
▲
by
willtim
8y ago
This is a social problem, it can be solved without such a blunt instrument. Single letter variable names also make code more readable, but only when used appropriately. Your argument would suggest banning those! IMHO it is better to concent
466.
▲
by
willtim
8y ago
Custom operators make code more readable when used appropriately; and any aspiring general purpose language that refuses to support them is cutting off the nose to spite the face.
467.
▲
by
willtim
8y ago
The MacBook Pro 15" does not have a 4K screen. Lenovo on the other hand do sell workstation-class laptops with 4K screens (3840 x 2160). The X1 Carbon is comparable in size to the 13" MacBook Pro and offers a similar 500 nits IPS
468.
▲
by
willtim
8y ago
> That's because some Mac laptops do those things and others don't (it's a combo of OS version, graphics card, chipset, model, and so on). The same is true for Linux, which was my point. > Having problem with a laptop s
469.
▲
by
willtim
8y ago
> Linux of all varieties still sucks on laptops Sweeping statements like that are not helpful. The argument is far more nuanced. My wife's MacBookPro sometimes fails to wake from sleep, gets incredibly hot under load and doesn'
470.
▲
by
willtim
8y ago
Pick your distribution wisely. I have no issues with Linux wake-from-sleep or battery life on a ThinkPad, in fact my wife has more issues with her MacBookPro!
471.
▲
by
willtim
8y ago
It's anecdotal, but Linux on my ThinkPad gives: - Rock solid stability, uptimes of months (until I reboot to upgrade the kernel). I've never had a kernel panic in over a decade of use. - No problems with WiFi, sleep, printing or
472.
▲
by
willtim
8y ago
Like Erlang, Elixir is still a "dynamic" language with no static types, it would have been great if it had introduced ML semantics to the Erlang/BEAM world, but this would have been tough to retrofit.
473.
▲
by
willtim
8y ago
No the concept was to drag the C++ programmers halfway towards the best ideas :)
474.
▲
by
willtim
8y ago
They didn't include everything, far from it. For example, lambdas were deliberately left out, despite objections from Guy Steele. Parametric polymorphism (generics) was also well known in academia at the time, since the 70's, but
475.
▲
by
willtim
8y ago
There are lots of papers referenced in the "Mysteries of DropBox" paper above, but I think the full spec is here: http://www.cis.upenn.edu/~bcpierce/papers/unisonspec.pdf
476.
▲
by
willtim
8y ago
Unison is beautiful, as it has a formal specification with proofs of correctness for its bidirectional syncing. Bi-directional syncing is hard to get right and many devs have been subsequently shown to not understand the problem fully, for
477.
▲
by
willtim
8y ago
This makes no sense. For example, XFS is a very robust and actively developed filesystem and is now the default on many distros. It also supports xattr.
478.
▲
by
willtim
8y ago
They stopped selling the premium "Pixel C" tablet about 6 months ago and that is now obsolete (no Android 9).
479.
▲
by
willtim
8y ago
> What laptops allow you to update keyboards? ThinkPads, for example.
480.
▲
by
willtim
8y ago
As I said, you can only export the original media files and none of the organisation/folders/albums/tags. An analogy might be a filesystem where you can copy files out but not the folder structure.
More ›