Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
Tyr42
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
68 ms
·
931.
▲
by
Tyr42
14y ago
That's the way it's set up at Waterloo, with soft-eng in Engineering, and CompSci in the Math Faculty. That being said, in Computer Science we have some classes on bash scripting and C++, which I think are valuable, but not as fun as funct
932.
▲
by
Tyr42
14y ago
I was looking for a forgiving interpretation of his statement. It's better to assume someone is right, and a little unclear, then just outright wrong.
933.
▲
by
Tyr42
14y ago
It has them, but I don't see them being used very often. More commonly just a Maybe will do. And really, monadic exceptions aren't like java exceptions. I would call them un-Haskell-like.
934.
▲
by
Tyr42
14y ago
Well, he could be talking about reverse [] = [] reverse (x:xs) = reverse xs ++ [x] being sugar for reverse list = case list of [] -> [] (x:xs) -> reverse xs ++ [x] Since in tha
935.
▲
by
Tyr42
14y ago
I take issue with Haskell programmers may be familiar with this as a do block, and for Schemers, this is the equivalent of a begin sequence. However, unlike Haskell, in Loop, a sequence is guaranteed to execute in order.
936.
▲
by
Tyr42
14y ago
It really should be called something better, like pure. And Monads should be a sub typeclass of applicative.
937.
▲
by
Tyr42
14y ago
I don't think that's valid Haskell. Examples of Haskell: case (x>y) of {True -> "Yup"; False -> "Nope");} or if (x>y) then "Yup" else "Nope" An example that uses otherwise would be fizzbuzz x | x `mod
938.
▲
by
Tyr42
14y ago
What about functional programming? I quite liked my class on it. Also, at my school, we have a course on realtime programming on embedded systems. It's a cool class, I would like to still see it around. Also, a class on bash and unix wo
939.
▲
by
Tyr42
14y ago
So sad it's only for 1.9
940.
▲
by
Tyr42
14y ago
Yes, the lambda creates the function. Note that defvar does not. So there is still only one function being defined here.
941.
▲
by
Tyr42
14y ago
This translates into fn = lambda y=[y]: y.push(7); return y if you accept the ; to separate statements, as the lambda in python is syntactically only allowed to contain one statement. (The introduction of the variable x into the ex
942.
▲
by
Tyr42
14y ago
So, I'm pretty sure ou can do this with racket.
943.
▲
by
Tyr42
14y ago
Am I the only one who liked the new OSX version?
944.
▲
by
Tyr42
14y ago
Please, if you show me a list of things, let me use my arrowkeys. Also, can you finish more gracefully than giving my undefined?
945.
▲
by
Tyr42
14y ago
I had to click back to the site after reading your comment, as I didn't even notice it, so YMMV.
946.
▲
by
Tyr42
14y ago
But look at a query like "!hoogle (a->b) -> [a] -> [b]". That's a search on the type of a function, and I'd have to go to hoogle first, then search it from there. This adds value greater than the drawback of not using !python,
947.
▲
by
Tyr42
14y ago
Ok, !python, in particular, sucks. So don't ! the python. Everything else is a plus though. !hoogle is awesome.
948.
▲
by
Tyr42
15y ago
Excuse me for being offtopic, but how did you go about replacing the optical drive with a hard drive?
949.
▲
by
Tyr42
15y ago
Well, here's the type signatures for each: pure (== return) :: (Applicative f) => a -> f a <$> (== fmap) :: (Functor f) => (a -> b) -> (f a -> f b) join :: (Monad m) => m (m a) -> m a
950.
▲
by
Tyr42
15y ago
Well, most of it's sequences are lazy. map, take, ect are all lazy. Which is awesome because they are composable (at least, to me, coming from a Haskell background).
951.
▲
by
Tyr42
15y ago
Some of the comparisons to Haskell were in error. I submitted a pull request that fixed them.
952.
▲
by
Tyr42
15y ago
Why not jump to prolog if you want to want to declare what the properties of the code are and have the compiler figure out how to actually do it?
953.
▲
by
Tyr42
15y ago
Our advanced CS class (first year) has written a scheme interpreter. We were going to port it to C, from racket, but we ran out of time in the class. I might just finish it for fun this summer.
954.
▲
by
Tyr42
15y ago
I'm only getting errors when trying this. Error: Subroutine crash was not defined (address 40)
955.
▲
by
Tyr42
15y ago
But the rest of the fusion and other transformations work better when lazy.
956.
▲
by
Tyr42
15y ago
It'd be cool if it could say, show the data for all weekends at once, skipping over the weekdays.
957.
▲
by
Tyr42
15y ago
I have the same error on mac as well. I don't see anything wrong with the code for interact, it's just a print and gets.
958.
▲
by
Tyr42
15y ago
Look, Sal just hired Vi Hart to do more cool math stuff, the exact opposite of "wild goose chase" math.
959.
▲
by
Tyr42
15y ago
I know what you are talking about for knowing a book by it's thickness, But also, don't forget about the ability to textually search. I find it invaluable when trying to locate passages, and I really, really miss it when I have a paper boo
960.
▲
by
Tyr42
15y ago
So there are more advanced macros that are being used. It's not doing much a lisp couldn't do. I mean, look at scribble. It's still racket, even though it has not an s-exp in sight. Chains of soaked invocations are just a Maybe Monad any
More ›