00:04:18 -!- Vivitron [~Vivitron@pool-98-110-213-33.bstnma.fios.verizon.net] has quit [Quit: trivial-irc-0.0.3] 00:47:32 Vivitron [~Vivitron@pool-98-110-213-33.bstnma.fios.verizon.net] has joined #ccl 02:05:30 Quadresce [~quad@unaffiliated/quadrescence] has joined #ccl 02:07:01 -!- Vivitron [~Vivitron@pool-98-110-213-33.bstnma.fios.verizon.net] has quit [Ping timeout: 264 seconds] 02:07:07 sellout1 [~Adium@c-98-245-92-119.hsd1.co.comcast.net] has joined #ccl 02:07:58 -!- sellout [~Adium@c-98-245-92-119.hsd1.co.comcast.net] has quit [Read error: Connection reset by peer] 02:08:08 -!- Quadrescence [~quad@unaffiliated/quadrescence] has quit [Ping timeout: 253 seconds] 02:09:22 Vivitron [~Vivitron@pool-98-110-213-33.bstnma.fios.verizon.net] has joined #ccl 03:22:58 -!- Vivitron [~Vivitron@pool-98-110-213-33.bstnma.fios.verizon.net] has quit [Quit: trivial-irc-0.0.3] 03:23:17 Vivitron [~Vivitron@pool-98-110-213-33.bstnma.fios.verizon.net] has joined #ccl 06:54:19 DataLinkDroid [~DataLink@58.165.223.245] has joined #ccl 07:57:57 -!- DataLinkDroid [~DataLink@58.165.223.245] has quit [Quit: Bye] 10:23:27 -!- sellout1 [~Adium@c-98-245-92-119.hsd1.co.comcast.net] has quit [Read error: Connection reset by peer] 10:49:54 milanj [~milanj_@93-86-188-79.dynamic.isp.telekom.rs] has joined #ccl 11:29:44 sellout [~Adium@c-98-245-92-119.hsd1.co.comcast.net] has joined #ccl 13:08:19 wws [~billstcla@p-216-227-81-61.dsl1.rtr.chat.fpma.frpt.net] has joined #ccl 13:08:43 -!- billstclair [~billstcla@unaffiliated/billstclair] has quit [Read error: Operation timed out] 13:10:09 -!- wws [wws@clozure-E1CE060A.dsl1.rtr.chat.fpma.frpt.net] has quit [Ping timeout] 13:47:00 -!- milanj [~milanj_@93-86-188-79.dynamic.isp.telekom.rs] has quit [Ping timeout: 248 seconds] 14:13:08 milanj [~milanj_@109-92-115-184.dynamic.isp.telekom.rs] has joined #ccl 14:22:54 -!- gbyers [~gb@c-68-84-152-249.hsd1.nm.comcast.net] has quit [Read error: Connection reset by peer] 14:24:38 gbyers [~gb@c-68-84-152-249.hsd1.nm.comcast.net] has joined #ccl 14:31:17 it looks like these funtions compile to different things... (defun f (x) (+ x x)) versus (defun g (x) (let ((x x)) (+ x x))). would it be easy to add a compiler optimization (compiler macro?) that removes the redundant let bindings? 14:32:39 Try LET*. 14:34:17 Actually, in that case, they're the same. No, it's not trivial; no, you can't do it with a compiler-macro, yes, it's somewhat desirable. What's the measurable difference in performance between those cases ? 14:34:19 still looks similarly different... 14:34:54 thanks -- i don't have any good performance argument for doing it, it just nags :) 14:35:38 for a somewhat hard to explain reason we often end up writing code that has these sorts of things in it 14:36:37 basically the issue is, a definition "in the logic " does something complicated, but "in the execution" doesn't do anything at all 14:36:46 i'm not explaining it well, sorry 14:37:00 but anyway, i don't have any good reason for wanting it 14:37:17 I don't want to say that you don't pay at all for that, but - on x86 especially - you tend to pay less for that than you might think and there are probably other ways of making things faster. 14:39:11 for 100 million calls of F and G it looks like the difference is pretty consistently about 10%... 14:39:26 based on no inlining and with (declaim (optimize (speed 3) (safety 0) (space 0))) 14:39:41 with the loop: (time (loop for i fixnum from 1 to 100000000 do (g i))) 14:39:56 That's surprising; I wouldn't have though it'd be measurable. 14:40:04 i guess this is pretty close to "worst case" 14:40:12 in terms of, the function isn't doing anything else 14:41:21 interestingly, when i inline the functions the loops seem to perform nearly identically 14:41:30 (and are of course much faster) 14:42:12 (+ X X) has to discover that both operands are (presumably) FIXNUMs and that adding them together doesn't overflow. I'd expect the (relatively) small cost of those things to dwarf the cost of a PUSH. 14:44:24 replacing (+ x x) with just X gives me a 13% difference when F and G are inlined, and again no noticable difference when the functions are inlined 14:46:05 ah, well, the disassembled loops look identical when the functions are inlined, so something smart is going on 14:47:36 -!- alms_ [~alms_@209-6-130-32.c3-0.bkl-ubr1.sbo-bkl.ma.cable.rcn.com] has quit [Quit: alms_] 14:57:30 alms_ [~alms_@173-162-137-153-NewEngland.hfc.comcastbusiness.net] has joined #ccl 15:17:29 hlavaty [~user@91-65-217-229-dynip.superkabel.de] has joined #ccl 15:22:54 hi all, what are the arguments for cl:open to open a file as a bivalent stream? i found :character-p t in make-fd-stream 15:32:03 sockets are always bivalent. file-streams are never bivalent. 15:33:09 ok, i'm after file-streams 15:34:13 is there a way of making a file-stream by wrapping make-fd-stream? 15:35:02 thank you for answers 15:36:19 If the fd refers to a file, I'm fairly sure that MAKE-FD-STREAM returns a FILE-STREAM. 15:38:39 that doesn't seem to be the case 15:38:48 (CCL::MAKE-FD-STREAM 436 :DIRECTION :IO :INTERACTIVE NIL :ELEMENT-TYPE (UNSIGNED-BYTE 8) :ENCODING NIL :CHARACTER-P T) 15:38:53 CCL::MAKE-FD-STREAM returned # 15:38:58 value # is not of the expected type FILE-STREAM 15:39:34 unfortunately 15:39:55 You're on Windows ? 15:40:20 linux 15:40:31 64bit 15:41:27 436 is the fd you get after you've opened 435 other files ? 15:42:17 not sure, i'd have to be leaking fds somehow 15:43:02 That's what made me wonder about Windows; it looks a bit questionable. Where did it come from ? 15:43:24 it's result of calling iolib.syscalls:mkstemp 15:43:41 Whatever that is ... 15:44:09 ffi wrapper for man MKSTEMP(3) 15:44:49 would that prevent make-fd-stream returning file-stream? 15:47:20 A FILE-STREAM is seekable; there are some other differences. mkstemp() is supposed to return a pointer to its template argument. I don't think that 436 is such a pointer ... 15:47:49 Sorry, mis-read man page. Ignore that. 15:48:15 yeah 15:49:56 The man page I'm looking at doesn't make it real clear, but I don't think that 436 is a plausible fd. 15:50:22 the man page for linux says: returns an open file descriptor for the file 15:51:08 And 436 would be the fd you'd get after opening ~435 other files and not closing them. 15:51:40 my ulimit is 1024 open files and /proc shows that many open files 15:52:32 yes i think that's right, that part of my program is broken somehow probably 15:54:18 but i don't think it's relevant, that part opening the fd works well i think 15:55:32 Sorry, not paying enough attention. 15:56:19 ok thanks anyway 15:56:39 hlavaty: I think the flexi-streams library provides bivalent streams that are layered on top of binary streams. You could look into that. 15:56:57 rme: thanks i'll look into it 15:57:06 I'd misremembered: OPEN only returns a FILE-STREAM if the fd involved refers to a seekable file. 15:58:24 how do you know fd refers to seekable file? 15:59:08 call #_lseek on it and see if that errs. 15:59:17 ok 15:59:42 but this file should be seekable 15:59:46 -!- gbyers [~gb@c-68-84-152-249.hsd1.nm.comcast.net] has left #ccl 16:16:33 -!- alms_ [~alms_@173-162-137-153-NewEngland.hfc.comcastbusiness.net] has quit [Quit: alms_] 16:17:58 gbyers [~gb@c-68-84-152-249.hsd1.nm.comcast.net] has joined #ccl 16:54:07 alms_ [~alms_@209-6-130-32.c3-0.bkl-ubr1.sbo-bkl.ma.cable.rcn.com] has joined #ccl 17:00:28 -!- sellout [~Adium@c-98-245-92-119.hsd1.co.comcast.net] has quit [*.net *.split] 17:02:35 sellout [~Adium@c-98-245-92-119.hsd1.co.comcast.net] has joined #ccl 17:43:29 bzzbzz [~franco@modemcable151.155-57-74.mc.videotron.ca] has joined #ccl 18:08:27 -!- sellout [~Adium@c-98-245-92-119.hsd1.co.comcast.net] has quit [Quit: Leaving.] 18:56:34 sellout [~Adium@c-98-245-90-138.hsd1.co.comcast.net] has joined #ccl 19:14:28 -!- bzzbzz [~franco@modemcable151.155-57-74.mc.videotron.ca] has quit [Ping timeout: 248 seconds] 20:03:54 -!- sellout [~Adium@c-98-245-90-138.hsd1.co.comcast.net] has quit [Quit: Leaving.] 20:32:11 sellout [~Adium@c-98-245-92-119.hsd1.co.comcast.net] has joined #ccl 21:07:24 -!- milanj [~milanj_@109-92-115-184.dynamic.isp.telekom.rs] has quit [Quit: Leaving] 21:18:43 -!- Quadresce [~quad@unaffiliated/quadrescence] has quit [Ping timeout: 252 seconds] 21:33:41 Quadrescence [~quad@unaffiliated/quadrescence] has joined #ccl 21:40:50 Quadresce [~quad@unaffiliated/quadrescence] has joined #ccl 21:41:05 -!- Quadrescence [~quad@unaffiliated/quadrescence] has quit [Ping timeout: 246 seconds] 21:45:16 Quadrescence [~quad@unaffiliated/quadrescence] has joined #ccl 21:47:36 -!- Quadresce [~quad@unaffiliated/quadrescence] has quit [Ping timeout: 244 seconds] 21:52:21 Quadresce [~quad@unaffiliated/quadrescence] has joined #ccl 21:53:24 -!- Quadrescence [~quad@unaffiliated/quadrescence] has quit [Ping timeout: 276 seconds] 21:54:07 Quadresce` [~quad@c-24-131-149-41.hsd1.mn.comcast.net] has joined #ccl 21:57:03 -!- Quadresce [~quad@unaffiliated/quadrescence] has quit [Ping timeout: 250 seconds] 22:04:34 -!- Quadresce` [~quad@c-24-131-149-41.hsd1.mn.comcast.net] has quit [Ping timeout: 256 seconds] 22:15:52 Quadrescence [~quad@unaffiliated/quadrescence] has joined #ccl 22:17:36 Quadresce [~quad@unaffiliated/quadrescence] has joined #ccl 22:20:26 -!- Quadrescence [~quad@unaffiliated/quadrescence] has quit [Ping timeout: 252 seconds] 23:42:13 -!- alms_ [~alms_@209-6-130-32.c3-0.bkl-ubr1.sbo-bkl.ma.cable.rcn.com] has quit [Quit: alms_]