←2012-08-28 2012-08-29 2012-08-30→ ↑2012 ↑all
00:02:41 <zzo38> On the document for ZUMA FPGA, I see no reference to the actual code, nor any date telling when the report was written.
00:05:50 <oerjan> > let test = (-); infixr 0 test in 3 `test` 4 `test` 5
00:05:51 <lambdabot> <no location info>: parse error on input `test'
00:06:03 <oerjan> > let test = (-); infixr 0 `test` in 3 `test` 4 `test` 5
00:06:04 <lambdabot> 4
00:06:32 <oerjan> hm so why are there fixity declarations without `` in https://github.com/mgsloan/api-compat/blob/master/examples/template-haskell.api.diff ?
00:06:59 <oerjan> !haskell let test = (-); infixr 0 test in 3 `test` 4 `test` 5
00:07:11 <EgoBot> ​\ /tmp/runghcXXXX23754.hs:1:26: parse error on input `test'
00:08:07 <shachaf> kmc: Your company should run CTFs!
00:13:13 <oerjan> oh wait that's not actually a haskell file, it's an api printout
00:13:43 <shachaf> Can we make HackEgo run Haskell?
00:13:49 <shachaf> runghc is installed but broken.
00:14:24 <oerjan> it has worked before, although elliott for some reason refused to let the working command stay...
00:14:58 <oerjan> `which runghc
00:15:00 -!- augur has joined.
00:15:01 <HackEgo> ​/usr/bin/runghc
00:15:13 <oerjan> it's installed globally, and with wrong setup
00:15:32 <oerjan> `run ghc -e 'print "test";'
00:15:36 <HackEgo> ghc: can't find a package database at /usr/lib/ghc-6.12.1/package.conf.d
00:16:46 <oerjan> !sh which runghc
00:16:47 <EgoBot> ​/usr/bin/runghc
00:16:56 <oerjan> !sh which ghc
00:16:56 <EgoBot> ​/usr/bin/ghc
00:17:05 <shachaf> `run ls -d /usr/lib/ghc*
00:17:09 <HackEgo> ​/usr/lib/ghc-6.12.1
00:17:12 <oerjan> !sh ghc -e 'putStrLn "test";'
00:17:15 <EgoBot> ​<interactive>:1:15: parse error on input `;'
00:17:27 <oerjan> wat
00:17:31 <oerjan> !sh ghc -e 'putStrLn "test"'
00:17:34 <EgoBot> test
00:17:45 <shachaf> I want it on HackEgo.
00:18:30 <oerjan> well only Gregor can fix that installation
00:18:41 <shachaf> Gregor: !
00:18:47 <shachaf> oerjan: Slap Gregor for me, would you?
00:18:57 <oerjan> i am not sure that is productive
00:18:58 <shachaf> I mean swat.
00:19:08 <shachaf> You know, that thing you do.
00:19:19 <shachaf> @slap Gregor
00:19:19 * lambdabot hits Gregor with a hammer, so they breaks into a thousand pieces
00:19:30 <shachaf> They brokes into a thousand pieces!
00:19:34 <shachaf> Counterproductive. :-(
00:19:42 <oerjan> toribull
00:20:41 <Gregor> I removed ghc because it was friggin' enormous
00:20:42 <kmc> http://www.quora.com/Would-becoming-homeless-be-a-good-strategy-to-cut-costs-1
00:24:28 <oerjan> Gregor: but you left the executables...
00:24:49 <shachaf> kmc: SOunds like fun.
00:24:59 <shachaf> I should try that.
00:25:13 <pikhq> Gregor: "GCC is enormous; rm -rf /usr/lib/*.so"
00:25:30 <Gregor> pikhq: Pretty much.
00:25:36 <shachaf> pikhq: That would be a better argument if GHC did dynamic linking.
00:25:39 <pikhq> Well, actually, more like.
00:25:42 <Gregor> However, I had ghc installed to /opt/ghc
00:25:49 <Gregor> So, y'know, rm -rf /opt/ghc
00:25:50 <pikhq> "GCC is enormous; rm -rf /usr/include"
00:26:01 <shachaf> "GCC is enormous; rm -rf /"
00:26:22 <pikhq> "GCC is enormous; play-a-game"
00:26:40 <shachaf> /usr/games/wump
00:26:55 <oerjan> "A strange game. The only winning move is not to play."
00:46:02 <kmc> gcc is enormous, netcraft confirms it
00:46:28 * shachaf is finding it difficult to concentrate on anything. :-(
00:46:57 <shachaf> Except for mindless things like telling people in #haskell why they're wrong.
00:47:16 <shachaf> Which is another reason to leave.
00:48:59 -!- Concreto has joined.
00:49:12 <oerjan> `welcome Concreto
00:49:16 <HackEgo> Concreto: 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.)
00:49:17 <kmc> wump the humpus
00:49:21 <Concreto> oerjan: thank you
00:49:28 <shachaf> (I'm actually not doing that.)
00:49:43 <shachaf> `WeLcOmE wumpus
00:49:47 <HackEgo> WuMpUs: 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.)
00:50:06 -!- kinoSi has quit (Read error: Connection reset by peer).
00:50:35 -!- kinoSi has joined.
01:03:13 <FreeFull> `WelComE
01:03:15 <HackEgo> ​/home/hackbot/hackbot.hg/multibot_cmds/lib/limits: line 5: exec: WelComE: not found
01:06:20 * oerjan suddenly wonders if one could somehow put `welcome in a case-insensitive directory and get it to work for all combinations
01:07:22 <oerjan> i vaguely recall something about mounting case-insensitive file systems, or something
01:09:31 <oerjan> i suppose the repository model might get in the way
01:13:32 -!- derdon_ has joined.
01:16:38 <oerjan> quadruple sneeze :(
01:17:05 -!- derdon has quit (Ping timeout: 272 seconds).
01:26:41 <Phantom_Hoover> hello
01:27:15 <oerjan> mörn
01:28:19 -!- oerjan has quit (Quit: Good night).
01:30:18 -!- derdon_ has quit (Remote host closed the connection).
01:48:18 -!- Braber01 has joined.
01:48:26 <Braber01> !bf_textgen
01:49:10 <Braber01> Just out of cuoristy could mushcode be consider3ed an Esoteric programming language?
01:49:33 <ion> `run cat bin/WeLcOmE
01:49:36 <HackEgo> ​#!/bin/sh \ welcome $@ | python -c "print (lambda s: ''.join([ (s[i].upper() if i%2==0 else s[i].lower()) for i in range(len(s)) ]))(raw_input())"
01:49:38 <FreeFull> mushcode?
01:49:59 <ion> Eww at not quoting sh variable references
01:50:06 <FreeFull> `run mkdir bin/WelCome
01:50:08 <HackEgo> No output.
01:50:18 <FreeFull> `WelCome
01:50:21 <Braber01> `bf_textgen
01:50:21 <HackEgo> ​/home/hackbot/hackbot.hg/multibot_cmds/lib/limits: line 5: exec: WelCome: not found
01:50:24 <HackEgo> ​/home/hackbot/hackbot.hg/multibot_cmds/lib/limits: line 5: exec: bf_textgen: not found
01:50:35 <FreeFull> !bf_textgen Try actually writing something.
01:50:39 <FreeFull> ^bf_textgen Try actually writing something.
01:50:54 <FreeFull> `run echo echo
01:50:58 <HackEgo> echo
01:51:09 <FreeFull> I am really tempted to forkbomb ):
01:51:12 <Braber01> ~bf_textgen Will you go out with me?
01:51:13 <cuttlefish> --- Possible commands: dice, duck, echo, eval, fortune, metar, ping, yi
01:51:28 <FreeFull> ~yi
01:51:28 <cuttlefish> Your divination: "Gorge" to "Dispersing"
01:51:43 <FreeFull> ~duck
01:51:44 <cuttlefish> --- ~duck query
01:51:44 <cuttlefish> --- Query information from Duck Duck Go
01:52:03 <Braber01> !bf_textgen Test
01:52:05 <FreeFull> `run :(){ :|:&};
01:52:08 <HackEgo> No output.
01:52:16 <FreeFull> Oh, it terminated :o
01:52:38 <FreeFull> Oh wait
01:52:41 <FreeFull> I didn't actually run :
01:52:50 <FreeFull> `run :(){ :|:&};:
01:52:53 <HackEgo> No output.
01:53:06 <FreeFull> `run exec sh -e ':(){ :|:&};:'
01:53:09 <HackEgo> sh: Can't open :(){ :|:&};:
01:53:19 <Braber01> There a wiki where one could look up bot commands? for this channel?
01:53:23 <ion> -c
01:53:29 <FreeFull> `run exec bash -e ':(){ :|:&};:'
01:53:32 <HackEgo> bash: :(){ :|:&};:: No such file or directory
01:53:49 <Braber01> `run bash ls
01:53:51 <HackEgo> ​/bin/ls: /bin/ls: cannot execute binary file
01:54:12 <ion> -c
01:54:27 <FreeFull> `run bash -e ls
01:54:30 <HackEgo> ​/bin/ls: /bin/ls: cannot execute binary file
01:54:35 <ion> -c
01:54:36 <FreeFull> `run /bin/ls
01:54:39 <HackEgo> bin \ canary \ foo \ karma \ lib \ paste \ quotes \ share \ wisdom \ zalgo.hs
01:55:04 <ion> `run cat zalgo.hs
01:55:07 <HackEgo> import Random;main=mapM_((>>(י=<<randomRIO('̀','ͯ'))).י)=<<getContents;י=putChar
01:55:27 <Braber01> Am I the only one who can see LOLCODE being a full-flegded OOEPL?
01:55:37 <FreeFull> `run exec bash
01:56:08 <Braber01> !bf_textgen Hi.
01:56:09 <HackEgo> bash: cannot set terminal process group (-1): Inappropriate ioctl for device \ bash: no job control in this shell \ bash-4.1$
01:56:22 <zzo38> Braber01: What is OOEPL?
01:56:36 <Braber01> Object Oriented ESOTERIC Programming Language :P
01:56:53 <shachaf> zzo38: How's Ibtlfmm?
01:58:06 <Braber01> If cats could program, LOLcode is def the language they would use.
01:58:28 <FreeFull> `run bash -c ':(){ :|:&};:'
01:58:31 <HackEgo> No output.
01:58:35 <Braber01> `run bash -e %blow
01:58:38 <HackEgo> bash: %blow: No such file or directory
01:58:46 <FreeFull> `run nohup bash -c ':(){ :|:&};:'
01:58:49 <HackEgo> nohup: ignoring input and redirecting stderr to stdout
01:59:17 <ion> Pro tip: fork bombs won’t work.
01:59:23 <Braber01> `run tcsh -e %blow
01:59:26 <HackEgo> bash: tcsh: command not found
02:01:12 * Braber01 really want's HackEgo to say blow: No such job.
02:02:01 <FreeFull> `run a="exec bash -c \"$a\""; exec bash -c "$a"
02:02:03 <HackEgo> No output.
02:02:08 -!- pikhq_ has joined.
02:02:29 <Braber01> `run bf_textgen test
02:02:32 <HackEgo> bash: bf_textgen: command not found
02:02:36 <Braber01> >:(
02:02:42 -!- pikhq has quit (Ping timeout: 265 seconds).
02:02:58 -!- copumpkin has changed nick to irregardless.
02:03:42 <FreeFull> My attempted quinebomb doesn't seem to nest
02:04:26 <FreeFull> Fail =P
02:05:28 <FreeFull> I think you can make a pretty cool quine with printf
02:12:32 <FreeFull> Harder than I thought
02:19:20 -!- Braber01 has quit (Quit: Leaving).
02:20:11 <FreeFull> It's the damn quoting that kills it
02:26:20 <FreeFull> Oh
02:26:38 <FreeFull> I didn't think of using \47 instead of \"
02:28:22 <shachaf> kmc: Finally looking at level 7.
02:28:25 <shachaf> h.update(self.api_secret + message)
02:29:08 <shachaf> Looks like the thing I was talking about earlier...
02:30:53 <kmc> yep
02:32:14 * shachaf wonders whether you can do this using just the sha1sum executable.
02:33:04 <shachaf> I have an implementation of sha1 lying around, fortunately.
02:33:16 <shachaf> It wasn't working until now, but I found the bug in it!
02:34:21 <kmc> an implementation you wrote?
02:34:26 <shachaf> Yes.
02:34:31 <kmc> cool!
02:34:34 <kmc> i've never done that
02:34:42 <kmc> i just downloaded a reference implementation for the CTF level
02:34:47 <shachaf> It's pretty much copying the pseudocode on Wikipedia.
02:34:53 -!- DHeadshot has joined.
02:35:25 <shachaf> I wrote it back when I heard about the Flickr attack, in fact. :-)
02:35:39 <kmc> heh
02:35:40 <zzo38> shachaf: I still have no proper documentation for Ibtlfmm but I have stuff on the IRC and stuff on paper
02:35:44 <shachaf> http://slbkbs.org/r.rb.txt
02:35:46 <kmc> i didn't hear about the flickr attack until this CTF
02:36:35 <shachaf> At the time I didn't care enough to find the bug, though. I was using the length in bytes instead of bits.
02:37:02 * shachaf wonders whether adding the length on is necessary.
02:37:48 -!- irregardless has changed nick to copumpkin.
02:42:08 <shachaf> I mean, for the guarantees SHA1 gives you.
02:42:48 <shachaf> I guess most hash functions people use are built the same way.
02:43:56 <shachaf> https://en.wikipedia.org/wiki/Merkle%E2%80%93Damg%C3%A5rd_construction doesn't give reasoning for it other than "To harden the hash even further also".
02:44:05 <zzo38> Is LFSR faster than arithmetic in hardware? What if the taps can be reconfigured at runtime?
02:50:41 -!- elliott has joined.
02:50:44 <elliott> shachaf: You know C++11, right?
02:51:18 <shachaf> elliott: Not really?
02:51:27 <shachaf> I've never actually used it.
02:51:29 <shachaf> I've read a bit about it.
02:52:00 <shachaf> elliott: You should do stripe-ctf.com!
02:52:05 * kmc <3 C++11
02:52:05 <shachaf> Roughly 12 hours until they turn it off.
02:52:22 <kmc> i've only used a few of the new features, but they are nice
02:52:37 <shachaf> Hmm, I think you need a bit more cleverness than just knowing that you can append arbitrary things.
02:52:43 <kmc> like iteration-based loops
02:52:54 <elliott> kmc: Do you know about the "enum class" stuff?
02:53:19 <kmc> oh i used variadic templates for something too, but i forgot what and it's probably for the best
02:53:22 <kmc> elliott: no
02:53:24 <kmc> nelliott
02:53:32 <elliott> :(
02:53:40 <kmc> also i'm really really glad that shared_ptr is in the stdlib now
02:53:47 <shachaf> What about unique_ptr?
02:53:51 <elliott> kmc: Variadic templates are nice because you can use them to do regular variadic functions, except they don't need any terminating NULLs or anything.
02:53:54 <elliott> And they don't mangle types up.
02:54:14 <kmc> change my pitch up / mangle my type up
02:56:54 -!- elliott has left ("Leaving").
03:00:22 * shachaf wonders whether there's a client bot for level 7 like for the other levels.
03:00:48 <shachaf> Oh, hah.
03:04:49 <kmc> shachaf: something like unique_ptr was in C++98 right?
03:05:03 <shachaf> kmc: Was it?
03:05:12 <kmc> i don't actually know the difference between auto_ptr and unique_ptr
03:05:56 <pikhq_> One's got 2 u's.
03:05:56 <shachaf> Move semantics and all that.
03:07:30 -!- DHeadshot has quit (Read error: Connection reset by peer).
03:07:36 -!- DH____ has joined.
03:09:36 -!- Phantom_Hoover has quit (Read error: Connection reset by peer).
03:09:55 <shachaf> Ugh, I can't use curl to make this http request because \0? :-(
03:10:00 * shachaf hates it when tools are annoying.
03:10:59 <kmc> curl --data-binary @filename
03:11:20 <shachaf> kmc++
03:11:29 <shachaf> You're totally giving away the solution here, man.
03:11:31 <kmc> :3
03:11:44 <fizzie> There's the supplied client tool too, to give away alternatives.
03:15:08 <shachaf> I like the part where "count=10&lat=37.351&user_id=1&long=-119.827&waffle=eggo" is 440 bits long.
03:16:01 <fizzie> Do you like the part where the secret+that is just a bit over 512 bits long?
03:17:16 <kmc> no good spoofing an eggo waffle
03:17:21 <shachaf> Ugh, I forgot about the secret. :-(
03:17:41 <shachaf> Wait, why is spoofing an eggo no good?
03:17:48 <shachaf> I mean, if you add &waffle=liege to the end.
03:17:51 <shachaf> You probably shouldn't answer taht.
03:18:54 <fizzie> What if the answer is "wait, right, it doesn't matter"?
03:18:55 <kmc> yeah that will probably work
03:19:01 <kmc> i'm remembering wrong
03:19:08 <shachaf> fizzie: 448 is the number that matters, anyway, not 512
03:19:22 <kmc> 31337 is the number that matters
03:19:54 <fizzie> As for unique_ptr, arguably the semantics are more ot less the same, it makes the "move" operation explicit as opposed to something that looks like a copy, so you (and more to the point, someone's template algo doing "a = b") doesn't get confused. (And it can free pointers-to-arrays with delete[] as an unrelated improvement.)
03:35:54 <kmc> ah
03:36:18 <kmc> i think possibly new[] / delete[] should not be in C++
03:36:30 <kmc> either you should use something like std::vector
03:36:47 <kmc> or you are implementing such a library yourself, and can deal with allocating a big chunk of memory and using placement new
03:37:28 <kmc> i think C++ would be better with a more explicit separation between the high-level applications programming features and the features which exist for implementing the core libraries (which are extensions of C features, largely)
03:39:00 <shachaf> Ah, got level 7.
03:39:15 <shachaf> Great news: 10 liege waffles will soon be flying your way!
03:40:06 <shachaf> It's trickier to implement this than to "know how it works".
03:40:42 <kmc> yeah
03:40:47 <kmc> it took me longer than that, for sure
03:41:02 <shachaf> Well, I already had the Ruby code and basically knew how it worked.
03:41:55 <kmc> your exploit for the flickr thing?
03:41:58 <pikhq_> kmc: C++ would be much better if they removed features.
03:42:14 <kmc> probably
03:42:48 <kmc> but i do think the features in C++ fit together better than in most bad languages
03:42:55 <kmc> there are still too many
03:43:02 <shachaf> Well, it's just a regular implementation of SHA1 -- I just wrote it to have a version to fiddle with at the time. But I mean that I was familiar with how the hash and attack work.
03:43:08 <kmc> ah right
03:43:20 <kmc> it took me a while to figure out the right kind of padding and such
03:43:26 <pikhq_> It's a bad language designed by people who are actually decent programmers.
03:43:37 <pikhq_> Which makes it... Nearly unique in that regard, near as I can tell.
03:43:43 <kmc> yeah
03:44:09 <shachaf> You get completely useless error messages when doing something like this. :-)
03:44:31 <shachaf> Now I have 15 hours to do level 8.
03:44:45 <shachaf> (And sleep. I have hoping to sleep.)
03:44:47 * shachaf is still finding it hard to concentrate...
03:47:06 <shachaf> You completed this level in 500560.354 seconds
03:57:13 <pikhq_> Why, that's nearly 0.000002 levels per second! You'll lick it in no time.
03:58:27 <shachaf> ion: Did you know there really is a Haskell report?
03:59:31 <ion> I thought it was just a legend told by salty seamen.
04:19:54 -!- TeruFSX has quit (Read error: Connection reset by peer).
04:20:43 -!- MoALTz has joined.
04:21:52 -!- TeruFSX has joined.
04:22:15 <zzo38> I have composed and written some music on my computer. It has a moment of silence (i.e. a fermata and rest together) somewhere in the middle.
04:27:25 * shachaf suspects port-scanning level08-2.stripe-ctf.com is on the wrong track.
04:44:30 -!- MoALTz has quit (Ping timeout: 252 seconds).
05:01:00 -!- DH____ has quit (Read error: Connection reset by peer).
05:01:06 -!- DHeadshot has joined.
05:08:30 -!- DHeadshot has quit (Read error: Connection reset by peer).
05:18:58 <shachaf> kmc: Did you know you escape non-BMP characters in JSON by using a surrogate pair?
05:19:39 <zzo38> Does JSON use UTF-16?
05:20:00 <shachaf> Whichever encoding your file is encoded in.
05:20:26 <shachaf> JavaScript apparently does the same thing.
05:20:42 <zzo38> JSON is a subset of JavaScript, though.
05:21:56 -!- pikhq_ has quit (Ping timeout: 248 seconds).
05:22:02 -!- pikhq has joined.
05:31:23 <zzo38> Here is the hex of a file I have created to test how a terminal display backspace and line breaks: 54 65 72 6D 69 6E 61 6C 20 54 65 73 74 65 72 0D 0A 31 32 33 08 34 35 36 7F 37 38 39 0D 0A 31 32 33 0D 34 35 36 0A 37 38 39 0D 0A 3F 0D 0A
05:37:38 -!- evincar has joined.
05:45:14 -!- evincar has quit (Quit: leaving).
05:45:45 -!- jon__ has joined.
05:46:45 -!- jon__ has left.
05:48:52 -!- evincar has joined.
05:51:23 <zzo38> Does LLVM have anything to deal if the target's bytes are not 8 bits long?
05:52:13 <pikhq> Probably a developer's middle finger is all.
05:53:41 <zzo38> I would suggest to add a "B" specification to the target layout specification, with a default value of eight, used to specify the number of bits in a byte.
05:54:01 <shachaf> What if your target is a ternary computer?
05:54:49 <zzo38> Then you have to emulate binary like C does, I suppose, or you have to use ternary LLVM instead of the normal LLVM.
06:09:11 -!- monqy has quit (Ping timeout: 245 seconds).
06:17:00 <zzo38> The LLVM IRC they refused to answer my questions.
06:30:06 <zzo38> Can do-notation be used with monads on any Cartesian closed category?
06:31:14 <fizzie> What is there in LLVM that expects 8-bit bytes? Couldn't a CHAR_BIT == 16 system just have something like "i1:16:16 i8:16:16 i16:16:16 i32:32:32 ... n16:32" and then clang (or whatever C frontend there is) should just make 'char' generate i16's? (Disclaimer: I don't know much at all about LLVM internals.)
06:34:30 <zzo38> fizzie: I don't really know, but it seems in many places it expects 8-bits; one thing is it requires stack alignments to be a multiple of eight bits, and pointer arithmetic might not work properly, it has no void* and requires i8* in its place, etc
06:34:50 <fizzie> I suppose there's something, since I see people interested in having a LLVM DCPU-16 backend complain about it.
06:37:41 <fizzie> I see someone's done some sort of work for a CHAR_BIT == 24 DSP system, including a "StorageUnitSize" in TargetData and fixing clang/llvm pointer arithmetic to use that, but it doesn't seem to be public work.
06:39:54 <zzo38> There are also a lot of other things I wanted for LLVM but seem they don't have, such as metadata for specifying penalties for optimization.
06:42:39 -!- impomatic has quit (Quit: impomatic).
06:44:13 -!- nooga has joined.
06:50:57 -!- asiekierka has joined.
06:56:29 <zzo38> Do you know if a category can have more than one way of cartesian closed?
06:57:42 -!- Concreto has quit (Quit: Leaving...).
07:36:10 <shachaf> kmc: Are requests to level08 supposed to take a two-digit number of seconds to complete?
07:36:20 <shachaf> Or is it that everyone is doing what I'm doing? :-)
07:50:45 -!- evincar has left.
07:51:42 <fizzie> shachaf: When I was doing it, sometimes single requests took quite a long time (not two-digit numbers usually, though), but sending multiple using the same connection usually got the whole pile done in a short time.
07:53:20 <fizzie> shachaf: When I was doing it, sometimes single requests took quite a long time (not two-digit numbers usually, though), but sending multiple using the same connection usually got the whole pile done in a short time. Maybe they're all as slow.)
07:54:29 <fizzie> What.
07:54:42 <fizzie> That's not what I was saying.
07:55:02 <fizzie> If you haven't done too much work, you can always reset and hope you end up on a less busy box. (Didn't try that. Maybe they're all as slow.)
07:55:07 <fizzie> That was.
07:55:18 <fizzie> IRC is hard.
07:58:01 <fizzie> Also, sometimes there were bursts of a lot of activity. (Maybe people attempting something timing-related despite the hint?)
07:58:43 <fizzie> (Or just impatient people, I guess.)
07:58:56 <shachaf> Or maybe it's that they've all waited until the last day, like me.
08:00:54 <fizzie> That could be. I did get half-a-minute delays every now and then, but for the most part it was something like two seconds per request.
08:11:54 -!- lahwran has quit (Ping timeout: 276 seconds).
08:14:00 -!- kinoSi has quit (Read error: Connection reset by peer).
08:14:28 -!- kinoSi has joined.
08:16:31 -!- zzo38 has quit (Remote host closed the connection).
08:22:47 -!- olsner has quit (Quit: Leaving).
08:27:10 -!- lahwran has joined.
08:27:15 -!- lahwran has quit (Excess Flood).
08:30:40 <Sgeo> Hmm
08:30:46 <Sgeo> I just found out about WebGoat
08:30:56 <Sgeo> Is it generally a better thing to work through than HackThisSite?
08:39:21 -!- lahwran has joined.
08:39:21 -!- lahwran has quit (Excess Flood).
08:47:35 -!- Sgeo_ has joined.
08:50:24 -!- Sgeo__ has joined.
08:50:54 -!- Sgeo has quit (Ping timeout: 276 seconds).
08:54:06 -!- Sgeo_ has quit (Ping timeout: 264 seconds).
08:56:51 -!- Sgeo has joined.
08:59:09 -!- Sgeo__ has quit (Ping timeout: 240 seconds).
09:00:52 -!- Sgeo has quit (Read error: Connection reset by peer).
09:01:19 -!- Sgeo has joined.
09:04:54 -!- lahwran- has joined.
09:04:58 -!- lahwran- has quit (Excess Flood).
09:18:48 -!- atriq has joined.
09:43:23 -!- FreeFull has quit (Ping timeout: 246 seconds).
09:44:25 -!- FreeFull has joined.
09:44:52 -!- atriq has left ("Leaving").
09:44:56 -!- atriq has joined.
09:45:00 <atriq> I've got to disable that
09:45:06 <atriq> You know what annoys me?
09:45:28 <atriq> Facebook pages that are supposedly for the north-east of England but advertise events in Leeds
09:46:37 <shachaf> fizzie: Getting a lot of false positives...
09:47:29 <shachaf> I wonder if I'm doing something wrong. Presumably I can do a few passes to get it cleared out.
09:48:46 * shachaf wonders whether there's more than one technique for doing this.
09:48:56 <shachaf> This isn't a place I normally think of as leaking information.
09:49:15 -!- lahwran- has joined.
09:49:15 -!- lahwran- has quit (Excess Flood).
09:52:16 <shachaf> It did get much better when I rewrote the code to reuse an HTTP connection.
09:52:17 <fizzie> shachaf: I got about 10% to 2% (a rough guess) false positives depending (presumably) on how much other stuff was happening, at least when doing... uh, I don't know how much in detail I can go before it's too spoilery.
09:52:28 <fizzie> Okay, yes, that was what I was going to say after the ...
09:52:36 <shachaf> You already said that, though.
09:52:49 <fizzie> Yes, but not as directly. Just that it improved the response time. :p
09:53:03 <shachaf> Anyway I think I'm getting ~1/3 false positives.
09:53:10 <shachaf> Which will mean running this a bunch of time.
09:53:13 * shachaf is still on the first pass.
09:53:55 <fizzie> There were periods of time when I got close to 1 false positives for half an hour or so. It's possible you've just picked a lot busier time than I.
09:54:08 <shachaf> It's possible.
09:54:17 <shachaf> It *is* ending in 9 hours, after all.
09:54:35 <shachaf> 828, 300 false positives.
09:54:46 <atriq> I have no idea what you are talking about
09:54:53 <shachaf> atriq: stripe-ctf.com
09:54:59 <shachaf> See if you can finish it in 9 hours!
09:55:45 -!- lahwran- has joined.
09:55:45 -!- lahwran- has quit (Excess Flood).
09:56:26 <shachaf> I wonder why it gets false positives.
09:56:44 <fizzie> > logBase 3 1000
09:56:45 <lambdabot> 6.287709822868153
09:56:57 <fizzie> That's not too many passes if you get the set cut to 1/3 every time.
09:57:12 <shachaf> I mean, it could be because the REDACTEDs are already used, but that's kind of strange.
09:57:23 * shachaf didn't even know they were sequential.
09:59:51 <fizzie> shachaf: The process for selecting the REDACTED works so that there's a single global consecutive counter, and then a hash function computed out of the... other things of the target thing except the REDACTED, and a crypto-safe fixed random bit. So you get unpredictable values for things going towards different things, but for a single thing they're sequential; and you get this without having ...
09:59:57 <fizzie> ... to keep multiple incrementing counters.
10:00:11 <fizzie> (So you get false positives when the counter gets incremented due to unrelated things happening.)
10:00:31 * shachaf wonders whether the REDACTIONs mean anything at this point.
10:00:43 <fizzie> (There's a RFC about best-practice in selecting the REDACTED, and it has a summary of how different operating systems do it.)
10:00:46 <fizzie> Probably not. :p
10:01:16 <shachaf> At least that means we have the same solution.
10:01:59 <shachaf> @localtime
10:02:02 <lambdabot> Local time for shachaf is Wed Aug 29 03:01:59 2012
10:02:07 <shachaf> It might be a while before I get to sleep... :-(
10:02:12 <shachaf> Not good for my health.
10:03:09 <fizzie> The... last round of the whole thing goes quite a bit faster, since you don't have to care about potential false positives.
10:03:19 <shachaf> fizzie: Oh, wait a moment, that means I can parallelize it?
10:03:34 <shachaf> If I use a second REDACTED on a second REDACTED?
10:03:52 <shachaf> Or not, I guess, if there's a global counter.
10:05:39 <fizzie> I... suppose you could, theoretically, if you kept the attempts in sync and looked at the largest difference, but it sounds a bit complicated, and of course a single false-positive would then ruin both (or all) the simultaneous parallel attempts.
10:06:33 <shachaf> OK, doing pass 3 of round 1.
10:06:47 * shachaf could have automated this a lot more.
10:07:40 <fizzie> I didn't automate my thing a whole lot, there was a lot of manual clickery and number-copying involved. On the other hand, I did have time to waste, too.
10:07:54 <fizzie> I had a rather manual approach to the previous CTF's somewhat-similar thing too.
10:08:25 <fizzie> In that I only had a thing to do a single round, and then tweaked that to do more.
10:08:41 <fizzie> IIRC it had quite a long flag too, longer than this.
10:08:46 <shachaf> Yes.
10:08:56 <shachaf> I did a half-shell half-C thing.
10:09:17 <shachaf> Did you have a deterministic or non-deterministic solution for that one?
10:09:52 <fizzie> Deterministic, based on an almost-filled pipe that blocked at just the right '.'-write.
10:09:58 <shachaf> That was mine also.
10:10:13 <shachaf> kmc used timing but he says that was pretty tricky.
10:10:26 <shachaf> Some people used rlimits.
10:11:03 <fizzie> I've seen that people have put solution-tutorials online, but haven't bothered comparing mine with them.
10:11:34 <shachaf> I went to the Stripe-meetup-thing about it.
10:11:47 <fizzie> It would've been a bit far from here.
10:12:28 <shachaf> kmc went, and he lives >4000km away!
10:12:45 -!- lahwran| has joined.
10:14:49 <shachaf> Hmm, this is strange.
10:15:16 <shachaf> I'm getting 3 for X, 2 for Y, and a weird number for Z.
10:15:37 <shachaf> Z is consistently getting strange numbers and X is consistently getting 3.
10:16:02 <fizzie> That's kinda weird; I didn't see any particular Z's.
10:16:18 <shachaf> Oh, never mind.
10:16:28 <shachaf> It's because I was consistently testing Z after X.
10:17:49 <shachaf> OK, time to add a little bit of autoamtion.
10:18:01 <fizzie> I ran my tests by sending each number twice, and looking only at the diff of those two, which is I guess a bit subtimal in terms of the total number of requests. (But it's asymptotically the same, so who cares, right?)
10:19:10 <shachaf> At this hour of night, even I care about constant factors.
10:34:44 <fizzie> FreeFull: I totally agree.
10:47:11 -!- Arc_Koen has joined.
10:51:26 <shachaf> Weird, I'm getting a Z again.
10:51:42 <shachaf> Ah, there we go.
10:52:34 <shachaf> Round 3.
11:05:32 <fizzie> "Round 3... Fight!"
11:06:01 <shachaf> It's amazing how much difference a tiny bit of automation makes.
11:08:20 -!- astronick has joined.
11:12:21 -!- Phantom_Hoover has joined.
11:13:49 <shachaf> fizzie: Perhaps the lock thing would make it unparallelizable anyway.
11:48:42 -!- astronick has left ("Leaving").
11:49:06 -!- MoALTz has joined.
11:51:05 -!- Concreto has joined.
11:57:07 -!- Concreto has quit (Quit: Leaving...).
11:58:11 -!- Concreto has joined.
11:59:42 -!- oerjan has joined.
12:03:20 <Arc_Koen> atriq: I think the interpreter is working now
12:03:27 <atriq> Brilliant!
12:03:38 <atriq> Now we just need to write some programs, heh
12:03:42 * oerjan notes a lot of misspelling of !bf_txtgen in the logs
12:03:42 <Arc_Koen> though I haven't tested it yet so there probably are some errors in it
12:04:46 <Arc_Koen> let's test it on an empty program first
12:05:44 <fizzie> oerjan: It's noerjan wonder, since the Java class is called "textgen".
12:05:55 <oerjan> OKAY
12:06:15 <Arc_Koen> wouuuuuuh
12:06:31 <fizzie> fungot: bf_TEXGUN Hello, wodlr!
12:06:32 <fungot> fizzie: k., letter to. on submerged reefs. areas :) subsidence and :) elevation. in descending from/ mountains :) borneo.
12:06:32 <Arc_Koen> empty fueue: input a character, then segmentation fault
12:06:42 <Arc_Koen> half the work already :p
12:06:45 <oerjan> Arc_Koen: promising
12:06:55 <Arc_Koen> (it didn't output it though)
12:07:58 * oerjan suddenly realizes efficient fueue probably needs garbage collection of some kind
12:08:24 <Arc_Koen> I heard a lot about garbage collection since I joined this channel, but I still have no idea of what it could mean
12:08:34 <oerjan> YOU ARE DOOMED
12:09:21 <oerjan> it means that data structures get automatically freed when no longer referred to. automatic in ocaml, quite awkward in C.
12:09:25 <atriq> I'm not sure what garbage there would be to collect. It's a queue that slides about
12:09:49 <oerjan> atriq: : copies things. you can construct blocks on the fly.
12:10:05 <oerjan> so blocks, basically.
12:10:10 <Arc_Koen> hmm, well, now that you mention it, I probably didn't bother to empty the queue after meting the "halt" function
12:10:40 <oerjan> ...garbage collection isn't necessary when halting, the os frees your memory anyhow.
12:11:09 <oerjan> it's necessary for long-running programs that create a lot of temporary structures
12:11:31 <Arc_Koen> yes I'm glad the os has been here to stop the computer from crashing since I started programming
12:11:48 <fizzie> But a disk-eating hard crash is how you learn!
12:12:03 <Arc_Koen> (it didn't completely stop the rm -Rf / I tried once, though)
12:12:22 <oerjan> ...
12:12:46 <Arc_Koen> what?! I was thinking "no way I can destroy everything that easily"
12:13:02 <oerjan> i guess you learned.
12:13:12 <fizzie> I am become Death, the destroyer of worlds.
12:13:23 <oerjan> although i think there's a failsafe on / i particular nowadays.
12:13:29 <oerjan> *in
12:13:36 <fizzie> oerjan: Better try it out to be sure.
12:13:45 <Arc_Koen> yes, the computer still works well
12:13:59 <Arc_Koen> and half the things that were on it still are
12:14:11 <fizzie> (man rm: --no-preserve-root: do not treat `/' specially / --preserve-root: do not remove `/' (default).)
12:14:43 <oerjan> fizzie: fortunately i don't have root access on my linux account.
12:15:06 <fizzie> I suppose you could as easily convince a person willing to rm -rf / to add a --no-preserve-root option too.
12:15:09 <Arc_Koen> it's like the computer has been designed to be operated by a human
12:15:32 <Arc_Koen> (and it's very mean from you to have mentionned that --no-preserve-root option in front of me)
12:16:43 <fizzie> "GNU rm refuses to execute rm -rf / if the --preserve-root option is given, which has been the default since version 6.4 of GNU Core Utilities was released in 2006."
12:16:47 <fizzie> That's not so old.
12:17:12 <fizzie> We've got a system-wide default alias of rm to "rm -i" here at work.
12:18:17 <fizzie> I suppose the prototypical absent-minded professors were deleting their important files all the time.
12:18:35 -!- itidus21 has joined.
12:19:30 <Sgeo> What about rm -rf /*
12:19:31 <Sgeo> ?
12:20:08 <oerjan> Sgeo: then you're on your on.
12:20:20 <oerjan> sadly sulking in the corner.
12:22:34 -!- boily has joined.
12:24:04 -!- lahwran| has changed nick to lahwran.
12:24:05 -!- lahwran has quit (Changing host).
12:24:06 -!- lahwran has joined.
12:33:07 -!- MoALTz has quit (Ping timeout: 256 seconds).
12:41:36 <fizzie> That's probably not special-cased, no. Especially since the rm will only see the actual files in /.
12:42:31 * itidus21 delivers some cake to the sad sulking corner.
12:43:08 <itidus21> the postman's protocol is just to leave the cake at the location regardless of whether noone is there
12:44:17 <oerjan> i foresee some even sadder sulking when someone finds a moldy cake.
12:44:38 <oerjan> (nah, there are people there all the time)
12:46:42 <itidus21> the cake also contains an address where another cake can be found
12:47:02 <fizzie> A cake*, then.
12:47:30 <itidus21> i guess it's {cake, cake*}
12:47:44 <itidus21> uhhh
12:47:46 <itidus21> no i mean
12:47:57 <fizzie> But if cake is {cake, cake*}, that's very confusing.
12:48:00 <itidus21> i guess it's cakebox{cake, cakebox*}
12:48:08 <fizzie> That sounds reasonable.
12:48:15 <itidus21> yay!
12:48:51 <itidus21> although my notation is not a real notation
12:49:31 <itidus21> or, is it
12:50:03 <Sgeo> WTF
12:50:04 <Sgeo> "[Hot] How to tweet from Rebol in One line (using Twitter API)!"
12:50:25 <Sgeo> (Which amounts to using a line of code to set up some script that the person who wrote that wrote)
12:50:33 <Sgeo> And then tweet "Hello World!"
12:50:41 <Sgeo> That's... kind of lame
12:54:44 <boily> aaaaaaaurgh. pentadactyl not compatible with firefox 15. *grmbl* *rant* *not happy*
12:58:12 <fizzie> They don't really seem to be gaining on Chrome all that much. They're at 15, Chrome is at 21. A year ago, they were at 6, and Chrome was 13.
12:58:16 <fizzie> Still, I suppose it's progress.
12:59:29 <Sgeo> What happens when Firefox wants to redo everything and break compatibility with stuff?
13:03:00 <Arc_Koen> yeaaaaaaah
13:03:10 <Arc_Koen> atriq: it works
13:03:15 <Arc_Koen> with program hello world
13:03:17 <fizzie> Hey, FF's "Show PDF inline" is targeting FF16. That's soon.
13:03:24 -!- Concreto has quit (Read error: Connection reset by peer).
13:03:55 <Arc_Koen> so the program is 72 blablablaasciihelloworld 100 H
13:04:04 <Arc_Koen> and the output is: Hello worldAbort trap
13:08:25 <oerjan> now try ):[72 blablablaasciihelloworld 100 10 ):]
13:10:18 <Arc_Koen> it works properly now
13:10:24 <fizzie> All Fueue problems seem so sad.
13:10:37 <fizzie> ):
13:10:47 <fizzie> Programs, not problems.
13:10:50 <Arc_Koen> there was just an (obvious) error in the "deletetop" function so the numbers were not really deleted
13:11:47 <Arc_Koen> however there should still be a bug with the input (apparently using scanf is bad, so I used fgets instead, but apparently there is still a problem, so I'll try something else)
13:12:18 <oerjan> isn't there a getc()
13:12:58 <Arc_Koen> (for my defense, this is my first program in c for years)
13:13:20 <oerjan> or is it getchar()
13:14:03 <Arc_Koen> both exist and are in the same man entry apparently
13:14:07 <oerjan> hm fueue has no EOF detection
13:14:37 <Arc_Koen> eof ? it has 'H' and it has infinite cat loop on empty queue
13:14:58 <oerjan> i'm talking about EOF in the _input_
13:15:16 <oerjan> you cannot do anything useful after the input has ended
13:15:29 <Arc_Koen> how so?
13:15:57 <oerjan> ...there is no character to read, so the program either halts or loops indefinitely
13:16:10 <oerjan> i guess you could read -1
13:16:26 <oerjan> which those C functions do, iirc
13:17:11 <oerjan> or well that may not be quite portable.
13:18:47 <Arc_Koen> I'm not sure what you mean... is this what happens if the user enters an eof character?
13:19:57 <oerjan> Arc_Koen: it's what happens if stdin ends. it could be piped from a file.
13:20:13 <Arc_Koen> oh, ok
13:20:41 <oerjan> or the user might push ^D on start of line, in most unix-like terminals
13:21:20 <Arc_Koen> well the only reason why I would push ^D is if I want the execution to brutally end
13:21:29 <oerjan> no that's ^C
13:21:41 <Arc_Koen> (I usually try both)
13:22:13 <oerjan> ^D ends the input (on start of line). afaik it has no effect if input isn't being read
13:22:26 <Arc_Koen> oh, that would explain a lot of things
13:23:40 <oerjan> also this is in the usual terminal mode. editors and such will probably choose a mode that they can handle it themselves.
13:24:50 <Arc_Koen> ah, getchar seems to be working
13:25:09 <Arc_Koen> that is, if I try it on the empty queue
13:25:25 <Arc_Koen> it waits for me to input a line
13:25:26 <oerjan> it seems pushing ^D _twice_ works even if not on start of line.
13:26:09 <oerjan> Arc_Koen: the waiting for a whole line is part of the input buffering btw, which can be set separately.
13:26:10 <Arc_Koen> if I input "A" and press enter, it ouputs the A, then it inputs the \n, outputs the \n, and then only wait for a new input
13:26:26 <oerjan> but it's the usual setting for terminal input
13:26:54 <Arc_Koen> ok so I can input future characters
13:27:03 <oerjan> wat
13:27:13 <Arc_Koen> well, if I run the program on the empty queue
13:27:23 <Arc_Koen> it's an infinite cat loop, right?
13:27:44 <oerjan> we agreed on that yeah
13:28:00 <Arc_Koen> if I use getchar() to get the input, it waits for me to input something
13:28:08 <Arc_Koen> and I can input a whole line
13:28:16 <Arc_Koen> and it doesn't wait for me until the whole line has been read
13:28:36 <oerjan> yep. i'm just saying that's not specific to getchar().
13:28:58 <fizzie> oerjan: EOF is only guaranteed to be negative, not exactly -1, at least by C.
13:29:06 <fizzie> -1 is what it usually is, though.
13:29:12 <oerjan> fizzie: i thought something like that
13:29:36 <oerjan> although i was wondering if it could also be positive larger than max char
13:29:38 <Arc_Koen> so should I just replace getchar by a function that calls getchar, then clears the input buffer?
13:30:01 <Arc_Koen> (for the record if my input is "ABC^D" it only reads ABC before waiting for me)
13:30:02 <fizzie> I thought this thing was in OCaml, not C.
13:30:07 <Arc_Koen> (so the ^D isn't read at all)
13:30:08 <oerjan> Arc_Koen: no, then you lose the rest of the line!
13:30:23 <Arc_Koen> well that's the idea
13:30:48 <Arc_Koen> otherwise when I type "A\n" the next character will always be \n
13:31:00 <fizzie> That's what it should be.
13:31:00 <oerjan> Arc_Koen: but that's not the behavior most would expect. if someone pipes a file into your program, it should print all of the file
13:31:09 <Arc_Koen> oh, okay
13:32:45 <Arc_Koen> uho
13:32:46 <oerjan> Arc_Koen: ^D not on the start of line seems to cause just that much to be read yes.
13:33:02 <oerjan> and pushing it once more then ends input
13:33:16 <Arc_Koen> for whatever reason I recompiled the file and tried again and ^D not on the start of line makes an infinite loop of "printing question mark"
13:33:28 <oerjan> huh
13:34:01 <fizzie> oerjan: EOF is returned also by fscanf, which might legally be larger than UCHAR_MAX.
13:34:22 <oerjan> fizzie: ok
13:34:35 <oerjan> Arc_Koen: hm that's curious
13:34:44 <fizzie> (Though I'd hate to see a program with more than 255 elements in a scanf format string.)
13:35:07 <Arc_Koen> oerjan: one moment ago my program contained a lot of printf functions which were only there to tell me what was happening, so that I know when errors occurred
13:35:24 <Arc_Koen> since it worked fine, I removed them all, recompiled, and tried again
13:35:30 <oerjan> aha
13:35:33 <Arc_Koen> and then it had that odd behaviour
13:36:46 <fizzie> oerjan: If the "read character" Fueue 'operation' returns -1 for EOF, then the empty-program cat will in fact print an infinite amount of -1's after the actual contents.
13:36:49 <oerjan> Arc_Koen: you might want to do a fflush(stdout) before the getchar()
13:36:50 <Arc_Koen> anyway, let'ss write a "string fueue program to queue" function now so that the interpreter can be truly useful
13:37:05 <Arc_Koen> uh, ok
13:37:10 <Arc_Koen> no idea why though
13:37:19 <oerjan> i'm not sure if that's related, but it shouldn't hurt
13:37:42 <fizzie> The fflush might be nice for all those Fueue programs that print a prompt like "> " and then wait for input.
13:37:56 <oerjan> yep
13:38:20 <oerjan> it tends to make interactive programs behave better
13:38:23 <fizzie> But an infinite loop of printing ? sounds like the expected behaviour.
13:38:46 <oerjan> fizzie: oh if it reaches EOF, right
13:38:49 <Arc_Koen> the infinite ? is still there
13:39:06 <Arc_Koen> funny thing is, if I write "H^D"
13:39:07 <oerjan> Arc_Koen: yeah that's probably because reading EOF turns into that
13:39:10 <fizzie> oerjan: If you don't provide an infinite amount of input, it will, eventually.
13:39:28 <Arc_Koen> it actually writes "HHD" (the second H must be the output from the program, but the ^has disappeared)
13:40:22 <Arc_Koen> I mean, before I removed all the error printf, I could use ^D as a way to end the input without an extra \n
13:40:22 <oerjan> Arc_Koen: oh right. that's probably an artifact of how ^D works - it doesn't actually move the cursor
13:40:49 <Arc_Koen> now the first ^D just writes that D on the screen
13:40:50 <oerjan> Arc_Koen: you still can, just press it twice
13:41:09 <Arc_Koen> yep, but when I do, it launches the infinite ?
13:41:21 <fizzie> The first ^D will also get your input to the program, as shown by the fact that it printed the H.
13:41:30 <Arc_Koen> oh, you're right
13:41:37 <Arc_Koen> it works fine then
13:41:55 <oerjan> we should ask atriq what he wants to happen when EOF is read
13:42:14 <fizzie> A Fueue cat that properly halts on EOF (assuming EOF = read -1) sounds like a nice little exercise for you folks, too.
13:42:26 <atriq> Implementation dependant!
13:42:31 <atriq> Possibly 0!
13:42:52 <fizzie> But then you can't distinguish between '\0' and EOF!
13:43:12 <oerjan> atriq: um -1 _is_ more useful i think.
13:43:54 <oerjan> although neither allows the empty program to be a properly ending cat
13:43:56 <fizzie> Or '\1' and EOF, if that was in fact 0!!
13:44:12 <oerjan> that may be too much to ask for, though
13:44:47 <atriq> Probably -1, then
13:45:04 <atriq> I've never really thought about EOF
13:45:09 <atriq> In any of my esolangs
13:45:44 <Arc_Koen> that may be because they're esolangs
13:46:00 <fizzie> And esolangs NEVER END.
13:46:12 <oerjan> 'struth
13:46:24 <fizzie> It stretches into the distance like a 30-minute Kraftwerk song.
13:46:29 <fizzie> (A quote.)
13:48:55 <oerjan> hm how in the world would one handle keeping a fueue program doing nothing for one round, and then managing to handle a character read afterwards...
13:49:18 <oerjan> _without_ destroying the character immediately.
13:50:10 <oerjan> i'm not sure that's actually possible.
13:51:01 <oerjan> this might be a problem.
13:52:07 <oerjan> hm i see a very roundabout possibility... it requires copying a block as many times as the character read
13:53:06 <oerjan> rather inefficient, mind you.
13:54:37 <oerjan> oh and it probably cannot handle a negative EOF representation.
13:55:57 <atriq> You could add something first
13:56:48 <oerjan> i don't see a way to add something that can be kept stable for the "doing nothing for one round" part
13:57:15 <oerjan> the problem is, if + 1 doesn't add immediately, the 1 gets printed
13:57:30 <atriq> Oooh
13:57:39 <atriq> I have designed one evil esolang
13:58:25 <oerjan> for normal use, you can fix that by using + )[1] instead, but that doesn't count as doing nothing to trigger input...
13:59:49 <Arc_Koen> atriq: I'd actually be relieved if you could prove fueue was not turing-complete, then add a few functions that would make it both turing complete and usable
14:00:15 <oerjan> oh i do think it is turing-complete. it just has some trouble handling input.
14:00:17 <atriq> I have no idea if it's Turing-Complete or not
14:00:31 <oerjan> especially EOF.
14:00:37 <atriq> I'm pretty sure it's more than linear-bounded
14:00:39 <Arc_Koen> on the other hand if you can prove it's turing-complete we're gonna have the hell of a time programming with it
14:00:51 <atriq> And it's sneakily not a PDA
14:01:13 <atriq> If it's not Turing-Complete, it's something nobody's ever thought of.
14:01:54 <Arc_Koen> you'd be surprised by what people tend to think of
14:03:55 <oerjan> )$!![...] is the way i see to handle non-negative input. it makes n copies of the [...] block where n is the character read, then executes the first copy, and surely something can be put for ... to reconstruct the character in a more useful form from that.
14:04:34 <oerjan> inefficient, but it ought to work.
14:05:00 <atriq> The number will end up behind the block, slide to the front of the queue, and get printed
14:05:16 <oerjan> um no the number should end up in the !! spot...
14:05:44 <oerjan> i mean for the !! to be the last thing executed before the do-nothing-cycle
14:06:05 <atriq> Oh, I see
14:07:16 <atriq> If I changed the language so printing was explicit, it would be so much easier to work with
14:07:44 <atriq> Less fun, though
14:08:39 <oerjan> heh
14:09:20 <atriq> You can tell I play Dwarf Fortress.
14:09:40 <oerjan> OKAY
14:13:09 <atriq> ):[):] is a Fueue infinite loop, I believe
14:13:09 <Arc_Koen> oh, so the !! nop is actually useful
14:13:52 <oerjan> Arc_Koen: heh right it's just about the shortest
14:14:14 <oerjan> although the second ! can be replaced by other things
14:14:52 <Arc_Koen> "doing nothing is doing something" could be Fueue's slogan
14:15:28 <oerjan> sounds zen, or something
14:16:04 <oerjan> atriq: already discovered :)
14:16:10 <atriq> :)
14:16:25 <oerjan> it's almost like underload :^
14:16:36 <oerjan> * ): is
14:17:09 <atriq> I think Underload was the main inspiration for Fueue
14:18:33 <Arc_Koen> where does the F come from?
14:19:27 <oerjan> http://www.mezzacotta.net/owls/?comic=476
14:20:26 <Sgeo> Should I watch 12 Angry Men instead of sleeping?
14:20:32 <oerjan> Gregor: you should see that i think
14:21:13 <Gregor> oerjan: Hyuk.
14:21:48 <oerjan> critics.
14:32:22 <oerjan> argh another quadruple sneeze
14:35:54 <fizzie> I think that's commonly called a 'queeze'. There's also the relatively common 'treeze', and the very rare 'quinteeze'. (Disclaimer: lie.)
14:39:06 <oerjan> shocking
15:05:27 <Arc_Koen> oerjan: I think it's all working now, do you have some interesting fueue program for me to test?
15:07:10 <oerjan> well have you tested the ):[72 blablablaasciihelloworld 100 10 ):] program yet?
15:07:54 <Arc_Koen> (should I add a H after the 10?)
15:08:00 <oerjan> no
15:08:05 <oerjan> most definitely not
15:08:18 <Arc_Koen> segfault :(
15:08:18 <oerjan> also keep ^C handy :)
15:08:22 <oerjan> oops
15:08:40 <Arc_Koen> sooooo let's add a lot of printf to see where this segfault comes from
15:08:45 <oerjan> NB: blablablaasciihelloworld is meant to be whatever you used in the previous one
15:08:51 <Arc_Koen> yup
15:09:01 <Arc_Koen> 72 101 108 108 111 32 119 111 114 108 100 10
15:10:07 <oerjan> hint: make a DEBUG macro so you can just disable it without removing all the places you use it
15:10:40 <oerjan> or whatever, it's possible the name DEBUG is reserved
15:10:41 <Arc_Koen> ouh, nice
15:11:21 <Arc_Koen> actually I'm pretty sure the segfault comes from the quare brackets
15:11:31 <Arc_Koen> do you have a program without them?
15:11:39 <fizzie> There are also these things called debuggers, they can be handy tools to learn.
15:11:50 <oerjan> um i was sort of trying to give you a loop to test...
15:11:59 <oerjan> and you cannot do that without blocks
15:12:21 <oerjan> but anyway we can test other pieces first.
15:13:17 <Arc_Koen> fizzie: what would your reaction be if I told you I was writing a C program using TextEdit and counting the lines manually when gcc tells me there's an error at a certain line?
15:13:55 <fizzie> Arc_Koen: Well, it's no skin off my nose. (Is that an idiom?)
15:14:40 <oerjan> Arc_Koen: * - - 4 * * 2 2 + 2 2 should print a @ before becoming cat
15:15:07 <fizzie> Arc_Koen: Just as an interesting tip, you can type "command-L" and type in a line number; it will jump to that line.
15:15:17 <fizzie> As far as I know, there's no way to get visible line numbers, though.
15:15:40 <oerjan> oh hm
15:15:45 <Arc_Koen> thank you sooooo much fizzie
15:15:52 <Arc_Koen> oerjan: it does nothing, then becomes a cat
15:15:56 <oerjan> darn
15:16:08 <Arc_Koen> oh, wait
15:16:55 <Arc_Koen> ok, random bug to be fixed later: if a program ends with a number, that number disappears
15:17:09 <Arc_Koen> in the meantime let's end the program with a whitespace
15:17:22 <oerjan> huh
15:17:33 <Arc_Koen> it does indeed print an @
15:18:50 <oerjan> / 100 3 should print ! or was that "
15:19:00 <oerjan> > '\33'
15:19:01 <lambdabot> '!'
15:19:38 <fizzie> > chr 33
15:19:39 <lambdabot> '!'
15:19:44 <fizzie> What, the character constants are decimal, not octal?
15:19:49 <oerjan> yep
15:19:54 <fizzie> How... modern.
15:20:00 <Arc_Koen> befunge are decimals too
15:20:19 <fizzie> Befunge doesn't have escaped characters, as far as I know.
15:20:25 <oerjan> ) $ % 100 [ H ] should go into a cat loop, ) $ % 0 [ H ] should halt
15:20:36 <oerjan> oh wait you had trouble looping
15:20:43 <oerjan> er blocking
15:21:00 <Arc_Koen> it's ok, I have to fix it anyway
15:21:05 <oerjan> '\0o55'
15:21:07 <oerjan> > '\0o55'
15:21:09 <lambdabot> <no location info>:
15:21:09 <lambdabot> lexical error in string/character literal at chara...
15:21:15 <oerjan> no such luck
15:21:18 <oerjan> > 0o55
15:21:19 <lambdabot> 45
15:22:11 <fizzie> > ['\o55' (chr 0o55)]
15:22:12 <lambdabot> Couldn't match expected type `t1 -> t'
15:22:12 <lambdabot> against inferred type `GHC.T...
15:22:25 <fizzie> > '\o55'
15:22:26 <lambdabot> '-'
15:22:29 <oerjan> oh right
15:22:32 <fizzie> Tried to be too clever there.
15:22:47 <oerjan> fizzie: you might want a comma
15:22:53 <fizzie> Yes.
15:23:10 <fizzie> It looks like one of those handwavy things.
15:23:15 <fizzie> '\o7'
15:23:32 <fizzie> > '\o7'
15:23:33 <lambdabot> '\a'
15:24:35 <oerjan> Arc_Koen: + 1 65 65 should print AB
15:26:03 <boily> > '\x266a'
15:26:04 <lambdabot> '\9834'
15:26:24 <boily> ~eval '\x266a'
15:26:27 <cuttlefish> Error (1): Could not find module `Data.Numbers.Primes'
15:26:27 <cuttlefish> Use -v to see a list of the files searched for.
15:26:51 <boily> ~eval '\x266a'
15:26:52 <cuttlefish> '\9834'
15:26:58 <boily> meh. figured as much.
15:27:18 <oerjan> > "\x1111111111111"
15:27:19 <lambdabot> <no location info>:
15:27:19 <lambdabot> lexical error in string/character literal at chara...
15:27:48 <oerjan> > "\x111111"
15:27:49 <lambdabot> <no location info>:
15:27:49 <lambdabot> lexical error in string/character literal at chara...
15:27:51 <oerjan> > "\x11111"
15:27:52 <lambdabot> "\69905"
15:28:27 <oerjan> > maxBound :: Char
15:28:28 <lambdabot> '\1114111'
15:28:39 <oerjan> > showHex 1114111 ""
15:28:40 <lambdabot> "10ffff"
15:29:33 <fizzie> > chr (17*0x10000-1)
15:29:34 <lambdabot> '\1114111'
15:29:37 <fizzie> 17 planes and all.
15:31:06 <oklopol> hellooooooon
15:31:06 <atriq> > return 1 2
15:31:07 <lambdabot> 1
15:31:22 <Arc_Koen> haha
15:31:33 <Arc_Koen> oerjan: the [ didn't work because it started an infinite loop
15:31:52 <oerjan> Arc_Koen: well it _was_ supposed to...
15:32:00 <Arc_Koen> no, I mean my string to queue function
15:32:09 <oerjan> ok
15:32:18 <Arc_Koen> it's suppose to call itself on the subprogram
15:32:33 <Arc_Koen> I think it called itself on the [, thus calling itself again immediately
15:32:52 <oerjan> ah.
15:33:06 <fizzie> But, but, but: wasn't all this OCaml?
15:33:15 <oerjan> C.
15:33:20 <fizzie> Yes, but yesterday!
15:33:52 <Arc_Koen> fizzie: I started Ocaml, realized Queue was inadapted, thought "in that case it would be more interesting for me to write it in C, since I haven't written in C for years"
15:33:57 <fizzie> I suppose the Oaml dropped off, leaving only C.
15:34:10 <Arc_Koen> and after that you guys told me about Queue.transfer which solved everything
15:34:15 <Arc_Koen> but let's finish the C version first
15:34:17 <oerjan> ocaml's queue module was too impure
15:34:24 <Arc_Koen> the Ocaml version is probably gonna be much much simpler
15:35:30 <Arc_Koen> uh
15:35:46 <oerjan> i'm not actually sure Queue.transfer solves everything - you still have in-place update and that means : cannot share data if you use the queues for blocks
15:35:53 <Arc_Koen> ok so now it calls itself five times instead of one
15:36:17 <Arc_Koen> I chose to use simple lists for blocks
15:36:38 <Arc_Koen> which is a bit weird since lists are functional stacks
15:37:07 <Arc_Koen> but since blocks are not executed it's ok, I just have to reverse the list when unblocking it
15:37:51 <oerjan> ok
15:38:31 <oerjan> that makes < more efficient, actually
15:48:18 <Arc_Koen> i don't get it
15:49:10 <Arc_Koen> can you help me with http://pastebin.com/hfuAewHu ?
15:49:59 <Arc_Koen> apparently when it encounters a '[' it calls itself back on the first char of the string
15:50:07 <Arc_Koen> when it should calls itself on the char that follows the [
15:51:34 -!- Vorpal has joined.
15:51:45 <Arc_Koen> given the three functions pushval, pushfun and pushblock which create a new item (respectively a number, a function or a block) and push it
15:54:21 <Arc_Koen> my apologies if the code is not clear enough :/
15:54:43 <Arc_Koen> basically it processes the given string using a counter
15:54:51 <oerjan> Arc_Koen: um shouldn't the k++ in line 56 be (*k)++ ?
15:55:07 <Arc_Koen> oh, crap, yes
15:55:19 <Arc_Koen> that would certainly explain the segfault
15:55:31 <Arc_Koen> though I'm surprised the segfault doesn't happen sooner
15:55:57 <oerjan> also you might want to check that it has read a ] rather than \0 after returning
15:56:12 <Arc_Koen> right
16:01:33 <oerjan> also for the top program that it has ended on \0 rather than ], although that won't cause a segfault.
16:02:30 <Arc_Koen> I don't know the fueue specifications about that :)
16:02:46 <oerjan> i assume that's a syntax error, since the ] would be unmatched
16:03:09 <oerjan> this is pretty much the same as parsing brainfuck [] blocks
16:03:21 <Arc_Koen> yep
16:03:32 <Arc_Koen> but I did that in Ocaml so it was much faster
16:03:39 <oerjan> heh
16:03:47 <Arc_Koen> I mean, faster to write the program
16:04:26 <Arc_Koen> atriq: if a [ is unmatched, are we assuming there is an implicit ] at the end of the program?
16:04:40 <atriq> I think that ought to be an error
16:05:26 <oerjan> you have to check for it regardless, otherwise you run past the \0
16:05:55 <oerjan> whether or not you choose to ignore it after checking
16:06:55 <Arc_Koen> yes
16:12:19 <Arc_Koen> )$%0H halts
16:12:34 <oerjan> oops
16:12:37 <oerjan> oh wait
16:12:40 <oerjan> that's right
16:12:41 <Arc_Koen> )$%0[H] is a cat :(
16:13:02 <oerjan> that's not right
16:13:36 <oerjan> what about )[H] ?
16:13:42 <Arc_Koen> probably the deblock function doesn't work
16:13:45 <Arc_Koen> yes, let's try that
16:14:11 <Arc_Koen> )[H] is a cat as well
16:14:18 <oerjan> darn
16:14:27 <Arc_Koen> all this nonsense wouldn't be happening with ocaml!
16:14:38 <oerjan> *MWAHAHAHAHA*
16:16:52 <oerjan> > '\91'
16:16:53 <lambdabot> '['
16:16:56 <oerjan> > '\90'
16:16:57 <lambdabot> 'Z'
16:17:20 <Arc_Koen> http://pastebin.com/31nVgVtn
16:18:31 <Arc_Koen> oh, I forgot to pop the block
16:22:30 <fizzie> The * in is_empty(*q) is a bit confusing. "Normally" I'd expect that to take a Queue * instead of Queue, too. (Not that it's a problem to pass-by-value it, just that I wouldn't expect that.)
16:22:52 <Arc_Koen> it confuses me too
16:23:20 <oerjan> Arc_Koen: you still aren't using Queue's to store the blocks, right?
16:23:28 <Arc_Koen> yes, I am
16:23:33 <oerjan> oh.
16:23:56 <oerjan> in that case i'm _deeply_ worried about the interaction of copying blocks and mutating them.
16:24:26 <Arc_Koen> http://pastebin.com/T8nURuri
16:25:06 <Arc_Koen> every element in the queue contains an int, a char and a block
16:25:47 <Arc_Koen> two of those three variables are supposed to have their default value (0, 0, or empty), and the third to contain what it has to contain
16:26:15 <oerjan> Arc_Koen: what about a union?
16:26:28 <Arc_Koen> would work exactly the same wouldn't it?
16:26:36 <oerjan> yes, but less space
16:27:01 <Arc_Koen> I figured "I remember there's that union thing, but it still sounds weird and why bother"
16:27:06 <oerjan> anyway this doesn't comfort me until i see how : and < are implemented
16:28:05 <oerjan> if things aren't going to break, _somewhere_ it has to be ensured that Queues aren't shared and mutated at the same time
16:28:32 <Arc_Koen> http://pastebin.com/G3KLDsXw
16:28:52 <Arc_Koen> queues are not supposed to be share
16:29:21 <Arc_Koen> I mean, a queue can either be the main queue, or one block
16:29:44 <Arc_Koen> and ) appends a block to the main queue, then pops the block
16:30:24 <oerjan> and : doesn't share Queue's, even nested ones?
16:30:25 <Arc_Koen> (which made me realise the deletetop function was missing some garbage collection: if the top element contains a block, the queue inside is not freed
16:30:30 -!- soundnfury has quit (Quit: Shooting).
16:30:55 <Arc_Koen> well, I'm pretty sure I wrote the copy function in a way that it doesn't
16:30:58 <Arc_Koen> let's see
16:32:27 <Arc_Koen> http://pastebin.com/g5U2jrSr
16:32:47 <Arc_Koen> copyQueue and copyToken are mutually recursive
16:32:58 <Arc_Koen> so it should copy everything and share nothing
16:33:33 <fizzie> Arc_Koen: That's at least a memory leak right there: c->block = *copyQueue(&(x->block));
16:33:37 <oerjan> ok a deep copy, well that helps.
16:33:53 <fizzie> copyQueue returns a newly-malloc'd Queue, and then you take the contents of that and copy them to the Queue object inside the token.
16:34:04 <oerjan> (it may also be inefficient if large blocks get copied a lot, but them's the breaks)
16:34:05 <fizzie> Any pointers to the just-malloc'd object is lost.
16:35:13 <Arc_Koen> oh, right
16:35:56 <Arc_Koen> memory leaks usually comes the other way around so I did not think about it
16:38:18 -!- ais523 has joined.
16:40:32 <Arc_Koen> )[H] is still an infinite loop cat though
16:42:20 -!- soundnfury has joined.
16:42:35 <itidus21> i just had a fairly trippy idea
16:42:45 -!- augur has quit (Remote host closed the connection).
16:43:18 <itidus21> the idea is 2 or more people are wearing vr goggles
16:43:19 -!- asiekierka has quit (Quit: Connection reset by PO).
16:43:37 <itidus21> and there is a camera to the side.. lets suppose its a tennis match
16:43:49 <itidus21> a tennis match where the players are wearing vr goggles
16:44:04 <Arc_Koen> so they're playing third person?
16:44:08 <itidus21> and.. each player sees in their goggles the image as shown from the camera
16:44:15 <itidus21> yup
16:44:56 -!- asiekierka has joined.
16:45:10 <itidus21> this is what happens when i think too hard while watching third person video games on youtube
16:46:20 <Sgeo> You know about experiments where visual imagry tricks the brain into thinking things about the body?
16:46:28 <itidus21> in general its a bad idea..
16:47:47 <atriq> How about each player sees from a camera located on the other player's head!?
16:47:50 <Arc_Koen> many people are good at third-person video games, so i'm guessing the third-person real life could work as well
16:48:06 <itidus21> except that eyes are best as they are...
16:48:48 <itidus21> despite steve mann's best intentions, it's really not a good thing for healthy people to avoid looking at things directly
16:50:20 <itidus21> well it leads to a dependance on the cameras too
16:50:25 <itidus21> and the cameras can lie
16:50:51 -!- kinoSi has quit (Read error: Connection reset by peer).
16:51:19 -!- kinoSi has joined.
16:51:53 <itidus21> they are mechanical/electrical, and have all the inherent drawbacks which leads the internet to be full of forums of people having endless troubles with mechanical/electrical things
16:52:00 <atriq> What if the cameras switch to a Toyata advert?
16:52:05 <itidus21> oh
16:53:02 <atriq> Well, this idea isn't working
16:53:27 <itidus21> atriq: you could pay your taxes by watching ads :D
16:54:42 <itidus21> so it seems the more sane i become, the more insane i become, if my comments here can be regarded as insane
17:13:56 <Arc_Koen> atriq: what if / is followed by two numbers but the second is a zero
17:14:14 <Arc_Koen> does it result in a Division_by_zero kind of error, or is the / sent back?
17:14:19 <atriq> Arc_Koen, presumably a divide by 0 error
17:14:27 <Arc_Koen> ok
17:15:48 <fizzie> atriq: It's funny how it's your language, but you're still all "presumably foo" about it.
17:16:00 <atriq> I have no idea what I was doing when I made it
17:16:10 <atriq> All my languages are pretty vague, I'll be honest
17:16:24 * oerjan notes that besides wrapping in )[ ... ], another way to delay execution is to strategically sprinkle with ~ ; this is often shorter.
17:16:25 -!- augur has joined.
17:16:44 <Arc_Koen> nice
17:17:14 <oerjan> as long as there are not too many spots that need to be sprinkled
17:18:13 <oerjan> ~[ ... ]~) can delay three steps as long as there isn't a block following
17:18:13 <cuttlefish> --- Possible commands: dice, duck, echo, eval, fortune, metar, ping, yi
17:18:21 <oerjan> thank you cuttlefish
17:18:40 <fizzie> Incidentally, did you know: glibc removed the 'gets' declaration from stdio.h when _GNU_SOURCE is defined, i.e. in -std=gnu90/gnu99 modes. (And in C11 mode, but that's just following the standard.)
17:19:02 <fizzie> (Predictably quite a lot of things broke.)
17:19:37 <oerjan> only things that deserved it, i assume
17:22:05 -!- augur has quit (Ping timeout: 268 seconds).
17:23:26 -!- MoALTz has joined.
17:23:38 <fizzie> oerjan: Quite a few things broke because gnulib headers included in them had the line _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); as an attempt to get a warning if some developer had accidentally used gets.
17:23:51 <fizzie> oerjan: With the declaration missing, those just-in-case warnings also broke.
17:23:56 <oerjan> XD
17:24:28 -!- impomatic has joined.
17:24:45 <fizzie> /* Assume it is always declared, since it is required by C89. */ is what the comment above the _GL_WARN_ON_USE says.
17:25:05 <fizzie> Goes on to show that when you assume...
17:25:15 <oerjan> so is there a variant of _GL_WARN_ON_USE that won't assume that?
17:25:25 <Arc_Koen> so basically people are falling because someone planted a "mind the gap" sign and someone else filled the gap?
17:25:50 <fizzie> I don't think there is. I'm not sure if it's possible to write.
17:26:10 <fizzie> A sed -i '/gets is a security hole/d' command apparently fixes most of the problems.
17:33:08 <atriq> @unmtl MaybeT (StateT IO Integer)
17:33:09 <lambdabot> Plugin `unmtl' failed with: `MaybeT (StateT IO Integer)' is not applied to enough arguments, giving `/\A. IO -> Integer (Maybe A, IO)'
17:33:23 <atriq> @unmtl MaybeT (StateT Integer IO)
17:33:23 <lambdabot> Plugin `unmtl' failed with: `MaybeT (StateT Integer IO)' is not applied to enough arguments, giving `/\A. Integer -> IO (Maybe A, Integer)'
17:33:44 <atriq> @unmtl MaybeT (StateT Integer IO) Double
17:33:44 <lambdabot> Integer -> IO (Maybe Double, Integer)
17:34:04 <atriq> That is...
17:34:09 <atriq> That is PRECISELY what I'm after
17:34:12 <atriq> Except not Double
17:34:51 <atriq> @unmtl MaybeT (StateT Integer IO) (Seq Char)
17:34:51 <lambdabot> Integer -> IO (Maybe (Seq Char), Integer)
17:59:18 <fizzie> "The kings came to the agreement between themselves that they would cast lots by the dice to determine who should have this property, and that he who threw the highest should have the district. The Swedish king threw two sixes, and said King Olaf need scarcely throw. He replied, while shaking the dice in his hand, "Although there be two sixes on the dice, it would be easy, sire, for God ...
17:59:24 <fizzie> ... Almighty to let them turn up in my favour." Then he threw, and had sixes also. Now the Swedish king threw again, and had again two sixes. Olaf king of Norway then threw, and had six upon one dice, and the other split in two, so as to make seven eyes in all upon it; and the district was adjudged to the king of Norway."
18:00:06 <fizzie> Sounds plausible.
18:00:30 <oerjan> it rings a bell.
18:01:44 <fizzie> It was a quote from: Heimskringla or The Chronicle of the Kings of Norway - Saga of Olaf Haraldson: Part III - Online Medieval and Classical Library Release #15b.
18:02:30 <oerjan> hey olaf was a saint, clearly such things happened to him all the time.
18:03:08 <fizzie> Oh yes, saints are well-known cheaters.
18:03:51 <fizzie> Apparently the Swedish king was also an Olaf, if I read this right.
18:04:23 <oerjan> not from what you quoted anyhow
18:04:42 <fizzie> It doesn't mention the name.
18:05:05 <fizzie> But before that there's stuff like "Olaf the Swedish king was then remarkably mild in manner, and agreeable to talk with."
18:05:25 <fizzie> Though it speaks of the Swedish kings in plural.
18:05:28 <fizzie> Maybe they had a couple.
18:05:32 <fizzie> I'm not very historic.
18:06:47 <fizzie> As in, "Thereafter ambassadors were sent to Norway to King Olaf, with the errand that he should come with his retinue to a meeting at Konungahella with the Swedish kings, and that the Swedish kings would there confirm their reconciliation. -- There the Swedish kings also came; --"
18:06:54 -!- donmarquis has joined.
18:08:52 <fizzie> "Then said Thorvid the Stammerer, 'Atte -- quarrel -- some -- greedy -- jealous -- deceitful -- dull.'" An appropriate name there.
18:08:55 <oerjan> ok there was one in about the right time http://en.wikipedia.org/wiki/Olof_Sk%C3%B6tkonung
18:09:02 <oerjan> *at
18:09:05 <fizzie> This was apparently around year 1019.
18:09:15 -!- augur has joined.
18:10:47 <fizzie> That Olaf seems to be a saint too.
18:10:53 <fizzie> "According to a legend he was martyred at Stockholm after refusing to sacrifice to pagan gods. He's venerated as a saint in the Catholic Church."
18:11:15 <fizzie> I suppose Olaf of Norway was saintier.
18:11:19 <Sgeo> I feel like I should be ashamed that REBOL's clipboard stuff actually makes me happy
18:11:32 <donmarquis> topic pls :) ?
18:11:54 <Sgeo> `welcome donmarquis
18:12:04 <HackEgo> donmarquis: 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.)
18:12:07 <donmarquis> hi Sgeo
18:12:25 <oerjan> fizzie: the saintiest!
18:12:49 <donmarquis> saint talk ?
18:13:01 <fizzie> oerjan: The daintiest saint.
18:13:21 * oerjan cleaves fizzie skull with an axe
18:13:29 <oerjan> DON'T YOU SPEAK LIKE THAT
18:13:41 <fizzie> oerjan: I see Norwegians have strong feelings about this Olaf.
18:14:17 <fizzie> (Also we're not really helping the "other kind of esoteric" confusion factor with all the sainty stuff.)
18:14:18 <oerjan> trondheim has a yearly olaf festival in july/august
18:15:00 <fizzie> I could even guess an axe might've been involved in that d6-gives-a-seven throw.
18:15:48 <oerjan> a very small one.
18:18:03 -!- donmarquis has quit (Quit: Leaving).
18:19:37 -!- donmarquis has joined.
18:25:38 -!- augur has quit (Remote host closed the connection).
18:31:51 -!- zzo38 has joined.
18:37:29 -!- Phantom__Hoover has joined.
18:40:18 -!- Phantom_Hoover has quit (Ping timeout: 264 seconds).
18:53:43 -!- ais523 has quit.
18:54:10 <oerjan> Arc_Koen: )$2[)$--------2~)~~[)[)~(~[~[$~H~]~)%+~91-):]~1+:])]]~[$~H~])%+-91)[65][65]
18:55:55 <oerjan> atriq: ^
18:56:22 <zzo38> The reason I asked about LLVM with different length of bytes is, I wanted to invent a virtual machine with 32-bit bytes, 18-bit addresses, bank switching, etc
18:57:12 <zzo38> In addition I wanted to allow it to work with LLVM.
18:59:05 * oerjan would be cackling evilly if he felt better
19:01:47 <boily> oerjan: don't you have a +3 axe of evil cackling with you?
19:01:53 <oerjan> (*cough*)
19:02:04 <oerjan> no but...
19:02:09 * oerjan swats boily -----###
19:03:05 * boily blocks with his penguin plushie of protection!
19:09:41 <quintopia> those penguin plushies are heavy
19:09:45 <quintopia> thats a -2 to speed
19:09:59 <quintopia> roll a reflex check
19:12:56 <kmc> zzo38: I am really interested in your LFSR configurable tap instruction pointer
19:13:02 <kmc> you should put together a simulator for that
19:13:17 <kmc> "esolang or billion dollar company"
19:13:45 <quintopia> i'd play that game
19:13:49 -!- donmarquis has quit (Quit: Leaving).
19:14:14 <zzo38> kmc: Yes perhaps I could make a simple simulator for that. What is "esolang or billion dollar company"? Do you mean the company that makes this computer? Perhaps it can be both, and perhaps a company can have such a name, too
19:16:44 <boily> ~dice 20
19:16:45 <cuttlefish> 9
19:17:12 <boily> failed my check. I accept with gratitude the metalness of oerjan's axe.
19:17:31 <quintopia> what was your modifier?
19:17:41 <quintopia> it was only dc15
19:18:01 <shachaf> kmc: I captured the flag. Level 8 was annoying.
19:18:21 <atriq> ~dice 6
19:18:22 <boily> +0, I haven't trained plush-fu yet.
19:18:22 <cuttlefish> 2
19:18:31 <atriq> Shouldn't that be "~die"?
19:18:59 <boily> it has dice quantity as an optional argument, and I'm too lazy to have two separate commands.
19:19:12 <shachaf> It looks like the SF event is going to be 21+. I vaguely I wish I was <21 so I could self-righteously complain about it.
19:20:18 <quintopia> ~dice 5d10
19:20:18 <cuttlefish> 4
19:20:31 <quintopia> ~dice 5*10
19:20:31 <cuttlefish> 4
19:20:37 <quintopia> how it works boily
19:20:44 <oerjan> now where was that sulking corner and is the cake still there
19:21:06 <boily> ~dice 12 5
19:21:06 <cuttlefish> 9 8 4 3 1
19:21:16 <atriq> oerjan, I find myself confused
19:21:21 <oerjan> ~dice 12 5
19:21:21 <cuttlefish> 11 8 4 1 4
19:21:24 <quintopia> ~dice 10 5
19:21:24 <cuttlefish> 9 6 8 7 8
19:21:26 <oerjan> atriq: good, good
19:21:38 <atriq> ~dice 100 3
19:21:38 <cuttlefish> 6 91 23
19:21:44 <quintopia> boily: it needs to display sum because i am too lazy to add them up
19:21:54 <quintopia> ~dice 1 50
19:21:54 <cuttlefish> 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
19:22:18 <quintopia> i THINK that adds up to 50
19:22:20 <atriq> > 65 - 91
19:22:21 <lambdabot> -26
19:22:21 <quintopia> not sure
19:24:15 <zzo38> I have written a dice program on TI-92 calculator, once. I still have it.
19:24:36 <boily> quintopia: you're forcing my laziness...
19:25:03 <quintopia> boily: be less lazy so i can be more lazy
19:25:05 <oerjan> an unstoppable force and an immovable object
19:26:06 <zzo38> I play Dungeons&Dragons game sometimes (but I use real dice; except for character generation).
19:27:00 <quintopia> zzo38: do you use your random generator, or intentionally select stuff using dndinsider tools
19:27:17 <zzo38> quintopia: I use my random generator.
19:27:31 <zzo38> I use my calculator.
19:28:06 <atriq> Wow, I have just thought up an evil prng for Haskell
19:28:12 <atriq> Needs testing
19:28:29 <atriq> unsafeCoerce id :: Int, use that as a seed value
19:28:54 <oerjan> instance RandomGen () where ...
19:29:31 -!- cuttlefish has quit (Remote host closed the connection).
19:29:47 -!- cuttlefish has joined.
19:29:56 <boily> ~dice 10 10
19:29:56 <cuttlefish> 6 3 2 5 5 5 9 6 4 1 --- Sum = 46
19:31:05 <quintopia> thanks boily
19:31:11 <quintopia> ~dice 1 50
19:31:11 <cuttlefish> 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 --- Sum = 50
19:31:17 <zzo38> atriq: Would it work? I think Int has only one constructor and it is specific to GHC anyways, and it would also depend on how the memory allocation is done, it might not work so well
19:31:23 <quintopia> ha i was right! it does addd up to 50
19:31:57 <atriq> zzo38, gave me two different numbers if I restart GHCi inbetween
19:32:30 <oerjan> quintopia: shocking
19:32:54 <zzo38> And anyways id is a function and I don't know what would be expected to happen if you use unsafeCoerce between function and data, I think the documentation mentions mess with doing so; so even if it work with GHCi it might not work in compiled programs.
19:33:05 <atriq> It's not supposed to do anything
19:33:11 <atriq> It's supposed to be evil, rather
19:33:18 <zzo38> atriq: Yes it may do so, but on a single-tasking computer it might give the same number each time.
19:33:46 <atriq> ~dice 1000
19:33:47 <cuttlefish> 482 --- Sum = 482
19:34:50 <mroman> If every number had the same probablity of being "diced", then what would the average sum be?
19:35:09 <atriq> Infinity
19:35:28 <mroman> for 10 throws with a 6 sided dice or so
19:35:37 <Sgeo> 0.
19:35:42 <atriq> number of rolls * number of sides on dice / 2
19:36:02 <oerjan> um no
19:36:25 <oerjan> number of rolls * (number of sides on dice + 1) / 2
19:36:29 <atriq> Good point
19:36:44 <Sgeo> You're both assuming the dice doesn't have 0 or negative numbers
19:36:47 <atriq> So, for 10 6 sided dice, we'd expect about 35
19:36:50 <fizzie> oerjan: But what if it's a programmers 0-indexed... right.
19:36:51 <atriq> ~dice 6 10
19:36:52 <cuttlefish> 4 6 6 2 3 3 1 5 1 6 --- Sum = 37
19:36:54 <atriq> ~dice 6 10
19:36:55 <cuttlefish> 5 1 2 2 3 2 3 1 6 2 --- Sum = 27
19:36:56 <atriq> ~dice 6 10
19:36:56 <cuttlefish> 3 1 2 6 4 2 1 3 6 2 --- Sum = 30
19:36:57 <atriq> ~dice 6 10
19:36:58 <cuttlefish> 1 6 1 2 2 5 6 5 5 1 --- Sum = 34
19:36:58 <atriq> ~dice 6 10
19:36:59 <cuttlefish> 2 3 1 4 5 5 4 6 6 1 --- Sum = 37
19:37:10 <atriq> > sum [37,27,30,34,37] / 5
19:37:11 <lambdabot> 33.0
19:37:14 <atriq> Not bad
19:37:18 <fizzie> @dice 50d1
19:37:18 <lambdabot> 50d1 => 50
19:37:39 <quintopia> lambdabot is much more concise
19:37:46 <oerjan> @dice 500000000000d10
19:37:46 <lambdabot> 500000000000d10 => 2749998886333
19:38:12 <quintopia> @dice d6
19:38:12 <lambdabot> unexpected "d": expecting number
19:38:16 <quintopia> @dice 1d6
19:38:16 <lambdabot> 1d6 => 1
19:38:26 * quintopia trips and falls in a pit
19:38:36 <oerjan> a pity
19:38:50 <oerjan> which reminds me it's time for my weekly check of oots
19:38:51 <fizzie> octave:6> mean(sum(floor(1+6*rand(10000,10)), 2))
19:38:52 <fizzie> ans = 34.971
19:38:59 <fizzie> octave:7> mean(sum(floor(1+6*rand(1000000,10)), 2))
19:38:59 <fizzie> ans = 35.007
19:39:13 <fizzie> Well, whaddaya know, it *is* approaching oerjan's 35.
19:39:35 <oerjan> fizzie: see: law of large numbers
19:39:39 <zzo38> Since the TI-92 is slow, I have done some things to make the program fast. One is to compile the dice specification when it is entered, and if you ask for a reroll it just uses the precompiled specification, making subsequent rolls faster than the first one.
19:39:42 <fizzie> (That was a million sets of sums of 10 throws.)
19:40:34 <oerjan> including the introduction example :)
19:40:47 <oerjan> (on wp)
19:44:22 <oerjan> atriq: btw that program _should_ print the alphabet.
19:44:29 <atriq> Wow
19:46:39 <oerjan> it takes 10 cycles per letter
19:47:40 -!- asiekierka has quit (Remote host closed the connection).
19:48:23 -!- augur has joined.
19:48:47 <fizzie> octave:17> var(mean(floor(1+6*rand(1000,1000))))
19:48:47 <fizzie> ans = 0.0028878
19:48:47 <fizzie> octave:18> (6^2-1)/12/1000
19:48:47 <fizzie> ans = 0.0029167
19:48:49 <fizzie> Ooh, and look, the variance of the sample mean is pretty close to sigma^2/N for N repeats of 1000 throws. Amazing!
19:51:22 <oerjan> it's like those statisticians know what they are doing, or something
19:54:23 <kmc> shachaf: congrats
19:54:34 <kmc> gratschaf
19:54:45 <fizzie> As for the (6^2-1)/12, it's almost as if E(X^2)-E(X)^2 and E(f(X)) = sum_i p(X_i) f(X_i).
19:54:50 <copumpkin> lol
19:55:01 <shachaf> Level 8 was very contrived.
19:55:53 <fizzie> They seem to have kind of a "thing" for those passwords-checked-in-steps kind of things.
19:56:09 <fizzie> The corresponding CTF1 one was kind of contrived too.
19:56:29 <shachaf> Most of CTF1 was contrived.
19:56:47 <zzo38> kmc: About my LFSR configurable tap instruction pointer, I had other ideas too such as four memory buses (primary program, secondary program, primary data, and secondary data) where any of them can be swapped with others, so you can treat program as data as well, it is like harvard, and can be as fast as harvard.
19:57:02 <fizzie> Well, maybe. I've lost my notes. But the code for that one was (IIRC) so convoluted compared to a straight-forward strcmp.
19:57:12 <shachaf> It was.
19:57:21 <shachaf> It did several strlen()s for each iteration.
19:58:55 <shachaf> On the other hand level04 was "void fun(char *str) { char buf[1024]; strcpy(buf, str); }"
19:58:57 <zzo38> In addition, having multiplexing instructions (like Muxcomp esolang, but operating on registers instead of memory), having the address bus and data bus of each memory to also be a register, and some other ideas too.
19:59:23 <fizzie> shachaf: It did have some kind of ASLR on, at least.
19:59:39 <fizzie> But yes, it's not exactly the most useful function.
20:00:12 * shachaf brute-forced his way through the ASLR instead of being clever.
20:00:36 <zzo38> shachaf: If it is optimized I would expect it to do nothing, but if it is not optimized I would expect that something would go wrong if the string is too long.
20:00:50 <fizzie> shachaf: The strcpy leaves 'buf' in %eax, so I just picked a "call *%eax" (in the code) to return to.
20:01:09 <shachaf> zzo38: You mean "something to go *right*".
20:01:13 <shachaf> fizzie: Right. I didn't notice that.
20:01:24 <fizzie> (I found the email I sent them, just not my code-and-notes directory.)
20:01:31 <zzo38> shachaf: Well, it will go right if you specifically make it go right, I suppose.
20:01:44 <shachaf> I just gave a very long string full of nops over and over again. It was 32 bits so it didn't take long.
20:01:58 <fizzie> shachaf: On the other hand, what I executed was the first google-hit for "/bin/sh shellcode", so that's kinda lazy too.
20:09:01 -!- nortti- has joined.
20:11:42 <FreeFull> 100 iota [ 1 + iota sum . ] each
20:13:49 <FreeFull> Guess the language
20:16:19 <fizzie> It looks kinda Factorish.
20:16:25 <FreeFull> It is Factor
20:16:30 <fizzie> Well, then.
20:16:36 <fizzie> (I haven't written any, but I've seen snippets.)
20:17:44 <fizzie> How's that 'each' thing know how much to sprungle?
20:18:16 <FreeFull> iota returns a sequence
20:18:29 <fizzie> Oh, so it's not just that many numbers.
20:20:26 <FreeFull> USING: math.ranges ; 100 [1,b] [ [1,b] sum . ] each (this is probably better)
20:21:31 <FreeFull> Could put it in a function
20:21:42 <fizzie> > sum . enumFromTo 0 <$> [0..99] -- I suppose it's something kinda like that.
20:21:44 <lambdabot> [0,1,3,6,10,15,21,28,36,45,55,66,78,91,105,120,136,153,171,190,210,231,253,...
20:22:07 <FreeFull> 100 [1,b] goes from 1 to 100 (inclusive)
20:22:20 <fizzie> "For example, calling iota on the integer 3 produces a sequence containing the elements 0, 1, and 2." http://docs.factorcode.org/content/article-sequences-integers.html
20:22:23 <fizzie> I was following that one.
20:22:42 <FreeFull> Yeah, iota isn't the most convienient when you want to start from 1
20:22:51 <FreeFull> Since you have to add 1 to all elements
20:23:26 <fizzie> Well, but if you start with a 100 iota, the last one is 99, and you have "1 + iota" so that's another 100 iota so the last sum is up to 99 there.
20:23:30 <Sgeo> 1,827 comments in 23 minutes http://www.reddit.com/r/IAmA/comments/z1c9z/i_am_barack_obama_president_of_the_united_states/
20:24:08 <FreeFull> My iota thing does print 100 numbers as well, but it starts with 0 instead of 1
20:24:39 <fizzie> Yes, well, so does the [0..99], obviously.
20:24:46 <FreeFull> Yeah
20:24:56 <FreeFull> Anyway
20:31:14 <boily> Sgeo: that's why I can't get my reddit fix right now...
20:35:30 -!- Vorpal has quit (Ping timeout: 276 seconds).
20:35:31 -!- pumpkin has joined.
20:36:16 -!- copumpkin has quit (Ping timeout: 245 seconds).
20:36:17 -!- pumpkin has changed nick to copumpkin.
20:38:50 <oerjan> Sgeo: it won't load i see...
20:39:09 <oerjan> well if it were genuine i guess that would explain why it won't load :P
20:39:51 <oerjan> does this mean obama managed to reddit reddit?
20:40:49 <oerjan> hm appending .nyud.net doesn't help...
20:41:17 <Sgeo> oerjan, seems to be genuine
20:41:27 <oerjan> i guess it _is_ election year
20:41:32 <Sgeo> https://twitter.com/BarackObama/status/240903767350968320
20:42:58 <oerjan> that blue checkmark means it's a verified twitter account right? i cannot seem to get any tooltip for it.
20:43:21 <atriq> Yeah
20:43:43 <Gregor> Yup, Obama killed reddit.
20:43:47 <Gregor> Tricky tricky.
20:43:52 <shachaf> I should verify my Twitter account.
20:44:41 <oerjan> shachaf: i vaguely thought they'd stopped doing that.
20:45:00 <atriq> Jeb of Mojang fame recently got the tick
20:45:07 <shachaf> œrjan: Yes, but surely they can make a special case for someone like me?
20:45:18 <oerjan> shachaf: well obviously you have a point.
20:45:37 <oerjan> also a strange spelling of ø
20:47:12 <shachaf> o̼rjan
20:47:29 <shachaf> ø̼r̼j̼a̼n̼
20:47:43 <shachaf> 033C COMBINING SEAGULL BELOW [̼]
20:47:54 <boily> seagull???
20:48:13 <shachaf> o͆rjan
20:48:50 <oerjan> > '\x33C'
20:48:51 <lambdabot> '\828'
20:48:54 <shachaf> o͡rjan
20:48:55 <boily> so ørjan is a seagull that combines from below.
20:49:00 <oerjan> @read '\x33C'
20:49:00 <lambdabot> Plugin `dummy' failed with: Prelude.read: no parse
20:49:06 <oerjan> @read "\x33C"
20:49:07 <lambdabot> <
20:49:17 <boily> we're not even friday, and I'm already confused.
20:49:23 <oerjan> wut
20:49:36 <shachaf> > 0x33c `mod` 256
20:49:37 <lambdabot> 60
20:49:40 <shachaf> > chr 60
20:49:41 <lambdabot> '<'
20:49:43 <oerjan> boily: no shachaf is a seagull. he's trying to pretend it's just his name, though.
20:50:10 <boily> aaah. as tvtropes would have said, it makes as much sense in context.
20:51:05 <oerjan> just ask Odd-Even and Bent over there
20:56:31 -!- hagb4rd has joined.
20:56:50 -!- boily has quit (Quit: Watch out for combinatoric seagulls!).
20:57:32 <oerjan> http://www.smbc-comics.com/index.php?db=comics&id=2703#comic :P
20:57:40 <oerjan> (it's not quite new)
20:58:11 <oerjan> > 6000/52
20:58:12 <lambdabot> 115.38461538461539
21:00:37 <fizzie> > 2012-6000/52
21:00:38 <lambdabot> 1896.6153846153845
21:02:41 <fizzie> Isn't that around when Mac OS <=9 epoch is?
21:03:05 <fizzie> Oh, that was 1904. About as far from 1900 but to the other direction.
21:03:38 <hagb4rd> > 2.45/1
21:03:39 <lambdabot> 2.45
21:05:05 * oerjan wonders what hagb4rd was expecting
21:06:18 <atriq> oerjan, maybe he was checking maths still works in the future
21:06:22 <hagb4rd> i tried to recall that few decimals that one cannot store as float, at least not exactly
21:06:32 <atriq> > 1/3
21:06:33 <lambdabot> 0.3333333333333333
21:06:41 <atriq> > 100000000000/3
21:06:42 <lambdabot> 3.3333333333333332e10
21:06:45 <hagb4rd> well.. that is not a decimal
21:06:51 <atriq> True
21:06:53 <oerjan> atriq: ah yes. there was an smbc about that.
21:07:29 <atriq> > 0.9 * 1000000000
21:07:30 <lambdabot> 9.0e8
21:07:43 <atriq> Wait
21:07:55 <oerjan> hagb4rd: it would still print the simplest decimal representation for that double
21:07:56 <atriq> I'm not thinking in terms of floating point numbers
21:08:19 <oerjan> > 0.1 -- not an exact double
21:08:20 <lambdabot> 0.1
21:08:47 <hagb4rd> we have encountered problems with floattype and well ..yes..prices
21:09:38 <oerjan> > 0.1 :: Rational
21:09:39 <lambdabot> 1 % 10
21:09:53 <oerjan> if the denominator is not a power of 2, it's not exact.
21:11:13 <fizzie> !perl printf("%.30f", 0.1);
21:11:14 <EgoBot> 0.100000000000000005551115123126
21:11:16 <hagb4rd> yea
21:11:43 <Phantom__Hoover> http://en.wikiquote.org/wiki/Rasmus_Lerdorf
21:11:51 <Phantom__Hoover> I love it when Wikipedia gets nasty.
21:12:37 <hagb4rd> which turns fast to larger amounts (more than a cent :) when not rounded before doing the sum
21:12:41 <hagb4rd> for example
21:12:47 <hagb4rd> this can be evil
21:13:37 <hagb4rd> good it's not that hard to implement a decimal type if not present
21:14:07 <hagb4rd> kids, don't try this at home
21:14:56 <Phantom__Hoover> oh
21:14:58 <Phantom__Hoover> dear
21:14:59 <zzo38> I have written something about some kind of "algebraic infinity" nobody replied perhaps I can write more see what you would think about it. This value called "infinity" can be treated as a algebraic variable representing a positive real number (so most of the same rules apply), except that it is considered to be greater than any real number, and it is not a real number.
21:15:00 <Phantom__Hoover> hagb4rd
21:15:10 <hagb4rd> Phantom__Hoover
21:15:45 <Phantom__Hoover> you brought itidus21 down upon us
21:15:56 <Phantom__Hoover> and you dare to return?
21:16:30 <hagb4rd> ah yes. i kind of missed you
21:17:03 <Phantom__Hoover> you tread upon thin ice my friend
21:17:04 <Phantom__Hoover> thin
21:17:04 <Phantom__Hoover> ice
21:17:27 <hagb4rd> angels dancing
21:17:30 <hagb4rd> angels dying
21:17:40 <zzo38> Please specify thickness (in decimicrons).
21:18:26 <oerjan> zzo38: http://en.wikipedia.org/wiki/Levi-Civita_field
21:18:45 <zzo38> oerjan: O, is that like what I have described?
21:18:47 <Phantom__Hoover> the first of the last will deliver the old
21:18:58 <Phantom__Hoover> dammit oerjan
21:19:25 <oerjan> zzo38: it seems similar
21:20:15 <zzo38> Yes it does, although it seem based on infinitesimals instead of infinity (although even in what I described, you have have one over infinity to make infinitesimal numbers)
21:22:03 <oerjan> yeah that's just a simple renaming, more significant is that they use infinite formal series instead of just sums
21:22:17 <oerjan> *finite sums
21:22:58 <zzo38> OK
21:23:55 <atriq> Okay, this is the looooooooooooooongest single Haskell function I have ever written
21:24:12 <atriq> Even longer than the factorial calculator
21:24:51 <hagb4rd> attriq: share it please
21:25:38 <hagb4rd> *atriq ..pardon
21:25:43 <oerjan> but what if it doesn't fit in our universe?
21:25:54 <atriq> It's not THAT long
21:25:59 <atriq> About 60 lines
21:26:12 <atriq> For a Fueue interpreter
21:26:23 <hagb4rd> drop down that pants
21:26:26 <oerjan> i guess that's still long for haskell
21:26:42 <oerjan> yeah let us horribly dissect it!
21:26:50 <oerjan> wait, is that not motivational. i forget.
21:27:05 <atriq> It's just a case expression, in a monad, in a Kleisli wrapper
21:27:19 <atriq> Its type is Kleisli (MaybeT (StateT Integer IO)) (Sequence FueueItem) (Sequence FueueItem)
21:27:40 <oerjan> don't you mean Seq
21:27:43 <atriq> Yes
21:27:45 <atriq> Probably
21:28:24 <Sgeo> Oh hey http://www.reddit.com/user/PresidentObama/comments/ worked for me
21:28:37 <atriq> Make a mirror
21:29:32 <zzo38> oerjan: Do you know what categories can do-notation work with? Does it work with Cartesian closed categories in general?
21:29:45 <oerjan> atriq: that feels a bit like overkill :P
21:29:56 <atriq> I'm in an overkill mood
21:30:35 <oerjan> zzo38: well in haskell even with options afaik it's always desugared to use ordinary lambdas, so seems hard to get very general
21:30:39 <oerjan> *in ghc
21:31:03 <zzo38> oerjan: I don't mean in Haskell, I mean in general.
21:31:19 <Sgeo> Uh, have this? http://pastie.org/4612756
21:31:28 <oerjan> otoh cartesian closed categories are supposedly what you need to be able to embed typed lambda calculus
21:32:03 <oerjan> so presumably you could desugar using that embedding?
21:32:05 <zzo38> Is it the case that categories supporting do-notation are those which all monads are applicative?
21:32:26 <oerjan> now you are way over my head :P
21:45:19 <zzo38> Are you sure?
21:45:47 <oerjan> pretty sure
21:49:13 -!- nortti- has quit (Quit: AndroIRC - Android IRC Client ( http://www.androirc.com )).
21:58:09 <oerjan> hm it seems hard in fueue to move information conditionally leftward
22:03:47 <atriq> Right, I'm up to <
22:06:28 -!- copumpkin has quit (Ping timeout: 244 seconds).
22:07:40 -!- copumpkin has joined.
22:10:10 <atriq> @unmtl MaybeT (StateT Int IO) (Seq FueueItem)
22:10:10 <lambdabot> Int -> IO (Maybe (Seq FueueItem), Int)
22:23:20 <atriq> @unmtl StateT Int (MaybeT IO) (Seq) (FueueItem)
22:23:21 <lambdabot> Plugin `unmtl' failed with: `Int -> IO (Maybe (Seq, Int))' is not a type function.
22:23:27 <atriq> @unmtl StateT Int (MaybeT IO) (Seq FueueItem)
22:23:27 <lambdabot> Int -> IO (Maybe (Seq FueueItem, Int))
22:25:17 <oerjan> all this @unmtl is just fueuetile
22:31:21 <atriq> Okay, got it right
22:32:03 <oerjan> yay
22:33:17 -!- MoALTz has quit (Quit: brb).
22:37:34 <atriq> http://hpaste.org/73921
22:38:00 * Sgeo is reading about Push3
22:38:46 <atriq> oerjan, that's the crazy function in there
22:39:54 <oerjan> heh i think the obama post is already no. 3 ever on reddit
22:40:39 <Phantom__Hoover> Sgeo, are you learning another goddamn language
22:41:05 <oerjan> atriq: someone doesn't like if then else :P
22:41:09 <Sgeo> Phantom__Hoover, if it helps, it's not a general purpose language, and even I can't twist it as such.
22:41:27 <atriq> oerjan, someone realised he didn't have to use Ordering way too late, and has now switched
22:41:34 <Sgeo> Unless you mean Clojure, in which case, yes.
22:41:40 <oerjan> ah
22:41:49 <Phantom__Hoover> oh for--
22:42:01 <atriq> (to if-then-else)
22:42:05 <Phantom__Hoover> Not only are you learning another goddamn language, you're two-timing as well?
22:42:11 <atriq> Oh wait
22:42:29 <atriq> For the first case expression, I've switched it to an if-then-else
22:42:35 <Sgeo> Phantom__Hoover, again, Push3, which I only heard of for the first time today, is probably not realistically usable as a general purpose language.
22:42:36 <atriq> All the others remain case expressions
22:45:52 <atriq> Sentences you don't hear often: "Actually, it's probably the lack of Mormon Jesus"
22:46:06 <oerjan> atriq: hm i see it's annoying that you cannot pattern match more than one level on a Seq with a single pattern
22:46:18 <atriq> Yeah
22:46:42 <atriq> Hence all the multiple levels of viewl
22:46:53 <Sgeo> Guess what dividing by 0 does in Push? Absolutely nothing whatsoever, it's a no-op
22:47:05 <atriq> In this implementation of Fueue, it pushes 0
22:47:25 <atriq> (this is not part of the specification of Fueue)
22:47:25 <oerjan> atriq: pattern guards might help, perhaps?
22:47:35 <atriq> I'm not sure how
22:48:06 <atriq> Also I like to try to stick to vanilla Haskell
22:49:25 <atriq> Well, TOMORROW I LEARN PARSEC
22:49:31 <atriq> Don't let me not learn Parsec
22:49:38 <atriq> (the Haskell parsing library)
22:49:45 <atriq> Goodnight
22:49:46 -!- atriq has quit (Quit: Leaving).
22:50:10 <Phantom__Hoover> @tell atriq don't not learn parsec
22:50:10 <lambdabot> Consider it noted.
22:50:14 <zzo38> I do think it is a good parsing library; you often do not even need the monad operations usually applicative will do.
22:51:27 <fizzie> It's also not just a "parsing library", it's a parser COMBINATOR library, and as any rube knows, combinators improve ANYTHING.
22:52:04 <oerjan> @tell atriq pattern guards _are_ vanilla haskell, they were added in haskell 2010
22:52:04 <lambdabot> Consider it noted.
22:57:29 -!- kmc has quit (Quit: leaving).
22:58:11 <shachaf> Uh-oh.
22:58:18 <shachaf> kmc will never be back. :-(
23:02:01 <Phantom__Hoover> oh no :(
23:02:59 <Phantom__Hoover> Anyway, I love how the WP article on Lady Chatterley's Lover has a single paragraph on the actual plot and then the rest of the article is literary criticism and an account of the controversy.
23:06:58 -!- nooga has quit (Read error: Connection reset by peer).
23:12:01 <Arc_Koen> atriq: In this implementation of Fueue, it pushes 0
23:12:12 <Arc_Koen> what implementation?
23:12:19 <Phantom__Hoover> He's offline.
23:12:24 <Arc_Koen> oh, right
23:12:42 <oerjan> he's writing a haskell one
23:13:00 <Arc_Koen> great
23:13:23 <Phantom__Hoover> Arc_Koen, hey do you feel like writing an Eodermdrome interpreter.
23:13:48 <Arc_Koen> I already have all the pain not mistyping fueue
23:14:01 <Arc_Koen> and you want me to work with "eodermdrome"?
23:14:30 -!- nooga has joined.
23:14:33 <Phantom__Hoover> It's easy enough to remember once you interpret it with its own semantics!
23:14:43 <oerjan> Arc_Koen: i made a bigger program )$2[)$--------2~)~~[)[)~(~[~[$~H~]~)%+~91-):]~1+:])]]~[$~H~])%+-91)[65][65]
23:15:17 <Arc_Koen> don't tell me what it does; I'll save it and as soon as one of my two interpreters works properly I'll try it
23:15:36 <oerjan> ok don't read the logs then as i told atriq :)
23:15:56 <Arc_Koen> my logs only go as far as 3 hours ago
23:16:09 <Arc_Koen> (btw apparently someone highlighted me but it's not on my logs)
23:16:24 <Phantom__Hoover> (I'm half joking; the reason Eodermdrome is interesting is also the reason it's a bitch to implement.)
23:16:36 <Phantom__Hoover> http://codu.org/logs/_esoteric
23:16:39 <FreeFull> oerjan: What does it do?
23:16:51 <Arc_Koen> :(
23:16:52 * oerjan swats FreeFull -----###
23:17:11 <oerjan> Arc_Koen: i highlighted you when i made the program
23:17:16 <Arc_Koen> on such a channel I'd almost expect everyone to have a public key or something
23:18:11 <zzo38> I do have a SSH public key.
23:22:12 -!- MoALTz has joined.
23:23:54 <zzo38> If you have a grid filled with 1 and 0, what is the algorithm to represent it as the fewest number of rectangles such that the rectangles contain all 1 and everywhere that is not inside of a rectangle will be 0 (overlapping rectangles is OK)?
23:27:13 -!- augur has quit (Remote host closed the connection).
23:27:14 <zzo38> For example [110;111;011] becomes [0,0,2,2;1,1,3,3]
23:27:42 <Arc_Koen> I disagree
23:27:55 <zzo38> You disagree with what?
23:28:00 <Arc_Koen> 1 rectangle is always enough
23:28:11 <Arc_Koen> and since 0 is never enough
23:28:18 <Arc_Koen> the algorithm is pretty easy :)
23:28:29 <zzo38> Actually 0 is sometimes enough, and 1 is not always enough.
23:28:46 <zzo38> For example [00000;00000;00000;00000] becomes [] no rectangles are required.
23:28:48 <Arc_Koen> if 1 is not always enough then I haven't understood the problem properly
23:28:48 <oerjan> i don't think zzo38 meant there to be any 0's inside the rectangles, although i too read it that way at first
23:29:25 <zzo38> oerjan: I mean that all points inside one or more rectangles are 1 and all other points are 0. Sorry if I have been unclear.
23:29:37 -!- MoALTz has quit (Ping timeout: 268 seconds).
23:29:37 <zzo38> I have an example, in case that helps.
23:29:53 <Arc_Koen> oh, ok
23:29:59 <oerjan> i understand the problem, although i'm not sure there is a unique solution always
23:30:21 <zzo38> The solution needs not be unique; any one will do.
23:30:24 <oerjan> in fact there clearly isn't always
23:30:30 -!- monqy has joined.
23:30:50 <Arc_Koen> I'm guessing (but not certain) a greedy algorithm would do the job
23:31:21 <oerjan> on the opposite end, i can imagine this being NP-complete
23:32:30 <oerjan> i certainly don't know an efficient algorithm, anyway
23:36:33 -!- copumpkin has changed nick to honestbob.
23:36:39 -!- honestbob has changed nick to copumpkin.
23:37:07 <Arc_Koen> oerjan: can you prove "take the first 1, then find the biggest rectangle that englobes it, then continue with the next 1" doesn't work?
23:37:34 <Arc_Koen> (though "continue with the next one" is hiding the "it can overlap" problem)
23:37:57 <oerjan> i assumed you meant "next uncovered one"
23:42:19 <oerjan> not on the spot, no
23:44:20 <oerjan> i suddenly got a strong intuition not to think about it
23:46:46 <Arc_Koen> yes, next uncovered one
23:48:47 <zzo38> Why you got a strong intuition not to think about it?
23:49:24 <oerjan> (my) intuition never gives reasons.
23:50:35 <oerjan> but i can guess that i'm too tired to think it through.
←2012-08-28 2012-08-29 2012-08-30→ ↑2012 ↑all