00:12:17 Bike_ [~Glossina@67-5-220-154.ptld.qwest.net] has joined #sbcl 00:12:27 -!- Bike_ [~Glossina@67-5-220-154.ptld.qwest.net] has quit [Client Quit] 00:12:40 Bike_ [~Glossina@67-5-220-154.ptld.qwest.net] has joined #sbcl 00:12:51 -!- Bike [~Glossina@67-5-247-95.ptld.qwest.net] has quit [Disconnected by services] 00:12:53 -!- Bike_ is now known as Bike 00:13:06 -!- slyrus [~chatzilla@173-228-44-92.dsl.static.sonic.net] has quit [Ping timeout: 241 seconds] 00:25:12 -!- drmeister [~drmeister@h69-21-18-138.nwlnnh.dedicated.static.tds.net] has quit [Remote host closed the connection] 00:52:15 drmeister [~drmeister@173-162-165-237-NewEngland.hfc.comcastbusiness.net] has joined #sbcl 00:53:38 LiamH [~none@pool-173-73-123-20.washdc.east.verizon.net] has joined #sbcl 00:54:59 -!- Bike [~Glossina@67-5-220-154.ptld.qwest.net] has quit [Ping timeout: 252 seconds] 01:00:31 Bike [~Glossina@67-5-220-154.ptld.qwest.net] has joined #sbcl 01:22:26 ehaliewicz [~user@50-0-51-11.dsl.static.sonic.net] has joined #sbcl 01:25:30 for some reason, this tweet reminded me of SBCL development: https://twitter.com/jschauma/status/342330049116135426 01:26:58 ASau` [~user@p4FF96A04.dip0.t-ipconnect.de] has joined #sbcl 01:28:33 -!- ASau [~user@p4FF96A04.dip0.t-ipconnect.de] has quit [Remote host closed the connection] 01:32:30 heh 01:42:29 -!- drmeister [~drmeister@173-162-165-237-NewEngland.hfc.comcastbusiness.net] has quit [Remote host closed the connection] 01:42:34 -!- davazp [~user@254.Red-79-144-63.dynamicIP.rima-tde.net] has quit [Quit: ERC Version 5.3 (IRC client for Emacs)] 01:50:45 Vivitron [~Vivitron@pool-98-110-213-33.bstnma.fios.verizon.net] has joined #sbcl 01:59:59 why is it that, now that I shouldn't have time for SBCL, I see a reasonable angle for mostly concurrent mark and sweep? :\ 02:15:45 drmeister [~drmeister@173-162-165-237-NewEngland.hfc.comcastbusiness.net] has joined #sbcl 02:17:25 Bike_ [~Glossina@174-25-57-23.ptld.qwest.net] has joined #sbcl 02:17:28 -!- Bike_ [~Glossina@174-25-57-23.ptld.qwest.net] has quit [Client Quit] 02:17:45 Bike_ [~Glossina@174-25-57-23.ptld.qwest.net] has joined #sbcl 02:17:54 -!- Bike [~Glossina@67-5-220-154.ptld.qwest.net] has quit [Disconnected by services] 02:17:57 -!- Bike_ is now known as Bike 02:32:35 Bike_ [~Glossina@67-5-207-25.ptld.qwest.net] has joined #sbcl 02:34:27 Bike__ [~Glossina@67-5-210-104.ptld.qwest.net] has joined #sbcl 02:34:41 -!- Bike [~Glossina@174-25-57-23.ptld.qwest.net] has quit [Disconnected by services] 02:34:43 -!- Bike__ is now known as Bike 02:37:07 -!- Bike_ [~Glossina@67-5-207-25.ptld.qwest.net] has quit [Ping timeout: 264 seconds] 02:39:03 Bike_ [~Glossina@67-5-210-104.ptld.qwest.net] has joined #sbcl 02:39:04 -!- christoph4 [~christoph@ppp-188-174-77-82.dynamic.mnet-online.de] has quit [Ping timeout: 256 seconds] 02:39:22 -!- Bike [~Glossina@67-5-210-104.ptld.qwest.net] has quit [Quit: leaving] 02:39:22 -!- Bike_ [~Glossina@67-5-210-104.ptld.qwest.net] has quit [Client Quit] 02:39:37 Bike [~Glossina@67-5-210-104.ptld.qwest.net] has joined #sbcl 02:49:16 pranavrc [~pranavrc@122.164.164.20] has joined #sbcl 02:49:16 -!- pranavrc [~pranavrc@122.164.164.20] has quit [Changing host] 02:49:16 pranavrc [~pranavrc@unaffiliated/pranavrc] has joined #sbcl 02:52:27 christoph4 [~christoph@ppp-188-174-102-40.dynamic.mnet-online.de] has joined #sbcl 03:09:57 -!- LiamH [~none@pool-173-73-123-20.washdc.east.verizon.net] has quit [Quit: Leaving.] 04:25:05 -!- ehaliewicz [~user@50-0-51-11.dsl.static.sonic.net] has quit [Read error: No route to host] 04:55:07 attila_lendvai [~attila_le@95.56.79.25] has joined #sbcl 04:55:07 -!- attila_lendvai [~attila_le@95.56.79.25] has quit [Changing host] 04:55:07 attila_lendvai [~attila_le@unaffiliated/attila-lendvai/x-3126965] has joined #sbcl 05:26:56 sdemarre [~serge@8.65-64-87.adsl-dyn.isp.belgacom.be] has joined #sbcl 05:31:17 -!- sdemarre [~serge@8.65-64-87.adsl-dyn.isp.belgacom.be] has quit [Ping timeout: 248 seconds] 05:32:19 -!- drmeister [~drmeister@173-162-165-237-NewEngland.hfc.comcastbusiness.net] has quit [Remote host closed the connection] 05:43:50 edgar-rft [~GOD@HSI-KBW-149-172-63-75.hsi13.kabel-badenwuerttemberg.de] has joined #sbcl 06:02:59 teggi [~teggi@113.173.3.200] has joined #sbcl 06:17:51 -!- Bike [~Glossina@67-5-210-104.ptld.qwest.net] has quit [Ping timeout: 252 seconds] 06:19:38 prxq [~mommer@mnhm-4d010033.pool.mediaWays.net] has joined #sbcl 06:22:26 -!- pranavrc [~pranavrc@unaffiliated/pranavrc] has quit [Quit: Ping timeout: ] 06:27:28 attila_lendvai1 [~attila_le@95.56.79.25] has joined #sbcl 06:27:28 -!- attila_lendvai [~attila_le@unaffiliated/attila-lendvai/x-3126965] has quit [Disconnected by services] 06:27:28 -!- attila_lendvai1 [~attila_le@95.56.79.25] has quit [Changing host] 06:27:28 attila_lendvai1 [~attila_le@unaffiliated/attila-lendvai/x-3126965] has joined #sbcl 06:41:42 angavrilov [~angavrilo@217.71.227.190] has joined #sbcl 06:43:53 -!- attila_lendvai1 is now known as attila_lendvai 06:52:59 attila_lendvai1 [~attila_le@95.56.79.25] has joined #sbcl 06:52:59 -!- attila_lendvai [~attila_le@unaffiliated/attila-lendvai/x-3126965] has quit [Disconnected by services] 06:52:59 -!- attila_lendvai1 [~attila_le@95.56.79.25] has quit [Changing host] 06:52:59 attila_lendvai1 [~attila_le@unaffiliated/attila-lendvai/x-3126965] has joined #sbcl 06:53:23 -!- attila_lendvai1 is now known as attila_lendvai 06:54:18 foreignFunction [~niksaak@ip-4761.sunline.net.ua] has joined #sbcl 07:23:38 -!- ASau` is now known as ASau 07:29:20 benkard [~benkard@dhcp-138-246-85-4.dynamic.eduroam.mwn.de] has joined #sbcl 07:56:11 stassats [~stassats@wikipedia/stassats] has joined #sbcl 08:33:03 -!- daimrod [daimrod@sbrk.org] has quit [Ping timeout: 245 seconds] 08:33:53 -!- minion [~minion@common-lisp.net] has quit [Read error: Operation timed out] 08:34:56 -!- specbot [~specbot@common-lisp.net] has quit [Ping timeout: 256 seconds] 08:39:28 daimrod [daimrod@sbrk.org] has joined #sbcl 09:11:18 *stassats* pushes the savings up to 864KB 09:11:41 *stassats* hopes to reach >1MB eventually 09:14:10 -!- daimrod [daimrod@sbrk.org] has quit [Ping timeout: 276 seconds] 09:31:01 -!- vi1 [~vi1@93.92.216.186] has quit [Remote host closed the connection] 09:45:10 -!- teggi [~teggi@113.173.3.200] has quit [Remote host closed the connection] 10:03:28 -!- benkard [~benkard@dhcp-138-246-85-4.dynamic.eduroam.mwn.de] has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz] 10:58:55 daimrod [daimrod@sbrk.org] has joined #sbcl 11:27:31 -!- foreignFunction [~niksaak@ip-4761.sunline.net.ua] has quit [Quit: Leaving.] 11:40:08 -!- Tribal [tribal@rcfreak0.com] has quit [Ping timeout: 245 seconds] 11:42:19 Tribal [tribal@rcfreak0.com] has joined #sbcl 11:44:58 -!- scymtym_ [~user@ip-5-147-122-209.unitymediagroup.de] has quit [Ping timeout: 276 seconds] 12:12:00 -!- attila_lendvai [~attila_le@unaffiliated/attila-lendvai/x-3126965] has quit [Quit: Leaving.] 12:27:12 benkard [~benkard@dhcp-138-246-84-161.dynamic.eduroam.mwn.de] has joined #sbcl 12:32:15 drmeister [~drmeister@h69-21-18-138.nwlnnh.dedicated.static.tds.net] has joined #sbcl 12:35:30 -!- drmeister [~drmeister@h69-21-18-138.nwlnnh.dedicated.static.tds.net] has quit [Remote host closed the connection] 12:41:25 segv- [~mb@95-91-241-76-dynip.superkabel.de] has joined #sbcl 12:48:25 -!- benkard [~benkard@dhcp-138-246-84-161.dynamic.eduroam.mwn.de] has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz] 12:53:24 LiamH [~none@pdp8.nrl.navy.mil] has joined #sbcl 12:55:34 drmeister [~drmeister@173-162-165-237-NewEngland.hfc.comcastbusiness.net] has joined #sbcl 12:57:07 benkard [~benkard@dhcp-138-246-84-161.dynamic.eduroam.mwn.de] has joined #sbcl 13:00:07 -!- drmeister [~drmeister@173-162-165-237-NewEngland.hfc.comcastbusiness.net] has quit [Remote host closed the connection] 13:18:13 -!- benkard [~benkard@dhcp-138-246-84-161.dynamic.eduroam.mwn.de] has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz] 13:23:12 benkard [~benkard@dhcp-138-246-84-161.dynamic.eduroam.mwn.de] has joined #sbcl 13:34:08 wbooze [~wbooze@xdsl-87-79-198-220.netcologne.de] has joined #sbcl 13:37:20 -!- benkard [~benkard@dhcp-138-246-84-161.dynamic.eduroam.mwn.de] has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz] 14:01:37 benkard [~benkard@dhcp-138-246-84-161.dynamic.eduroam.mwn.de] has joined #sbcl 14:41:12 hlavaty`` [~user@friedrichstrasse.knowledgetools.de] has joined #sbcl 14:42:44 -!- hlavaty` [~user@friedrichstrasse.knowledgetools.de] has quit [Ping timeout: 252 seconds] 14:50:10 drmeister [~drmeister@173-162-165-237-NewEngland.hfc.comcastbusiness.net] has joined #sbcl 15:12:02 Bike [~Glossina@67-5-210-104.ptld.qwest.net] has joined #sbcl 15:15:26 Does anyone know how SBCL determines at runtime when a function is called with keyword arguments if a keyword has been provided or not by the caller to the function? 15:16:06 by scanning the vector of arguments. 15:16:06 it search for it in a list 15:16:16 well, not a list list. 15:18:12 -!- benkard [~benkard@dhcp-138-246-84-161.dynamic.eduroam.mwn.de] has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz] 15:18:12 Here's an example that my approach fails at: http://pastebin.com/FDQYTKBq 15:18:56 I makunbound the *a* special variable before processing keyword arguments and it fails because when the initializer (a) is evaluated *a* is unbound. 15:19:04 why do you makunbound? 15:19:43 So that I can determine if (b :a xxx) was passed or just (b) 15:20:42 that doesn't sound right at all 15:20:45 I don't follow. How do you handle &key (key nil key-p)? 15:20:53 If you call (b) then after it processes keyword arguments (none were passed) the callee looks through the keyword arguments and any that are still unbound are set to the result of evaluating their initializer. 15:21:05 how can that work for lexical variables? 15:22:00 pkhuong: It works fine - the lexical variables are either bound by a passed keyword argument or they are left unbound and set to their initializer. 15:22:31 <|3b|> sounds like you might be binding them in the wrong order too, when they are present 15:22:33 The problem occurs in the rare case like (&key ((:a *a*) xxx)) where *a* is special. 15:22:59 what's so special about specials *a*? it's just a form 15:23:10 *|3b|* isn't sure i can think of a sufficiently pathological example to demonstrate it though 15:23:14 |3b|: What order should I be binding them - I'm using the order in which they are provided by the caller. 15:23:22 yeah. I said as much a couple weeks ago, so I doubt it'll do any good, but the whole point of lexical scoping si that the shape of the environment is known at compile time. 15:23:55 drmeister: order in which they're specified in the lambda list, including specials that might be accessed when evaluating default expressions. 15:24:05 <|3b|> drmeister: yeah, i suspect that is wrong... not sure exactly what would be correct though 15:24:11 and I still don't see how you handle key-p. 15:24:18 *|3b|* would guess either in order of appearance in the lambda list, or all at same time 15:24:53 *|3b|* types too slowly, so retracts the guess and assumes pkhuong is correct then :) 15:24:57 |3b|: l-t-r, otherwise how could you refer to earlier arguments in default value forms? 15:25:05 basically, you need to do (setf *a* (getf a :list :default)) 15:25:14 err 15:25:20 (getf list :a :default) 15:25:29 pkhuong: key-p is also initially unbound and set to t if the associated keyword is passed and nil if it remains unbound after all passed keyword are processed. 15:25:32 <|3b|> pkhuong: yeah, assumed that was the case, just wasn't sure enough to say so without checking spec :) 15:26:14 drmeister: here's a simpler way: initialise it to nil and set it to t when you find the keyword. 15:26:45 Scan the argument list once, setting value-for-key to the value you find only if key-p isn't already t. 15:26:57 <|3b|> drmeister: order specified by caller also sounds like you would get wrong value when keys are repeated (assuming you didn't handle that explicitly) 15:27:14 once that's done, iterate through your arguments, left to right, if key-p is T, use value-for-p, otherwise evaluate the initialisation form. 15:27:15 benkard [~benkard@dhcp-138-246-84-161.dynamic.eduroam.mwn.de] has joined #sbcl 15:27:27 with key-p (let (variable (variable-p t)) (setf variable (or (getf list keyword) (setf variable-p nil) default-form)) body) 15:27:47 err, doesn't work with NIL 15:27:49 stassats: multiple traversals. 15:27:50 but you get the idea 15:28:14 pkhuong: it's better to get something working first 15:28:32 Thanks - I'm not arguing for why my way is better - I'm obviously doing something wrong - I'm on my 4th or 5th approach to handling keyword arguments. 15:28:47 stassats: Or to look at how working versions do it. 15:29:19 pkhuong: I'll read what you are suggesting and try and implement it. 15:29:21 the way you think about lexical scoping is wrong, so keywords are a long way off. 15:30:34 pkhuong: Are you referring to me when you said: "the way you think about lexical scoping is wrong, so keywords are a long way off." 15:31:14 *drmeister* is not offended - I just want to understand the best way to do things. 15:31:50 yes; we talked about this a couple weeks ago. 15:32:09 What is it about lexical scoping that I'm getting wrong? 15:32:26 the point of lexical scoping is that the environment is known lexically, at compile time. 15:32:36 it doesn't make sense for a lexical binding to be unbound. 15:32:44 And if so, how is it that I'm compiling and running the entire ECL Common Lisp code base. 15:33:49 Odyessus [~odyessus@chello080109062130.15.14.vie.surfer.at] has joined #sbcl 15:33:50 pkhuong: When I create an ActivationFrame for a lexical scope (LET/LET* etc) I set each slot to UNBOUND - then I immediately fill it with a value. Why is that wrong? 15:33:53 maybe you'll see the difference when try to get decent code... or maybe LLVM will be able to see through the shenanigans. 15:34:32 drmeister: so effectively they are never unbound? 15:34:36 the point of lexical scoping is that at each program point, you know exactly where to find the lexical binding corresponding to a given name. 15:35:24 it doesn't make sense for a lexical binding to be marked as unbound: the generated code should just look in the right frame, where the binding will always be bound. 15:36:11 prxq: In that context yes, they are never unbound. When calling functions UNBOUND is only used to indicate that a value wasn't provided by the caller and so the initializer from the lambda list should be evaluated and the result written into the slot that is UNBOUND. 15:38:41 pkhuong: But if I say ((lambda (&optional (x 1) (y 2)) (list x y)) 10 ) I allocate a two slot ActivationFrame at the start and set both slots to UNBOUND. The function fills the first slot with 10 and runs out of arguments, then it evaluates "2" and puts that into the second slot. 15:39:22 my contention is with the very idea that a lexical variable can be unbound. 15:39:36 Let me restate that more carefully 15:40:30 Because I'm describing what happens to the ActivationFrame. The changes to the LexicalEnvironment need to be described at the same time - that might resolve the confusion. 15:43:21 If I say ((lambda (&optional (x 1) (y 2)) (list x y)) 10 ) the following happens: 15:43:21 I allocate a two slot ActivationFrame and set both slots to UNBOUND. 15:43:21 I create a new ValueEnvironment (lexical environment for values). 15:43:23 The function fills the first slot with 10 and adds the X symbol to the ValueEnvironment and tells it that X is bound to slot 0 of the ActivationFrame. 15:43:25 The function runs out of arguments. 15:43:27 It looks through the ActivationFrame, sees that slot 2 is UNBOUND and then it evaluates "2" and puts that into the second slot and adds the symbol "Y" to the ValueEnvironment and binds it to slot 1 of the ActivationFrame. 15:44:23 pkhuong: So I'm doing what you expect - X and Y are never set to UNBOUND in the lexical environment. The ActivationFrame is just an array of values - the ValueEnvironment maintains the lexical environment. 15:45:23 there are two issues here: 1) I'm really hoping you're just punning a pre-existing unbound value as a sentinel 2) you have to find the value for each keyword argument (if any) first, and then bind; you can't bind to the externally-visible variable before evaluating earlier defaulting values. 15:45:24 -!- Odyessus [~odyessus@chello080109062130.15.14.vie.surfer.at] has quit [Quit: Colloquy for iPad - http://colloquy.mobi] 15:45:25 UNBOUND is just a place-holder value in the ActivationFrame - my problem occurs for special variables - they aren't stored in ActivationFrames and so the UNBOUND value is put into the value slot of the special variable. 15:45:57 (also, if the activationframe is just an array of values, use it for the specials too) 15:47:47 pkhuong: I'll need to think on this. 15:48:24 pkhuong: Did you describe how SBCL does it above? I read it but I'll need to read it a couple more times and think on it to absorb it. 15:48:32 Odyessus [~odyessus@chello080109062130.15.14.vie.surfer.at] has joined #sbcl 15:51:45 I've rewritten how I handle keyword arguments several times - I'm going to have to do it again and it would be really nice to get it right this time. 15:52:30 pretty much. + :allow-other-keys 15:53:12 http://www.reddit.com/r/programming/comments/jnm0/from_10line_interpreter_to_20line_compiler_via has a nice example of what I mean by thinking about lexical scoping right. 15:53:20 Ok - I'm in a seminar right now but later this afternoon I'll digest what you wrote and figure out how to implement it in LLVM-IR. 15:53:49 the initial simple evaluator doesn't take advantage of the fact that the shape of the environment is known at compile time 15:54:18 and basing a compiler on such a representation will work, but will result in bad performance. 15:55:09 The specialisation-oriented interpreter has a structure that distinguishes between what is known at compile time (the shape of the environment) and what can only be known at runtime (the value for each binding). 15:56:09 pkhuong: I'm pretty sure that I understand and implemented lexical environments properly - I could be wrong, I can always be wrong. 15:56:48 and that's how lexical scoping should be done in a sane/decent compiler. A local variable will never be unbound, and there should never be runtime conditionals to determine the structure of the lexical environment (e.g. where a given variable can be found in the environment). 15:57:36 Sagane [~Sagane@177.100-226-89.dsl.completel.net] has joined #sbcl 15:57:44 pkhuong: But a runtime conditional does need to be used to determine if optional or keyword arguments were provided to a function - correct? 15:58:13 If you only use unbound as a sentinel, then all's fine. Similarly for your environment representation, perhaps you only use the metadata for the debugger, and then all is fine as well. But both times the wording you used made me twitch. 15:58:58 drmeister: yes... but that's completely independent from scoping. You need a condition to determine that the same way you need a conditional to determine if (= x y). 15:59:33 or you can use multiple entry points 16:00:15 Yes, I'm just using UNBOUND as a sentinel - but there is this problem with special variables that I mentioned. 16:01:04 stassats: Multiple entry points - is that a workable idea? I'd need every permutation of keyword/optional arguments - correct? 16:01:10 stassats: multiple entry points for keywords gets an exponential blowup. 16:01:16 for optional/&rest, it works fine. 16:01:35 pkhuong: Thanks for confirming that. 16:01:37 drmeister: multiple entry point with a switch/case on the number of arguments makes a lot of sense. 16:02:23 So multiple entry points for small number of arguments and a general function for large numbers of arguments? 16:02:43 I mean a general entry point for large numbers of arguments. 16:02:58 drmeister: you'll get specials right by not treating them any differently than lexicals. Store any provided value in an auxiliary data structure (or variables) along with a way to determine if any value was provided, then bind left to right. 16:03:31 one entry point for no optional argument, another for each optional argument, and another for the &rest/&key 16:03:39 drmeister: the specials has to be bound anyway, you can bind it to your unbound value, and then set it 16:04:03 but i'm not sure how that will interact with default value forms which want to use that special 16:04:22 You mentioned above to store the values for special variables in the ActivationFrame - is that what you are referring to? 16:05:27 stassats: can't do that, because that interacts badly with default value, including the common ((:foo *foo*) *foo*). 16:05:36 Currently I store the value of specials in the Value slot of the symbol in the global space. I maintain a stack of dynamic variables for (let ((*xxx* 1)) ...) 16:05:49 drmeister: or whatever you do for lexicals. There's no reason to treat lexicals and specials any different during argument list processing. 16:06:54 in fact, I'm failry certain the most straightforward way to compile complex argument lists is via source-to-source transformations. 16:07:29 pkhuong: I'll need to think on that. 16:08:08 pkhuong: source to source transformation? I don't do much of that yet - how would that work? 16:08:56 (defun x (&key (a 1) (b 2)) ...) (x) --> (x :a 1 :b 2) ???? 16:09:54 and for multiple entry points for keywords, if you know which keywords the callee has, you can transform keys into indexes into a vector 16:10:12 stassats: except function redefinition. 16:10:25 right 16:10:49 functions in the same file aren't supposed to be redefined 16:10:52 Right - I keep forgetting about function redefinition. 16:11:09 drmeister: a source to source transformation is when you take a language with a complicated feature (e.g. argument lists with &key), and rewrite it into a simpler dialect of the same language, without that feature (e.g. argument lists with only &optional and &rest). 16:11:29 -!- Odyessus [~odyessus@chello080109062130.15.14.vie.surfer.at] has quit [Quit: Colloquy for iPad - http://colloquy.mobi] 16:12:35 Are there any implementations that use source to source transformation for argument lists? 16:12:44 CMUCL and SBCL, for sure. 16:13:18 So what does it do for: (defun x (&key (a 1) (b 2)) ...) (x) 16:13:30 how would you do it by hand? 16:13:53 pretend you wanted keyword arguments in a language with only &optional and &rest. 16:14:35 I would transform (x) into (x 1 2) and (defun x ...) into (defun x (a b)) but that will be screwed up by function redefinition. 16:14:48 (defun x (&rest args) (destructuring-bind (&key (a 1) (b 2)) args ...)) 16:14:50 easy! 16:16:25 drmeister: no. you want to have (defun x (&rest keyword-arguments) ...) and emulate keyword argument parsing in normal (minus &key) CL 16:16:47 and for function redefinition and indexes: always keep the indexes constant, so when a function is redefined, the left ones lead to unknown-keyword, and the new ones are using the new ids 16:16:56 left out ones 16:17:46 stassats: what happened to get it right first? ;) 16:18:45 pkhuong: i suggested it _first_! so, i'm suggesting more things after that 16:20:45 pkhuong: Does SBCL need to search through the passed keyword arguments multiple times for each function call? 16:21:06 https://gist.github.com/pkhuong/5766855 16:21:08 for instance 16:21:39 oups, copy paste issue 16:22:42 there. 16:23:07 I see it. So you initialize a-value and b-value in the order they are passed by the caller. 16:23:25 No, hold on 16:24:15 Yes, that's right. If I say (foo :b 2 :a 1) then b-value gets set first and then a-value. 16:24:28 Isn't that the opposite of what you said above? 16:24:35 it doesn't matter in what order these are set. They're internal gensym variables. 16:24:49 the only thing specified by the standard is that they get the leftmost value. 16:24:53 drmeister: values are evaluated by the caller, so it doesn't matter 16:25:07 default-value evaluation order is what matters 16:25:19 Ok, it's the order of initialization forms that's important then. 16:26:42 and that loop should probably be a DO to avoid potential bootstrapping issues. 16:27:12 if it expands to tagbody, it shouldn't matter 16:27:23 And you need an a-p and b-p binding whether or not the function specified it in the (&key (a (init-a) a-p) ...) 16:27:25 stassats: who knows what madness loop can expand into ;) 16:27:51 drmeister: you need a way to know if a value was provided. 16:28:04 a sentinel works. I find a boolean simpler. 16:28:38 <|3b|> drmeister: order of binding arguments matters, and order of evaluation of default values (when used) matters 16:28:53 Right!! That's why I was setting the slot in the ActivationFrame to UNBOUND - that was my sentinel. I guess I could solve my problem if I create an explicit sentinel boolean for each keyword argument. 16:29:25 sometimes i wish for a full-program compilation 16:29:26 no, the problem is that you directly modified user-visible bindings during argument list parsing. 16:29:52 no stinking late bindings to optimize 16:30:27 stassats: common stalin? What dictator would be the best name? 16:30:41 common kissinger 16:31:03 pkhuong: Yes, I see that is a problem now. But I can avoid the problem by creating a sentinel for each keyword argument whether or not the function lambda list declares keyword sentinels. 16:31:06 kissinger isn't really known for his purges. 16:31:39 drmeister: yes, but that's not a sentinel anymore. They're just boolean flags. 16:32:30 the other problem is that your old code seemed to bind directly to the user-specified binding (including specials) while traversing the argument list. 16:32:54 pkhuong: Sure - but if I translate (defun foo (&key (a a-default-form) (b b-default-form)) ...) into (defun foo (&rest arguments)...) as you described above: https://gist.github.com/pkhuong/5766855 then it will work. 16:34:18 pkhuong: I was trying to avoid allocating a boolean for every keyword argument. I was also trying to avoid having to set the boolean and a sentinel. I see now I should just allocate a boolean for each keyword argument. 16:35:03 allocation a boolean? that's just 1 or 0 16:35:03 the important bit is to first parse the argument lists without changing anything the outside world can see, and then bind and perform defaulting as needed. 16:35:23 even if you're using nil or t, they are constant, no need to allocate 16:36:00 stassats: What do you mean by "even if you're using nil or t, they are constant, no need to allocate" - could you elaborate? 16:36:33 nil and t are allocated only once 16:37:41 *|3b|* assumed 'allocate a boolean variable' rather than 'allocate a boolean object' 16:38:13 a word can hold 64 boolean variables 16:38:20 (or 32) 16:38:51 <|3b|> yeah, and 64 is even greater than the minimum lambda-parameters-limit of 59 :) 16:38:54 <|3b|> *50 16:38:56 To clarify: I mean allocate a byte in the functions stack frame to store a boolean value for each keyword argument (or I can get fancy and do bit-twiddling). 16:40:34 That will require a minor change to my existing code. 16:42:37 Thanks for your help folks - I need to run. I'll be back later. 16:47:40 -!- drmeister [~drmeister@173-162-165-237-NewEngland.hfc.comcastbusiness.net] has quit [Remote host closed the connection] 16:56:54 -!- benkard [~benkard@dhcp-138-246-84-161.dynamic.eduroam.mwn.de] has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz] 17:07:13 -!- Bike [~Glossina@67-5-210-104.ptld.qwest.net] has quit [Ping timeout: 248 seconds] 17:09:06 Bike [~Glossina@67-5-220-99.ptld.qwest.net] has joined #sbcl 17:33:40 attila_lendvai [~attila_le@unaffiliated/attila-lendvai/x-3126965] has joined #sbcl 17:36:38 attila_lendvai1 [~attila_le@92.47.204.96] has joined #sbcl 17:36:39 -!- attila_lendvai [~attila_le@unaffiliated/attila-lendvai/x-3126965] has quit [Disconnected by services] 17:36:39 -!- attila_lendvai1 [~attila_le@92.47.204.96] has quit [Changing host] 17:36:39 attila_lendvai1 [~attila_le@unaffiliated/attila-lendvai/x-3126965] has joined #sbcl 17:37:31 -!- stassats [~stassats@wikipedia/stassats] has quit [Ping timeout: 256 seconds] 17:52:01 -!- yacks [~py@180.151.36.168] has quit [Read error: Connection reset by peer] 17:54:24 stassats [~stassats@wikipedia/stassats] has joined #sbcl 18:00:23 -!- attila_lendvai1 [~attila_le@unaffiliated/attila-lendvai/x-3126965] has quit [Ping timeout: 255 seconds] 18:02:07 drmeister [~drmeister@h69-21-18-138.nwlnnh.dedicated.static.tds.net] has joined #sbcl 18:03:47 yacks [~py@180.151.36.168] has joined #sbcl 18:32:36 ASau` [~user@p5797FAB8.dip0.t-ipconnect.de] has joined #sbcl 18:35:57 -!- ASau [~user@p4FF96A04.dip0.t-ipconnect.de] has quit [Ping timeout: 252 seconds] 18:36:43 -!- ASau` is now known as ASau 18:42:37 Bike_ [~Glossina@75-175-78-30.ptld.qwest.net] has joined #sbcl 18:43:07 -!- Bike [~Glossina@67-5-220-99.ptld.qwest.net] has quit [Ping timeout: 264 seconds] 19:14:36 foreignFunction [~niksaak@ip-4761.sunline.net.ua] has joined #sbcl 19:16:33 slyrus [~chatzilla@173-228-44-92.dsl.static.sonic.net] has joined #sbcl 19:26:09 pkhuong: Are you still online? 19:26:40 yes 19:26:56 An update -> I added a boolean for each keyword argument and now it works. 19:27:33 awesome 19:28:25 http://pastebin.com/hJLZeT3X 19:28:48 Thank you very much for your help. 19:28:52 bloody cold init is too cold, /me is writing his own vop-info dumping routine 19:30:40 doing all sort of crazy things just to squeeze out a megabyte of space 19:47:22 -!- slyrus [~chatzilla@173-228-44-92.dsl.static.sonic.net] has quit [Ping timeout: 240 seconds] 19:47:54 -!- ASau [~user@p5797FAB8.dip0.t-ipconnect.de] has quit [Remote host closed the connection] 19:49:23 -!- drmeister [~drmeister@h69-21-18-138.nwlnnh.dedicated.static.tds.net] has quit [Remote host closed the connection] 19:50:43 ASau [~user@p5797FAB8.dip0.t-ipconnect.de] has joined #sbcl 19:54:35 drmeister [~drmeister@h69-21-18-138.nwlnnh.dedicated.static.tds.net] has joined #sbcl 20:02:33 specbot [~specbot@common-lisp.net] has joined #sbcl 20:02:34 minion [~minion@common-lisp.net] has joined #sbcl 20:13:01 -!- drmeister [~drmeister@h69-21-18-138.nwlnnh.dedicated.static.tds.net] has quit [Remote host closed the connection] 20:13:47 *stassats* conjures a devious plan to bind *type-system-initialized* to T before calling make-array 20:15:19 plan b: detect some common cases without subtypep. 20:15:53 yeah, i only need ub8 and ub16 20:16:17 I think there's a github ticket for slow make-array 20:16:24 and space savings are at 928KB 20:16:29 the plan worked 20:16:58 my angle on it is to add a couple equal-based cases (via a hash table0 20:18:10 now i need to somehow get rid of #-sb-xc from devine-vop going into the final core 20:19:13 i can push a #-sb-xc-less form into cold-init forms 20:19:53 i don't actually get why it fails #+sb-xc, when i expand define-vop inside a macrolet, it doesn't expand macrolet macros 20:19:55 which is weird 20:20:13 works at all other times, just not during cross-compilation 20:21:09 I vaguely remember some other XC brokenness that lead to toplevel macros because macrolet didn't work 20:21:23 -!- segv- [~mb@95-91-241-76-dynip.superkabel.de] has quit [Remote host closed the connection] 20:21:54 segv- [~mb@95-91-241-76-dynip.superkabel.de] has joined #sbcl 20:22:00 the best course of action would be to get rid of that problem 20:22:57 by the way, i accept feature requests as to how define-vop interface may be improved 20:24:11 how about :before and :after vops, for amending existing ones? 20:24:30 I don't see many use cases. 20:25:25 i'm just drawing a parallel from classes 20:25:30 since they already have inheritance 20:26:57 -!- wbooze [~wbooze@xdsl-87-79-198-220.netcologne.de] has quit [Ping timeout: 256 seconds] 20:28:16 (:translate ) can actually have more than one function 20:28:23 but that's not used anywhere 20:29:07 i can remove that feature 20:29:50 why would you remove it? 20:30:07 it's not used, i don't see why it would be used 20:30:57 i would, if the translated function was available to the generator 20:30:59 ehaliewicz [~user@50-0-51-11.dsl.static.sonic.net] has joined #sbcl 20:30:59 slyrus [~chatzilla@173-228-44-92.dsl.static.sonic.net] has joined #sbcl 20:31:37 what do you mean? 20:32:16 drmeister [~drmeister@173-162-165-237-NewEngland.hfc.comcastbusiness.net] has joined #sbcl 20:32:29 -!- drmeister [~drmeister@173-162-165-237-NewEngland.hfc.comcastbusiness.net] has quit [Remote host closed the connection] 20:33:00 (:generator 5 (case translated-function ...)) 20:33:16 ah, i see 20:33:49 that's done with variants and multiple vops now 20:34:01 indeed. 20:41:36 drmeister [~drmeister@h69-21-18-138.nwlnnh.dedicated.static.tds.net] has joined #sbcl 20:41:45 -!- drmeister [~drmeister@h69-21-18-138.nwlnnh.dedicated.static.tds.net] has quit [Remote host closed the connection] 20:41:54 -!- Bike_ is now known as Bike 20:42:24 -!- foreignFunction [~niksaak@ip-4761.sunline.net.ua] has quit [Quit: Leaving.] 20:46:43 -!- stassats [~stassats@wikipedia/stassats] has quit [Ping timeout: 264 seconds] 20:55:41 i have a weird situation where (sb-sprof:start-profiling :mode :time) never collects any samples when run. :mode :cpu and :mode :alloc work just fine. in a fresh sbcl it also works just fine. 20:55:59 does anybody have any idea what i could be doing which would hinder the timers in sb-sprof from firing? 21:03:16 sdemarre [~serge@8.65-64-87.adsl-dyn.isp.belgacom.be] has joined #sbcl 21:05:47 drmeister [~drmeister@173-162-165-237-NewEngland.hfc.comcastbusiness.net] has joined #sbcl 21:06:02 -!- drmeister [~drmeister@173-162-165-237-NewEngland.hfc.comcastbusiness.net] has quit [Remote host closed the connection] 21:10:55 -!- prxq [~mommer@mnhm-4d010033.pool.mediaWays.net] has quit [Quit: Leaving] 21:15:22 installing a SIGALRM handler? 21:16:45 (perhaps via with-timeout) 21:23:06 vi1 [~vi1@93.92.216.186] has joined #sbcl 21:26:01 foom: i'll look deeper, but i tried simply reinstalling the handler sb-unix:sigalrm-handler and things remained broken 21:26:23 does with-timeout actually install a handler? i though it just set a few timers. 21:27:13 (there are certainly a few places in this code base where with-timout is used) 21:27:46 -!- sdemarre [~serge@8.65-64-87.adsl-dyn.isp.belgacom.be] has quit [Ping timeout: 246 seconds] 21:38:39 -!- angavrilov [~angavrilo@217.71.227.190] has quit [Ping timeout: 260 seconds] 21:42:13 foom: is there a way i can ask sbcl what the current sigalrm handler is? 21:43:14 -!- edgar-rft [~GOD@HSI-KBW-149-172-63-75.hsi13.kabel-badenwuerttemberg.de] has quit [Quit: no idea] 21:43:20 oh lookie, sb-sprof actually uses a timer thread. 21:43:24 now that's a good idea. :) 21:45:07 foom: is there a reason that time thread doesn't just do the signaling itself directly? (instead of sitting for 1 second) 21:45:18 and by "signalling" i just mean calling thread-distribution-handler 21:45:34 Right, that's what I was wondering 21:45:40 It looks like the thread doesn't ever do anything. :) 21:45:52 Odyessus [~odyessus@chello080109062130.15.14.vie.surfer.at] has joined #sbcl 21:54:35 -!- LiamH [~none@pdp8.nrl.navy.mil] has quit [Quit: Leaving.] 21:55:38 -!- Odyessus [~odyessus@chello080109062130.15.14.vie.surfer.at] has quit [Quit: Colloquy for iPad - http://colloquy.mobi] 21:56:46 -!- slyrus [~chatzilla@173-228-44-92.dsl.static.sonic.net] has quit [Ping timeout: 240 seconds] 22:00:32 drmeister [~drmeister@h69-21-18-138.nwlnnh.dedicated.static.tds.net] has joined #sbcl 22:01:07 -!- drmeister [~drmeister@h69-21-18-138.nwlnnh.dedicated.static.tds.net] has quit [Remote host closed the connection] 22:02:51 foom: i take it back, the wallclock timer is getting run (i've traced sb-impl::run-time), but it's only getting run once. 22:02:59 back to the drawing board :( 22:37:01 davazp [~user@254.Red-79-144-63.dynamicIP.rima-tde.net] has joined #sbcl 22:39:15 so, my problem seems to be that the thread-interruptions slot grows and grows (every time a timer is signaled) but the corresponding functions are never called. 22:39:59 the specific thread, though i don't think it matters too much, is slime's repl-thread 22:41:07 davazp` [~user@165.Red-79-144-63.dynamicIP.rima-tde.net] has joined #sbcl 22:42:38 -!- davazp [~user@254.Red-79-144-63.dynamicIP.rima-tde.net] has quit [Ping timeout: 245 seconds] 23:02:18 -!- Sagane [~Sagane@177.100-226-89.dsl.completel.net] has quit [Read error: Connection reset by peer] 23:05:11 davazp`` [~user@165.Red-79-144-63.dynamicIP.rima-tde.net] has joined #sbcl 23:06:38 -!- davazp` [~user@165.Red-79-144-63.dynamicIP.rima-tde.net] has quit [Read error: Connection reset by peer] 23:06:47 scymtym_ [~user@ip-5-147-122-209.unitymediagroup.de] has joined #sbcl 23:15:05 drmeister [~drmeister@173-162-165-237-NewEngland.hfc.comcastbusiness.net] has joined #sbcl 23:17:33 is there a specific reason sbcl uses SIGPIPE (as opposed something like USR1) for thread interruption? 23:18:10 turns out my code was ignoring SIGPIPE in an attempt to get EPIPE errors when writing to closed sockets (which is, in and of itself, a debatable implementation choice) 23:25:44 -!- ehaliewicz [~user@50-0-51-11.dsl.static.sonic.net] has quit [Remote host closed the connection] 23:39:33 randomly ran into a weird (bad?) compiler case... compiling (mod (expt 3 481891) 17) takes four seconds 23:40:02 -!- drmeister [~drmeister@173-162-165-237-NewEngland.hfc.comcastbusiness.net] has quit [Remote host closed the connection] 23:40:23 kinda curious what's going on there. 23:45:46 is it just taking a while to compute the constant? 23:51:49 davazp``` [~user@165.Red-79-144-63.dynamicIP.rima-tde.net] has joined #sbcl 23:52:42 -!- davazp`` [~user@165.Red-79-144-63.dynamicIP.rima-tde.net] has quit [Remote host closed the connection] 23:57:52 drmeister [~drmeister@h69-21-18-138.nwlnnh.dedicated.static.tds.net] has joined #sbcl