Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
freyrs3
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
8 ms
·
31.
▲
by
freyrs3
12y ago
C is probably the worst language to implement monads in because the type systems really lacks polymorphism, higher order functions and any sort of type-class overloading to clean up the syntax. I mean you could hypothetically pass around a
32.
▲
by
freyrs3
12y ago
The halting problem forbids the existence of oracles which can decide with certainty in some finite time that an arbitrary program will halt. Loosen any of these qualifiers and the problem is not necessarily undecidable. Loosening the "
33.
▲
by
freyrs3
12y ago
> I thought the point of monads was that they provide a mechanism for introducing side effects gracefully into a pure language That's roughly a description of the IO monad, which is a specific monad. The IO monad is really a degener
34.
▲
by
freyrs3
12y ago
Use a sum type: data Datum = S String | D Double lst :: [Datum] lst = [S "a", D 3.14] In Python we'd have to write the logic to handle both cases and fail with an exception or do an instanceof check. In Hask
35.
▲
by
freyrs3
12y ago
It is indeed simple, though the use of ``Data.Dynamic`` raises a few eyebrows.
36.
▲
by
freyrs3
12y ago
Inference is orthogonal, I mean that a records don't have a distinct type in the type system. So structurally the following types are the same in Haskell, except one elaborates out a selector function. data Foo = Foo { name :: St
37.
▲
by
freyrs3
12y ago
From the talks I've seen Gundry usually tends to qualify comments about OverloadedRecordFields by saying it's not traditional row polymorphism ( i.e. Record { name :: String | r }) ). It doesn't allow row extension or row res
38.
▲
by
freyrs3
12y ago
Given how stable the compiler is at the moment, pretty sure that lightsaber would accidently take off a few limbs.
39.
▲
by
freyrs3
12y ago
Have to figure it takes 10-20 years to grow an industrial strength language. It takes a lot of faith in an idea or stubbornness ( probably both ) to go through that struggle. I admire people with that kind of dedication and I wish exploring
40.
▲
by
freyrs3
12y ago
If I recall from Linus Torvald's biography, he took advantage of his 8 years at university to write his first prototype of what would later become the Linux kernel. Sounds like the Finnish system liberated him to work to pursue importa
41.
▲
by
freyrs3
12y ago
This discussion is just going to reduce down to a runtime tag vs formal type definition. This particular article is using the term type to mean formal type , and my comment is also under this assumption. Under that definition Ruby does
42.
▲
by
freyrs3
12y ago
You're putting words in my mouth by implying I denigrated Ruby as unsafe using a much stronger definition of safety. Ruby is type safe under the article's definitions, but I suggest that this claim doesn't carry much informat
43.
▲
by
freyrs3
12y ago
> As such, we can think of these languages as type safe according to the null type system I think a term like vacuously type safe is a good description of what Python/Ruby are under this set of definitions. So as to distinguish fr
44.
▲
by
freyrs3
12y ago
No, HM algorithm has terrible worst case complexity, but the worst cases don't correspond to programs humans write and generally it works perfectly in practice.
45.
▲
by
freyrs3
12y ago
> I mean, how can you even try to ask people to improve their communication skills, when you say that people that do not think programming is math is because they have the wrong notion of math?! I just don't see how you are going to
46.
▲
by
freyrs3
12y ago
Historically I think Haskell will be very important as the substrate on which a lot of the next generation of dependently-typed languages (Idris, Agda) are bootstrapped on top of. It's a niche use admittedly, but it's hard to unde
47.
▲
by
freyrs3
12y ago
STM is not a great fit for this kind of problem, there's no need for all the transaction machinery if the problem is embarrassingly parallel. In an ideal world what you want is threads which just split the work sections like they do in
48.
▲
by
freyrs3
12y ago
If you're holding a global mutex every 100 instructions while context switching between CPU bound tasks, then yes, the GIL does suck. There are a class of IO-bound problems where threading/evented models in Python can be used effe
49.
▲
by
freyrs3
12y ago
If you're working on CPU-bound tasks with NumPy/SciPy using threads then you have to think very hard to make sure most of the critical sections are hitting the NumPy calls in C which release the GIL. It's not a great reliable
50.
▲
by
freyrs3
12y ago
Unidirectional inference in the presence of subtyping is undecidable in the general case. Languages like Haskell and OCaml don't have this problem because they don't include subtyping precisely for this reason.
51.
▲
by
freyrs3
12y ago
Which introductory tutorials have you read?
52.
▲
by
freyrs3
12y ago
What you're saying is like arguing that the Japanese should switch from Kanji to Latin characters because more people worldwide use them. That's the language, it's not going to change. It's just silly to criticize Haskel
53.
▲
by
freyrs3
12y ago
mtl has been around for a while now and using any the monads from the mtl transformers library is very inferrable, although like any inference it returns the most general type possible and it's generally just good practice to forward d
54.
▲
by
freyrs3
12y ago
Indeed, the discipline of computer science is really the study of computation and the ideas we want to convey from a first language are things like abstraction, recursion, proof by induction, equational reasoning, sequential/parallel t
55.
▲
by
freyrs3
12y ago
It is helpful and appropriate to point out bugs, and his comments did help fix the Typeable exception problem in GHC 7.8. But he doesn't go through the usual tracker and mailing list to report these things. He goes off and writes these
56.
▲
by
freyrs3
12y ago
I've read his papers and I own his books, so I'm not entirely unfamiliar with his contributions to the field. But I also find his criticism of Haskell to be at best detached from reality and a "holistic" view of the prog
57.
▲
by
freyrs3
12y ago
There is a strong argument to be made that software profession does have some resemblance to pop music culture. "[Pop culture] it has nothing to do with cooperation, the past or the future — it's living in the present." Alan
58.
▲
by
freyrs3
12y ago
> Generally, to finally provide my personal take, I think that Harper is dead right so long as you consider programming languages to be "means of expression". I think that's an interesting POV on languages generally and it
59.
▲
by
freyrs3
12y ago
It's a technical term so the colloquial definition has little relevance to it's use in computing. You can read the definition in TAPL or PFPL. > tractable syntactic method for proving the absence of certain program behaviors by
60.
▲
by
freyrs3
12y ago
> DL people are like...what's the difference The dynamic typing folks don't care to provide a definition of types and overload the term to mean many things, the static typing folks have a rigorous one.
More ›