00:01:48 -!- pikhq has joined. 00:02:27 -!- pikhq_ has quit (Ping timeout: 276 seconds). 00:03:12 @undo [x | Just x <- hm] 00:03:12 concatMap (\ a -> case a of { Just x -> [x]; _ -> []}) hm 00:03:22 Lymee: Hey where are our barracks. 00:03:32 nya? 00:04:22 Lymee: YOU ARE THE ONLY DF PERSON ONLINE OK 00:04:35 CHECK "R" 00:05:28 Lymee: I did 00:05:33 I found no barracks :P 00:05:37 Make one. 00:06:05 Lymee: We have one. 00:06:08 I just can't find it :P 00:06:21 make a barrack, call it obama 00:06:27 Check armor stands and weapon racks. 00:06:33 -!- zzo38 has left. 00:06:51 Hmm 00:07:18 Why does this guy have a weapon rack in his bedroom 00:07:41 Requirements probs. 00:08:43 elliott: you've found a budding terrorist! 00:10:46 Oh fuck you Lymee, you're at happiness 0 nad have mandated the cosntruction of ````certain goods'''' 00:10:50 You know what it's time for you to do Lymee???? 00:10:52 It's time for you to DIE. 00:10:55 ;-; 00:10:55 what? the download link for Firefox 3.6 gives me version 5... 00:11:12 Why'd you want 3.6 00:11:12 how's monqy going 00:11:22 monqy: Still our good ol' miner 00:11:25 \ 00:11:29 do i have any miner friends 00:11:31 elliott: the plugin I need only works with 3.6 00:11:33 monqy: A few 00:12:27 Dammit PH, where is the execution chamber 00:12:57 what? no really this 3.6 download is 5. 00:12:58 WHY 00:12:59 Lymee: Dear god, your bedroom is insane. 00:13:12 Lymee is insane. 00:13:31 Lymee: http://ompldr.org/vOXcwdg 00:13:49 what does that mean 00:13:56 monqy: what mean 00:14:00 monqy: All the floor tiles are engraved 00:14:06 oh 00:14:11 Basically Lymia is living in a queen's bedroom. 00:14:12 what are the what are those taus 00:14:15 She's only a fucking county. 00:14:21 monqy: Uh, plants or something I think 00:14:31 They're not taus 00:14:33 I don't think 00:14:34 Plants. 00:14:42 well they're somethings and I don't know what they are 00:14:47 and they look kind of like taus 00:16:08 Did PH build a ton of levers just so that I wouldn't use the execution chamber 00:16:10 Sigh 00:18:14 monqy: btw you are a girl and also, fifty-seven years old 00:18:49 ok 00:19:17 Lymee: Do countesses get elected, I suppose not 00:19:20 And also I can't replace you 00:19:26 So I guess I have to arrange a nice accident 00:19:37 You're demanding an adamantine throne 00:19:41 I don't like you, Lymee 00:20:43 what would happen if execution 00:20:56 what... I need 3.6 00:20:59 WHAT IS THIS. 00:21:04 what is that 00:21:06 CakeProphet: just get it from the ftp dude 00:21:09 what would happen if execution 00:21:12 she'd die 00:21:16 and maybe tantrum spiral but probably not 00:21:20 oh nevermind I figured out the problem. 00:21:21 do it do it do it 00:21:27 I was running firefox instead of ./firefox. :3 00:22:12 smart 00:22:19 monqy: i dont know how to work the execution chamber :( 00:22:29 :( 00:22:35 yep I'm pro like that. 00:23:28 Lymee: I want to remove all but my best engraver if I'm trying to give my bedroom a wonderful total engraving, right? 00:28:19 thx Lymee 00:40:35 Lymee: :( 00:40:52 I guess. 00:41:04 I guess I'll let them all do it, since I have an awful lot of wall and floor to do 00:41:52 Wait, you can't engrave floor? 00:42:40 A place of nostalgia for me is free again 00:42:42 <3 00:42:43 Hmm, you're meant to be able to... 00:43:01 Sgeo_: oh my god stop embarrassing yourself. 00:43:27 Lymee: So, um... what does it mean if I try and engrave a floor and the designation just doesn't stick. 00:43:34 -!- Gregor has set topic: FALCON PAUNCH | iridium is too mainstream | http://codu.org/logs/_esoteric/. 00:43:40 elliott: jokes on you; sgeo has no shame 00:44:54 elliott, I... don't think that's happened before. 00:44:57 Is it constructed? 00:49:20 Yes. 00:57:56 You can't engrave constructed flooring or walls. 01:00:44 Lymee: But why/ 01:01:00 And... can I somehow get natural floor to... grow? 01:01:25 Nope~ 01:01:32 -!- Sgeo has joined. 01:01:32 Not unless you want to cast obsidian 01:01:44 -!- Sgeo has quit (Client Quit). 01:02:02 Lymee: How 01:02:26 Mix water and lava. 01:03:38 Sounds easy :-P 01:04:08 this will clearly end well. 01:07:08 -!- cheater_ has joined. 01:09:11 Lymee: Why did nobody tell me :P 01:09:26 Tell you what? 01:09:37 That you can't egnave constructed floor 01:09:46 :kyubey: You never asked. 01:10:08 -!- cheater__ has quit (Ping timeout: 250 seconds). 01:10:29 Argh networking argh. 01:10:43 Gregor: UMLBox again? 01:10:48 elliott: Naturalismo. 01:11:10 -!- elliott_ has joined. 01:11:15 Gregor: UMLBox again? 01:11:19 -!- elliott has quit (Read error: Connection reset by peer). 01:11:20 elliott: Naturalismo. 01:11:26 i'm sure elves should be able to engrave wood *cackles evilly* 01:11:41 oerjan: Too busy killing 'em 01:11:59 Why does DF have no support for cross-species migration? 01:12:00 Gregor: Dude, you really want a generic host<->guest communication mechanism :P 01:12:05 Gregor: It would make your life _so much easier_. 01:12:24 elliott_: DO NOT WANT TO HACK KERNEL :( 01:12:42 Gregor: Wait 01:12:44 Gregor: Why not just use a FIFO 01:12:50 Or unix socket 01:12:50 On the host filesystem 01:12:54 elliott_: FIFOs aren't communicated host->guest 01:12:54 And expose that to the guest 01:12:58 Unix socket? 01:13:04 Nope 01:13:09 That's stupid 01:13:12 What are you meant to do 01:13:17 Cry 01:13:20 No but really 01:13:23 s/ / / 01:15:08 Gregor: Wait 01:15:15 Gregor: You communicate through stdout and stdin, right? 01:15:22 Why not just make another tty for doing communication on 01:16:21 elliott_: Um ... OK, I can do that ... 01:16:51 Gregor: Well, it'd work, wouldn't it? 01:16:55 Yup 01:16:56 And it's a simple bytestream 01:17:03 And you can just tunnel all sockets and the like over that with a simple binary format 01:17:08 Or make one tty per socket, if that's feasible? 01:17:18 That would be simpler, no protocol involved apart from a "lol gimme socket" tty 01:18:57 I think the max # sockets is 20? (10 tty's, 10 ttyS's) 01:19:03 That might be feasible ... 01:19:05 Lesse ... 01:19:13 Gregor: Ehh, just do it over one tty 01:19:17 That's probably less work 01:19:35 I mean, yeah, you need to define a protocol, but it can be a super-trivial one 01:19:47 Only need to mux, really. 01:20:04 Gregor: Note that your "sockets" still involve using a totally different API for any socket-using program :P 01:20:13 So you still need a custom-written HTTP proxy, but that's like fifty lines of Python 01:20:28 Or ... socat :P 01:20:38 Gregor: socat understands your special protocol? 01:20:50 It does if I expose it as a UNIX domain socket on both ends *shrugs* 01:20:53 (i.e. "prefix every packet with the socket ID" :P) 01:21:04 elliott_: Why HTTP? 01:21:06 Gregor: Oh, you mean just have a general socketotrond? 01:21:11 Tunnel OpenVPN over this. 01:21:13 pikhq: That's all HackEgo allows 01:21:17 elliott_: That's what I was thinking. 01:21:21 Laaaame! 01:21:35 Gregor: Still makes opening a socket have a special protocol, unless you override libc :P 01:21:38 But yeah 01:21:44 That's basically what I meant 01:22:32 Gregor: But yeah, you definitely want to do it with one tty, because making ttys on-the-fly and the like sounds even more painful than a little protocol :P 01:22:41 TCP over pty: the best? 01:22:48 Wait 01:22:48 elliott_: Actually that doesn't sound particularly difficult *shrugs* 01:22:49 I think the max # sockets is 20? (10 tty's, 10 ttyS's) 01:22:52 Gregor: You can have arbitrary ptys... 01:22:55 Can't you? 01:22:57 More or less? 01:23:05 elliott_: Those that are communicated host-to-guest; they're not pty's as far as the guest is concerned. 01:23:09 I thought that limitation was Old-Style. 01:23:11 Gregor: Ugh >_> 01:23:37 Gregor: A one-tty solution is more elegant, then, my critical IRC bot application requires twenty-one socket ;-) 01:23:38 s 01:23:44 Also it'd be eighteen 01:23:47 One is stdio 01:23:54 One is the socket-creation-and-closing service 01:24:52 Surely somebody's already solved this problem. 01:24:55 Modulo the UML part. 01:25:06 The "mux a bunch of sockets over a single I/O device" problem. 01:25:06 Gregor: The UML part is what makes it a problem, man :P 01:25:16 I'm not willing to write code :P 01:25:29 Gregor: Dude, you can write a trivial program for this in like ten minutes :P 01:25:35 Oh god, you're going to rope me into this aren't you >_< 01:25:43 REMIND ME NEVER TO GIVE IDEAS 01:25:44 Maaaaaaaaybe. 01:26:38 It's literally just (:open,server,host) --> id|:fail; (:send,id,text) --> bytes|:fail; (:recv,id,bytes) --> buf|:fail 01:26:39 Or whatever :P 01:26:46 Oh, and (:close,id) I guess 01:26:58 Obviously that doesn't cover all of networking ever, but all you need is basic TCP/IP 01:27:49 Yeahyeahyeah, I'mma start working on it now >_< 01:27:56 Gregor: Too late, I opened up a file :P 01:28:02 Yessss, now I don't have to. 01:28:16 Gregor: So I was thinking I'd write it in Haskell instead of Python................ 01:28:28 I was thinking I'd write it in C ... 01:28:32 * elliott_ sits in his Passive-Aggressive Programming Warchair. 01:28:47 Gregor: Hmm, what is the actual tty interface you get? 01:28:55 Like, can both the host and client literally just read from stdin/write to stdout? 01:29:24 Well, the guest would be communicating to /dev/ttyS, and the host would be using FIFOs. 01:29:47 Yah, but I just mean, how easy is it to plug a simple stdin/stdout program into the host/client end of the deal 01:29:53 Mostly the host I guess, since the client part is easy 01:30:34 On the host you'd have to use FIFO's, stdin/stdout are already taken. 01:30:42 So, y'know, simple :P 01:30:46 Right :P 01:30:50 I've just avoided FIFOs religiously. 01:31:31 You realize that anything you write in Haskell I'll just have to rewrite in C, right? :P 01:31:39 I'm writing it in Python :P 01:32:18 Unless that doesn't meet your LANGUAGE REQUIREMENTS 01:32:28 Depending on Python in the host and guest is not the most strenuous thing :P 01:32:31 The reason I wanted to write it in C is so that it could run on the guest with no requirements whatsoever (even no FS if necessary) 01:32:45 Well, you can statically link the Python interpreter with a script. 01:32:46 Errm, not "no FS", but "host FS not loaded yet" 01:32:52 But I don't know why you'd want to do THAT :P 01:33:05 Gregor: BTW, you know Haskell can be statically linked too? :P 01:33:15 Producing a, what, 15MB binary? 01:33:19 For Hello, world? 01:33:23 Gregor: Nah 01:33:34 * elliott_ measures out of curiosity 01:34:38 -rwxr-xr-x 1 elliott elliott 2.1M 2011-08-14 02:35 hello 01:34:41 Less if it wasn't glibc 01:34:45 Probably less with the LLVM code generator 01:34:51 Oh, that's not stripped 01:34:58 -rwxr-xr-x 1 elliott elliott 1.6M 2011-08-14 02:36 hello 01:35:11 Gregor: It's whole kilobytes bigger than the equivalent C program statically linked with glibc :P 01:35:12 And getting rid of glibc would remove at least a meg of that. 01:35:39 elliott_: that's THOUSANDS of bytes! 01:36:07 Gregor: But sure, I am able to write C programs, the question is whether you want it with lots of bugs or not ;D ;D ;D ;DD:D:D:D:D:D:D:D: 01:36:10 Yeah OK fine /me opens host.c. 01:36:19 Python is probably fine :P 01:36:32 (The more I think about "standard use", the more C is fine ... ) 01:36:42 Gregor: "Standard use"? 01:36:45 I don't actually know what you mean :P 01:36:52 Common use of umlbox. 01:36:59 Emoticon most commonly used by programmers: :P 01:37:03 Gregor: Do you mean to s/C/Python/? 01:37:05 Which would generally include Python on the guest; and if it didn't, you probably don't care about X11 or networking. 01:37:36 Gregor: X11? Whoo boy :P 01:37:48 X11 isn't difficult if you have UNIX sockets *shrugs* 01:38:04 My mind keeps wandering back to X11 even though I care about it roughly none at all :P 01:38:16 IRC quirk most common to mostly programmers: != 01:38:41 def read_string(tty): 01:38:41 bytes = tty.read(1) 01:38:41 return tty.read(bytes) 01:38:44 Gregor: Look at mah ad-hoc format 01:39:00 Really? 255 bytes per packet max? 01:39:05 Gregor: Oh, point >_> 01:39:06 Can't we make it ... 65536? 01:39:10 Yeah aight :P 01:39:16 I was writing cmd_connect 01:39:19 So that hadn't crossed my mind 01:39:50 elliott_: the unecessary use of variables is apalling. 01:39:59 ord(bytes[0]) + (ord(bytes[1]) << 8) 01:40:03 LOOK AT MAH LITTLE-ENDIAN NETWORK PROTOCOL 01:40:05 <-- DOESN'T GIVE A FUCK 01:41:06 elliott_: You should also have a socket ID in that ad-hoc format :P 01:41:18 Gregor: Umm, that's just to read a string internally 01:41:21 e.g. 01:41:23 def cmd_connect(tty): 01:41:24 host = read_string(tty) 01:41:24 port = read_string(tty) 01:41:53 c[9][0]abcdefghi[9][0]999999999 would be the thing to send to connect to abcdefghi:999999999 01:42:17 sum(map(ord,bytes[:2])) << 8 01:42:25 CakeProphet: That... no. 01:42:44 what? 01:42:47 elliott_: ... wha? I get the feeling that we're writing very different things :P 01:42:55 (Or rather, I'm imagining vs you're writing) 01:43:05 Gregor: There needs to be a protocol for the guest to tell the host it wants to make a new socket. 01:43:20 Basically, I'm doing everything over one tty because it's simpler, and you there's four commands: connect, disconnect, send, recv. 01:43:32 Obviously connect has to take two strings, host and port, so I'm just using a simple length-prefixed thing 01:43:35 elliott_: No, that's bad and nasty, it'd require a bunch of security shit to make sure you only did "OK" connections. 01:43:37 Connect will yield a socket ID that the guest can then use. 01:43:52 Gregor: Well, how do you avoid that? You need some sort of explicit checks 01:44:07 elliott_: All I wanted was a UNIX-domain socket multiplexor. 01:44:17 Gregor: That breaks most of HackEgo 01:44:24 Because sockets would have to be known beforehand 01:44:27 elliott_: Not if one of those UNIX domain sockets is an HTTP proxy. 01:44:35 Well, okay 01:44:43 I guess that works :P 01:44:46 elliott_: it's more pythonic, bro. :3 01:44:49 I'm trying to punch the smallest possible hole :P 01:44:52 CakeProphet: It _doesn't do the right thing_. 01:45:04 Gregor: Fairy nuff then 01:45:08 elliott_: And if they could be either UNIX domain or TCP, even better >_> 01:45:24 Gregor: Surely there's some program to do UNIX domain → TCP 01:45:25 Erm 01:45:27 And vice-versa 01:45:32 elliott_: Anyway, it'd require both socket IDs and connection IDs, plus length, plus ... now you see why I didn't want to do this :P 01:45:38 elliott_: Yeah, it's called socat :) 01:45:46 Connection IDs? Can't you just enforce that at the guest layer 01:45:55 CakeProphet: Uh, that's (ord(bytes[0]) + ord(bytes[1]) << 8. 01:45:58 CakeProphet: n00b. 01:46:00 elliott_: You can have multiple separate connections to a single UNIX domain socket. 01:46:01 yes I see that now. 01:46:09 Gregor: Yeah, but is there any reason to support that? 01:46:27 elliott_: ... yeah, so you can have multiple connections to the HTTP proxy ... for, like, making two requests ... 01:46:32 Well, OK :P 01:46:50 Oh, sweet, Python's API for this seems easy enough 01:46:55 Gregor: OK, well the changes are minor then 01:47:03 Gregor: The "c" command just connects to a Unix domain socket 01:47:06 It should just take the filepath of the socket 01:47:11 And check that it's in its "allowed sockets" list 01:47:14 (host filepath) 01:47:39 elliott_: It would be easier I think for both of us if it just took an index into that list. 01:47:48 That would work too 01:48:19 That way, you just connect to one of them on the guest, the proxy sends a connection for that same ID, and it connects on the host; the guest doesn't even need to know what it was called on the host. 01:48:27 elliott_: so i made a guessing game but half of it doesn't work in the general case help 01:48:35 monqy: lol 01:48:49 elliott_: it's the tamplete haskell half 01:49:06 -!- zzo38 has joined. 01:49:36 Gregor: Should I bother with buffering or should I just assume that every packet is small enough >_> 01:49:45 Or do Unix sockets not even act the same here 01:49:48 Help I am a citizen of TCP 01:49:55 monqy: Why do you need TH for a guessing game 01:50:05 Donno 01:50:35 elliott_: i tried making case-lambda but i don't know how to get the bindings from the pattern to transfer to the expression. luckily, the guessing game doesn' tneed that to work 01:50:40 elliott_: So the guessing game occurs at compile-time, of course. 01:51:27 it's an ugly case lambda too because I didn't want to bother with parsing stuff in quasiquoters 01:54:00 Hmm, Python's standard libraries must come with an allocator of some kind 01:54:07 At this point Gregor whacks me for trying to conserve space in the list of connections 01:54:20 why are you using python 01:54:29 monqy: Least common denominator 01:54:43 hm? 01:54:49 It runs on everything 01:54:52 And isn't C 01:55:06 oh 01:56:01 what doesn't (implementation of a better language) run on 01:56:15 or is python well-suited to your task 01:56:16 whatever it is 01:56:30 elliott_: an allocator? lol 01:56:32 does java run on everything yet 01:57:11 Gregor: Hmm, so wait, a UNIX domain socket is what it actually operates on too? 01:57:17 As in, the host talks to the guest through a UNIX domain socket 01:57:22 I was assuming a file-like device, which is stupid of me 01:57:42 I have a basic host.py written though 01:58:39 No, the host talks to the guest through a FIFO, and the guest talks to the host through a character device. 01:58:45 Both more file-like than socket-like. 01:59:08 elliott_: the only allocators I know of exist in the C API. 02:01:01 Gregor: Right. 02:02:30 Gregor: It's OK if reading or writing to one socket blocks everything until it goes thorugh... right? :P 02:02:53 select? 02:02:58 elliott_: I suppose. 02:03:04 CakeProphet: Complicates the internal protocol 02:03:08 Alright, how should I get this WIP .py to you so that you can see the protocol etc.; just sprunge it? 02:03:49 Gregor: http://sprunge.us/QGIP 02:03:59 elliott_: international mail. 02:04:13 you'll need to print it out and go buy a stamp. 02:04:20 # lol I have no idea how to open a FIFO?? is this right?? help 02:04:24 best comment best line 02:06:45 elliott_: Dood, just do the protocol on stdin/stdout. 02:06:56 I can open the FIFO with < lol.in > lol.out 02:07:06 Wait why did I even do 02:07:08 def recv_all(n): 02:07:08 bytes = '' 02:07:08 while len(bytes) < n: 02:07:08 bytes += tty.recv(n - len(bytes)) 02:07:08 return bytes 02:07:10 the tty is reliable 02:07:11 lol 02:07:14 Gregor: Yeah OK will fix 02:07:22 elliott_: now obviously you should make a class on top of having functions. Like all of the standard Python modules. 02:07:40 and everyone will just use the functions anyways because they secretly hate OO 02:08:01 BBIAB 02:08:17 Gregor: client.py has to deal with a Unix domain socket which is rather less predictable, right? 02:08:24 BTW, I could extend this to TCP very, very easily, like a few lines 02:12:05 And, heh, my "TCP support" doesn't really maintain one socket it just lets people connect any time they want to it???? yeah 02:12:08 I guess that is okay maybe 02:12:52 def recv_all(n): return "".join(tty.recv(n-x) for x in xrange(n)) 02:13:06 CakeProphet: How about ... no, it doesn't work that way. 02:13:18 But feel free to continue making incorrect simplifications of my code 02:21:19 nah I'm good. However: connections[conn_id] = None 02:21:20 why? 02:21:49 so you can't continue to use it 02:21:55 oh wait i should probably close the socket there lol 02:21:59 CakeProphet: also so it can be gc'd 02:22:19 to preserve the length of connections so that future conn_ids continue to increment? 02:22:26 no I was just wondering why you didn't delete the index instead. 02:22:35 because that would ruin every conn_id greater than that one?? 02:22:47 right, okay. 02:27:13 for some reason having Nones in the list is terrible. 02:27:29 but oh well. 02:27:53 that's why I wanted an allocator 02:28:00 except it's just a one-byte allocator so it's really just a freelist 02:28:38 a dictionary and a max_conn_id would work, but... too much work really when the current approach works fine. 02:28:54 doesn't need a list 02:28:57 and that wouldn't work either 02:29:01 well 02:29:05 a list would have better memory characteristics 02:29:09 right. 02:29:32 except it's full of hideous Nones. 02:29:35 s/Nones/nuns/ 02:30:19 not if you used a freelist. 02:30:26 well, it'd have nones, but they'd get filled instantly 02:30:52 ah, recycle the old ids? 02:32:20 yes, that is what a freelist is :P 02:33:40 a functional protocol would be interesting.. 02:33:44 higher-order...commands? 02:38:24 -!- GreaseMonkey has joined. 02:46:45 Someone upgrade GHC for me so I can test this 02:46:48 TIA 02:49:27 Transient ischemic attack. 02:50:05 terror induced ascension 02:52:26 Taxidermic Investigation Agency 02:53:13 thanks in advance 02:53:38 that one's too boring.. 02:54:25 Tubular intermittent acceleration 02:59:17 -!- evincar has joined. 03:02:31 :t break 03:02:32 forall a. (a -> Bool) -> [a] -> ([a], [a]) 03:02:34 :t split 03:02:35 forall g. (RandomGen g) => g -> (g, g) 03:02:38 please tell me you have data.list.split 03:02:40 eurgh 03:02:53 :t splitOn 03:02:55 Not in scope: `splitOn' 03:15:30 CakeProphet: btw, it's not actually true that you need unsafeCoerce to do Data.Dynamic 03:15:34 because 03:15:34 cast :: (Typeable a, Typeable b) => a -> Maybe b 03:15:35 exists 03:16:09 data Dynamic = forall a. (Typeable a) => Dynamic a 03:17:44 three guesses what already mentioned function is used to implement cast... 03:19:13 oerjan: Shhhhhhhhhhhhh, obviously it's a primitive. 03:19:20 And all the values are type-tagged at runtime so it's OK. 03:37:35 -!- pikhq has quit (Ping timeout: 252 seconds). 03:37:37 http://twitter.com/#!/catnutritionist 03:38:43 -!- pikhq has joined. 03:38:58 Observation: a power supply should not be accessible by foot. 03:39:04 Erm, bleh. 03:39:11 s/supply/strip/ 03:43:50 im a power suply 03:49:43 pikhq does not understand suply society 03:55:25 -!- NihilistDandy has joined. 03:59:44 I have just come to the conclusion that the IT industry is largely responsible for compensating for the failings of bad developers and user experience designers. 03:59:50 k 04:00:04 evincar: Welcome to reality 04:00:24 I suppose next you'll be saying that the Emperor has no clothes. 04:01:03 Naturally. Au naturel-ly. Naturellement. 04:01:33 It's just depressingly amusing that such an industry can exist. 04:01:52 Hmm... @'s serialisation really needs work. 04:02:04 @ has serialisation? 04:02:07 @ has? 04:02:12 Sgeo_: What? 04:02:25 Yeah, I thought @ was sort of a hipster thing. 04:02:31 evincar: What? 04:02:32 You're making it sound to me like @ exists in some form 04:02:32 It doesn't "have" features. 04:02:35 Not in the usual sense. 04:02:40 Sgeo_: No I'm not. 04:02:40 They're different. 04:02:56 elliott_, or that there's a partial spec of serialisation 04:03:00 Sgeo_: I'm just doing this weird thing called "designing something before building it". 04:03:07 The spec exists in my head; it is deficient and vague. 04:03:09 @ has "serialisation" meaningfully distinct from "in memory representation"? 04:03:31 pikhq: Well, you've got to make concessions to get the thing to run on existing hardware. 04:03:32 pikhq: Of course it does. You think that in-memory representation will work on an architecture with a different endianness? 04:03:35 Pointer size? 04:03:42 elliott_: Fuck reality. 04:04:05 It is not more pure to tie the system design to various variables of a specific machine when that is unnecessar. 04:04:07 unnecessary. 04:04:22 I still vote to copulate with reality. 04:05:53 pikhq: Anyway, in-memory representation has pointers. 04:06:00 Pointers are machine- and time-specific. 04:06:26 Unless you want it to do a massive lookup EVERY TIME IT WANTS TO DEREFERENCE A POINTER in which case, lol @ you. 04:07:20 pikhq: Come to think of it, in-memory representation includes machine code. 04:07:25 Also not viable. 04:07:59 pikhq: Theory copulating with reality is known to produce useful, if imperfect, hybrids. 04:08:04 elliott_: Did you finally get number keys, or are you copy-pasting @? 04:08:20 NihilistDandy: alt-q 04:08:26 q is also my favourite letter, so this makes me happy 04:08:26 I get the strong feeling that either @ is never happening or you're going to sit down to write it one day and the singularity happens the next day because of it. :P 04:08:29 O.o 04:08:30 to clarrify, alt gr + q 04:08:34 Ah 04:08:57 pikhq: I'd bet my bottom dollar said day is fueled by meth. 04:08:57 pikhq: the design has been getting more concrete, so... 04:09:33 evincar: Given elliott's sleep habits, I don't think the meth will do anything notable. 04:09:43 I would like to see the design of @ 04:09:50 zzo38: now, you mean? 04:09:56 No! I mean later. 04:09:59 oh good :D 04:10:33 the process of viewing the design of @ involves me remembering it and rewriting a quarter of it in the process while typing it out into irc 04:10:49 design documents are for squares and other rectangular shapes 04:11:02 You should make a proper design document. 04:11:30 but it keeps changing :( 04:12:25 What programming language would you use? LLVM? 04:12:52 you mean the top level that day-to-day things are actually written in? or something lower 04:13:04 I mean the system itself. 04:13:31 "the system" encompasses every single piece of code running on it :) 04:13:44 there's not really any one part you could call the kernel; it'd either be too small, or too big and fluid 04:13:57 unless you consider a scheduler and maybe an allocator of some sort a kernel 04:14:08 I imagine there would be some funny business with assembly and C to get things up and running, at which point you can use whatever you like. 04:14:16 What would those parts be written in though? 04:14:17 That is, whatever you're prepared to provide runtime support for. 04:14:31 evincar: No C. Ever. 04:14:52 elliott_: Anything I don't have to write by hand is time saved. *shrug* 04:14:54 zzo38: To start with? Assembly. There's no other choice, really; it is the absolute lowest layer of the system. 04:15:04 evincar: C running on bare hardware *seems* like it'd be pretty much incompatible with everything else @ is. 04:15:09 zzo38: Once @ is fully bootstrapped, it'll just be rewritten in an @ assembler. 04:15:27 evincar: C has the wrong model. It cannot save me time because all its assumptions are wrong in the face of @. 04:15:45 Is it intended to run on many computers? 04:15:59 Or just one? 04:16:19 elliott_: I'm pretty sure there's a name for "a scheduler and maybe an allocator of some sort". 04:16:22 Exokernel. 04:16:39 zzo38: The basic model is such that @ would be more portable than typical operating systems; for instance, transferring binaries would be a rare operation, because of the security requirements (you'd basically either have to say "yes, I really want to do this risky thing" or provide a proof of the binary's safety, which would be quite thoroughly difficult). 04:17:11 zzo38: I am only planning to implement it for x86-64 computers to start with, but hopefully the non-portable parts could be kept to a minimum. 04:17:28 OK, that makes sense. But if you write the system in assembly language then you need to write it in the assembly languages for many computers! 04:17:28 For instance, like NetBSD, there is no reason that any driver would have to be CPU or bus-specific. 04:17:43 elliott_: Are there applications in a traditional sense? Barring any details of persistent state, namelessness and the other peculiarities of @. 04:17:52 zzo38: Well, it's impossible to avoid writing any assembly at all without relying on someone else's assembly (e.g. GRUB). 04:18:08 But the scheduler code should be rather small, and the remaining assembly should merely involve boot-up and some other miscellaneous tasks. 04:18:41 Well, yes. You would still need to write things such as the MBR code in assembly. The other stuff could be written in LLVM so that much of it can easily be ported to other computers. 04:18:58 evincar: No. The definition of application is basically "the smallest non-composable unit of software"; information can't pass application walls without specific code to make it happen. That's pretty much antithetical to what @ is. 04:19:40 Do all programs need to be compiled and put everything together to make up the entire operating system? 04:20:36 elliott_: How do I run existing software on it? 04:21:08 zzo38: Because of the safety, portability and openness reasons I mentioned, everything is stored as source code (well, ASTs; there's no real reason to have a textual form of source code when it's not explicitly requested). A major goal for the compiler is to be fast enough that code can be compiled "on-the-fly" without noticeable delays. (The Oberon system achieves this.) 04:21:22 So basically, things will be compiled as they're loaded, or speculatively, if the system thinks some code is about to be used. 04:21:29 evincar: Like, Windows or Unix software? 04:21:38 elliott_: http://web.purplefrog.com/~thoth/netpipes/encapsulate.html (I have no idea wtf this does, but it has pretty keywords) 04:21:38 OK. 04:21:55 Gregor: Did you see what I said? It does TCP now. 04:21:58 * Sgeo_ still wants to try Oberon 04:21:59 Sure. Say I want to run Blender, make a 3D model, and if not actually save it, at least make sure that it continues to exist. 04:22:04 Sgeo_: Download the floppy, have fun 04:22:14 evincar: "Say I want to run Blender" <-- this is the first hurdle. 04:22:24 If you want to run existing software, could you use a C compiler or Pascal compiler or LLVM compiler or Haskell compiler or so on that is meant for this system? 04:22:44 evincar: You'll run it under a compatibility layer, which could be as coarsely-grained as a full qemu with an Ubuntu installation, to something that is just an implementation of C and the like, plus a shell, and the various POSIX functions. 04:23:01 evincar: The finer-grained the layer, the more pleasant an experience you're likely to have, but the more work someone else has had to do to make it happen. 04:23:05 zzo38: Yes. 04:23:10 In the case of Haskell, would you use a different type of main than other computers, but have a separate function to convert in case you need to run Haskell program meant for other systems? 04:23:31 Yes, that would be a reasonable approach. I'm not even sure you'd need a main value at all. 04:23:51 OK. 04:24:05 elliott_: Unlike you, I don't read backlog :P 04:24:15 Gregor: I pinged you 04:24:34 Gregor: tl;dr I asked a question about client.py, and then said that I generalised server.py to do TCP, but it might not behave correctly 04:24:45 Ah. 04:24:47 02:08:17: Gregor: client.py has to deal with a Unix domain socket which is rather less predictable, right? 04:24:47 02:12:05: And, heh, my "TCP support" doesn't really maintain one socket it just lets people connect any time they want to it???? yeah 04:24:48 02:12:08: I guess that is okay maybe 04:24:49 Gregor: Thar you go 04:25:15 It basically treats (host,port) ~ path to domain socket. 04:26:09 Hm hm hm. 04:26:18 Yeah, that seems about right. 04:26:23 In fact, yeah, that's exactly right. 04:26:26 I mean, otherwise you'd have to enforce a one-person-per-TCP-socket thing. 04:26:28 Which is just stupid, so yeah. 04:27:24 Upon further investigation, I believe that encapsulate does in fact do everything I want, /except/ for actually creating/opening the sockets, which is kind of obnoxious :P 04:27:34 So, I continue to eagerly await your solution. 04:27:48 Gregor: Well, I just need refreshing on how client.py talks :P 04:27:51 server.py is through stdio 04:28:04 If client.py could be the same that would be nice 04:28:05 Also stdio. 04:28:08 e.g. via socat/nc 04:28:20 Aight then 04:28:21 It's via a tty device, but that's ultimately just stdio. 04:28:29 The tty device is owned by root, right? 04:28:34 So that nobody else can fuck with it :P 04:28:36 Naturalismo. 04:29:04 Gregor: How should it serve the creation of new sockets? Local TCP server? 04:29:46 Hmmmmm 04:29:56 It could use a FIFO too, I guess 04:30:00 Except that has awkwardness about it 04:30:02 Actually, that makes me think ... why do the server and client even need to be different? 04:30:19 Because... the server is on one end of the protocol and the client another? :P 04:30:31 Why does my toaster and my bread have to be different? 04:30:34 [asterisk]do 04:31:08 The server is accepting connections and the client is making connections, but ultimately those are just requests made through the multiplexing connection ... 04:31:23 Yes, but it's implemented with a custom protocol on top of Unix 04:31:51 Hm ... I feel like it would simplify things if they were the same, but ANYWAY, yeah, a local TCP server should be fine. 04:32:13 But the actual things it offers are solely Unix domain sockets, not TCP, yes? 04:32:18 Hmm, TCP might actually be more convenient 04:32:21 I mean, it's one less layer 04:32:59 I guess that makes X a pain, though 04:33:05 Whereas it's easy to turn a domain socket into TCP 04:33:08 Even though that's yet another program 04:33:17 Well, so long as you're implementing both on the host, wouldn't it make sense to implement both on the guest? So TCP can connect to TCP and UNIX to UNIX? 04:33:19 I don't really want to write code that serves domain sockets and TCP generically as either a domain socket or TCP 04:33:36 Gregor: The host doesn't distinguish, so you could even convert >_> 04:33:43 I guess I can do it, it's just that servers are always more of a pain than clients 04:33:48 The guest is a server, the host is a client :P 04:33:49 Sort of :P 04:34:07 But aren't servers for TCP and Unix painful in identical ways after the initial socket() call? 04:34:27 Well, yes :P 04:34:33 It's just STRICTLY MORE lines of server code :P 04:34:37 OK here goes. 04:35:12 Gregor: Hmm, do Unix sockets have a specific way of indicating "disconnection"? 04:35:14 I guess they just act like EOF 04:35:26 Yeah, which is the same as TCP. 04:35:41 Unless you're talking about the protocol, not the API? 04:35:47 API, yeah. 04:36:21 After socket() and bind(), the API is supposed to be the same ... that's, like, the whole point of all the complicated mess that is BSD sockets :P 04:36:31 Though Idonno if that translates into Python (I'd hope so) 04:36:39 Python's socket API is completely low-level. 04:36:47 It hurts only slightly less than BSD sockets because there's no fucking casting and htons and shit. 04:36:52 GOD I hate BSD sockets. 04:38:33 BSD sockets are yummy 04:39:11 I'm trying to figure out what you'd call the order-and-then-later-on-receive-vaguely-edible-junk place in a fast food store, because it's the perfect name for the TCP server socket this thing creates :P 04:39:19 I hope in the future people curse me for creating such a shitty protocol. 04:39:39 Of course, it's called the "wtf". 04:39:52 `addquote I hope in the future people curse me for creating such a shitty protocol. 04:39:56 592) I hope in the future people curse me for creating such a shitty protocol. 04:39:59 Gregor: What's a TCP port 04:40:02 A nice low one 04:40:20 elliott_: How about ... whichever port I ask for at runtime? :P 04:40:25 elliott_: Y'know, anyone can register a TCP port with IANA. 04:40:34 Gregor: Butbutbut... # 4/tcp Unassigned 04:40:45 tcpmux 1/tcp TCP Port Service Multiplexer 04:40:47 P E R F E C T 04:40:52 wtf 04:40:55 OK yeah fine :P 04:41:01 Gregor: what 04:41:16 elliott_: I don't understand why you would want a pre-specified TCP port .... this is the listening port that corresponds to one outgoing connection on the server, right? 04:41:36 This is the port that everything on the guest connects to when it wants to create a scoket. 04:41:38 socket. 04:41:45 !sanetemp 104 04:41:46 313.1 04:41:58 elliott_: ... huh? 04:42:11 elliott_: Why is there such a port? The available sockets should be predetermined. 04:42:21 Gregor: Ohhh, right 04:42:29 Gregor: I forgot that you're a crazy static guy :P 04:42:38 Security, dood :P 04:42:51 Make a very airtight box, then poke the smallest possible holes in it. 04:43:06 This is sooooooooo inelegant :P 04:43:13 That's why I wanted the connection requests to be by index instead of name too ... 04:43:21 *sigh* 04:43:25 oerjan: ? 04:43:26 Lemme fully articulate my thoughts: 04:43:33 Gregor: I do get it :P 04:43:35 I just lapsed thought 04:43:41 Okidoke 04:43:53 elliott_: someone's being funny with !sanetemp 04:43:58 !show sanetemp 04:43:58 sh dc -e "1k?459.67+5*9/p" 04:44:01 oerjan: wat? 04:44:17 if ':' in arg: 04:44:18 start('tcp', n) 04:44:18 else: 04:44:18 start('unix', n) 04:44:24 I Can't Believe They're Not Interned Symbols 04:44:43 !sanetemp 104 04:44:43 313.1 04:44:52 ^ not particularly sane 04:44:54 Gregor: Hmm, I should probably specify the target paths and ports, huh >_> 04:45:15 > 313.1 - 273.15 04:45:16 39.950000000000045 04:45:18 Gregor: So the specification should look like "host:port" or "/foo/bar" for host.py, and "host:port:guestport" or "/foo/bar:/guestpath" for guest.py 04:45:53 elliott_: I don't see why the guest even needs to know what the host's ports are. If they're just by-index, then they just need to be in the same order. 04:46:00 So it'd be guest.py :guestport /guestpath 04:46:16 Gregor: Needs to know whether it's TCP or Unix, but yeah, I was just using the same format before I realised that I need to specify guest port or path :P 04:46:16 So yeah. 04:48:32 * elliott_ looks at Python's select binding 04:48:38 Oh thank god, it's non-terrifying enough to use. 04:49:03 Hmm 04:49:08 How do you accept() from multiple sockets at a time? 04:49:30 ... you accept from one at a time ... 04:49:45 Gregor: But what if someone connects to B while you're sitting around waiting for A? 04:50:07 I'm trying to avoid threads :P 04:50:20 What IF? The connection to B in no way hinders your A ... accept() returns a socket, you keep right on select()ing over it. 04:50:31 Yeeeeeees 04:50:33 But accept() blocks 04:50:41 You have two server sockets A and B with no connections. 04:50:46 You accept() on A. 04:50:46 Oh wait 04:50:50 listen() is the one that blocks lol 04:50:52 Your listen()ing socket will only barf at select() if there's a connection waiting. 04:50:55 s/accept/listen/ in everything I said above 04:51:03 (accept() does block if you didn't wait for listen() :P ) 04:51:22 Gregor: Oh, hmm 04:51:28 I've only used select on already-connected sockets before >_> 04:51:34 So what, I just .listen() it and then select() on it in the ... rlist? 04:51:39 Yup 04:51:47 If you get a poing from it, accept() 04:51:50 Why read and not write, sooo arbitrary :-P 04:52:11 * elliott_ gets the genius idea of having a hash table of "what to do when select poings" indexed by socket. 04:52:14 SUCH A GENIUS 04:52:34 (Because I have both server sockets and connection sockets >_>) 04:55:05 Is an IO monad inside of Template Haskell allowed to have its own command-line parameters? 04:56:03 zzo38: I don't think you're guaranteed as to the behaviour of that at all; as in, the arguments could be anything 04:56:10 Gregor: OK, this is going fairly non-terribly :P 04:56:33 OK. 04:57:00 Gregor: Hmm, er 04:57:14 Gregor: When I'm select()ing, if the clients on the guest start recv()ing from one of my shim sockets, 04:57:25 That'll be reflected only if they're in the "ready to write" fds list of the select() call, right? 04:57:28 So 04:57:29 ready, _, _ = select.select(sockets.keys(), [], []) 04:57:30 is wrong 04:57:45 Yeah, it is 04:57:46 OK 04:58:49 Why even ask me if you're just going to answer your own questions :P 04:59:05 Gregor: Rubber duck :P 05:03:05 Hmm, wait 05:03:11 Never mind 05:06:54 Gregor: OK, I've written client.py. It might even have no parse errors. 05:07:05 No parse errors = works 05:07:10 * elliott_ renames it to guest.py for goodness. 05:07:13 Gregor: Welp, it runs and blocks correctly 05:07:18 Gregor: You wanna try and test this? :-P 05:07:30 Sure. 05:07:43 shar *.py | sprunge 05:07:44 :P 05:07:56 host.py: http://sprunge.us/QeMO; usage: python host.py host:port /path ... 05:08:08 guest.py: http://sprunge.us/TfUj; usage: python guest.py :guestport /guestpath ... 05:08:39 Gregor: Note that any errors during read or write result in guest.py basically just disconnecting the client socket :P 05:08:58 Gregor: Because there's no way to make the client get "the same error" without, like, trying to do the same thing that the socket on the other end did. 05:09:07 Which is left as an exercise to the reader. 05:09:24 That's fine *shrugs* 05:09:40 If these work I will be incredibly surprised :P 05:09:41 -!- olsner has quit (Ping timeout: 260 seconds). 05:10:22 TypeError: getsockaddrarg: AF_INET address must be tuple, not int 05:10:38 Oh 05:10:39 Duh 05:10:59 Gregor: Can I have one two seven point oh point oh point one 05:10:59 thx 05:11:18 I should never get my keyboard fixed, I am so hardcore like this 05:11:38 127.0.0.1 05:12:01 Gregor: guest.py: http://sprunge.us/EPGQ 05:12:13 eight six seven five three oh nine 05:12:39 "There is only one thing which is more unreasonable than the unreasonable effectiveness of mathematics in physics, and this is the unreasonable ineffectiveness of mathematics in biology." 05:14:13 What da heww? 05:14:34 Gregor: What 05:14:36 elliott_: This is perhaps the craziest behavior I've ever seen, anywhere. 05:14:44 Gregor: Oooh 05:14:45 Tell me :D 05:14:50 Is it drawing penises all over the screen? 05:15:00 NihilistDandy: That's a design feature 05:15:22 elliott_: It's ... like it's periodically running xwininfo ... 05:15:23 Gregor: Stop trying to debug my code it's impossible. 05:15:38 Gregor: Um 05:15:40 Gregor: What 05:15:43 NihilistDandy: Praise be to our improbably logical universe! 05:15:46 Gregor: Like what sockets are you using to test 05:15:56 Gregor: Please tell me they're X-related 05:15:58 elliott_: And then it's writing two postscript files, "socket" and "sys" to pwd. 05:16:05 elliott_: Nope, localhost:80 and :8080 05:16:11 ... X-D 05:16:16 Gregor: Which postscript files? 05:16:19 pikhq: Al-jebr be praised! 05:16:28 WTF, they're screenshots 05:16:31 X-DDD 05:16:38 Gregor: I think it's developed sapience and it's attempting to communicate by gluing random services together 05:16:39 This is like fifty levels of not possible. 05:16:55 OHWAIT 05:16:58 When it seems to run xwininfo, try ps 05:16:58 :P 05:17:01 I have to try this shit out 05:17:13 NihilistDandy: In the name of Al-jeber, CALCVLVS, and the scientific method, amen. 05:17:18 Sounds like acid for computers 05:17:25 elliott_: Hyuk, I had put a #! line on my version, then overwrote it with your #!less one. 05:17:27 Gregor: What is it doing because I don't WANT to fix it 05:17:34 Gregor: How... how does that explain anything 05:17:42 Oh 05:17:44 import is a shell command 05:17:45 Apparently "import" is a program that takes a screenshot ... for some reason. 05:17:47 pikhq: Also, fuck biologists. Amen. 05:17:51 Gregor: ImageMagick 05:18:05 NihilistDandy: With pleasure. 05:18:08 Gregor: I just want you to know that this is the best bug EVER :P 05:18:08 :P 05:18:13 elliott_: http://sprunge.us/KRCC 05:18:34 def read_short(): 05:18:35 bytes = sys.stdin.read(2) 05:18:35 return ord(bytes[0]) + (ord(bytes[1]) << 8) 05:18:39 Gregor: Did you EOF it or something 05:18:59 socket_index = read_string() 05:18:59 Herp derp 05:19:03 Gregor: Change string to short on that line 05:19:40 http://sprunge.us/ObCG 05:19:59 Hmm 05:20:20 *confused* 05:20:21 >>> (65535 & 256) 05:20:21 256 05:20:22 Oh durr 05:20:29 Gregor: s/256/255/ 05:20:32 As for the other bug... hmm 05:20:38 Ohh hmm 05:20:40 Hmm 05:20:45 Gregor: Can you print sockets.keys() just above that? 05:21:33 Sure 05:21:52 -!- copumpkin has quit (Quit: Computer has gone to sleep.). 05:22:11 Incidentally, I find the fact that there's no select anywhere in host.py highly disturbing. 05:22:31 Gregor: Why would there be 05:22:35 It only recvs or sends when asked to 05:22:41 -!- olsner has joined. 05:23:12 elliott_: [] 05:23:28 elliott_: Yeah, but it needs to receive and send simultaneously ... 05:23:39 Gregor: Uhh, it does? 05:23:48 elliott_: [] 05:23:48 OHHHH, I didn't understand how it worked at all :P 05:23:50 OK, wtf 05:23:56 print sockets.keys()[0].fileno()? 05:24:05 Gregor: Yeah it's literally a syscall servicer :P 05:24:08 The guest actually proxies the REQUESTS, not just the DATA. Now I gets it. 05:24:15 Hmm, how else would it work 05:24:38 With buffering, which would be terrible :P 05:24:38 Just out of curiosity 05:25:09 (You could just pull in anything ready to read, buffer it up for writing, and write whenever possible) 05:25:19 Right 05:25:23 Moar code :P 05:25:27 But yeah 05:25:27 print sockets.keys()[0].fileno()? 05:25:32 http://www.smbc-comics.com/index.php?db=comics&id=2325#comic somehow resonates with me 05:25:43 * oerjan whistles innocently 05:25:48 elliott_: 3 :P 05:25:52 Gregor: wtf. 05:25:58 oerjan: ps mouse over the red circle 05:26:12 elliott_: Why wtf? That's a fileno 05:26:15 oerjan: also oblig.: http://esolangs.org/wiki/User:Chris_Pressey#Laws_of_Form 05:26:15 Gregor: Yep 05:26:19 Gregor: read_ready, write_ready, _ = select.select(sockets.keys(), sockets.keys(), []) 05:26:19 TypeError: argument must be an int, or have a fileno() method. 05:26:26 This is a straightforward interface to the Unix select() system call. The first three arguments are sequences of ‘waitable objects’: either integers representing file descriptors or objects with a parameterless method named fileno() returning such an integer: 05:26:29 Oh 05:26:32 So what on earth is wrong :P 05:26:45 It's a sequence, the sequence contains one object, said object has a fileno method returning an integer 05:27:28 Hmmmmmmmm 05:27:33 Ohohoh 05:27:34 [, (, ('127.0.0.1', 36796))] 05:27:36 It grew :P 05:27:53 accept(), presumably, gave a tuple 05:28:15 Gregor: Oh 05:28:18 Um 05:28:32 sockets[client] = (lambda: got_data(conn_id, client), lambda: want_data(conn_id, client)) 05:28:36 client is definitely a socket object... 05:28:38 client, _ = sock.accept() 05:28:40 sockets[sock] = (lambda: handle_connection(proto, n, sock), lambda: None) 05:28:40 sock too 05:28:46 Gregor: Yeah... 05:28:50 Is that the wrong way around? 05:28:56 You didn't have that before. 05:29:08 Oh 05:29:08 It was just client = sock.accept() 05:29:09 Duh :P 05:29:16 Does it work NOW? :P 05:29:33 elliott_: damn you now i have to check all the other red circles 05:29:35 sys.stdout.write(chr(n & 256) + chr(n >> 8)) # really? n & 256? You suck at bits 05:29:47 ValueError: chr() arg not in range(256) 05:29:58 I think a problem of the Constantinople esolang is the "replace" and "nand" taking two arguments. You could fix it by requiring the word "with" between the arguments, which also means you don't need the parentheses anymore. 05:30:02 Gregor: Dude 05:30:04 I told you to fix that 05:30:06 Earlier above 05:30:12 Gregor: It's just in two files because lazy >_> 05:30:42 If it works, you can send me the modified version and I'll factor them out into common.py 05:30:46 Whah? I don't see that fix request ... 05:30:54 http://sprunge.us/ObCG 05:30:54 Hmm 05:30:54 *confused* 05:30:54 >>> (65535 & 256) 05:30:54 256 05:30:56 Oh durr 05:30:58 Gregor: s/256/255/ 05:31:33 OK, now rather than crashing, it just doesn't work. 05:31:40 Yay 05:31:57 So it just... 05:32:04 Does nothing? 05:32:05 Connection just hangs. 05:32:10 Geh >_< 05:32:15 It could be like one of a million things :P 05:32:30 Hmm 05:32:32 Gregor: Ctrl+C 05:32:36 It'll tell me what it's hanged on ;-) 05:34:59 -!- Nisstyre has joined. 05:35:21 elliott_: http://sprunge.us/CNOC 05:35:52 Hmm, oh dear 05:36:14 Either the guest and the host have a different idea of the protocol, or (I think this) the host was blocked reading from its connection? 05:36:29 Try it so that the socket the host is given gets written to 05:36:29 As in 05:36:30 Umm 05:36:32 This is so ambiguous 05:36:34 elliott_: Thought: If the guest select()s over its sockets, it will never recv. 05:36:36 Gregor: Make the host's recv call return 05:36:40 Ugh 05:36:43 You're right 05:36:50 I think the buffering strategy is strictly necessary >_> 05:36:55 Gregor: Well, there is one other strategy 05:37:01 Gregor: Threads in guest.py 05:37:19 That too. 05:37:25 Gregor: That's probably worse though 05:37:32 s/too/alternatively/ 05:37:38 Idonno, they're both pretty awful. 05:37:50 Anyway, I'm not sure what this implies. The host would send the data to the guest as soon as it gets read? 05:38:01 Right now, the server only ever responds to queries, which makes things so much simpler. 05:38:31 The thread solution would just involve: one, threads; and two, a mutex of some kind so that writes don't overlap. 05:38:32 This is sort of why I thought they should be the same; they both need to transfer data across the muxing connection as soon as possible for the other end to react properly. 05:39:00 "They" = host and guest 05:39:09 9-D 05:39:14 So what was that thing that does everything but opening the sockets 05:39:27 -!- evincar has quit (Quit: leaving). 05:39:27 Can we have: program is nothing or "replace" argument "with" argument program or "repeat" argument program "end" program or "in" argument program or "out" argument program; and argument is nothing or "head" argument or "tail" argument or "nand" argument "with" argument. It seems this fixed the problem of Constantinople. Is it? 05:39:46 elliott_: http://web.purplefrog.com/~thoth/netpipes/encapsulate.html 05:39:55 elliott_: But I'm still a bit confused by it, I'm not 100% sure that it's useful at all :P 05:40:41 http://www.google.co.uk/search?sourceid=chrome&ie=UTF-8&q=Session+Control+Protocol 05:40:45 This does not seem to be a widely-implemented thing 05:41:00 Also it came out of an HTTP working group, so it's going to be terrible and awful 05:41:15 elliott_: Indeed, encapsulate seems to be the only program that ever implemented it. 05:41:26 Maybe that's a different SCP 05:41:30 Right bastards, convinced that HTTP is the end-all be-all of protocols. 05:41:31 Than the working group one, I mean 05:41:42 Gregor: Didn't HackEgo just allow "full networking" but then firewall it all off? 05:41:45 Wouldn't that work? 05:41:54 elliott_: Nope, same one. 05:42:00 Gregor: Eh? 05:42:06 elliott_: Same SCP 05:42:32 elliott_: Yes, HackEgo just firewalled everything. That won't work because UML's "full networking" options all suck ass. 05:42:42 Gregor: They do? :-P 05:43:21 Hmmmmmm 05:43:38 There's slirp, which is previously-discussed terrible, various things that only communicate between multiple UMLs, and a TUN/TAP-based protocol, which isn't going to work since that's a new host-kernel net device per guest. 05:43:43 Gregor: I'm slightly worried that I'm tempted to say this solution is the wrong way seemingly just because it's become actual work for me 05:43:52 Which is not really good thinking 05:43:56 "various things that only communicate between multiple UMLs" 05:44:01 What if you used another UML with full network access 05:44:27 ... hmmmmm ... I hadn't investigated those options at all because they're so failury ... 05:44:35 It's horrible, but it might be easier. 05:44:39 (The just-multiple-UML-options that is) 05:44:43 Although I fear you'd have to end up doing the multiplexing yourself 05:44:46 Also: "which isn't going to work since that's a new host-kernel net device per guest." 05:44:51 TUN/TAP xreation is hardly expensive is it 05:44:58 creation 05:45:23 Why can't UML do qemu's (horrible) userspace networking emulation? 05:45:55 pikhq: Because it's not UML's, it's qemu's :P 05:46:08 Gregor: The scheme should be general. 05:46:17 If also a royal pain to implement. 05:46:26 The easiest way to get started with UML networking involves nothing special besides adding a switch to the UML command line. 05:46:27 The uml_net helper 05:46:27 First, you need to make sure that the uml_utilities are installed on the host. You'll be needing the uml_net helper from that package. 05:46:27 Configuring an eth0 device 05:46:27 You can either 05:46:29 specify eth0 on the command line: 05:46:31 eth0=tuntap,,,192.168.0.254 05:46:33 Enabling the device is exactly the same as any other Linux machine, except you'll likely do by hand at first for UML: 05:46:37 UML# ifconfig eth0 192.168.0.253 up 05:46:39 * modprobe tun 05:46:40 * ifconfig tap0 192.168.0.252 netmask 255.255.255.255 up 05:46:42 * bash -c echo 1 > /proc/sys/net/ipv4/ip_forward 05:46:44 * route add -host 192.168.0.253 dev tap0 05:46:46 * bash -c echo 1 > /proc/sys/net/ipv4/conf/tap0/proxy_arp 05:46:48 * arp -Ds 192.168.0.253 eth0 pub 05:46:50 Gregor: this does not sound all that difficult 05:46:55 pikhq: Especially so since it's based on slirp. And yet, fail. 05:47:37 Gregor: BTW: I feel like this might be easier with Xen, in the long-run, minus the pain that is Xen 05:47:41 elliott_: It's easy enough to get running, but A) it requires a setuid-root binary, which I find terrible in general even if it works for me now and B) it's one host-kernel tap device per guest, which is just lame. 05:48:18 Gregor: It's also about three hundred lines less work :P 05:48:36 But OK, do you want me to make host.py do the select and buffer thing? 05:48:55 elliott_: Sowait ... doesn't encapsulate do everything we need? :P 05:49:20 (Other than the initial socket()s and bind()s) 05:49:28 Gregor: You implied it didn't 05:49:34 Gregor: It requires a client that supports SCP doesn't it 05:49:45 Yes, namely encapsulate. 05:49:45 australian music is proving to be very introspective 05:49:53 thats our kick over here 05:50:20 Gregor: I don't really understand how it works if it does not create the sockets 05:50:28 It can't just read other processes' fds 05:50:42 elliott_: It gets passed in the FDs from the caller. 05:51:25 server$ faucet 3001 --once --fd3 \ 05:51:25 sh -c 'while ~/src/netpipes4.0/encapsulate --fd 3 -so5i4 \ 05:51:26 sh -c "fname=`cat 0<&4`; echo \$fname; cat < \$fname 1>&5"; \ 05:51:26 do true; done' 05:51:26 client$ hose server 3001 --retry 10 --delay 1 --fd3 \ 05:51:27 sh -c 'while read fname; do \ 05:51:29 ~/src/netpipes4.0/encapsulate --fd 3 -si4o5 \ 05:51:31 sh -c "echo $fname 1>&5; exec 5>&-; cat 0<&4" \ 05:51:33 || break; done' 05:51:35 This guy really likes his programs 05:51:39 (faucet and hose are also fom that :P) 05:52:02 Gregor: Weellllllllllll. Don't we already have 90 percent of what we need already 05:52:17 I mean, effort of figuring out encapsulate + the wrapper required vs. effort of a select() and some buffering 05:52:52 Idonno, you tell me, you're the one writing it right now X-D 05:53:09 Gregor: I was asking how much effort the former would take, 'cuz I'm not doing it 05:53:29 Also netpipes looks very bitrotten: 05:53:29 encapsulate.html 28-Oct-1998 15:39 13K 05:53:35 netpipes-4.2-export...> 30-Jan-1999 12:09 74K 05:53:39 Yowza 05:53:43 That I didn't notice ... 05:53:52 Yeah, should probably continue without it :P 05:53:55 netpipes (As of November 1998, version 4.2 is available) 05:54:03 COPYRIGHT 05:54:03 Copyright (C) 1997-98 Robert Forsman 05:54:03 :P 05:54:25 Gregor: (Says the guy who's favoured networking tool was last updated two to three years before that) 05:54:44 Gregor: OK, can I have guest.py and host.py? :-P 05:55:16 elliott_: What, nc? 05:55:29 pikhq: Yes. 05:55:34 :) 05:55:45 elliott_: curl http://sprunge.us/PWAL | sh 05:56:06 X_X 05:56:10 :P 05:56:45 OK, here goes shit >_< 05:57:09 sys.stderr.write(str(sockets.keys()) + "\n") 05:57:11 Gregor: Y'can remove that now :P 05:57:18 Wait, how did we fix that 05:57:20 Oh right 05:57:21 I remember now 05:57:26 BTW, that flush is redundant 05:57:29 And the whole thing could be a print :P 05:58:09 !python filter(None, [9,None,0]) 05:58:13 !python print filter(None, [9,None,0]) 05:58:14 ​[9] 05:58:18 Oh god dammit 05:58:18 I don't know how to print() to stderr 05:58:22 Good enough 05:58:26 Gregor: print >>sys.stderr, ... 05:58:32 And now I doooooo! 05:58:42 Python 2.x? 05:58:50 Sgeo_: Yes, aka the version everyone uses. 05:59:21 is it better 05:59:23 Gregor: You're right in that the guest and host will look very similar after this... 06:00:01 Sooo ... mux.py :) 06:00:11 Gregor: Well, I'll do host.py first, and then see :P 06:00:23 Or mudem.py! 06:01:58 Cows go mudem 06:04:48 Gregor: OK, this is sort of working out >_> 06:06:22 elliott_: so 06:06:28 hows life with the riots ey 06:06:42 augur: i live in a small rural town 06:06:58 oh? 06:07:06 so, the answer is exactly as normal :P 06:07:51 Gregor: Hmm, how do disconnections show in select()? 06:07:55 As a read or as an ~exceptional condition~ 06:08:03 I don't recall 06:08:15 Ugh >_> 06:08:37 I seem to recall, however, never ever using the exceptional conditions buffer ... 06:09:03 Fair enough, then 06:09:26 Actually it shouldn't matter (much) 06:09:39 I love how my Python style involves NO OBJECTS EVER 06:09:44 Time to add another global hashtable 06:09:57 This can be cleaned up when it works >_> 06:10:11 Gregor: Happily, the same protocol can be maintained 06:10:16 The host just does weird shit to maintain it 06:16:10 Gregor: OK. 06:16:13 I _think_ it might work. 06:16:18 I've tested it none, but hey. 06:16:38 Gregor: http://sprunge.us/CUiE 06:16:46 Dammit it's revealed my secret codename. 06:18:44 I would recommend actually importing sys if you intend to use it. 06:18:59 Gregor: Erm 06:19:04 Gregor: It gets imported from host and guest, luckily 06:19:09 But yes good idea 06:20:01 elliott_: It needs to be imported in common to run at all. 06:20:07 Python doesn't muddy namespaces like that. 06:20:22 Anyway, I'm back to the eternal nonfunctional wait. 06:20:28 Yer kidding me 06:20:36 It uses select, that shouldn't happen :( 06:20:42 http://sprunge.us/IagV 06:20:45 If I wasn't too scared of how horrific the Python debugger was... 06:20:50 Is, presumably is, whatever. 06:20:52 Wait, is elliott_ facing the same problem I was once? 06:21:00 Gregor: What did you actually change 06:21:02 Sgeo_: What problem 06:21:15 Globally accessible variable from multiple modules 06:21:19 No 06:21:20 elliott_: import sys, global next_id in host.py:cmd_connect 06:21:25 Gregor: Also, mux <<<<<<<<<<<<<<<<<<<<<<<< proxy-motown 06:21:36 Gregor: Latter is unneeded 06:21:40 Because += is not the same as = + 06:21:41 As in 06:21:44 next_id += 9 06:21:46 works 06:21:46 but 06:21:48 next_id = next_id + 9 06:21:50 wouldn't 06:21:57 This is because Python 06:22:16 elliott_: This was not a "I'mma just write some shit" change, this was a "does not run" change. 06:22:24 Hmm 06:22:25 elliott_: next_id += 1 forced next_id to be a local. 06:22:27 Then Python changed :P 06:22:33 Python's scoping rules are as bad as you can possibly imagine. 06:22:35 God I hate Python, but yeah OK. 06:22:41 Gregor: Yes but I thought += operated on the object 06:22:44 Which made it work 06:22:46 They make PHP's scoping rules look brilliant. 06:24:06 Gregor: So, OK, um. 06:24:12 Gregor: You need to pause the program and print out some variables for me :-P 06:24:14 Actually hmm 06:24:16 If you pass -i to python 06:24:21 Then Ctrl+C drops you at a REPL with all the variables 06:24:22 elliott_: Why don't you run it :P 06:24:23 So you actually can do that 06:24:29 Gregor: Because I have no socket servers to do it on >_> 06:24:43 I'm just using dpipe and TCP. 06:24:56 Never heard of dpipe 06:24:59 Oh, something from that vde thing 06:25:05 I guess netcat would work 06:25:07 elliott_: It's totally non-vde-related. 06:25:17 elliott_: It's just a bidirectional pipe. 06:25:25 Right. 06:25:30 elliott_: Also, going interactive when your stdin and stdout are crazy protocol isn't useful :P 06:25:42 Yes it is, because Ctrl+C stops the program 06:25:45 Oh, I see 06:25:47 Right :P 06:25:48 Sucks 06:25:49 But now, I must go to sleep. 06:26:21 Gregor: Um wait 06:26:25 Gregor: You did tie the ends together, right? 06:26:32 Like, you did pipe guest.py and host.py properly :P 06:26:38 -!- GreaseMonkey has quit (Ping timeout: 258 seconds). 06:36:03 -!- pikhq_ has joined. 06:36:10 -!- pikhq has quit (Ping timeout: 252 seconds). 06:44:01 -!- derrik has joined. 06:53:34 -!- NihilistDandy has quit (Remote host closed the connection). 06:53:53 -!- NihilistDandy has joined. 06:56:35 -!- derrik has left. 06:57:39 pikhq_: NihilistDandy: HAHAHAHAHA I AM TAKING YOUR BELOVED HASKELL HOSTAGE 06:57:46 WHEN I AM THROUGH WITH IT YOU WON'T HAVE ANY IDEA WHAT IT USED TO BE 06:58:02 I SHALL STRIKE INTROSPECTION THROUGH THE HEART OF THE THING!!!!!!!!!!!!!!!!!!!!!!! 06:58:14 elliott_: ÞOU SHALT DIE I SHALL MAKE SURE OF ÞY DEAÞ. 06:58:26 FOR ÞE ÞORN DEMANDEÞ IT 06:59:37 HAHAHAHAHAHAHA YOU WON'T BE SAYING THAT WHEN YOU CAN BRING UP ANY OBJECT IN THE SYSTEM AND VIEW ALL ITS FIELDS AND MODIFY THEM FROM WITHIN ELLIOTTCRAFT 07:00:04 (YES THIS IS ACTUALLY USEFUL IT'S BASICALLY AN OBVIOUS EXTENSION OF THE GENERIC SERIALISATION MECHANISM + THE FACT THAT I NEED TO PRESENT MODIFIABLE DATA STRUCTURES AS FORMS, ANYWAY) 07:00:04 ... 07:00:16 You frighten me sometimes. 07:00:20 (BASICALLY IT'S AS EASY AS WRITING A GENERIC FORM TO DISPLAY "A RECORD, ANY RECORD") 07:01:11 pikhq_: OK but seriously it will be SO GOOD you have no idea. 07:01:21 I don't even need another typeclass to do the basic thing. 07:01:33 I can get a lens out of anything with a Data instance given a constructor and an index. 07:01:48 I can convert the field name "playerName" into "Player name" trivially. 07:01:58 From that it's a simple matter of presenting it. 07:02:18 I do need one extra type class, so that you can specify overridden names, like "worldDir" should be "World directory", not "World dir". 07:02:31 And also so that you can specify how fields should be displayed -- i.e. what form component should be used to display them. 07:02:46 For instance, the most appropriate control for the volume field is a slider. 07:02:51 That doesn't mean you've stopped frightening me. 07:02:51 But for another it might be a text field. 07:03:06 It just means you don't also make me murderous. 07:03:49 pikhq_: Let's put it this way: If I don't write this code, I write an entirely new heap of GUI controls for every single form in the game. 07:04:12 And if I do write it, I also get debugging inspection of any object at all automatically. 07:04:15 Which will be useful. 07:05:01 elliott_: I should note that Oleg also frightens me. 07:05:49 This does not mean I *dislike* the things he has made. 07:07:24 pikhq_: Anyway, my pain is already going to be quite fun, because I want GUI-ish widgets, obviously, for things like the chat box, configuration pages, blah blah blah. Now, I can't use GTK, one because of portability (it sucks on Windows and OS X) and two because... well, look, popping up normal-looking GUI widgets all over your game window looks horrible, no matter how "right" it may be. The same applies to any other generic UI toolkit, apart from may 07:07:24 be Qt. Now, I know Qt can be "skinned" in a way that makes it integrate perfectly with a game's look because Hedgewars does it. Unfortunately, one: Qt sucks; two: I don't like Qt; three: I don't think there's any decent Haskell binding to Qt. Besides, a lot of GUI toolkits are ruled out anyway because they won't interact properly with OpenGL. 07:07:38 pikhq_: So, basically... I get to code my own GUI widgets. From scratch. Using OpenGL. 07:08:28 Would it make you feel better to know that the Qt scheming mechanism is CSS? 07:08:50 I think I knew that, but yeah. Not sure I did. 07:08:54 (probably not, because you're not going to want to use Qt, anyways) 07:08:59 pikhq_: Still, there doesn't even appear to be a Qt binding on Hackage. 07:09:07 The wiki just points to http://qthaskell.berlios.de/ which doesn't inspire confidence. 07:09:16 pikhq_: Qt is obviously not so much fun to bind because Haskell can't bind directly to C++. 07:09:17 Understandable. The impedence mismatch is huge. 07:09:25 qtHaskell User Guide 07:09:25 David Harley 07:09:25 Copyright © 2010 David Harley 07:09:25 Well, OK, it could be worse. 07:09:37 Could be Qt 2. 07:09:45 Or 1. Mmmm, nonfree. 07:09:46 In two thousand and ten? 07:09:58 No, I'm saying that in response to "could be worse". 07:10:01 Ah :P 07:10:04 http://qthaskell.berlios.de/doc/apiGuide/index.html ;; Meeeeeeeeh 07:10:12 I'm quite happy writing my own widgets really 07:10:15 Only a complete, insane *moron* would deal with Qt 1 or 2 in 2010. 07:10:23 Why should you have to deal with Qt suckage when playing the perfect game ;-) 07:10:35 ... That API. 07:10:38 *hurl* 07:10:43 It's a fair low-level binding 07:10:49 No kidding. 07:10:51 But, well, it's a low level binding. 07:10:57 Wait, waht the fuck, why is it using typeclasses everywhere 07:11:01 Eh, I don't even want to know 07:11:03 Oh, for C++ overloading 07:11:14 pikhq_: It amused me that right-clicking a text input field in Hedgewars popped up a "regular" menu, but styled with its vaguely cartoony look. 07:11:34 pikhq_: So it was offering me input methods and Unicode control character insertion inside a cartoony game interface. 07:11:59 bsnes did an April Fool's release doing something similar. To imitate zsnes's UI 07:12:12 (y'know, the UI designed for direct VGA access from DOS?) 07:12:14 I remember that 07:12:35 Shame it didn't get the pointless snow covered. 07:12:47 ZSNES has snow? 07:12:50 Best emulator. 07:13:03 i have zsnes 07:13:09 itidus20: You don't want it. 07:13:15 -!- pikhq has joined. 07:13:17 Get Snes9x :-P 07:13:25 hmm 07:13:28 (Or bsnes, but I doubt you have the computer for that) 07:13:36 lol 07:14:05 pikhq_: Hmm, there's a slight problem with designing my own controls, in one area: I can't support X compose and the like. 07:14:15 i have always stuck with zsnes 07:14:28 As in, the input method will just be... whatever I code, which is unlikely to make you happy if you type in anything that isn't English, because I'm not gonna bundle my own alt gr table or whatever. 07:14:30 so, snes9x is the way to go? 07:14:44 itidus20: ZSNES is a very inaccurate emulator, and basically piles upon dozens of hacks to make any game work 07:14:50 It emulates even many popular games incorrectly 07:14:59 but that gives it speed? 07:15:10 Snes9x is much better, it's not written in unportable assembly for one :P, and it's fast enough to run on anything ZSNES will nowadays. 07:15:10 Yes, in the same way that Windows 3.1 is fast. 07:15:33 Then I would suppose homebrew games are going to work even more incorrectly 07:15:34 Snes9x still has a bunch of hacks, but the only thing that doesn't is bsnes, which has basically completely accurate SNES emulation; you need a beefier CPU though 07:15:38 In pretty much *exactly* the same way, in fact: ZSNES is a DOS-era program that got ported. 07:15:44 zzo38: Sadly, many homebrew games _only_ work on ZSNES. 07:15:52 zzo38: Because people test them on ZSNES rather than the real console, because it's much more convenient. 07:15:58 i don't have philosophical dilemmas about whether the opcodes of a rom are being emulated in a uniform way 07:15:59 So they end up relying on ZSNES' many emulation bugs. 07:16:09 itidus20: You don't care if your game runs wrongly? 07:16:18 elliott_: bsnes works just fine on my not-that-beefy system, though. 07:16:22 if it has hacks in placeto make it work 07:16:26 then i don't mind 07:16:27 itidus20: It isn't perfect. 07:16:30 Not by any means. 07:16:34 ZSNES has noticeable emulation bugs in many popular games. 07:16:42 Anyway, Snes9x has a much nicer interface too, so you'll be doing yourself a favour. 07:16:50 -!- pikhq_ has quit (Ping timeout: 240 seconds). 07:16:56 (BTW, ZSNES isn't actively developed any more.) 07:17:07 Last commit was, what, 2003? 07:17:10 (Well, OK, they say it is, but it hasn't released for four years and development is private.) 07:17:18 pikhq: Release in 2007 apparently, says Wikipedia 07:17:19 s/Last/Last public/ 07:17:21 which noticeable emulation bugs? i won't argue their signifigance.. but i am curious 07:17:29 itidus20: Too numerous to list, unfortunately 07:17:47 itidus20: http://byuu.org/bsnes/images/accuracy/harukanaru-incorrect.png 07:17:50 itidus20: You can see some of the ntoiceable effects in this article: 07:17:52 http://arstechnica.com/gaming/news/2011/08/accuracy-takes-power-one-mans-3ghz-quest-to-build-a-perfect-snes-emulator.ars 07:18:01 (written by the bsnes author, with a bunch of screenshots) 07:18:19 -!- Taneb has joined. 07:18:26 pikhq: that is a pretty awful emulation in that screenshot 07:18:32 Morning! 07:18:40 it did get the word Player right though 07:19:11 Taneb: you might want to check the logs for zzo38's Constantinople comments 07:19:17 oerjan: he put them on the wiki 07:19:19 what exactly makes snes so hard to emulate? 07:19:21 pikhq: But yeah, any ideas what to do with Unicode in my text input? 07:19:21 oh 07:19:22 ok 07:19:34 itidus20: Basically, the hardware has very precise timing. 07:19:38 ahhhh 07:19:41 itidus20: You can't even synchronise everything at the instruction level. 07:19:49 You have to synchronise all the many different parts of it at the cycle level. 07:19:58 itidus20: Additionally, the SNES has tons of processors to emulate. 07:20:05 itidus20: Oh, and cartridges can literally include their own CPUs. 07:20:21 Yes, many, many popular games had their _own specialised processors_ on the cart. 07:20:23 when i was growing up... i wanted a snes more than i wanted a girlfriend 07:20:30 itidus20: this is normal 07:20:40 Some of them had a *better* processor than the SNES. 07:20:45 i mean.. i wanted it _BAD_ 07:20:54 (SuperFX) 07:20:57 pikhq: But yeah, any ideas what to do with Unicode in my text input? 07:21:03 i knew that this fucking device was going to be the best thing to ever happen 07:21:10 and as time has told us.. it pretty much was 07:21:13 hell, even now, I consider a companion to be "something nice that I'd wouldn't mind having" 07:21:48 elliott_: Uh, convert (lossily) to CP437? 07:21:55 elliott_: :P 07:22:05 pikhq: I can handle Unicode just fine, I'm just saying that all keypresses come in raw 07:22:13 Only processed to make the scancodes portable :P 07:22:13 I still prefer NES anyways, rather than SNES; not only the games (which include both homebrew games and offical games) but also the way the system works 07:22:14 i can't describe the sheer desire i had for a SNES 07:22:16 Yeah, I dunno. 07:22:28 pikhq: So alt gr won't work, compose won't work... I dunno how to let people input Unicode without making it a huge pain for me or bad for them 07:22:34 like that nintendo 64 kid 07:22:40 except i was older and i had no excuses 07:22:51 elliott_: Sounds utterly non-trivial with the current stack. 07:23:29 elliott_: Would be easy in not-too-long. All the keyboard handling is getting factored out into a library in the name of Wayland. 07:23:34 pikhq: I suppose I could parse XCompose files... but then most people don't use compose either, they use their locale-specific keyboard layout... which I suppose _will_ work here, because I think the keyboard layout is taken into account 07:23:37 It should be because I get a Char 07:23:46 But anything that involves pressing multiple keys together... nope 07:25:19 pikhq: Oh well, I can't possibly do worse than Minecraft does Unicode 07:25:32 "Doesn't"? 07:26:04 pikhq: Well, it supports SEVERAL characters that also feature in Unicode! 07:26:17 so is there a dynamic recompiling snes emulator? 07:26:22 Swedes, Finns and Norwegians may even find that their ENTIRE ALPHABET is available! 07:26:37 itidus20: The overhead required to synchronise everything would make that slower than the emulation approach 07:26:43 elliott_: Actually, only an approximation. 07:27:45 how complex could it be though... does the SNES have anything that could resemble an abstract machine? 07:27:46 elliott_: CP437 lacks Ø and ø. 07:28:07 pikhq: Woot :P 07:28:22 itidus20: It could be very complex, since there are multiple processors doing their job at once, with different clock rates, that are all communicating. 07:28:27 And one of them is analogue. 07:28:30 its basically about character blocks, sprites, rotations, controller input, calculations, and sound 07:28:33 No, no it isn't. 07:28:43 pikhq: How long has bsnes been in development? 07:28:48 Ah, seven years. 07:29:14 itidus20: If you want to learn what the SNES is "basically about", i.e. the abstract machine behind it, here's the product of seven years of research: http://bsnes.googlecode.com/files/bsnes_v081-source.tar.bz2 07:29:34 itidus20: It's written for humans rather than for speed, so you should be able to discern all details of the abstract machine underlying the SNES from it. 07:29:37 It'd probably take much less time to implement from scratch, though: much of that time was *obscene* amounts of research into the behavior of the system. 07:29:44 itidus20: Note: This may be a much more difficult task than you anticipate. 07:29:55 bsnes/snes/ is the directory you want. 07:30:07 You'll note that it contains a Gameboy emulator by necessity. 07:30:29 i .. find the term i used abstract machine to be quite ugly now seeing it turned back on me 07:30:30 wha 07:31:03 coppro: One of the CPUs placed on a cartridge was a Gameboy. 07:31:17 i had a super gameboy 07:31:28 i was dissapointed when i discovered it wasn't portable though 07:31:28 pikhq: OK, now I really want to fashion some kind of cartridge output onto the playstation two. 07:31:51 Maybe it'll crush your SNES if you plug it in vertically, but bsnes would be FORCED to include a full cycle-accurate emulator!!!!!! 07:31:56 I wrote a Constantinople compiler completely except for the parser. Once the parser is written then it will be complete. 07:32:04 it seemed obvious to me that the super gameboy would be handheld and also plug into the snes for a tv play.. but twas not to be the case 07:32:11 Yay! 07:32:28 I've made the change to the spec yoou suggested 07:32:32 i.e. the withs 07:32:42 Yes I saw that. Thank you 07:33:23 I think constantinople manages to be human readable while still being really hard to work out what's going on 07:33:27 pikhq: I somehow feel that Elliottcraft is going to take an awful lot of infrastructure. 07:37:15 pikhq: brilliant 07:37:26 also holy crap I might still win this BN dynasty 07:39:09 is blognomic any less boring than the last time 07:39:39 when is "last time"? 07:39:51 any other time in history 07:41:11 pikhq: The main problem with this generic introspection infrastructure is that I'm not sure how to structure the additional class I need without it being redundant with things already offered by Data. :/ 07:41:48 ...and that also isn't really brittle when you change the record but forget to change the instance. 07:42:14 elliott_: subclass actual Data? 07:43:01 oerjan: well yes, but the point is that I can't find a way to structure the needed typeclass _member_ in such a way that you can't accidentally fill it in and give inconsistent information to Data 07:43:11 elliott_: then no 07:43:11 as in, I can't find out a way to guarantee that Data and this class don't contradict each other 07:43:42 hm 07:43:53 elliott_: although this time it has relatively good gameplay, a defined victory condition, and several people all within reasonable distance of the end 07:44:37 coppro: but does it still have that essential boringness 07:45:06 oerjan: hmm, I suppose I could just have "fieldInfo :: String -> Maybe (String,FormComponentLol)" 07:45:09 where the string is the human name 07:45:17 that's kind of gross though since what it really is meant to be is 07:45:29 fieldInfo :: FieldName a -> (String,FormComponentLol) 07:45:31 with the clause 07:45:40 fieldInfo a = (humanify a, defaultformcomponentforitstype) 07:45:41 at the end 07:45:46 but you can't.... 07:45:47 do that 07:46:36 elliott_: you'd have to decide that yourself 07:46:48 coppro: so yes then :P 07:47:04 elliott_: If I'd said no, would you have believed me? 07:47:15 coppro: maybe enough to load blognomic.com 07:50:49 If it has a well-defined win condition, but does it have a well-defined end condition? Go has a well-defined win condition but not a well-defined end condition. 07:51:51 nomics frequently end when there is a win 07:52:27 either that, or they never end 07:52:45 unless there's a total collapse 07:53:22 This is what I have of the Constantinople compiler so far, it consists of two files: Constantinople.lhs = http://sprunge.us/NQQV Main.hs = http://sprunge.us/FKYe 07:54:00 i have this vague recall that agora shifted at one time from saying that a new game started when someone won, to saying that the game just goes on indefinitely 07:54:47 oerjan: Yes. 07:55:31 oerjan: 07:55:31 Rule 104/0 (Power=3) 07:55:31 First Speaker 07:55:31 The Speaker for the first game shall be Michael Norrish. 07:55:31 [CFJ 1534 (called 8 March 2005): This does not mean that Michael 07:55:31 Norrish necessarily fills the position of Speaker at the present 07:55:33 time.] 07:55:35 [CFJ 2154: (called 8 September 2008) The Speaker for the first game 07:55:36 (This program does work I have tested it.) 07:55:37 shall be Michael Norrish.] 07:55:39 History: 07:55:41 Initial Immutable Rule 104, Jun. 30 1993 07:55:43 Mutated from MI=Unanimity to MI=3 by Proposal 1482, Mar. 15 1995 07:55:49 oerjan: The only unchanged rule in Agora, 104/0, from the current ruleset. 07:56:09 heh 07:56:33 Taneb: Can you look at my program tell me if it follows what you are thinking of? 07:56:40 That rule's last change is of adult age in many parts of the world. 07:57:11 Let's declare it a player. 07:57:34 pikhq: Agora's an autonomous person as of shortly after its eighteenth birthday 07:57:42 It is ostensibly going to try and play BlogNomic at some point 07:59:05 Sooo... Elliottcraft main non-game todo list: Implement generic introspection and modification system for objects. Implement generic serialisation mechanism on top. Implement FRP-based GUI toolkit using OpenGL through GPipe. 07:59:54 elliott_: No, just that rule. 08:00:10 pikhq: Well... there's precedent... 08:02:09 Tell me if I did anything messy because I am not very good at Haskell and maybe some things I could have done in better way. I know the patterns of w_tail is not exhaustive but the specification of Constantinople doesn't say anything about that. 08:02:55 elliott_: is the main problem with emulation really sound? i imagine that being that graphics are fixed at a framerate it's much easier to handle them 08:02:57 zzo38: you don't need the ; at the end of every line 08:03:01 it's unidiomatic 08:03:22 itidus20: The main problem is everything. 08:03:42 Though, amusingly, the sound is one of the *easier* bits to emulate. 08:03:44 itidus20: Sound is a major problem because of the latency guarantees and the fact that it's partly analogue on the SNES. But... the main problem is synchronisation, and emulation at the cycle level. 08:03:53 Wait, you make compilers for people if they just ask you? 08:04:04 Doesn't look like a compiler to me. 08:04:09 elliott_: It is not at the end of every line. Although the reason is I use nonlayout style so I put ; at the end of every line. 08:04:10 Oh sorry, interpreter 08:04:18 zzo38: Why non-layout 08:04:33 in other words.. i simply cannot imagine that you need a 3ghz pc to produce a 640x480 frame in 2d at 60fps 08:04:36 Everything you have there would work identically if you removed the two {}s and the semicolons 08:04:52 itidus20: It isn't just displaying frames 08:04:53 i know its not 640x480.. i don't know what it is though 08:04:54 elliott_: It is a compiler. It is just incomplete because the parser is not written yet. And then you can ghc Main.hs < ConstantinopleProgramCode and it compile into the executable file. 08:05:03 itidus20: It's emulating many, many systems 08:05:09 I just prefer nonlayout. 08:05:10 zzo38: Oh, okay. 08:05:28 zzo38: Well, you don't have to use layout just because it's enabled. 08:05:38 The only affect it'd have would be to let you elide the semicolons. 08:05:38 hummmmmmmmmmmmm............. ok 08:06:06 I find nonlayout clearer actually... 08:06:20 Well, OK. It's not very idiomatic, though. 08:07:18 Is there anything else wrong other than the semicolons? 08:07:31 Not that I can see. 08:07:38 elliott_: you also forgot that Agora is actively playing itself 08:07:47 coppro: It is? 08:07:54 I know I don't need "deriving Show" for Memory but I put it there for debugging purpose. I can remove it when it is finished. 08:07:58 zzo38: Although another unidiomatic thing is using _s as a suffix 08:07:58 elliott_: yes 08:08:21 elliott_: well, it's amazing how difficult emulation proves to be... it's counter-intuitive 08:08:26 (Generally camelCase is preferred to separate words, but under_scores aren't unheard of; but as a suffix it's very unidiomatic, especially as it can be confusing (f'_ looks like the function f' with the pattern _ to me)) 08:08:46 elliott_: someone made a rule saying that agreements intending to be persons are persons. Then someone made a rule saying that Agora intends to be a person. Then someone proposed that Agora register IIRC 08:08:57 O, OK, I didn't know that. I put the _ suffix to prefer conflict with reserved words and imported words. 08:09:00 coppro: Fair enough 08:09:07 s/prefer/avoid/ 08:09:16 (on the basis that Agora is effectively an agreement to play by its rules) 08:09:31 What can you suggest I change it to? 08:10:06 zzo38: Well, "out" isn't in any of those packages AFAIK and it isn't a keyword... but I'd just try to rename them, mostly. I'm not sure what repeat_/repeat'_ do, so I can't really offer advice 08:10:20 You should probably use where clauses for your foo' functions, though 08:10:38 The repeat_ does the "repeat" command of Constantinople. 08:11:07 Ah 08:11:11 OK how should I use where clauses? I don't know much about where clauses 08:11:14 I'd prefix every command, say cmd_repeat 08:11:22 OK. Thanks 08:11:39 zzo38: where clauses look like this: 08:11:41 grr stupid metroid prime game 08:11:41 foo :: a -> b -> c 08:11:41 foo = foo' 0 08:11:41 where foo' 0 a b c = ... 08:11:41 foo' n a b c = ... 08:11:45 and stupid achievements 08:11:48 Presumably add a bunch of {}s and ;s for ugly non-layout :P 08:11:48 achievements suck 08:11:51 why am I a perfectionist 08:12:32 zzo38: Basically, foo' there is restricted to the scope of foo's body 08:12:44 elliott_: this reminds me of what carmack was saying about optimization. that optimized code becomes brittle and fragile. and as we can see snes software is so tightly bound to the snes hardware configuration that it can even strain a 3ghz cpu to replicate it. amazing 08:12:44 It helps you show that certain definitions are only used in the body of foo 08:13:09 Yes I can see it is not used anywhere else, things like "foo'" used only in the definition of "foo" 08:13:18 itidus20: Yes; later hardware like the Nintendo 64 had a much more well-defined and concrete API, so it is simpler to emulate; one can simply emulate the API, rather than every single piece of hardware at the lowest level. 08:13:32 ironic :D 08:13:35 -!- Taneb has quit (Remote host closed the connection). 08:13:52 ironic in that their own API left them vulnerable to emulation 08:14:24 "Vulnerable" seems the wrong word 08:14:57 OK, I can try to use where clauses 08:15:57 perhaps the trick to avoiding piracy is making something impossible to emulate 08:16:19 no, there is no way 08:16:33 you can't avoid piracy 08:16:50 except by having a peripheral that' svery expensive, so you have to buy that or not enjoy the game 08:17:05 think that mech game with the console of 30 different buttons (steel battalion?) 08:17:10 Making it impossible to emulate probably won't help a lot, it just makes it more difficult to write software for instead 08:17:32 suppose that you made a powerful hardware configration even more convoluted than the SNES... and wrote games for it in a way that it depended heavily on the hardware 08:18:00 Sega Saturn 08:18:03 well i suppose piracy would still happen 08:18:04 Actually has anyone bothered to emulate that yet 08:18:07 OK, I made it use where clauses now. 08:18:09 (no because it was a failure) 08:18:15 And I renamed them to use cmd_ prefix instead of _ suffix 08:18:40 piracy would still happen because then the console itself becomes the weak point 08:18:53 once you have the console you can copy all of the softwares 08:19:10 PatashuWarg: yes 08:19:21 PatashuWarg: things much more esoteric have been emulated 08:19:26 ever heard of a WonderSwan/ 08:19:32 No? Good. Neither have I. 08:19:35 is that like a neogeo? 08:19:46 wonderswan was a competitor to the gameboy 08:19:48 where's my n-gage emulator 08:20:05 it was made by the same guy who designed the gameboy 08:20:29 :t gmapQi 08:20:30 forall u a. (Data a) => Int -> (forall d. (Data d) => d -> u) -> a -> u 08:20:50 What you have to do to avoid piracy is to make one arcade where you can play the game only there, you cannot get a copy of the software or go elsewhere to play game. However it makes it you will not get paid as much. With more piracy possible it actually means you can potentially get paid more, regardless of the actual amount of piracy. 08:21:39 your site's navigation fails when: I can find the page I want faster with Google 08:21:46 and another problem with rigid privacy prevention systems is that it prevents people who really can't afford it from playing your works 08:22:10 Yes; which also means they cannot recommend it to someone who is able to pay for it. 08:22:40 coppro: that's probably true of almost every site design 08:23:04 where's my n-gage emulatort 08:23:07 whoops 08:23:11 no but seriously. where is it 08:23:19 I don't know 08:23:37 the n-gage threads on gamefaqs were hilarious 08:23:38 good times 08:23:41 zzo38: but it makes a good excuse for sueing people and raising prices 08:24:00 pikhq: So, your package manager. 08:24:29 elliott_: that it is faster to navigate by google? 08:24:34 coppro: Yes. 08:24:55 elliott_: I suppose, but some try harder than others 08:25:26 coppro: Perhaps site headers should just include a big fat "search with google" box and then a link to a sitemap. :p 08:25:40 -!- Taneb has joined. 08:26:50 k, I'm pause-scumming this 08:32:19 I will sleep today and will try to figure out how to write the parser tomorrow. 08:32:36 Okay 08:33:03 -!- zzo38 has quit (Quit: (In addition, remember Dangelo project if anyone has more ideas about it or responses to what I have added to its wiki)). 08:58:19 -!- CakeProphet has quit (Read error: Connection reset by peer). 08:59:33 -!- CakeProphet has joined. 09:04:01 -!- sebbu2 has joined. 09:04:01 -!- sebbu2 has quit (Changing host). 09:04:01 -!- sebbu2 has joined. 09:05:26 -!- sebbu has quit (Ping timeout: 264 seconds). 09:05:26 -!- sebbu2 has changed nick to sebbu. 09:05:38 -!- BeholdMyGlory has joined. 09:07:26 -!- Sgeo_ has quit (Read error: Connection reset by peer). 09:08:08 -!- Sgeo_ has joined. 09:09:39 instance Fields Config where 09:09:39 data Field Config t where 09:09:39 F_Config_Volume :: Field Config Int 09:09:39 F_Config_PlayerName :: Field Config String 09:09:39 F_Config_WorldDir :: Field Config FilePath 09:09:40 fields Config{} = [F_Config_Volume, F_Config_PlayerName, F_Config_WorldDir] 09:09:42 fieldInfo F_Config_Volume = FieldInfo "Volume" volume 09:09:44 fieldInfo F_Config_PlayerName = FieldInfo "Player name" playerName 09:09:46 fieldInfo F_Config_WorldDir = FieldInfo "World directory" worldDir 09:09:48 pikhq: BEHOLD MY UGLY. 09:15:44 ewwwwwwwwwwwwwwwww 09:17:07 -!- augur_ has joined. 09:17:18 -!- Phantom_Hoover has joined. 09:17:23 coppro: To be fair, the underscores were only because I expect this to be generated, so I'm basically mimicking a computer by being as mechanical as possible. 09:17:31 The actual API is fairly elegant. 09:18:05 elliott_: you expect me to treat you seriously after you whipped your ugly out in public like that? 09:18:15 -!- augur has quit (Read error: Connection reset by peer). 09:18:33 coppro: It's a free country. 09:19:28 elliott_: that's what they want you to think 09:41:29 :t find 09:41:30 forall a. (a -> Bool) -> [a] -> Maybe a 09:41:38 -!- augur_ has changed nick to augur. 09:41:45 -!- FireFly has joined. 09:41:49 :t findBy 09:41:50 Not in scope: `findBy' 09:41:52 grr 09:41:54 ?hoogle findBy 09:41:55 No results found 09:42:10 findBy? 09:42:11 erm find is already "By" 09:42:17 oh right 09:42:18 im dumb 09:44:08 woot finally 10:05:56 pikhq: Out of interest, have you ever used SIGPOLL? 10:06:25 Oh, hmm, it seems like aio.h is the new thing. 10:06:27 (Does musl have that?) 10:08:32 -!- nooga has joined. 10:09:44 Seems not. 10:10:01 Oh, hmm, it's in -lrt. 10:14:32 pikhq: Ello. 10:15:58 I vaguely recall that glibc's librt aio_blah implementations do a (mostly) POSIX implementation of aio in userspace (presumably with threads), instead of using the kernel's "native" asynchronous IO interfaces. But maybe that's been improved. 10:17:36 http://www.kernel.org/doc/man-pages/online/pages/man7/aio.7.html "The current Linux POSIX AIO implementation is provided in userspace by glibc.This has a number of limitations, most notably that maintaining multiple threads to perform I/O operations is expensive and scales poorly. Work has been in progress for some time on a kernel state-machine-based implementation -- but this implementation hasn't yet matured --" 10:17:44 I don't even have such a manpage, but anyhows. 10:18:14 I have an aio_read manpage. 10:18:20 But that sounds crappy. 10:18:28 The SIGIO type approach seems to be the best. 10:18:33 I have one for the functions too, but not for "aio" in section 7. 10:18:50 With fcntl(fd, F_SETSIG, signum) apparently you can even set it to a realtime signal, which I suppose creates MAGIC. 10:20:38 Not terribly portable, is it? 10:21:56 fizzie: Well... not as such, no... 10:22:18 fizzie: But as long as it works on Linux and is the fastest possible way to do IO without writing it in the kernel, I'm agme. 10:22:31 Let's code BEER that emulates Linux syscalls on Windows 10:22:47 WINE emulates the API, not syscalls. 10:22:56 Cygwin is pretty much the exact same thing as WINE, but without the ABI translation. 10:23:04 Oh yeah, cygwin 10:23:08 gelfload handled the rest I think -- ask Gregor 10:23:10 Thanks for reminding me it exists 10:23:18 PatashuWarg: Don't thank me, Cygwin is terrible 10:23:20 elliott_: You could consider the Linux-native syscalls, which do have library wrappers: see "man io_setup" + io_submit + io_getevents + io_cancel + io_destroy. 10:23:23 Pfflol 10:23:49 (That's what the future aio_blah functions are going to be implemented in, if it ever happens.) 10:24:04 Oh, "glibc does *not* provide a wrapper function for this system call". 10:24:16 fizzie: Weeell, the advantage of the signal approach is that you can avoid pretty much all the kernel<->userspace and polling/blocking overhead, right? 10:24:20 Because it's "hey, you call me". 10:24:23 There's a libaio and somewhere. 10:24:33 Not that I've even man'd those named ones, but they look suspiciously like the other, slower kind. 10:25:15 ...How about MEAD that does... um... 10:25:24 Mac OS? 10:25:27 BSD? 10:25:35 Taneb: Emulates the QNX API on Movitz? 10:25:51 -!- oerjan has quit (Quit: Good night). 10:30:20 Well, it's... asynchronous. It's not really relevant how it reports completion. There's still exactly the same amount of kernel-to-userspace copying going on. I mean, for POSIX aio, you can just set your struct aiocb's aio_sigevent to SIGEV_SIGNAL to get vaguely SIGIO-stylish "notice by signal when finished" behaviour; it's just non-natively implemented at the moment. 10:30:36 I don't know how the kernel's AIO interfaces do it, they seem a bit too work-in-progressy too. 10:31:18 But SIGIO doesn't really get you any sort of asynchronous IO, you just get signals when you can read/write, right? 10:31:39 back 10:31:58 fizzie: Well, hmm 10:32:07 I'm getting all these methods mixed up 10:32:19 -!- itidus20 has quit (Ping timeout: 240 seconds). 10:33:15 -!- Taneb has quit (Ping timeout: 260 seconds). 10:33:21 fizzie: Yeah, that does indeed seem to be true. I was hoping that you could tell the kernel "here's a buffer; here's the number of bytes I want; send me a signal when you've filled it". 10:34:11 fizzie: Probably the Linux syscalls are the best way, then. 10:35:01 It looks like they're edge triggered, which propaganda tells me is good. 10:35:42 fizzie: I'll probably avoid libaio because of all that, you know, overhea.d 10:35:44 overhead. 10:36:29 I must say that I find these syscalls' documentation of their input formats to be lacking. 10:37:22 -!- Taneb has joined. 10:37:55 Yes, it seems to be quite sukcy. 10:38:12 Also http://lse.sourceforge.net/io/aio.html says it doesn't really work in most cases. 10:38:43 "AIO read and write on sockets (doesn't return an explicit error, but quietly defaults to synchronous or rather non-AIO behavior)" 10:38:47 OK, well that's fucking useless then. 10:39:06 I can't quite believe that there's no kernel asynchronous IO for sockets. 10:39:35 Only for raw devices and O_DIRECT files on some filesystems; it seems that it's been implemented according to database folks' requirements. 10:40:21 "Asynchronous I/O on linux or: Welcome to hell." Well, that's a nice-sounding title. 10:40:31 Nice 10:40:38 Oh, that's the page I was reading 10:40:55 Unfortunately POSIX AIO on linux is implemented at user level, using threads! (Actually, there is an AIO implementation in the kernel. I believe it's been in there since sometime in the 2.5 series. But it may have certain limitations - see here - I've yet to ascertain current status, but I believe it's not complete, and I don't believe Glibc uses it). 10:41:07 Also apparently the POSIX API is crazy. 10:43:10 Yes, that's not too surprising. 10:43:31 So, um, there is _no_ actual asynchronous IO on sockets for Linux?? 10:43:32 This is insane. 10:52:15 fizzie: Is... that right? I mean, I could be misreading... 10:53:02 It seems to be mostly right. I don't think very much work is going on with the kernel-side aio mechanism; there's a lot of stuff from ~2007 or so, but haven't seen any real news. 10:53:10 Well that's crap. 10:53:14 What do the BSDs have to offer, I wonder ;-) 10:54:33 They have the POSIX AIO api in their libc, I believe. No guess on lower-level implementation details. 10:55:02 So I suppose the Most Asynchronous you can get is either epoll or SIGIO plus blocking reads. 10:55:06 That's... super lame. 10:57:40 -!- nooga has quit (Ping timeout: 258 seconds). 10:59:01 My guess is that they've just given up implementing it in the kernel, since everyone seems to be doing networking just fine without it (with worker-thread pools and so on); and it works for direct-file IO because database people have been more interested. 10:59:01 It may even be the: super-lamest. 10:59:15 fizzie: Well yeeeeeees, but where's the fun in threads? 10:59:56 I wonder whether the SIGIO-type dealie set to a realtime signal or epoll is more OPTOMIZED. I suspect the answer is "the former, but signal handlers are so restricted that the infrastructure you need makes it as slow as the latter". 11:00:41 epoll's supposed to scale well for a large number of watched descriptors, at least. 11:05:48 fizzie: Still, it's distinctly unsatisfying... you have to fork off or spawn a thread or _something_ if you want to be reading and writing to it. Or, hmm, I wonder if I could make it O_NONBLOCK? 11:06:33 I'm not sure how that'd help; I mean, epoll already tells you when it's safe to read/write some without blocking. 11:07:00 Oh, well, dur. 11:07:25 Maybe I'll just run Synthesis in a Motorola CPU emulator. That's practical, right? 11:09:08 Incidentally, I'm not even sure what you're doing. 11:09:37 elliott_: bonus points if the motorola cpu emulator needs to be run in a PowerPC emulation 11:09:55 -!- nooga has joined. 11:10:37 fizzie: Well, that's because I didn't tell you. Basically I'm hoping that minimalism will help me overcome the unrealisticness of hubris. 11:10:46 What I'm saying is I'm trying to write the fastest server possible but it doesn't have to do much. 11:12:07 There's the Linux-only trick for playing around with splice/vmsplice to do no-userspace-copy socket-to-socket or file-to-socket (though for the latter there's the far easier-to-use sendfile, of course) stuff you can do if you pretend to be interested in performance, but that's not appilcable if what you're feeding is locally programmatically computated stuff. 11:12:27 APPIL CABBEL. 11:12:53 fizzie: It's read from socket -> process -> send directly back from filesystem. 11:13:37 So ostensibly, epoll, process as efficiently as possible, sendfile, repeat. 11:24:02 -!- monqy has quit (Quit: hello). 11:24:26 Gregor: BTW, what's with the srand random in umlbox? 11:29:54 Based on a glance, it looks like it wants to give a different seed for each handleRun-forked process. 11:30:53 Heh :P 11:35:11 Funnily, if it were a "use given seed directly as if it was the last output, no state larger than the returned value" RNG, srandom(random()) would be just as useful as a single random() and would just start each process one value later in the sequence. But random() has a large table of state and presumably does something else. 11:35:29 -!- elliott_ has quit (Read error: Connection reset by peer). 11:35:32 -!- elliott has joined. 11:41:10 `run echo -e '#include \n#include \n int main(void) { int i,j; char states[4][128]; for(i=0; i<4; i++) initstate(random(), states[i], 128); for(i=0; i<4; i++) { setstate(states[i]); for(j=0; j<6; j++) printf(" %ld",random()%100); printf(" -"); } return 0; }' | gcc -xc -o ./tmp.tmp - ; ./tmp.tmp 11:41:12 98 75 6 22 99 12 - 24 54 86 60 0 74 - 36 83 15 19 16 6 - 50 3 47 38 76 55 - 11:41:21 Seems to create quite independent-looking sequences. 11:49:51 fizzie: So have I mentioned that @ has no kernel<->userspace overhead at all and so its IO model is simple and fast because, and I don't think everyone quite knows this yet, 11:49:55 @ IS THE BEST FUCKING THING EVER 11:51:19 `run echo -e '#include \n#include \n#include \n int main(void) { int i,j; unsigned short states[4][3]; for(i=0; i<4; i++) { unsigned long long u=drand48()*pow(2,48); states[i][0] = u; states[i][1] = u>>16; states[i][2] = u >> 32; } for(i=0; i<4; i++) { seed48(states[i]); for(j=0; j<6; j++) printf(" %ld",lrand48()%100); printf(" -"); }}' | gcc -xc -o ./tmp.tmp - ; ./tmp.tmp 11:51:22 18 95 86 66 96 89 - 95 86 66 96 89 21 - 86 66 96 89 21 12 - 66 96 89 21 12 46 - 11:51:31 That one's not so clever. 11:51:51 (If you go to the trouble of actually extracting the internal 48-bit state, anyway.) 11:52:22 Enjoying yourself, are we 11:52:28 But of course! 11:52:36 Butt, of course. 11:53:01 You should ask me to explain how @ avoids ALL kernel<->userspace overhead and therefore can do IO perfectly in every direction and whichway because yes?????? 11:53:05 EVERYONE SHOULD ASK ME THAT 11:54:14 I'll ask you when you've implemented it 11:54:45 I've seen you blab something about not having any kernel/userspace split at all because everything is oh-so-safe whee, I just, you know, assumed. Also what he said. 11:55:11 Deewiant: I'm working on that, dude :P 11:55:30 It's not like there's any amazingly hard problem I have to solve to implement it 11:55:45 It's just that there's a bunch of things I haven't fully specified yet that affect the design of other components in a major way 11:56:56 Deewiant: But you're free to help, if you're so eager to see it implemented :-) 11:57:52 Other than getting yourself motivated 11:58:46 I'm perfectly motivated to write @, but I don't see the point in starting on an implementation that I know will fail (in a much stronger sense than "build one to throw away") 11:58:49 Deewiant is lazy functional. 12:11:21 -!- PatashuWarg has quit (Ping timeout: 240 seconds). 12:14:58 `addquote Maybe if you try diplomacy. Pointy steel diplomacy 12:15:00 593) Maybe if you try diplomacy. Pointy steel diplomacy 12:37:17 is it possible to run Firefox with a different layout engine? 12:50:02 Why do I always end up with a bunch of functions with 8 or more parameters 12:50:05 It used to be possible to run some version of Netscape (8?) with IE's "Trident" engine on Windows. 12:50:58 Deewiant: In which language 12:51:05 In all languages 12:51:08 In this case, C 12:51:25 Deewiant: If C: Because you don't have enough structs, or aren't separating things out into separate initialisation procedures 12:51:37 Deewiant: If Haskell: Because you fail at building combinator libraries 12:51:50 What do you mean by initialisation procedures 12:53:46 Yeah, that wasn't very explicit, I just mean that instead of doing an entire operation as one atomic procedure, you can factor it out into initialising a state, repeatedly applying some action to it, and then destructing it 12:53:59 If that doesn't make any sense, then it's not the right advice for the situation :-P 12:55:14 Deewiant: What procedure is it, anyway 12:55:33 It's not a "procedure", it's "a bunch of functions" 12:55:44 Well, what's the one with the most parameters :-P 12:56:26 Let's see, it's probably the one that wishes it were a nested function 12:56:40 Questioning your API design at this point 12:57:05 Hey, my public API is minimal 12:57:48 What is it :-P 12:57:57 What it 12:58:04 A third-person neuter pronoun 12:58:05 Your public API, I'm being a horrible sceptic 12:58:14 But that's not important 12:59:09 Taneb: Why'd you give a peasant a fancy bed anyway 12:59:22 allocate(void*, stats*) free(space*) get(space*, coords) put(space*, coords, cell) load_string(space*, char*, size_t, coords, coords*, bool) modulo names/const/etc 12:59:26 I did? What? 12:59:35 + the cursor stuff I haven't done yet 12:59:47 Deewiant: load_string is strictly superfluous ;-) 13:00:13 Well, depends on how you define "minimal" 13:00:40 free is also strictly superfluous :-P 13:01:02 Deewiant: If you're going to be all performance-minded like that, you should at least offer a way to get/set in bulk :P 13:01:13 Like "copy this two-dimensional array in/out" 13:01:21 Oh yeah, I do 13:01:33 I forgot about those, they're not in the .h yet 13:01:39 I'm a genius 13:01:59 I'm a genus 13:02:06 Or, even better, the required wrappers aren't in the .c either 13:02:11 Deewiant: Show some fun internal function signatures then :P 13:03:08 But, uh, those would look like map(coords, coords, void(*)(cell*, size_t, stats*)) and map_no_alloc(coords, coords, void(*)(cell*, size_t, stats*), void(*)(size_t)) I think 13:03:29 Deewiant: That's... not the most efficient API I can think of :P 13:03:42 Do tell 13:03:51 Deewiant: Weeeeeell, I have a natural aversion to function pointers 13:04:00 I'd just make it take a pointer and have it basically be a blit 13:04:10 I have a natural aversion to copying when it's not necessary 13:04:13 Sure, you end up "iterating twice" if you're going to for over it afterwards, but the constants are low 13:04:25 You might be doing a search or whatever 13:04:26 Deewiant: You don't need to copy if it's contained within a region boundary 13:04:51 You'd have it return the pointer? 13:05:03 In any case, that requires copying in the general case :-P 13:05:21 Deewiant: Yeah; and so what, just say "This will be slow unless [conditions]" ;-) 13:05:31 Gregor: BTW, what's with the srand random in umlbox? // I only use the randomness within a fork(), so if I don't reseed it before every fork, I'll get the same random numbers every time. 13:05:42 I'd rather say "this will be fast always" 13:06:01 Gregor: Right. 13:07:02 Deewiant: You still haven't supplied any internal signatures ;-) 13:07:09 WE WILL FIND OUT 13:07:10 ONE WAY 13:07:10 OR 13:07:11 ANOTHER 13:07:39 static bool mushspace_newline(bool*, mushcoords*, mushcoords, mush_aabb*, size_t, size_t*, size_t*, mushcoords, size_t*, uint8_t*); 13:07:47 As I thought 13:07:53 The one that wants to be nested 13:09:09 Gross, remind me to put shiro-lahey on Hackage before you get that out 13:09:27 "Generalised N-dimensional Lahey spaces with an efficient unboxed representation" 13:09:33 People might even mistake it for something useful 13:09:50 I have a macro for calling that 13:09:56 -!- derrik has joined. 13:10:05 Why are there four size_ts? 13:10:18 static bool mushspace_newline( 13:10:18 bool* got_cr, mushcoords* pos, mushcoords target, 13:10:18 mush_aabb* aabbs, size_t aabbs_len, size_t* a, size_t* max_a, 13:10:18 mushcoords last_nonspace, size_t* found_nonspace_for, uint8_t* get_beg) 13:11:13 10 parameters and 13 non-blank lines of code 13:12:43 Deewiant: You should really have a (T *, size_t) pair 13:12:55 Yeah I probably should 13:13:07 It'd take this from 10 to 9! 13:13:19 #define DECL_BUFFER(T) typedef {size_t size; T *data;} T##_buffer 13:13:20 :P 13:13:41 Deewiant: "size_t* a, size_t* max_a" also makes me suspicious 13:13:52 Howso 13:13:57 Could be a struct :-P 13:13:58 Deewiant: Also "mushcoords" vs. "mush_aabb" vs. "mushspace_" -- get some consistency 13:14:21 mushspace_ is the module, mush_ is internal, mush is external 13:14:44 Deewiant: The distinction between the latter two is confusing :P 13:14:45 elliott: I don't want to make a struct to be used by exactly one function 13:14:57 You don't need to care, you're a user, you'll only see mush 13:15:04 http://en.wikipedia.org/wiki/Nazi_talking_dogs 13:15:04 Sorry for commenting on your code :P 13:15:18 No worries dude :-P 13:15:44 Deewiant: Also, I'm offended that the implication that I'd use code with so many parameters 13:15:45 It's just: mushcell, mushcoords, mushspace, and mushcursor 13:15:58 Oh, and mushstats 13:16:06 Deewiant: So is it N-dimensional 13:16:10 No 13:16:22 It's [1-3] selectable at compile time 13:17:04 Deewiant: Well then, is it ... uhh, what was that structure I was going to use... R-tree? 13:17:10 Nope 13:17:14 No trees here 13:17:17 Deewiant: Is it purely-functional? 13:17:32 Deewiant: And does it have the words LAHEY SPACE anywhere???? 13:17:48 Does it look purely functional? :-P 13:17:54 Deewiant: ALL I AM SEEING ARE FLAWS HERE 13:17:55 And no, I don't think it does 13:18:05 Hey, it has 10-parameter functions 13:18:08 THAT'S A GOOD THING RIGHT 13:18:10 Precisely :-P 13:18:24 Deewiant: Well if those are a good thing 13:18:38 Deewiant: Where's your mergeByteString 13:18:46 load_string? 13:18:48 A function unparalleled in API and implementation consistency 13:18:53 Deewiant: No, that's just a function that does the same thing 13:19:03 I'm asking, where's your equivalent jewel 13:19:18 Deewiant: http://sprunge.us/SATe 13:19:26 Deewiant: Where is your FUNCTION OF EQUIVALENT OR GREATER ELEGANCE?????? 13:20:21 I think I'll go with mushspace_newline 13:20:52 Can't argue with binary arithmetic: *max_a = mush_size_t_max(*max_a, *a |= 0x02); 13:20:57 Heh 13:21:08 My fungespace representation is really bad :/ 13:21:16 But I'm trying to clean up the rest of the code first 13:21:25 Or any effort will collapse in on itself 13:23:37 Also I use String all over the place, I should fix that 13:23:53 String is good, list-tries supports it 13:24:15 Deewiant: Tries are like the only time String has a nice structure :P 13:24:25 Yup :-P 13:24:37 I decided not to like list-tries when I noticed you had completely unnecessarily abstracted the map out ;-) 13:24:52 It's pretty gross, I know 13:24:54 (OK, so for really small alphabets you can avoid map overhead but come oooon.) 13:25:00 But what's the better alternative 13:25:08 Deewiant: Pick one map, force it on everyone 13:25:09 It was more about being able to use Eq/Ord/whatever keys 13:25:12 I don't want that 13:25:17 I want that 13:25:23 "force X on everyone" is something I abhor :-P 13:25:38 It's called a library, if you didn't force something on everybody it'd be empty 13:26:05 Let's put it this way: There is no way that that Map class can lead to anything good :-P 13:26:44 Deewiant: How about just using a type family 13:26:45 It leads to being able to use keys without Ord instances while not having to use linked lists for maps in general 13:26:49 Deewiant: How about just using a type family 13:26:56 Type families were pretty experimental when I started it 13:27:00 They're not now 13:27:00 Nobody was using them 13:27:03 Yeah so 13:27:07 elliott: How about just rewriting it 13:27:19 Deewiant: But someone's already roped me into one bit of work today :-( 13:27:38 It's child labour 13:28:08 In the meanwhile you can live with it 13:28:15 Bug report 13:28:15 -- 'Just'@ a@is returned, the old value is replaced with @a@. If the key is 13:28:26 And yeah, I'll live with it by not using it :-P 13:29:12 There's also an \ue000 between the @ and the is, somehow 13:29:25 That's the bug report 13:29:44 -!- derrik has left. 13:29:46 Hmm, I'm not sure type instances would actually work 13:29:47 Or, well 13:30:04 They might, actually 13:30:12 (Map k) => ... 13:30:17 class Map k where type MapFor k 13:30:19 Hmm 13:30:32 Dammit, now you've got me pondering :-P 13:30:38 heh 13:30:44 Deewiant: Heeeeey, technically I _am_ a user of list-tries. 13:30:50 GPipe, yes 13:30:58 CHAINSAW TIME 13:31:03 :-P 13:31:37 * elliott promptly gets himself stuck on whether "class HasMap k where type Map k" or "class Map k where type MapFor K" is nicer, conveniently uses this to drop the whole thing. 13:31:53 Bikeshedding is annoying like that 13:32:22 Which is nicer, I'll just pick the opposite of whatever you say, problem solved 13:32:34 HasMap 13:32:36 Is this three space indentation good lord 13:32:45 Yep 13:32:51 I don't like you :( 13:32:53 Incidentally, why do we only have +cn? All the *real* channels have something like +CLPcfjnt on. (Okay, so you need freenode admins for +LP, but...) 13:32:54 :-( 13:33:08 fizzie: Both +c and +n are bad modes for bad people 13:33:10 Can we remove them 13:33:11 We don't have +t because people like to change the topic 13:33:22 And I don't know what the others do 13:33:39 What's wrong with three space indentation 13:33:39 +j is join-throttling, only N joins in M minutes. 13:33:51 +c filters colours and also bold. 13:33:54 +f forwards the +j-throttled to other channels. 13:33:56 -!- sllide has joined. 13:33:58 +n stops people sending a message when outside the channel. 13:34:01 Oh wait 13:34:04 You're asking about fizzie's 13:34:05 +C filters to-channel CTCPs. 13:34:07 Im smart 13:34:24 And +LP are large-ban-lists + permanent. 13:34:49 When admins start wondering why so few people have been banned, worry 13:34:52 Deewiant: Three-space indentation is just weird because it is 13:35:01 Powers of two are the only good indentation widths 13:35:07 2 is too narrow, 4 is too wide 13:35:17 Two is fine for Haskell code 13:35:30 The nesting is shallow in idiomatic code, and the left-side rule means that you get more indentation than that 13:35:32 Maybe, I haven't thought about it per-language 13:35:42 e.g. " where " is actually an eight-char indentation, really 13:36:14 Yeah but I often write that as " where\n" 13:36:24 Well that's bad :) 13:36:28 If a lot of stuff follows it 13:36:30 Well why :-p 13:36:41 Because it reads less fluidly and also makes two space worse 13:36:51 Deewiant: Do you really use all the functions in the Map class 13:36:55 I think of "where" as invisible 13:36:56 Yes 13:36:58 Wow 13:37:10 It started out smaller :-P 13:37:13 Don't you think putting some of them outside the class would have a certain... elegance 13:37:28 They all have direct implementations in Map/IntMap IIRC 13:37:28 I mean, how would you optimise mapAccum to be faster than the obvious implementation in terms of mapAccumWithKey :-P 13:37:43 Yeah, but those implementations will probably reduce to basically the same thing as the obvious transformation... 13:38:01 mapAccum on a trie doesn't need to remember the key 13:38:57 Heh 13:39:11 Most of them are probably there because my trie API was just union(Data.Map, Data.IntMap) and it turns out that you need mapAccum to implement mapAccum (or whatever) 13:39:27 Data.Map.Map seems like a really bad default choice to use 13:39:38 I mean, compared to something hash-based 13:39:45 Where the hash for Char helpfully reduces to id 13:39:59 There's no "default choice"? 13:40:15 Well, OK, I just mean that you provide instances for Map :-P 13:40:17 You pick by type class: Eq, Ord, Enum are provided 13:40:25 Feel free to add Hashable or whatever :-P 13:40:28 Admittedly I was thinking in terms of HasMap which I've actually just created :P 13:41:20 Deewiant: If you're such a fan of iteration over conversion followed by traversal, shouldn't you take a traversal function rather than [k] so that you can use Text/ByteString directly :-P 13:41:31 That started out as a joke but then it turns out I couldn't answer it oops 13:41:39 heh 13:41:59 [k] pretty much is a traversal function in Haskell 13:42:05 Given laziness and all 13:42:07 Yeah, 'strue :P 13:42:47 Would Foldable work or something, I don't actually know that family of classes very well 13:42:55 I mean, to avoid wrapping it with a bunch of conversions 13:43:37 What exactly are you talking about now 13:43:45 Work where, to avoid what 13:44:02 As in, everywhere you take a [k] 13:44:14 To avoid having to write a ByteStringTrieMap that listifies it 13:44:18 For every function 13:45:07 elliott: So how's mudex? 13:45:35 Gregor: I haven't touched it much, unfortunately 13:45:40 It's CLOSE to working :P 13:45:52 Traversable might work 13:46:29 Deewiant: class ToList k where type Elem k; toList :: k -> [Elem k] would probably work :-P 13:46:34 I guess Foldable is better because you can use foldr (:) [] to get a list 13:46:45 You could even optomize it 13:47:42 Foldable makes it be x a -> [a] though instead of your x -> [Elem x] 13:47:56 Deewiant: Exactly, which is worse, because it doesn't support monomorphic containers 13:48:02 Yep 13:48:08 I guess there's no point in caring about non-GHC portability these days? :-P 13:48:13 Like, say, ByteString and Text, the most popular third-party string types :-P 13:48:18 Deewiant: Dude, you depend on functional dependencies 13:48:19 Text didn't exist back then 13:48:25 Deewiant: Implementing type families is both equivalent and easier :-P 13:48:27 elliott: It worked in Hugs IIRC 13:48:30 Yeah 13:48:31 But, I mean 13:48:34 Hugs doesn't exist any more :P 13:48:39 Yeah, and that was my point 13:48:42 Well, yeah 13:48:51 Is there for any practical purpose a non-GHC Haskell implementation 13:49:00 jhc 13:49:03 But nobody really uses it 13:49:06 And it doesn't support much at all 13:49:09 I doubt it does fundeps 13:49:10 Is that semi-up-to-date these days? 13:49:14 There's LHC... but that's a backend 13:49:19 UHC maybe? Naw 13:49:20 I know of only UHC 13:49:23 Deewiant: Basically, no, there isn't, but there should be one 13:49:33 As something that is reasonably developed 13:49:35 But if there becomes one, it'll probably support type families before fundeps 13:49:40 Fair enough 13:51:03 Deewiant: Pro AList 13:51:27 Now I just have to think of a type for which AList is actually desirable so that it doesn't end up with no instances :-P 13:51:37 Maybe if your keys are other ALists? 13:51:46 Then you're already suffering with ALists 13:51:53 So more probably won't hurt much 13:53:07 AList is if you only have Eq 13:54:00 Hmm, the question is how to provide the AList machinery without actually giving it instances 13:54:11 That is, you want to be able to just use a line or two to say "hey, use an AList" for this. 13:54:14 Aha, hmm 13:54:34 Maybe if the Map class was kept as is with the m parameter, and MapFor was a /separate thing/ 13:54:37 Then the context would become 13:54:41 (Map (MapFor k) k) => ... 13:54:42 Which is 13:54:44 Extremely ugly 13:54:56 But the alternative is implementing all the HasMap methods every single time you want to make a type use that map? 13:54:59 Which is very stupid 13:55:01 Oh wait 13:55:09 class Map (MapFor k) k => HasMap k where type MapFor k 13:55:12 Deewiant: Genius 13:56:45 At this point Deewiant has blocked me on every communication method he can and put notes all around his house to never accept a patch from me ever 13:57:00 Wrong 13:57:10 If by wrong, you mean right 13:58:04 That combined Map/HasMap approach seems distinctly unsatisfying, but I'm not sure why... 13:58:56 Woo, 7 parameters and 7 lines of code (+ 6 for the introduction and closing curly bracket) 13:59:45 Deewiant: How many typeclasses :-P 13:59:51 This is C 13:59:59 Or are you asking me how many to add 14:00:02 Or what 14:00:26 Deewiant: It was a joke 14:00:33 It failed 14:00:36 Clearly 14:00:42 Deewiant: No, you're just not refined enough to get it 14:04:50 I guess what's really required is... default instances for certain values of a type family 14:04:51 Wooooooo 14:05:09 class Map (MapFor k) k => HasMap k where type MapFor k is certainly looking appealing 14:05:36 2011-08-14 16:33:54 ( Deewiant) HasMap 14:05:38 I toldya 14:06:01 Deewiant: Uh, I decided on HasMap back then 14:06:07 Deewiant: It's just that what I did was wrong 14:06:20 Deewiant: I changed class Map m k where HOLY GOD SO MUCH STUFF 14:06:20 to 14:06:32 class HasMap k where type Map k :: asterisk -> asterisk; HOLY GOD SO MUCH STUFF 14:06:39 Whereas I actually want it to be 14:06:51 class IsMap m where type Key m; HOLY GOD SO MUCH STUFF 14:06:54 then later on 14:07:05 class IsMap (Map k) => HasMap k where type Map k 14:07:09 Hmm, actually 14:07:16 class (IsMap (Map k), Key (Map k) ~ k) => HasMap k where type Map k 14:07:23 But yeah, that avoids type families :-P 14:07:31 And is seemingly as generic as possible 14:07:51 And makes saying "oh, Chars should use BlahMap" as simple as "instance HasMap Char where type Map Char = BlahMap Char" if there's a proper IsMap instance 14:08:17 And makes it impossible for somebody to use a FooMap instead if he wants to? :-P 14:09:44 Deewiant: Well, firstly, that's basically the entire tradeoff being made by using a type family; in return there's not an ugly extra parameter going around everywhere. But let's put it this way, I am finding it _very_ hard to think of a situation where you'd have two people thinking a certain map type is best for (element type), and one of them not being wrong :-P 14:09:54 Like, for Chars, there's not N usecase strategies or whatever that would suggest different maps 14:10:00 There's going to be one map that has the best all-round performance on Chars 14:10:27 OK, when your keys are like [[k]] then it gets more complicated, but you probably want that to become a nested TrieMap really 14:10:55 What if user U has a closed source super map he wants to use but can't be provided by list-tries because it's closed source 14:12:09 Deewiant: If the key type is not a "generic" type, then just give the instance directly; else, newtype wrapper -- remember that I'm going to introduce ToList, so actually this isn't a pain 14:12:16 Well, it's less of a pain, anyway 14:12:35 At the most, you'll need to wrap the functions for convenience as much as you'd have to now to use ByteString or Text 14:12:44 And the latter two are far more common than a closed source supermap :-P 14:12:48 Fair enough I guess 14:12:51 super map* 14:12:58 Duper map 14:13:03 Souper map 14:13:22 Deewiant: Is there a repository of some sort I should clone rather than patching up the latest Hackage release 14:14:31 git://tar.us.to:9418 I think 14:14:39 `run where sh 14:14:41 sh: where: command not found 14:14:45 er 14:14:58 `run which sh 14:15:00 ​/bin/sh 14:15:06 ah which 14:15:20 Deewiant: elliott@katia:~/Code$ git clone git://tar.us.to:9418 list-tries 14:15:20 Initialized empty Git repository in /home/elliott/Code/list-tries/.git/ 14:15:20 fatal: Unable to look up (port 9418) (Name or service not known) 14:15:38 for some reason this cmake nonsense isn't finding qmake... but, it's there in /usr/bin 14:15:42 I don't know how git hosting works, dammit 14:15:45 I just ran 'git daemon' 14:16:08 Guess who else doesn't know :P 14:16:29 Well your git didn't connect 14:16:32 I thought you were an hg guy, anyway 14:16:37 You thought wrong 14:16:45 Deewiant: I think the git:// part was wrong 14:16:55 "unable to look up 'space'" is suspicious 14:17:06 Aha 14:17:08 / makes it closer 14:17:12 Deewiant: What's the directory name perchance 14:17:19 list-tries 14:17:20 ? 14:17:28 I ran it in the list-tries directory 14:17:29 elliott@katia:~/Code$ git clone git://tar.us.to:9418/list-tries.git list-tries 14:17:30 Initialized empty Git repository in /home/elliott/Code/list-tries/.git/ 14:17:30 fatal: The remote end hung up unexpectedly 14:17:30 elliott@katia:~/Code$ git clone git://tar.us.to:9418/list-tries list-tries 14:17:30 Initialized empty Git repository in /home/elliott/Code/list-tries/.git/ 14:17:30 fatal: The remote end hung up unexpectedly 14:17:32 Meh 14:17:34 So it would make sense if it were / 14:17:38 Deewiant: I think you need to do "git daemon list-tries" in the parent? 14:17:45 And /.git and / both failed too 14:18:10 Prepare the repository 14:18:10 To allow git-daemon to read your project you have to add the file .git/git-daemon-export-ok to your project. 14:18:12 Deewiant: lawl 14:18:23 so for some reason /usr/share/cmake-2.8/Modules/FindQt4.cmake can't find qmake... 14:18:34 which means it's stupid because it's in /usr/bin 14:20:39 elliott: Okay I gave it --base-path=. and now it should maybe work 14:21:20 /.git worked, thanks 14:21:27 You didn't need that methinks 14:21:32 It worked locally with just / 14:21:48 -- Funky instances for this type are marked with **FUNKY** 14:21:48 I don't even want to know 14:23:44 Deewiant: I note that the Map typeclass is not sufficiently general to handle a map that has constraints on the values :-P 14:23:56 I'm sure this issue has you quaking in your boots 14:24:28 Feel free to fix it 14:25:27 Deewiant: No thanks, that would even lose Traversable :-P 14:26:01 Yeah, fix the base libraries first ;-) 14:26:45 Deewiant: I'm not sure "fix" = "make more general" 14:27:09 It always is 14:27:16 Deewiant: Here's my new Prelude: 14:27:28 something :: c a -> d b 14:27:39 Specialise c=d=Identity for normal operations 14:27:49 Like unsafeCoerce 14:28:04 Deewiant: No, that's what the d on the return is there for, so it can refuse 14:28:18 How does it know how to refuse in d? Well simple, it uses something 14:28:22 :-D 14:29:53 * elliott wonders whether changing Map to have the key as a type family actually simplifies things. 14:30:07 Hmm, it does 14:30:17 instance (Ord k) => IsMap (Map k) 14:30:18 Well, hmm, no 14:30:32 Just because it's a Report-compliant instance head doesn't mean you're not going to use an extension the next line by necessity 14:30:42 Oh, wait, it is useful 14:30:49 instance IsMap (a,a) where 14:30:54 type Key (a,a) = Bool 14:30:58 Deewiant: Ain't it beautiful :-P 14:31:12 You couldn't do that before without a newtype wrapper. 14:31:41 Because a mostly-internal newtype wrapper is just so terrible :-P 14:32:29 Deewiant: Well, if you'd like to turn FunctionalDependencies into FunctionalDependencies _and_ TypeFamilies rather than replacing it, I'm happy to oblige :-P 14:32:41 I suppose, uh, depending on the mtl already implies FunctionalDependencies, though 14:32:52 :-D 14:32:55 Whoops 14:33:46 OK, here's what shiznit be up, yo: I'm way too lazy to s/k/Key m/ and the like so I'm just going to rename Map and OrdMap to have Is in front :-P 14:33:52 Hmm 14:33:56 class Foldable (m k) => IsMap m k where 14:33:59 Deewiant: What's with the missing fundep 14:34:23 Maybe you dropped it somewhere 14:34:25 Nope 14:34:33 You just didn't have one 14:34:35 Clever 14:34:43 Why fundep when the code compiles without it eh 14:35:16 Deewiant: I'd love to see an instance violating m -> k 14:35:19 By love I mean auuuuuuuuugh 14:35:23 Maybe if you use like 14:35:26 Map Dynamic a 14:35:32 Or, well, AList Dynamic a 14:35:37 It's possible!! 14:35:47 NOT IN A GOD-FEARING SOCIETY 14:36:04 Kids these days will do anything 14:36:29 newtype WrappedIntMap k v = IMap (IM.IntMap v) deriving (Eq,Ord) 14:36:29 Hmm, what's with the wrapping 14:36:37 Dropping k 14:36:42 Oh 14:36:45 That 14:36:56 okay so I figured out the qmake stuff, but now it can't find qt4-core...which is also installed. 14:36:58 Deewiant: Is a damn good argument not to use m k all over the place :P 14:37:00 WHAT IS GOING ON AAAH 14:37:06 Actually I can do that while keeping the fundep 14:37:07 I think I hate cmake. 14:37:11 Just make it become 14:37:17 instance IsMap (IntMap v) Int 14:37:18 vs. 14:37:23 instance IsMap (M.Map k v) k 14:37:26 Erm 14:37:28 instance IsMap (M.Map k) k 14:37:29 vs 14:37:33 instance IsMap IntMap Int 14:39:33 Deewiant: Holy shit, right after you say that I violate the fundep 14:39:37 instance Enum k => IsMap IM.IntMap k where 14:39:43 Are you a wizard????????????????????? 14:40:07 I'm waiting for my "auuuuuuuuugh" 14:40:22 >_> 14:40:36 I am "auuuuuuuugh"ing as we speak 14:40:46 I guess that's acceptable 14:41:26 cmake keeps telling me to check a CMakeError.log 14:41:29 that doesn't exist. 14:41:31 THANKS CMAKE 14:41:33 I HATE YOU 14:41:35 Why are you using CMake 14:41:39 It's almost as bad as SCons 14:41:41 because I have to. 14:41:47 Why 14:41:48 because this isn't my software that I'm trying to install. 14:41:53 Stop using that software 14:41:54 CMake is okay 14:41:55 * CakeProphet is install Qyoto 14:41:59 +ing 14:42:01 rewrite it and make it your software 14:42:08 .....yeah okay I'll get right on that. 14:42:09 The elliott way of doing things 14:42:14 Deewiant: So what's with the random double/triple spaces everywhere, it looks like you once aligned osmething but then there was nothing to align 14:42:16 since I have like 4 days to finish this. should be easy. 14:42:17 at least you can rewrite the cmake part 14:42:39 elliott: Is this before or after you've run a s/x/y/ expression on it 14:42:57 Deewiant: I've run no such thing 14:42:59 Or you just not seeing the genius of my indentation/alignment 14:43:02 Consider the "alter" method in the IntMap instance 14:43:15 Or how about this 14:43:19 toAscList :: m k a -> [(k,a)] 14:43:19 toDescList :: m k a -> [(k,a)] 14:43:23 In a completely standalone block 14:43:37 basically the guy who hired me said "use qtwebkit to make a small proof of concept for Mono/C#" 14:43:45 well...qtwebkit is in FUCKING C++ 14:43:47 Okay that's random 14:44:05 so... I had to go find some C# bindings, which I did, and it's called Qyoto. And now I am trying to install this and it is not finding shit. 14:44:08 alter is aligned with update/adjust/delete? 14:44:09 that is obviously there. 14:44:25 Deewiant: Is it even aligned 14:44:27 It is after my modification 14:44:32 But I don't recall before 14:44:35 I can't find an alter that isn't 14:44:40 Fair enough 14:44:45 Still weird :-P 14:45:01 delete k (IMap m) = IMap$ IM.delete (fromEnum k) m 14:45:01 alter f k (IMap m) = IMap$ IM.alter f (fromEnum k) m 14:45:06 I assumed you were referring to that 14:45:09 Yeah 14:45:12 And that's aligned 14:45:12 Now insert a blank line after delete 14:45:14 And it stops making any sense :-P 14:45:18 Yeah there's a blank line 14:45:19 It's still aligned :-P 14:45:42 The blank lines are based on the grouping in the definition of Map methinks 14:45:48 :t second specialise it on (->) you ashole 14:45:49 parse error on input `->' 14:45:53 : tufuck you 14:45:57 :t second 14:45:58 forall (a :: * -> * -> *) b c d. (Arrow a) => a b c -> a (d, b) (d, c) 14:46:03 :t i hat eyou and i hate arrows 14:46:04 Not in scope: `hat' 14:46:05 Not in scope: `eyou' 14:46:05 Not in scope: `hate' 14:46:13 second :: (a -> b) -> (c, a) -> (c, b) 14:46:26 I hate cmake 14:47:53 Warning: QT_QMAKE_EXECUTABLE reported QT_INSTALL_LIBS as /usr/lib 14:47:55 Warning: But QtCore couldn't be found. Qt must NOT be installed correctly, or it wasn't found for cross compiling. 14:48:06 must NOT be installed correctly. it has nothing to do with cmake being terrible. 14:48:09 nope. 14:48:26 You're all such haters 14:48:43 all we do is hate. 14:49:07 time to go manually install libqt4-core 14:50:01 ?unpl Just . first toEnum *** IMap 14:50:02 (\ c -> (Just) (((first toEnum) *** (IMap)) c)) 14:50:06 Not fucking helpful 14:50:31 Are you having trouble? 14:50:33 so it needs Qt to NOT be installed correctly? 14:50:39 Deewiant: Just this bit :P 14:50:39 yes. 14:50:42 or, maybe 14:50:43 I have no idea. 14:50:53 actually libqt4-core is a transitional package so it might be the wrong one. 14:51:01 so maybe I actually hate Debian's package repos. 14:51:03 \(a,b) -> (Just (first toEnum a), IMap b) 14:51:20 So (Just . first toEnum *** id), then 14:51:22 you should just need libqt4-dev I think 14:51:34 elliott: f *** id is the same thing as first f 14:51:55 Data/ListTrie/Base/Map.hs:196:21: 14:51:55 Ambiguous type variable `k10' in the constraint: 14:51:55 (IsOrdMap m k10) arising from a use of `mapAccumDescWithKey' 14:51:55 Probable fix: add a type signature that fixes these type variable(s) 14:51:55 In the expression: mapAccumDescWithKey (const . f) 14:51:55 In an equation for `mapAccumDesc': 14:51:57 mapAccumDesc f = mapAccumDescWithKey (const . f) 14:51:59 Dude what... 14:52:01 Oh 14:52:03 Hmm 14:52:05 Hmmmmmmmmmmmmmmmmmmmmmmm 14:52:17 MR? :) 14:52:23 olsner: nope, it's a typeclass default 14:52:28 elliott: You should add a type signature that fixes these type variable(s) 14:52:29 but 14:52:32 Deewiant: Guess what we need 14:52:38 We need the functional dependency 14:52:39 A type signature that fixes these type variable(s) 14:52:43 Dude 14:52:44 No 14:52:49 oh hey look libqt4-dev is uninstalled 14:52:50 But that's what it says 14:52:55 "Probable fix: add a type signature that fixes this type error" 14:52:57 "Probable fix" 14:53:03 It's a TYPECLASS DEFAULT 14:53:04 When is GHC ever wrong? 14:53:26 Deewiant: Hey, I've internal exception'd GHC before, whippersnapper 14:53:30 Probable fix: add an unsafeCoerce that fixes this type error. 14:53:40 I think I have, as well 14:54:03 elliott: That doesn't mean it wasn't the right way to handle the situation 14:54:19 ..............There is exactly one signature and it is ALREADY THERE 14:54:25 The problem is an ambiguity caused by the lack of the fundep 14:54:28 I meant the internal exception 14:54:34 Oh 14:54:36 It most definitely was wrong 14:54:48 CMake Error at CMakeLists.txt:88 (macro_log_feature): Unknown CMake command "macro_log_feature". 14:54:51 awesome 14:55:00 Deewiant: http://sprunge.us/DJca 14:55:04 Deewiant: GHC bomb at least as of a while ago 14:55:32 arst.hs:31:18: 14:55:32 Cannot deal with a type function under a forall type: 14:55:32 forall fp. Fingerprint fp => (fp, FPGlobalState fp) 14:55:32 In the expression: return () 14:55:32 In an equation for `fpRun': fpRun NULL _ = return () 14:55:35 In the instance declaration for `Fingerprint NULL' 14:55:36 Me too 14:55:39 It was in ghc six days 14:56:00 As in, months ago :-P 14:56:24 so apparently I need libsmokeweroidofihwerhsomething 14:56:36 Deewiant: BTW, I don't think the Map classes are generic enough to handle a dependent map :-P 14:56:50 JUST SAYING 14:56:53 Again, if you can fix it, go ahead :-P 14:57:08 I don't think I can :P 14:57:13 Illegal instance declaration for `IsMap IM.IntMap k' 14:57:13 (the Coverage Condition fails for one of the functional dependencies; 14:57:13 Use -XUndecidableInstances to permit this) 14:57:16 Deewiant: Best extension????????????? 14:57:25 Yeah no 14:57:53 How can I revert just all the lines that previously said IMap :-P 14:58:27 If you have vim and haven't mapped U to something else, U undoes changes on one line 14:58:47 Great; now assume I have emacs 14:58:53 RTFM 14:58:58 you're pretty much fucked. 14:58:59 I was thinking more along the lines of some fancy git reset tool :-P 14:59:06 My knowledge of emacs is limited to C-x C-c and I'm not even sure that's right 14:59:29 Deewiant, that seems to be all the knowledge you need of it 14:59:36 vim fanatics 14:59:42 Another hater 14:59:51 Vorpal: points to the sign marked "don't feed the troll" 15:00:02 which sign? there is no such sign here 15:00:03 elliott, oh, good point 15:00:09 Holy shit, excite.com still exists 15:00:11 And looks identical 15:00:35 elliott, what is it? I just get a 500 there 15:00:44 at least it didn't go down with altavista 15:01:20 Vorpal: http://www.excite.com/ should load 15:01:37 elliott, tried it. 500 still 15:01:43 Huh 15:01:47 It's a really 90s web portal :) 15:01:47 okay so now it can't find smoke, but I've installed libsmokeqt4-dev 15:01:51 which should have installed everything I need. 15:02:11 elliott, oh I see, I selected to NOT disallow the cookie, then it stopped doing 500 15:02:11 I think 15:02:42 CakeProphet, he's in the trapping grounds west of the village, opposite side to the temple of trials. you have to kill some geckos and watch out not to step into the pools of acid, that's a bit of HP gone every time you do that. 15:03:11 * cheater_ wonders if anyone got the reference. 15:03:32 it's lost to me 15:04:03 minMaxView :: (Alt st a, Boolable (st a), Trie trie st map k) 15:04:03 => (trie map k a -> Bool) 15:04:03 -> (CMap trie map k a -> Maybe (k, trie map k a)) 15:04:03 -> trie map k a 15:04:03 -> (Maybe ([k], a), trie map k a) 15:04:07 Deewiant: Nice 15:04:22 2011-08-14 15:51:22 ( Deewiant) Why do I always end up with a bunch of functions with 8 or more parameters 15:04:34 Because you suck :-P 15:04:37 cmake wants me to set a bunch of stupid configuration variables and I'd really rather not since that's probably not the problem. 15:04:39 Meh :-( 15:05:07 http://fallout.wikia.com/wiki/Rescue_Nagor%27s_dog,_Smoke,_from_the_wilds 15:05:21 Deewiant: I bet if I got Conal to reimplement list-tries... ;-) 15:05:36 THREE LINES OF CODE SO PURE THEY DON'T EVEN EXECUTE AT RUNTIME 15:05:50 BANANAS EVERYWHERE 15:06:13 The three lines of code 15:06:18 banana :: Banana -> Banana 15:06:21 banana v 15:06:28 | isBanana v = banana v 15:06:43 | otherwise = ex (banana v) (re (banana v)) 15:06:47 Beautiful 15:06:52 > let na = "na" ++ na in "Ba" ++ na 15:06:54 "Banananananananananananananananananananananananananananananananananananana... 15:07:00 -!- copumpkin has joined. 15:07:59 elliott, that is 4 lines (with the type signature) 15:08:14 Vorpal: There's another line of negative space above 15:08:19 You just can't see it with your stateful IRC client 15:08:19 elliott, oh right 15:08:35 what's ex and re? 15:08:56 and Banana, for that matter 15:09:27 olsner: I'm not at liberty to discuss that with you 15:09:38 elliott: ok 15:09:39 elliott, and more to the point: why is there no mention of audio-only communication devices in there 15:09:54 Vorpal: wat 15:09:59 elliott, bananaphone 15:10:11 Too ordered 15:10:18 The Bananamiasma is used instead 15:10:25 touche 15:10:51 Deewiant: So, um, care to walk me through each parameter of the Trie class 15:11:11 It's just so that I can do Map and Set without having to reimplement everything 15:11:12 elliott, heh I read that as "Trine" since I played that yesterday 15:11:29 Deewiant: Yes, I just want to know what each parameter is so I can make them into type families :-P 15:11:44 instance Map map k => Base.Trie TrieMap Maybe map k where 15:11:46 instance Map map k => Base.Trie TrieSetBase Identity map k where 15:11:52 Does that answer your question 15:12:10 I'm not sure what's up with Maybe/Identity there, but apart from that, yes 15:12:35 elliott: It's for the value: for maps it's Maybe value, for sets it's Identity Bool 15:12:42 Heh 15:12:50 And hence funky instances etc 15:12:54 What's st stand for anyway 15:13:03 storage or something 15:13:39 > 'B':fix("an"++) 15:13:41 "Banananananananananananananananananananananananananananananananananananana... 15:14:38 * cheater_ just tried pronouncing that, but doesn't know which syllable the stress is on. 15:14:41 truly this is a shining example of what Haskell excels at. 15:14:44 import qualified Data.DLiStorage trie as DL 15:14:46 Herp derp 15:15:02 adjuStorage trie :: Trie trie map k 15:15:04 Oh my god 15:15:13 :-D 15:15:37 toLiStorage trie = genericToLiStorage trie Map.toLiStorage trie DL.cons 15:15:56 Turns out "st" is a common consonant pair huh 15:16:12 I put a space after for a reason ;_; 15:16:45 Turns out "list " turns up often in a library dealing largely with lists 15:16:58 And "Just " in a Haskell program 15:17:28 tVal = fStorage trie . tParts 15:17:31 oh my fucking god 15:17:39 Dude 15:17:47 yes i am trying to repair it piece by piece :D 15:17:47 Press the M-x undo or whatever it is 15:18:07 And then look for M-x i-want-perl-regular-expressions-dammit and use 15:18:40 replace-regexp, but it's elisp regexps 15:18:51 \bst\b -> Storage trie should work 15:19:16 You can call it something else than Storage as well, if you want :-P 15:19:36 It's not exactly descriptive and if it's going to get a name longer than two characters it probably should be 15:22:00 I'm just sitting here wondering if it could all be done in a simpler manner :-P 15:22:55 Vorpal: Another 360 degrees: http://users.ics.tkk.fi/htkallas/20110813_005-020.jpg 15:23:20 Like, I think people have implemented tries in languages without four-parameter type classes before :D 15:23:57 Yes, and with a lot less type checking 15:24:09 I can replace the "st" parameter with a void* ;-P 15:25:13 :-P 15:25:37 fizzie, *looks* 15:25:45 fizzie, nice 15:25:47 where is it? 15:25:58 fizzie, and what is the blacked out stuff 15:26:03 fizzie, defence secret? 15:26:06 Vorpal: It's a redacted person. :p 15:26:14 fizzie, defence secret :P 15:26:15 "Person" 15:26:19 If that's what you're calling them these days 15:26:22 I'm trying to find it on the map, but Google's satellite photos are rather low-res from where it's from. 15:26:36 elliott, yeah in my time we used to say as it were... 15:28:23 $ tup upd |& wc -l 15:28:24 366 15:28:32 I think that's a good place to leave it 15:28:36 Vorpal: It's approximately from http://maps.google.com/?ll=59.820035,22.955804&spn=0.020798,0.065961&t=h&z=15 I think. 15:28:48 Deewiant: Wait, how many files is mushspace exactly 15:28:57 Or do you have hundreds of warnings 15:29:13 $ tup upd |& grep error | wc -l 15:29:13 89 15:29:15 Also, tup monitor -a -f power :-P 15:29:21 Those are all from the same file 15:29:21 Without the power part, that's just my comment 15:29:23 Also the smiley 15:29:58 I doubt that's helpful 15:30:45 Deewiant: It's incredibly helpful for development :-P 15:30:57 Make change, , tab back to terminal, see errors immediately 15:31:01 Or with a split-screen, etc. 15:31:20 Adding the "press up, enter" after "tab back" isn't that bad :-P 15:31:43 Also I don't want to see it scroll by every time I :w, I can read through the 100 errors myself 15:31:52 I don't need to see the updates as it goes to 99, 98, ... 15:32:09 Your loss :P 15:32:17 Adding the "press up, enter" after "tab back" isn't that bad :-P 15:32:19 I consider it a gain :-P 15:32:21 That's why the split-screen is nicer 15:32:24 0 steps versus three 15:32:33 I'd find the constantly scrolling errors even more distracting 15:33:01 I have zero interest in how little of $FUNCTIONALITY compiles until I'm done writing it 15:33:34 It's mostly useful when debugging 15:33:41 Oh, sure 15:33:41 Also, why do you have hundreds of errors in one file 15:33:47 But in this case, it's not very useful 15:33:52 I didn't say it's never useful 15:33:58 Fair enough 15:34:00 But uh, as to how many files, that's probably going to change by a divisor of 2 soonish and then blow up again as I split functionality into files with higher granularity 15:34:25 I am determined to make Shiro have a faster fungespace :P 15:34:37 I'm sure I can beat you in fungicide 15:34:45 elliott: I mean currently this works like http://sprunge.us/LEGH 15:34:56 Deewiant: #pragma push_macro 15:34:59 Yep 15:34:59 Deewiant: Dude, I've taught you bad things 15:35:02 Deewiant: Don't be me 15:35:25 My coming solution to that is to list the .c.in files four times in the Tupfile, with different -DFOO 15:35:27 Deewiant: Have I mentioned that shiro-lahey can support both compile-time optimised dimensions and also arbitrary at runtime thanks to existentials 15:35:33 ~The~ ~Best~ 15:35:41 (And some judicious SPECIALISE pragmas) 15:35:54 My coming solution to that is to list the .c.in files four times in the Tupfile, with different -DFOO 15:36:02 Deewiant: This is why your cc rule should include CFLAGS_[percent]f 15:36:14 Or for instance... 15:36:15 How would that help 15:37:07 !ndcc = |> ^ CC %f^ $(CC) -c %f -o %o $(CFLAGS) -DDIMENSIONS_LOL=$(DIMENSIONS) $(CFLAGS_%f) |> %B_$(DIMENSIONS).o 15:37:09 I don't need per-file flags, I need four different sets of flags which are applied to each file :-P 15:37:17 I guess that needs DIMENSIONS to vary there, which I dunno if is possible 15:37:23 Ask the tup list :-P 15:38:05 I still don't see how CFLAGS_%f is relevant :-P 15:39:25 It isn't 15:39:29 Momentary lapse of thinking 15:41:26 Anyway, 10 .c, 13 .h, 6 _impl.c.in, 6 _impl.h, 1 config.h.in 15:41:51 + a hash table library which is one .h 15:44:03 elliott: man tup sez "The !-macro is not expanded until it is used in the command string of a :-rule." so I guess it's possible to vary it by setting DIMENSIONS_LOL in the Tupfile prior to each relevant :-rule 15:44:22 Deewiant: Right 15:48:38 -!- zzo38 has joined. 15:54:34 shiro is finally cabalised. 15:55:07 Now all it needs is a major cleanup, and I'll put it on GitHub 15:55:17 Deewiant: And then you have to start including it in Mycology results ;-) 15:55:31 All the great Computer Scientists seem to be British, American, or German 15:55:40 Taneb: Dijkstra 15:55:52 Taneb: Wirth 15:55:55 elliott: So does slowdown work yet 15:56:01 Hmm 15:56:06 Deewiant: Excuse me, you need to work with me to disprove Taneb first 15:56:07 :-P 15:56:27 I guess Wirth counts as basically German [simultaneously offends every Swiss on the planet] 15:56:45 Deewiant: But yes, I htink it does 15:56:59 Deewiant: Does Mycology have a permanent git repository location I could submodule? 15:57:04 Okay, it seems all great Computer Scientists' first languages are Germanic 15:57:07 Seems gross to add rsc/mycology to my git repository 15:57:19 Taneb: Probably because you can't read the work of the others 15:57:22 No because I haven't githubbed my stuff 15:57:31 Something I plan to do at some point 15:58:03 I guess I'll mirror all the catseye stuff in a separate repo 15:58:07 Since those don't load in browsers, sigh 15:58:15 Like what? 15:58:41 Deewiant: http://catseye.tc/projects/funge98/library/MODU.html 15:58:55 pikhq went all anal-XHTML-Nazi on him, now I can't access valuable resources without wgetting them 15:59:06 Oh, it was pikhq's fault? heh 15:59:13 Anyhoo, you can "view source" 15:59:17 Well, pikhq whined at Gregor, Gregor had a breakdown and did it 15:59:24 Then cpressey went "hey that looks like fun" 15:59:27 So yeah, all pikhq's fault 15:59:43 Deewiant: I can, but I might as well just try and archive every fingerprint spec I can into one repository and include it as a submodule 15:59:52 Basically a "funge-standards" repository 15:59:52 Taneb: Does Kolmogorov count? 15:59:59 Include the standards we have copies of too, why not 16:00:15 Yeah, sure 16:00:17 Christos Papadimitriou 16:00:29 His first language is Greek 16:01:21 $ dist/build/shiro/shiro rsc/slowdown.b98 rsc/forks.b98 16:01:21 [hang] 16:01:29 Deewiant: So yes, I can run slowdown, unless I fucked up one of the instructions it uses 16:01:31 What's forks.b98 16:01:34 Which is possible, I'm lagging behind on Mycology 16:01:37 Deewiant: Something you wrote 16:01:44 I suggest something like "a,@" 16:02:03 elliott@katia:~/Code/shiro$ cat >test 16:02:03 a,@ 16:02:03 elliott@katia:~/Code/shiro$ dist/build/shiro/shiro rsc/slowdown.b98 test 16:02:03 [hang] 16:02:08 My fungespace is naive dude, this will take years 16:02:09 Although I'm not sure how much the size of the program loaded affects the runtime 16:02:16 Blaise Pascal 16:02:16 Perhaps not much at all 16:02:18 He was French 16:02:21 I mean, cfunge's is naive, but it's naive microoptimised C 16:02:34 And how long does cfunge take 16:02:50 Deewiant: Dunno; you do it as part of fungicide, but your computer is a lot faster than mien 16:02:54 mine 16:02:56 No I don't 16:03:01 fungicide doesn't include slowdown in any shape or form :-P 16:03:02 Oh 16:03:03 I thought you did 16:03:06 Hmph 16:03:07 Well it should 16:03:09 Why doesn't it 16:03:10 Taneb, Allan Turing Was English 16:03:12 >_< 16:03:16 Vorpal: Alan 16:03:20 right 16:03:25 Deewiant: Hey, you'd win even more ;-) 16:03:31 Because fungicide is 100% synthetic benchmarks so that everybody can complain at me for not including "real programs" 16:03:33 Taneb, and what about Donald Knuth? 16:03:36 Although you would have to remove Language::Befunge 16:03:53 Deewiant: I won't complain because my tactics involve code rather than whining :-P 16:04:00 Well 16:04:03 Whining, then code 16:04:06 But that's just as good, right? 16:04:18 If I'm going to do more Fungiciding I'm going to do what I did with Mycology and say "here are the old results which include slow interpreters, from now on I'm only doing the fast ones" 16:04:24 English is a Germanic Language 16:04:25 23013 elliott 20 0 29884 3420 1840 R 101 0.1 2:21.23 shiro 16:04:28 At least it doesn't have a memory leak 16:04:39 Deewiant: So it'll just be me and CCBI once I fix this fungespace? :-P 16:04:51 Deewiant, as far as I remember cfunge manages quite a good turn of speed? 16:04:51 And cfunge and possibly stinkhorn 16:05:07 Deewiant, even beating your code at some cases iirc 16:05:14 Deewiant: cfunge is "fast" for fungicide? 16:05:16 (diagonal growing wasn't it?) 16:05:35 247.7 vs 3628.5 (worst CCBI vs best cfunge) 16:05:45 That's total time dude 16:05:50 So :P 16:05:54 Deewiant: pyfunge is faster than stinkhorn, it looks like 16:05:55 And that's based on an old cfunge 16:05:56 Which is hilarious 16:06:03 No it's not 16:06:08 10281.2 16:06:09 12888.2 16:06:10 That table is sorted correctly you know 16:06:16 elliott: Ran to finish: 74 / 42 16:06:21 Oh 16:06:23 Heh 16:06:24 So 32 timeouts :-P 16:06:29 Or crashes, I forget 16:06:34 What's the difference 16:07:07 And yes, both cfunge and RC/Funge-98 beat CCBI on the diagonal growing 16:07:21 Hmm, I like how right after I eliminate a ton of typeclass overhead I'm looking at adding it back in again 16:07:25 But I won't, it doubled my Mycology time 16:07:39 I know, I'll do something reasonable 16:07:47 Fix my non-fingerprint Mycology BADs 16:07:48 Funny how RC/Funge-98's weird-ass Funge-Space works for it there 16:07:51 And then fix all the GHC warnings I can 16:08:07 (It's something like one linked list of cells for each row) 16:08:11 Wrote to mycotmp0.tmp with o in linear text mode. 16:08:11 GOOD: o removed space prior to newline 16:08:11 UNDEF: o removes spaces prior to newline-valued cells 16:08:11 BAD: i misread or o miswrote 16:08:12 Ugh >_> 16:08:31 247.7 vs 3628.5 (worst CCBI vs best cfunge) 16:08:39 that is because Deewiant never updated it 16:08:41 Deewiant: BTW, if you ever remember/loggrep the structure I mentioned I was considering using for fungespace to you, that'd be great :P 16:08:45 after I fixed that major bug in forking 16:08:56 Yes, that's what I said 16:09:00 Deewiant: I think it was in /msg, FWIW 16:09:28 I wonder if a quadtree/octree/... might work out for me 16:09:31 I can non-/msg-paste relevant things if you like 16:09:53 Deewiant: I was hardly revealing trade secrets 16:10:00 2011-03-25 06:37:41(elliott) Food for thought: Might a bounding volume hierarchy be a smart choice for fungespace? 16:10:04 Ah yes 16:10:04 2011-03-25 07:10:11(elliott) (Thought triggered by random comment on interwebs saying that they're usually more appropriate than k-d trees due to the latter having a higher overhead.) 16:10:16 http://en.wikipedia.org/wiki/File:Example_of_bounding_volume_hierarchy.JPG 16:10:19 Still the best image 16:10:31 Hmm, that actually seems to show a situation inapplicable to fungespace 16:10:35 Because the "shapes" never overlap 16:10:50 "One of the most commonly used bounding volumes is an axis-aligned minimum bounding box." 16:10:52 Dammit Deewiant :-) 16:10:59 :-P 16:11:02 I MUST DO SOMETHING COMPLETELY DIFFERENT 16:11:57 Gah, my fingerprint code is really, really unsatisfactory 16:12:04 I have a typeclass that is always used existentially 16:12:07 So it's basically just an ADT 16:12:14 And it's so ugly and geh 16:13:47 Just blame Vorpal for adding that static allocated area in the first place or we'd be living happily in hash table land 16:14:07 :D 16:14:16 Hashtable Land is the greatest land in the world. 16:14:29 Deewiant: Hey, rename my maybeShiro 16:15:06 maybeShiro :: Shiro () -> Shiro () 16:15:06 maybeShiro m = m `catchShiro` handler 16:15:06 where handler :: IOException -> Shiro () 16:15:06 handler e 16:15:06 | isUserError e = reflect 16:15:07 | otherwise = io $ throwIO e 16:15:16 shiroOrReflect 16:15:17 It used to be MaybeT Shiro () -> Shiro (), but then I optomized :P 16:15:30 Deewiant: catchReflect, then 16:15:51 That works 16:15:52 liftMaybe :: Maybe a -> Shiro a 16:15:52 liftMaybe x = do 16:15:52 Just a <- return x 16:15:52 return a 16:15:52 Here we have a bizarre function that does the right thing only in a catchReflect block :-P 16:16:17 I guess maybeReflect is the best name 16:16:18 And you complain about my code 16:16:20 And ioReflect for ioMaybe 16:16:29 Deewiant: Hey, there's literally no other way to avoid huge nested case stacks 16:16:39 At least I don't have functions that have a dependency on what's on the call stack! 16:16:43 And pattern matches "fail"ing in do context is well-defined behaviour 16:16:47 Deewiant: Uhh, neither do mine? 16:17:05 If the pattern match fails, it's Report-defined to "fail", which my handler catches, and reflects 16:17:08 That's basically what requiring that being in catchReflect is :-P 16:17:26 Weeeeeeeeeeeeeeeeeeeeell 16:17:31 There's basically one thing I could do 16:17:36 Add a phantom parameter to Shiro 16:17:37 as I sit here waiting for apt-get to finish. The follow comic comes to mind: http://xkcd.com/303/ 16:17:42 *following 16:17:45 I can't just stack transformers on top, because it puts me in lift hell 16:17:47 So I need MonadShiro 16:17:51 So everything gets a MonadShiro context 16:17:57 So I have a billion SPECIALISE pragmas or it's fucking slo 16:17:57 w 16:18:01 s/can't/don't want to/ 16:18:07 Deewiant: No, see above 16:18:12 It makes my code twice as slow 16:18:15 That's a "can't" 16:18:25 That's the price of writing in high-level languages 16:18:35 Like C or greater 16:18:38 :-D 16:18:42 I should just do this in asm 16:18:47 Deewiant: No, no, Checkout 16:18:51 Parallel fungespace processing 16:19:13 Although I guess if I write enough inline assembly it'll work out 16:19:21 Hmm... I could have (Shiro a) be (ShiroE () a) 16:19:24 Then catchReflect would be 16:19:39 catchReflect :: ShiroE CatchReflect a -> ShiroE e a 16:19:43 Hmm, wait 16:19:48 (Shiro a) would be (forall e. ShiroE e a) 16:19:54 Right 16:20:05 I spent about 1.5 hours yesterday optimizing "return INT_MAX - a < b ? INT_MAX : a + b" 16:20:10 And then in a fingerprint I could have ShiroE (FingerprintE fptype) for the staet... 16:20:12 But oh wait 16:20:15 How would that stack with CatchReflect 16:20:19 I NEED TYPECLASSES TO CONTROL THE NESTING 16:20:24 LOLOLOLOLOLOLOLOLOLOLOLOLOLOLOLO 16:20:32 Deewiant: Call stack dependencies: THe best. 16:20:39 Anyway it works outside of the call stack, it just doesn't catch the failure. 16:20:45 Just blame Vorpal for adding that static allocated area in the first place or we'd be living happily in hash table land <-- heh 16:23:15 Deewiant: You'll be happy to hear (maybe) that I only get one BAD outside of fingerprints 16:23:21 And it's to do with o's text mode and ugh 16:24:10 unlines . map (reverse . dropWhile (==' ') . reverse) . lines 16:24:10 HTH 16:24:38 textify :: ByteString -> ByteString 16:24:39 textify = B8.unlines . reverse . takeWhile (/= B.empty) . reverse . map (fst . B.spanEnd (== space)) . B8.lines 16:24:40 Deewiant: You were saying 16:24:53 WFM 16:24:59 Deewiant: It's probably i that's the problem 16:25:03 Because, well 16:25:10 Have I mentioned mergeByteString? :P 16:26:18 I wish the funge instructions had some kind of obvious grouping 16:26:21 So I could split Interpreter.hs up 16:28:53 lol bamfdaemon 16:31:49 $ grep -r 'TODO\|FIXME' . | wc -l 16:31:49 14 16:31:51 That few??? 16:31:57 No XXX? 16:32:04 The instruction grouping's in the spec 16:32:17 That just makes me think of comment pornography, and what does XXX even mean 16:32:21 "Cell Crunching - Integers" etc 16:32:40 TODO basically means "Hey do this cleanup/optimisation/etc. sometime", FIXME is "This is really terrible/has an obvious bug/just looks wrong, fix it" 16:33:14 FIXME is for plain old bohr bugs/missing features, XXX is for stuff like "this works but I don't know why", heisenbugs, and the like 16:33:15 Deewiant: Hmm, you're right re: grouping 16:33:21 It's rather coarse, but maybe good enough 16:33:33 When I use XXX I tend to use "TODO FIXME XXX" though 16:33:38 Deewiant: I use TODO for features, basically if there's a TODO, I _could_ ignore it, it'll just make my life worse 16:33:49 FIXME basically means that there's something that has to get addressed, I'm just too lazy right now 16:33:52 And/or don't know how 16:34:04 "TODO FIXME XXX" is good though 16:34:17 Maybe I should use "WTF:". 16:34:19 I only use TODO regardless of purpose or severity and it works fine for me 16:34:48 // XXX: I have no idea why /2 makes this work 16:34:51 That's a good example 16:34:59 Heh 16:35:10 OK, I should really add proper command-line handling to shiro 16:35:15 main = do 16:35:16 args@(filename:_) <- getArgs 16:35:16 program <- B.readFile filename 16:35:16 let st = (fungeStateFromByteString program) { cmdArgs = args } 16:35:16 case fungeSpace st of 16:35:18 FungeSpace m (minX,minY) (maxX,maxY) m2 m3 -> 16:35:18 // XXX: this looks like a hack 16:35:20 Map.size m `seq` Map.size m2 `seq` Map.size m3 `seq` minX `seq` minY `seq` maxX `seq` maxY `seq` return () 16:35:23 It's currently very pro 16:35:24 assert (false); // XXX for debugging only 16:35:25 By pro I mean terrible 16:35:43 Dude, rnf 16:35:47 Dependencies 16:35:48 Instead of Map.size 16:35:59 You know you're going to want threads at some point right 16:36:04 base, containers, bytestring, process, random, filepath, time, directory, unix (will be fixed), mtl, hashtables 16:36:07 Those are all my dependencies 16:36:12 hashtables is overkill 16:36:15 Deewiant: Threads howso 16:36:22 Every program needs threads 16:36:29 Parallel Funge-Space garbage collectors, etc 16:36:43 Deewiant: Well, if I write that debugger/developer... 16:36:55 (Something I've actually thought about doing but most likely never will) 16:37:07 Hmm, I could use cmdargs if I used the pure API 16:37:13 I'm a sensitive person 16:37:19 Can't even use a top-level unsafePerformIO newIORef 16:37:37 But you can depend on the call stack 16:37:38 Nice 16:37:44 If I made the compiler I would make assert(false) compile into an error message (or break into debugger) if debug mode, and into the "unreachable" LLVM command when not debug; this would mix up such things like that... but, then, you could use conditional compilation to make it only for debug, or whatever. 16:37:49 Deewiant: It is not a dependency, I renamed them so that their behaviour is perfectly reasonable 16:38:00 catchReflect :: Shiro () -> Shiro () 16:38:00 maybeFail :: Maybe a -> Shiro a 16:38:02 ioFail :: IO a -> Shiro a 16:38:06 You can use the latter two outside of the first if you wish 16:38:14 They will do as their name suggests 16:38:21 (maybeFail is an unintentionally hilarious name) 16:38:23 Maybe they'll fail, maybe they won't 16:38:39 As unintentional as "pun not intended" 16:38:47 What does "Shiro" mean here? 16:38:59 zzo38: Funge Haskell magic 16:39:06 Deewiant: No, it was unintentional 16:39:07 I only just realised :D 16:40:04 How does Funge Haskell magic work? 16:40:14 By interpreting Funge programs in Haskell 16:40:43 in C++, doing a c-style cast from float to int would just leave the significand right? 16:41:42 Deewiant: Have you used any of the option parsing libraries, I suddenly realise I've never written a command-line Haskell program with a non-trivial interface 16:42:02 Hmm, I wonder 16:42:14 I don't think I have but I'm not sure 16:42:29 also if you have 16:42:39 struct foo { int x; ...} 16:42:39 I've used System.Console.GetOpt I think 16:42:42 Ugh, OK, the one that comes with like, the base libraries, is terrible, [Flag] is not a sane result structure 16:42:45 Yeah, that one 16:42:47 Yeah, I've used that 16:42:50 I guess I'll just use cmdargs 16:42:59 then (int) someStructFoo would be equivalent to someStructFoo.x right? or is there padding and stuff? 16:43:06 What's wrong with [Flag] 16:43:08 record Options{} [a := def += help "hey hey hey", ...] += summary "blah" 16:43:15 Deewiant: Because it should be an options record instead? 16:43:18 It's just semantically bunk :P 16:43:24 Remember that Flag is a type you specify 16:43:27 It's not just like returning (string,arg) 16:43:29 elliott: Just fold over it 16:43:34 It lets you pass a constructor function and everything 16:43:51 Deewiant: Or just use cmdargs which handles it for me :P 16:44:02 Fiiine 16:44:21 I would like if LLVM had a union type, it might allow some optimizations that are not done otherwise, even though you can still make up your own unions in LLVM anyways 16:44:26 Deewiant: More importantly, I need recursive argument parsing 16:44:41 --fprint-turt="--format=svg" 16:45:08 And you can do that with GetOpt :-P 16:45:36 Deewiant: What's so good about GetOpt :P 16:45:42 Nothing in particular 16:45:45 Hmm wait 16:45:46 Wait 16:45:47 ONE 16:45:47 LESS 16:45:48 The fact that it's in base 16:45:48 DEPENDENCY 16:45:50 Yep 16:45:55 YEEEEEEEEEEEEeeeeeeeeeeeessssSSSs 16:47:42 Deewiant: One problem: I have no options right now :D 16:48:02 Shiro/Types.hs:8:8: 16:48:02 Ambiguous module name `Control.Monad.State.Strict': 16:48:02 it was found in multiple packages: mtl-2.0.1.0 monads-tf-0.1.0.0 16:48:03 SFOJISDFNJSDIOFJISNDJLFOJDNGNJG DON GODNF G 16:48:06 I AM GOING TO RIP YOUR SOUL 16:48:07 BETWEEN THE BINDS 16:48:08 OF EARTH 16:48:09 AND HELL 16:48:20 * elliott UNINSTALLS MONADS-TF 16:48:38 * elliott INSTALLS CAB SO HE CAN DO THAT 16:48:44 elliott: Gotta love type families eh 16:49:07 monads-tf may be great, but only one fucking package uses it 16:49:11 Oh my god cab has revdeps 16:49:14 TIHS CHANGE S EVERYTHIN 16:49:14 G 16:50:11 Dammit, the default mconcat on functions isn't composition 16:51:06 data FlipList a b = a :* FlipList b a | Empty 16:51:08 look what I did. 16:52:21 use the Endo monoid? 16:52:51 data TripList a b c = a :* FlipList b c a | Empty 16:53:01 *TripList 16:53:19 er? maybe? I don't know what that is. 16:53:32 -!- tswett has quit (Changing host). 16:53:32 -!- tswett has joined. 16:53:37 Is the single field of a newtype constructor allowed to have the same name as other fields of newtype constructors that the other fields have the same type? 16:53:39 oh, that was for elliott's comment about mconcat 16:54:49 -!- Nisstyre has quit (Ping timeout: 250 seconds). 16:55:06 you could also have the "totally safe" function FlipList a b -> [(a,b)] 16:55:23 Deewiant: Guess what GetOpt can't handle nicely, that's right, things like --help and --version 16:55:24 with the exception that it's not actually safe because it only works with even-lengths fliplists 16:55:31 HMmmmmmmmmmmmmmm 16:55:33 UNLESS 16:55:38 I made them all of type 16:55:42 StateT Options IO () 16:59:42 I wish GHC wouldn't complain when I did 16:59:44 import Data.ByteString (ByteString) 16:59:44 import qualified Data.ByteString as B 16:59:48 without explicitly mentioning ByteString anywhere 16:59:53 It's an idiom, GHC 17:07:05 Is there some pragma to not complain in these cases? 17:08:26 -!- Nisstyre has joined. 17:09:21 Yeah, turn off the warning :P 17:16:24 Deewiant: Is TrieMap ultra-strict by any chance >_> 17:16:42 I don't think I have a single bit of laziness in this entire program :P 17:16:44 It's strict in the key, of course :-P 17:16:48 Real laziness, that is 17:16:55 Rather than unnecessary laziness 17:17:04 And it has ' versions for everything when you want to be strict in the value 17:17:46 It... might even be faster than Map for (Int32,Int32), mightn't it 17:18:03 It'll basically just turn into a nested IntMap, won't it >_> 17:18:15 What, with [Int32] as the key? Yes :-P 17:18:23 Deewiant: With (Int32,Int32) as the key 17:18:39 TrieMap is a trie, it needs a list 17:19:16 Oh right :P 17:21:11 Deewiant: Would me creating a funge-specifications repository make Mycology appear on GitHub faster :- 17:21:12 :-P 17:21:35 No :-P 17:21:43 Are you suuuuuuuuure 17:21:48 What if it was incredibly meticulously organised 17:21:54 Hey, I made the repo already, there's just no content there 17:21:58 s/funge-specifications/funge-archive/ I guess 17:22:10 Since I don't see why it shouldn't have fungicide too 17:22:17 Deewiant: "Created about an hour ago" Pro :P 17:22:33 I find your initial capitals disturbing 17:22:52 I thought you might 17:30:40 Hmph, I should really figure out a way to stack transformers without hell 17:30:57 fpRun :: FPIns -> StateT (globalstate,ipstate) Shiro () is pretty much the exact type I want 17:33:50 -!- Taneb has quit (Ping timeout: 260 seconds). 17:36:17 Deewiant: So how does Shiro handle per-fingerprint sta-- OH YEAH YOU USE AN IMPERATIVE LANGUAGE LIKE TERRIBLE PEOPLE. 17:36:59 s/Shiro/CCBI/ 17:37:02 Oops 17:37:24 Meanwhile I'm really annoyed that Fungi exists, even though I'm pretty sure it's way slower than Shiro 17:37:30 It has a debugger of some kind and everything 17:37:45 (It's N-dimensional and just uses (Map [i])) 17:38:11 Although it does have 17:38:11 , conservativeMinMaxCoords :: !(Conservative (Vector i, Vector i)) 17:38:18 where conservative is some weird 17:38:18 data Conservative a = Precise !a | Imprecise !a 17:38:19 that's a Functor 17:39:10 Oh, it's just so that it can only calculate precise bounds when necessary 17:39:12 Ha, ha, so slow 17:39:38 That doesn't necessarily mean "so slow" :-P 17:40:08 Deewiant: Yes, but when it does, it uses Map.foldWithKey 17:40:15 Ha, ha, so slow 17:41:06 -!- Gregor has set topic: Functor? I hardly knew 'er! | iridium is too mainstream | http://codu.org/logs/_esoteric/. 17:44:13 brb 17:52:49 elliott: Wiki's got some new users that need a banhammer. 18:04:52 Does the IO type in Haskell have any constructors? 18:08:44 zzo38: Well, *technically* it absolutely must have a constructor. *However*, it is in no way exported. 18:08:56 (well. Actually, GHC probably offers a way to get at it.) 18:34:54 -!- Taneb has joined. 19:16:40 Deewiant: https://github.com/ehird/funge-archive 19:16:43 IT BEGINS 19:17:12 I'M WATCHING YOU 19:17:31 People Watching ehird/funge-archive 19:17:31 mcmap 19:17:31 Oops 19:17:37 mcmap created repository funge-archive about a minute ago 19:17:40 Also oops 19:17:43 How about I try this one again 19:18:11 Deewiant: https://github.com/ehird/funge-archive 19:18:13 Try again :P 19:18:19 I'M WATCHING YOU 19:20:46 ^quote 19:20:47 Phantom_Hoover: You have 6 new messages. '/msg lambdabot @messages' to read them. 19:21:15 Does anyone know how to make wget or curl set the last modified date 19:22:28 -S 19:22:44 Ugh, doesn't send 19:29:47 Deewiant: Which standard first had fingerprints? 19:30:12 I don't think there ever were full -96 or -97 standards 19:30:26 But -96 had fingerprints? 19:30:32 I can't remember 19:30:35 Bleh :-P 19:30:54 Befunge-96 and -ninetyseven, right, not Funge? 19:32:05 Or, hmm 19:32:08 Was it Funge-97 19:32:21 is there a language that uses ~= for neq? 19:32:34 Bah, stupid cat's eye with its robots.txt 19:32:46 No Wayback Machine for the Befunge-96 draft :-P 19:32:51 It has no robots.txt 19:32:57 Deewiant: But was it Funge-9seven or Befunge :P 19:33:00 http://liveweb.archive.org/http://www.cats-eye.com/cet/soft/lang/befunge/96.html 19:33:05 Page cannot be crawled or displayed due to robots.txt. 19:33:10 Well, OK, that's a squatter dude :P 19:33:18 Whatevs :-P 19:33:26 Yeah Funge-97 19:34:01 Mostly Befunge-97 19:34:05 Oh 19:34:25 I'm reading the mailing list archives 19:34:34 Deewiant: Look what has actual content: https://github.com/ehird/funge-archive 19:34:41 And commit messages meeting your stringent standards :-) 19:35:20 Fingerprints came in -98 methinks 19:35:27 Okay. 19:35:49 At least this archive doesn't mention them at all :-P 19:35:52 Hmm, separate tests/ directory or just put Mycology in the root and the rcfunge ones with their fingerprints 19:36:00 I'm not going to bundle the old, shitty test suites 19:36:04 Maybe in a bad/ directory 19:37:06 Meh, just put everything in there somewhere and call it old/ instead of bad/ 19:37:17 Yeah, OK :-P 19:37:23 I think I'll bundle fingerprint tests with their spec 19:37:28 So mycology can be in a nice, easily-accessible location 19:40:18 Oops, I think I did a bad 19:40:25 Deewiant: Sorry, I non-permalinked your page 19:40:26 Will fix 19:41:50 elliott: "A *true* Nefunge should be able to handle 2.5D code :-)" 19:41:55 Waiting on Shiro to handle that 19:41:56 Deewiant: X-D 19:42:22 Deewiant: Hey, gimme a oneline summary of slowdown that isn't "slows things down" 19:42:33 And that also isn't "a very slow Befunge interpreter" 19:42:42 Why not "slows things down" 19:42:48 Because I want to be useful :P 19:42:48 Well, brainfuck is turing complete with a maximum loop depth of seven 19:43:00 -!- oerjan has joined. 19:43:07 Deewiant: It's fair to put slowdown in a bench/ directory, right? 19:43:09 It loads Befunge-98 code into a random location in Funge-Space and executes it there after wiping itself out 19:43:16 I wouldn't, that wasn't the intention 19:43:24 anyone familiar with webkit? 19:43:29 Deewiant: Well, I mean, it's designed to show how inefficient certain models are vs. others 19:43:36 To reify the intentions behind it in a classier way 19:43:43 That's closer to a benchmark than anything else 19:43:45 It's speed-related 19:43:47 It was meant to slow down wraparound 19:43:55 Right 19:44:00 But you didn't just write it because you were tapping random keys :P 19:44:05 Or did you 19:44:21 Not to execute a million cycles + push a million cells on stack before even executing the given program, though that ended up happening 19:44:35 Heh 19:44:39 -!- ais523 has joined. 19:44:40 Which is the main "slowdown" noticeable when using it on most programs :-P 19:44:57 Well, where should I put it so that people can find it in a relevant-ish place 19:45:08 I have it in the useful directory called "programs" 19:45:14 I'm focusing on implementers, so bench/ means "look in here to find shit to help you make things go faster by showing you how much you suck 19:45:15 " 19:45:23 ais523, I think there's been some spam 19:45:32 Gregor: BTW, I'm flattered by how you consider me a wiki admin 19:45:37 You can put a README or whatnot in bench/ :-P 19:45:47 And say "also look at foodir/slowdown.b98" 19:46:31 Either I haven't been paying attention or elliott just misread Taneb as Gregor and ais523 as elliott 19:46:31 elliott: I have no idea who is :P 19:46:36 Probably the former 19:46:44 Deewiant: Also, not literally a million, I take it 19:46:56 I honestly can't remember 19:47:00 I think it was over 100k at least 19:47:09 Gregor: the only wiki admin who comes here is ais523 19:47:26 oh wait 19:47:46 cpressey, if you interpret both terms widely :P 19:48:18 oh, it's the privacy-aware dating spambots 19:49:00 because you _so_ trust people who spam with privacy 19:49:45 Deewiant: https://github.com/ehird/funge-archive Behold :-P 19:50:04 TODO: bench/README.md; bench/fungicide 19:50:10 Also tons of other things but that's the short-term 19:51:37 -!- variable has quit (Ping timeout: 250 seconds). 19:53:03 15:53 < CakeProphet> anyone familiar with webkit#? 19:53:03 15:53 < NiFkE> crayon cake wtf 19:53:10 I guess I shouldn't expect much from ##csharp 19:53:28 What :P 19:53:52 he whois'd me immediately 19:53:59 and just commented on my vhost. 19:54:18 CakeProphet: crayon cake wtf 19:54:41 Gregor: are YOU familiar with webkit#? 19:54:48 crayon cake wtf 19:54:54 CakeProphet: you realise that many clients show hostname on join 19:54:55 CakeProphet: Good lawd no 19:54:55 no whois required 19:55:09 I AM TRYING TO FIND ELEMENTS BY ID IN A WEBPAGE USING THE WEBVIEW CLASS BUT IT DOESN'T HAVE ANY METHODS THAT SUGGEST THAT IT IS CAPABLE OF DOING THAT AAAAH. 19:55:37 no DOM-like thing. 19:56:21 -!- Sgeo_ has changed nick to Sgeo. 19:56:53 google images suggests that a crayon cake is simply a cake shaped like a box of crayons 19:57:32 why does C# hate me. 19:58:02 oerjan: There are surprisingly many crayon cake images, too. I wouldn't have thought it was a "thing". 19:58:22 Deewiant: It's not worth archiving fungicide rankings, I take it 19:58:29 i was expecting it to be a term for some specific type of cake... 19:58:46 CakeProphet: it hates everyone 19:58:50 Also neither my tar nor my bash-completion for unxz know .txz which is incredibly irritating 19:58:50 elliott: Archive the interpreters instead and you can recreate them ;-) 19:59:13 Deewiant: So when you download Shiro, you also get Shiro, which includes Shiro, ... 19:59:37 Deewiant: This is intended to be something everyone will ship with their interpreter because, hey, test suites 'n specs 'n shit :P 19:59:41 apparently no one is familiar with webkit on Freenode. 19:59:42 but given that CakeProphet is the second non-image hit on google for the quoted term... 19:59:42 no one. 20:00:05 CakeProphet: You can maybe get the DOMDocument via the WebFrame in the WebView. 20:00:16 -!- sllide has quit (Ping timeout: 252 seconds). 20:00:22 WebFrame looked even less promising than WebView but I'll check again. 20:00:37 elliott: Well, I doubt everyone wants to ship some old benchmark results :-P 20:00:43 yeah there's currently no such thing as the DOMDocument class. 20:00:48 elliott@katia:~/Code/funge-archive/bench/fungicide$ git commit -a 20:00:48 [master 1ca994c] Add Fungicide 20:00:48 1 files changed, 4 insertions(+), 0 deletions(-) 20:00:48 create mode 100644 README.md 20:00:48 elliott@katia:~/Code/funge-archive/bench/fungicide$ git push 20:00:49 fatal: '/home/deewiant/programming/projects/fungicide' does not appear to be a git repository 20:00:51 Deewiant: What 20:00:54 so I guess this is just a shitty binding? 20:01:00 drwxr-xr-x 8 elliott elliott 4096 2011-08-14 21:01 .git 20:01:03 Deewiant: Your .txz contains .git 20:01:12 That can happen 20:01:14 CakeProphet: WebFrame at least has a DOMDocument method in the objc WebKit API. Don't know about the .NET binding. Maybe it uses some .NET-level DOM thing, I think it might have one. 20:02:05 Deewiant: Thankfully it's all text, so the whole repository probably won't be more than half a meg uncompressed 20:02:10 Probably like three bytes compressed :P 20:02:17 Apparently it's 148KB now 20:02:23 fizzie: I think this webkit runs over gtk# 20:02:35 I'll check again as soon as MonoDevelop stops being frozen... 20:02:59 There is at least some sort of Gtk# WebKit thing, yes. 20:03:22 yes, the one I'm using. 20:05:12 there is a hashtable on WebFrame called "data" 20:05:15 Mono's WinDorms implementation has Gecko and WebKit-based thingies, but I suppose those might well be something equally crappy, and I don't suppose you want to use Mono's WinForms mess for the rest of your thing. 20:05:20 but I enumerated over the keys and it's apparently empty. 20:05:39 must be some kind of general metadata thing. 20:06:07 Deewiant: BTW, I take it that Fungicide is public domain or whatever 20:06:16 Since it has no license notice and I don't like the idea of not being allowed to distribute it :-) 20:06:22 This is how copyright law works 20:06:46 Actually not 20:06:56 Are you going to sue me :- ( 20:07:14 (I didn't notice there was no license until after) 20:07:15 Expect a call from my lawyer 20:07:22 I'm shaking in my boots :( 20:07:35 * elliott tries to work out how the hell your insane fingerprint system works. 20:07:40 I'm shaking on the floor, with my boots... 20:07:44 on 20:08:20 yeah there's nothing Dom-like on WebFrame... but there's a findFrame method but I doubt it's what I'm looking for. 20:09:03 if only there were people on IRC that like... knew stuff about these bindings. 20:09:16 I went to #webkit but they were are like "ARRRRGH DEV CHANNEL" 20:09:54 dev channels are serious business. 20:10:01 so 20:10:03 go to the 20:10:03 non 20:10:04 dev 20:10:05 chanenl??? 20:10:22 elliott: What insane fingerprint system 20:10:35 Deewiant: The one that uses D's insane metaprogramming 20:11:01 Unhygienic macros whee 20:11:11 elliott: does such a thing exist? 20:11:12 Deewiant: Never mind unhygienic; not even AST-based 20:11:18 CakeProphet: Presumabmlkajbly 20:11:37 not on freenode. 20:11:47 Deewiant: Hey remember when CCBI two was like ten times slower than the original and blocked on a compiler bug and Vorpal was all HA HA VAPOURWARE 20:11:48 Me too 20:11:48 -!- sllide has joined. 20:12:50 elliott: That bug still isn't fixed (at least officially; I haven't tested) 20:13:56 Deewiant: Your stack is still strictly push/pop right? :-P 20:14:02 I remember Vorpal going on about his EFFICIENT STRING PUSHING 20:14:18 Err, somewhat 20:14:42 Deewiant....... 20:14:43 I think there might be some "gimme the top N cells" thing which just happens to be a single memcpy 20:14:44 What have you done.............. 20:14:50 Deewiant: SOME OF US use linked list stacks 20:14:58 And you suffer for it 20:15:38 Deewiant: Not nearly as much as I suffer for my fungespace 20:15:39 Probably 20:15:43 Hmm, maybe I should optimise the stack first 20:15:46 That's the lowest-hanging fruit ever 20:15:49 Actually that's not true, coordinates are 20:15:51 I'm using tuples 20:15:54 Boxing + laziness 20:16:05 At the same time (x,y) is a nice syntax....... 20:17:07 (# x,y #) 20:17:18 Deewiant: Now I can't use it as a function argument; sweet 20:17:31 Your functions have the wrong kind 20:17:38 Clearly 20:17:38 lol 20:17:56 Deewiant: Whenever you turn TRDS on in CCBI or, well, anything, it immediately starts leaking tons of memory forever, right? 20:18:00 Or at least I don't see how it would avoid doing so 20:18:28 "Starts leaking" sounds a bit bad :-P 20:18:34 It takes a snapshot of the current state, yes :-P 20:18:41 Well, it's memory, and it can never be reclaimed, and 90 percent of it is garbage 20:18:50 That's the definition of a leak 20:18:50 But it's a one-time hit 20:18:57 Oh 20:19:05 So if you travel back in time it just goes to the start and simulates until then? 20:19:07 "Starts leaking" sounds like it loses memory every tick or something 20:19:08 Yep 20:19:11 I thought it saved every state and just rewound to that 20:19:18 Deewiant: That's lame for things involving IO, it's not a real TARDIS :P 20:19:29 It's the only reasonable way of doing it :-P 20:19:35 ...and am I right in thinking that taking a snapshot of the state as of when TRDS was loaded, as opposed to at the beginning of the program, is stretching the spec? 20:19:37 Unless you have a fancy Funge-Space with a lot of sharing 20:19:46 In which case you might be able to do it even for many ticks 20:19:57 No, you're not 20:20:10 TRDS explicitly has a "earliest tick I can go to" command 20:20:14 And it can be anything 20:20:32 You could implement it as only ever allowing going to the future if you want to be a jerk about it :-P 20:21:02 -!- monqy has joined. 20:21:27 Or maybe it requires it to be in the past, but I doubt Mike would've been that precise about it 20:21:39 Heh 20:21:55 Well 20:21:56 Deewiant: Not nearly as much as I suffer for my fungespace <-- what is your fungespace? 20:21:59 The state at the start is easy 20:22:04 You just need to store the contents of the file 20:22:12 I think there might be some "gimme the top N cells" thing which just happens to be a single memcpy <-- used for stack-stack no doubt? 20:22:14 Vorpal: Yours, plus constant-time wrapping 20:22:36 data FungeSpace = FungeSpace { spaceMap :: Map Vector Value 20:22:36 , minCoords :: Vector 20:22:36 , maxCoords :: Vector 20:22:37 , rowPopulation :: Map Value Value 20:22:37 , colPopulation :: Map Value Value } 20:22:37 deriving (Show) 20:22:59 Modulo the fact that Map is a (non-balancing?) binary tree and not a hash table 20:23:35 It's also not micro-optimised bullshit, but it's the same structure theoretically, which is what matter 20:23:35 s 20:23:57 Well, a tree's a different data structure from a hash table :-P 20:24:08 But yes it's an "associative array" 20:24:14 Or whatever you want to call it 20:24:21 Key-value store 20:24:56 i'm pretty sure Map is balanced. 20:25:24 a red-black tree iirc 20:25:49 The implementation of Map is based on size balanced binary trees (or trees of bounded balance) as described by: Stephen Adams, "Efficient sets: a balancing act", Journal of Functional Programming 3(4):553-562, October 1993, http://www.swiss.ai.mit.edu/~adams/BB/. J. Nievergelt and E.M. Reingold, "Binary search trees of bounded balance", SIAM journal of computing 2(1), March 1973. 20:27:24 Deewiant: Your fingerprint mechanism essentially reduces to a big ol' list of fingerprint objects, right? 20:27:27 Once all the metaprogramming crap is done 20:27:38 I'm trying to take inspiration from systems solving totally different problems to mine ;D 20:28:25 fingerprinting should be done with finger trees, obviously 20:28:46 oerjan: dont make me get that picture out again 20:29:01 -!- NihilistDandy has quit (Ping timeout: 260 seconds). 20:29:11 Is there such thing as a cellular automaton where the cells are in a tree? 20:29:15 no need, my brain looked it up 20:29:55 -!- Nisstyre has quit (Ping timeout: 250 seconds). 20:30:17 Taneb: hm well if you use a free noncommutative group as your space structure, you can get something like that 20:31:20 -!- NihilistDandy has joined. 20:32:37 like, up and down are still inverse, as are left and right, but going around in circles _without_ retracing your path does not end up at the same point 20:33:01 elliott: Something like that yeah 20:33:15 Deewiant: Right 20:33:16 it's still a group, so still uniform 20:33:19 Taneb: I think it would essentially be a tree-rewriting language with a fixed set of rewrite rules;. 20:33:38 I could have a pretty near-perfect system if I could just get this stupid typeclass shit working 20:33:49 CakeProphet: well one where you can only change the tree _labels_, not the structure 20:34:06 ah yeah 20:34:20 -!- PatashuWarg has joined. 20:35:34 oerjan: dont make me get that picture out again 20:35:38 What picture? 20:35:41 Phantom_Hoover: NO 20:35:45 hm i suppose an infinite binary tree is more like the free group on three generators. oh hm the thing that makes that not quite a group is that to reverse going up, you must sometimes go down left and sometimes down right 20:35:49 elliott, WHAT PICTURE 20:35:58 Phantom_Hoover: NOOOOOOoooooooOOOooooooooOOOOOOOOOOOOOOOOOOOoOOOOOoooooOOOOoooOOOooooooooooo 20:35:58 oerjan, why 3? 20:36:22 elliott: what picture? 20:36:22 Phantom_Hoover: 3 edges from each node, up, down left and down right? 20:36:27 or wait hm 20:36:32 Only for a binary tree 20:36:36 olsner: NOoooooOOOOOOOOOOOOOOOOooooooOOOOOOOOOOOOOOOooooOOOOOOOOOOOOOooooOOOOOOOOOOOoooooooooooooOOOOOOOOOOOOOOOOOOOOOooooooooooooOOOOOOOOOOOOOOOOOOOOOooooooooooooOOOOOOOOOOOOOOOOOOOOoooooooooooOOOOOOOOOOOOOOOOOOOOOOooooooooooooooooooooooooooooo 20:36:58 Phantom_Hoover: well it doesn't fit properly because "up" doesn't have a unique inverse 20:37:22 Deewiant: Ew, ugly, each fingerprints' IP-specific state is going to be stored with its global state, not with the IP object. :/ 20:37:28 As in, a separate (Map IP IPState) in the fingerprint state. 20:37:29 essentially you have two kinds of nodes, left and right ones 20:37:30 This makes me sad. 20:37:51 oerjan, *ternary* trees, now... 20:38:58 Phantom_Hoover: even worse, now the inverse of "up" has _three_ options... 20:39:17 oerjan, sure, but at least the isomorphism is more obvious. 20:39:20 Unary trees: isomorphic to linked lists? 20:39:21 hm unless maybe you lay it out differently 20:39:32 Taneb: pretty much? 20:39:35 sheesh not even oerjan cut in to tell me I'm a bad person 20:40:41 Phantom_Hoover: oh right ternary trees work. in fact that's probably precisely what F_2 gives you (free group on two generators) 20:41:00 Well, it's ruined a bit by the fact that the root node has 4 leaves. 20:41:32 Phantom_Hoover: um no root, _everything_ has four edges. to make this work you have to not really think of parents 20:41:55 Which ignores the original proposal completely 20:41:58 oerjan, yes, but n-ary trees generally have a root node, no? 20:42:06 A cellular automaton on a tree 20:42:06 not formally. 20:42:35 >_> I think? 20:42:53 the root is just arbitrarily chosen. 20:43:01 Phantom_Hoover: i'm just pointing out that the free group on two generators has the structure of a ternary tree, although the directions are not intuitively matched in the same way 20:43:32 trees don't need to have roots, a rootless tree is just a connected acyclic graph 20:43:39 though I guess to be n-ary you actually do need a root... 20:43:55 oerjan, hence 'n-ary'. 20:44:01 So, a cellular automaton on a tree is possible 20:44:08 because the root has n edges but every other node n+1 edges. 20:44:11 And isn't called anything else as far as we are aware? 20:44:16 although the "n-ary" term is intuively based on a rooted tree, since non-leaves have n+1 20:44:48 http://en.wikipedia.org/wiki/Unrooted_binary_tree but that's just a rather arbitrary term. 20:44:56 can't see the forest through all of the trees. 20:45:00 oh wait, yes you can. 20:45:41 forest is such a stupid way to say acyclic graph... 20:46:09 well, non-connected as well. I guess it's shorter to say 20:47:23 But do note that to a mathematician, a single tree is already a forest. 20:47:48 fizzie, how so? 20:47:56 oh yes the special case of 1 20:48:10 I guess it's not a "proper forest", though. 20:48:16 Compare subset/proper subset. 20:48:26 So maybe it's intuitive enough. 20:48:43 ?pl \x -> (f x, x) 20:48:44 (,) =<< f 20:48:55 first f . join (,) 20:49:10 best forest: {} 20:49:38 best forest: your mom 20:49:59 Is it possible to define a tree as a recursive tuple? 20:50:05 I have to say that wine is getting bloody amazing. I'm using a shader-heavy DirectX 9c program and there are absolutely no issues in it 20:50:38 Like t is a tuple (bit,bit|t,bit|t) 20:51:03 Is that even a tuple? 20:52:45 apart from syntax, it's pretty much a haskell algebraic datatype 20:53:14 $ cabal 20:53:14 The program 'cabal' is currently not installed. To run 'cabal' please ask your administrator to install the package 'cabal-install' 20:53:14 ^ sadness 20:53:43 data T = T Bit (Either Bit T) (Either Bit T) 20:53:51 fizzie: That's not a hard problem to solve 20:54:16 fizzie, are you your administrator or are you actually (gasp) using a multi-user system? 20:54:28 Phantom_Hoover: I am not an administrator there, no. 20:54:44 Though generally "please install X for me" tickets have been solved in a day or so. 20:54:45 :O 20:55:07 fizzie, how are you not administrator on everything ever you are so trustworthy. 20:55:09 I wonder what would happen if I installed every package in all of my repos 20:55:26 more likely to be written something like data T = Leaf Bit | T1 Bit T | T2 Bit T T 20:55:27 Phantom_Hoover: It's at work, there's a Policy(tm). 20:55:37 er wait 20:55:38 fizzie, SO TRUSTWORTHY 20:55:43 not the same 20:55:46 $ cabal 20:55:46 The program 'cabal' is currently not installed. To run 'cabal' please ask your administrator to install the package 'cabal-install' 20:55:46 ^ sadness 20:55:54 fizzie: You want to run your own GHC really 20:55:58 The distro packages are Really Bad. 20:56:09 Howso 20:56:12 Binary GHC package + source Haskell Platform is usually pretty painless 20:56:20 Deewiant: If you just use distro packages, everything is fine 20:56:28 Deewiant: If you mix and match with native cabal, version conflicts ahoy 20:56:32 And if you ever get a package from both, god help you 20:56:37 And you will because cabal is terrible 20:56:40 I haven't run into problems thus far 20:56:55 But I haven't been using Haskell heavily lately so maybe I've been lucky 20:57:04 http://www.vex.net/~trebla/haskell/sicp.xhtml has a bunch of boring information on it 20:57:19 Admittedly Arch is likely to have less problems than Debian in this area 20:57:28 But distros lag behind for GHC anyway 20:57:49 elliott: of course cabal is terrible, it's written by Haskell-using eggheads. bahahahahaha! 20:57:52 >_> 20:58:41 they probably love Woodrow Wilson. 20:59:36 The system in question is Ubuntu 10.10, and it has ghc6 and a random sampling of libghc6-foo-dev packages (hunit, mtl, network, parsec2, quickcheck2, regex-base, uulib, x11, x11-xft, xmonad-contrib, xmonad, zlib) installed from the reposies. 21:00:05 only US president that had a Ph.D 21:00:20 In what? 21:00:49 ais523: them spammers are being persistent today 21:01:01 history and political science 21:01:09 Not bad 21:01:16 wow, indeed 21:01:30 and I'm just an admin, and they registered accounts, so I can't give them more than a 24-hour block even if I thought it would help 21:02:00 eek 21:03:43 -!- elliott has quit (Ping timeout: 252 seconds). 21:03:47 you need checkuser privileges (if the extension is installed), or db access privileges (if it isn't), to do a longer block than that 21:03:55 I can block the accounts themselves, but that's pointless 21:03:58 as they just make the one post 21:04:18 okay so... anyone know anything about webkit# or gtk# 21:05:17 "Wilsonianism calls for the United States to enter the world arena to fight for democracy, and has been a contentious position in American foreign policy." 21:05:21 you don't say. 21:05:24 CakeProphet: I know that from a brief look the webkit-sharp binding looks really bare. 21:05:41 -!- elliott has joined. 21:05:49 f &&& id 21:05:53 fizzie: awesome. 21:05:59 mabybe I should find another set of tools. 21:06:11 21:01:30: and I'm just an admin, and they registered accounts, so I can't give them more than a 24-hour block even if I thought it would help 21:06:14 huh what 21:06:15 :t (&&&) 21:06:16 forall (a :: * -> * -> *) b c c'. (Arrow a) => a b c -> a b c' -> a b (c, c') 21:06:18 oh 21:06:22 you mean block their ip 21:06:23 right 21:07:07 so then what's something I can use in mono that a) renders webpages b) has a DOM interface 21:07:13 maybe there's Gecko bindings. 21:07:18 Oh god 21:07:18 Deewiant: is it good to base my encapsulation mechanism on module scope or is it better to have something ever so slightly uglier that is type safefwfe.......... 21:07:23 I know these spambots 21:07:30 The mezzawiki was haunted by them 21:07:33 CakeProphet: There seems to be one "good" (for some values of good) .NET binding of WebKit, and that's Awesomium, which is some sort of proprietary-commercial thing that has free-as-in-beer licenses, and the Mono support seems rather... like an afterthought, if even that. 21:07:39 elliott: Type safety is good 21:07:45 The owner eventually blocked new user account regisration 21:07:47 Deewiant: thisis true 21:07:49 The owner being DMM 21:07:59 fizzie: so what you're telling me is 21:08:04 I should find Gecko bindings. 21:08:08 fpREFC :: Fingerprint 21:08:08 fpREFC = 21:08:08 Fingerprint 21:08:08 { fpName = packName "REFC" 21:08:08 , fpInitialGlobalState = newRefStore 21:08:09 , fpInitialIPState = return () 21:08:11 , fpHandles = [D,R] 21:08:13 , fpRun = run } 21:08:15 much nicer than a class instance 21:08:19 or use something like jssh to drive Firefox 3.6 with Javascript. 21:08:23 also probably much less stupid oevrhead 21:08:25 plus 21:08:27 about ten fewer language extensions 21:09:16 CakeProphet: Well, I don't know what you want. But I think there is a Gecko binding for the embed-gecko-in-gtk scenario. I don't know how well that one does the "expose DOM to .NET" thing. 21:09:38 fizzie: the person who hired me is working on a browser automation scripting engine thing. 21:09:45 and wants a linux port... using basically anything. 21:10:11 I can use any kind of backend to display and control a rendered web page. 21:10:18 Deewiant: techiecniecialy it is typjepesafe... it would just mean that fingerprints could (theoretically) access the data of other fingerprints, if the module exports did not prevent that 21:10:24 but it has to work with Mono/C# 21:10:42 I guess it would be frontend actually. a rendering engine is a frontend. :P 21:10:47 elliott: Some fingerprints need to interact anyway 21:11:00 Deewiant: Hmm, like what 21:11:03 That would poke a major hole in my model ;-) 21:11:04 SOCK/SCKE :-P 21:11:22 Deewiant: Bleh 21:11:27 Blame fizzie for that one 21:11:36 The mezzawiki was haunted by them <-- btw last i checked i couldn't find any link to the mezzawiki on any of the iwc, d&d or mezzacotta frontpages 21:11:39 fizzie: shakes fist 21:11:50 oerjan: It was very secretive 21:12:02 Deewiant: I'll probably do that one by adding the shared socket state to FungeState directly 21:12:08 oerjan: http://mezzacotta.net/wiki/Main_Page 21:12:23 Vorpal: How's ATHR 21:12:32 Yeah, SCKE was not really a good idea. But perhaps you can opt to just support the (nonexistant) NSCK. 21:12:46 CakeProphet: Well, gecko-sharp is at least part of mono, based on the fact that the download links point to ftp.novell.com/pub/mono/sources/. It might not do the DOM any better though. 21:13:28 fizzie: Has anyone who isn't you ever used SCKE? 21:13:42 elliott: Not to my knowledge, no. 21:14:13 Actually I'm not really sure "used" is a right word for my case either. 21:14:15 fizzie: I'll implement it anyway out of general masochism but we could just bribe you to stop using it. 21:14:21 The same goes for SOCK :-P 21:14:32 Because fungot doesn't use it either, I never got that HTTP client part done. 21:14:32 fizzie: you have a great appreciation for the fine arts. you use the hammer and nails. they will come a day 21:14:57 fizzie: well seeing as webkit# seemingly has no DOM at all, anything would instantly be "better" 21:15:04 Deewiant: There are more Funge implementors in the world than programmers, which wouldn't be surprising (see brainfuck) if not for the fact that it's so damn hard to implement and quite easy to code in 21:15:37 Vorpal: How's ATHR <-- feeling well 21:15:38 I shouldn't've made Mycology, it made it too easy to implement 21:15:47 just asked it 21:15:52 Vorpal: Is it implementable 21:15:55 Deewiant: Speak for yourself 21:15:58 elliott, forgot XD 21:16:23 Deewiant: Also try to avoid generalising based on Vorpal's ability to copy CCBI code ;-) 21:16:30 See with you, I just coerced the code out in English form slowly. 21:16:54 oerjan: It was very secretive <-- oh so it's not _intended_ to be findable by ordinary visitors? 21:17:20 CakeProphet: Well, I grepped the Gecko.WebControl APIdoc .xml file (I can't figure out how to actually show that with monodoc without installing it somewhere, and it's not easily findable in the web) and the only thing matching "dom" (case-insensitively) is some event-handlers. 21:18:11 fizzie: It might be like .getDocument 21:19:14 Deewiant: I'd say it really hasn't made it too easy to implement. 21:19:30 Says someone who's never done it 21:19:47 Deewiant: Just harder to unintentionally fuck it up. 21:19:54 Really at this point it's a vehicle for me to show how awesome Haskell is ;-) 21:20:26 And also to convince fizzie that he should run fungot on it, once I can prove it runs faster than cfunge. 21:20:26 elliott: just be patient, the answer, the fact remained except the pony a begrudging pat, as gently in the horn fell off. dammit. 21:21:14 elliott, as far as I remember most of ATHR is implementable but not really the inter-thread communication stuff 21:21:25 that needs reworking 21:21:47 Vorpal: Please let me know when it exists, it'll be fun figuring out interactions between it and TRDS 21:22:05 elliott, well I will leave that part completely up to you 21:22:22 Vorpal: What part 21:22:25 elliott, I would assume TRDS happens inside each ATHR thread, but bugger all of you go back past a ATHR fork 21:22:43 elliott, the part of figuring out interactions 21:22:44 elliott: muuuuuuuuuuuuuuuuuudem 21:24:01 Gregor: Can't you fix the three lines that need changing yourself :P 21:25:06 Are there only three lines that need changing? 21:25:46 Last I recall, it's still in non-buffering land. 21:25:57 fizzie: well uh... apparently C# bindings suck. 21:26:01 and I just need to use jssh. 21:26:02 Gregor: Uhh, both ends use select 21:26:05 And buffer 21:26:12 I don't know WHICH three lines need changing 21:26:16 But it should, conceptually, work 21:26:41 Ahhhhhhhhhhhhhhhhhhhhhhhh 21:26:55 Gregor: Just see my latest sprunge links :P 21:26:59 Whenever those were 21:27:41 http://sprunge.us/CUiE is the latest I have 21:27:44 CakeProphet: The browser backends supported by monodoc are Gecko, GtkHtml, WebKit and MonoWebBrowser; you'd probably have to pick one of those to actually render a page. All of them seem quite hacky. (And GtkHtml will not support much of anything.) 21:28:45 Gregor: Looks right to me 21:28:51 Gregor: It selects on both ends, it has buffers 21:29:00 Just Doesn't Work(tm) 21:29:21 I'm too tired to debug it today, I'll have a look tomorrow if you don't miraculously twiddle it into workingness :P 21:29:31 Pff 21:29:49 software problems | Functor? I hardly knew 'er! | http://codu.org/logs/_esoteric/ 21:29:53 -!- CakeProphet has set topic: software problems | Functor? I hardly knew 'er! | http://codu.org/logs/_esoteric/. 21:29:56 :3 21:30:10 funky 21:30:46 CakeProphet: At least Mono.WebBrowser's IWebBrowser interface has a Document property that gives you an IDocument, which is from a Mono.WebBrowser.DOM namespace, which seems to have interfaces corresponding to a DOM tree. 21:31:05 (The underlying machinery there is Gecko via gluezilla.) 21:31:11 fizzie: this is good... 21:32:11 lol gecko 21:32:19 (I have no idea why none of this shows up in the online monodoc thing; I had to fetch the mono-2.10.2.tar.bz2 source-ball and peek at the .cs files in mcs/class/Mono.WebBrowser/.) 21:32:53 fizzie: what does WebBrowser render on top of? 21:32:56 gtk#? 21:33:39 CakeProphet: That's a good question; it's official use case is to be the browser control in the Mono WinForms implementation. 21:33:55 Oh. 21:34:10 "Mono.WebBrowser is also a class library, but a private one (i.e., it's in the gac but can't be "discovered" by pkg-config tools since it doesn't ship a .pc file. It can obviously be linked to directly). Winforms depends on it directly, and it exposes interfaces that hide browser engine implementation details. The interfaces are more in line with the DOM spec, but are not as complete, mainly because the .NET Winforms WebBrowser control is not feature-complete i 21:34:10 n itself." 21:34:22 Heh, it doesn't sound terribly usable as a standalone component. 21:35:19 uuuugh 21:35:32 that entire paragraph 21:35:40 is pretty much nonsense to me. 21:36:36 As far as I can tell it translates mostly down to "it's not really meant to be used directly, just by the WinForms browser control". 21:37:18 I don't know how "serious" that is and whether some stuff does in fact use it directly. 21:37:35 At least there is an interface there. (It abstracts over Gecko and WebKit backends, turns out.) 21:37:44 elliott: I think I know the problem. If you have no data to send, you should not have it in the write set for select(). IIRC, it will only signal that the write buffer is ready once; you must write() at least once for it to signal again. 21:37:58 Gregor: Ah. 21:38:10 Easy enough to fix, just filter for non-empty write_buffer 21:38:24 Oh, except that conns don't know their conn_id 21:38:36 But whatever you can just get it from handle_for_id and then add the stdio thing 21:38:36 elliott: Nope, I'm a terrible liar. 21:38:41 derp 21:39:30 elliott: Although I /do/ think it will be a busy loop that way, that doesn't seem to be the bug. 21:39:30 Gregor: Go on 21:39:39 Yay :P 21:40:00 (Still verifying) 21:40:39 select is level-triggered, isn't it not? It'll keep telling you "yes you can write" as long as you actually can write. 21:40:56 fizzie: Yup. 21:41:07 Which makes this a busy loop, which is less than ideal, but not the bug :P 21:41:24 Gregor: Have I mentioned how easy this would be in @ :-P 21:41:28 Seriously Unix IO is so terrible AUGH 21:42:32 elliott: What the bloody huh? host.py is in a loop of thinking it can read from stdin, then reading nothing ... 21:43:47 fizzie: can't seem to find Mono.Mozilla or Mono.Webkit 21:44:36 Gregor: Hmm 21:44:39 Gregor: That means stdin is EOF 21:44:47 I just assumed EOF would never happen :D 21:45:29 Oh, lul, didn't notice socket.error: [Errno 98] Address already in use 21:45:44 lol 21:49:46 elliott, EOF on stdin can happen easily. 21:51:39 No shit 21:53:23 fizzie: so yeah there's an IWebBrowser interface but there doesn't seem to be an actual base class. 21:53:34 now to construct 21:53:56 forall cat a r. (Category cat, forall b. Applicative (cat b)) => a -> cat (cat (a, cat a a) r) r 21:54:01 CAN IT EVEN BE DONE 21:54:26 ?djinn forall cat a r. (Category cat, forall b. Applicative (cat b)) => a -> cat (cat (a, cat a a) r) r 21:54:27 Cannot parse command 21:54:31 Signs point to "no" 21:54:34 Deewiant: That's not even a valid Haskell signature 21:54:35 With any extensions 21:54:44 Can't forall in a context like that 21:54:51 And djinn doesn't even begin to handle half of any of that anyway :P 21:55:47 elliott, what is djinn? 21:55:54 A thing 21:56:02 ?djinn (a -> b -> c) -> (b -> a -> c) 21:56:02 f a b c = a c b 21:56:12 ?djinn a -> (b -> a) -> Maybe b -> a 21:56:12 f a b c = 21:56:12 case c of 21:56:12 Nothing -> a 21:56:12 Just d -> b d 21:56:16 10:10:02 data Conservative a = Precise !a | Imprecise !a 21:56:16 10:10:03 that's a Functor 21:56:18 ?djinn (a -> a) -> a 21:56:18 -- f cannot be realized. 21:56:35 err, can't it? 21:56:45 no it's not it breaks on fmap (const True) . fmap (const undefined) >:) 21:57:07 -!- variable has joined. 21:57:14 Vorpal: not in a logically sound manner 21:57:15 oerjan: wat 21:57:19 heh 21:57:21 elliott, okay that is true 21:57:32 ?djinn a -> a 21:57:32 f a = a 21:57:41 ?djinn a -> b 21:57:41 -- f cannot be realized. 21:57:43 hm right 21:57:52 ?djinn a -> b -> b 21:57:53 f _ a = a 21:57:59 ?djinn a -> a -> a 21:57:59 f _ a = a 21:58:03 elliott: I think somebody's disagreeing on the protocol somewhere ... 21:58:09 well there are a lot of interpretations for that 21:58:13 Gregor, btw what are you doing? 21:58:25 elliott: After getting the initial connection command, the host is receiving a command of length 1, unprintable character. 21:58:28 Vorpal: MAGIC 21:58:49 Gregor, the gathering? 21:58:49 elliott: Specifically, 0 ... 21:59:03 Gregor: Nice :P 21:59:11 Gregor: It might be a write string call or whatever 21:59:14 Gregor: Guest might not be sending "c" 21:59:18 Gregor, I bet zzo38 will be interested in it if it is that 21:59:24 well there are a lot of interpretations for that 21:59:29 Vorpal: All proofs are indistinguishable 21:59:38 elliott: What the heww? Why was handle_connection sending the error code back? 21:59:46 Gregor: Oh 21:59:48 elliott, err. Hm 21:59:51 elliott: err = read_short() \n write_short(err) # whuuuu? 21:59:52 Gregor: Probably it meant to send to the "TCP client" 21:59:54 Who does not exist any more 21:59:59 And I forgot that you have to specify destinations 22:00:01 Yeah 22:00:16 elliott: You'se gots lots o' protocol problems here, bub 22:00:46 Gregor: Just remove the write_short(err) :P 22:01:02 elliott, err. Hm 22:01:02 elliott: err = read_short() \n write_short(err) # whuuuu? 22:01:17 hm... seems I'm clairvoyant 22:01:38 (I even got the column of the text right) 22:01:56 Vorpal: i think ?djinn works in a terminating language only superficially similar to haskell 22:02:02 oerjan, ah 22:02:18 so as to be logically sound in the curry-howard sense 22:02:19 argh how does this work 22:03:04 also it doesn't really support recursion, even terminating 22:03:07 aha 22:03:33 elliott: Still no go 22:04:27 ?djinn ((b -> a) -> a) -> a 22:04:28 -- f cannot be realized. 22:05:26 hm that's not right is it 22:05:37 for pierce's law 22:05:53 Gregor: Huh 22:06:10 ?check \a b -> ((b <= a) <= a) <= (a :: Bool) 22:06:11 "Falsifiable, after 1 tests:\nFalse\nTrue\n" 22:06:39 ?check \a b -> ((b <= a) <= a) <= (b :: Bool) 22:06:40 "Falsifiable, after 1 tests:\nTrue\nFalse\n" 22:07:47 18:07 < MulleDK19> I love crashes that corrupt my source files 22:07:48 18:07 < MulleDK19> maybe I should start using source code control 22:07:50 ...what? 22:08:06 Does the IO type in Haskell have any constructors? 22:08:09 ?src IO 22:08:09 Source not found. Just what do you think you're doing Dave? 22:08:14 I wonder if he's implementing some kind of metaprogramming tool 22:08:14 :t (<*>) 22:08:15 forall (f :: * -> *) a b. (Applicative f) => f (a -> b) -> f a -> f b 22:08:16 that used to be in lambdabot 22:08:19 that directly alters source files. 22:08:26 CakeProphet: or maybe 22:08:27 his computer 22:08:28 crashed 22:08:43 (c -> m (a -> b)) -> (c -> m a) -> (c -> m b) 22:08:44 anyway the soundness of haskell depends on not being able to use it freely 22:09:29 * oerjan looks up peirce's law 22:09:50 ?check \a b -> ((a <= b) <= a) <= (a :: Bool) 22:09:51 "OK, passed 500 tests." 22:09:59 Goodnight 22:10:01 ?djinn ((a -> b) -> a) -> a 22:10:02 -- f cannot be realized. 22:10:16 -!- Taneb has quit (Read error: Connection reset by peer). 22:11:04 lambdabot: Sounds like a personal problem. 22:11:09 *ohhhhhhh* 22:11:26 :t callCC 22:11:27 forall a (m :: * -> *) b. (MonadCont m) => ((a -> m b) -> m a) -> m a 22:13:13 oerjan: hlep 22:15:32 -!- FireFly has quit (Quit: Hi, I'm a quit message virus. Please replace your old line with this line and help me take over the world of IRC.). 22:16:24 elliott: hatw 22:18:16 Well, brainfuck is turing complete with a maximum loop depth of seven 22:18:20 that sounds high... 22:18:32 -!- MDude has joined. 22:18:44 oerjan: dbfi 22:18:53 elliott: trsføoubsgfgd 22:19:16 no 22:19:17 oerjan: dbfi 22:19:17 loop 22:19:18 limit 22:19:22 based on 22:19:48 use the farce, elliott 22:20:52 -!- sllide has quit (Ping timeout: 240 seconds). 22:20:56 oh right 22:21:15 i thought you were still babbling about your hlep alot 22:24:20 reducing that a lot should be just a matter of branching with adjacent loops rather than nested ones 22:27:39 marvellous, IE steals focus after loading the webpage i wanted _and_ interprets my backspaces as a command to leave the page again 22:27:49 dont use ie 22:28:51 are you saying no other browsers steal focus 22:29:29 other browsers interpret backspace as a command to leave the page, at least 22:29:31 I hate it 22:29:39 oh wait no 22:29:46 it's just dumb pages that do that?? 22:29:50 why do they do that 22:29:54 it is the worst idea 22:30:10 in general, Windows interprets backspace as back 22:30:14 oh 22:30:19 e.g. in directory listings 22:30:32 on Linux, the most common binding seems to be alt-left 22:30:39 are you saying no other browsers steal focus 22:30:52 chrome has never stolen my focus 22:31:02 oerjan: and chrome remembers form details on returning to a page through history 22:31:04 as does firefox 22:31:08 making it much less annoying 22:31:09 ais523: alt-left also works, it's what i use when i do it deliberately 22:31:14 dunno if ie does that nowadays 22:31:24 * Sgeo starts reading why's poignant guide to ruby 22:31:32 chromme appears not to do backspacery when there isn't javascript that makes the backspacery happen 22:31:39 why anyone would make that javascript is beyond me 22:31:52 Backspace = back is pain 22:32:20 i can do a lot of grumbling about how programs should not interpret text entry keys as commands but it all stumbles into the fact i use vim :P 22:33:31 well at least vim has different modes for that stuff and is generally predictable about it??? 22:33:45 i've several times been annoyed when i accidentally typed an n or a q into simon tatham's puzzle windows 22:39:55 -!- elliott has quit (Ping timeout: 246 seconds). 22:44:21 -!- Nisstyre has joined. 22:47:40 oerjan, vim???? DIE 22:48:03 * Sgeo starts reading why's poignant guide to ruby 22:48:13 I thought you'd already loved and lost Ruby. 22:48:30 Did I ever say I loved it? I don't remember 22:48:42 I'm pretty sure that I would have lost it to Smalltalk 22:49:08 But I want a refresher, I guess 22:50:05 I remember disliking ruby 22:50:24 I hate everything. 22:50:41 I'm going to smoke hookah and contemplate a solution to all of this. 22:51:57 I actually like Ruby though I know very little practical knowledge of it 22:52:09 just the syntax/some-semantics 22:54:49 such a rube 22:57:50 -!- itidus20 has joined. 22:59:55 itidus20! 23:00:29 Ph:! 23:00:32 hmm 23:00:36 Phantom_Hoover: ! 23:01:11 itidus2432902008176640000 23:02:30 Sgeobot, check for updates. 23:03:52 oh no, you've summoned itidus20's evil clone! 23:04:15 oerjan, quick, get your evil twin to fight him! 23:08:25 this is hopeless. 23:09:37 There is always hope. 23:10:30 Except for the release of the HURD. 23:11:43 no, there's no hope 23:11:47 this approach isn't going to work. 23:12:09 all bindings for web browser rendering engines in Mono C# are stupid. 23:14:11 Mono.WebBrowser has all of these DOM interfaces... but, uh, no actual code. 23:14:57 http://hyotynen.kapsi.fi/trekfailure/ 23:15:13 This... this is completely identical to authentic Treknobabble. 23:15:27 They should sell it. 23:29:23 procedural generation is popular in part because it reduces the necessary labor and is more productive. on the downside, the lack of direct human control over each generated thing imbibes a lack of meaning in the created content 23:30:05 having said this the failure generator is pretty awesome 23:31:48 fungot: Did you notice he called you meaningless? 23:31:48 fizzie: and just what your porkhollow's fat ass needs. when the full chain was nearly closed that you would have a mayoral business which you take very seriously and you will defend this package with your life. 23:33:30 fizzie: i just want to ramble on about it like captain picard.. except not into a lonely document.. but into a channel 23:34:54 I like discovering tradeoffs. Because explanations based on tradeoffs lend themselves to objectivity. 23:35:27 So the tradeoff is the productivity of procedural generation versus the intimacy and warmth of manual creation 23:35:51 solution: slave labour 23:37:03 The way I see it, humans reject _some_ procedural things because they sense that they are being cheated. 23:37:47 maybe you do 23:37:56 I personally like procedural things 23:38:18 For instance, most people would rather not read a procedurally generated textual novel. 23:38:30 I'd love it 23:38:34 itidus20, that's because the procedures aren't good enough yet 23:38:35 >.> 23:38:42 bad procedures are cute 23:38:54 theres a difference between sampling a procedure and reading a whole slab of it 23:39:12 the difference is slabs are bigger 23:39:12 now.. uhh.. having said this.. 23:39:26 no no wait umm 23:39:29 hm 23:39:41 well people read novels because there is value in them 23:40:27 but a novel full of procedurally generated content is likely to leave a person feeling cheated 23:40:40 fungot: write a novel 23:40:40 CakeProphet: this is a really hot look for a stronger! but you were asleep. how exciting! a realm that is a ring 23:41:21 fungot: write a novel 23:41:21 CakeProphet: what a surprise, you are dragging your schizophrenic hopping 23:41:36 fungot: write a novel 23:41:36 CakeProphet: of what?! no man, cage is sweet. so sweet. so sweet. so sweet. you feel pangs of jealousy, though in a way that it shakes is the same as the word " crazy" 23:41:47 hehe 23:42:00 ok that was pretty cool 23:42:27 uuuugh 23:42:36 i actually like that one :-s 23:42:38 I am going to fucking bash my head into a sturdy solid object. 23:42:49 or, just use jssh to do this crap. 23:44:04 i dont hate procedural stuff. i am sure there are solutions where hybrid uses of procedural generation and manual generation can be greater than the sum of the parts 23:46:40 i think that if you procedurally generate something.. and then.. proceed to shape it with only manual stuff, you can win out.. that would be what minecraft did 23:47:44 Wha? 23:47:47 if the demarcation between when the procedural generation begins and ends is clear that would help a lot 23:48:04 Procedural generation... doesn't make sense without manual stuff. 23:48:18 itidus20: Yes I think it can be possible to make things in that way; possibly music can be done, or other things. Possibly it can experiment using random output of FurryScript to do stuff such as D&D game and then modify stuff. The included scripts are too simple for that but you can improve it to do that 23:48:38 You need, at some point, to define a function from noise to interactale stuff. 23:48:44 *interactable 23:49:10 ok a much nicer way to say it is 23:49:42 you could use procedural generation to establish the initial state... but then get humans to carry it forward from there 23:50:29 Procedural generation is a matter of mapping a very very large set of meaningless values to something that can be perceived as having a certain structure. 23:50:43 in mezzacotta.. humans vote on which days are good 23:50:47 :D 23:50:53 so that adds value 23:50:54 And that's... different. 23:51:16 it has an initial state and each day won't change 23:51:48 like.. 2000bc is set in stone 23:52:09 once again itidus20 philisophises without knowing what he's talking about 23:56:30 true 23:57:16 i am confusing general procedural generation with random number generation 23:58:19 -!- Phantom_Hoover has quit (Quit: Leaving). 23:59:06 if a game had hardcoded random number seeds then that would add an interesting twist that you could learn how it unfolds 23:59:08 mezzacotta's algorithm is actually deterministic, iirc. that way they can clear away the cache of rarely visited days. 23:59:32 well yeah. 23:59:38 itidus20: at least one final fantasy game (FF1?) is like that 23:59:52 oh i didn't know that 23:59:57 @ ais