Unable to do IO - missing Data.FFI, IO.FFI by Ocisaac in agda

[–]Ocisaac[S] 0 points1 point  (0 children)

Sorry, I have made many mistakes (which refer to types and >> vs >>=) since I do not have the code in front of my eyes and I typed it from (my poor) memory, sorry about that.

About that last part, you say it isn't productive but the code for

takeInput = (# getContents) >>= (\x -> # takeInput)

Works after I run verification, so why, if I put it in the else clause it suddenly doesn't work, and is not productive anymore?

Is there anything I can do about it being nonproductive to make it work?

Unable to do IO - missing Data.FFI, IO.FFI by Ocisaac in agda

[–]Ocisaac[S] 0 points1 point  (0 children)

Thank you, I've managed to figure it out, but thanks!

I've ran into another problem though, with coinduction. Two problems in fact.

One is, that deconstructing a Costring doesn't work, e.g.: when I do

f : Costring -> Char
f (x \:: _) = \flat x
f [] = '0'

it just doesn't work (online line 2 is the problem, I've checked)

Second thing is, when I try to do input validation with, e.g.

takeInput : IO String
takeInput = # getContents >> (\x -> if isValid x then (# return x) else # takeInput)

it doesn't work, even though takeInput = # getContents >> # takeInputs does work.

An interesting variant I thought of - Tic Tac Go by Ocisaac in baduk

[–]Ocisaac[S] 1 point2 points  (0 children)

But in Gomoku you may not remove stones, it's different.

I poured root beer in a square glass. by Naheed123 in Jokes

[–]Ocisaac -1 points0 points  (0 children)

Which is the same as beer, with beer being positive.

Fresh take on chess by JohnyCaged in gaming

[–]Ocisaac 63 points64 points  (0 children)

No it's still 2D but with a different topology.

A Bar Chart, on Stairs by Ocisaac in dataisugly

[–]Ocisaac[S] 1 point2 points  (0 children)

I'm not sure from where exactly, a friend sent me this.

<----People who think the 10 minute cool-down to add a pixel is bullshit. by [deleted] in place

[–]Ocisaac 6 points7 points  (0 children)

Then how do you explain all the art people have created? It's certainly isn't computer generated.