00:17 (join) rbarraud 00:28 (quit) b-man_: Remote host closed the connection 00:36 (quit) rbarraud: Remote host closed the connection 00:37 (join) rbarraud 01:54 (join) rbarraud_ 01:55 (quit) rbarraud: Ping timeout: 272 seconds 02:04 (quit) rbarraud_: Remote host closed the connection 02:05 (join) rbarraud_ 02:18 (quit) rbarraud_: Remote host closed the connection 02:19 (join) rbarraud_ 02:23 (quit) rbarraud_: Remote host closed the connection 02:24 (join) rbarraud_ 02:28 (quit) rbarraud_: Remote host closed the connection 02:28 (join) rbarraud_ 02:39 (quit) jonrafkind: Ping timeout: 276 seconds 03:38 (quit) rbarraud_: Ping timeout: 272 seconds 06:42 (join) rbarraud 06:50 (quit) rbarraud: Remote host closed the connection 06:51 (join) rbarraud 06:55 (quit) rbarraud: Remote host closed the connection 06:55 (join) rbarraud 07:00 (quit) rbarraud: Remote host closed the connection 07:01 (join) rbarraud 07:02 (quit) rbarraud: Read error: Connection reset by peer 07:26 (part) chturne: "ERC Version 5.2 (IRC client for Emacs)" 08:24 (join) jeapostrophe 09:07 (join) chturne 09:10 (join) hanDerPeder 09:16 (join) b-man_ 09:21 (quit) chturne: Remote host closed the connection 09:48 (quit) jeapostrophe: Quit: jeapostrophe 10:35 (quit) Lajla: Ping timeout: 272 seconds 10:43 (join) Lajla 11:06 (join) writer 11:13 (quit) hanDerPeder: Quit: hanDerPeder 11:21 (nick) samth_away -> samth 11:44 (join) anRch 11:47 (join) asumu 12:36 (quit) anRch: Quit: anRch 12:41 chandler: What's the canonical way - if there is one - to print an exact integer with padding so that it fills a certain number of columns? For example, I'd like to format an exact non-negative integer less than 100 so that it fills two columns, and use 0 for prepended padding. 12:42 chandler: (For those who know Common Lisp, this is the equvalent of the format string "~2,'0D".) 12:42 (join) anRch 13:01 Lajla: chandler, yo. 13:06 samth: chandler, i don't think there's one built in 13:08 samth: you could look at fmt.plt 13:08 samth: on planet 13:11 (quit) anRch: Quit: anRch 13:12 Lajla: samth, how unendly is your knowledge of racket? 13:15 samth: Lajla, try me 13:16 Lajla: samth, how are cons cells implemented internally? 13:16 Lajla: Like, let's say we compile to x86 13:16 Lajla: How are cons cells implemented then? 13:16 Lajla: I mean, where is the type, more so. 13:16 samth: as a c struct with a header plus two pointers 13:16 Lajla: Ahh, and the header is the type? 13:17 Lajla: How many bits are in the header? 13:19 samth: see here: http://github.com/plt/racket/blob/master/src/racket/include/scheme.h 13:19 samth: look for pair_val 13:22 Lajla: samth, your unbased assumptions that I can read C code have proven be most correct, you must be a psychic, I wish to subscribe to your ministry and pay you a lot of money so that you can spread the word of God. 13:23 Lajla: I take that back by the way, it occurs four times in a macro, and one time in a union typedef of simple scheme object 13:23 Lajla: I don't see the definition of the struct itself, my C reading skills are not as good as I thouht. =( 13:23 samth: it's case in the union in the defintion of simple_scheme_object 13:24 (quit) tewk: Ping timeout: 240 seconds 13:25 Lajla: samth, yes, but what I wish to know is, how does it at runtime determine that it is a cons 13:25 chandler: samth: Unfortunately, fmt doesn't seem to compile in 5.0.1. 13:25 samth: chandler, that's too bad 13:25 samth: Lajla, look at the definition of SCHEME_PAIRP 13:26 chandler: I'm tempted to write or port a Common Lisp-like format. As much as I like the idea of foof's fmt, in practice I find inline format strings to be easier to work with. 13:26 Lajla: samth, ahh.. 13:26 (join) tewk 13:26 Lajla: samth, but scheme_pair_type doesn't appear at other places in the source 13:27 samth: it's in a different file - stypes.h 13:28 (join) tonyg 13:30 (join) hanDerPeder 13:30 Lajla: samth, in what dir is that one? 13:30 samth: src/racket/src/ 13:32 Lajla: samth, then I still don't fully get exactly where in that struct the type info is stored and how much bits it takes and how alignment is solved. 13:33 samth: look at the definition of Scheme_Object 13:34 Lajla: Ahhh 13:34 Lajla: a short 13:34 Lajla: samth, then I take it that the compiler figures out the alignment here? 13:35 samth: i don't know what you mean 13:35 samth: the C standard specifies the alignment 13:37 Lajla: samth, well, what I mean is that, what it comes down to now is that a pair is a struct which has three fields right, the first field that is shared by all data which gives the type, and the car and the cdr, right? 13:38 samth: yes 13:38 samth: well, plus that hash information 13:39 Lajla: Ohh, wait, I'm thinking of the wrong thing here, never mind. 13:40 Lajla: Ahh, then I get how it works, I was afraid it would waste some space and wondered how they did it. 13:47 (join) jonrafkind 13:50 (join) chturne 14:24 (join) anRch 14:34 (quit) tonyg: Quit: leaving 14:48 (quit) writer: Quit: writer 14:55 Lajla: So, samth, the idea is still that a cons takes up more than two words of memory and there is little we can do about it in the constraints of dynamic typing, right? 14:58 samth: Lajla, other scheme systems have headerless conses 14:58 samth: if you tag the pointer to the cons, it can work 14:59 Lajla: samth, ahh, yes, of course. 14:59 Lajla: But then you still have to tag the things your pointers point to in your conses 14:59 Lajla: So you end up with either more than two words, or perhaps delimiting the range of pointers, right? 14:59 Lajla: Or perhaps store different types in different ranges of memory? 15:00 Lajla: Like, as a rule, if the pointer is between two values, it is of a certain type? 15:02 samth: no, there are a bunch of tag bits available b/c of alignment 15:02 Lajla: samth, but those tag bits effectively do the same as range, right? 15:02 Lajla: I'm not sure if I'm bothering you, I'm simply looking for all the options before I get started.. 15:03 samth: I don't understand your question 15:05 Lajla: samth, well, if you see the pointer as a number, as in, an index of the giant vector that is your entire memory. 15:06 Lajla: Then the tag bits basically say nothing more than that the index is between memory address x and y, right? 15:06 samth: no, it's not 15:07 samth: pointers have to be at least word-aligned on all major architectures 15:08 samth: which means that you have at least 2 low-order bits that are always 0 in a valid pointer 15:08 samth: you can encode whether something is a number or a pointer there 15:08 samth: which is what racket does (using just the low-order bit) 15:08 samth: or if you use both low-order bits, you can encode if something is a cons 15:08 samth: that's what larceny does 15:08 Lajla: samth, hmm, I see.. 15:09 samth: other languages have very different representations 15:09 Lajla: So you basically have four things to play with. 15:09 Lajla: Right? 15:09 samth: for example: http://blog.mozilla.com/rob-sayre/2010/08/02/mozillas-new-javascript-value-representation/ 15:09 (notice) rudybot: http://tinyurl.com/37bc4ne 15:10 samth: well, larceny has only 3, since low-order 0 means fixnum (i think) 15:10 samth: low order 11 and 01 both mean pointer, with one of them being 'pointer to a cons' 15:11 samth: it's a valuable optimization if you have a lot of conses, which larceny has more of than racket 15:12 Lajla: samth, hmm, I see yes. 15:13 (join) sstrickl 15:13 Lajla: samth, so you wrote some of this code? 15:18 samth: Lajla, no, i didn't write any of it 15:19 Lajla: samth, ahhh, I believe I read here at some point that you founded this channel. 15:19 samth: i did 15:21 samth: i've written a bunch of code in racket, but none of the core representation 15:21 Lajla: samth, but isn't it illegal per freenodes guidelines to get a # channel if you're not an offocial repraesentation of some project. 15:21 Lajla: Ahhh, okay. 15:46 Lajla: samth, but how well could another approach work to locate different data to different regions of memory and test the type by the magnitude of the pointer's integer value? 15:46 (quit) anRch: Quit: anRch 15:50 (quit) b-man_: Read error: Connection reset by peer 16:01 samth: that could work 16:01 samth: i think people have done things like that, but i don't have any references off-hand 16:01 jay-mccarthy: Lajla: can't stop the bibop 16:01 jay-mccarthy: that's what it is about 16:02 Lajla: jay-mccarthy, what? 16:02 jay-mccarthy: http://www.cs.indiana.edu/cgi-bin/techreports/TRNNN.cgi?trnum=TR400 16:02 Lajla: samth, so my ideas are not compltely stupid and I'm not completely stupid? 16:02 Lajla: That is a most convenient skill in life I daresay 16:02 jay-mccarthy: it basically types pages rather than objects on them 16:03 Lajla: jay-mccarthy, cool 16:03 Lajla: Wow, that font looks strange in the PDF 16:19 (join) carleastlund 16:49 offby1: eli: I've been using the '%B' option to git for a little while now. I didn't realize that was from you. Thanks! 16:51 eli: offby1: You mean you didn't get the bill? 16:52 samth: is %B a git-log format option? 16:53 eli: Yes, one that I asked for and implemented. 16:53 eli: (Therefore exists only in newer versions, I don't remember when exactly.) 17:17 (quit) sstrickl: Quit: sstrickl 17:56 (join) _ryanc_ 18:21 (join) rbarraud 18:40 (quit) asumu: Ping timeout: 265 seconds 19:34 (quit) samth: Quit: Ex-Chat 19:48 (quit) chturne: Quit: ERC Version 5.2 (IRC client for Emacs) 19:53 (join) asumu 19:57 (quit) jonrafkind: Ping timeout: 264 seconds 20:19 (quit) _ryanc_: Quit: Leaving 21:10 (quit) carleastlund: Quit: carleastlund 22:50 (quit) hanDerPeder: Quit: hanDerPeder 23:01 (join) writer 23:21 (nick) offby1 -> NancyDungeon 23:21 (nick) NancyDungeon -> offby1 23:39 (join) jonrafkind