[2008/04/30 19:00:26] well I suppose we can get started [2008/04/30 19:00:33] yes, is everyone ready? [2008/04/30 19:00:37] any objections to starting? [2008/04/30 19:00:39] I can moderate if nobody else wants to [2008/04/30 19:00:48] @ crafterm_ joined channel #ruby-core [2008/04/30 19:01:00] 9pm means go in MN [2008/04/30 19:01:08] ok [2008/04/30 19:01:22] so anyone who wasn't here last time and feels like they oughta, please introduce yourselve [2008/04/30 19:01:38] and if there is any such person, maybe we should reintroduce as well [2008/04/30 19:01:52] barring that we'll jump right in [2008/04/30 19:02:16] ok...we'll take that as a no [2008/04/30 19:02:25] so, scheduling is first up [2008/04/30 19:02:30] matz_: last time you should Tanaka might be here? [2008/04/30 19:02:32] i'll keep notes again. [2008/04/30 19:02:51] maybe this is a good time to discuss europe too [2008/04/30 19:03:04] @ headius set topic "http://ruby-design.pbwiki.com/Design20080430 - Scheduling discussion" [2008/04/30 19:03:06] ? [2008/04/30 19:03:16] @ ryan_a joined channel #ruby-core [2008/04/30 19:03:18] olabini: you wanna plead your case quick? [2008/04/30 19:03:21] .chan [2008/04/30 19:03:27] yes, 3AM is maybe too late/early for olabini :) [2008/04/30 19:03:32] it will be worse in sweden [2008/04/30 19:03:42] nah. 3am is prtty ok. =) [2008/04/30 19:03:55] @ crafterm_ is now known as crafterm [2008/04/30 19:04:00] if you can deal with it, we'll stick with the time, so now's your chance :) [2008/04/30 19:04:03] I realize we can't have a time that suits everyone. I guess I'm in a minority. unless we want to have rotation scheme [2008/04/30 19:04:04] i used to work til 3am when i was living in europe :) [2008/04/30 19:04:05] this time is pretty good for me [2008/04/30 19:04:09] anyone else around GMT want to plead their case? [2008/04/30 19:04:16] olabini: maybe you meant Akinori. 1.8 branch maintainer [2008/04/30 19:04:17] headius: me too. [2008/04/30 19:04:28] znz: can you stop the biff bot for a while? [2008/04/30 19:04:32] nicksieger: yeah, sorry. [2008/04/30 19:04:34] whatever rotation we'd do I think .jp would have to be when matz + rubycore can attend [2008/04/30 19:04:49] so it would either be odd hours for US or EU [2008/04/30 19:04:55] it's in the morning here. [2008/04/30 19:05:05] headius: yup. well. I can deal with this. [2008/04/30 19:05:07] ok [2008/04/30 19:05:08] so we can shift afterwards for some hours [2008/04/30 19:05:10] so lets go on [2008/04/30 19:05:14] we'll move on to figuring out next meeting then [2008/04/30 19:05:32] ok, let's decide the date. [2008/04/30 19:05:35] everyone from JRuby will be at JavaOne next week...we can probably find someplace to jump in, but it won't be all of us [2008/04/30 19:05:35] ok, 2 weeks from today is the 14th [2008/04/30 19:05:48] do we like this Thursday morning/Wednesday evening schedule? [2008/04/30 19:05:58] I do [2008/04/30 19:06:02] yeah [2008/04/30 19:06:17] 15th is not convenient for me [2008/04/30 19:06:19] @ dje joined channel #ruby-core [2008/04/30 19:06:24] what works for you matz [2008/04/30 19:06:41] 7,8,14,16 [2008/04/30 19:06:47] JST [2008/04/30 19:07:03] ok, shall we push it forward one day [2008/04/30 19:07:10] to the 15th/16th [2008/04/30 19:07:13] same time of day [2008/04/30 19:07:36] so that would be thursday US, friday EU/JP [2008/04/30 19:07:42] next time, yes [2008/04/30 19:07:46] works for me [2008/04/30 19:07:49] 16 Japan 15, US [2008/04/30 19:07:54] ok [2008/04/30 19:08:02] any opposed? [2008/04/30 19:08:08] I'll opt out of that one, it's a fly-day [2008/04/30 19:08:23] is two week interval OK? [2008/04/30 19:08:24] but I won't veto [2008/04/30 19:08:40] oh, i have a team meeting late afternoon, i may not be able to join, but it's not a big deal [2008/04/30 19:08:46] two week works well for me [2008/04/30 19:08:47] matz_: maybe two week by default, but we can decide based on other schedules [2008/04/30 19:08:51] like not during railsconf [2008/04/30 19:08:58] OK [2008/04/30 19:08:59] meeting by meeting [2008/04/30 19:09:38] ok then, same time (11AM JST) on the 16th [2008/04/30 19:09:41] (15th US [2008/04/30 19:09:42] ) [2008/04/30 19:10:04] we'll move on [2008/04/30 19:10:12] @ headius set topic "http://ruby-design.pbwiki.com/Design20080430 - Action item review" [2008/04/30 19:10:13] ok. [2008/04/30 19:10:26] I'll go first, since I punted mine to vladimir [2008/04/30 19:10:37] vladimir posted the list of 1.8.7 spec failures [2008/04/30 19:11:08] I think akira was able to finally get specs to run? [2008/04/30 19:11:09] ok, is there a next step needed by us? [2008/04/30 19:11:19] @ MenTaLguY joined channel #ruby-core [2008/04/30 19:11:22] @ brixen_ is now known as brixen [2008/04/30 19:11:23] I'm sure knu saw that message [2008/04/30 19:11:27] hello [2008/04/30 19:11:38] matz_: are the failures being discussed on ruby-dev at all? [2008/04/30 19:11:47] not much discussion yet on ruby-core [2008/04/30 19:12:13] We talked about segv on Kernel method [2008/04/30 19:12:15] we would like to start adding 1.8.7 features but we worry about failures and don't want to waste effort [2008/04/30 19:12:21] and merged Guy's patch [2008/04/30 19:12:54] there are obviously a lot of failures [2008/04/30 19:13:00] maybe just good behavior changes [2008/04/30 19:13:09] but we don't know for certain [2008/04/30 19:13:13] I have not heard about the roadmap to make 1.8 to adopt spec [2008/04/30 19:13:34] let me talk with knu [2008/04/30 19:13:40] ok [2008/04/30 19:13:45] I asked him to attend this meeting [2008/04/30 19:13:56] but he couldn't make it I guess [2008/04/30 19:13:57] so action item for matz: talk to knu about plans for specs and failures? [2008/04/30 19:14:08] yeah [2008/04/30 19:14:09] we are all willing to help too [2008/04/30 19:14:36] ok, what else...checking items [2008/04/30 19:14:47] headius: spec split off update if you want [2008/04/30 19:15:02] ok, and you can talk about your action item too [2008/04/30 19:15:23] headius: are you going to change topic of channel for each item like last time? [2008/04/30 19:15:24] so, we have a slice for rubyspec.org and I'll have redmine up there hopefully tomorrow [2008/04/30 19:15:32] oh yes [2008/04/30 19:15:39] well it's just action item review now [2008/04/30 19:15:50] brixen: ok, continue [2008/04/30 19:15:54] I've got repos ready at github, and I just reorg'd the dir structure of mspec so it can be a gem [2008/04/30 19:16:10] I haven't announced yet because I want to avoid some confusion with these last touch ups [2008/04/30 19:16:19] plan to announce and split off in the next couple days [2008/04/30 19:16:24] wow [2008/04/30 19:16:26] really split off? [2008/04/30 19:16:29] or split off mspec? [2008/04/30 19:16:42] both, barring any unforeseen messes :) [2008/04/30 19:16:58] that's great [2008/04/30 19:17:00] ahead of the last schedule I heard [2008/04/30 19:17:30] so I didn't see an update from you to ruby-core...was that basically because of this work? [2008/04/30 19:17:37] yes [2008/04/30 19:17:43] seems fair to me :) [2008/04/30 19:17:49] trying to avoid prematurely getting people confused [2008/04/30 19:18:14] well, that's great news to me :) [2008/04/30 19:18:34] ok, we'll move on from action items to agenda [2008/04/30 19:18:44] also, we've had a little pickup in traffic on rubyspec ML and some conversations in #rubyspec [2008/04/30 19:18:52] just to remind folks that those resources are there [2008/04/30 19:19:05] yeah, can we just bump forward your action item from last week then? [2008/04/30 19:19:13] yes, please do [2008/04/30 19:19:14] that info would all come out, and we'd all blog it and spread the word too [2008/04/30 19:19:21] sounds good [2008/04/30 19:19:32] ok...anything else? [2008/04/30 19:19:42] nope, unless there are questions [2008/04/30 19:20:06] Was someone going to make a make target for MRI? [2008/04/30 19:20:23] there wasn't an item for it yet...but that's probably part of knu discussion [2008/04/30 19:20:30] yeah ok [2008/04/30 19:21:10] ok, we'll move on now [2008/04/30 19:21:20] all items are addressed [2008/04/30 19:21:48] huzah [2008/04/30 19:21:49] I think continuous integration is going to depend on specs somewhat [2008/04/30 19:22:02] anyone want to try discussing that without knu here? might be no point [2008/04/30 19:22:13] hi [2008/04/30 19:22:21] knu! welcome [2008/04/30 19:22:21] here he is! [2008/04/30 19:22:39] I'm on the to office now... [2008/04/30 19:22:49] on the way [2008/04/30 19:23:04] should we wait to talk to you until later? [2008/04/30 19:23:17] this tiny keyboard is killing me but it's ok [2008/04/30 19:23:34] please move on [2008/04/30 19:23:35] we'll wait, it's ok [2008/04/30 19:23:41] so then [2008/04/30 19:23:42] MacRuby [2008/04/30 19:23:52] @ headius set topic "http://ruby-design.pbwiki.com/Design20080430 - MacRuby syntax discussion" [2008/04/30 19:23:59] lrz: it's all yours [2008/04/30 19:24:31] ok, i didn't add this point to the agenda [2008/04/30 19:24:41] what do you want to know? [2008/04/30 19:24:43] ok, can you give us an overview though? [2008/04/30 19:24:44] i rolled it from last time [2008/04/30 19:24:49] it as my item. [2008/04/30 19:24:53] it [2008/04/30 19:24:56] er ok [2008/04/30 19:25:03] evan: overview ok? [2008/04/30 19:25:10] ah okay [2008/04/30 19:25:21] mainly concerning discussion of keeping everyone on the same page in terms of syntax [2008/04/30 19:25:43] perhaps that means putting the MacRuby syntax into 1.9 [2008/04/30 19:25:53] ok, I see what you're saying [2008/04/30 19:25:56] ok, so macruby extends the parser to allow the definition of methods using named parameters [2008/04/30 19:25:57] i don't know, thats why I put it on the list. [2008/04/30 19:26:06] it is the only syntax change [2008/04/30 19:26:20] lrz: using : assoc syntax? [2008/04/30 19:26:40] when using this path, macruby will determine the method name to be registered according to the "named parameters" [2008/04/30 19:26:45] tom made a similar change to our parser for duby (experimental ruby-like language) using tassoc [2008/04/30 19:27:11] what does the macruby syntax for named parameters look like? [2008/04/30 19:27:15] yes, for example: def do_something(arg1, with:arg2) # will register do_something:with: [2008/04/30 19:27:33] and the syntax for calling them? [2008/04/30 19:27:34] I see [2008/04/30 19:27:40] I still feel little against having dynamically determined calling syntax [2008/04/30 19:27:50] it is briefly documented in http://trac.macosforge.org/projects/ruby/wiki/MacRubyTutorial#SendingMessages [2008/04/30 19:27:54] the duby change was def do_something(arg1 => whatever) [2008/04/30 19:27:59] no : tassoc in 1.8 parser [2008/04/30 19:28:06] headius: this syntax is also supported [2008/04/30 19:28:21] One idea for the tASSOC modification is the concept of metadata ala P3K [2008/04/30 19:28:23] matz_: i am still thinking about it, i may change it [2008/04/30 19:28:25] very interesting [2008/04/30 19:28:47] matz_: can you explain? I don't understand [2008/04/30 19:29:08] well, if you see "foo(1, bar: 2)" [2008/04/30 19:29:31] it might mean "foo(1, {:bar => 2})" or [2008/04/30 19:29:52] invoke "foo:bar:(1,2)" objective-c method [2008/04/30 19:29:54] foo:bar:(1,2) [2008/04/30 19:30:01] depending on having foo method [2008/04/30 19:30:01] yes [2008/04/30 19:30:04] right...I understand [2008/04/30 19:30:05] matz_: thats not so much the syntax, but instead what the syntax means [2008/04/30 19:30:10] can't we just have objective-c methods take their arguments as foo(1, {:bar => 2}) always? [2008/04/30 19:30:21] evan is correct [2008/04/30 19:30:21] in tom's duby parser change Ruby just ignored the syntax if it saw it [2008/04/30 19:30:23] we cannot use hashes [2008/04/30 19:30:24] it was only annotation data [2008/04/30 19:30:26] so the syntax is unambiguous [2008/04/30 19:30:27] for a few reasons [2008/04/30 19:30:53] what are the reasons against using hashes? [2008/04/30 19:30:56] does it allow duplicated named ones? [2008/04/30 19:31:01] key ordering (fixed in 1.9) and multiple keys (cannot be fixed) [2008/04/30 19:31:05] yes [2008/04/30 19:31:08] ordering shouldn't be a problem anymore [2008/04/30 19:31:16] ah [2008/04/30 19:31:17] what about separating named arguments with ; [2008/04/30 19:31:22] for example, performSelector:withObject:withObject: [2008/04/30 19:31:26] foo(a ; b:1) [2008/04/30 19:31:31] Smalltalk has value:value method for example [2008/04/30 19:31:45] I'm not sure we want to go too far down syntax discussion here [2008/04/30 19:31:51] is there a need for mixing named and unnamed arguments? [2008/04/30 19:31:52] but you can do [2008/04/30 19:31:54] agreed [2008/04/30 19:31:55] [foo bar] [2008/04/30 19:32:01] foo(1, {:bar => 1, :bar => 2}) [2008/04/30 19:32:08] the node tree for that will have both bars [2008/04/30 19:32:13] it's not until later than there is only one [2008/04/30 19:32:17] true [2008/04/30 19:32:20] it would take too much time to make up ideas here [2008/04/30 19:32:21] yeah but this is not a hash anymore [2008/04/30 19:32:23] you don't actually have to *instantiate* the hash [2008/04/30 19:32:24] I guess it's obvious that everyone feels there is a need for it. [2008/04/30 19:32:25] perhaps we need an action item to have a longer discussion on ruby-core...though there was one thread already [2008/04/30 19:32:31] from a syntax point of view, it's ordered and have have duplicates [2008/04/30 19:32:54] (named parameters, not a syntax discussion) [2008/04/30 19:32:55] I would plan to participate in a thread on this [2008/04/30 19:33:07] i could start a discussion on ruby-core [2008/04/30 19:33:12] hm, OTOH the arguments are going to get evaluated long before any call-related decisions are made [2008/04/30 19:33:16] back slightly to the reason i put on [2008/04/30 19:33:20] which was not what the syntax means [2008/04/30 19:33:21] lrz: you are open to changing, yes? based on discussions? [2008/04/30 19:33:24] but rather the syntax itself [2008/04/30 19:33:29] headius: maybe [2008/04/30 19:33:36] sounds like a good idea to take it to ruby-core [2008/04/30 19:33:38] obviously it would be ideal if the change could fit into other plans for ruby 1.9+ [2008/04/30 19:33:49] matz_: do you think that the MacRuby syntax is the same as 1.9's syntax? [2008/04/30 19:33:52] or is it different? [2008/04/30 19:33:59] evan: I guess your idea would also delay implicit hash instantiation until the method call is resolved? [2008/04/30 19:34:00] if it's different, can they be sync'd up? [2008/04/30 19:34:01] syntax rules are same [2008/04/30 19:34:09] semantics different [2008/04/30 19:34:11] yes [2008/04/30 19:34:13] yes. [2008/04/30 19:34:25] ok, lets put an action item to discuss method call semantics [2008/04/30 19:34:25] the only syntax change is very simple [2008/04/30 19:34:35] i'd rather add new syntax for new semantic [2008/04/30 19:34:43] if it could be agreed that existing ruby foo method would take priority, perhaps it's not quite as bad [2008/04/30 19:34:45] though, i would argue that since lrz using this to interface with another system, he can make up his own semantics anyway [2008/04/30 19:34:49] since it's already not Ruby. [2008/04/30 19:34:50] i thnk that matz doesn't plan to implement this until ruby 2.0, right? [2008/04/30 19:34:58] any possibility to change 1.9 semantics? [2008/04/30 19:35:14] not in 1.9 [2008/04/30 19:35:18] evan: perhaps true...but we interface with Java without new syntax, even with overloaded methods [2008/04/30 19:35:24] by using typical ruby tricks [2008/04/30 19:35:38] of course, it's not great...we'd probably like to be able to extend it [2008/04/30 19:35:45] matz: do you said about keyword arguuments? [2008/04/30 19:35:50] same here, unless for method definition [2008/04/30 19:36:05] method call semantics are a very large topic [2008/04/30 19:36:11] we could have an entire conference on it alone [2008/04/30 19:36:15] :) [2008/04/30 19:36:24] i move that we table this, and move on. [2008/04/30 19:36:27] well, I think we can constrain this to the semantics of argument passing [2008/04/30 19:36:29] if lrz starts a thread on method call stuff I will participate [2008/04/30 19:36:39] akr: basically I`m thinking about using hash [2008/04/30 19:36:44] because we have similar trouble integrating with Java we could probably address in the same discussion [2008/04/30 19:36:58] and this will come up for ironruby too [2008/04/30 19:36:58] the problem here is that macruby has different needs than mri [2008/04/30 19:37:08] how to deal with duplicated keys matz? [2008/04/30 19:37:14] because of the objc semantics [2008/04/30 19:37:41] shyouhei: duplication is not allowed for "our" keyword arguments [2008/04/30 19:37:43] lrz: as do we, with overloaded methods [2008/04/30 19:37:55] semantic mapping of foreign (objc, java) concepts to ruby syntax is a large topic [2008/04/30 19:38:01] right [2008/04/30 19:38:19] well, I say start the thread [2008/04/30 19:38:23] it will go where it goes [2008/04/30 19:38:24] I guess keywords arguments would be mapped to the formal parameters. [2008/04/30 19:38:27] okay, i will [2008/04/30 19:38:42] so they can't duplicate [2008/04/30 19:38:50] in the case of macruby, the argument names are composing the method name [2008/04/30 19:38:55] or the message that will be sent [2008/04/30 19:39:31] so action item for lrz to start the discussion thread on ruby-core [2008/04/30 19:39:42] lrz: yes, they are little bit different from simple "keyword arguments" [2008/04/30 19:40:03] matz_: yes, they are not really keyword/named arguments [2008/04/30 19:40:15] part of the selector [2008/04/30 19:40:15] headius: okay, i will do that [2008/04/30 19:40:21] maybe we could use the wiki also [2008/04/30 19:40:32] anyone else have anything on this? [2008/04/30 19:40:42] if not we can move on to MenTaLguY's item [2008/04/30 19:40:55] go ahead. [2008/04/30 19:41:04] it should be pretty brief [2008/04/30 19:41:10] ok, go for it [2008/04/30 19:41:20] basically, the current impementation of Ruby's select loop doesn't give stable sleep times across system clock changes [2008/04/30 19:41:31] @ headius set topic "http://ruby-design.pbwiki.com/Design20080430 - Scheduling: sleep, system clock" [2008/04/30 19:41:46] ah, yes [2008/04/30 19:41:50] the system select() is fine, but wakeups due to IO or other things mean that gettimeofday() is used to compute the delta [2008/04/30 19:42:41] as I noted in the minutes, using clock_gettime(CLOCK_MONOTONIC) instead of gettimeofday() when the former is available is basically sufficient to solve the problem [2008/04/30 19:42:59] there's a roughly equivalent call on Windows which escapes me at the moment [2008/04/30 19:43:13] do you have a patch to fix? [2008/04/30 19:43:31] for the sake of user libraries which implement their own select loops based on Ruby's select, it'd also be nice to expose the monotonic time to Ruby, but that's a separate issue [2008/04/30 19:43:46] I believe zimbatm submitted one to the mailing list a while back, but nobody responded [2008/04/30 19:43:51] submitted a patch, I mean [2008/04/30 19:44:05] MenTaLguY: change is needed in both 1.8 and 1.9? [2008/04/30 19:44:12] probably I have missed that one [2008/04/30 19:44:27] I believe it is required for both, yes [2008/04/30 19:44:31] I think JRuby is okay [2008/04/30 19:44:32] you have the ML reference? [2008/04/30 19:44:35] I need to check Rubinius though [2008/04/30 19:44:41] nokada: http://rubyforge.org/tracker/?func=detail&atid=1698&aid=13460&group_id=426 [2008/04/30 19:44:54] MenTaLguY: rubinius uses libev for all time related things [2008/04/30 19:44:58] which uses the monotonic clock [2008/04/30 19:45:00] JRuby would depend on whatever guarantees we get from System.currentTimeMillis [2008/04/30 19:45:05] libev! [2008/04/30 19:45:09] headius: which is really none. [2008/04/30 19:45:11] what license? [2008/04/30 19:45:13] ko1_: yep [2008/04/30 19:45:18] olabini: is nanos better? [2008/04/30 19:45:23] slightly. [2008/04/30 19:45:29] but not many guarantees there either [2008/04/30 19:45:30] we'll need to explore it then [2008/04/30 19:45:34] ko1_: it has a custom one, basically BSD. [2008/04/30 19:45:35] nanos is betterer though [2008/04/30 19:45:44] headius: specifically, all Java times are known to drift in VMs, for example [2008/04/30 19:45:44] evan: i see [2008/04/30 19:45:45] there's not much reason not to use it instead of millis [2008/04/30 19:45:48] no attached files there. [2008/04/30 19:46:15] I think I hear an action item...MenTaLguY, can you chase down a patch? [2008/04/30 19:46:22] for 1.8/1.9 I mean [2008/04/30 19:46:37] sure, I'll chase down the patch [2008/04/30 19:46:57] if it is a simple patch, I'd love to merge [2008/04/30 19:46:58] it doesn't seem so hard. [2008/04/30 19:47:14] if it requires to link new libraries, we have to discuss [2008/04/30 19:47:18] matz_: if I remember correctly, it is. the main difficulty is the autoconf test [2008/04/30 19:47:23] no libraries required [2008/04/30 19:47:30] and we need a bug filed against jruby [2008/04/30 19:47:33] 1.9 already use clock_gettime for nano second Time. librt is checked [2008/04/30 19:47:36] olabini, MenTaLguY....someone [2008/04/30 19:47:38] headius: for what? [2008/04/30 19:47:42] akr: excellent! [2008/04/30 19:47:48] for using currentTimeMillis to time out selects [2008/04/30 19:47:52] among other things [2008/04/30 19:48:17] headius: actually, selects is better in guarantee than currentTimeMillis [2008/04/30 19:48:19] but yeah [2008/04/30 19:48:34] yeah, but I think we still have it waking up and checking currentTimeMillis when a timeout is specified [2008/04/30 19:48:40] ah [2008/04/30 19:48:51] [ruby-core:15066]? [2008/04/30 19:48:52] I know we do for other things, at any rate [2008/04/30 19:48:56] so it needs an audit [2008/04/30 19:48:57] hm [2008/04/30 19:49:16] I wonder whether a DelayQueue ought to be used for JRuby sleeps, rather than trying to compensate with selector delays [2008/04/30 19:49:33] we can have that discussion, yes :) [2008/04/30 19:49:57] moving on. [2008/04/30 19:50:06] submit a patch to ruby-core (without autoconf test). [2008/04/30 19:50:10] we will merge it [2008/04/30 19:50:16] excellent [2008/04/30 19:50:21] without base64 [2008/04/30 19:50:38] ok [2008/04/30 19:50:42] I think this one is all set [2008/04/30 19:50:53] anything else on scheduling item? [2008/04/30 19:50:53] ok, I'll make a note in the minutes [2008/04/30 19:50:58] already done. [2008/04/30 19:51:13] alright then...moving on [2008/04/30 19:51:19] evan / MenTaLguY: looks like ruby-core:15066 [2008/04/30 19:51:24] as nokada said [2008/04/30 19:51:27] @ headius set topic "http://ruby-design.pbwiki.com/Design20080430 - String class in 1.9 & bytestrings" [2008/04/30 19:51:34] yeah [2008/04/30 19:51:37] I don't know whose this is...lrz? [2008/04/30 19:51:51] ah yes, this one is me [2008/04/30 19:52:05] any concern? [2008/04/30 19:52:13] okay, i have a concern about the String class in 1.9 [2008/04/30 19:52:25] which can hold encoded strings but also bytestrings [2008/04/30 19:52:49] minor correction: it's always a byte[] but encoding modifies method behavior, yes? [2008/04/30 19:52:54] i wonder if it wouldn't be better for a design point of view to have a separate class for byte strings [2008/04/30 19:53:00] i think that python3 is going into that direction [2008/04/30 19:53:11] (i may be wrong, i don't know python so well) [2008/04/30 19:53:15] ahh :) that is a big thing to wonder [2008/04/30 19:53:21] rbx has ByteArray [2008/04/30 19:53:46] this has been discussed before, during M17N work in 2007 [2008/04/30 19:53:57] lrz: I advocated as you do [2008/04/30 19:54:11] oh, this was already discussed [2008/04/30 19:54:19] sorry about that [2008/04/30 19:54:30] this needs looong discussion. [2008/04/30 19:54:42] I understand your reasons, but maybe you can explain so they're out there [2008/04/30 19:55:13] as I said headius then, I think it's better not to disclose internal representation of strings [2008/04/30 19:55:34] but in 1.9 the encoding is disclosed [2008/04/30 19:55:44] ...but also mutable [2008/04/30 19:56:25] yes, but basically forget about mutablility. [2008/04/30 19:56:37] ok [2008/04/30 19:56:40] say that you receive a string from an API, how do you know if it's a bytestring or a character string? [2008/04/30 19:57:04] that's not always distinguishable I think [2008/04/30 19:57:06] you can at runtime verify this, but by looking at the code, it may not be easy [2008/04/30 19:57:27] you can? [2008/04/30 19:57:35] and some byte string may contains ASCII sequences [2008/04/30 19:57:38] you can check encoding, but that's not the same [2008/04/30 19:57:39] byte strings have nil encoding or something? [2008/04/30 19:57:50] shyouhei: i guess you can check the encoding and bytesize [2008/04/30 19:57:51] so you might want some string operations on it [2008/04/30 19:57:53] it needs some high level knowledge. [2008/04/30 19:57:56] you can't know what the correct encoding is at least [2008/04/30 19:57:59] to some extent byte string versus encoded string is a question of intent [2008/04/30 19:58:01] matz_: correct [2008/04/30 19:58:20] that's the reason we don't have separate bytesting class [2008/04/30 19:58:28] MenTaLguY: it was decided that byte string is just another encoding [2008/04/30 19:58:36] "RAW", "PLAIN" or whatever [2008/04/30 19:58:40] ok [2008/04/30 19:58:56] lrz: is your concern made clear? [2008/04/30 19:59:07] headius: Except when it is just binary data [2008/04/30 19:59:20] matz_: yes, i can also read the m17n past discussions [2008/04/30 19:59:33] good [2008/04/30 19:59:35] is there a seperate ascii encoding from raw encoding? [2008/04/30 19:59:38] lrz: do that...I'm available to talk about it too [2008/04/30 19:59:43] @ bitsweat joined channel #ruby-core [2008/04/30 20:00:04] yes, does ascii == raw? [2008/04/30 20:00:13] some discussion was in ruby-dev [2008/04/30 20:00:18] and ruby-core [2008/04/30 20:00:28] we have ASCII-8BIT for binary [2008/04/30 20:00:33] matz_: what about introducing another class (Data?) and make String inherit of it [2008/04/30 20:00:36] and US-ASCII for US-ASCII [2008/04/30 20:00:48] already exists "BINARY" encoding, as alias of "ASCII-8BIT" [2008/04/30 20:00:55] lrz: could you elaborate? [2008/04/30 20:00:56] ok [2008/04/30 20:00:57] "nil encoding as synonym for binary encoding" ruby-core:14976 and its followups. [2008/04/30 20:01:01] If RAW is considered ASCII compatible, you'll have to string'ify it before doing almost anything, like comparing with a magic string such as 'GIF89a' [2008/04/30 20:01:02] lrz: That was also discussed on list from what I remember [2008/04/30 20:01:10] s/compatible/in&/ [2008/04/30 20:01:31] lrz: one possible solution I discussed with matz was having differently-encoded strings be different "actual" types behind the scenes [2008/04/30 20:01:32] knu: so that means that String with RAW encoding have different semantics than most other strings [2008/04/30 20:01:35] but still looking like String to ruby [2008/04/30 20:01:40] matz_: the byte-related APIs could be moved into a separate class, which String inherits from, and all the IO APIs could return instances of the bytestring/data class instead of string [2008/04/30 20:01:48] I don't know if that's a feasible option for you or not [2008/04/30 20:02:19] lrz: then what that changes give you at the cost of complexity [2008/04/30 20:02:21] what's the merit of separating class [2008/04/30 20:02:59] a less ambiguous design? [2008/04/30 20:03:11] olabini: we want to know if there is any good example where separating RAW from ASCII-8BIT would help [2008/04/30 20:03:12] line depends character. So gets method will removed from IO? [2008/04/30 20:03:27] binary and strings are ambiguous from the beginning [2008/04/30 20:03:32] I think we should table this until after some research [2008/04/30 20:03:32] not due to the class design [2008/04/30 20:03:37] unfortunately, the complexity for the user would be to convert Data objects into String objects [2008/04/30 20:03:41] most of us were in those discussions, so it's not fair to lrz [2008/04/30 20:03:49] right [2008/04/30 20:04:08] i agree, i will read the past discussions :) [2008/04/30 20:04:15] lrz: you can bring this item back when you're caught up :) [2008/04/30 20:04:21] sure, will do [2008/04/30 20:04:23] my concern is the new M17N design can be efficiently implemented [2008/04/30 20:04:28] for JRuby [2008/04/30 20:04:52] in macruby it was hard to implement [2008/04/30 20:05:05] matz_: we have JOni now, so that's most of it [2008/04/30 20:05:23] and we already have internally a separate abstraction for String backing store [2008/04/30 20:05:25] What's Joni? [2008/04/30 20:05:25] does objective-c have separate bytestring and string? [2008/04/30 20:05:31] yes [2008/04/30 20:05:33] we will let you know if we run into problems [2008/04/30 20:05:39] akr: joni = Java Oniguruma port [2008/04/30 20:05:43] akr: Java implementation of Oniguruma [2008/04/30 20:05:45] by Marcin Mielzynski [2008/04/30 20:05:47] CFString and CFData (part of the CF framework, on which cocoa is based upon) [2008/04/30 20:06:00] http://www.nilab.info/wiki/Joni.html (Japanese) [2008/04/30 20:06:10] how do you switch then [2008/04/30 20:06:37] i create and attach bytestrings at demand [2008/04/30 20:06:50] when a bytestring is created or when a string mutates into a bytestring [2008/04/30 20:07:00] hopefully the 2nd case is rare [2008/04/30 20:07:00] ew [2008/04/30 20:07:14] OK, I will check CFString and CFData [2008/04/30 20:07:18] discuss later [2008/04/30 20:07:30] that's nice of you :) [2008/04/30 20:07:33] knu: hahah [2008/04/30 20:07:44] ok [2008/04/30 20:07:52] so we'll move on if there's nothing else [2008/04/30 20:08:00] we're making good progress tonight :) [2008/04/30 20:08:29] and a good amount of homework left :) [2008/04/30 20:08:32] Ok, uninclude [2008/04/30 20:08:43] @ headius set topic "http://ruby-design.pbwiki.com/Design20080430 - Uninclude functionality" [2008/04/30 20:08:47] Who's up [2008/04/30 20:09:08] headius: I added that, but since it's been discussed on ruby-core we can punt that [2008/04/30 20:09:47] ok [2008/04/30 20:09:55] Isn't this related to Yurik proposal? [2008/04/30 20:10:00] yeah [2008/04/30 20:10:06] I am not comfortable about changing class/module hierarchy [2008/04/30 20:10:18] for no reason [2008/04/30 20:10:22] I wasn't clear the problem it solves [2008/04/30 20:10:48] but I did not read the whole thread...we can move on [2008/04/30 20:10:57] Ruby can add/remove many things...why not this? [2008/04/30 20:10:58] headius: state machines can be implemented very elegantly with it [2008/04/30 20:11:04] Mixology provides the functionality [2008/04/30 20:11:14] as native extension to MRI and JRuby [2008/04/30 20:11:22] interesting [2008/04/30 20:11:23] @ jp_iph joined channel #ruby-core [2008/04/30 20:11:25] It is trivially implemented too [2008/04/30 20:11:29] enebo: that was kinda my thinking about it [2008/04/30 20:11:35] but it does not work well with method cache [2008/04/30 20:11:39] But being easy to implement is not a use case for adding it :) [2008/04/30 20:11:43] matz_: no, realize that. [2008/04/30 20:11:56] matz_: but neither does adding singleton methods to an object [2008/04/30 20:12:04] or extending a single object [2008/04/30 20:12:09] they have the same cache problems [2008/04/30 20:12:12] i think. [2008/04/30 20:12:17] hmmm [2008/04/30 20:12:24] I don't have that problem with singleton methods [2008/04/30 20:12:30] evan, they do — just like extend, unextend clears cache [2008/04/30 20:12:32] so you want to make state machine easier at the cost of performance [2008/04/30 20:12:36] evan: not exactly, since the lookup in the cache is on the objects closest class [2008/04/30 20:12:44] singleton creates its own class, so caching can be flushed based on that [2008/04/30 20:12:45] adding methods are usualy done at beginning of objects. [2008/04/30 20:12:49] matz_: no, that's not the only reason [2008/04/30 20:12:58] in MRI, adding singleton method does no clear the whole cache [2008/04/30 20:13:17] and neither does JRuby [2008/04/30 20:13:20] olabini: what about extending an object? [2008/04/30 20:13:22] object's dispatch type essentially changes, so caching is not fooled...maybe I'm not understanding why it's a problem [2008/04/30 20:13:29] it clears the cache only for the singleton class? [2008/04/30 20:13:33] evan: also adds a synthetic class [2008/04/30 20:13:37] i've implemented this, I just don't recall [2008/04/30 20:13:45] olabini: sure, but if the class is already there [2008/04/30 20:13:53] eh? [2008/04/30 20:13:58] s = ""; s.extend(A); s.extend(B) [2008/04/30 20:14:08] evan: so the synthetic class is evicted. [2008/04/30 20:14:20] and cache flushes cascade down hierarchy on inclusion [2008/04/30 20:14:45] we can have that discussion outside this though [2008/04/30 20:14:47] btw, I have added some specs to rbmodexcl a couple of mins ago [2008/04/30 20:14:48] maybe after [2008/04/30 20:14:57] yurik, do you want to say more about the proposal? [2008/04/30 20:15:17] why do you want, for example [2008/04/30 20:15:30] headius, well, I'd like to discuss it — I just had a need in #unextend for my project (strokedb) [2008/04/30 20:15:49] I wanted to exclude extra metadocument modules at runtime [2008/04/30 20:16:02] and it appeared that hacking MRI to do this was pretty easy [2008/04/30 20:16:07] extend calls rb_clear_cache() with no args [2008/04/30 20:16:13] matz_: I didn't have a specific use case in mind - Ruby provides me with lots of flexibility, and this was one area I didn't really see the need for the restriction [2008/04/30 20:16:16] @ tatsuji joined channel #ruby-core [2008/04/30 20:16:27] evan, as well as unextend, so I thought it is not a big deal [2008/04/30 20:16:28] thus an extend clears the entire cache. [2008/04/30 20:16:33] evan: oh, nice. [2008/04/30 20:16:41] that doesn't happen in JRuby [2008/04/30 20:16:50] but because you can't unextend, extend is more rare [2008/04/30 20:16:55] if you could unextend [2008/04/30 20:17:01] people would do it constantly [2008/04/30 20:17:07] and thus constantly dumping the method cache [2008/04/30 20:17:14] true [2008/04/30 20:17:14] it would be a big deal [2008/04/30 20:17:33] evan, if they care about performance, they shouldn't do it [2008/04/30 20:17:37] evan: are we have a discussion about restricting language power for the good of the users here? [2008/04/30 20:17:39] this is the price of disipline. [2008/04/30 20:17:41] @ Quit: crafterm: [2008/04/30 20:17:44] if they don't, they will still have this flexibility [2008/04/30 20:17:51] evan: like eval [2008/04/30 20:17:53] Yurik: exactly [2008/04/30 20:18:06] it's 2 fold then: [2008/04/30 20:18:15] 1) people need to very aware of the performance implications [2008/04/30 20:18:26] 2) improving the cache clearing algorithm could mitigate it. [2008/04/30 20:18:28] for example, for strokedb unextend is a rare operation, but still I need it sometimes, so that is why I've implemented rbmodexcl [2008/04/30 20:18:41] mitigate == make it not so bad [2008/04/30 20:18:41] we would be willing to discuss JRuby cache design on list if it would help other implementations [2008/04/30 20:18:51] it narrows cache flushing to subhierarchy [2008/04/30 20:19:06] (once we get it reinstalled) [2008/04/30 20:19:11] headius: it requires knowing all subclasses, yes? [2008/04/30 20:19:17] yeah it got ripped and and now we miss it [2008/04/30 20:19:33] no, just knowing which ones cached it [2008/04/30 20:20:00] well, perhaps this discussion should continue on ruby-core [2008/04/30 20:20:05] yes [2008/04/30 20:20:11] @ Quit: jp_iph: Read error: 104 (Connection reset by peer) [2008/04/30 20:20:27] yes [2008/04/30 20:20:36] Yurik: I think the short answer is that without mitigating perf problems, it's unlikely to be accepted [2008/04/30 20:20:43] even with a desire to be featureful [2008/04/30 20:21:04] headius, I see. nvm, I will use it as a separate extension, like I do now [2008/04/30 20:21:05] so we should discuss that on list [2008/04/30 20:21:08] ok [2008/04/30 20:21:18] Yurik: you have seen Mixology? [2008/04/30 20:21:18] well open action item if anyone wants to bring up caching, related or not [2008/04/30 20:21:24] for list discussion [2008/04/30 20:21:27] I just wanted to share this function with the community [2008/04/30 20:21:34] olabini, yes [2008/04/30 20:21:47] ok, we only have one more item for tonight [2008/04/30 20:21:59] RUBY_ENGINE? [2008/04/30 20:21:59] @ headius set topic "http://ruby-design.pbwiki.com/Design20080430 - RUBY_ENGINE or similar constant to indicate implementation" [2008/04/30 20:22:00] olabini, but I wanted something simple and didn't want to increase an entropy of Ruby universe. [2008/04/30 20:22:21] you guys could probably take it to list or ruby-lang if you like [2008/04/30 20:22:51] if we finish up this item we'll have a clean slate for next time [2008/04/30 20:23:08] whose is this? [2008/04/30 20:23:10] so who owns the RUBY_ENGINE? [2008/04/30 20:23:20] I'm very interested, but I didn't add it [2008/04/30 20:23:27] dunno [2008/04/30 20:23:34] i think we mainly just need a decision from matz [2008/04/30 20:23:35] headius: take the item [2008/04/30 20:23:38] ok [2008/04/30 20:23:48] matz_: I think you agree it would be good to add, yes? [2008/04/30 20:23:54] I am OK if the name is OK [2008/04/30 20:24:01] i am also interested to know which constant name we should use [2008/04/30 20:24:02] engine is fine with me [2008/04/30 20:24:02] what's the issue? constant name? [2008/04/30 20:24:05] Rubinius has rbx in RUBY_ENGINE [2008/04/30 20:24:09] and the value(s) [2008/04/30 20:24:20] and what kind of info it has? [2008/04/30 20:24:26] yes, what should the value be? [2008/04/30 20:24:26] i've fine changing it to "Rubinius" rather than :rbx [2008/04/30 20:24:35] it will always be "jruby" in jruby, even if using rbx or yarv bytecode machine, since they won't alter features [2008/04/30 20:24:37] just something unique per project [2008/04/30 20:24:47] okay [2008/04/30 20:24:48] yes, just something unique [2008/04/30 20:24:49] I'd say all lowercase [2008/04/30 20:24:54] I would be interested in having more info in something like that [2008/04/30 20:24:57] to make this easier: http://pastie.org/189724 :) [2008/04/30 20:24:57] whatever the one-word project name is, eh? [2008/04/30 20:25:08] should we also have a common constant for the version number? [2008/04/30 20:25:17] so, MRI should say "ruby" ? [2008/04/30 20:25:21] "mri" for cruby 1.8 and "yarv" for cruby 1.9 ? [2008/04/30 20:25:23] evan: I thought rbx was IronRuby [2008/04/30 20:25:25] olabini: someone asked about a Hash, but I strongly recommend against that [2008/04/30 20:25:25] so using ENGINE to note the project name OK? [2008/04/30 20:25:35] brixen: why? [2008/04/30 20:25:42] yarv is only part of ruby 1.9 [2008/04/30 20:25:43] headius: they called their cli tool rbx [2008/04/30 20:25:47] it's being changed to ir this week [2008/04/30 20:25:48] olabini: because we need a single distinguishing data piece [2008/04/30 20:25:51] kidding :) [2008/04/30 20:25:51] john lam told me last week [2008/04/30 20:25:58] I bugged john about that a few times [2008/04/30 20:25:59] how about cruby instead of mri/yarv. [2008/04/30 20:26:01] what abount adding a version number? [2008/04/30 20:26:06] brixen: sure, but you also need more info in some cases. it would be nice to have a conclusive place to put it [2008/04/30 20:26:13] knu: that should be in a different variable [2008/04/30 20:26:14] jruby1.1.1? [2008/04/30 20:26:17] yeah [2008/04/30 20:26:21] we have JRUBY_VERSION [2008/04/30 20:26:21] no no, no versions. [2008/04/30 20:26:24] maybe ENGINE_VERSION [2008/04/30 20:26:26] that defeats the purpose [2008/04/30 20:26:32] a single variable would be nice though [2008/04/30 20:26:43] headius: I don't really like all these different constants [2008/04/30 20:26:44] olabini: I agree, I would just like a single constant to avoid the most common case being SOMETHING[:what_I_normally_want] [2008/04/30 20:26:46] i made it a symbol to make it super easy to use [2008/04/30 20:26:48] would prefer having them colelcted [2008/04/30 20:26:51] lets not bike shed this again. [2008/04/30 20:26:52] please. [2008/04/30 20:26:53] I guess a symbol would be better [2008/04/30 20:26:55] brixen: sure, I agree about that [2008/04/30 20:26:58] olabini: all the JRUBY_whatever? [2008/04/30 20:27:02] evan: I think RUBY_ENGINE for sure [2008/04/30 20:27:10] and just single-word name [2008/04/30 20:27:12] rbconfig value? [2008/04/30 20:27:12] headius: and other things like that, yes. [2008/04/30 20:27:17] why hash instead of Struct? [2008/04/30 20:27:18] you could have RUBY_ENGINE and then ??????_VERSION based on the value of RUBY_ENGINE [2008/04/30 20:27:19] what happens for RUBY_VERSION if we HAVE ENGINE_VERSION ? [2008/04/30 20:27:23] enebo: right. [2008/04/30 20:27:30] and other ??????? variables. [2008/04/30 20:27:30] TheProkrammer: +1 [2008/04/30 20:27:41] rbconfig has advantage of not polluting topp-level namespace [2008/04/30 20:27:44] shyouhei: for mri that would be the same value i guess [2008/04/30 20:27:50] we're getting way off topic. [2008/04/30 20:27:54] yes [2008/04/30 20:27:55] please summarize what information we need to make application [2008/04/30 20:27:56] whats RUBY_VERSION on jruby? [2008/04/30 20:27:57] yes i agree [2008/04/30 20:28:00] TheProkrammer: that's exactly what seems like the wrong way for me, to have lots of ??? constants [2008/04/30 20:28:06] let's stick to just RUBY_ENGINE for now [2008/04/30 20:28:10] akr: same as MRI [2008/04/30 20:28:11] I vote that MatzRuby has RUBY_ENGINE="ruby" [2008/04/30 20:28:19] matz_: are you ok with RUBY_ENGINE? [2008/04/30 20:28:20] and we all use RUBY_VERSION to denote compatibility [2008/04/30 20:28:22] is the name of the implementation what you want to know? [2008/04/30 20:28:25] no comments allowed on rbconfig? [2008/04/30 20:28:27] and the value is a symbol or string? [2008/04/30 20:28:28] brixen: +1 [2008/04/30 20:28:39] brixen: +1 [2008/04/30 20:28:42] matz_: just something unique to identify the codebase [2008/04/30 20:28:43] enebo: does all the implementations support rbconfig? [2008/04/30 20:28:45] olabini: Different implementations may need very specific constants IRONRUBY_CLRVERSION for instance. [2008/04/30 20:28:45] OK, let me summarize [2008/04/30 20:28:48] evan: symbol? [2008/04/30 20:28:53] RUBY_ENGINE=:rbx [2008/04/30 20:28:55] lrz: kinda have to [2008/04/30 20:28:58] lrz: They better...plenty of packages depend on it [2008/04/30 20:29:01] TheProkrammer: which I don't like. [2008/04/30 20:29:12] evan: symbol can't =~ [2008/04/30 20:29:14] I take RUBY_ENGINE [2008/04/30 20:29:21] I don't like it to be a string because people would start using regexp match on it [2008/04/30 20:29:24] headius: you should never need to use =~ on it [2008/04/30 20:29:26] never. [2008/04/30 20:29:27] every implementation should provide its name in the constant [2008/04/30 20:29:31] why not [2008/04/30 20:29:32] headius: but you shouldn't need to match on that name anyway [2008/04/30 20:29:39] select a subset of impls [2008/04/30 20:29:41] headius: It kills kittens [2008/04/30 20:29:43] what would you be looking for thats ambigious? [2008/04/30 20:29:49] olabini: There's valid reasons for it, but we can talk about that on the side ;) [2008/04/30 20:29:51] headius: that wouldn't be in the this const [2008/04/30 20:29:57] that would be in something else. [2008/04/30 20:29:59] ruby 1.9 can regexp =~ symbol [2008/04/30 20:30:05] anyway, i'm [2008/04/30 20:30:07] is ruby 1.9 also "ruby"? [2008/04/30 20:30:09] akr: duh, correct [2008/04/30 20:30:10] fine with symbol or string [2008/04/30 20:30:21] akr: only ruby 1.9 [2008/04/30 20:30:23] headius: I say yes, RUBY_VERSION is the distinguisher [2008/04/30 20:30:23] but it should be a single name, no version [2008/04/30 20:30:28] no spaces [2008/04/30 20:30:34] we need to know what the underlying impl is [2008/04/30 20:30:36] evan: agreed. small caps name [2008/04/30 20:30:41] evan: can we use camel case? :) [2008/04/30 20:30:46] string would be more consistent with other constants [2008/04/30 20:31:02] and the value should be a string [2008/04/30 20:31:03] lrz: can we use lower case, please :) [2008/04/30 20:31:05] OK? [2008/04/30 20:31:11] ok [2008/04/30 20:31:17] fine with me [2008/04/30 20:31:18] matz_: what is the value on MRI going to be? [2008/04/30 20:31:24] "ruby" ? [2008/04/30 20:31:25] for 1.8, "ruby" [2008/04/30 20:31:28] ok [2008/04/30 20:31:29] sure [2008/04/30 20:31:35] for 1.9, I have to discuss with ko1 [2008/04/30 20:31:38] never repeat the RUBY_PLATFORM =~ /WIN/i mistake, evaluated to true for Darwin [2008/04/30 20:31:42] should it be different on 1.9? [2008/04/30 20:31:42] @ valda68k joined channel #ruby-core [2008/04/30 20:31:45] it is technically a different engine [2008/04/30 20:31:45] "kruby" [2008/04/30 20:31:47] knu: :) :) [2008/04/30 20:31:49] true [2008/04/30 20:31:51] matz: why don't "ruby" ? [2008/04/30 20:32:00] it has a different feature set i suppose. [2008/04/30 20:32:09] if we want to know feature set, use RUBY_VERSION, and if we want to know the name of impl., use RUBY_ENGINE. is it correct? [2008/04/30 20:32:13] it would be nice for the reference implementation to always be "ruby" [2008/04/30 20:32:17] I think the problem with not distinguishing is that people want this to have some rough idea of features [2008/04/30 20:32:24] knu: any ideas how to prevent that? [2008/04/30 20:32:29] unak: I like that [2008/04/30 20:32:34] if both 1.8 and 1.9 have "ruby" you have to start matching version [2008/04/30 20:32:37] hmmm [2008/04/30 20:32:41] @ crafterm joined channel #ruby-core [2008/04/30 20:32:45] if ruby 1.9 is not "ruby", what name will be used in 2.0 [2008/04/30 20:32:49] headius: Yes, and you'll have to do that anyway no? :) [2008/04/30 20:32:52] version =~ /1\.8/? [2008/04/30 20:32:58] headius: Though perhaps that may be a dilemma for us at some point to no? [2008/04/30 20:33:07] I think version may end up coming into play [2008/04/30 20:33:07] shyouhei: maybe name-based check is not very ruby-like [2008/04/30 20:33:09] enebo: certainly [2008/04/30 20:33:20] hmm. [2008/04/30 20:33:27] since this is the last thing [2008/04/30 20:33:30] yes [2008/04/30 20:33:31] can I bring up the root issue? [2008/04/30 20:33:39] of wanting this constant [2008/04/30 20:33:43] yes [2008/04/30 20:33:46] do taht [2008/04/30 20:33:49] please [2008/04/30 20:33:51] ..than feature set based check which is like Duck-typing [2008/04/30 20:33:56] 99.9% of the time, it's because someone needs to know the name of the ruby command thaht was issued to run the current program [2008/04/30 20:34:06] so they'd use this to figure out ruby/rbx/jruby whatever. [2008/04/30 20:34:06] that's already available [2008/04/30 20:34:16] not in 1.8 it's not. [2008/04/30 20:34:16] rbconfig [2008/04/30 20:34:22] thats the installed location [2008/04/30 20:34:25] not the current running one [2008/04/30 20:34:36] evan: http://pastie.org/189724 [2008/04/30 20:34:37] an great example of that is doing ../../blah/bin/ruby [2008/04/30 20:34:41] $0 ? [2008/04/30 20:34:45] $0 is the script [2008/04/30 20:34:50] Rubinius implements this [2008/04/30 20:35:00] evan: keep going [2008/04/30 20:35:00] by using getcwd() + argv[0] at start up [2008/04/30 20:35:02] argv[0] is not trustable [2008/04/30 20:35:08] to calculate the absolute path to the running binary [2008/04/30 20:35:15] evan: if we're looking to tie RUBY_ENGINE to command name that would be trouble for e.g. ironruby [2008/04/30 20:35:19] akr: true, but in this case, i think we should trust it. [2008/04/30 20:35:32] "ironruby" is better than "ir" and we're not going to get john to change it [2008/04/30 20:35:41] RUBY_ENGINE is probably totally different from the command line name [2008/04/30 20:35:43] I would like to distinguish executable name from engine name for the specs, if possible [2008/04/30 20:35:43] @ timo joined channel #ruby-core [2008/04/30 20:35:49] I am not sure about that use case at all. [2008/04/30 20:35:49] >> RUBY_BIN_PATH [2008/04/30 20:35:49] => "/Users/evanphx/git/rbx-simple/rubinius" [2008/04/30 20:35:53] thats in Rubinius [2008/04/30 20:35:56] RUBY_ENGINE should not be the same value than the command line name [2008/04/30 20:36:09] shebang handling depends on OS [2008/04/30 20:36:10] evan: I think the root use case for this is to know features [2008/04/30 20:36:17] The only conceivable reason I have is feature distinction. Supporting fork and so on [2008/04/30 20:36:18] like choosing java extension on jruby [2008/04/30 20:36:19] i don't mean that RUBY_ENGINE is used as the binary [2008/04/30 20:36:22] it's used as a key [2008/04/30 20:36:30] how to use RUBY_ENGINE? [2008/04/30 20:36:30] to calculate what the name might be [2008/04/30 20:36:37] case RUBY_ENGINE [2008/04/30 20:36:39] when :rbx [2008/04/30 20:36:43] bin = "rbx" [2008/04/30 20:36:45] when :ruby [2008/04/30 20:36:48] bin = "ruby [2008/04/30 20:36:51] when :ironruby [2008/04/30 20:36:54] bin = "ir" [2008/04/30 20:36:58] etc.. [2008/04/30 20:36:58] end [2008/04/30 20:36:59] evan: I think that and many other cases will fall out of RUBY_ENGINE as we've discussed it [2008/04/30 20:37:00] evan: shouldn't that be the responsibility of the implementation to tellyou? [2008/04/30 20:37:05] is there a specific point you wanted to make? [2008/04/30 20:37:06] olabini: thats my point. [2008/04/30 20:37:14] why installation place is bad? [2008/04/30 20:37:14] that the impl should provide the name of the running binary [2008/04/30 20:37:14] the binary name, that is [2008/04/30 20:37:25] akr: there are a lot of cases where it's wrong [2008/04/30 20:37:32] evan: yeah, sure. but that's got nothing to do with RUBY_ENGINE [2008/04/30 20:37:33] Of course nothing stops the user from renaming the binary to whatever they want anyway... [2008/04/30 20:37:34] akr: running out of the ruby build directory is one [2008/04/30 20:37:36] so, do you mean you want something like Perl's $&I? [2008/04/30 20:37:38] I think that's a separate case from RUBY_ENGINE, maybe implemented with it, but separate [2008/04/30 20:37:39] is the binary name supposed to be static for every implementation? [2008/04/30 20:37:43] in macruby i will use "ruby" [2008/04/30 20:37:49] $^I I mean [2008/04/30 20:37:52] lrz: really? [2008/04/30 20:37:53] lrz: not necessarily [2008/04/30 20:38:01] matz_: I think that's what we want [2008/04/30 20:38:03] you're going to have macruby install itself as the command ruby? [2008/04/30 20:38:17] test in build directory is specific to engine developpers. [2008/04/30 20:38:23] evan: yeah, all versions should be packaged in the same .framework [2008/04/30 20:38:24] lrz: command name conflicts will be rough [2008/04/30 20:38:34] lrz: thats a very bad iead. [2008/04/30 20:38:36] everyone want to get command line name? [2008/04/30 20:38:36] many guys here uses ruby1.8 and ruby1.9 as the binary name of ruby, I guess :) [2008/04/30 20:38:38] idea. [2008/04/30 20:38:45] are there other cases? [2008/04/30 20:39:02] ok [2008/04/30 20:39:07] we've gone over time. [2008/04/30 20:39:15] i'll bring this up on ruby-core. [2008/04/30 20:39:17] I think RUBY_ENGINE is sufficient, combined with RUBY_VERSION. RUBY_ENGINE == "ruby" && RUBY_VERSION == "1.9". Then you can rely on implementation-defined way of getting any extra info. [2008/04/30 20:39:19] shall we call RUBY_ENGINE done and table binary name discussion? [2008/04/30 20:39:23] evan: list? [2008/04/30 20:39:28] headius: yeah. [2008/04/30 20:39:44] Rubinius will have RUBY_ENGINE set to "rubinius" [2008/04/30 20:39:45] matz_: you will think about RUBY_ENGINE for 1.9 and discuss on list? [2008/04/30 20:39:47] evan: you just cannot rely that every implementation will have a static binary name [2008/04/30 20:39:51] JRuby will be "jruby" [2008/04/30 20:39:52] we'll put the change in soon [2008/04/30 20:40:08] i can't understand why RUBY_ENGINE is needed [2008/04/30 20:40:11] we'll keep JRUBY_VERSION in place [2008/04/30 20:40:15] OK, I will post to the ruby-core [2008/04/30 20:40:16] lrz: but starting MacRuby by typing 'ruby' is a bad idea [2008/04/30 20:40:20] ko1_: http://pastie.org/189724 [2008/04/30 20:40:23] should the value be a string or a symbol? [2008/04/30 20:40:28] I don't really get the use model for RUBY_ENGINE either :/ [2008/04/30 20:40:29] ko1_: I often need to know what engine is used in the specs [2008/04/30 20:40:34] ko1_: no continuations, but java libraries, etc on JRuby...people want to make single gems that are compatible with many [2008/04/30 20:40:40] I consider name based check is evil. If we have RUBY_ENGINE, it should be used for display [2008/04/30 20:40:41] evan: why? it's ruby :) [2008/04/30 20:40:46] brixen: what about doing it from the spec driver? [2008/04/30 20:40:47] right now it's very hard to know what set of features to expect [2008/04/30 20:40:49] ko1_: if RUBY_ENGINE != "jruby"; fork; end [2008/04/30 20:40:55] MenTaLguY: http://pastie.org/189724 [2008/04/30 20:41:09] if feature?('fork'); fork; end is better I think [2008/04/30 20:41:11] Should I even broach the whole underlying OS question? [2008/04/30 20:41:17] MenTaLguY: that's what I have in MSpec now [2008/04/30 20:41:19] knu: only display, right? [2008/04/30 20:41:21] lrz: so what if I make rubinius install itself as ruby then too? [2008/04/30 20:41:27] knu: I like the idea of a feature set, but that's another discussion [2008/04/30 20:41:27] MenTaLguY: it's a hodge podge pita [2008/04/30 20:41:28] This is why I need a written spec... [2008/04/30 20:41:32] oh no [2008/04/30 20:41:33] ko1_: yes that's what I meant [2008/04/30 20:41:33] here we go again. [2008/04/30 20:41:39] yes [2008/04/30 20:41:40] I have to go [2008/04/30 20:41:44] I don't think RUBY_ENGINE should be used for feature check [2008/04/30 20:41:49] evan: if you install it in a separate path, it will be okay (as when you install ruby from macports right now) [2008/04/30 20:41:51] remember HTTP_USER_AGENT [2008/04/30 20:41:54] but this is off topic [2008/04/30 20:41:57] knu: agree about feature. but that wasn't to well liked on ruby-core if I remember [2008/04/30 20:41:58] matz_: I agree [2008/04/30 20:42:07] I like feature set idea too but this is branching out too much [2008/04/30 20:42:09] it must be used for something different [2008/04/30 20:42:10] That RUBY_ENGINE ~= whatever is ugly. [2008/04/30 20:42:20] lrz: I really hope you rethink that [2008/04/30 20:42:20] should be avoided. [2008/04/30 20:42:23] RUBY_ENGINE purpose: (1) search bin name, (2) check spec [2008/04/30 20:42:24] please [2008/04/30 20:42:28] for example, choosing performance trick depends on implementation [2008/04/30 20:42:29] people will use RUBY_ENGINE for feature set either way [2008/04/30 20:42:29] any other reason? [2008/04/30 20:42:32] I guarantee it [2008/04/30 20:42:39] lrz: or you better let me install MacRuby as macruby [2008/04/30 20:42:43] (3) show version [2008/04/30 20:43:00] evan: you can chose the binary name during the build [2008/04/30 20:43:02] I'm afraid that that kind of conditions are spead out all over [2008/04/30 20:43:04] I think there needs to be a more explicit way to determine the command name the current Ruby interpreter was started with [2008/04/30 20:43:06] (4) installing gems [2008/04/30 20:43:14] evan: let's talk offline anyway [2008/04/30 20:43:17] ok [2008/04/30 20:43:17] OK...yes [2008/04/30 20:43:18] ko1_: I think RUBY_VERSION for compatiblity with matzruby, and JRUBY_VERSION etc for an implementation's version [2008/04/30 20:43:19] MenTaLguY: since you can always change that, yes. [2008/04/30 20:43:20] cutting off... [2008/04/30 20:43:20] for many different reasons that may not necessarily correspond to a reasonable value for RUBY_ENGINE [2008/04/30 20:43:29] RUBY_ENGINE is largely decided...any more discussion should be on list [2008/04/30 20:43:37] executable name will be brought up by evan on list? [2008/04/30 20:43:40] brixen: different from (2)? [2008/04/30 20:43:41] sure. [2008/04/30 20:43:51] it's a good constant to have anyway [2008/04/30 20:43:54] knu: if you want to talk more about feature set, on list please? [2008/04/30 20:43:56] so that people know where they are [2008/04/30 20:44:04] ko1_: instead of (3) [2008/04/30 20:44:06] headius: fine [2008/04/30 20:44:10] '%s_VERSION' % RUBY_ENGINE.upcase ? [2008/04/30 20:44:26] ok....then we'll call this meeting done.....and everyone can go on discussing what they like, but on list would let more people participate [2008/04/30 20:44:31] although we passed the time [2008/04/30 20:44:34] also remember john lam couldn't attend again, so we should include him [2008/04/30 20:44:41] so on list for anything else please [2008/04/30 20:44:43] don't we have something to talk with knu? [2008/04/30 20:44:46] RUBY_ENGINE can be part of RUBY_PLATFORM, maybe [2008/04/30 20:44:58] sorry, on the list. [2008/04/30 20:45:03] matz_: yes, I think we are over time though.... [2008/04/30 20:45:17] knu: can you start discussion about specs on list? [2008/04/30 20:45:24] specs + ruby 1.8.7 failures [2008/04/30 20:45:31] how to solve those [2008/04/30 20:45:31] sure [2008/04/30 20:45:39] it's a big topic [2008/04/30 20:45:48] ok [2008/04/30 20:45:52] great meeting [2008/04/30 20:46:02] thanks everyone [2008/04/30 20:46:05] thansk [2008/04/30 20:46:07] yes, thank you all [2008/04/30 20:46:08] thanks [2008/04/30 20:46:13] thanks guys [2008/04/30 20:46:17] same time of day, 15/16 of may [2008/04/30 20:46:17] thanks all [2008/04/30 20:46:22] night/good afternoon