Earlier quoted context omitted.
What's the runtime? Zero by the usual definition, but then again it's cheating.
> Zero by the usual definition Well, one.
Typing the technical interview
81–86 of 86 posts
Re: Typing the technical interview
#82Earlier quoted context omitted.
Any sophisticated enough type system contains an ad-hoc, informally-specified, bug-ridden, slow implementation of half of Prolog.
It's quite formally specified. Seems to not be very bug-ridden either. But maybe somebody should code a non-backtracking operator extension for GHC. This way, next time he could claim Haskell is a dynamically typed, interpreted, lazy and not-pure language.
I do think datalog semantics composes way nicer than prolog though.
I think some of the type class stuff was formalized in the papers on HM(X) , though the combination of extensions in this post hasn't. But perhaps should be on the table for formalization.
Re: Typing the technical interview
#83Re: Typing the technical interview
#84How.. beautiful. Like I said earlier in the "half-dead chicken thread", the occult is a quiet and powerful force in computer science and related areas. With things like neural networks and learning functions, we're approaching the ultimate. In this case, it was only a handful of lines of a functional language that could solve the N-Queens problem.. Of course, mixed with a bit of Lovecraftian lore and Norse magic. It'…
Of course, maybe your comment above was playful and ironic as well, in which case I missed the point :)
Re: Typing the technical interview
#85Sad to say, this is exactly the sort of magic that, as the conclusion suggests, gets people not hired. Even on this very enlightened forum people argue in favour of less knowledgeable candidates (even with all else being equal).
But the solutions shown in this series are just pointlessly esoteric. I'm not actually sure what the point of this series is.
Re: Typing the technical interview
#86I honestly have no idea what's going on, but his writing is humorous.
Here's what's going on, as far as I can tell: A "class" in Haskell is a typeclass, sort of like a trait in Rust or an interface / abstract class in OO languages. An "instance" is a specific data type that satisfies the rules of the typeclass. The classic example is something like this: class Eq a where (==) :: a -> a -> Bool instance Eq Integer where x == y = That is, Eq is a class we can apply to any type a, as long…