Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
willtim
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
78 ms
·
781.
▲
by
willtim
9y ago
Mathematics has successfully modelled change over time for hundreds of years without mutable memory cells in a computer. Please don't build software that mutates my data. I want history/provenance and reproducibility. I don'
782.
▲
by
willtim
9y ago
I did say they were rarely needed, if one does need interthread communication then yes an MVar or two will probably be used under the bonnet somewhere. Threads can however be used without MVars. Haskell offers many concurrency and parallel
783.
▲
by
willtim
9y ago
In functional programming one should model change over time as a stream of immutable values, there is no "conceptual mutability" and no need for mutable variables.
784.
▲
by
willtim
9y ago
I use modal dialogs as an example of an app forcing the user to work in a modal way. Thunderbird used to throw up a modal dialog whenever I lost wifi on my laptop. Outlook still won't let me send an email when I'm browsing the add
785.
▲
by
willtim
9y ago
He says "I rarely need the docs visible at the same time I’m writing code. I read the relevant doc, then code. My workflow is modal." This is certainly not a common opinion. Most people want to glance back and forth quickly. And
786.
▲
by
willtim
9y ago
Why do you need a mutable variable? I thought we were discussing functional programming, in which case they should be rarely needed :)
787.
▲
by
willtim
9y ago
Modern hardware struggles to impersonate a C/C++ abstract machine too. Machines with multiple cores and distributed memory hierarchies are difficult to program effectively with old OO/imperative languages.
788.
▲
by
willtim
9y ago
I would say that the opportunity to freely share values without needing to defensively copy is of greater benefit, especially with an increasingly multicore future. Updating in-place also requires memory barriers, which don't scale.
789.
▲
by
willtim
9y ago
I'm really confused by the choice of development process for BTRFS. First they write huge amounts of experimental/buggy code and then spend years trying to fix it. Reliability was obviously not the primary goal and I doubt they wi
790.
▲
by
willtim
9y ago
This is spot on. In fact, for most users Lollipop brought lag and excessive battery drain for little user benefit.
791.
▲
by
willtim
9y ago
To be fair, Samsung phones do sometimes get software features years before the Google and Apple phones (e.g. split screen multitasking).
792.
▲
by
willtim
9y ago
Actually Haskell can be a lot more practical depending on what one wishes to accomplish. I've seen many Haskell ideas encoded in Scala that then become a lot less practical (verbosity, stack space, efficiency).
793.
▲
by
willtim
9y ago
Thank you! I had been meaning to write something like this for myself. It's more useful than line numbers, which typically change often.
794.
▲
by
willtim
9y ago
In Template Haskell quasi-quotation is how one would add new syntax, but it's not necessary either if all that is required is macro expansion.
795.
▲
by
willtim
9y ago
Template Haskell is meta-programming. It supports quasi-quotation, just like Lisp.
796.
▲
by
willtim
9y ago
Haskell also supports metaprogramming and a REPL, these are not unique to Lisp. But granted, Lisp's syntax makes metaprogramming very convenient.
797.
▲
by
willtim
9y ago
But was it Clojure or perhaps functional programming in general that "changed how you think about programming"?
798.
▲
by
willtim
9y ago
Emacs has been with us for well over 30 years and during that time has always had folks claim it was obsolete (no graphical UI, no OOP etc). Emacs will be around for at least another 30 years.
799.
▲
by
willtim
9y ago
This is not the same thing as deferred type errors though. The programs are still type correct, it's just that some of the implementations are missing / producing errors.
800.
▲
by
willtim
9y ago
Yes I don't use deferred type errors much. But the parent poster wanted the option to avoid worrying about type correct programs.
801.
▲
by
willtim
9y ago
There's no reason why a statically typed language cannot also use an interpreter and avoid expensive optimisation and code generation upfront. For example, GHC Haskell has an interpreter, runHaskell, that will run a Haskell program str
802.
▲
by
willtim
9y ago
Haskell can defer them by producing thunks (values) containing runtime exceptions. But unlike a dynamic-only language, you still get to know about the errors at compile time, by way of a set of warnings.
803.
▲
by
willtim
9y ago
There's no reason why static type errors can't be deferred until runtime, GHC Haskell can do this. Personally I find types invaluable when prototyping. I often fill in the implementations after I work out the types.
804.
▲
by
willtim
9y ago
Depends on what you mean by concurrency support. OCaml has nice green threads via Lwt.
805.
▲
by
willtim
9y ago
> There are still tons of things to improve in CPUs: power consumption, cost, embedded functionalities (SoC) Don't forget bugs! We have had buggy silicon, microcode and drivers, all of which probably still need fixing.
806.
▲
by
willtim
9y ago
It is much harder to do functional programming in an OOP language, as one is often fighting the syntax, semantics and various defaults. For example all variables are typically by default mutable, null in every type, libraries and frameworks
807.
▲
by
willtim
9y ago
The reference type in ML/OCaml is an opt-in feature, a container with it's own special type. In Haskell, you can also capture IORefs or similar, but any reads/writes to them are effectful and captured in the types. The point
808.
▲
by
willtim
9y ago
The ML/OCaml reference type is an opt-in feature with its own type and explicit syntax, it is not the default used pervasively everywhere. That's the key difference that makes ML programs easier to reason about.
809.
▲
by
willtim
9y ago
Unfortunately OOP languages typically lack sum types, the mathematical dual of product types (objects with just fields). This means subtyping and inheritance is often needed to encode sum types.
810.
▲
by
willtim
9y ago
No they are not exactly the same. From the link you posted: "all uses of the name within the block are treated as references to the current block" The Python folks call them "late binding closures" and they are frequen
More ›