Conversation with #inferno at Mon Feb 28 09:22:44 2011 on powerman-asdf@irc.freenode.net (irc) (09:22:44) zelazny.freenode.net: (notice) [freenode-info] if you're at a conference and other people are having trouble connecting, please mention it to staff: http://freenode.net/faq.shtml#gettinghelp (09:35:20) robot12 [~kazzhilki@proxy10.ts.fujitsu.com] entered the room. (11:09:43) robot12 left the room (quit: Read error: Connection reset by peer). (11:11:46) mjl-: good day all (11:12:19) robot12 [~kazzhilki@proxy10.ts.fujitsu.com] entered the room. (13:20:27) Fish left the room (quit: Ping timeout: 250 seconds). (13:22:20) Fish [~Fish@exo3753.pck.nerim.net] entered the room. (13:26:38) bvalek2 [5e154eee@gateway/web/freenode/ip.94.21.78.238] entered the room. (14:40:07) bvalek2 left the room (quit: Quit: Page closed). (16:14:31) KBme left the room (quit: Excess Flood). (16:15:58) KBme [~KBme@9angled-2-pt.tunnel.tserv5.lon1.ipv6.he.net] entered the room. (16:18:25) mjl-: i made a patch to make limbo's *print handle strings that have \0's in them. currently that will truncate the string. (16:18:52) mjl-: to be more precise: the format string can have \0's already. string parameters (for %s, %q etc) will be truncated. (16:19:01) mjl-: i'll test the code for a while, then submit it (16:19:56) mjl-: now it's time to look if i can get the limbo compiler to not consume huge amounts of stack (and crashing) on "x := array[] of {lots of bytes}" (16:52:18) bvalek2 [5e154eee@gateway/web/freenode/ip.94.21.78.238] entered the room. (19:32:32) bvalek2 left the room (quit: Quit: Page closed). (20:10:21) base2design: probably the wrong place to ask, but we're all like-minded here, right?... anyway on the topic of libtask: (20:16:17) base2design: 1st question: i find myself writing lots of code that trivally wants to block on a file descriptor OR a channel. libtask has chanalt() but it doesn't handle file descriptors. i believe the limbo way this is handled is that there's an adt for files/network/etc that contains a file descriptor, but is it possible or even desirable to alt on both? i may be using the abstractions the wrong way. one common pattern i have for network (20:16:18) base2design: programming is the need to block on reads and writes with a possible timeout. what is a good practice for this sequence in limbo? (20:17:34) mjl-: you can't alt on fd's in limbo either, you need an explicit wrapper (20:17:59) base2design: 2nd question (for those of you who may be using libtask under osx) i seem to have uncovered a but in either my app or the libtask library where around the 16384-th (+/- a few) fdwrite(), my app freezes between 5 and 34 seconds. (20:18:22) mjl-: for blocking calls with timeouts, you normally spawn a thread that kills it caller after a sys->sleep. if the caller (which is doing blocking i/o) is done first, it kills the timer thread. (20:18:48) mjl-: http://www.vitanuova.com/inferno/man/2/timers.html <- you can use that. it's almost as easy to write it yourself though. (20:19:11) base2design: hmm... i think i'd have trouble adapting that pattern to libtask, but it's good to know that's a common practice in limbo. (20:19:39) base2design: btw, i know it's broken thinking on my part to want to lump file descriptor with channels (20:19:55) mjl-: "kills it caller" -> "kills its caller" (20:20:31) base2design: but it does kind of make cleaning up a state machine in a process kind of ugly :( (20:20:33) mjl-: it's often what you want. something from a file or from some other event. (20:21:19) mjl-: i tend to just spawn a proc that does a blocking read/write, and have it send info back to a main thread (that is often a big alt handling all the events) (20:22:30) base2design: yeah, i guess that makes sense... localize the method of collecting and dispatching the information away from the processing of the info. (20:23:22) base2design: i guess i could put the state machine inside a task that only uses channels. (20:28:07) base2design: i've written so many c-based projects using the "select()" function call that i have have slight brain damage that's keeping me from changing my thinking. (20:31:38) KillerX [~anant@nat/mozilla/x-xvlsffuucpgdsviv] entered the room. (20:32:02) Fish- [~Fish@9fans.fr] entered the room. (20:40:57) mjl-: i know the feeling (20:46:48) base2design: :) (20:53:20) Fish- left the room (quit: Quit: So Long, and Thanks for All the Fish). (20:53:48) Fish- [~Fish@9fans.fr] entered the room. (22:01:53) KillerX left the room (quit: Read error: Connection reset by peer). (22:03:28) KillerX [~anant@2620:101:8003:200:21b:63ff:fea5:86ee] entered the room. (22:42:08) anth_r: mjl-: i'm confused. doesn't \0 terminate a string? (22:43:01) mjl-: not in limbo (22:43:27) mjl-: s := "a\0b"; # => len s == 3 (22:44:42) anth_r: wow. i guess it's just never come up before, but that seems like a pretty big thing for me to have gotten wrong for a decade and a half. (22:45:03) anth_r: i've always thought of them as the same, functionally, as C strings and gotten away with it. (22:47:15) mjl-: true, and who uses \0's in strings anyway! (23:39:08) bvalek2 [5062677e@gateway/web/freenode/ip.80.98.103.126] entered the room. (00:58:40) Fish- left the room (quit: Quit: So Long, and Thanks for All the Fish). (01:08:00) robot12 left the room (quit: *.net *.split). (01:08:01) base2design left the room (quit: *.net *.split). (01:09:59) robot12 [~kazzhilki@proxy10.ts.fujitsu.com] entered the room. (01:10:12) robot12 left the room (quit: *.net *.split). (01:11:00) robot12 [~kazzhilki@proxy10.ts.fujitsu.com] entered the room. (01:56:08) bvalek2 left the room (quit: Quit: Page closed). (03:16:50) KillerX left the room (quit: Quit: KillerX). (10:16:05) robot121 [~kazzhilki@proxy10.ts.fujitsu.com] entered the room. (10:18:48) robot12 left the room (quit: Ping timeout: 264 seconds). (11:29:02) bvalek2 [c3e41404@gateway/web/freenode/ip.195.228.20.4] entered the room. (11:30:43) robot12 [~kazzhilki@proxy10.ts.fujitsu.com] entered the room. (11:32:08) robot121 left the room (quit: Ping timeout: 240 seconds). (12:56:39) inferno [~none@217.150.38.89] entered the room. (12:57:50) anthony1 [~anthony@217.150.38.89] entered the room. (12:58:13) anthony1 left the room. (13:01:56) inferno left the room (quit: Quit: ircfs!). (15:25:46) base2design [~base2desi@97-80-161-40.dhcp.gwnt.ga.charter.com] entered the room. (16:03:57) robot121 [~kazzhilki@proxy10.ts.fujitsu.com] entered the room. (16:05:27) robot12 left the room (quit: Ping timeout: 240 seconds). (16:13:48) robot12 [~kazzhilki@proxy10.ts.fujitsu.com] entered the room. (16:16:23) robot121 left the room (quit: Ping timeout: 240 seconds). (17:33:09) bvalek2 left the room (quit: Quit: Page closed). (18:03:55) robot12 left the room (quit: Quit: Leaving.). (18:50:21) bvalek2 [5062677e@gateway/web/freenode/ip.80.98.103.126] entered the room. (18:58:11) anthony76 [~Adium@host-156-146-66-217.spbmts.ru] entered the room. (19:01:34) anthony76 left the room. (19:02:59) anthony76 [~Adium@host-156-146-66-217.spbmts.ru] entered the room. (19:04:19) anthony76 left the room. (19:07:34) inferno [~none@host-156-146-66-217.spbmts.ru] entered the room. (19:08:55) anthony76 [~Adium@host-156-146-66-217.spbmts.ru] entered the room. (19:10:53) anthony76 left the room. (19:11:35) anthony76 [~Adium@host-156-146-66-217.spbmts.ru] entered the room. (19:11:39) anthony76 left the room. (19:16:22) KillerX [~anant@2620:101:8003:200:21b:63ff:fea5:86ee] entered the room. (19:17:37) inferno left the room (quit: Quit: ircfs!). (20:04:51) sl: mjl-: in qwm, when charon is put in the background i can never get it back. the charon window goes gray and never recovers. (22:02:46) bvalek2 left the room (quit: Quit: Page closed). (22:28:51) Fish- [~Fish@9fans.fr] entered the room. (01:30:57) Fish- left the room (quit: Quit: So Long, and Thanks for All the Fish). (03:56:35) btdn left the room (quit: Ping timeout: 240 seconds). (05:09:15) sl left the room (quit: Read error: Connection reset by peer). (05:46:04) sl [~sl@68-179-130-17.bsr-c9-d1.evv.dhcp.sigecom.net] entered the room. (07:48:27) anth_x1 [~a@adsl-99-40-132-132.dsl.bcvloh.sbcglobal.net] entered the room. (07:48:46) anth_x1 left the room (quit: Client Quit). (09:00:02) robot12 [~kazzhilki@proxy10.ts.fujitsu.com] entered the room. (09:50:10) bvalek2 [c3e41404@gateway/web/freenode/ip.195.228.20.4] entered the room. (09:59:36) bvalek2 left the room (quit: Ping timeout: 272 seconds). (10:08:07) bvalek2 [c3e41404@gateway/web/freenode/ip.195.228.20.4] entered the room. (10:12:53) bvalek2 left the room (quit: Ping timeout: 272 seconds). (11:23:14) bvalek2 [c3e41404@gateway/web/freenode/ip.195.228.20.4] entered the room. (11:25:52) bvalek2 left the room (quit: Client Quit). (13:40:00) robot12 left the room (quit: Ping timeout: 264 seconds). (14:09:36) robot12 [~kazzhilki@proxy10.ts.fujitsu.com] entered the room. (15:30:44) Fish left the room (quit: Quit: So Long, and Thanks for All the Fish). (15:33:31) Fish [~Fish@exo3753.pck.nerim.net] entered the room. (15:52:27) The account has disconnected and you are no longer in this chat. You will be automatically rejoined in the chat when the account reconnects.