Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Weird Lua bug(?)

Name: Anonymous 2007-11-19 14:12

Was attempting to write an ETHIOPIAN NIGGER-SCALE SOLUTION to the problem posed by the OP of this thread: http://dis.4chan.org/read/prog/1195330684/ when I ran into a really odd bug:
n,t=io.read("*number"),{}
while n~=0 do table.insert(t,n) end
for i,v in ipairs(t) do print(i,v) end


Run this code, it will prompt you for a number, enter one and hit return: it will eat as much memory and CPU cycles as possible.

What the shit?

Name: Anonymous 2007-11-19 16:18

>>6
(a -> Bool)       -> [a]        -> Maybe a
boolean predicate    list of as    single value a (if any)


What the fuck you don't understand?

Name: Anonymous 2007-11-19 16:23

Oh, I see. You think the boolean predicate should take a list of as. When exactly should it return True, then?

Name: Anonymous 2007-11-19 16:23

Oh, I see. You think the boolean predicate should take a list of as. When exactly should it return True, then?

Name: Anonymous 2007-11-19 16:25

>>6
Here, let me make it simpler for your simian brain:
findElement p = listToMaybe . filter p

Name: Anonymous 2007-11-19 16:29

STFU about boolean predicates and shit bunch of assfagots

Name: Anonymous 2007-11-19 16:35

>>11
The OMG OPTIMIZED kid is angry because we use big words he doesn't understand.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List