00:00:07 <ion> `run printf '%s\n' '#!/bin/sh' "find /var/irclogs/_esoteric -mindepth 1 -maxdepth 1 -type f -name '????-??-??.txt' | sort -r | xargs -d'\n' -r tac -- | grep \"^..:..:..: <"'$1'">\" | head -n 1" >bin/seen; chmod 755 bin/seen; cat bin/seen
00:00:10 <HackEgo> #!/bin/sh \ find /var/irclogs/_esoteric -mindepth 1 -maxdepth 1 -type f -name '????-??-??.txt' | sort -r | xargs -d'\n' -r tac -- | grep "^..:..:..: <$1>" | head -n 1
00:00:15 <ion> `seen elliott
00:00:18 <HackEgo> 23:54:46: <elliott> oerjan: ok you make it search in reverse order then \ xargs: tac: terminated by signal 13
00:00:28 <oerjan> hm we definitely want it to be case insensitive
00:01:35 <ion> Someone else figure the SIGPIPE thing out. :-P
00:01:49 <HackEgo> #!/bin/sh \ cd /var/irclogs/_esoteric \ if [ "$1" ]; then \ grep -P -i -- "$1" ????-??-??.txt | shuf -n 1 \ else \ file=$(shuf -en 1 ????-??-??.txt) \ echo "$file:$(shuf -n 1 $file)" \ fi
00:02:01 <elliott> `run sed -is 's/grep/grep -P -i/' bin/seen
00:02:10 <HackEgo> #!/bin/sh \ find /var/irclogs/_esoteric -mindepth 1 -maxdepth 1 -type f -name '????-??-??.txt' | sort -r | xargs -d'\n' -r tac -- | grep -P -i "^..:..:..: <$1>" | head -n 1
00:02:52 <elliott> ion: that is probably not really any faster btw
00:02:56 <elliott> since it has to list all the kajillion files
00:03:05 <elliott> which takes a noticeable amount of time locally
00:03:25 <ion> `run time find /var/irclogs/_esoteric -mindepth 1 -maxdepth 1 -type f -name '????-??-??.txt' | sort -r >/dev/null
00:03:27 <HackEgo> \ real0m1.196s \ user0m0.560s \ sys0m1.080s
00:04:02 <ion> `run time sh -c 'find /var/irclogs/_esoteric -mindepth 1 -maxdepth 1 -type f -name '????-??-??.txt' | sort -r >/dev/null'
00:04:04 <HackEgo> \ real0m0.930s \ user0m0.620s \ sys0m0.650s
00:04:33 <ion> '''' error, but i think time might not work here.
00:04:35 <ion> `run time true
00:04:36 <HackEgo> \ real0m0.001s \ user0m0.000s \ sys0m0.000s
00:04:44 <ion> `run bash -c 'time true'
00:04:45 <HackEgo> \ real0m0.001s \ user0m0.000s \ sys0m0.000s
00:04:50 <ion> `run sh -c 'time true'
00:04:55 <oerjan> `run cd /var/irclogs/_esoteric; ls ????-??-??.txt
00:04:57 <HackEgo> 2003-01-18.txt \ 2003-01-19.txt \ 2003-01-20.txt \ 2003-01-21.txt \ 2003-01-22.txt \ 2003-01-23.txt \ 2003-01-24.txt \ 2003-01-25.txt \ 2003-01-26.txt \ 2003-01-27.txt \ 2003-01-28.txt \ 2003-01-29.txt \ 2003-01-30.txt \ 2003-01-31.txt \ 2003-02-01.txt \ 2003-02-02.txt \ 2003-02-03.txt \ 2003-02-04.txt \ 2003-02-05.txt \ 2003-02-06.txt \ 2003-02-07
00:05:12 <oerjan> `run cd /var/irclogs/_esoteric; ls ????-??-??.txt | tac
00:05:14 <HackEgo> 2013-01-22.txt \ 2013-01-21.txt \ 2013-01-20.txt \ 2013-01-19.txt \ 2013-01-18.txt \ 2013-01-17.txt \ 2013-01-16.txt \ 2013-01-15.txt \ 2013-01-14.txt \ 2013-01-13.txt \ 2013-01-12.txt \ 2013-01-11.txt \ 2013-01-10.txt \ 2013-01-09.txt \ 2013-01-08.txt \ 2013-01-07.txt \ 2013-01-06.txt \ 2013-01-05.txt \ 2013-01-04.txt \ 2013-01-03.txt \ 2013-01-02
00:05:33 <elliott> you can make ls sort reversed
00:06:08 <elliott> `run cd /var/irclogs/_esoteric; ls -r
00:06:09 <HackEgo> stalker.php \ latest.txt \ index.php \ 2013-01-22.txt \ 2013-01-22-raw.txt \ 2013-01-21.txt \ 2013-01-21-raw.txt \ 2013-01-20.txt \ 2013-01-20-raw.txt \ 2013-01-19.txt \ 2013-01-19-raw.txt \ 2013-01-18.txt \ 2013-01-18-raw.txt \ 2013-01-17.txt \ 2013-01-17-raw.txt \ 2013-01-16.txt \ 2013-01-16-raw.txt \ 2013-01-15.txt \ 2013-01-15-raw.txt \ 2013-01
00:06:19 <ion> stalker.php?
00:06:21 <elliott> `run cd /var/irclogs/_esoteric; ls -r | grep '????-??-??\.txt'
00:06:30 <Bike> ion: probably what runs stalker mode?
00:06:34 <elliott> `run cd /var/irclogs/_esoteric; ls -r | grep '....-..-..\.txt' | head -n 1
00:07:39 <elliott> `run echo "#!/bin/sh" >bin/seen; echo 'cd /var/irclogs/_esoteric' >>bin/seen; echo 'for file in $(ls -r | grep "....-..-..\.txt"); do grep -P -i "^..:..:..: <$1>" $file; done | tail -n 1' >>bin/seen; chmod +x bin/seen
00:07:42 <oerjan> `run cd /var/irclogs/_esoteric; ls -r ????-??-??.txt
00:07:44 <HackEgo> 2013-01-22.txt \ 2013-01-21.txt \ 2013-01-20.txt \ 2013-01-19.txt \ 2013-01-18.txt \ 2013-01-17.txt \ 2013-01-16.txt \ 2013-01-15.txt \ 2013-01-14.txt \ 2013-01-13.txt \ 2013-01-12.txt \ 2013-01-11.txt \ 2013-01-10.txt \ 2013-01-09.txt \ 2013-01-08.txt \ 2013-01-07.txt \ 2013-01-06.txt \ 2013-01-05.txt \ 2013-01-04.txt \ 2013-01-03.txt \ 2013-01-02
00:07:53 <elliott> oerjan: that does the ls in the shell, though
00:07:57 <elliott> so you're not saving anything
00:08:10 <elliott> `run echo "#!/bin/sh" >bin/seen; echo 'cd /var/irclogs/_esoteric' >>bin/seen; echo 'for file in $(ls -r | grep "....-..-..\.txt"); do grep -P -i "^..:..:..: <$1>" $file; done | head -n 1' >>bin/seen; chmod +x bin/seen
00:09:37 <HackEgo> 00:06:30: <Bike> ion: probably what runs stalker mode?
00:10:15 <HackEgo> 00:01:49: <elliott> `cat bin/log
00:10:46 <Bike> presumably for `seen me it ought to return `seen me
00:10:47 <oerjan> elliott: you're not doing each file backwards
00:10:54 <elliott> `run echo "#!/bin/sh" >bin/seen; echo 'cd /var/irclogs/_esoteric' >>bin/seen; echo 'ls -r | grep "....-..-..\.txt" | while read file; do grep -P -i "^..:..:..: <$1>" $file | tail -n 1; done | head -n 1' >>bin/seen; chmod +x bin/seen
00:11:27 <Bike> grep -P is apparently PCRE mode, i'm lost
00:11:31 <HackEgo> 00:11:01: <elliott> `seen elliott
00:11:48 <myndzi> i can write regex but i can never seem to use regex grep
00:11:59 <Bike> c00kiemon5ter: "engineering"
00:12:40 <elliott> does anyone wnat to optimise this code
00:13:03 -!- epicmonkey has quit (Ping timeout: 245 seconds).
00:13:55 <oerjan> `run sed -i 's/-P/-H -P/' bin/seen
00:14:16 <kmc> "perl" "compatible" "regular" expressions
00:14:19 <myndzi> speaking of "engineering", any of you play spacechem?
00:14:25 <elliott> kmc: not very expressive either
00:14:34 <HackEgo> 2013-01-22.txt:00:12:40: <elliott> does anyone wnat to optimise this code
00:14:36 <Bike> i feel likei should complain about grep's regex implementation too
00:14:38 <elliott> oerjan: I like how the original version was by far the fastest
00:14:56 <Bike> no we already covered that, pike bla bla bla
00:15:31 <Bike> is there a good way to profile shell scripts
00:15:46 <Bike> olsner: rob, rc2 and shit
00:15:59 <olsner> ah, not pike the programming language then
00:16:10 <Bike> or whatever that implementation is called
00:16:56 -!- augur has joined.
00:17:08 <olsner> (http://pike.lysator.liu.se/)
00:18:14 <kmc> http://swtch.com/~rsc/regexp/regexp1.html this maybe?
00:18:28 <Bike> well that's the paper
00:18:49 <Bike> but last time it was mentioned somebody (probably elliott, why must you mock me) mentioned a regex implementation based on it
00:18:55 <kmc> google's RE2?
00:18:59 <Bike> yeah that one.
00:19:06 <kmc> yeah it's pretty good
00:19:10 <kmc> i wrote incomplete Haskell bindings
00:19:18 <kmc> a friend used RE2 to make http://livegrep.com
00:27:42 <c00kiemon5ter> `run ls -r /var/irclogs/_esoteric/????-??-??.txt | while read -r file; do grep -i "^..:..:..: <c00kiemon5ter>" "$file" | tail -n 1; done | head -n 1
00:28:13 <HackEgo> 00:27:42: <c00kiemon5ter> `run ls -r /var/irclogs/_esoteric/????-??-??.txt | while read -r file; do grep -i "^..:..:..: <c00kiemon5ter>" "$file" | tail -n 1; done | head -n 1
00:37:32 <Sgeo> I can imagine some ways to write really horrific Smalltalk code
00:37:44 <Bike> smalltalk golf
00:37:50 <kmc> you could enter it into my devious code contest
00:37:52 <kmc> if i ever run that
00:38:00 <saijanai_> you can write bytecode, ,put it in a byte array, and evaluate it
00:38:17 <olsner> that's not devious, that's obvious
00:38:18 <Sgeo> There are objects that respond to value to mean something other than execution or cached or whatever:
00:38:21 <Bike> calling out to assembly is so boring though!
00:38:28 <kmc> i did that in haskell once
00:38:41 <kmc> with native machine code
00:38:43 <Bike> now, if you could treat an object as a byte array and evaluate it
00:38:47 <Bike> then we're talkin
00:38:54 <Sgeo> (2 > 1) ifTrue: 'a' -> 'b' ifFalse: 'b' -> 'a'
00:39:15 <saijanai_> Bike at the metaprogramming level, you can do lots of oddities.
00:39:16 <Sgeo> The result of that is 'b'
00:39:24 <Sgeo> Makes an association
00:39:35 <Sgeo> 'a' -> 'b' is an Association with key 'a' and value 'b'
00:39:48 <Bike> so why doesn't it return however you notate {a,b}
00:39:52 <saijanai_> a := 'a' -> 'b'. creates an association
00:40:07 <Bike> if it's just an operator precedence thing than that's also boring
00:40:15 <saijanai_> it is an object of class Association
00:40:18 <Sgeo> elliott, well, it's Smalltalk, don't expect plain tuples
00:40:31 <elliott> sounds like a plain tuple with the name Association
00:40:31 <Sgeo> In particular, its parts are accessed with key and ... value
00:40:32 <Bike> why couldn't you have plain tuples in smalltalk
00:40:54 <Bike> so you have a Tuple object that responds to member0: or w/e
00:41:05 -!- oerjan has quit (Quit: Good night).
00:41:07 <Bike> or well how you already do arrays probably
00:41:08 <Sgeo> There are arrays
00:41:08 <saijanai_> so you COULD create a method #asTuple for association
00:41:21 <Sgeo> {'a'. 'b'} at: 1
00:41:38 <Sgeo> But it's nice to store and document the meaning of the container
00:41:41 <Bike> anyway, explain your "deviousness", sgeo.
00:41:48 <elliott> Bike: are you as bored as me
00:41:59 <Bike> yes, yes i am.
00:42:00 <Sgeo> 'a' -> 'b' is an object, that responds to the value message
00:42:09 <Bike> smalltalk is way more interesting than... some tv show i'm not really paying attention to
00:42:21 <Sgeo> ifTrue:ifFalse: sends value to whichever argument is the correct one
00:42:28 <Bike> saijanai_: metaprogramming reminds me, what kind of messages do blocks respond to?
00:42:33 <Sgeo> Normally, the value message is sent to a block to execute it
00:42:54 <Sgeo> But in this case, the value message is being sent to an Association
00:43:04 <saijanai_> #value, #value:, #value:value: etc
00:43:25 <Bike> elliott: something about squids that doesn't have nearly enough biology
00:43:58 <elliott> Bike: biology just gets in the way of squids really
00:44:05 -!- copumpkin has quit (Ping timeout: 248 seconds).
00:44:25 <Bike> nope squid biology is awesome sorry
00:44:37 <Bike> i would watch a textbook on cephalopodology in tv show form
00:44:41 -!- copumpkin has joined.
00:45:02 <elliott> ok but only if it's not a documentary
00:45:08 <elliott> romantic comedy series about squid biology
00:45:09 <saijanai_> pitch it to the History or Discovery channels but you need to have aliens
00:45:14 <Bike> yeah, that'd be good.
00:45:15 <Sgeo> assoc := Association new.
00:45:15 <Sgeo> assoc ifNotNilDo: assoc.
00:45:33 <Bike> what, smalltalk has nil?
00:45:33 <Sgeo> What does assoc look like now?
00:45:54 <saijanai_> nil is one of the 6 predefined words of Smalltalk
00:46:22 <Bike> what's it for? doesn't really seem like a language that needs a null pointer
00:46:25 <c00kiemon5ter> `run ls -r /var/irclogs/_esoteric/????-??-??.txt | while read -r file; do awk -vs="^..:..:..: <c00kiemon5ter>" '$0 ~ s{x=$0} END{if(!x) exit 1; print x}' "$file" && break; done
00:46:27 <HackEgo> 00:46:25: <c00kiemon5ter> `run ls -r /var/irclogs/_esoteric/????-??-??.txt | while read -r file; do awk -vs="^..:..:..: <c00kiemon5ter>" '$0 ~ s{x=$0} END{if(!x) exit 1; print x}' "$file" && break; done
00:46:45 <Sgeo> I'd blame this on the use of the same selector (method name) to mean different things to different classes
00:47:09 <Bike> oh, so just the false value?
00:47:14 <Sgeo> Where with generic methods, each method presumably has one intended meaning, with this style of OO, the same method name can be used to mean utterly different things in different contexts
00:47:24 <Sgeo> Bike, false is the false value
00:47:31 <Bike> so... what's nil for
00:47:40 <saijanai_> it is the default object type for any undefined variable name
00:47:55 <saijanai_> so you automatically catch undefined variables
00:47:58 <c00kiemon5ter> `run printf '%s\n' '#!/bin/sh' 'ls -r /var/irclogs/_esoteric/????-??-??.txt | while read -r file; do awk -vs="^..:..:..: <$1>" '$0 ~ s{x=$0} END{if(!x) exit 1; print x}' "$file" && break; done' >bin/seen
00:47:59 <HackEgo> bash: -c: line 0: syntax error near unexpected token `(' \ bash: -c: line 0: `printf '%s\n' '#!/bin/sh' 'ls -r /var/irclogs/_esoteric/????-??-??.txt | while read -r file; do awk -vs="^..:..:..: <$1>" '$0 ~ s{x=$0} END{if(!x) exit 1; print x}' "$file" && break; done' >bin/seen'
00:48:43 <c00kiemon5ter> `run echo '#!/bin/sh' >bin/seen; echo 'ls -r /var/irclogs/_esoteric/????-??-??.txt | while read -r file; do awk -vs="^..:..:..: <$1>" '$0 ~ s{x=$0} END{if(!x) exit 1; print x}' "$file" && break; done' >>bin/seen
00:48:44 <HackEgo> bash: -c: line 0: syntax error near unexpected token `(' \ bash: -c: line 0: `echo '#!/bin/sh' >bin/seen; echo 'ls -r /var/irclogs/_esoteric/????-??-??.txt | while read -r file; do awk -vs="^..:..:..: <$1>" '$0 ~ s{x=$0} END{if(!x) exit 1; print x}' "$file" && break; done' >>bin/seen'
00:48:52 <Sgeo> I think this is an argument for having first class methods
00:49:01 <Sgeo> Something more like CLOS than like Smalltalk
00:49:33 <saijanai_> sgeo I'm not familiar with how CLOS does things
00:49:37 <Bike> i think i asked this before, but, i thought you didn't have to have a notion of methods, just objects responding however they want to messages. which would be methods in most situations but not necessarily.
00:50:09 <Bike> I'm not sure what CLOS has to do with anything.
00:50:22 <Sgeo> saijanai_, you create generic functions, and then can separately define implementations if, say, argument 1 is some class or a subclass
00:50:33 <saijanai_> a message in smalltalk is a bunch of variables on the stack followed by the method name
00:50:47 <Sgeo> Bike, just noting a different between CLOS and Smalltalk
00:50:50 <Sgeo> Besides the obvious
00:50:59 <Bike> "a difference"? they're totally different
00:51:49 <HackEgo> cat: bin/seen : No such file or directory
00:51:51 <saijanai_> Sgeo I imagine StrongTalk allows something like that, but StrongTalk never became real popular, even by Smalltalk standards
00:52:48 <HackEgo> ? \ @ \ WELCOME \ addquote \ allquotes \ anonlog \ botsnack \ calc \ define \ delquote \ emoclew \ etymology \ forget \ fortune \ frink \ google \ hatesgeo \ interp \ joustreport \ jousturl \ json \ karma \ karma- \ karma+ \ learn \ list \ lists \ log \ logurl \ lua \ luac \ luarocks \ luarocks-admin \ macro \ makelist \ maketext \
00:52:49 -!- augur_ has joined.
00:52:51 -!- augur has quit (Ping timeout: 244 seconds).
00:53:24 <HackEgo> ls: cannot access bin | tac: No such file or directory
00:53:25 <Bike> I thought strongtalk was a smalltalk with strong typing? CLOS isn't really an efficiency thing, it's just a way of object-system-ing that's different from smalltalk
00:53:42 <Sgeo> Bike, here's what I'm getting at.
00:53:54 <HackEgo> zalgoerjan \ zalgo \ wtf \ words \ word \ wl \ WELCOME \ WeLcOmE \ welcome \ url \ units \ translatetoerjan \ translateto \ translatefromto \ translate \ toutf8 \ tell \ tclkit \ show \ seens \ seen \ searchlog \ runce \ runc \ run \ rot13 \ roll \ rng \ relcome \ randomanonlog \ quotes \ quote \ quørjan \ quoerjan \ quachaf \ qc \ prefixes \ ping
00:53:59 <Sgeo> With CLOS, each generic function is a concrete value, a thing, that's intended to have one sort of functionality.
00:54:11 <HackEgo> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html><head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>ERROR: The requested URL could not be retrieved</title> <style type="text/css"><!-- %l body :lang(fa) { direction: rtl; font-size: 100%; font-family: Tahoma, Roya, sa
00:54:16 <Sgeo> With a method call, there is no "This is the #value method, here's what it means"
00:54:28 <kmc> Bike: NOVA has some episodes about cephlapods
00:54:30 <Bike> right, because smalltalk is object-centric instead of function-centric.
00:54:33 <kmc> i think the cuttlefish one is free online
00:54:40 <Bike> fuck yes cuttlefish
00:54:46 <Bike> oh i should find that jellyfish video
00:54:47 <Sgeo> Thus, different classes use it to mean different things. BlockClosure>>value means something totally different from Association>>value
00:54:54 <saijanai_> Bike, yeah. So if STrongTalk has some kind of anonymous function,, like squeak's completions, then it could have some kind of typed blocks. Whether it does or not...
00:55:18 -!- zzo38 has quit (Remote host closed the connection).
00:55:21 <HackEgo> --2013-01-22 00:55:20-- http://sprunge.us/bCUe \ Connecting to 127.0.0.1:3128... failed: Connection refused.
00:55:31 <kmc> 'completions'?
00:55:56 <Bike> if i had to implement CLOS in a Smalltalk environment (why) I'd have gfs just have a "call" method (assuming there's some kind of introspection to see if a given object is of a given class)
00:56:18 <Sgeo> I'm writing a blog post about this
00:56:20 <Bike> or well, whatever messages blocks have, i guess.
00:56:22 <kmc> first class functions are such a good idea that people keep inventing them over and over with different names
00:56:26 <Bike> http://www.youtube.com/watch?v=3HzFiQFFQYw Also, jellyfish.
00:56:39 <Bike> I thought Smalltalk had first class functions anyway, with blocks.
00:56:40 <kmc> everyone knows lambdas are academic nonsense, but these Ruby blocks are really webscale!
00:56:54 <Bike> clearly what we need is more vaus
00:57:05 <Sgeo> It's hard to write pointfree Smalltalk code
00:57:06 <kmc> vau the ultimate
00:57:08 <saijanai_> blocks now allow recursion by referring to a reference outside the block
00:57:09 <Bike> smalltalk with vau calculus, let's get on it
00:57:19 <Bike> saijanai_: closures?
00:57:25 <Sgeo> Whereas in Factor, everything's pointfree by default
00:57:33 <Bike> oh that reminds me that i have no fucking clue how scope works in smalltalk still
00:57:34 <saijanai_> ah, closures, not completiions, sorry
00:57:36 <Sgeo> Bike, yes (although I don't know whether that's dialect specific)
00:57:55 <saijanai_> Bike there's no scope except that defined by the specific workspace you're using
00:58:07 <Bike> i have no idea what that means, yay.
00:58:17 <kmc> http://i.imgur.com/Ar2lNLy.png
00:58:25 <saijanai_> the inspector pane has a predefined variable named self that is implicit
00:58:37 <Bike> perhaps i should mention that my smalltalk experience consists of listening to kay at oopsla, and scanning through a smalltalk-80 manual one time
00:58:43 <Sgeo> Well, you could always do the lambda thing for new scopes, although that sucks
00:59:07 <Sgeo> [:a | "now a is in scope lexically here but not out there" ] value: 5
00:59:11 <Bike> someday i will figure out why most languages don't have "let" and just let you declarate everywhere instead
00:59:27 <Sgeo> Bike, Smalltalk methods are supposed to be small
00:59:51 <Sgeo> If Smalltalk had macros *grr it doesn't* would be easy to transform into a block with value:
00:59:52 <saijanai_> http://www.youtube.com/watch?v=Es7RyllOS-M&list=SP6601A198DF14788D
00:59:56 <Sgeo> Typical transform of let into lambda
01:00:23 <Bike> saijanai_: last time i tried i think my man issue was it not working with my weird screen resolution.
01:00:49 <Bike> also, youtube videos about programming give me hives,but whatever.
01:01:07 <c00kiemon5ter> `run printf '%s\n' '#!/bin/sh' 'ls -r /var/irclogs/_esoteric/????-??-??.txt | while read -r file; do awk -vs="^..:..:..: <$1>" '\''$0 ~ s{x=$0} END{if(!x) exit 1; print x}'\'' "$file" && break; done' >bin/seen
01:01:12 <saijanai_> mine are sorta like pair-programming tutorials. Done in the style of Salman Khan
01:01:18 <HackEgo> #!/bin/sh \ ls -r /var/irclogs/_esoteric/????-??-??.txt | while read -r file; do awk -vs="^..:..:..: <$1>" '$0 ~ s{x=$0} END{if(!x) exit 1; print x}' "$file" && break; done
01:01:29 <kmc> awk rockstars itt
01:01:36 <Bike> saijanai_: google tells me that's an actor
01:01:36 <HackEgo> 01:01:34: <c00kiemon5ter> `seen c00kiemon5ter
01:02:02 <kmc> khaaaaaaaaaaan!
01:02:38 <saijanai_> he gets $1 million grants to do youtube videos
01:02:38 <kmc> Bike: there are cool cephalopod videos on youtube as well
01:02:42 <kmc> mimic octopus is great
01:02:51 <kmc> it pretends to be a snake or a pointy fish or a rock
01:02:57 <Bike> octopuses running on the plains are my favorite
01:03:05 <kmc> also http://fuckyeahcuttlefish.tumblr.com/
01:03:24 <Phantom_Hoover> i have a feeling one of my lecturers is trying to go down the khan route
01:03:36 <Sgeo> saijanai_ is totally going to get bored of this place next time my language switches
01:03:44 <kmc> also http://fyeahcuttlefish.tumblr.com/
01:03:52 <kmc> too fantastic for one tumbler
01:04:09 <kmc> i really really really want a cuttlefish aquarium but I would probably kill them almost instantly
01:04:46 <Bike> keeping aquariums is a lot of work, anyhow
01:05:00 <Bike> even for things less exotic than cephalopods
01:05:03 <kmc> especially large saltwater creatures that eat several live crabs per day
01:05:14 <Phantom_Hoover> i like how a baby cuttlefish is still cute despite being a scaled-down normal cuttlefish
01:05:19 <kmc> and can shoot water and ink all over the place
01:05:22 <Bike> a mantis shrimp would be cool but i should probably stick to dissecting them
01:05:29 <kmc> Phantom_Hoover: uh small things are always cuter
01:05:37 <kmc> the boston aquarium has baby cuttlefish and they are the best
01:05:45 <Bike> kmc: that thing about rocketing backwards and exposing their bones in that thing you linked was creepy :(
01:06:17 <saijanai_> sgeo yeah, I only heard about this channel because you mentioned it anyway
01:06:32 <Bike> you could be the next me! but without the stunning sense of fashion
01:09:21 <olsner> time to watch some cuttlefish eating crabs
01:10:44 <elliott> kmc: i like how "tumbler" no longer looks like a word
01:10:47 <elliott> is this the price of web 2.0
01:11:12 <Bike> twittr. facebok
01:11:17 <kmc> facebok choy
01:11:30 <kmc> what price damnation now
01:13:11 -!- kmc has set topic: FOUR SIMULTANEOUS TYPE SYSTEMS IN A SINGLE ROTATION OF THE LAMBDA CUBE | Necessity of inplantation of microchips every day is more and more obvious. | http://codu.org/logs/_esoteric/.
01:14:00 <Bike> that's kind of weird if you think about it. don't conspiracy nuts usually oppose chipping?
01:15:03 <kmc> i don't know if these are conspiracy nuts exactly
01:15:17 <kmc> so many kinds of crazy
01:15:36 <Sgeo> who are these/
01:15:40 <Sgeo> The RMX people, or someone else?
01:15:41 <kmc> they don't claim that the government has UFO technology. they claim to have UFO technology themselves
01:16:05 <kmc> one of the applications of RMX is unbreakable crypto for "FULL ABSOLUTE PROTECTION OF MICROCHIPS IMPLANTED INTO THE HUMAN !!!"
01:16:20 <Bike> so they /are/ the shadow government! except incompetent.
01:17:00 <kmc> yeah they haven't even been able to figure out time travel or teleportation yet
01:17:14 <kmc> that's like a first term project at UFO tech school
01:18:06 <olsner> but they don't claim to have gone to ufo tech school though, do they?
01:18:11 <kmc> i'm not actually sure that they have much to say about UFO technology other than that every page has the <title> "UFO TECHNOLOGY"
01:18:12 <olsner> so they just have the ufo tech itself, without the skills to use it properly
01:18:41 <olsner> (time travel is trivial once you know which button makes it go)
01:22:37 <Bike> the goofy site we were linking incessantly yesterday
01:24:03 -!- Arc_Koen has quit (Quit: The struct held his beloved integer in his strong, protecting arms, his eyes like sapphire orbs staring into her own. "W-will you... Will you union me?").
01:24:47 -!- Phantom_Hoover has quit (Remote host closed the connection).
01:26:43 <Sgeo> Probably easier to implement CReals in Smalltalk than in other languages
01:26:58 <Sgeo> I should go read a Haskell implementation and implement it.... somewhere
01:27:35 <Sgeo> Because it would be interesting and useful?
01:28:01 <Bike> no, i mean, why would it be easier in smalltalk
01:28:20 <Sgeo> Probably easier to fit a new kind of number into the number hierarchy
01:28:46 <Bike> can you make it work so that 4 + <your creal> works, and not just <your creal> + 4?
01:28:51 <monqy> Sgeo: imo read a haskell implementation and implement haskell
01:28:51 <Sgeo> saijanai_, any special considerations when dealing with things that might not terminate when sent = ?
01:28:55 <monqy> Sgeo: then just use haskell creals
01:29:38 <Sgeo> Bike, probably. I assume there's some system in place in case 4 + <blah> has an error
01:30:36 <Sgeo> Yeah, 4 + <foo> can end up sending a message to <foo> if it's not an Integer
01:31:16 <Sgeo> oh wait what the message is called adaptToInteger:andSend:
01:34:16 <Sgeo> "Modern functional programming languages such as ML and Haskell have followed Smalltalk's lead"
01:34:42 <Sgeo> [about "collection-based programming"]
01:35:03 <Bike> paradigm-based programming
01:38:52 <Sgeo> This is a terminally stupid idea:
01:39:11 <Sgeo> (2 > 1) ifTrue: someValueDontKnowWhatItIs ifFalse: someOtherValue
01:39:52 <Sgeo> saijanai_, is there a way to seach Pharo for any uses of ifTrue:ifFalse: etc. that look like that?
01:39:56 <Sgeo> Not using a block?
01:41:45 <saijanai_> Sgeo there's a menu choice in squeak that searches for methods, but it causes an error in every version I have used. There's specific methods that do that kind of thing, but I don't remember what they are
01:42:25 <saijanai_> it causes an error in *pharo* when you use the menu. It works fine in squeak, the last time i checked
01:43:08 <Bike> computable real.
01:43:27 <Bike> a way of representing (a countable subset of) real numbers in computers. that's not floats.
01:44:07 <Sgeo> You can describe pi exactly by giving an algorithm, and a CReal would store that algorithm
01:44:12 <saijanai_> never heard of it. IT should be easy to implement methods for such a thing, but to make it a first class citizen like 1.207, you would have to change the parser
01:44:23 <shachaf> You can also describe pi exactly by saying "pi".
01:44:45 <Sgeo> saijanai_, I don't think changing the parser would be too useful here
01:45:14 <saijanai_> why not? all of smalltalk is built around the parser. There's no predefined syntax that can't be changed
01:45:27 <saijanai_> though some things would break if you changed things too much, obviously
01:45:34 <shachaf> Sgeo: You should represent CReals as constructive Dedekind cuts.
01:45:43 <shachaf> That's the only true way to construct the reals.
01:46:08 <Bike> saijanai_: how would you add syntax for another kind of number literal?
01:46:22 <Sgeo> saijanai_, there's no really obvious way to write down a creal like pi other than some sort of constructor that takes a block
01:46:40 <Sgeo> There's no reason for it to be easier than a message send
01:46:47 <Sgeo> Although I am curious about this parser modification
01:47:11 <saijanai_> for example, an arbitrary floating point number that uses the libgmp library could be autodefined by fp := 1.2765r
01:47:13 <Sgeo> I wonder what will break if I delete Object>>value
01:47:33 <Sgeo> saijanai_, these things aren't floating-point. Conceptually, they're infinite precision
01:47:35 <saijanai_> which would create a special object that knows how to call the external libs instead of the regular libs
01:47:40 <Bike> so where's the libgmp hook up?
01:48:11 <Bike> i mean, i want to know how you'd do the modification, so that 1.2765r is read in as a gmp float instead of a regular float
01:48:17 <saijanai_> an object of tiype Libgmp would use its own #+ messages
01:49:02 <saijanai_> Bike, you would change the parser to look for an otherwise valid number that ends with r
01:49:11 <Bike> yes, but what are the particulars.
01:49:40 <saijanai_> you can add scientific notation to the end of a number and automatically create floats, for example
01:50:17 <saijanai_> one of the OpenGL interface libraries adds the trinary operator x@y@z to a point3
01:50:39 <Sgeo> saijanai_, are you sure that's a parser modification?
01:50:51 <Sgeo> Sounds like it might just be a modification to Point to accept a @ message
01:51:39 <saijanai_> Sgeo, pretty sure as Point3D is a different class, and trhing to add any trinary operator to a regular smalltalk class causes errors
01:51:51 <Sgeo> But... it wouldn't be a true trinary operator
01:52:03 <Sgeo> Does it actually act like a trinary operator?
01:52:12 <Sgeo> What happens if I do 1 @ 2 + 3 @ 4?
01:52:38 <saijanai_> I don't know the operator precidence for @ vs + I think they are the same
01:52:58 <saijanai_> so is + defined for Point objects?
01:53:36 <Sgeo> Probably not. By normal precedence rules, + would get sent to a Point object. But if there are now magical ternary operators, they might mess up precedence somehow
01:54:09 <saijanai_> sgeo, only in the image that has the OpenGL interface lib installed
01:54:26 <Sgeo> Why would someone make a parser change when they could just change Point? Especially in the Smalltalk culture of "Oh I love monkey-patching"
01:54:30 <saijanai_> monticello allows a class to monkey-patch the IDE when something is installed
01:54:52 <Bike> why would someone make a parser change <-- like we've ever needed a good reason to fuck with parsing
01:54:53 <Sgeo> Where's the image?
01:55:27 <Sgeo> Yes but I gather that the point3d thing is serious business, not just fun
01:55:42 <saijanai_> the lisp librray and Ometa both change the IDE's parser so that the class specific version is used when editing objects of a specific class or subclass
01:56:23 <Sgeo> saijanai_, fair enough. But I still don't see why any significant changes of that nature are needed for 1@2@3
01:56:24 <saijanai_> so you can write lisp methods when you work with the Lisp class, and you can embed arbitrary languages into an Ometa method
01:56:41 <saijanai_> what does 1@2@3 do in normal smalltalk?
01:57:06 <Sgeo> First, @ would get sent to 1 with argument 2, creating a Point
01:57:12 <saijanai_> a := 1@2. 1 receives the @message with 2 as a parameter, creating a point
01:57:22 <Sgeo> Then, the created Point object receives a message @ with argument 3
01:57:39 <Sgeo> So, all that's needed for Point3D is to change Point to respond to that message with a Point3D
01:58:28 <saijanai_> I think that unary methods work differently. you don't need ':' with a unary method, so you have to define the method @@ to be sent as a message
01:58:50 <Sgeo> @ is being used here as a binary message
01:58:58 <Sgeo> You do know what those are, right?
01:59:52 <saijanai_> I don't know that chaing the parser was needed, but it was (I believe) done because a normal smalltalk doesn't accept a message defined as @@
02:00:10 <Sgeo> But we don't need a message @@
02:00:10 <saijanai_> and that is how it is defined for Point3D
02:00:28 <saijanai_> as I said, I don't know if it was needed, but @@ is defined for Point3D
02:02:08 -!- derkus has joined.
02:07:21 <saijanai_> ah, wait, no it only takes a single @
02:10:43 <Sgeo> Non-terminating =. Bad idea?
02:11:30 <Bike> only if you're a wuss!
02:11:54 -!- sebbu has quit (Read error: Connection reset by peer).
02:12:17 -!- sebbu has joined.
02:12:17 -!- sebbu has quit (Changing host).
02:12:17 -!- sebbu has joined.
02:24:33 -!- DHeadshot has joined.
02:26:02 <HackEgo> DHeadshot: Welcome to the international hub for esoteric programming language design and deployment! For more information, check out our wiki: http://esolangs.org/wiki/Main_Page. (For the other kind of esoterica, try #esoteric on irc.dal.net.)
02:26:47 <DHeadshot> I was just saying hi - I'm not new: check the logs.
02:27:28 <HackEgo> DHEADSHOT: WELCOME TO THE INTERNATIONAL HUB FOR ESOTERIC PROGRAMMING LANGUAGE DESIGN AND DEPLOYMENT! FOR MORE INFORMATION, CHECK OUT OUR WIKI: HTTP://ESOLANGS.ORG/WIKI/MAIN_PAGE. (FOR THE OTHER KIND OF ESOTERICA, TRY #ESOTERIC ON IRC.DAL.NET.)
02:29:17 <saijanai_> sgeo i apparently misremembered things completely
02:29:33 <saijanai_> point responds to @ by creating a Vector3
02:30:11 <DHeadshot> There was a programming language on minicomputers made by Honeywell in the 1960s called BACK. I can find no information about it online except that it exists. Anyone know anything of it?
02:30:58 <saijanai_> I believe tehere is a version that responds to @ @ but I don't know how it is implemented. adding another @ to the method name for Point causes a syntax error
02:31:15 <saijanai_> which is why I suspected that it was using a different parser
02:32:38 -!- monqy has quit (Ping timeout: 245 seconds).
02:33:20 <Bike> DHeadshot: no, but checked the usual places? softwarepreservation, hopl?
02:37:44 <saijanai_> sgeo further googling shows a discusion of pt := 1@2@3. In dolphin smalltalk, but not squeak
02:37:52 <saijanai_> more than likely I jiust got confused
02:38:23 -!- copumpkin has quit (Ping timeout: 252 seconds).
02:39:01 -!- copumpkin has joined.
02:40:50 -!- DHeadshot has quit (Read error: Connection reset by peer).
02:40:56 -!- DH____ has joined.
02:42:09 <DH____> Seems none of those go back that far...
02:43:57 -!- DH____ has changed nick to DHeadshot.
02:46:06 -!- monqy has joined.
02:47:00 <shachaf> monqy: lens 3.8 is out btw
02:47:24 <monqy> should i go stable or stay on HEAD
02:47:35 <monqy> what if there are new innovations!!!lens innovations
02:47:36 <kmc> git checkout origin/yolo
02:55:50 -!- DHeadshot has quit (Read error: Connection reset by peer).
02:55:56 -!- DH____ has joined.
02:59:53 -!- DH____ has changed nick to DHeadshot.
03:10:29 <kmc> shachaf: AMD64 Linux has "syscall; ret" at a fixed address (in the legacy vsyscall page)
03:10:47 <shachaf> kmc: Yep, we've talked about that before in here, I think.
03:10:48 <kmc> does this make ROP significantly easier or is there some reason why it's not that useful
03:10:51 <kmc> i think so too
03:11:54 <shachaf> Though you probably need a bunch of other gadgets to make it useful.
03:12:01 <kmc> you need to get useful values into registers
03:12:22 <shachaf> But I guess most code doesn't have a syscall instruction at a known address.
03:12:24 <kmc> i assume grsec disables it
03:12:29 <kmc> well, it depends
03:12:35 <kmc> if you have exe ASLR then yes
03:12:39 <kmc> but that's still pretty uncommon
03:12:51 <shachaf> This page isn't even used for anything, is it?
03:13:01 <kmc> I guess .so ASLR is good enough for a typical dynamically linked programa
03:13:10 <kmc> shachaf: legacy ABI compat only
03:13:28 <kmc> this came up again because somebody asked why clock_gettime isn't in vsyscall.h even though it's a vsyscall
03:13:30 -!- EgoBot has quit (Read error: Connection reset by peer).
03:13:33 <kmc> i think that is the header for this legacy mechanism
03:13:45 <kmc> linux's "never ever break userspace binaries" policy is... not the best for security
03:14:01 -!- EgoBot has joined.
03:14:01 <shachaf> I think the Windows approach is probably better for that.
03:14:10 <shachaf> Putting all the compatibility cruft in userspace libraries.
03:14:33 <kmc> smaller and less crufty kernel attack surface
03:15:08 <kmc> maybe linux should just not map that page and emulate it via the page fault handler
03:15:28 -!- zzo38 has joined.
03:15:28 <kmc> then people will google "why did my old program get 5000000x slower in Linux 3.12"
03:16:46 <shachaf> On the other Windows still does things like font rendering in the kernel.
03:16:59 <kmc> or it could map it on first use, but do some sanity checks first (not sure what exactly)
03:17:19 <Bike> Is there a format for fonts that allows arbitrary code execution yet
03:17:28 <kmc> Bike: you mean on purpose? ;)
03:17:34 <kmc> i want NaCl fonts
03:17:47 <Bike> actually hell, we have TeX. does METAFONT?
03:19:28 <shachaf> TrueType fonts have little programs in them, right?
03:24:12 <shachaf> TrueType is JITted in Windows?
03:25:59 <zzo38> METAFONT does not have abitrary code execution; the input file allows arbitrary calculation but not file output or native code execution. The output is GF and TFM, which has enough commands for graphics and ligature/kern and a few other things.
03:30:55 -!- DHeadshot has quit (Read error: Connection reset by peer).
03:31:01 -!- DH____ has joined.
03:34:13 -!- sivoais_ has joined.
03:40:17 <shachaf> is that a hi of disapproval :'(
03:40:50 <shachaf> monqy: don´t you hi of disapproval me¡¡
03:43:13 -!- DH____ has quit (Read error: Connection reset by peer).
03:45:18 -!- sivoais has quit (Quit: leaving).
03:46:36 -!- sivoais_ has quit (Quit: leaving).
03:47:03 -!- sivoais has joined.
04:12:10 -!- Bike has quit (Ping timeout: 260 seconds).
04:13:44 -!- Bike has joined.
04:49:22 -!- azaq23 has joined.
05:02:02 <kmc> Remove the stone of shame! Attach the stone of triumph!
05:02:36 <zzo38> I don't have either.
05:05:27 <Sgeo> Smalltalk invented MVC and then abandoned it
05:05:33 <Sgeo> I don't... quite get it
05:05:54 <quintopia> the examples they give for code projects still use it
05:05:56 <Sgeo> "Morphic allows merging Model and View in a single Morphic object that besides being a model, it also knows about user interaction. The controller is no longer needed."
05:06:14 <Sgeo> Uh, I don't think I feel totally comfortable with that coupling
05:06:21 <Sgeo> quintopia, what examples where?
05:07:04 <Sgeo> I thought that was Morphic
05:07:32 <quintopia> it separates the model and the view for sure
05:08:51 <Sgeo> "This is simpler, but won't allow for different views on the same model. If this is desired, model and view can be separated; making a non-morphic object for the model, and a morph for the view."
05:09:01 * Sgeo should learn to not stop reading at the first sentence.
05:10:23 <Sgeo> "The event propagation mechanism is available for communicating the view and the model in the same fashion as in MVC."
05:11:31 <Sgeo> Will Morphic be the UI toolkit that I feel comfortable writing UIs in???
05:11:35 <Sgeo> Will I ever find one?
05:11:56 <Sgeo> Like I could possibly settle down with a language long enough hahahah
05:12:12 <shachaf> If you ever find one, I'm sure we'll all hear about it.
05:12:14 <quintopia> drag and drop wysiwyg is the one true ui building system!
05:14:50 <Sgeo> "This makes Morphic the ideal environment to experiment, learn and write new styles in user interfaces, breaking away from what commercial programming tools allows us to do. Morphic is the future of user interfaces. "
05:15:17 <Sgeo> I... don't see people rushing to adapt Morphic. Probably because its philosophy seems rather anti "looking native"
05:16:04 <monqy> Why Morphic is Way Cool
05:16:04 <monqy> Last updated at 10:24 pm UTC on 13 December 2006
05:16:04 <monqy> A short essay by Jim Benson March, April 2000
05:16:08 <kmc> people don't care about native widgets anymore
05:16:13 <kmc> does google have native widgets? does facebook?
05:17:20 <kmc> i don't think i have a single 'native widget' open on my screen right now
05:17:22 <Sgeo> I was going to say that I think people would object to non-native ... whatever those buttons are at the top of the window, but Chrome...
05:17:45 <kmc> i have terminals, and i have chrome with its custom widgets, rendering pages with heavily styled if not fully custom widgets
05:18:03 <kmc> and i don't have those top buttons either
05:18:27 <monqy> whats a native widget hah hah hah
05:18:58 <kmc> it's funny because there was so much hand-wringing over whether Java apps could have native widgets
05:19:02 <kmc> and people just don't care at all today
05:19:13 <kmc> i think it's because the Java widgets were uglier than the native ones, whereas major websites have prettier widgets
05:19:30 <kmc> whenever i see a GTK widget now it's like a blast from the past
05:20:29 <quintopia> i have one smalltalk app on my computer and one on my phone
05:26:41 <zzo38> The program won't be compatible with all computers if you use native widgets.
05:28:34 <zzo38> But if the program is not meant for all computers then you might use native widgets it is reasonable.
05:30:35 <zzo38> Such as, if it is Windows, then it will work on Windows, and if it is UNIX, then it will work on UNIX, and so on, but if you use SDL then it will be compatible with most computers.
05:30:43 <quintopia> zzo38: could you hand the stone of shame to shachaf please
05:33:27 <Sgeo> "At the time of this writing (4/2000), Wired Fabrik is in development, and Wireless Fabrik still does not exist. In the next several months, expect sustained development in this project.
05:36:14 <Sgeo> Maybe I should read the laser game tutorial
05:36:24 -!- sivoais has quit (Ping timeout: 240 seconds).
05:45:13 <Sgeo> <purr> <micahjohnston> somebody should get a large corpus of english text in IPA and markov-chain it to a text-to-speech
05:55:31 -!- sivoais has joined.
06:06:46 -!- sivoais has changed nick to sivoais_.
06:07:51 <Sgeo> If anonymous functions are essential to really be considered functional programming, why not anonymous classes for class-based OO..... wait, Java does that *shudder*
06:08:37 <shachaf> what is the true meaning of functional programming
06:09:57 <shachaf> Sgeo is visited by the ghosts of functional programming past, functional programming present, and functional programming yet to come
06:12:38 <zzo38> Now the document of Internet Quiz Engine mentions the limits, and a few other things that I forgot to mention before.
06:14:12 -!- Zerker has joined.
06:16:14 <kmc> well you can do what Java does with a lot less syntax
06:16:42 <shachaf> but ew java does it, it can't be good !
06:16:52 <kmc> "You can do what Java does with a lot less syntax" -- Alan Perlis
06:17:01 <kmc> if java didn't jump off a cliff would you jump off a cliff
06:17:17 <kmc> gotta sleep, selfish replicators are trying to eat me
06:18:24 <shachaf> Most replicators are selfish.
06:19:56 <zzo38> "This game is bad because Hitler played it." (quotation from some computer game; it is untrue)
06:20:22 <shachaf> zzo38: The game is bad for a different reason?
06:20:54 <zzo38> Actually I don't think it is bad, but some people do, it is a matter of your opinion.
06:21:11 <zzo38> What I mean is that Hitler did not play it.
06:22:05 -!- Nisstyre has quit (Ping timeout: 246 seconds).
06:23:21 <quintopia> zzo38: but hitler breathed and used toilet paper. you should reconsider your life.
06:24:11 <shachaf> I thought zzo38 was a bot.
06:38:05 -!- Nisstyre has joined.
06:43:14 -!- Zerker has quit (Remote host closed the connection).
06:47:43 <zzo38> Is there the simple C library to store a read/write file-system in one file?
06:49:04 <shachaf> There is sqlite, not that that's really a filesystem.
06:49:54 <zzo38> I don't even need name of files, just numbers (although some numbers might be skipped).
06:53:50 <zzo38> I do know of sqlite but I don't think that is what I need.
06:54:11 <shachaf> Well, it'll let you map numbers to blobs.
06:55:28 <zzo38> I intend that it is not too slow, that you can add and delete files and affect their length, seek files like you can with actual files, without wasting space, etc. Maybe sqlite might do but it might also do various things which I don't need and to ruin something due to that, but maybe not, I don't know.
06:55:43 <zzo38> I have used sqlite before, so I know it can use for some things.
06:57:48 <zzo38> I know you can map numbers to blobs, but can you use fseek and that stuff with it? And, even if you can't, will it save space without having to move too many things around, if you delete stuff or append stuff or whatever?
06:58:23 <zzo38> That is why I wanted something else.
06:59:54 <zzo38> I tried to write one but it doesn't work; I would have to try again, if there isn't the other one.
07:01:51 -!- asiekierka has quit (Excess Flood).
07:04:40 -!- asiekierka has joined.
07:06:55 <zzo38> What I tried to do is this: There is the global header, which specifies the four byte maker ID, the block size, the first free block address, and the last free block address. Each block has the local header indicating the file type, file number, and either the next block number or the size of how much of this block is used; free blocks store the previous and next free block address.
07:06:57 <zzo38> However, it doesn't work.
07:08:21 <shachaf> I bet you could take a FUSE thing and reuse it.
07:09:06 <zzo38> But I want it to be not only on Linux.
07:09:22 <shachaf> You can take the code from some FUSE filesystem, I mean.
07:09:32 <shachaf> It would have all the operations you want.
07:09:36 <zzo38> O, OK. Do you know what ones?
07:13:36 <fizzie> There are probably quite a few custom such things, and I'm sure some have been librarized, but I don't know any names offhand. (Admittedly the number of read-only filesystem-in-a-file libs is probably much larger.)
07:14:31 -!- sivoais has joined.
07:18:22 <zzo38> fizzie: Is there something like what I was trying to make, but in a way that actually works, instead of doesn't work? (It doesn't have to be exactly like that; that just means what I tried, but, it doesn't work, so it should be different)
07:21:00 <fizzie> There are several small FAT libraries which let you plug in your own code to handle the storage side (designed for embedded stuff), but those probably assume that the size of the filesystem as a whole is fixed, and anyway I suppose there's no real reason to be FAT-compatible in this case.
07:23:20 <HackEgo> sivoais: Welcome to the international hub for esoteric programming language design and deployment! For more information, check out our wiki: http://esolangs.org/wiki/Main_Page. (For the other kind of esoterica, try #esoteric on irc.dal.net.)
07:23:21 <zzo38> It won't work, because, what I intend to use, is not FAT and is not fixed either.
07:25:18 <zzo38> C has no command to shorten a file, but that is OK if the free space in the file can be reused, and a separate program can be used to shorten the file (possibly including, defragmenting and then writing the output to a new file which might be shorter)
07:30:17 <zzo38> Is there no such program?
07:31:09 <fizzie> I will be somewhat surprised if there truly isn't, but it's not such an easy thing to search for.
07:31:12 <zzo38> I tried to write one but I think I did something wrong. Maybe I have to be more careful to figure out, and then make it. Do you know to do better?
07:38:30 <fizzie> What you described sounded reasonably reasonable. Possibly you might want to do tail-packing to save some space, but that does complicate things. (One alternative would perhaps be to use a userspace library for some "real filesystem" that's resize-friendly, and then resize the underlying file when it's getting too close to full or overly empty. But it does sound a bit clunky.)
07:42:08 <zzo38> But C doesn't have a command to resize the file; however, in what I am using, simply reusing the free space in the file is good enough (the file won't likely get much smaller, and if it does, you can use a separate program to transfer it to a new file, is OK). What does tail-packing mean?
07:43:08 <shachaf> Putting the end of a file into a block that also stores other files.
07:43:27 <fizzie> Typically, a block that stores ends of other files, since other blocks are of course full.
07:43:31 <zzo38> Yes it does complicate things.
07:43:52 <zzo38> It is why I didn't do that.
07:45:23 <shachaf> I was going to implement it once. But then it ended up being complicated and not worth that much, so I didn't.
07:48:51 <fizzie> Anyhow, you *can* resize most filesystems (so you could grow the file every now and then; a real filesystem would of course be able to reuse free space in the file; and the defragment/compact step could indeed be a separate operation), though it could be that it's a "heavier" operation than you'd like, involving reasonably much rewriting/copying. (Also, I don't know how good userspace ...
07:48:58 <fizzie> ... libraries there are for different filesystems.)
08:00:51 -!- FreeFull has quit.
08:06:34 * impomatic is entering Al's programming contest http://azspcs.net/Contest/Factorials
08:10:46 -!- epicmonkey has joined.
08:11:57 -!- zzo38 has quit (Remote host closed the connection).
08:29:24 -!- epicmonkey has quit (Ping timeout: 256 seconds).
09:04:12 -!- Bike has quit (Quit: leaving).
09:06:38 -!- oerjan has joined.
09:20:10 <oerjan> <c00kiemon5ter> `run wget http://sprunge.us/bCUe -O bin/seen <-- use `fetch it's more primitive but doesn't hit the sandboxing bugs + restrictions
09:20:36 <oerjan> @tell c00kiemon5ter <c00kiemon5ter> `run wget http://sprunge.us/bCUe -O bin/seen <-- use `fetch it's more primitive but doesn't hit the sandboxing bugs + restrictions
09:21:07 <shachaf> http://www.molvania.com/molvania/images/zlads_backnew2.gif
09:24:13 -!- azaq23 has quit (Quit: Leaving.).
09:40:31 <HackEgo> #!/bin/sh \ ls -r /var/irclogs/_esoteric/????-??-??.txt | while read -r file; do awk -vs="^..:..:..: <$1>" '$0 ~ s{x=$0} END{if(!x) exit 1; print x}' "$file" && break; done
09:40:49 <monqy> did someone break `seen....
09:42:28 <oerjan> c00kiemon5ter tried to fix it. it hasn't been changed again since last time that worked...
09:43:38 <HackEgo> 09:43:36: <oerjan> `seen oerjan
09:44:30 <HackEgo> 03:17:47: <Bike> actually hell, we have TeX. does METAFONT?
09:44:36 -!- epicmonkey has joined.
09:46:12 -!- Taneb has joined.
09:46:42 <HackEgo> 03:17:47: <Bike> actually hell, we have TeX. does METAFONT?
09:47:21 <oerjan> @tell c00kiemon5ter your `seen is unreliable in an incomprehensible yet repeatable way...
09:48:28 <HackEgo> 09:47:21: <oerjan> @tell c00kiemon5ter your `seen is unreliable in an incomprehensible yet repeatable way...
09:49:24 <oerjan> @tell c00kiemon5ter Also it doesn't include the filename/date
09:49:43 <HackEgo> 09:48:26: <Taneb> `seen oerjan
09:50:09 <oerjan> @tell c00kiemon5ter oh wait it's the darn nick tab completion trap again
09:50:58 <HackEgo> 01:01:40: <c00kiemon5ter> yay
09:51:02 -!- zzo38 has joined.
09:53:34 <fizzie> What's the trap? Does it add a space?
09:54:18 <Deewiant> `run sed -i 's/vs/vf="$(basename "$file")" -vs/;s/print /print f,/' bin/seen
09:54:18 <fizzie> `run sed -i -e 's/$1/${1% }/' bin/seen # special cases are just fine
09:54:44 <fizzie> Concurrent editing for the win.
09:54:49 <HackEgo> #!/bin/sh \ ls -r /var/irclogs/_esoteric/????-??-??.txt | while read -r file; do awk -vf="$(basename "$file")" -vs="^..:..:..: <${1% }>" '$0 ~ s{x=$0} END{if(!x) exit 1; print f,x}' "$file" && break; done
09:55:12 <HackEgo> 2013-01-22.txt 01:01:40: <c00kiemon5ter> yay
09:55:21 <fizzie> `run seen 'oerjan ' # only does single spaces
09:55:23 <HackEgo> 2013-01-22.txt 09:54:02: <oerjan> yes
09:55:29 <HackEgo> 2013-01-22.txt 09:55:27: <oerjan> `seen oerjan
09:55:34 <HackEgo> 2013-01-22.txt 09:55:31: <oerjan> `seen oerjan
09:55:38 <fizzie> Deewiant: Perhaps you should get rid of the .txt bit too.
09:55:49 <oerjan> @tell c00kiemon5ter Deewiant and fizzie fixed it :)
09:56:23 <Deewiant> `run sed -i 's/")"/" .txt)"/ bin/seen
09:56:24 <HackEgo> bash: -c: line 0: unexpected EOF while looking for matching `'' \ bash: -c: line 1: syntax error: unexpected end of file
09:56:30 <Deewiant> `run sed -i 's/")"/" .txt)"/' bin/seen
09:56:54 <HackEgo> 2013-01-22 09:55:49: <oerjan> @tell c00kiemon5ter Deewiant and fizzie fixed it :)
09:57:10 <HackEgo> #!/bin/sh \ ls -r /var/irclogs/_esoteric/????-??-??.txt | while read -r file; do awk -vf="$(basename "$file" .txt)" -vs="^..:..:..: <${1% }>" '$0 ~ s{x=$0} END{if(!x) exit 1; print f,x}' "$file" && break; done
09:58:12 <HackEgo> 2013-01-20 08:53:02: <oklopol> topics
09:59:03 <Taneb> `seen [Taneb|atriq|Ngevd]
09:59:29 <Taneb> That won't work at all, will it
09:59:31 <HackEgo> 2012-05-24 03:59:50: <a> hi
09:59:48 <HackEgo> 2012-12-23 01:03:33: <Ngevd> Goodnight!
09:59:51 <zzo38> Maybe you need () instead of []
10:00:02 <Taneb> `seen (Taneb|atriq|Ngevd)
10:00:05 <HackEgo> 2013-01-22 10:00:02: <Taneb> `seen (Taneb|atriq|Ngevd)
10:00:17 <zzo38> But I don't know if it will work at all
10:01:00 <fungot> Taneb: but for some reason i bookmarked it, just push the name and the module definitions, not just " bug: bad procedure", which simply does a goto
10:01:02 <HackEgo> 2013-01-22 10:01:00: <fungot> Taneb: but for some reason i bookmarked it, just push the name and the module definitions, not just " bug: bad procedure", which simply does a goto
10:04:04 <HackEgo> 2012-07-24 16:03:20: <edwardk> and we also don't have coexponentials
10:07:50 <oerjan> `run sed -i 's/-v/-v IGNORECASE=1 -v/' bin/seen
10:09:04 <fizzie> I think there should be an "if not in the last 30 or so files, just say 'not lately'" enhancement too.
10:09:52 <oerjan> fizzie: dammit why were you editing in private
10:10:01 <HackEgo> #!/bin/sh \ ls -r /var/irclogs/_esoteric/????-??-??.txt | while read -r file; do awk -vf="$(basename "$file" .txt)" -vs="^..:..:..: <${1% }>" '$0 ~ s{x=$0} END{if(!x) exit 1; print f,x}' "$file" && break; done
10:10:22 <fizzie> I haven't been editing anything.
10:10:25 <oerjan> `run sed -i 's/-v/-vIGNORECASE=1 -v/' bin/seen
10:10:27 <fizzie> (Just running things.)
10:10:39 <fizzie> Anyway, it's not GNU awk, it doesn't know about IGNORECASE.
10:10:48 <fizzie> (As far as I can tell.)
10:11:51 <HackEgo> compiled limits: \ max NF 32767 \ sprintf buffer 2040 \ mawk 1.3.3 Nov 1996, Copyright (C) Michael D. Brennan
10:12:14 <fizzie> "Let's mawk like it's 1996", like the song goes.
10:12:23 <HackEgo> #!/bin/sh \ ls -r /var/irclogs/_esoteric/????-??-??.txt | while read -r file; do awk -vIGNORECASE=1 -vf="$(basename "$file" .txt)" -vs="^..:..:..: <${1% }>" '$0 ~ s{x=$0} END{if(!x) exit 1; print f,x}' "$file" && break; done
10:12:24 <fizzie> (And there's no "gawk", before you ask.)
10:12:40 <HackEgo> #!/bin/sh \ ls -r /var/irclogs/_esoteric/????-??-??.txt | while read -r file; do awk -vf="$(basename "$file" .txt)" -vs="^..:..:..: <${1% }>" '$0 ~ s{x=$0} END{if(!x) exit 1; print f,x}' "$file" && break; done
10:13:10 <fizzie> "tolower($0) ~ ..." works, but needs the regex be lowercase too, and that's approximately where I was in my running-in-private experiments.
10:13:32 -!- Phantom_Hoover has joined.
10:13:37 * oerjan is too annoyed to continue without messing things up more
10:15:47 <oerjan> i could never be a real programmer, i have no patience with faulty tools :(
10:18:06 -!- Taneb has quit (Quit: Page closed).
10:18:18 <oerjan> that is, tools that are not an intrinsic part of the problem i am trying to solve.
10:19:39 <oerjan> my yak shaving recursion stack has only room for a couple of items.
10:23:51 <HackEgo> 2013-01-22 10:01:00: <fungot> Taneb: but for some reason i bookmarked it, just push the name and the module definitions, not just " bug: bad procedure", which simply does a goto
10:24:13 <fizzie> `seen2 someone_totally_crazy
10:24:23 <fizzie> Well, that's not entirely correct, but still.
10:26:58 <fizzie> (Full disclosure: I just went and used an actual programming language.)
10:27:57 <fizzie> `run mv bin/seen2 bin/seen # meh, good enough
10:28:34 <fizzie> The case-insensitive reimplementation of seen. Well, it *was* that.
10:31:52 <HackEgo> cat: bin/seen2: No such file or directory
10:31:56 <HackEgo> #! /usr/bin/env perl \ $n=shift @ARGV; $n=~s/ *$//; @f=split /\s+/, `ls -r /var/irclogs/_esoteric/????-??-??.txt | head -n 30`; for $f (@f) { open F,"<$f"; @l=grep(/^..:..:..: <$n>/i,<F>); close F; if (@l) { $b=$f; $b=~s#.*/(.*?).txt#$1#; print "$b $l[-1]"; exit 1; } } print "not lately";
10:33:57 <HackEgo> 2013-01-22 10:32:24: <monqy> hichaf
10:35:56 <fizzie> I had the messy tolower-based mawk thing almost working, and then wanted to add that "for failing matches, look at up to 30 files and then give up noisily", and it got too nasty. (Though maybe the "No output." reply would've been sufficient.)
10:40:50 <lambdabot> c00kiemon5ter: You have 5 new messages. '/msg lambdabot @messages' to read them.
10:40:58 <lambdabot> oerjan said 1h 20m 23s ago: <c00kiemon5ter> `run wget http://sprunge.us/bCUe -O bin/seen <-- use `fetch it's more primitive but doesn't hit the sandboxing bugs + restrictions
10:40:58 <lambdabot> oerjan said 53m 37s ago: your `seen is unreliable in an incomprehensible yet repeatable way...
10:40:58 <lambdabot> oerjan said 51m 35s ago: Also it doesn't include the filename/date
10:40:58 <lambdabot> oerjan said 50m 49s ago: oh wait it's the darn nick tab completion trap again
10:40:58 <lambdabot> oerjan said 45m 9s ago: Deewiant and fizzie fixed it :)
10:42:27 <oerjan> c00kiemon5ter: strictly speaking it's not something you think about before you see it happen
10:44:26 <oerjan> when you tab-complete a nick, normally my client and probably others add a space. HackEgo's basic command parser doesn't strip that and that sometimes makes commands look like they have freak heisenbugs
10:45:30 <oerjan> had to fix that in `welcome, for example
10:45:37 <HackEgo> #!/usr/bin/perl -w \ if (defined($_=shift)) { s/ *$//; s/ +/ @ /g; exec "bin/@", $_ . " ? welcome"; } else { exec "bin/?", "welcome"; }
10:46:00 <HackEgo> /home/hackbot/hackbot.hg/multibot_cmds/lib/limits: line 5: exec: welcoerjan: not found
10:46:49 <oerjan> shachaf: i saw in the logs that HackEgo's command list is so long you don't see all of it even if you print it _both_ forwards and backwards
10:47:35 <oerjan> let's just say a disturbingly large fraction of them match *rjan*
10:47:49 <HackEgo> ls: cannot access bin/*rjan*: No such file or directory
10:47:56 <HackEgo> bin/quoerjan \ bin/quørjan \ bin/translatetoerjan \ bin/zalgoerjan
10:48:13 <oerjan> AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
10:48:58 <oerjan> i too tend to end up with perl when shell has driven me sufficiently crazy
10:49:32 <shachaf> `trnslatetoerjan i love words that end with o. they are so easy to ørjanize
10:49:33 <HackEgo> /home/hackbot/hackbot.hg/multibot_cmds/lib/limits: line 5: exec: trnslatetoerjan: not found
10:49:39 <shachaf> `translatetoerjan i love words that end with o. they are so easy to ørjanize
10:49:43 <HackEgo> Traceback (most recent call last): \ File "/hackenv/bin/json", line 5, in <module> \ print eval(sys.argv[1]).encode('utf-8') \ File "<string>", line 1, in <module> \ TypeError: 'NoneType' object is not subscriptable
10:50:14 <fizzie> http://sprunge.us/DTZf <- best gawk feature.
10:50:27 <zzo38> What is a category called for any two objects if there is no morphism X to Y then there is no morphism Y to X?
10:50:28 <oerjan> shachaf: i am not sure the api translate* used even exists at google any more
10:50:30 <fizzie> (Also I don't think we would've ended with a Perl version, had IGNORECASE worked.)
10:50:33 <zzo38> Sorry, I wrote it wrong.
10:50:41 <zzo38> What is a category called for any two objects if there is no morphism X to Y then there is at least one morphism Y to X?
10:53:06 <oerjan> zzo38: is this to hold for every pair of two objects?
10:53:31 <oerjan> if so i think the skeleton category is a total order, but i don't know if that has a more specific name
10:53:33 <fizzie> `run sed -i -e 's#shuf#shuf | sed s/oe/ø/g#' bin/quørjan # department of redundancy removal department (it was identical to quoerjan)
10:53:52 <HackEgo> 20) IN AN ALTERNATE UNIVERSE: <ørjan> In an alternate universe, I would say "In an alternate universe, ehird has taste" \ 95) <ørjan> insufficient time dilation. try running faster. \ 461) <ais523> ørjan: I'm not imaginative enough to write truly great slash fiction \ 514) <ørjan> theorem prover yada yada halting problem. \ 377) <ørjan> as i
10:54:23 <oerjan> darn, that almost made the command interesting
10:55:19 <c00kiemon5ter> `run ls -r /var/irclogs/_esoteric/????-??-??.txt | while read -r file; do awk -v -vs="^..:..:..: <HackEgo>" '$0 ~ s{x=$0} END{if(!x) exit 1; print FILENAME,x}' "$file" && break; done
10:55:50 <HackEgo> awk: improper assignment: -v -vs=^..:..:..: <HackEgo> \ awk: improper assignment: -v -vs=^..:..:..: <HackEgo> \ awk: improper assignment: -v -vs=^..:..:..: <HackEgo> \ awk: improper assignment: -v -vs=^..:..:..: <HackEgo> \ awk: improper assignment: -v -vs=^..:..:..: <HackEgo> \ awk: improper assignment: -v -vs=^..:..:..: <HackEgo> \ awk: improper
10:55:51 <oerjan> hm wait it wouldn't be skeleton category, you need to identify morphisms too
10:55:58 <fizzie> `run quørjan | sed -e 's/ørjan/REDACTED/g' | grep ø
10:55:59 <HackEgo> 109) <REDACTED> alise: mainly it's the fact it blows so hard i cannot avoid hitting the walls of the thing, which completely gøs against my basic public toilet hygiene principles \ 636) * REDACTED concludes that unsafeCørce has no effect on strictness \ 874) <pikhq> Conext coyou'll cotell come cothat coyou cocan't coprefix cøverything cowith co"
10:56:21 <fizzie> Heh, unsafeCørce and cøverything. And gøs.
10:56:23 <c00kiemon5ter> `run ls -r /var/irclogs/_esoteric/????-??-??.txt | while read -r file; do awk -vs="^..:..:..: <HackEgo>" '$0 ~ s{x=$0} END{if(!x) exit 1; print FILENAME,x}' "$file" && break; done
10:56:26 <HackEgo> /var/irclogs/_esoteric/2013-01-22.txt 10:55:59: <HackEgo> 109) <REDACTED> alise: mainly it's the fact it blows so hard i cannot avoid hitting the walls of the thing, which completely gøs against my basic public toilet hygiene principles \ 636) * REDACTED concludes that unsafeCørce has no effect on strictness \ 874) <pikhq> Conext coyou'll cote
10:57:36 <fizzie> If you're doing the filename-adding, Deewiant already made a version with -vf=$(basename $file .txt) that did that part pretty well.
10:58:41 <c00kiemon5ter> `run ls -r /var/irclogs/_esoteric/????-??-??.txt | while read -r file; do awk -vf="$(basename "$file" .txt)" -vn="<zzo38>" '$2 == n{x=$0} END{if(!x) exit 1; print f,x}' "$file" && break; done
10:58:44 <HackEgo> 2013-01-22 10:53:15: <zzo38> oerjan: Yes.
10:59:18 <HackEgo> 874) <pikhq> Conext coyou'll cotell come cothat coyou cocan't coprefix coeverything cowith co"co". <oerjan> pikhq: coof urse conot!
10:59:48 <c00kiemon5ter> `run ls -r /var/irclogs/_esoteric/????-??-??.txt | while read -r file; do awk -vf="$(basename "$file" .txt)" -vn="<oeRjaN>" 'tolower($2) == tolower(n){x=$0} END{if(!x) exit 1; print f,x}' "$file" && break; done
10:59:51 <HackEgo> 2013-01-22 10:59:16: <oerjan> `quote 874
11:00:21 -!- oerjan has quit (Quit: ARGH a chainsaw).
11:01:18 <fizzie> It was seen as desirable for regexps to be supported for the nick.
11:12:05 <c00kiemon5ter> `run ls -r /var/irclogs/_esoteric/????-??-??.txt | while read -r file; do awk -vf="$(basename "$file" .txt)" -vn="< (oeRja.*|fiz*ie) >" 'BEGIN{gsub(/^[[:space:]]+|[[:space:]]+$/, "", n)} tolower($2) ~ tolower(n){x=$0} END{if(!x) exit 1; print f,x}' "$file" && break; done
11:13:44 <c00kiemon5ter> `run ls -r /var/irclogs/_esoteric/????-??-??.txt | while read -r file; do awk -vf="$(basename "$file" .txt)" -vn=" (oeRja.*|fiz*ie) " 'BEGIN{gsub(/^[[:space:]]+|[[:space:]]+$/, "", n); n=sprintf("<%s>",n);} tolower($2) ~ tolower(n){x=$0} END{if(!x) exit 1; print f,x}' "$file" && break; done
11:14:28 -!- zzo38 has quit (Remote host closed the connection).
11:17:56 <c00kiemon5ter> `run ls -r /var/irclogs/_esoteric/????-??-??.txt | while read -r file; do awk -vf="$(basename "$file" .txt)" -vn="c00kiemon5ter" 'BEGIN{gsub(/^[[:space:]]+|[[:space:]]+$/, "", n); n=sprintf("<%s>",tolower(n));} tolower($2) ~ n{x=$0} END{if(!x) exit 1; print f,x}' "$file" && break; done
11:17:58 <HackEgo> 2013-01-22 11:17:56: <c00kiemon5ter> `run ls -r /var/irclogs/_esoteric/????-??-??.txt | while read -r file; do awk -vf="$(basename "$file" .txt)" -vn="c00kiemon5ter" 'BEGIN{gsub(/^[[:space:]]+|[[:space:]]+$/, "", n); n=sprintf("<%s>",tolower(n));} tolower($2) ~ n{x=$0} END{if(!x) exit 1; print f,x}' "$file" && break; done
11:18:12 <c00kiemon5ter> `run ls -r /var/irclogs/_esoteric/????-??-??.txt | while read -r file; do awk -vf="$(basename "$file" .txt)" -vn="c00kiem.*" 'BEGIN{gsub(/^[[:space:]]+|[[:space:]]+$/, "", n); n=sprintf("<%s>",tolower(n));} tolower($2) ~ n{x=$0} END{if(!x) exit 1; print f,x}' "$file" && break; done
11:18:14 <HackEgo> 2013-01-22 11:18:12: <c00kiemon5ter> `run ls -r /var/irclogs/_esoteric/????-??-??.txt | while read -r file; do awk -vf="$(basename "$file" .txt)" -vn="c00kiem.*" 'BEGIN{gsub(/^[[:space:]]+|[[:space:]]+$/, "", n); n=sprintf("<%s>",tolower(n));} tolower($2) ~ n{x=$0} END{if(!x) exit 1; print f,x}' "$file" && break; done
11:19:01 <c00kiemon5ter> `run ls -r /var/irclogs/_esoteric/????-??-??.txt | while read -r file; do awk -vf="$(basename "$file" .txt)" -vn="(oer|fiz).*" 'BEGIN{gsub(/^[[:space:]]+|[[:space:]]+$/, "", n); n=sprintf("<%s>",tolower(n));} tolower($2) ~ n{x=$0} END{if(!x) exit 1; print f,x}' "$file" && break; done
11:19:03 <HackEgo> 2013-01-22 11:01:18: <fizzie> It was seen as desirable for regexps to be supported for the nick.
11:19:25 <c00kiemon5ter> `run ls -r /var/irclogs/_esoteric/????-??-??.txt | while read -r file; do awk -vf="$(basename "$file" .txt)" -vn=" (oer|fiz).* " 'BEGIN{gsub(/^[[:space:]]+|[[:space:]]+$/, "", n); n=sprintf("<%s>",tolower(n));} tolower($2) ~ n{x=$0} END{if(!x) exit 1; print f,x}' "$file" && break; done
11:20:34 <c00kiemon5ter> `run ls -r /var/irclogs/_esoteric/????-??-??.txt | while read -r file; do awk -vf="$(basename "$file" .txt)" -vn="(oer|fiz).* " 'BEGIN{gsub(/^[[:space:]]+|[[:space:]]+$/, "", n); n=sprintf("<%s>",tolower(n));} tolower($2) ~ n{x=$0} END{if(!x) exit 1; print f,x}' "$file" && break; done
11:23:48 <c00kiemon5ter> `run awk -vn=" (oer|fiz).* " 'BEGIN{gsub(/^[[:space:]]+|[[:space:]]+$/, "", n); n=sprintf("<%s>",tolower(n)); print n}'
11:25:03 <c00kiemon5ter> `run awk -vn=" (oer|fiz).* " 'BEGIN{gsub(/(^[[:space:]]+|[[:space:]]+$)/, "", n); n=sprintf("<%s>",tolower(n)); print n}'
11:25:11 <c00kiemon5ter> `run awk -vn=" (oer|fiz).* " 'BEGIN{gsub(/(^[[:space:]]+)|([[:space:]]+$)/, "", n); n=sprintf("<%s>",tolower(n)); print n}'
11:26:33 <c00kiemon5ter> `run awk -vn=" (oer|fiz).* " 'BEGIN{gsub(/^[[:space:]]+|[[:space:]]+$/, "", n); print n}'
11:27:07 <c00kiemon5ter> `run awk -vn=" (oer|fiz).* " 'BEGIN{gsub(/^[ \t]+|[ \t]+$/, "", n); print ":"n":"}'
11:27:27 <c00kiemon5ter> `run awk -vn=" (oer|fiz).* " 'BEGIN{gsub(/^[ \t]+|[ \t]+$/, "", n); print ":"n":"}'
11:28:08 <HackEgo> awk: not an option: --version
11:28:20 <fizzie> It's mawk, as mentioned before.
11:28:25 <HackEgo> compiled limits: \ max NF 32767 \ sprintf buffer 2040 \ mawk 1.3.3 Nov 1996, Copyright (C) Michael D. Brennan
11:28:36 <fizzie> That's why it doesn't do IGNORECASE either.
11:28:48 <shachaf> does m stand for Michael D. Brennan
11:29:15 <fizzie> shachaf: Oh, I'm sure Michael "big M" D. Brennan isn't *that* ostentatious.
11:29:26 <c00kiemon5ter> `run ls -r /var/irclogs/_esoteric/????-??-??.txt | while read -r file; do awk -vf="$(basename "$file" .txt)" -vn=" (oer|fiz).* " 'BEGIN{gsub(/^[ \t]+|[ \t]+$/, "", n); n=sprintf("<%s>",tolower(n));} tolower($2) ~ n{x=$0} END{if(!x) exit 1; print f,x}' "$file" && break; done
11:29:28 <HackEgo> 2013-01-22 11:29:15: <fizzie> shachaf: Oh, I'm sure Michael "big M" D. Brennan isn't *that* ostentatious.
11:30:33 <fizzie> `seen somebody_who_was_never_here
11:30:39 <fizzie> Don't forget that particular feature.
11:31:41 <fizzie> (Though arguably it's a misfeature and you'd want to get the 2003-era results if such exist.)
11:34:26 <c00kiemon5ter> `run ls -r /var/irclogs/_esoteric/????-??-??.txt | while read -r file; do awk -vf="$(basename "$file" .txt)" -vn=" M(oer|fiz).* " 'BEGIN{gsub(/^[ \t]+|[ \t]+$/, "", n); n=sprintf("<%s>",tolower(n));} tolower($2) ~ n{x=$0} END{if(!x) exit 1; print f,x}' "$file" && exit; done; printf 'no match for: %s\n' "$1"
11:42:19 <c00kiemon5ter> `run ls -r /var/irclogs/_esoteric/????-??-??.txt | while read -r file; do awk -vf="$(basename "$file" .txt)" -vn="MISSING" 'BEGIN{gsub(/^[ \t]+|[ \t]+$/, "", n); n=sprintf("<%s>",tolower(n))} tolower($2) ~ n{x=$0} END{if(!x) exit 1; print f,x}' "$file" && exit; done; echo "got no match"
11:42:54 <c00kiemon5ter> `run ls -r /var/irclogs/_esoteric/2013-??-??.txt | while read -r file; do awk -vf="$(basename "$file" .txt)" -vn="MISSING" 'BEGIN{gsub(/^[ \t]+|[ \t]+$/, "", n); n=sprintf("<%s>",tolower(n))} tolower($2) ~ n{x=$0} END{if(!x) exit 1; print f,x}' "$file" && exit; done; echo "got no match"
11:43:29 <c00kiemon5ter> `run time (ls -r /var/irclogs/_esoteric/????-??-??.txt | while read -r file; do awk -vf="$(basename "$file" .txt)" -vn="MISSING" 'BEGIN{gsub(/^[ \t]+|[ \t]+$/, "", n); n=sprintf("<%s>",tolower(n))} tolower($2) ~ n{x=$0} END{if(!x) exit 1; print f,x}' "$file" && exit; done; echo "got no match")
11:46:12 <c00kiemon5ter> aha, so the perl version only checks a number of files
11:46:43 -!- KingOfKarlsruhe has joined.
11:47:01 <c00kiemon5ter> `run time (ls -r /var/irclogs/_esoteric/????-??-??.txt | head -n30 | while read -r file; do awk -vf="$(basename "$file" .txt)" -vn="MISSING" 'BEGIN{gsub(/^[ \t]+|[ \t]+$/, "", n); n=sprintf("<%s>",tolower(n))} tolower($2) ~ n{x=$0} END{if(!x) exit 1; print f,x}' "$file" && exit; done; echo "got no match")
11:47:09 <HackEgo> \ real0m6.911s \ user0m1.160s \ sys0m6.360s \ got no match
11:47:15 <c00kiemon5ter> `run time (ls -r /var/irclogs/_esoteric/????-??-??.txt | head -n30 | while read -r file; do awk -vf="$(basename "$file" .txt)" -vn="MISSING" 'BEGIN{gsub(/^[ \t]+|[ \t]+$/, "", n); n=sprintf("<%s>",tolower(n))} tolower($2) ~ n{x=$0} END{if(!x) exit 1; print f,x}' "$file" && exit; done; echo "got no match")
11:47:23 <HackEgo> \ real0m6.499s \ user0m0.740s \ sys0m6.150s \ got no match
11:47:49 <HackEgo> not lately \ real0m1.764s \ user0m1.930s \ sys0m0.350s
11:55:57 <c00kiemon5ter> `run ls -r /var/irclogs/_esoteric/????-??-??.txt | while [ "$((i+=1))" -ne 30 ] && read -r file; do awk -vf="$(basename "$file" .txt)" -vn="MISSING" 'BEGIN{gsub(/^[ \t]+|[ \t]+$/, "", n); n=sprintf("<%s>",tolower(n))} tolower($2) ~ n{x=$0} END{if(!x) exit 1; print f,x}' "$file" && exit; done; echo "got no match"
11:56:12 <c00kiemon5ter> `run ls -r /var/irclogs/_esoteric/????-??-??.txt | while [ "$((i+=1))" -ne 3 ] && read -r file; do awk -vf="$(basename "$file" .txt)" -vn="MISSING" 'BEGIN{gsub(/^[ \t]+|[ \t]+$/, "", n); n=sprintf("<%s>",tolower(n))} tolower($2) ~ n{x=$0} END{if(!x) exit 1; print f,x}' "$file" && exit; done; echo "got no match"
11:57:17 <Deewiant> `run time find /var/irclogs/_esoteric/ -name '????-??-??.txt' -exec grep MISSING {} +
11:57:40 <HackEgo> /var/irclogs/_esoteric/2011-05-03.txt:21:20:38: <oerjan> olsner: MISSING WIKIPEDIA LINK \ /var/irclogs/_esoteric/2011-06-04.txt:23:47:05: <elliott__> ais523: I just want to know when MISSINGNO will be an official part of the Pokédex. \ /var/irclogs/_esoteric/2011-06-04.txt:23:48:18: <ais523> well, for one thing it's spelt MISSINGNO. with a dot,
11:58:22 <c00kiemon5ter> `run time find /var/irclogs/_esoteric/ -name '????-??-??.txt' -exec grep "^....:..:..: <MISSING>" {} +
11:58:32 <HackEgo> \ real0m9.084s \ user0m4.800s \ sys0m4.590s
12:08:56 <c00kiemon5ter> `run n="<$(awk -vn=" MISSING " 'BEGIN{gsub(/^[ \t]+|[ \t]+$/, "", n); print tolower(n)}')>"; ls -r /var/irclogs/_esoteric/????-??-??.txt | while [ "$((i+=1))" -ne 30 ] && read -r file; do awk -vf="$(basename "$file" .txt)" -vn="$n" 'tolower($2) ~ n{x=$0} END{if(!x) exit 1; print f,x}' "$file" && exit; done; echo "havent seen $n lately"
12:09:03 <HackEgo> havent seen <missing> lately
12:09:32 <HackEgo> \ real0m0.001s \ user0m0.000s \ sys0m0.000s
12:09:48 <HackEgo> bash: /usr/bin/time: No such file or directory
12:09:53 <HackEgo> bash: /bin/time: No such file or directory
12:09:57 <c00kiemon5ter> `run n="<$(awk -vn=" De*wiant|sh.* " 'BEGIN{gsub(/^[ \t]+|[ \t]+$/, "", n); print tolower(n)}')>"; ls -r /var/irclogs/_esoteric/????-??-??.txt | while [ "$((i+=1))" -ne 30 ] && read -r file; do awk -vf="$(basename "$file" .txt)" -vn="$n" 'tolower($2) ~ n{x=$0} END{if(!x) exit 1; print f,x}' "$file" && exit; done; echo "havent seen $n lately"
12:09:59 <HackEgo> 2013-01-22 12:09:51: <Deewiant> `run /bin/time true \ havent seen <de*wiant|sh.*> lately
12:10:39 <Deewiant> `run time true 2>&1 | tr -d "\n"
12:10:40 <HackEgo> \ real0m0.188s \ user0m0.000s \ sys0m0.000s
12:11:18 <c00kiemon5ter> `run n="<$(awk -vn=" De*wiant|sh.* " 'BEGIN{gsub(/^[ \t]+|[ \t]+$/, "", n); print tolower(n)}')>"; ls -r /var/irclogs/_esoteric/????-??-??.txt | (while [ "$((i+=1))" -ne 30 ] && read -r file; do awk -vf="$(basename "$file" .txt)" -vn="$n" 'tolower($2) ~ n{x=$0} END{if(!x) exit 1; print f,x}' "$file" && exit; done; echo "havent seen $n lately")
12:11:21 <HackEgo> 2013-01-22 12:10:47: <Deewiant> Okay, whatever.
12:11:35 <c00kiemon5ter> `run time (n="<$(awk -vn=" De*wiant|sh.* " 'BEGIN{gsub(/^[ \t]+|[ \t]+$/, "", n); print tolower(n)}')>"; ls -r /var/irclogs/_esoteric/????-??-??.txt | (while [ "$((i+=1))" -ne 30 ] && read -r file; do awk -vf="$(basename "$file" .txt)" -vn="$n" 'tolower($2) ~ n{x=$0} END{if(!x) exit 1; print f,x}' "$file" && exit; done; echo "havent seen $n lately"))
12:11:38 <HackEgo> 2013-01-22 12:10:47: <Deewiant> Okay, whatever. \ \ real0m1.458s \ user0m0.940s \ sys0m0.980s
12:12:06 <Deewiant> `run sh -c time true 2>&1 | tr -d "\n"
12:12:09 <c00kiemon5ter> `run time (n="<$(awk -vn=" MDe*wiant|sh.* " 'BEGIN{gsub(/^[ \t]+|[ \t]+$/, "", n); print tolower(n)}')>"; ls -r /var/irclogs/_esoteric/????-??-??.txt | (while [ "$((i+=1))" -ne 30 ] && read -r file; do awk -vf="$(basename "$file" .txt)" -vn="$n" 'tolower($2) ~ n{x=$0} END{if(!x) exit 1; print f,x}' "$file" && exit; done; echo "havent seen $n lately"))
12:12:10 <Deewiant> `run sh -c 'time true' 2>&1 | tr -d "\n"
12:12:12 <HackEgo> 2013-01-22 11:28:48: <shachaf> does m stand for Michael D. Brennan \ \ real0m1.652s \ user0m0.960s \ sys0m1.150s
12:12:17 <Deewiant> `run bash -c 'time true' 2>&1 | tr -d "\n"
12:12:18 <HackEgo> real0m0.003suser0m0.000ssys0m0.000s
12:12:32 <HackEgo> \ real0m0.001s \ user0m0.000s \ sys0m0.000s
12:12:56 <Deewiant> `run bash -c 'time find /var/irclogs/_esoteric/ -name "????-??-??.txt" -exec grep "^....:..:..: <MISSING>" {} +' 2>&1 | tr -d "\n"
12:13:02 <HackEgo> real0m4.246suser0m2.570ssys0m2.390s
12:13:17 <Deewiant> `run bash -c 'time find /var/irclogs/_esoteric/ -name "????-??-??.txt" -exec grep "^....:..:..: <MISSING>" {} +' 2>&1 | tr -d "\n"
12:13:21 <HackEgo> real0m3.140suser0m1.500ssys0m2.410s
12:13:44 <Deewiant> `run bash -c 'time seen MISSING' 2>&1 | tr -d "\n"
12:13:47 <HackEgo> not latelyreal0m1.395suser0m2.170ssys0m0.000s
12:15:25 <HackEgo> real 0m0.009s user 0m0.000s sys 0m0.000s
12:18:29 -!- monqy has quit (Quit: hello).
12:25:15 <fizzie> Is that [ "$((i+=1))" -ne 30 ] && really an improvement over the | head -n 30 approach?
12:27:56 <fizzie> It's a builtin in bash, though.
12:28:37 <Deewiant> (No idea what the difference in practice is but that's what 'type' says.)
12:43:52 -!- DHeadshot has joined.
12:44:22 <Deewiant> Oh right, differences with variable expansion and such result from that
12:58:54 -!- asiekierka has quit (Quit: ZNC - http://znc.sourceforge.net).
13:27:49 <ion> https://lh6.googleusercontent.com/-OLCMMGoSOs4/UP13JtDW7cI/AAAAAAAAF2M/vwcAqJjaJA4/w497-h373/space.gif
13:29:36 <fizzie> It is a shame the person in front couldn't keep a serious face on. :/
13:31:38 <HackEgo> 2013-01-22 13:31:37 URL:http://sprunge.us/ZfLF [311] -> "ZfLF" [1]
13:32:25 <HackEgo> 2013-01-21 13:29:36: <fizzie> It is a shame the person in front couldn't keep a serious face on. :/
13:32:30 <HackEgo> #!/usr/bin/env bash \ s="<${1% }>" \ while ((i++ < 30)) && read -r file; do \ [[ -n "$line" ]] && { printf '%s %s\n' "$(basename "${file%.txt}")" "$line"; exit; } \ while read -r t n m; do [[ $n =~ $s ]] && line="$t $n $m"; done <"$file" \ done < <(ls -r /var/irclogs/_esoteric/????-??-??.txt) \ echo 'well, not lately'
13:33:28 <elliott> c00kiemon5ter: that version is problematic
13:33:40 <elliott> `run bash bseen c00kiemon5ter
13:33:42 <HackEgo> 2013-01-21 13:33:41: <c00kiemon5ter> maybe, just wrote it :P
13:33:46 <elliott> `run bash bseen c00kiemon5ter
13:33:48 <HackEgo> 2013-01-21 13:33:41: <c00kiemon5ter> maybe, just wrote it :P
13:34:13 <HackEgo> 2011-11-09.txt:00:51:44: <lambdabot> Not in scope: `testtestt'
13:34:48 <elliott> `run sed -i 's/".t .n .m"/"$t.txt:$n $m' bseen
13:34:50 <HackEgo> sed: -e expression #1, char 26: unterminated `s' command
13:34:50 <HackEgo> 2013-01-21 13:34:48: <elliott> `run sed -i 's/".t .n .m"/"$t.txt:$n $m' bseen
13:34:54 <elliott> `run sed -i 's/".t .n .m"/"$t.txt:$n $m/' bseen
13:35:00 <HackEgo> bseen: line 5: unexpected EOF while looking for matching `"' \ bseen: line 9: syntax error: unexpected end of file
13:35:17 <elliott> `run sed -i 's/\.txt .n .m/.txt:$n $m"/' bseen
13:35:20 <HackEgo> bseen: line 5: unexpected EOF while looking for matching `"' \ bseen: line 9: syntax error: unexpected end of file
13:35:27 <HackEgo> bseen: line 5: unexpected EOF while looking for matching `"' \ bseen: line 9: syntax error: unexpected end of file
13:38:09 <HackEgo> 2013-01-22 13:38:08 URL:http://sprunge.us/ZfLF [311] -> "ZfLF" [1]
13:38:55 <HackEgo> /home/hackbot/hackbot.hg/multibot_cmds/lib/limits: line 5: exec: bseen: not found
13:39:05 <HackEgo> mv: missing destination file operand after `bseen bin/bseen' \ Try `mv --help' for more information.
13:39:06 <fizzie> Arguably basename "$file" .txt looks less crufty than basename "${file%.txt}" though of course both do the same thing.
13:39:47 <fizzie> You already have that there.
13:40:06 <fizzie> You could put in a #*/# kind of thing, though.
13:40:56 <fizzie> `run f="/foo/bar/baz.txt"; echo ${f##*/}
13:41:20 <fizzie> I don't remember if you can nest them, though.
13:41:56 <HackEgo> http://sprunge.us/DOiJ: Scheme missing.
13:42:07 <HackEgo> 2013-01-22 13:42:05 URL:http://sprunge.us/DOiJ [323] -> "DOiJ" [1]
13:42:16 <HackEgo> mv: missing destination file operand after `DOiJ bin/bseen' \ Try `mv --help' for more information.
13:42:48 <HackEgo> /home/hackbot/hackbot.hg/multibot_cmds/lib/limits: line 5: /hackenv/bin/bseen: Permission denied \ /home/hackbot/hackbot.hg/multibot_cmds/lib/limits: line 5: exec: /hackenv/bin/bseen: cannot execute: Permission denied
13:42:52 <elliott> c00kiemon5ter: I tried to make the output consistent with `log
13:43:16 <HackEgo> /var/irclogs/_esoteric/2013-01-22 13:43:10: <HackEgo> No output.
13:43:26 <elliott> I kind of suspect grep might be faster than going through a tight loop in bash though :/
13:44:43 <fizzie> `run time seen MISSINGNO
13:44:45 <fizzie> `run time bseen MISSINGNO
13:44:45 <HackEgo> not lately \ real0m1.276s \ user0m1.820s \ sys0m0.000s
13:44:57 <HackEgo> well, not lately \ \ real0m11.027s \ user0m10.260s \ sys0m1.230s
13:45:00 <HackEgo> sed: -e expression #1, char 9: unterminated `s' command
13:45:16 <HackEgo> 2013-01-22 13:45:09: <HackEgo> No output.
13:46:19 <HackEgo> 2013-01-22.txt:13:45:06: <c00kiemon5ter> `run sed -i 's,/}",&;,' bin/bseen
13:46:22 <fizzie> That would be with .txt and with colon in-between.
13:46:24 <elliott> generally all our log-grepping stuff outputs in that (fairly ugly) format
13:46:29 <elliott> but it's convenient because you can say
13:46:31 <elliott> `logurl 2013-01-22.txt:13:45:06:
13:46:32 <HackEgo> http://codu.org/logs/log/_esoteric/2013-01-22
13:46:47 -!- boily has joined.
13:47:49 <HackEgo> http://sprunge.us/YPLg: Scheme missing.
13:47:55 <HackEgo> 2013-01-22 13:47:53 URL:http://sprunge.us/YPLg [303] -> "YPLg" [1]
13:48:11 <HackEgo> #! /usr/bin/env perl \ $n=shift @ARGV; $n=~s/ *$//; @f=split /\s+/, `ls -r /var/irclogs/_esoteric/????-??-??.txt | head -n 30`; for $f (@f) { open F,"<$f"; @l=grep(/^..:..:..: <$n>/i,<F>); close F; if (@l) { $b=$f; $b=~s#.*/(.*?).txt#$1#; print "$b $l[-1]"; exit 1; } } print "not lately";
13:48:19 <HackEgo> /home/hackbot/hackbot.hg/multibot_cmds/lib/limits: line 5: /hackenv/bin/bseen: Permission denied \ /home/hackbot/hackbot.hg/multibot_cmds/lib/limits: line 5: exec: /hackenv/bin/bseen: cannot execute: Permission denied
13:48:20 <elliott> we have a whole family of seens?
13:48:44 <HackEgo> 2013-01-22.txt:13:48:20: <elliott> we have a whole family of seens?
13:48:59 <HackEgo> 2013-01-22.txt:13:48:41: <c00kiemon5ter> `bseen elliot*
13:49:27 <HackEgo> well, not lately \ \ real0m10.472s \ user0m9.770s \ sys0m0.940s
13:49:38 <HackEgo> not lately \ real0m1.241s \ user0m0.600s \ sys0m1.140s
13:49:52 <HackEgo> 2013-01-22.txt:13:49:04: <elliott> :P
13:49:58 <HackEgo> 2013-01-22.txt:13:49:04: <elliott> :P \ \ real0m1.474s \ user0m0.970s \ sys0m0.970s
13:50:05 <elliott> i like how it won't time the bash one
13:50:19 <HackEgo> 2013-01-22.txt:13:50:14: <elliott> `seen calamari
13:50:30 <elliott> does it have some kind of limit how far it'll go back
13:50:30 <fizzie> That's what the "lately" means.
13:51:09 <elliott> but what if i want to find out when the person who last spoke in 2002 last spoke to the day????
13:51:12 <fizzie> I did admit it's a controversial "feature".
13:51:43 <c00kiemon5ter> so worse case(no match), perl is about 9 times faster than bash
13:52:36 <HackEgo> 2013-01-22.txt:13:51:09: <elliott> but what if i want to find out when the person who last spoke in 2002 last spoke to the day????
13:52:48 <elliott> c00kiemon5ter: try "time bash bseen elliott"?
13:53:04 <elliott> anyway clearly someone should rewrite it in C
13:53:14 <HackEgo> 2013-01-22.txt:13:53:04: <elliott> anyway clearly someone should rewrite it in C
13:53:52 <HackEgo> \ real0m1.686s \ user0m0.290s \ sys0m0.000s
13:53:53 <elliott> it's immune to benchmarking
13:54:34 <HackEgo> \ real0m0.980s \ user0m0.990s \ sys0m0.340s
13:54:44 <c00kiemon5ter> `run time (./bin/seen elliott 1>/dev/null) | xargs printf '%s '
13:54:47 <HackEgo> \ real0m1.503s \ user0m0.750s \ sys0m1.210s
13:54:55 <c00kiemon5ter> `run time (./bin/seen elliott 1>/dev/null) 2>&1 | xargs printf '%s '
13:54:58 <HackEgo> \ real0m1.480s \ user0m0.950s \ sys0m0.960s
13:55:13 <c00kiemon5ter> `run (time ./bin/seen elliott 1>/dev/null) 2>&1 | xargs printf '%s '
13:55:16 <HackEgo> real 0m1.211s user 0m1.840s sys 0m0.000s
13:55:20 <c00kiemon5ter> `run (time ./bin/bseen elliott 1>/dev/null) 2>&1 | xargs printf '%s '
13:55:33 <c00kiemon5ter> `run (time (./bin/bseen elliott 1>/dev/null)) 2>&1 | xargs printf '%s '
13:56:12 <HackEgo> 2012-08-04 16:58:14: <calamari> []{}\|-_`^: did you experience computer withdrawal?
13:56:37 <HackEgo> 2013-01-22.txt:13:53:53: <elliott> it's immune to benchmarking
13:56:52 <elliott> fizzie: surely not having a limit doesn't necessarily slow the common case down?
13:57:31 <fizzie> That much is true. I was pretty much just irritated by the really long delays when testing it.
13:57:31 <c00kiemon5ter> well, the last match in the first file that has a match
13:58:50 <elliott> fizzie: well then optimise it some more!!!
13:58:59 <HackEgo> not lately; try `seen calamari ever
13:59:52 <fungot> oh god I have no eyes!1
14:07:19 <elliott> `seen ojfoijogijdfogogfji ever
14:07:31 <HackEgo> not lately; try `seen ojfoijogijdfogogfji ever
14:08:45 <HackEgo> 2013-01-22 13:59:51: <fizzie> ^seen calamari
14:08:47 <elliott> fizzie: how about it always has the ever but then says "not lately" if it's never been seen
14:08:59 <elliott> since like, maybe they were seen in 2002 before the logs began
14:09:16 <HackEgo> not lately; try `seen andreou ever
14:09:27 <HackEgo> 2009-03-30 16:21:13: <andreou> may be the color or the curving, yet it always made me dizzy
14:10:00 <HackEgo> ls: cannot access bin/*seen: No such file or directory
14:10:56 <fizzie> elliott: I should probably write a TERSEEN instead. (But can't be bothered.)
14:11:54 <fizzie> Hmm, it's obviously been awhile.
14:11:56 <HackEgo> 2003-11-01 22:46:01: <mooz> wow, re-remembered this place
14:12:30 <elliott> fizzie: IMO it should binary search once it fails to find the person in the past year, or something.
14:13:40 <fizzie> Or perhaps it should have a sqlite seen.db that's indexed by nick, and automatically updated on every `seen.
14:14:15 <elliott> fizzie: How about parallelise it?
14:16:00 <fizzie> I could buy, say, sixty-four Amazon EC instances, each with their localized copy of the logs in RAM, and then bigtable hadoop mapreduce mongodb webscale keyword keyword keyword.
14:16:01 -!- KingOfKarlsruhe has quit (Quit: ChatZilla 0.9.89 [Firefox 18.0.1/20130116073211]).
14:19:50 <c00kiemon5ter> `run (time seen elliott 1>/dev/null) 2>&1 | xargs printf '%s '
14:19:53 <HackEgo> real 0m1.428s user 0m1.290s sys 0m0.780s
14:19:58 <c00kiemon5ter> `run (time aseen elliott 1>/dev/null) 2>&1 | xargs printf '%s '
14:20:10 <c00kiemon5ter> `run (time aseen elliott 1>/dev/null) 2>&1 | xargs printf '%s '
14:22:29 <HackEgo> /home/hackbot/hackbot.hg/multibot_cmds/lib/limits: line 5: exec: asinine: not found
14:22:29 <fungot> elliott: and you can't prove it because i noticed it doesn't have to
14:22:50 <HackEgo> 2013-01-22.txt 14:22:29: <fungot> elliott: and you can't prove it because i noticed it doesn't have to
14:23:17 <HackEgo> \ real0m1.470s \ user0m0.000s \ sys0m0.070s
14:23:22 <HackEgo> \ real0m1.280s \ user0m1.000s \ sys0m0.760s
14:23:54 <HackEgo> \ real0m3.458s \ user0m0.290s \ sys0m1.710s
14:23:58 <HackEgo> \ real0m1.454s \ user0m0.900s \ sys0m1.080s
14:25:34 <fizzie> I tried to find the case-modification bits in bash but failed; very funky.
14:26:37 <fizzie> `run v='aBcD'; echo "${v~~}"; # undocumented!
14:29:31 -!- Arc_Koen has joined.
15:28:39 -!- epicmonkey has quit (Remote host closed the connection).
15:28:53 -!- epicmonkey has joined.
15:30:09 -!- sivoais_ has quit (Quit: leaving).
15:39:36 -!- Taneb has joined.
15:42:25 -!- Taneb has quit (Client Quit).
15:42:51 -!- Taneb has joined.
16:01:43 -!- Taneb has quit (Ping timeout: 245 seconds).
16:24:44 -!- md_5 has quit (Read error: Operation timed out).
16:25:08 -!- sirdancealot has quit (Ping timeout: 246 seconds).
16:27:19 -!- sirdancealot7 has joined.
16:29:47 -!- md_5 has joined.
16:30:48 -!- md_5 has quit (Excess Flood).
16:31:18 -!- md_5 has joined.
17:04:17 -!- Taneb has joined.
17:04:51 <Taneb> My computer is back up and running :)
17:21:51 -!- sebbu2 has joined.
17:22:07 -!- sebbu2 has quit (Changing host).
17:22:07 -!- sebbu2 has joined.
17:24:17 -!- sebbu has quit (Ping timeout: 248 seconds).
17:24:36 -!- sebbu has joined.
17:24:36 -!- sebbu has quit (Changing host).
17:24:36 -!- sebbu has joined.
17:26:27 -!- sebbu2 has quit (Ping timeout: 248 seconds).
17:41:47 <c00kiemon5ter> fuuu, I used to complete filenames with Tab on vim, like :split ~/.foo<tab> but now it shows a list like doing <tab><tab> on a terminal prompt
17:46:20 <Sgeo> I wonder what ais523 thinks about NativeBoost, whether or not it answers his objections to Smalltalk at all
17:46:35 * Sgeo doesn't quite understand it well enough to guess
17:48:00 <Sgeo> There is still a primitive, I guess :/
17:56:21 -!- Bike has joined.
18:21:04 -!- zzo38 has joined.
18:23:35 <zzo38> Some of my ideas for the Dungeons&Dragons game I have written on this paper can includes:
18:23:47 <zzo38> * In one town it now has remained noon for several days.
18:24:19 <zzo38> * A beholder in a cave is cursed, preventing their eyes from closing. Nobody (so far) is willing to help them, and nobody would quite know exactly how, either.
18:24:35 -!- Nisstyre-laptop has joined.
18:24:41 <zzo38> * Misplaced commas are causing wrong taxes, people to be killed, and other people who should die to be spared. It also results in complaints about bad grammar.
18:24:56 <zzo38> * This emerald demon is actually a decoy to lead you into a trap and there is a second one.
18:25:31 -!- FreeFull has joined.
18:27:06 <zzo38> * Glo-Gleb has their priests to write the order "Exterminate all aberration-type creature" (it is implied to do with fire). Gxxyuxiuvxi needs you to change "exterminate" to "protect"! This is difficult (partially because it isn't Chinese)...
18:27:16 <zzo38> * There are three (not two) sides each against the other two.
18:27:29 <zzo38> (Many card players prefer games with three players, I think)
18:27:47 <zzo38> What does "FOUR SIMULTANEOUS TYPE SYSTEMS IN A SINGLE ROTATION OF THE LAMBDA CUBE" mean?
18:28:27 <Bike> it's a joke about time cube.
18:28:28 <kmc> MIT got DNS-poisoned by lulzsec
18:29:11 <kmc> current theory is that someone social engineered the .edu registrar
18:30:35 <zzo38> kmc: Did they fix it yet?
18:31:28 -!- sivoais has quit (Remote host closed the connection).
18:32:15 -!- Snowyowl has joined.
18:32:24 -!- sivoais has joined.
18:32:55 <zzo38> It is sure, some people will not correct their computer until it is attacked; there is the story of someone who complained about vulnerabilities in their computer but they wouldn't fix it until they exploited it, making the two programs to ensure the other won't stop, making punch cards punch all the holes, making the disk drive move in front of the door to the computer room, etc
18:33:59 <kmc> they fixed it, but the bad DNS entries will be cached by clients for a while
18:35:16 <Snowyowl> is there some hacker-related news I missed?
18:35:39 <Bike> yeah, MIT got DNS poisoned apparently
18:35:59 <Bike> i haven't really been paying attention but why are they (They) so angry at MIT about Swartz anyhow
18:36:00 <elliott> kmc: i thought one of the lulzsec people turned out to be an ~inside job~ and then they stopped exitsing or something
18:36:07 <Bike> i thought they just sued him or something
18:36:11 <elliott> groups with obnoxious names: hard to keep track of
18:36:37 <kmc> ok well maybe it's not lulzsec
18:36:46 <elliott> Bike: jstor distanced themselves from the prosecution of swartz but MIT kept claiming neutrality afterwards despite cooperating heavily with the government on it or something, is my understanding
18:36:53 <elliott> but I don't really know the details
18:36:55 <elliott> so I might be totally wrong!
18:37:00 <zzo38> Would you consider Feynman to be a hacker? I do, and some other people I have talked to agree, but others disagree.
18:37:46 <Bike> elliott: oh, that does sound kinda shitty
18:37:52 <Bike> still they have that investigation and shit
18:38:19 <Bike> whatever, maybe i'm just not cut out to be the hacker underground
18:38:30 <elliott> aiui when the mit homepage got changed or whatever the first time the message said they aren't doing it to spite mit or something
18:38:36 <elliott> which doesn't make much sense, but
18:39:25 <Bike> politics in the age of lulzsec sure is exciting
18:39:35 <kmc> yeah there are various insinuations that MIT did more than they needed to in pursuing and cooperating with the investigation
18:39:55 <kmc> but it's all kind of murky
18:40:07 <kmc> MIT's internal inquiry is still going on
18:40:07 -!- ais523 has joined.
18:40:16 <elliott> haha i went to try and find a screenshot of the hacked mit page the first time
18:40:19 -!- zzo38 has quit (Remote host closed the connection).
18:40:26 <elliott> and clicked on an mit.edu link
18:40:27 <kmc> but internet pitchfork mobs are not exactly fans of moral subtlety
18:40:27 <Bike> maybe the real issue is i don't know what the point of website defacements is anyway
18:40:40 <kmc> Bike: publicity
18:41:58 <Snowyowl> or "ego-stroking" if you need to cast it in a negative light
18:48:46 <kmc> well you can also deface a site to add malware
18:48:53 <kmc> or to distribute subtly wrong information for strategic goals
18:48:59 <kmc> or to suppress someone else's communication
18:49:05 <kmc> there are lots of different kinds of defacements
18:51:32 <kmc> i remember there is a thing where you deface a site but only alter the way it appears to Googlebot
18:51:53 <kmc> using that to generate pagerank for other sites
18:52:24 <kmc> meanwhile the site looks fine to everyone else, so admins are less likely to notice
18:53:30 <ais523> kmc: presumably by putting a user-agent check on the server daemon?
18:53:31 <lambdabot> ais523: You have 1 new message. '/msg lambdabot @messages' to read it.
18:53:41 <kmc> the internet is a house of mirrors, everything is distorted depending on your viewpoint
18:53:43 <ais523> I guess you could do it by changing the page then using JS to change it back, but that'd be much more noticable
18:53:44 <kmc> no objective reality
18:53:52 -!- Nisstyre-laptop has quit (Ping timeout: 256 seconds).
18:54:00 <ais523> elliott: I made it more informative
18:54:15 <ais523> in an information resource, being informative is more useful than being funny
18:54:21 <ais523> and I tried to write the information in an amusing form
18:54:32 <kmc> the illusion of nouns (specific pages you can view) is supported by the reality of verbs (communication between client, server, and various third parties, always in flux)
18:54:47 <kmc> ais523: i'm not sure exactly how they do it, but yeah something like that
18:54:50 <kmc> maybe also knowing the IP range used by google
18:54:56 <elliott> ais523: well it's actually an annoying form
18:54:57 <Bike> kmc, you high or
18:55:07 <ais523> elliott: feel free to edit the page to make it less annoying
18:55:34 <Bike> that shit's straight outta borges
18:55:39 -!- boily has quit (Quit: Poulet!).
18:56:27 -!- Nisstyre-laptop has joined.
18:57:05 -!- boily has joined.
18:57:40 -!- epicmonkey has quit (Ping timeout: 260 seconds).
18:57:59 <Snowyowl> doesn't Googlebot give its name in the useragent string?
18:58:12 <Snowyowl> maybe not the useragent string
18:58:46 <Snowyowl> it gives its name in every request it sends, so that web developers can treat it nicely
18:59:29 -!- carado has joined.
18:59:50 <Snowyowl> yeah, Googlebot uses the user-agent "Googlebot"
19:13:55 <kmc> i wonder if they also do some more covert crawling
19:14:06 <kmc> in order to have a better sense of the kinds of shenanigans people play
19:14:45 <Bike> the google underground
19:15:33 <Snowyowl> so I have an idea for an esolang
19:15:48 <Snowyowl> do I need anything before posting it to the wiki? a reference implementation for example?
19:16:49 <Bike> also it needs to not be a brainfuck derivative.
19:17:12 <Taneb> An account on the wiki?
19:17:16 <kmc> what if it's a family of brainfuck derivatives
19:17:18 <Taneb> A name for the language?
19:17:27 <kmc> a family of brainfuck derivatives whose cardinality is strongly inaccessible
19:17:37 <Snowyowl> kmc: It's not, but that's a good idea.
19:18:53 <Snowyowl> should I create the article page immediately, or leave it in my userspace until it's all written up, or write it on my own hard drive?
19:19:09 <Taneb> Whichever floats your boat
19:19:16 <kmc> write it on parchment with quill pen, send it to Phantom_Hoover by carrier pigeon
19:19:29 <kmc> be sure to write OCR-A characters though so it can be easily scanned
19:19:35 <Snowyowl> don't have any carrier pigeons, will smoke signals do?
19:19:43 <kmc> 420 smoke signals every day
19:24:21 -!- AnotherTest has joined.
19:44:50 -!- asiekierka has joined.
19:44:52 -!- asiekierka has quit (Excess Flood).
19:47:54 -!- asiekierka has joined.
19:58:20 <kmc> my $class = $param{class};
19:58:21 <kmc> eval "require $class;";
19:58:24 <kmc> WEB APP SECURITY
19:58:48 -!- oerjan has joined.
19:59:12 <kmc> http://www.sec-1.com/blog/?p=402
19:59:44 <AnotherTest> Is there any serious website still prone to RFI?
19:59:59 <AnotherTest> (with the obvious exception of my school's webplatform)
20:00:04 <ais523> what does RFI stand for?
20:00:40 <kmc> that's not remote file injection
20:00:42 <kmc> it's remote code execution
20:00:43 <kmc> most directly
20:00:54 <ais523> yeah, it's two different injection attacks
20:01:07 <Snowyowl> where does $param get data from?
20:01:09 <AnotherTest> How is require external file here not RFI?
20:01:10 <kmc> and if you ask "Is there any serious website still prone to <insert common vuln class>" the answer is always "yes"
20:01:29 <AnotherTest> You would do remote code execution by RFI?
20:01:59 <Snowyowl> the request that the server is responding to?
20:02:08 <kmc> i'm thinking $class = "foo; system('echo owned')"
20:02:12 <boily> a montreal student is making the news here for having discovered a gaping security hole, then being expelled from his college for testing if that hole was patched.
20:02:14 <Snowyowl> I can't see under what circumstances that code would even be written.
20:02:32 <kmc> boily: yeah, shooting the messenger is standard practice
20:03:03 -!- spyspyspy has joined.
20:03:15 <AnotherTest> Snowyowl: Suppose I was asked to write code for a lot of money for a company that I really dislike
20:03:17 <kmc> and yeah, %param is decoded from the POST body
20:03:38 <kmc> their example exploit body is __mode=run_actions&installing=1&steps=[["core_drop_meta_for_table","class","`COMMAND_PAYLOAD_HERE`"]]
20:03:58 <kmc> backticks are command execution in perl
20:04:04 -!- spyspyspy has left.
20:04:25 <Snowyowl> okay, so they have a hidden form on the web page that contains server-side code?
20:07:49 -!- epicmonkey has joined.
20:08:07 <ais523> boily: as far as I can tell, they weren't rejected for discovering the security hole
20:08:19 <ais523> but from running an exploit database against the website afterwards
20:09:38 <ais523> wow, Valve have started running adverts for Ubuntu inside their Steam clients
20:09:49 <boily> ais523: running the exploit may have been a little bit overboard, yes.
20:10:16 <boily> he was first praised for his discovery.
20:13:14 -!- Nisstyre-laptop has quit (Quit: Leaving).
20:21:56 <Sgeo> It's nice living right next to a train station
20:23:11 <ais523> also, aren't you American?
20:23:28 <ais523> I live quite close to one, and within walking distance of a second along flat terrain
20:23:33 <Sgeo> About a block away
20:23:35 <ais523> (the second is important during heavy floods)
20:23:47 <Sgeo> Well, maybe block is the wrong word
20:23:52 <Sgeo> It's maybe a 3 minute walk
20:24:10 <Sgeo> And what does being an American have to do with anything?
20:24:35 <ais523> I thought the US train system sucked
20:24:39 <ais523> at least, it's what I've been told
20:24:40 <Bike> maybe he means light rail
20:24:56 <Sgeo> I don't know whether or not it sucks
20:25:02 <Sgeo> I haven't used the train that much
20:25:11 <Bike> the US train system is actually pretty great, just, for cargo, not for passengers.
20:25:17 <Bike> for passengers it fucking sucks.
20:25:49 <AnotherTest> guess what? we have this hypermodern new train in belgium and it doesn't work, that is it stops pseudo-randomly
20:25:53 <Bike> but if sgeo is talking about a municipal rail system or a subway or osmething, well, that's different
20:26:12 <Sgeo> Does LIRR count as a municipal rail system?
20:26:35 <Sgeo> ...I think I have given away enough information for people to guess almost exactly where I live :/
20:26:48 <ais523> AnotherTest: as in, there's a pseudorandom chance that a train won't arrive but if it does, it reaches its destination? or the train can pseudo-randomly stop while you're on it?
20:27:23 <AnotherTest> ais523: the latter, it just stops in the middle of the track
20:28:01 <Sgeo> It's weird seeing the things go down when you're on a train
20:28:22 <Sgeo> "OH SHIT I HAVE TO GET OFF THE TRACKS A TRAIN'S COMING OH WAIT I'M ON THE TRAIN"
20:29:17 <ais523> "the things"? level crossing barriers?
20:29:55 <Sgeo> I live on the other side of the train tracks from everything interesting, so end up crossing the tracks a lot
20:33:32 <HackEgo> 840) <fizzie> I am a train. There's a wireless network in the train!
20:34:25 -!- AnotherTest has quit (Quit: Leaving.).
20:34:58 <fizzie> Last time I was a train (the weekend before the last), the wireless network in the train did not work for the return trip, and I had to do with a mix of GPRS/EDGE/UMTS/HSPA.
20:36:14 <fizzie> Also, my phone calls those four things (in the tiny connection indicator icon) "2G", "2.5", "3G" and "3.5", but as far as I can figure out this other thing calls them "G", "E", "3G" and "H", which is (very) mildly confusing, because the 3G is so out of place.
20:37:14 <Bike> kmc: http://perldoc.perl.org/functions/require.html explains the uh, reasoning, behind that eval require
20:37:44 <ais523> hmm… if that Perl server code is correctly being run in taint mode
20:37:51 <ais523> then it'd crash upon encountering that line
20:42:26 <Snowyowl> hey is there a technical difference between an "instruction" and a "command"?
20:43:01 <Snowyowl> like are these words that have specific and different meanings?
20:43:16 <Bike> i don't think "generalized esolangs" is even a thing
20:51:45 <oerjan> the mezzacotta comic is very educational today
20:59:33 <kmc> LIRR is commuter rail
21:00:30 -!- derkus has left.
21:00:40 <kmc> yeah part of the reason passenger rail sucks in the US is that the freight rail companies are very powerful
21:01:04 <kmc> they own much of the infrastructure, they make passenger trains wait for slow-ass freight trains, and they lobby to have safety standards that are least inconvenient to them
21:02:14 <ais523> oerjan: huh, he's still writing them?
21:02:54 * oerjan wonders if ais523 is as confused as that sounds
21:03:01 <ais523> oerjan: it was intentional
21:04:50 <kmc> i don't know if "municipal rail" has a definite meaning in US vocabulary
21:05:04 <oerjan> a little known fact is that shakespeare stole most of his ideas from mezzacotta.
21:05:12 <kmc> but LIRR goes much further than, say, german S-Bahnen
21:05:22 <kmc> and doesn't run as frequently
21:05:33 <kmc> and doesn't run through the city center as rapid transit, just terminates at one point
21:05:40 <kmc> very few US cities have commuter rail that runs through the city, which is too bad
21:07:55 <Bike> i just meant, you know, not amtrak
21:10:53 <kmc> LIRR and NJT could run through Penn Station but this would require two different agencies to, like, communicate effectively and be competent
21:10:56 <kmc> so it will never happen
21:18:26 <Sgeo> I am definitely dealing with a recruiter.
21:18:31 <Sgeo> What, exactly, do I have to be wary of?
21:18:59 <oerjan> your immortal soul, obviously
21:21:06 <olsner> you must be wary of all, for all is evil
21:25:10 <olsner> http://imgur.com/a/tNNaT
21:25:31 <boily> olsner: is that an example of evil?
21:28:28 <boily> I just noticed the very evil gleam in their eyes. thanks for your help, now I can look at my colleagues and see if they are evil.
21:28:36 <olsner> "Don't be fooled, miniature Shetlands and the most foul tempered bastards you will ever have the misfortune of meeting."
21:29:31 <olsner> like all horses, they aim for the knees ... presumably to prevent you from fleeing and because it hurts like hell
21:32:58 -!- Snowyowl has quit (Ping timeout: 245 seconds).
21:49:53 <kmc> 2/3 of china still uses Windows XP o_O
21:50:20 <Bike> i thought they were still on 98, good for them
21:50:26 <Taneb> 1/3 of the desktop computers in this house still use 98
21:50:42 <Taneb> And thinking about it, FSVO "98"
21:50:53 <Taneb> And FSVO "desktop computer"
21:50:59 <Taneb> Probably not FSVO "house"
21:51:01 <Bike> unrelatedly, where would i learn how ghc represents some values? like, how is x:xs represented vs []
21:51:11 <Bike> fsvo fsvo, taneb
21:51:25 <Taneb> I... started overthinking things again
21:52:00 <boily> what's a fsvo? is it edible?
21:52:06 <Phantom_Hoover> the old computer i use for a footstool uses windows 98
21:52:14 <Bike> it's not, sorry
21:52:30 <Phantom_Hoover> more disturbingly, so do my dad's practice's computers
21:52:35 <ion> for some values of
21:52:47 <boily> ion: aaaah. much clearer now.
21:53:33 <oerjan> Bike: http://hackage.haskell.org/trac/ghc/wiki/Commentary/Rts/Storage/HeapObjects
21:54:13 <boily> olsner: so fsvo is edible, fsvo fsvo.
21:55:21 <kmc> Bike: the original STG machine paper is also instructive, even though it doesn't describe modern GHC precisely
21:55:24 <kmc> http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.53.3729
21:57:00 <Bike> well i'm not wondering about ghc precisely, that's just the example that came to mind
21:57:15 <Bike> i'm just wondering if [] and a cons have to be dynamically distinguished, and if so, how
21:57:35 <kmc> every heap object starts with a pointer to an 'info table'
21:57:52 <kmc> the info table is staticly allocated data
21:57:56 <Bike> ok, so not just closures
21:58:04 <kmc> there is one for every constructor and one for every lambda in the program source, roughly
21:58:09 <kmc> and some others
21:58:10 <kmc> Bike: yeah
21:58:17 <olsner> I think generally there's a tag somewhere saying which constructor was used for that value (and whether it's a value at all or if it needs to be evaluated first)
21:58:20 <Bike> this page oerjan linked is a bit confusing
21:58:38 <Bike> (which makes sense since it's internals docs :V)
21:58:58 <kmc> in the simplest conception, the info table contains function pointers for "how to evaluate this value" and "how to garbage collect this value" and such
21:59:36 <kmc> the former will perform any computation needed to get to weak head normal form, and then will return (in some STG machine register) a tag saying which constructor it is
21:59:43 <kmc> there are some optimizations though
22:00:17 <kmc> one is that the evaluation function is by far the most frequently accessed thing in the info table
22:00:31 <kmc> so instead of storing a pointer to the table, store a pointer to that function, and put the table immediately before that function
22:00:34 <kmc> saving an indirection in the common case
22:01:29 <kmc> another optimization is that if you know something is already evaluated, you can tag the least significant bits of that pointer with the constructor number
22:01:47 <Bike> ok, say I define the dumb length-of-list function, length x:xs = 1 + length xs and length [] = 0. if i call length on something, how will that thing be represented at runtime (assuming no special optimizations based on the form of the call)? with this heap structure? does that even make sense to ask?
22:01:55 <kmc> which saves many instances of having to call into the "evaluate me" function for already evaluated stuff
22:02:29 <kmc> the code for 'length' will be passed a pointer to a heap object
22:02:39 <shachaf> Bike: The STG paper is good, and this one is much closer to what GHC actually does these days:
22:02:42 <lambdabot> http://research.microsoft.com/~simonpj/papers/ptr-tag/index.htm
22:02:55 <Bike> yeah, i'll get to reading the stg paper once i've asked enough dumb questions
22:03:03 <kmc> read this one too http://research.microsoft.com/en-us/um/people/simonpj/papers/eval-apply/index.htm
22:03:30 <shachaf> Another way to learn is to run ghc-core on a bunch of things and read the generated code.
22:03:54 <shachaf> (The process, I mean, not the code.)
22:04:16 <shachaf> Bike: It depends on what "that thing" is.
22:04:31 <Bike> i've tried figuring out implementations from disassemblies of their results before, and i can't recommend it
22:04:34 <shachaf> Remember that (foo :: [a]) could do a lot of computation and then evaluate to an empty list.
22:05:05 <kmc> yeah, it could be a pointer to a cons or a nil or a thunk
22:05:06 <shachaf> Or it could just be a pointer to the single static empty list value.
22:05:09 <kmc> or some other thing
22:05:33 <Bike> and those are distinguishable at runtime?
22:05:37 <lambdabot> http://research.microsoft.com/en-us/um/people/simonpj/Papers/cpr/index.htm
22:05:45 <kmc> Bike: by the runtime system? yes
22:05:52 <kmc> but in the simplest case, it doesn't need to distinguish them explicitly
22:05:59 <kmc> it just calls the "evaluate me" function through the info table
22:06:48 <kmc> for a nil this will put 0 into some register and return
22:06:49 <shachaf> A static nil value has some code that you can call which just returns immediately with "this is a static nil value".
22:07:12 <kmc> for a cons it will put 1 and also ensure that the car and cdr are available as the second and third words of the heap object (the first being the info pointer)
22:07:19 <kmc> if it was a thunk, it might need to do arbitrary other work to make that happen
22:07:24 <shachaf> Hmm, I think it actually puts a tagged pointer into some register these days.
22:07:54 <Bike> This is a lot more complicated than the "bits, also tag" I'm used to
22:08:04 <kmc> also there used to be a "vectored returns" optimization where instead of storing 0 and returning, it would jump to the the 0th function pointer in some caller-provided table
22:08:06 <shachaf> Bike: If you do decide to read GHC's generated code, I recommend -ddump-cmm rather than the assembly.
22:08:09 <kmc> but they removed that because it wasn't very good
22:08:16 <Bike> shachaf: some kind of IR?
22:08:27 <shachaf> It has a lot more information.
22:08:27 <kmc> i think some other optimizations obsoleted it
22:08:42 <kmc> more proper to say it's Cmm
22:08:42 <shachaf> kmc: Actually it just turned out to be bad on modern CPUs.
22:08:56 <shachaf> They only found this out while implementing some other optimizations, though.
22:09:06 <elliott> kmc: yes but saying it's Cmm would not help Bike at all
22:09:09 <elliott> whereas he might know of C--
22:09:16 <Bike> I know what C-- is, yes.
22:09:26 <kmc> Cmm is the last internal representation of code in GHC, before it outputs LLVM or native assembly or bastardized C
22:09:38 <Bike> haha, what's bastardized about it?
22:09:42 <elliott> it don't output bastardised C no more
22:09:45 <kmc> it's based on C-- which was an old attempt at something like what LLVM is now
22:09:46 <elliott> Bike: it was platform-specific and stuff
22:09:50 <kmc> elliott: it still can
22:09:51 <elliott> but the C backend is dead RIP
22:09:59 <kmc> you can still build GHC with unregisterized C backend
22:10:01 <shachaf> elliott: I think the unregisterized backend still exists?
22:10:04 <elliott> on the commandline: Warning: The -fvia-c flag does nothing; it will be removed in a future GHC release
22:10:12 <elliott> but that's a different kind of bastardised!!
22:10:17 <elliott> also iirc it was broken in 7.4
22:10:20 <elliott> as in it just didn't work or something
22:10:22 <kmc> the unregisterized C is mostly portable albeit unreadable
22:10:30 <shachaf> I think JaffaCake mentioned using it recently or something.
22:10:34 <kmc> but it does care about sizes and offsets of structs on your platform
22:10:38 <Bike> oh wow spj came up with c--, i am dumb.
22:10:50 -!- boily has quit (Quit: Poulet!).
22:11:05 <kmc> Bike: the registerized C backend would generate crazy unportable "C" using many GCC extensions and then would also postprocess the assembly output of the compiler using a Perl script known as the Evil Mangler
22:11:12 <kmc> that thing is gone now thankfully
22:11:24 <elliott> written in GHC's own literate perl dialect
22:11:28 <kmc> i'm sure that helped a lot for readability
22:11:32 <Bike> that is amazing
22:11:54 <kmc> they did this because C doesn't support tail calls or functions with no prologue or such things
22:12:05 <kmc> they had regexes to snip out prologues from assembly
22:12:46 <kmc> for speeeed!
22:12:51 <Bike> also don't you normally use a trampoline to do tail calls
22:12:53 <kmc> and for reusing all of GCC's backend optimizations
22:13:14 <kmc> Bike: "trampoline" means about 500 different things in programming, which one do you refer to?
22:13:14 <Bike> glad to hear that's gone, anyway
22:13:28 <Bike> the one you use for tail calls, i guess
22:13:36 <Bike> http://en.wikipedia.org/wiki/Tail_call#Through_trampolining
22:13:47 <kmc> the unregisterized backend uses for (;;) { f = (*f)(); }
22:13:48 <elliott> well it's simpler to just make them jmps instead
22:13:55 <kmc> you return the function you want to call next
22:13:56 <elliott> unless you're doing something like cheney on the mta
22:13:57 <Bike> with regexes I hope
22:13:58 <kmc> but this is slow
22:14:20 <elliott> imo ghc backend for the reduceron
22:14:42 <kmc> the reason registerized C backend got so crazy is that it was supposed to produce actually good fast code
22:14:49 <shachaf> Bike: You should learn about GHC by implementing unboxed sums plz thx
22:14:58 <Bike> unboxed sum types?
22:15:10 <Bike> also as long as i'm being dumb, does anyone care about that Appel guy? I have one of his books
22:15:49 -!- Taneb has quit (Quit: Leaving).
22:15:51 -!- ais523 has quit.
22:15:52 <Bike> what would an unboxed sum type be exactly... actually after all that i'm no longer very sure what "unboxed" means here
22:16:40 <Bike> i don't know anything, man, the sky is fucking falling
22:16:40 <kmc> unboxed means it's *not* represented by a pointer to a heap object
22:16:53 <kmc> for example Int is a pointer to a heap object but Int# is just a machine int you pass around
22:17:13 <shachaf> In this case it would probably mean e.g. a function that return (Either Foo Bar) would return 0, ptrToFoo or 1, ptrToBar in two registers.
22:17:21 <kmc> GHC knows which values are heap pointers and which ones are primitives
22:17:27 <kmc> that's the "tagless" in Spineless Tagless G-Machine
22:17:29 <Bike> right, typing stuff
22:17:41 <kmc> even though these days it uses constructor tagging, it still does not tag pointers vs. ints
22:17:41 <Bike> shachaf: a whole other register for pseudotag?
22:17:57 <shachaf> Feel free to do it differently.
22:18:08 <kmc> you can't have a lazy Int# because there is no place to put a thunk
22:18:22 <Bike> also the stg paper says it's different from the graph reduction stuff i think the reduceron did? elliott explain
22:18:32 <shachaf> At the moment a function that returns (Either Foo Bar) allocates a (Left f) Or (Right b) on the heap and then returns a tagged pointer.
22:18:36 <kmc> and you can't instantiate a polymorphic type on Int# because polymorphic code gets to assume the basic heap layout structure
22:18:53 <kmc> you can't have [Int#] or (+) :: Int# -> Int# -> Int#
22:18:55 <Bike> so i'm assuming Int# is a GHC thing and not a Haskell thing?
22:19:05 <Bike> oh, it's like Java, haha
22:19:21 <kmc> Haskell spec doesn't say much about the implementation of primitive values except some minimum representable range
22:19:28 <kmc> but no auto-(un)boxing
22:20:11 <Bike> yes, but what's it do.
22:20:25 <shachaf> The same thing that Just does.
22:20:42 <kmc> the # character is not special other than that it's not allowed in standard Haskell
22:20:47 <kmc> by convention it's used with unboxed stuff
22:20:57 <Bike> Yeah, I'm assuming it's just a "warning do not fuck around" marker.
22:21:00 <lambdabot> Source not found. Have you considered trying to match wits with a rutabaga?
22:21:05 <kmc> it's also used with syntax for unboxed int literals, and unboxed tuples
22:21:06 <Bike> bite me, lambdabot.
22:21:06 <shachaf> That definition is the source of I#
22:21:15 <shachaf> data A = B C defines both A and B.
22:21:16 <kmc> unboxed tuples are even less first-class than unboxed value
22:21:35 <kmc> they're a way to represent multi-value return from a function
22:21:47 <Bike> oh right, the I# constructor makes it a proper thing instead of a member of the oppressed unboxed proletariat
22:22:04 <kmc> you can't pass unboxed tuples to functions, you can only return them
22:22:22 <kmc> and the only thing you can do after calling a function that returns an unboxed tuple is immediately pattern-match to extract components from that tuple
22:22:45 <Bike> sounds a lot like CL multiple values, really. 'cept without primitive m-v-call
22:23:14 <kmc> @src Integer
22:23:26 <shachaf> kmc: You can pass unboxed tuples to functions.
22:23:41 <kmc> pretty sure that's new then
22:24:13 <shachaf> http://hackage.haskell.org/trac/ghc/ticket/1509
22:24:25 <kmc> i'm so out of the loop :(
22:25:24 * shachaf is still not entirely clear on the difference between (# x #) and x
22:25:57 <Bike> kmc, you still haven't explained reduceron! elliott, make him explain.
22:26:20 <kmc> i don't know about that
22:26:28 <shachaf> what did poor ron do to you
22:27:14 <Bike> imo reducørjan
22:28:00 <shachaf> I bet unboxed sums would make a huge difference in GHC.
22:28:19 <shachaf> Imagine a thing that generates a list not having to allocate cons cells.
22:28:32 <shachaf> (Probably not that huge. But still something.)
22:28:57 <Bike> it's funny how often these things talk about "faster than C"
22:29:08 <lambdabot> monochrom says: einstein's theory implies that haskell cannot be faster than c
22:29:50 <Bike> esolang based on statically typed field equations???
22:30:42 <shachaf> I should write some GHC code.
22:32:56 -!- ogrom has joined.
22:35:08 -!- copumpkin has quit (Ping timeout: 245 seconds).
22:35:41 -!- copumpkin has joined.
22:51:10 <lambdabot> dmwit says: superBadTheWayRatMazesWithoutCheeseAreBadButNotUnsafeFoo
22:51:25 <lambdabot> dons says: the lambda revolution isn't going to happen without YOUR CODE!
22:52:07 <Bike> pretty sure making rats use unsafeCoerce violates ethics standards
22:52:17 <lambdabot> <p_l> says: damn, rage caused me to use wrong operator <bremner> is glad he is not in poland, so getting killed by p_l is less likely
22:53:09 <HackEgo> 380) <d1ffe7e45e interpreter> The interpreter uses an unbounded tape size, but due to technical limitations will stop being unbounded if the tap size reaches 2^63 cells.
22:53:09 <HackEgo> 395) <oklopol> well you know because i could've used my "wtf, you have multiple identity elements smiley" o=oO=O <oklopol> yeah, i have a smiley for everything.
22:53:10 <HackEgo> 76) <Warrigal> A person's sex is not the same thing as their penis length.
22:53:10 <HackEgo> 566) <itidus20> my old 2d game is named either runch or turbo fight.... and its hard
22:53:11 <HackEgo> 11) <fungot> GregorR-L: i bet only you can prevent forest fires. basically, you know.
22:56:08 <HackEgo> 535) <oklopol> king is something women are better at than men
22:56:08 <HackEgo> 644) <copumpkin> it's not even about strictness actually <copumpkin> not strictly about strictness, anyway
22:58:00 <Phantom_Hoover> http://esolangs.org/wiki/From_INTERCAL_to_LOLCODE:_The_Esoteric_Programming_Story
22:59:19 <Bike> concepts: half the film
23:02:26 <Sgeo> The gostak distims the doshes
23:03:43 <Bike> we could make another documentary. from international transport to beaky so easy: the esoteric mockery story
23:04:43 <elliott> from factor to clojure to factor: the sgeo story
23:05:34 <Sgeo> elliott, you should keep up. It's now Smalltalk.
23:06:06 <Bike> smalltalk + racket -> smack it?
23:06:44 <oerjan> <Phantom_Hoover> WHY DID NOBODY INFORM ME <-- we just wanted to delay the inevitable carnage a bit.
23:06:51 <Sgeo> http://iplayif.com/?story=http%3A%2F%2Fwww.ifarchive.org%2Fif-archive%2Fgames%2Fzcode%2Fgostak.z5
23:06:58 <Sgeo> I have no idea anymore what words mean
23:09:57 <elliott> Sgeo: it won't be smalltalk by the time the film is made.
23:10:02 <shachaf> Does Star651 do *everything* good in the esolang world these days?
23:11:18 <olsner> does anyone do anything in the esolang world these days?
23:30:09 -!- oerjan has quit (Quit: leaving).