perl6-projects.org/ | nopaste: sial.org/pbot/perl6 | evalbot: 'perl6: say 3;' | irclog: irc.pugscode.org/ Set by mncharity on 25 March 2009. |
|||
cspencer | what does the $?NF variable contain? | 00:01 | |
moritz_ | the compile-time default Unicode normal form, I think | 00:02 | |
though I don't see much sense in having such a variable | |||
cspencer | how come? | 00:03 | |
00:04
kst left,
kst joined
|
|||
moritz_ | why do we need a *compile time* variable for a thing which only affects *run time*? | 00:05 | |
cspencer | ah, ok :) | ||
00:07
msmatsko left
00:08
Guest34131 joined
|
|||
Guest34131 | hello? | 00:09 | |
Diederich | howdy | ||
Guest34131 | hi, is this the place to ask questions about perl 6? | ||
Diederich | aye, but I'm just a lurker here | 00:10 | |
Guest34131 | i c | ||
Diederich | I've seen a lot of Qs ansked and answered | ||
s/ansked/asked/ :-) | |||
brb | |||
Guest34131 | ok | 00:11 | |
cspencer | guest34131: what kind of questions do you have? | ||
i might be able to help, or point you in the right direction, at least :) | |||
Guest34131 | thanks, here it is..I've installed Perl 6 on ubuntu 8.10... | 00:12 | |
[particle] | which perl 6? rakudo? | ||
Guest34131 | .. and I got $home/rakudo/perl6 -e 'my Int $x; $x.say' to work | ||
[particle] | type perl6 -v | ||
ok | 00:13 | ||
Guest34131 | ... and now I'm trying to install the package "Image::Magick" so I can make it work with perl6 | ||
moritz_ | that's a Perl 5 module | ||
Guest34131 | but I don't know how to go about installing packages into perl6... | ||
moritz_ | you can't with Perl 5 packages. | 00:14 | |
Guest34131 | ahhhhh.......... | ||
I spent 2 days on it :) | |||
00:14
kulp joined
|
|||
moritz_ | it'll probably work some day, but we honestly have no idea when that could be | 00:14 | |
00:14
kulp left
|
|||
[particle] | ouch! | 00:14 | |
moritz_ | (at least I don't) | ||
[particle] | i wonder what kind of errors you got | ||
so, maybe, we could improve the messages | 00:15 | ||
Guest34131 | I had fun though, installing, and reinstalling perl 6 though... | ||
00:15
kate21de1 left
|
|||
Guest34131 | then if you don't mind me asking another question... this is the reason why I want to install perl 6 in the first place... | 00:16 | |
[particle] | please, not to run perl 4 code! | ||
moritz_ | ;-) | ||
Guest34131 | ... I'm trying to use Image::Magick to automatically draw a simple shape, using the Draw command... | 00:17 | |
cspencer | you should probably use perl5 then :) | ||
Guest34131 | ... then entering in numbers (200,100 50,50) as coordinates... | ||
... I got Image::Magick to accept coordinates when I use numbers (200,100 etc) but when I substitute $x after declaring $x = 200; then ($x,100) doesn't work as a coordinate | 00:18 | ||
I tried "use Integer;" but it didn't work either... | 00:19 | ||
[particle] | yeah, i'm sure that was a move of desperation | ||
Guest34131 | then I read about how in perl6 you can actually declare an Int as an Int, which is why I installed it... but now I can't import the Image::Magick package into Perl6... | 00:20 | |
[particle] | unfortunately, there's no module to use Image::Magick in perl 6 yet | 00:21 | |
so, you'll have to use perl 5 | |||
Guest34131 | is there any way to declare a real integer in Perl 5? I heard it was possible but very hard to do... | 00:22 | |
[particle] | you don't need to, to get that working | ||
Guest34131 | what do you sugges then? | ||
cspencer | guest34131: what was your error message? | 00:23 | |
if any? | |||
[particle] | i suspect you're using single quotes instead of double quotes | ||
my $x = 3; print '$x'; print "$x"; | |||
prints: $x3 | |||
Guest34131 | the code was Draw... '200,100 50,50' but instead I put '$x,100 50,50' | 00:24 | |
[particle] | use double quotes instead | ||
then $x will be interpolated | |||
Guest34131 | ah... | ||
I'll try that, thank you very much | 00:25 | ||
[particle] | for more help, try #perl, since you'll be happily using perl 5 now :) | ||
Guest34131 | haha | ||
00:26
__felix__ left
|
|||
Guest34131 | btw, do you know when approximately Perl 6 will have the ability to import packages like Image::Magick? or do you think not until Perl 6 actually gets released in the mainstream... | 00:27 | |
[particle] | i'm surprised every day by the progress of our volunteers | ||
there is a module installer called 'proto' | 00:28 | ||
Guest34131 | oh? | ||
[particle] | but there are very few modules, still. that's changing, and i suspect this summer, after the us/european conferences, there will be more folks writing perl 6 modules | ||
Guest34131 | i c... btw, is "GD" in perl 6 yet? or is that a another module that has yet to be written? | 00:29 | |
cspencer | there's no GD yet :) | 00:30 | |
Guest34131 | i c... well, I guess I'll wait to see what happens in the summer :-) | 00:31 | |
jnthn | Eventually we should be able to use and call functions from Perl 5 in Perl 6. But we're a bit off that yet. | 00:32 | |
Guest34131 | ah... | ||
jnthn | (It's non-trivial to do.) | ||
[particle] | thanks for your patience. it will be rewarded :) | ||
Guest34131 | I appreciate the hard work, where are most of you located? North America or Europe? | 00:33 | |
00:34
Alias left
|
|||
[particle] | we're well spread out, actually | 00:34 | |
00:35
|jedai| is now known as jedai
|
|||
Guest34131 | i c | 00:35 | |
[particle] | and jnthn alone covers half of europe and asia in his travels | ||
jnthn | ;-) | ||
Hey, travel is *fun*. :-) | |||
Guest34131 | hey jnthn, sometimes Japan by any chance? | ||
jnthn | Guest34131: Actually, I'd really like to make the next YAPC::Asia. | 00:36 | |
I'm just waiting to hear dates, etc. :-) | |||
Guest34131 | next week in Tokyo? | ||
or in May? | |||
jnthn | Huh? Last I heard of it was in September. | ||
(Erm, that it'd be in September.) | |||
Guest34131 | I c, it hasn't been scheduled yet.. | 00:37 | |
jnthn | Aye. Best info I've seen yet is use.perl.org/~lestrrat/journal/38354 | ||
Anyway, I never did visit Japan yet, and I'd really love to, and combining travel and Perl events has worked out wonderfully in the past. :-) | 00:38 | ||
00:39
frioux is now known as frioux_away
|
|||
Guest34131 | jnthn, do you get paid for your efforts? or is 100% volunteer work.. | 00:40 | |
Tene | jnthn: purl in #parrot has messages for you | ||
jnthn: I implemented leave() with exceptions, but pmichaud thinks that maube exceptions are wrong there, and wants to discuss with you | 00:41 | ||
jnthn | Guest34131: I am funded, but do some volunteer effort too. | 00:43 | |
Guest34131 | i c... | ||
jnthn | Guest34131: I couldn't give the time I give to Perl 6 without funding, so I've very grateful with it. | ||
*for it | |||
Tene: OK, let me look... | |||
Tene | jnthn: leave_exceptions branch in rakudo | 00:44 | |
leave.t fails because of &?BLOCK and &?ROUTINE as well as indirect method call syntax | |||
jnthn | Tene: Yeah, pmichaud and I originally discussed it in terms of invoking a continuation, but the discussion with you/me/TimToady IIRC in it I think convinced me that exception-based approach maybe was the way... | ||
indirect method call syntax? | |||
Such as? I think we have passing tests on that :-| | |||
Tene | oh, maybe I was wrong | 00:45 | |
jnthn | Tene: Nah, you could easily have found a bug too | ||
00:48
kst left,
kst joined
|
|||
jnthn | Tene: Need sleep now; will try and look more tomorrow. Thanks for working on it. | 00:50 | |
Tene | jnthn: np | ||
00:51
nihiliad joined
00:52
Guest34131 left
00:56
Kisu left
00:57
Kisu joined
01:09
NordQ left
01:11
frooh_away is now known as frooh
01:13
msmatsko joined
01:18
alc joined
01:21
Diederich left
01:24
Diederich joined
|
|||
cspencer | i take it it's not possible to use a "return" in try's CATCH { ... } block? | 01:26 | |
pmichaud | not yet. | 01:27 | |
actually, that should work, though. | |||
std: q :hello: | |||
cspencer | rakudo: try { die "exeption"; CATCH { say "Caught: $!"; return fail("Failed") } } | ||
pmichaud | one doesn't "return fail" | ||
cspencer | oh :) | ||
pmichaud | fail() already does a return. | ||
cspencer | you just...fail? :) | ||
ah ok | |||
pmichaud | but I suspect that CATCH might catch the fail in this case. | 01:28 | |
(it probably shouldn't -- but we have to get lexical returns working for that first.) | |||
cspencer | alright, i'll work around that for the time being :) | ||
pmichaud | std: say q : hello world : | ||
std: say q 'hello' | 01:29 | ||
std seems lost. | |||
cspencer | rakudo: say "foo" | 01:30 | |
rakudo seems lost too | |||
pmichaud | perl6: die? | ||
p6eval: hello? | 01:31 | ||
01:35
kulp joined
01:36
kulp left
01:37
FurnaceBoy left
|
|||
s1n | frooh: ping | 01:46 | |
frooh | s1n: pong | ||
01:53
Diederich left
01:54
Diederich joined
|
|||
pugs_svn | r26003 | pmichaud++ | [t/spec]: Fudge some rx:P5 tests for rakudo. | 01:54 | |
r26004 | pmichaud++ | [t/spec] more rakudo fudging for rx:P5. | 01:59 | ||
02:04
Caelum left
02:05
bacek left
02:06
cotto joined
02:09
Caelum joined,
justatheory joined
|
|||
pugs_svn | r26005 | pmichaud++ | [t/spec]: more rakudo :P5 fudging | 02:09 | |
dalek | kudo: 353aca7 | pmichaud++ | src/parser/ (3 files): Enable :P5 on m/.../ and rx/.../ patterns. |
02:10 | |
02:14
dKingston left
02:17
wknight8111 left,
justatheory left
|
|||
p6eval | std 26002: OUTPUTĀ«##### PARSE FAILED #####ā¤Unrecognized quote modifier: 1 at /tmp/S4TctYMh3N line 1:ā¤------> q :hello:ā¤FAILED 00:02 34mā¤Ā» | 02:32 | |
02:32
p6eval left,
p6eval joined
|
|||
p6eval | ..... | 02:32 | |
..pugs: OUTPUTĀ«*** ā¤ Unexpected end of inputā¤ at /tmp/xLaLWXX0qr line 2, column 1ā¤Ā» | |||
diakopter | std: say q : hello world : | 02:42 | |
p6eval | std 26005: OUTPUTĀ«ok 00:03 35mā¤Ā» | ||
02:42
rachelBROWN left
|
|||
diakopter | std: q :hello: | 02:43 | |
p6eval | std 26005: OUTPUTĀ«##### PARSE FAILED #####ā¤Unrecognized quote modifier: 1 at /tmp/t1i1e1d0fu line 1:ā¤------> q :hello:ā¤FAILED 00:02 34mā¤Ā» | ||
03:01
justatheory joined
|
|||
pugs_svn | r26006 | pmichaud++ | [t/spec]: Some updates to rakudo skips for rx syntax. | 03:11 | |
r26007 | pmichaud++ | [t/spec] Some #?rakudo fudging for unspace.t . | |||
r26008 | pmichaud++ | [t/spec]: More fudging for unspace.t . | 03:12 | ||
03:12
Alias joined
03:13
Alias_ joined
|
|||
dalek | kudo: 7c69c7b | pmichaud++ | (2 files): Add some more t/spec/S05-modifier files to spectest.data . |
03:13 | |
03:24
grwi joined
|
|||
pugs_svn | r26009 | putter++ | [elf] elfish/on_sbcl renamed on_lisp to reflect added ccl support. Also renamed the old elfish/elfX to elfX_smop for greater clarity. | 03:29 | |
03:30
Alias left
03:31
grwi left
|
|||
pugs_svn | r26010 | pmichaud++ | [t/spec]: Final bit of rakudo fudging in unspace.t | 03:46 | |
dalek | kudo: 4929856 | pmichaud++ | t/spectest.data: Add unspace.t to spectest.data . |
03:48 | |
04:03
cspencer left
|
|||
pmichaud | rakudo: say ('a', 1, 'b', 2, 'c', 3, 'd', 4).sort.perl; | 04:19 | |
p6eval | rakudo 492985: OUTPUTĀ«["a", "b", "c", 1, 2, 3, 4, "d"]ā¤Ā» | ||
pmichaud | say 'a' cmp 1; | ||
rakudo: say 'a' cmp 1; | |||
p6eval | rakudo 492985: OUTPUTĀ«1ā¤Ā» | ||
pmichaud | rakudo: say 'd' cmp 4; | 04:20 | |
p6eval | rakudo 492985: OUTPUTĀ«1ā¤Ā» | ||
pmichaud | rakudo: say 1 cmp 2; | ||
p6eval | rakudo 492985: OUTPUTĀ«-1ā¤Ā» | ||
pmichaud | rakudo: say <a 1 b 2 c 3 d 4>.sort.perl; | ||
p6eval | rakudo 492985: OUTPUTĀ«["1", "2", "3", "4", "a", "b", "c", "d"]ā¤Ā» | ||
frooh | rakudo: <a 1 b 3 c 3 d 4>.sort | 04:22 | |
p6eval | rakudo 492985: RESULTĀ«["1", "3", "3", "4", "a", "b", "c", "d"]Ā» | ||
frooh | rakudo: <a 1 b 3 c 4 d 5>.sort | ||
p6eval | rakudo 492985: RESULTĀ«["1", "3", "4", "5", "a", "b", "c", "d"]Ā» | ||
pmichaud | rakudo: say 4 cmp 'c'; | 04:23 | |
p6eval | rakudo 492985: OUTPUTĀ«1ā¤Ā» | ||
pmichaud | rakudo: say 'c' cmp 4; | 04:24 | |
p6eval | rakudo 492985: OUTPUTĀ«1ā¤Ā» | ||
04:31
Util joined
04:35
Util left
04:38
alc left
04:43
kimtaro left
04:47
Util joined
|
|||
Util | rakudo: my %h = ( foo => "bar" ); for %h.pairs -> $one { say $one.perl } | 04:47 | |
p6eval | rakudo 492985: OUTPUTĀ«"foo" => "bar"ā¤Ā» | ||
Util | rakudo: my %h = ( foo => "bar" ); for %h.pairs -> $one { print $one.perl } | 04:48 | |
p6eval | rakudo 492985: OUTPUTĀ«"foo" => "bar"Ā» | 04:49 | |
05:00
kst left,
Util left,
kst joined
05:05
estrabd_ joined
05:06
estrabd left,
Khisanth left
05:07
Khisanth joined
05:14
Woody4286 left,
kimtaro joined
05:15
Woody4286 joined
05:16
nihiliad left
05:37
nww joined
05:39
nww left
05:46
Kisu left
05:49
Kisu joined
05:59
masak joined
|
|||
masak | good morning, fellow butterflies. | 05:59 | |
Tene | goot morning | 06:00 | |
good | 06:02 | ||
06:03
mberends joined
|
|||
mberends | good morning, happy hackers | 06:03 | |
06:05
alc joined
|
|||
mberends | masak: top o' the mornin' to you, sir! | 06:06 | |
masak | mberends: and a very fine morning to you, fellow citizen! | ||
masak tips hat | 06:07 | ||
mberends bows | |||
masak: may I insert copies of Configure.p6 and Configure.pm into proto? | 06:09 | ||
masak | mberends: for proto itself, or for budding project creators? | 06:10 | |
mberends | initially for the latter | ||
masak | yes. you may. :) | 06:11 | |
06:11
DemoFreak joined
|
|||
mberends | will do in next few hours. currently planning a tree-based Pod parser as alternative to current stream-based. | 06:12 | |
masak | nice. | 06:14 | |
mberends | it may be nice to apply your SVG class to the task of XHTML emitter :) | 06:16 | |
masak | aye, been thinking the same. | 06:19 | |
both the SVG class and an XHTML emitter would be greatly benefitted by some kind of real-time validation by DTD. | |||
06:19
finanalyst joined
|
|||
masak | but my DTD-fu is still lacking. I'm looking at the stuff, and only almost seeing what it means. | 06:20 | |
06:21
charsbar_ left
|
|||
mberends | validation separate from generation is very expensive, so better to it by means of constraints at generate time. DTD is cumbersome, XML Schema is friendlier. I use them in .NET work. But performance is usually a problem when parsing (and also validating) XML. | 06:23 | |
masak | I'm not saying we necessarily use the DTD qua DTD. | 06:24 | |
just that it contains the information I'm interested in validating against. :) | |||
oh, and there should probably be a way to turn validation off in production environments, yes. | 06:25 | ||
mberends | perhaps validate mainly in the test suite | ||
masak | hm. | 06:26 | |
06:26
parduncia_ joined
|
|||
masak | the group I hope to reach is the one writing one-off scripts of the CGI kind. | 06:26 | |
mberends | generally systems validate what arrives from the outside, not what is made inside. | ||
masak | indeed. | 06:27 | |
mberends | design your generator classes to make only valid productions | ||
masak | that would be ideal, yes. | ||
but... let's take an example to make it concrete. | 06:28 | ||
a <li> element in HTML can only occur in some other elements. | |||
I'm not sure if it's invalid XHTML 1.0 Strict if it occurs outside, but it's at least doubtful use. | 06:29 | ||
a warning from the XHTML generator would seem appropriate. | |||
06:30
Alias joined,
Alias_ left
|
|||
mberends | a hierarchy of classes would prevent you from creating <li> except where it is valid | 06:30 | |
masak | mberends: sir, you just set warning bells off in my head with the phrase "a hierarchy of classes" :) | 06:32 | |
but that's all right. | |||
I'm just a little allergic to excessive OO. | |||
mberends | too Java-ish? | ||
masak | might be. | ||
mind you, I've seen wonderful class hierarchies in my day, but they're few and far between. | 06:33 | ||
most often they're just a waste of ink, or bytes as it were. | |||
my ears perk up when it turns out that the classes use polymorphism in some constructuve way. | 06:34 | ||
s/uve/ive/ | |||
mberends | agreed. that reinforces my dislike of frameworks that bloat that way | 06:35 | |
06:35
miloux left
|
|||
mberends | Java causes some of that by being too formally strict and correct | 06:35 | |
masak | Java enforces bloat. | ||
mberends laughs | 06:36 | ||
the potential number of classes for XHTML is not so bad | 06:37 | ||
masak | I'm just not convinced yet that element types should map to classes. | 06:38 | |
mberends | SVG is worse, which is probably why your code was so generic. too generic, methinks. | ||
masak | maybe they should, if MMD is used in some clever way for each type of valid containment relation. | ||
mberends: aye, too generic. | 06:39 | ||
mberends | you were starting top-down and SVG::Tiny was going bottom-up. | ||
masak | mberends: I wish to introduce a convenience into SVG: for some attributes, like style, an array of pairs should be flattened and formatted into a string of semicolon-separated key/value pairs. | 06:40 | |
after that, I'll be happy with the syntax. but I'll still want validation. | |||
mberends | actually, that's very nice. just make the validation fast, per-item. | 06:42 | |
per-item is probably the trick, avoid unwieldy trees | 06:43 | ||
masak | aye. | ||
I just wish that someone gave me the magical ability to understand what the DTD document means. | 06:44 | ||
www.w3.org/Graphics/SVG/1.1/DTD/svg...030114.dtd | |||
06:46
charsbar joined
|
|||
mberends | what a format. it's a wonder Tim Berners-Lee got something friendly out of it. | 06:46 | |
masak | I hereby publicly advertise for a person who can speak DTD. | ||
I'm sure I can manage if I get the first three or four WTFs explained to me. | 06:47 | ||
06:47
bacek_ left
|
|||
mberends | the Microsoft toolchain replaced all DTDs with XML Schemata. | 06:48 | |
www.w3.org/XML/Schema | 06:49 | ||
masak | that was probably for the better. | ||
mberends | a very good move, indeed. | ||
06:49
kate21de joined
|
|||
lucs | masak: This looks like a decent tutorial: library.stanford.edu/tools/tutorial...entle.html | 06:50 | |
masak | lucs: thank you. | ||
lucs | np | ||
mberends | lucs: were you replying to masak's advert? | 06:53 | |
masak | seems so. | ||
lucs | I was kinda following along, yeah. | ||
masak | 2.4 is actually not the bad, thus far. | ||
lucs | The example in 2.4.1 is badly formatted as far as I can see in my browser, but the rest looks ok. | 06:55 | |
masak | aye. | ||
I'm hallucinating line breaks; after that, it looks fine. | 06:56 | ||
lucs | Right :) | ||
mberends | view source does not correct the line breaks - a missed opportunity :( | 06:58 | |
06:58
meppl joined
07:00
justatheory left,
mtve joined
|
|||
masak | oh, the content model has similarities with a regular expression, in fact. | 07:01 | |
lucs | Maybe more like shell globs, but yeah. | ||
masak | and the <ENTITY % foo ... > declarations look a bit like macros to me. | ||
lucs | Right. | ||
masak | ah, the rush of revelation! | 07:02 | |
lucs++ | |||
mberends leaves DTD to lucs and masak, shaking his head | |||
masak | mberends: I'll get back to you when I've written a Perl 6 grammar that takes the SVG DTD and emits an understandable Perl 6 data structure :) | 07:03 | |
lucs | I hadn't thought about DTDs for many years (used to work with them before XML became popular), but that intro is quite decent. | ||
mberends | yes, the explanation is good. but DTD is obsolete now, superseded. | 07:05 | |
lucs | Exactly. | ||
masak | it seems to me I'm most interested in the ENTITY declarations declaring things ending with '.content'. they contain all the meaty stuff about hierarchy. | 07:06 | |
also, I get the feeling that this DTD was written with extensibility in mind. | |||
there's a lot of '.extra.content' defined, but they're all empty. | |||
lucs | Good luck with it. | 07:08 | |
lucs & # ZZ | |||
mberends | masak: the content you will generate is finite in structure, so the entity restrictions can be hard coded. avoid interpreting them from any schema file format at all. | ||
masak | of course. :) | 07:09 | |
that's why I want to pre-parse it and turn it into a Perl 6 structure. | |||
mberends | ah, so you were not joking... | ||
masak | :) | 07:10 | |
meeting & | |||
07:10
masak left
|
|||
mberends | shower & | 07:14 | |
07:14
mberends left
07:15
kimtaro_ joined
07:17
eternaleye left
07:32
kimtaro left
07:35
eternaleye joined
07:46
riffraff joined
07:53
eternaleye left
08:03
bacek joined
|
|||
pugs_svn | r26011 | moritz++ | [t/spec] unfudge unspace.t a bit | 08:06 | |
bacek | good evening | ||
moritz_ | good localtime() ;;-) | 08:07 | |
pugs_svn | r26012 | moritz++ | [t/spec] unfudge while.t for rakudo | 08:08 | |
08:08
mberends joined
|
|||
bacek | moritz_: :) | 08:08 | |
rakudo: sub localtime {...}; sub good { say "O RLY?" }; good localtime | 08:09 | ||
p6eval | rakudo 492985: OUTPUTĀ«O RLY?ā¤Ā» | ||
bacek | it works :) | ||
08:10
Woody4286 left,
Woody4286 joined
|
|||
moritz_ | why doesn't it throw an exception when calliing localtime()? | 08:10 | |
mberends | only time() is currently implemented. | 08:11 | |
bacek | moritz_: it's warning, not exception. | 08:12 | |
rakudo: sub foo { ... }; foo | |||
p6eval | rakudo 492985: RESULTĀ«undefĀ» | ||
bacek | hmmm... | ||
moritz_ | uhm. | ||
bacek | masak's time? | ||
mberends | masak went to a meeting about an hour ago | 08:13 | |
yesterday masak++ ran a pattern match on a million character document, and Rakudo outperformed Perl 5 in some sense :) | 08:15 | ||
bacek | rakudo: sub foo { ... }; foo; say $! | ||
p6eval | rakudo 492985: OUTPUTĀ«Use of uninitialized valueā¤ā¤Ā» | ||
pugs_svn | r26013 | moritz++ | [t/spec] unfudge match.t for rakudo | 08:16 | |
r26013 | moritz++ | | |||
r26013 | moritz++ | we now support both rx/.../ and lexicals in eval(). YaY! | |||
08:17
amoc joined
|
|||
bacek | moritz_: rakudo crashed later than perl5? :) | 08:17 | |
moritz_ | bacek: that was masak, not me :-) | 08:18 | |
bacek | I'm expected it. masak is pretty good in breaking things : | 08:19 | |
:) | |||
mberends | bacek: irclog.perlgeek.de/perl6/2009-03-26#i_1018129 | 08:20 | |
moritz_ | I usually break things when I want to write articles about them ;-) | ||
bacek | mberends: heh :))) | 08:21 | |
mberends | perl5 segfaulted, but Rakudo++ survived | 08:23 | |
pugs_svn | r26014 | moritz++ | [t/spec] unfudge comb.t for rakudo | 08:25 | |
08:33
Helios left
08:34
Helios joined
08:43
sunnavy left
08:45
sunnavy joined
08:51
pmurias joined
08:54
bacek left
08:58
jedai left
08:59
|jedai| joined
09:01
alc left
09:05
kate21de left
09:09
kimtaro joined
09:11
rblasch joined
09:18
kimtaro_ left
09:33
dduncan joined
09:38
literal left
09:48
jrockway left
09:52
bacek joined
09:54
rblasch left
09:55
Alias left
09:56
Alias joined
10:12
mikehh joined
10:18
dduncan left
|
|||
jnthn | hi all | 10:20 | |
moritz_ | hi jnthn | ||
jnthn | I see pmichaud++ has got us passing more tests! :-) | 10:24 | |
10:25
bacek left
|
|||
moritz_ | indeed | 10:25 | |
jnthn | And moritz++ has been unfudging some too :-) | ||
moritz_ | mostly just those found by autounfudge | 10:26 | |
10:39
pmurias left,
pmurias joined
10:46
zamolxes joined,
kst left
10:47
kst joined
11:04
Tene left,
diakopter left,
buubot left
11:05
Tene joined,
diakopter joined,
buubot joined
11:15
kimtaro_ joined
11:16
kimtaro_ left
11:17
jrockway joined
11:19
literal_ joined
11:24
kimtaro_ joined
11:25
kimtaro left
11:42
rob___ joined
11:57
ruoso joined,
mikehh left
|
|||
ruoso | finanalyst, I've just replied to your mail about junctions | 12:00 | |
12:11
kst left,
kst joined,
pmurias left
12:12
orafu joined
12:15
Trey joined
12:17
ejs joined
12:25
mikehh joined
12:27
bsb left
12:31
dKingston joined
12:32
dKingston left
12:33
dKingston joined
|
|||
Matt-W | mberends: ping | 12:33 | |
12:33
dKingston left,
dKingston joined
|
|||
mberends | Matt-W: pong | 12:33 | |
Matt-W | mberends: what did you want last night? | 12:34 | |
mberends | I was curious if you were working on Form. I'm studying it closely. | ||
Matt-W | I was, yes | 12:35 | |
and suffering some frustration | |||
mberends | sorry to hear that | ||
Matt-W | it *looks* like something's trying to call an action method with an insufficient number of parameters | 12:36 | |
but since Parrot won't tell me which routine it is that's got the parameter count mismatch, I'm not entirely sure | |||
mberends | Matt-W: for diagnostics, replace your 'say' trace statements with 'warn', then they still appear during 'make test' | 12:38 | |
in Actions.pm | |||
Matt-W | ah | 12:39 | |
hadn't thought of that | |||
12:39
skids left
|
|||
Matt-W | they work nicely when I run the test file directly though :) | 12:40 | |
jnthn | Matt-W: Akshually the routine that is normally at the top of the backtrace is the one that didn't get enough parameters passed. | ||
12:40
rodi joined
|
|||
Matt-W | jnthn: it's still an action method then, it's just a different one | 12:40 | |
hmm | |||
except it manages to run say statements from within that on | |||
jnthn | Matt-W: The way you normally get these, is having an "#= foo" | ||
But not $key parameter to receive it. | |||
Matt-W | that would be the other way round wouldn't it? too many parameters | 12:41 | |
jnthn | Though maybe not in this case. But it's the first thing I check when i'm dealing with actions/grammars. | ||
Ah, yes, so you try to take a $key when none is passed. | |||
mberends | therefore "#= foo" missing in Grammar.pm | 12:42 | |
Matt-W | It really looks a lot like that | 12:43 | |
but I can't see that there is any way they could be missing | |||
mberends | Matt-W: the version last pushed passes all tests, care to push the current files? | ||
Matt-W | sure | ||
done | 12:44 | ||
mberends | pulled. making test... | ||
Matt-W | it *looks* like it's the action method for aligned_field, but it's got all the #= it could possibly want... | 12:45 | |
jnthn | URL? | ||
Matt-W | maybe I just need somebody else's eyes to look at it without expecting to know what's there | ||
github.com/mattw/form | 12:46 | ||
lib/Form/Actions.pm and lib/Form/Grammar.pm being of particular interest | |||
no doubt it will be something simple and embarrassing | |||
mberends | yep, left_justified_field | 12:47 | |
Matt-W | oooh | 12:48 | |
I've seen it | |||
I was right wasn't I | |||
very simple and embarrassing | 12:49 | ||
mberends++ | |||
now I just need to make the grammar work | |||
but that's a different problem | |||
mberends | me doesn't see it yet | 12:50 | |
Matt-W | extra {*} in the grammar | ||
with no #= | |||
mberends | Grammar.pm:54 | ||
Matt-W | yup | 12:51 | |
pushed the fix | |||
now back to making the new bits of grammar work | |||
mberends | pulled, now fails test 11 | 12:52 | |
Matt-W | yes I know about that | ||
that's th ehalf-finished work that got derailed by finding the other bug | |||
I just fixed that, actually, and am proceeding to the next five | 12:53 | ||
12:53
gfldex left
12:54
bacek joined
|
|||
Matt-W | and that's done too | 12:54 | |
I was closer than I thought | |||
12:54
finanalyst left
|
|||
Matt-W | it can now handle a string like "{[[[} some text {>>>>} some other text" | 12:55 | |
mberends | jnthn, is the "#= foo" a short term kludge or a permanent language feature? | 12:56 | |
jnthn | mberends: Better to ask pmichaud, but I'm not aware of it being endangered. | 12:57 | |
mberends has little faith in comments-as-syntax | 12:58 | ||
jnthn | mberends: In general, the need for it in Rakudo's grammar will mostly disappear as we get proto-regexen. | ||
mberends | good. riddance. | ||
jnthn | Though whether that's mostly disappear or completely go away, I'm less sure. | ||
Matt-W | proto-regexen? | 12:59 | |
because I'm really relying on its functionality in Form right now | |||
and while proper embedded closures would fix it, it wouldn't for the case of having multiple sets of actions for the same grammar | |||
jnthn | *nod* | 13:00 | |
I think best is to ask pmichaud | |||
Matt-W | I think we can manage that | ||
mberends | Matt-W: while I like your structure, obviously I'll make a big effort to use alternatives to "#= foo". | 13:01 | |
Matt-W | I was wanting to just use { make whatever } but that doesn't work yet | 13:02 | |
since I don't need multiple sets of actions | |||
I just want to build a nice pile of meaningful objects | 13:03 | ||
but I agree with you on the syntactically meaningful comments thing | |||
I know regex is a different language, but still... | |||
13:04
Alias left
|
|||
mikehh | rakudo (4929856) builds on parrot r37753 - make test/make spectest PASS - Ubuntu Intrepid Amd64 | 13:05 | |
13:08
kimtaro joined,
kimtaro left
13:09
szabgab left
13:21
mj41 left
13:22
Alias_ joined,
donaldh joined
13:24
mj41 joined,
kimtaro_ left
|
|||
PerlJam | greetings | 13:32 | |
13:35
skids joined
|
|||
diakopter | hi | 13:36 | |
moritz_ | hi | 13:37 | |
PerlJam | anything interesting happen in the last 20 hours ? :) | ||
moritz_ | yes | 13:38 | |
Alias_ | Although the next 20 hours should be more interesting | ||
Since they're going to be completed in only 19 hours | |||
moritz_ | rakudo: "abc" ~~ m:Perl5/(?:..)/ && say 'alive' | ||
p6eval | rakudo 492985: OUTPUTĀ«aliveā¤Ā» | ||
moritz_ | rakudo: "abc" ~~ m:Perl5/(?:..)/ && say $1 | 13:39 | |
p6eval | rakudo 492985: OUTPUTĀ«Use of uninitialized valueā¤ā¤Ā» | ||
moritz_ | rakudo: "abc" ~~ m:Perl5/(..)/ && say $0 | ||
p6eval | rakudo 492985: OUTPUTĀ«abā¤Ā» | ||
moritz_ | perl 5 regexes are new in rakudo :-) | ||
diakopter | Alias_: how's that | ||
PerlJam | cool | ||
Alias_ | diakopter: Daylight savings switchover | ||
PerlJam | I suppose they don't support \1, \2, etc. though :) | ||
diakopter | Alias_: oh; not in usa; that happened a couple of weeks ago | ||
PerlJam | Alias_: maybe for you, but we already did that | ||
Alias_ | uk | 13:40 | |
moritz_ | doesn't it happen on sunday morning? | ||
Alias_ | Not according to the news... | ||
Saturday morning, early | |||
Maybe I wasn't listening well enough | |||
PerlJam | moritz_: given that DST is of political determination, there's no telling when it could happen ;) | 13:41 | |
moritz_ | :-) | ||
here (Germany) it's Sunday 2am | |||
PerlJam | same in the USA | ||
Alias_ | Not a bad last 20 hours for releases though | 13:42 | |
New Module::Install, new Padre, new Catalyst, and new DBD::SQLite | |||
PerlJam | There is a female cardinal determined to peck a hole through my window. Every day for the last week she comes at random times during the day and pecks at my window for a few minutes. | ||
moritz_ | .oO( new TAP::Parser? ) |
||
PerlJam | meanwhile, her mate just hangs out and eats the birdseed that I put out and drinks from the water in the bird bath that I set up. | 13:43 | |
new Catalyst? | |||
13:44
bsb joined
|
|||
PerlJam needs to pay more attention perhaps | 13:44 | ||
Alias_ | search.cpan.org/~mramberg/Catalyst-...e-5.71001/ | ||
only minor release though :/ | |||
PerlJam | 5.8 will get here eventually :) | 13:45 | |
13:50
kimtaro joined
|
|||
dalek | kudo: 9fa0fca | pmichaud++ | docs/spectest-progress.csv: spectest-progress.csv update: 339 files, 7795 passing, 0 failing |
13:51 | |
moritz_ updates the chart | |||
jnthn | wow, that chart has a nice ending | 13:52 | |
moritz_ | that's the p5 regex spike ;-) | 13:53 | |
13:54
exodist joined
|
|||
pmichaud | if I can get (?m) and (?i) working in p5 regexes we might get another spike. | 13:55 | |
13:58
[particle] left
|
|||
pmichaud | svn.pugscode.org/pugs/t/spec/S05-ma...operties.t # test file that would get us a huge spike in passing tests | 13:58 | |
14:03
kanru joined
|
|||
moritz_ | pmichaud: what's so hard about (?i) and (?m)? weird scoping? | 14:06 | |
pmichaud | moritz_: weird scoping is part of it -- mostly it's just tuits to implement it | 14:09 | |
I'm a little surprised that PGE::P5Regex handled as many as it did :-) | |||
14:14
ejs left
14:19
justatheory joined
14:21
alester joined
14:26
Alias_ left
14:34
justatheory left,
kst left
14:35
kst joined
|
|||
pmichaud | std: sub infxi:<abc>($x, $y) { ... } | 14:35 | |
p6eval | std 26014: OUTPUTĀ«ok 00:02 36mā¤Ā» | ||
PerlJam | "infxi:"? | 14:36 | |
pmichaud | that's what I was checking. | ||
PerlJam | I figured, but why? Was there a typo that continued to work surprisingly? :) | 14:37 | |
amoc | std: sub anyany:<abc>($x, $y) { ... } | ||
p6eval | std 26014: OUTPUTĀ«ok 00:02 36mā¤Ā» | ||
pmichaud | I'm curious how STD parses names of the form category:<...> so I can see about doing the same in rakudo. | ||
Matt-W | pmichaud: A question was raised earlier about whether the {*} #= stuff in rules is permanent | ||
pmichaud | Matt-W: it's permanent for at least as long as STD.pm has them. | ||
14:38
orafu left
|
|||
PerlJam | I think it would be crazy for them to NOT be permanent (at least as an option) | 14:38 | |
14:38
OuLouFu joined
|
|||
diakopter | (I thought I read in STD.pm they were deprecated, eventually) | 14:38 | |
14:38
OuLouFu is now known as orafu
|
|||
Matt-W | PerlJam: we were wondering if there was something coming along that didn't use comments as meaningful syntax | 14:38 | |
pmichaud | Matt-W: that's only because you insist on thinking of #= as being a comment :-) | 14:39 | |
PerlJam | That they're comments is a feature! | ||
14:39
[particle] joined
|
|||
pmichaud | I haven't seen or heard anything to suggest that #= is going away. | 14:39 | |
Matt-W | Well it does start with a # | ||
PerlJam | you could write your parser in perl 6 and your "actions" in some other language if that were desirable. | 14:40 | |
Matt-W | just feels icky to me | ||
but | |||
the functionality is definitely needed | |||
so I'm going to not complain too much, especially as I don't have a better option at the moment :) | |||
14:41
rob___ left
|
|||
PerlJam | Matt-W: just keep using it until it doesn't feel icky any more :) | 14:41 | |
Matt-W | Or alternatively I could grow a couple of extra brains and use them to implement embedded closures | 14:42 | |
mberends | so, is S02:128 wrong about comment, because the {*} exception is not specified? | ||
pmichaud | that's a slightly different question :-) | 14:44 | |
if you're asking "is #= part of the spec", the answer is "no", or at least "not yet". | |||
diakopter | jnthn: ping | ||
(sigh) | |||
jnthn | diakopter: pong | ||
[particle] | #? isn't part of the spec yet, either | ||
mberends | relatedly, where is the action form of 'make' specified? | ||
pmichaud | if you're asking "is #= going away anytime soon", the answer thus far is "not likely" or "not until TimToady comes up with an alternative" | ||
'make' is specified in S05 | 14:45 | ||
mberends | ok, thanks | ||
pmichaud | even {*} isn't specified in the synopses yet. | ||
(where "yet" includes "possibly never will be") | |||
[particle] | sure, but it's valid perl 6 anyway | ||
pmichaud | well, #= is valid perl6 also :-) | 14:46 | |
[particle] | it's semantics aren't specced | ||
pmichaud | actually, it semantics would currently be the same as { * } | ||
[particle] | i can imagine #= and even #? becoming some single-line pod directive | ||
pmichaud | the "special" semantics that PGE currently gives to {*} in regexes isn't specced. | 14:47 | |
[particle] | right | ||
and it's not only pge, larry is using that for viv | |||
moritz_ | maybe we should just spec it :-) | 14:48 | |
ruoso wonders if āØ1,2,3ā¬ could be used as a synonim for set(1,2,3) | |||
[particle] wonders what those utf8 chars were, and why they didn't display here | |||
pmichaud | or maybe Ā«{ 1, 2, 3 }Ā» | ||
ruoso | U+23AC RIGHT CURLY BRACKET MIDDLE PIECE | ||
U+23A8 LEFT CURLY BRACKET MIDDLE PIECE | |||
pmichaud | with <<{ 1, 2, 3 }>> as the Texas set :-) | 14:49 | |
Matt-W | well, if you implement custom operators... why not? | ||
or maybe a macro is more suitable | |||
hurrah for playing with the grammar | |||
ruoso considering sets will end up in core | |||
ruoso points at a very recent thread on p6-l about this issue | 14:50 | ||
mberends | Matt-W: see what trouble you've got us into! | ||
moritz_ | :-) | ||
pmichaud | as I see it, the problem most people have with junctions isn't their collapsing behavior, but that they then want to know "what particular set of collapsing behavior led to this outcome"? | 14:51 | |
ruoso | pmichaud, that's the easy problem... | ||
pmichaud | i.e., they want to look inside the collapsing wave function to figure out how we arrived in the universe we're in. | ||
ruoso | the harder problem is "how do I get a subset of a junction?" | ||
14:51
frooh left
|
|||
pmichaud | iiuc, junctions aren't sets any longer in Perl 6. | 14:52 | |
Matt-W | pmichaud: as long as they don't want a career programming quantum computers... | ||
ruoso | it actually never was | ||
but people kept using it as if it were | |||
so TimToady removed the hability for it to work as a set | |||
pmichaud | Synopsis 2 once indicated that Junctions were sets | ||
ruoso | ah... | 14:53 | |
I should have missed that | |||
[particle] | my Set|Junction $x; | ||
pmichaud | S02 used to give the following for Junction: | 14:54 | |
Junction Set with additional behaviors | |||
ruoso | right... but it's a wrong definition even then... | 14:55 | |
pmichaud | agreed, which is why it was changed :-) | ||
ruoso | unless you believe in anti-sets | ||
i.e. none(1,2,3) | |||
what I was really wondering... is at which point Sets can DWIM | 14:56 | ||
I mean... I think "set(1,2,3) + 3 eqv set(4,5,6)" | |||
but to which extent that can be applied to other operators/ | 14:57 | ||
? | |||
specially... "set(1,2,3) > 3" | |||
probably it should be used in conjunction with junctions at that case... | 14:58 | ||
"any(set(1,2,3)) >= 3" | |||
pmichaud | aren't these just lists, though? | ||
ruoso | pmichaud, not really | ||
moritz_ | autothreading lists? | ||
ruoso | if we want to DWIM, we need an actual type | ||
pmichaud | (with the exception of the uniqueness) | ||
ruoso | moritz_, I don't think autothreading applies to sets | 14:59 | |
pmichaud | set(1,2,3) + 3 is really just (1,2,3) >>+>> 3 | ||
ruoso | pmichaud, exactly... that's how "multi infix:<+>(Set, Num) {...}" implements it | ||
pmichaud | so, you're just wanting to have a Set type that hyperizes its operators without using the >> << | 15:00 | |
ruoso | so it DWIM on regular operators | ||
just as jucntion does | |||
(which is why people keep wanting to use Junction as Set) | |||
pmichaud | but I don't think this gets at the true issue | 15:01 | |
i.e., someone wants to be able to ask "are any of the elements greater than X" -- which means it's a junction again. | |||
or if someone wants to ask "which of the elements are greater than X", it's a map | |||
or if someone wants to say "give me all of the elements greater than X", it's a grep | |||
diakopter | perhaps more contextualizers are needed, then, for Junction context and such | 15:02 | |
15:02
parduncia_ left
|
|||
moritz_ | if we still had .eigenstates it wouldn't be all that hard :) | 15:03 | |
pmichaud | istr that TimToady has recently declared that junctions are meaningful only in boolean context. | ||
moritz_: even .eigenstates doesn't help out much for "give me all of the elements greater than X" | |||
PerlJam | junction -> list -> grep seems fine to me :) | 15:04 | |
pmichaud | PerlJam: sure, but if you do something like any(...) > 3 then the resulting junction is a junction of booleans | ||
moritz_ | what PerlJam said :-) | ||
pmichaud | i.e., we've lost the original values | ||
moritz_ | right | ||
ruoso | the problem is that using junctions as sets will lead to unexpected behavior at some point | ||
moritz_ | but for that question you use (...).grep({$_>0}) | 15:05 | |
PerlJam | pm: so, don't do that? It seems like we have enough operators to convert lists into whatever we nee | ||
pmichaud | PerlJam: yes, that's kinda my point. | ||
ruoso | I see your point... | ||
moritz_ | currently Junctions are kind of like a singularity | ||
ruoso | but it's all about DWIMmery | ||
moritz_ | you can throw items in, but you'll only ever get a boolean out | 15:06 | |
heh, but I know I can cheat to get eigenstates back | |||
rakudo: my @x; sub e($x) {@x.push: $e }; e(1|2|3); @x.perl.say | 15:07 | ||
ruoso | I currently think of Set having all the dwimmery junction has, but no collapsing and no autothreading... | ||
p6eval | rakudo 9fa0fc: OUTPUTĀ«Scope not found for PAST::Var '$e' in eā¤current instr.: 'parrot;PCT;HLLCompiler;panic' pc 146 (src/PCT/HLLCompiler.pir:102)ā¤Ā» | ||
moritz_ | rakudo: my @x; sub e($x) {@x.push: $x }; e(1|2|3); @x.perl.say | ||
p6eval | rakudo 9fa0fc: OUTPUTĀ«[1, 2, 3]ā¤Ā» | ||
moritz_ | ruoso: but the junction dwimmery comes exactly from autothreading | ||
PerlJam | ruoso: it's different dwimmery isn't it? | ||
moritz_ | ruoso: if you don't autothread, you won't get any dwimmery with user defined subs | 15:08 | |
ruoso | moritz_, well... it does in terms of implementation... not in terms of expected behavior... | ||
moritz_, autothreading is not necessary to call the same sub several times | |||
15:08
literal_ is now known as literal
|
|||
ruoso | that's just an hyper invocation... | 15:09 | |
moritz_ | ruoso: ... and we call it autothreading. | ||
not that "normal" hyper invocation doesn't work with user defined subs with two parameters | 15:10 | ||
that's where you need autothreading to dwim | |||
ruoso | indeed... that's the point I'm talking about | ||
Set is Any | |||
15:10
nihiliad joined
|
|||
ruoso | it's not autothread.. it's simply overrided operators | 15:10 | |
moritz_ | so you want a type that doesn't DWIM on user defined functions, but autothreads on built-in functions/operators? | 15:11 | |
ruoso | not autothread... simply follows regular multi dispatch | ||
there's nothing "automatic" there | |||
moritz_ | but from a user's point of view it looks like autothreading? | 15:12 | |
pmichaud | you want a type that has overloaded operators that dwim the hyperization for builtins | ||
ruoso | pmichaud, exactly | ||
pmichaud | but wouldn't dwim the hyperization for non-builtins | ||
i.e., if I define my own custom operator, I'd have to define its Set version also. | |||
moritz_ | ... which would introduce a distinction between builtins and non-builtins that's undesirable IMHO | ||
ruoso | exactly... | ||
it's not really a distinction... | 15:13 | ||
pmichaud | I think it is. | ||
ruoso | it's like Whatever | ||
moritz_ | but it makes it more work to define new operators that DWIM | ||
that's the big advantage of junctions | |||
ruoso | just like with Whatever | ||
moritz_ | 90% of all code just works with them | ||
ruoso | moritz_, and the danger in being used as if it were a simple Set | ||
PerlJam | 90%? | ||
ruoso | my point is... Set is as special as Whatever | 15:14 | |
not as special as junctions | |||
moritz_ | ruoso: yes, but if you add more such concepts the complexity for defining user defined operators increases quadratically | ||
pmichaud | I can understanding having Whatever as a special case. I can't understand using it to justify other special cases :-) | ||
moritz_ | no, actually exponentially | ||
right, one special case is bad enough already | 15:15 | ||
ruoso | ok... what would happen in the case of new operators? | ||
it would fall into the Any,Any signature | |||
which should deal with unknown types | |||
moritz_ | but doesn't add any meaningful behaviour | ||
ruoso | so, Set has a very well defined behavior... | 15:16 | |
diakopter | pmichaud: why would you need a Set version of the custom operator as well? isn't that just like saying you can write an optionally parallel implementation of an operator if you want to? Why wouldn't we want to allow folks to write parallelized and nonparallelized implementations of operators that work in the proper contexts | ||
ruoso | that's my point | ||
pmichaud | diakopter: suppose I have set(1,2,3) + 3 .... according to ruoso, that gives me set(4,5,6) | ||
(more | |||
diakopter: now then, if I define postfix:<!> to do factorial | 15:17 | ||
and write | |||
(set(1,2,3) + 3)! | |||
my generic expectation is that I end up with (4!, 5!, 6!) | |||
but unless I write a special Set-form of postfix:<!> what I will really end up with is 3! | |||
moritz_ | ruoso: it's well defined, but much less useful than autothreading | ||
[particle] | (because 3 is the number of elements in the set, for those wondering) | 15:18 | |
moritz_ | have a nice weekend all | 15:20 | |
15:20
donaldh left
|
|||
moritz_ | ciao | 15:20 | |
ruoso | hmm... | ||
pmichaud | it gets a little worse if I can't even tell that something is a Set | ||
ruoso | pmichaud, that you could... | ||
pmichaud | because $a + 3 and $a customOp 3 would end up doing different things. | ||
ruoso | ~~ Set | ||
pmichaud, but that's just MMD | |||
15:20
donaldh joined
|
|||
ruoso | but point taken... I don't think I have a strong argument... | 15:21 | |
I think it shouldn't be a problem to have Set in the same level as junctions | |||
but without the collapsing | |||
pmichaud | ruoso: I'd suggest completing the example you gave in the thread, though. | 15:22 | |
ruoso: i.e., you proposed the idea of Set, but then didn't illustrate how it could be used to determine that @p beats @d | |||
diakopter | correct me if I'm wrong... there's already a metaop syntax for hyper.. but ruoso thinks it can be inferred, sometimes (but pmichaud disagrees). | ||
pmichaud | diakopter: ruoso proposes that Set DWIMs hyper for builtins | 15:23 | |
ruoso | pmichaud proposes it DWIMs for everything ;) | ||
[particle] | it auto-hyperizes, that's the dwim here | ||
does that apply to bag, too? | |||
but not array and list? | 15:24 | ||
Matt-W | what happens if you do something that expects a set to a set of sets? | ||
pmichaud | I'm not proposing it DWIMs for everything -- I'm illustrating why DWIM for somethings and non-DWIM for others may be problematic | ||
[particle] | is Set.keys defined? | ||
pmichaud | if anything, I'm saying that we already have a hyperizing notation, we should use it. | ||
ruoso | Matt-W, it doesn't collapse... | ||
[particle], I'm not sure it should be named "keys" | |||
Matt-W | pmichaud: that seems sensible to me | 15:25 | |
[particle] | i'm basically asking how array-like a Set is. | ||
does it Enumerable? | |||
ruoso | hmm,... Enumerable? | ||
you mean... Positional? | |||
PerlJam | It seems like ruoso's idea could work if there were some way to specify that operations "pass through" the Set to its members. (i.e., if there were a generic mechanism to specify the pass-through) But I'm not sure there's much utility beyond the specific example of Set | ||
ruoso | PerlJam, the way for doing that would be the same of the one for junctions... | 15:26 | |
PerlJam | ruoso: right. | ||
ruoso | for those who missed it, I agreed it should be in the same level of Junctions... | ||
PerlJam | ruoso: right now, that's part of the "special case" for junctions. They have this behaviour, but other objects can't get at it easily. | ||
[particle] | hrmm, yeah, i guess i mean Positional. perhaps there's room for an Enumerable role, that doesn't implement .keys | ||
ruoso | I'd suppose Set doesn't support .] | 15:27 | |
.[] nor .{} | |||
because a set is not ordered... | |||
I guess | |||
[particle] | right, nor Bag | ||
Matt-W | .[] would be pretty meaningless | ||
and .{} has no keys to work with | |||
diakopter | well, it has an ordering on *some* time dimension | 15:28 | |
ruoso | I guess it implements .exists | ||
and .values | |||
Matt-W | I can imagine doing a for loop ove ra set though - just in no particular order | ||
PerlJam | diakopter: yeah, but you don't want to imply anythign about the order at the interface. | ||
diakopter | heh :) | ||
[particle] | Set.values is Set.pick(*) | ||
ruoso | fair analogy | 15:29 | |
[particle] | so set(1,2,3).values! | ||
no, that probably still gives 3! | 15:30 | ||
ruoso | just set(1,2,3)! | ||
and it will autothread, returning the same as set(1!, 2!, 3!) | |||
15:30
kst left
|
|||
ruoso | just like junctions... | 15:30 | |
but without any type of collapsing | |||
15:31
kst joined
|
|||
[particle] | yes, that's your proposal. | 15:31 | |
ruoso | yes | ||
[particle] | a set is a junction with list context | ||
a junction is a set with boolean context | |||
something like that | |||
ruoso | not really | ||
because none(1,2,3) doesn't map to any set concept | 15:32 | ||
[particle] | set(Nil) | ||
ruoso | the collapsing of junctions is what makes it "Not A Set" | ||
[particle] | i wonder about set(Nil).elements | ||
ruoso | if I remember first-grade school, it is 1 | 15:33 | |
skids | I always viewed a set as keys without values, not values without keys. | ||
15:33
Cybera joined
|
|||
ruoso | [particle], if I see what you mean... Nil.elements will be 0 | 15:34 | |
[particle] | yep | ||
PerlJam | If we had AutoThread as a role and Junctions does AutoThread and Set does AutoThread ... :) | ||
ruoso | PerlJam, that isn't necessary... | ||
[particle] | so you have the whole container/values method problem, like junction | ||
ruoso | Any vs Object already does that distinction | 15:35 | |
diakopter | so, a junction is a membership predicate of a [perhaps lazily enumerated] set? | ||
(sorry for continually translating the Perl terminology...) | |||
PerlJam doesn't remember the hierarchy | |||
ruoso | diakopter, I don't really see a reason to stablish a hierarchy between Junction and Set... they are both Object and both not Any | 15:36 | |
diakopter | I'm not tryign to do that | ||
ruoso | [particle], ah... I guess that's the main difference... | ||
diakopter | they can have logical relationships in both directions | ||
ruoso | (1,2,3).foo doesn't autothread... | ||
it simply calls the method foo on the set | |||
diakopter | set(1,2,3).foo ? | 15:37 | |
[particle] | set(1,2,3).foo, you mean | ||
ruoso | yeah... sorry | ||
[particle] | so, set(1,2,3)! is 3! | ||
ruoso | why? | ||
[particle] | set(1,2,3).postfix<!> | ||
ruoso | [particle], ops are not method calls | 15:38 | |
they are multi sub calls | |||
[particle] | ah, right, different dispatcher | ||
skids | Do folks really want sets, or Bags? Bag is a hash of integer counts where count=0 keys cannot exist. | ||
ruoso | exactly | ||
[particle] | there are three dispatchers, right? | ||
skids: perl 6 specifies both Set and Bag | |||
skids | Yes, but speaking of what the demand is for. | 15:39 | |
ruoso | [particle], multi sub dispatch, object dispatch and private dispatch.... yes... I think that's all... | ||
[particle] | a Set is a Bag with uniqueness constraints | ||
skids | What are these junction abusers really after? :-) | ||
ruoso | skids, implement blackjack programs | ||
[particle] | :) | ||
[particle] wonders if blackjack will be a one-liner in perl6 | 15:40 | ||
diakopter | .21 | ||
[particle] | well, the problem and the proposal seem well-defined to me. | 15:41 | |
diakopter re-reads osdir.com/ml/lang.perl.perl6.langua...00196.html | |||
pmichaud | I'd still like to see the complete blackjack solution done with sets | 15:42 | |
I'm not convinced it solves the problem. | |||
[particle] | i'm not sure it solves it, either, but it's clear to me. | ||
ruoso | pmichaud, basically... replace 1|11 by set(1,11) | ||
pmichaud | I understand that part. I don't see how to do the rest of the problem. | 15:43 | |
[particle] | right, the trick is in the op and method calls involving sets | ||
ruoso | my @hand = set(1,11), 3, set(1,11); | ||
my $sum = [+] @hand; | |||
pmichaud | what does $sum become after that step? | 15:44 | |
ruoso | say $sum.perl; # set(5,15,25) | ||
pmichaud | okay, so keep going | ||
in reality (from the original) we would have | 15:45 | ||
ruoso | if any($sum) < 21 { #there's a game here | ||
pmichaud | my $p = [+] @p; | ||
my $d = [+] @d; | |||
where $p is set(4, 14, 24) and $d is set(5, 15, 25) | 15:46 | ||
ruoso | ok... | ||
pmichaud | how do we determine that $d beats $p ? | ||
diakopter mangles any( $sum, (x) => x < 21 ) in my head | |||
ruoso | pmichaud, that's where the set part really enters... since we need the subset of valid games... | 15:47 | |
pmichaud | and we do that with ... ? | ||
ruoso | my $valid_p = $p.subset: { * < 21 }; | ||
literal | Hm, ok, I'm definitely gonna apply for GSoC this year and I have Perl 6 in mind. However, I not sure which aspect I should work on. What would be of most benefit to Perl 6? Spec tests? Docs (u4x)? Something else? | 15:48 | |
diakopter | <= | ||
ruoso | right... | ||
my $valid_p = $p.subset: { * <= 21 }; | |||
[particle] | literal: both are good. i suggest you take that to the list (tpf-gsoc-students@googlegroups.com) | 15:49 | |
PerlJam | literal: pick the one you want to work on. | ||
[particle] | the mentors not here can reply there | ||
literal | PerlJam: a lot of them look good to me, so I'd like to pick one that's more likely to be accepted :) | ||
pmichaud | what's the difference between $p.subset and $p.grep ? | 15:50 | |
ruoso | $p.subset returns another set... | ||
pmichaud | $p.grep couldn't do the same? | ||
ruoso | maybe... | ||
but even then... | |||
my $valid_p = $p.grep: { * <= 21 }; | 15:51 | ||
[particle] | does grep change the context of its elements? | ||
ruoso | which is what people is trying to do with junctions | ||
[particle] | er, the elements of the object over which it's operating. | ||
ruoso | [particle], what do you mean by "change the context"? | 15:52 | |
[particle] | i guess i mean, does grep return List? | ||
or are you suggesting a multi for grep that returns Set? | |||
ruoso | [particle], well... that was why I didn't suggest $p.grep at the first example | ||
but I think there isn't really a problem in that case... | |||
pmichaud | so far it looks as though the only advantage of Set over List is in the [+] step. | 15:53 | |
15:53
Tene_ joined
|
|||
ruoso | in the blackjack case... maybe | 15:53 | |
but... | 15:54 | ||
if you really think as sets... | |||
you could extend the dwimmery to... | |||
my $valid_p = $p <= 21; | |||
pmichaud | wouldn't that be a set of booleans, then? | ||
ruoso | no... a set of the values that passed the test | 15:55 | |
where an empty set is, obviously, false | |||
pmichaud | I would think an empty set would remain empty | 15:56 | |
ruoso | I mean... an empty set in boolean context is false | ||
[particle] | i'd like to see set operators that create sets, like union, intersection, etc | ||
pmichaud | (but you can see why this gets weird, because we're taking what was a boolean operator and turning it into a filter) | ||
there's no boolean context in my $valid_p = $p <= 21; | 15:57 | ||
ruoso | yes... I only said that as an additional comment | ||
15:57
|jedai| left
|
|||
pmichaud | does prefix:<+> DWIM on sets? | 15:58 | |
ruoso | does it DWIM on junctions? | ||
pmichaud | yes. | ||
ruoso | so yse | ||
since Set is not Any | |||
[particle] | maybe it should be spelled 'set', not 'Set' | 15:59 | |
15:59
|jedai| joined
|
|||
[particle] | as now we have junction | 15:59 | |
pmichaud | how would I get a list of the elements out of a set? | ||
ruoso | that usually differentiates native vs non-native types | ||
pmichaud, $set.values? | |||
or just @$set | |||
pmichaud | so methods don't autothread | ||
ruoso | no... they don't... | ||
[particle] | right, ops autothread, and not methods, on sets. | 16:00 | |
that's ruoso's idea. | |||
pmichaud | how would I truncate all of the elements in a set? | ||
ruoso | what do you mean by truncate? | ||
[particle] | make it the empty set. | ||
pmichaud | rakudo: 3.4.truncate | ||
p6eval | rakudo 9fa0fc: RESULTĀ«3Ā» | ||
[particle] | ah, like floor. | ||
pmichaud | yes, or floor. | ||
diakopter | truncate in-place or make a new set | 16:01 | |
pmichaud | make a new one | ||
[particle] | set(1,2,3).<<truncate | ||
pmichaud | particle: a set in list context becomes a list of its elements? | ||
ruoso | that's my plan | ||
diakopter | (flattens) | 16:02 | |
pmichaud | can I have lists of sets? | ||
or sets of lists? | |||
[particle] | (set(1,2,3).<<truncate).WHAT() # set, or List? | ||
ruoso | hmmm | ||
why are you using the hyper operator there> | |||
? | |||
[particle] | i want to call that method on the elements of the set | 16:03 | |
pmichaud | he's treating the set as a list. | ||
(the hyper is pointing the wrong way, I think) | |||
ruoso | I guess you need an explicit cast, in that case | ||
pmichaud | so it would be set(1,2,3).values.truncate ? | ||
[particle] | yes, it is, and i copy/pasted the bad code again :( | ||
ruoso | or does the hyperop implies list context? | 16:04 | |
pmichaud | er, >>.truncate | ||
[particle] | hyperop implies list | ||
ruoso | well... if it implies list, you'll get it called in the elements of the set | ||
16:05
Tene left
|
|||
ruoso | pmichaud, but why can't set implement truncate as well? | 16:05 | |
(although I don't really see what truncate would do in a set) | |||
[particle] | it would operate on its elements | ||
pmichaud | ruoso: this gets back to the question of "how do I know which methods are defined for Sets and which aren't?" (more) | ||
[particle] | basically, most anything Any does, set should do. | ||
pmichaud | In the case of Junctions, methods autothread over the Junction, so we don't have to think about whether or not it's implemented for Junction | ||
diakopter | so, a set has its own dispatcher that iterates, optionally parallel. | 16:06 | |
ruoso | pmichaud, that problem doesn't arise in Set, because it never delegates a method call to its elements | ||
pmichaud | it's just inconsistent then (more) | ||
for Junctions, we have autothreading of methods and operators | |||
[particle] | so sets only produce sets with operators. with methods, they produce lists. | 16:07 | |
pmichaud | for Lists, we have hyperizing of methods and operators | ||
for Sets, we hyperize operators but not methods | |||
(or DWIM operators but not methods) | |||
ruoso | right... I see the point... | ||
but even if we have to face the problem of "which method does Set implement" | 16:09 | ||
there's still a major difference from Junctions... | |||
there's no collapsing | |||
pmichaud | I'm asking if there's a major difference from List | ||
16:10
cognominal left
|
|||
ruoso | it DWIMs in operators and methods... | 16:10 | |
pmichaud | no, you just said it DWIMs operators only | ||
ruoso | pmichaud, I accepted your point five lines ago ;) | 16:11 | |
pmichaud | oh. | ||
I didn't know that "see the point" meant "accepts it" | |||
ruoso | sorry... | ||
pmichaud | so, the purpose of a set is to get rid of the hyper angles on lists. | ||
skids | Well either way I think we would want to specify that sets/bags only act like hashes when treated that way, and when naked they explode to the keys, not the values. | ||
ruoso | pmichaud, the purpose of set is provide all the DWIMmery people love in Junctions, but without collapsing, which makes "getting the values" a reasonable idea... | 16:12 | |
pmichaud | but the effect is simply to have a type that doesn't require hyper angles | ||
ruoso | not really... | ||
pmichaud | because I could do the same thing with List | ||
ruoso | the effect is having a type that can be used as a singular value, even if it's a plural value | 16:13 | |
which means that you can intermix singular and plural | |||
i.e.: | |||
my @hand = set(1,11), 3, set(1,11) | |||
my $sum = [+] @hand; | |||
the code works the same if you have no sets there | 16:14 | ||
16:15
|jedai| left
|
|||
pmichaud | what if we have ... | 16:15 | |
16:15
|jedai| joined
|
|||
pmichaud | my $x = set(1,11); say ($x < 3).perl; | 16:15 | |
16:16
mberends left
|
|||
pmichaud | do I get set(3) or set(True, False) ? | 16:16 | |
sorry, set(1) or set(True, False) | |||
and that leads to | 16:17 | ||
my $ordered = [<=] @hand; | |||
ruoso | the question is "what does comparing a set to a number means"? | 16:18 | |
hmm... actually... that's not the question... | 16:19 | ||
pmichaud | in junctions, $x < 3 would produce a junction of true/false values | ||
(assuming $x is a junction) | |||
ruoso | rakudo: my @hand = 1|11, 3, 1|11; my $ordered = [<=] @hand; say $ordered.perl; | 16:21 | |
p6eval | rakudo 9fa0fc: OUTPUTĀ«get_integer() not implemented in class 'Junction'ā¤current instr.: '!MAKE_JUNCTION' pc 9241 (src/classes/Junction.pir:222)ā¤Ā» | ||
16:21
kst left
|
|||
pmichaud | we still have some autothreading issues in rakudo. | 16:22 | |
ruoso | but what would it return? | ||
16:22
kst joined
|
|||
pmichaud | well, it ought to be the same as 1|11 <= 3 <= 1|11 | 16:22 | |
which is going to be a junction of true/false values of some sort | 16:23 | ||
ruoso | rakudo: my $ordered = 1|11, 3, 1|11 ; say $ordered.perl; | ||
p6eval | rakudo 9fa0fc: OUTPUTĀ«[any(1, 11), 3, any(1, 11)]ā¤Ā» | ||
ruoso | rakudo: my $ordered = 1|11 <= 3 <= 1|11 ; say $ordered.perl; | ||
p6eval | rakudo 9fa0fc: OUTPUTĀ«any(Bool::False, Bool::True)ā¤Ā» | ||
ruoso thinking | 16:24 | ||
skids | That's logical. It could be true, or could be false, depending on what value collapsed out of each junction. | ||
pmichaud | anyway, I need to get to work on some other tasks. Sets are a good idea, but I don't think we have quite the right magic yet. | ||
ruoso | I think "set(1,11) > 3" should somehow return "set(1)" | 16:25 | |
but I still don't know how it could get there | |||
skids | I think that's more like the functionality a user that goes looking for "sets" would want. | 16:26 | |
But as far as "the purpose of sets" it was my reading that the original intent was just that set(1,2){1} == 1, but set(1,2).>>say said "1 2" or "2 1" | 16:27 | ||
And nothing fancier. | |||
Not that fancier might not be good. | 16:28 | ||
ruoso | skids, the problem is, if you want to be able to use a set where you use a plain value... it needs to be much fancier | ||
and if that's not possible, there's no difference from a regular list | 16:29 | ||
skids | Not if all you expect is a hash that you don't have to call .keys on all the time. | ||
ruoso | what's the purpose of that? | ||
I mean | |||
set(1,2){1} | |||
what's the meaning of that? | |||
you're trying to extract a value that you already have | |||
skids | A lot of uses of hashes is in the keys, not the values, either counting(bag) or presence(set). So I read it as just a way to ensure you could have very efficiently stored keys that were easier to work with syntactically. | 16:30 | |
ruoso | skids, right... but .{} is not the api to that | 16:31 | |
probably .exists | |||
skids | $a = something that generates a set; if ($a{"foo"}) do something. | ||
16:31
DietCoke joined,
DietCoke is now known as Coke
|
|||
skids | ruoso: think bags for .{}, then ask why not sets too. | 16:31 | |
Coke | is there a way to collapse nested anys? | ||
e.g. any(any(1,2),any(2,3)) == any(1,2,3) ? | 16:32 | ||
skids | bag is the more important of the two. | ||
Coke | . | ||
16:33
awarefish joined
|
|||
ruoso | Coke, you collapse it when you use it | 16:33 | |
rakudo: say any(any(1,2),any(2,3)) > 2; | |||
p6eval | rakudo 9fa0fc: OUTPUTĀ«Junction<0xb5b45928>ā¤Ā» | ||
ruoso | rakudo: say (any(any(1,2),any(2,3)) > 2).true; | 16:34 | |
p6eval | rakudo 9fa0fc: OUTPUTĀ«1ā¤Ā» | ||
ruoso | rakudo: say (any(any(1,2),any(2,3)) > 2).perl; | ||
p6eval | rakudo 9fa0fc: OUTPUTĀ«any(any(Bool::False), any(Bool::False, Bool::True))ā¤Ā» | 16:35 | |
skids | ruoso: and also pay attention that anything a Set/Bag can do a KeySet/KeyBag should also do, but they are mutable. | 16:37 | |
ruoso | skids, I'd prefer a syntax like: if "foo" ā $a {...} instead | ||
skids | I think .{} falls out from the overarching "if you want it to behave like a hash, treat it as a hash" edict. | 16:39 | |
ruoso | skids, not really... KeySet implements the behavior you want... not Set | ||
it's not just immutable/mutable conterparts | |||
Set doesn't behave like a Hash | 16:40 | ||
nor does Bagh | |||
just KeySet and KeyBag | |||
skids | Is there something in the standard that says or implies so? | ||
ruoso | yes... S02 | 16:41 | |
KeySet KeyHash of Bool (does Set in list/array context) | |||
KeyHash Perl hash that autodeletes values matching default | |||
Set Unordered collection of values that allows no duplicates | |||
16:41
Cybera left
|
|||
skids | That doesn't say anything about {} | 16:42 | |
16:42
awarefish left
16:43
orafu left
|
|||
ruoso | skids, Associative implements .{} | 16:43 | |
Set is not Associative | |||
16:43
FurnaceBoy joined,
OuLouFu joined,
OuLouFu is now known as orafu
|
|||
jnthn | Heading off for the weekend; probably offline most of it; back Tuesday. Have fun. :-) | 16:43 | |
pmichaud | have fun, jnthn! | 16:44 | |
ruoso | pmichaud, do you see any way to make "set(1,2,3) > 2" to return "set(3)" ? | 16:45 | |
pmichaud | not without introducing some other confusion, no. | ||
ruoso | unless there are specific signatures for that operators | 16:46 | |
since we want them to return a different thing | |||
16:46
Psyche^ joined
|
|||
pmichaud | rakudo: say 'c' cmp 3; | 16:47 | |
p6eval | rakudo 9fa0fc: OUTPUTĀ«1ā¤Ā» | ||
pmichaud | rakudo: say 3 cmp 'c'; | ||
p6eval | rakudo 9fa0fc: OUTPUTĀ«1ā¤Ā» | ||
pmichaud | (...sigh...) | ||
ruoso | rakudo: say +'c' | ||
p6eval | rakudo 9fa0fc: OUTPUTĀ«0ā¤Ā» | ||
ruoso lunch & | 16:49 | ||
pmichaud | yes, I should lunch here also. | ||
skids | same here | 16:50 | |
[particle] | you people are crazy, it's too early for lunch! | 16:55 | |
literal | initial draft: nix.is/u4x-gsoc.pod ... comments? | 16:56 | |
16:59
hercynium joined
|
|||
diakopter | ruoso: what about another meta operator... meaning apply (really *permute*) the operator's argument(s) (if/where they are sets), and return a set of the [union of] the results. set(1,2,3) S> 2 gives set(3), and set(1,2,3) S> set(1,2) gives set(2,3) | 16:59 | |
ruoso | diakopter, the point is about being able to use a set as if it were a singular value... | 17:00 | |
diakopter | I know; I'm suggesting a way to do it, assuming there's no reliable way to infer it. | 17:01 | |
ruoso | the point is if that can't be done, sets are not more usefull than plain lists | 17:02 | |
17:03
Patterner left,
Psyche^ is now known as Patterner
|
|||
diakopter | but they are, if they have a meta-op that enforces uniqueness when hyperizing. | 17:03 | |
17:05
zamolxes left
|
|||
diakopter | ? bags are eagerized lists that disregard ordering; sets are bags that enforce uniquenes ? | 17:07 | |
I see your point, they're not more useful as language intrinsics if operations on them don't have possibly special behavior... but of course they're still useful as logical constructs | 17:11 | ||
(I think) | 17:12 | ||
17:12
kst left,
kst joined
|
|||
ruoso | I think I'll get back to the idea of Set being Any | 17:12 | |
the consequences of putting it in the same level as junction are enormous | 17:13 | ||
and in the end, you always need to use it as a Set | |||
so "set(1,2,3) + 3" works by the existance of "infix:<+>(Set, Num)" | 17:14 | ||
it provides limited DWIMmery... but it's still better than no DWIMmery.... | 17:15 | ||
diakopter | .... idea of Set being the result of an Any [applied to a predicate producing a bool that's used for membership]? | ||
ruoso | no... | ||
the idea of Set ~~ Any | |||
diakopter | oh. | ||
ruoso | meaning it wouldn't autothread at all | ||
and all DWIMmery would depend on signatures in each operators that we want to DWIM | 17:16 | ||
just like Whatever | |||
ruoso really lunch & | 17:17 | ||
diakopter | speaking of operators... can an operation (like infix:<+>(Set, Num)) be declared as commutative, so that infix:<+>(Num, Set) is also applicable? | 17:18 | |
[particle] | no | 17:20 | |
there's no commutative adverb | |||
diakopter | no, as in "not yet", or no, as in "I don't like that idea"? :) | ||
[particle] | right now that's R[] | ||
17:20
frioux_away left,
frioux joined
|
|||
[particle] | not yet. | 17:20 | |
we have 'is assoc' but not 'is commutative' | 17:22 | ||
s/adverb/trait/ | |||
diakopter | I suppose 'is commut' ('is commu'?) could also apply to n-ary operations (not just binary) | 17:23 | |
17:23
cognominal joined
|
|||
diakopter | er, not n-ary operations :) I mean, operations of all arities. | 17:24 | |
17:25
pmurias joined
|
|||
diakopter | pmurias: hi | 17:25 | |
pmurias | diakopter: hi | ||
diakopter | pmurias: lots to backlog... | 17:26 | |
:D | |||
pmurias | diakopter: yes, someone has to start this week/day in #perl6 | 17:31 | |
;) | |||
17:34
Coke left
17:37
donaldh left
|
|||
ruoso | hi pmurias | 17:37 | |
pmurias | ruoso: hi | ||
ruoso | pmurias, I was thinking the LOwlevel STate machine can still be helpfull, specially when we support signatures in the RI DSL | 17:41 | |
because if the capture is native and the values are not wrapped into a scalar, it will be able to have all the values avaialble before returning the first time... it could even use some trick to avoid getting back to the runloop... | 17:42 | ||
while it would still do all the necessary SMOP_DISPATCH (one at a time) if that's not the case... | 17:43 | ||
pmurias, what do you think? | |||
pmurias | isn't that a bit of premature optimalisation | 17:44 | |
? | |||
btw we should add a wrapper around SMOP_DISPATCH which calls SMOP_RELEASE on the it's return value | |||
ruoso | pmurias, you know you can simply use SMOP_RELEASE around it, don't you? | 17:45 | |
pmurias | yes | ||
ruoso | btw... I'm not sure it's premature optimization... because generating the mold code for the signature is not going to be much fun... specially if the code that will use the values is not a mold block | 17:46 | |
generating a specialized code might be easier | 17:47 | ||
pmurias | what i'm wondering is if it would be possible to write s1p in Perl 6 | 17:49 | |
ruoso | I'm not sure it's worth the trouble... | ||
pmurias | as most of the things s1p classes do atm is calling mold blocks and keeping data in a struct | ||
ruoso | some of them, yes | 17:50 | |
S1P__Scalar, for instance... | |||
is not one of them | |||
nor is S1P__Array | |||
or Hash | |||
pmurias, what certainly would help would be a way to write a method with a signature in mold | 17:54 | ||
like... | |||
%moldmethod foo($bar, $baz) | |||
$mold."code"("here"); | 17:55 | ||
pmurias | that would eliminate a fair bit of the boiler plate | 17:56 | |
ruoso | but not many methods are implemented just in mold | ||
they usually access some internal attribute of the object... | |||
which is set in the given mold frame | 17:57 | ||
which gets execute | |||
d | |||
pmurias, maybe %moldmethod provides an additional signature, for getting things from this object's structure... | 17:59 | ||
like... | |||
%moldmethod foo ($bar, $baz) ($bla = invocant->member, $ble = invocant->othermember) | 18:00 | ||
18:01
schmalbe joined
|
|||
ruoso | where $bar, $baz, $bla and $ble are made available as registers in the mold | 18:02 | |
pmurias | that would be helpfull | 18:03 | |
pugs_svn | r26015 | putter++ | [elfparse] IRx1_FromAST2_create.pl: Kludge around /:my $x; a | b/ parsing as /[:my $x; a] | b/. | 18:04 | |
pmurias | ruoso: i'll have to think over and compare it to have a set of primitives and write s1p in Perl 6 (without lexical scopes) approach | 18:05 | |
skids | how about a parameter trait "will explode" or something, lets MMD know if it gets a Set to feed to a scalar, to thread. | ||
(as long as the Set is "of" the appropriate type, of course) | 18:06 | ||
pmurias | ruoso: what license to we use for smop? | 18:07 | |
skids | Though I guess for foo(set(1,2),$bar) that doesn't get around the set list context explosion before the MMD. | 18:08 | |
ruoso | same as perl | ||
pmurias | shouldn't we use Artistic 2? | 18:19 | |
amoc | .oO( it is just a checking for myself that failed in my local test ) |
18:20 | |
rakudo: is (<a ab>, <bc ad ba>).comb(m:Perl5/\S*a\S*/), <a ab ad ba>, 'comb a list'; | |||
p6eval | rakudo 9fa0fc: OUTPUTĀ«Could not find non-existent sub isā¤current instr.: '_block14' pc 190 (EVAL_17:67)ā¤Ā» | ||
18:21
M_o_C joined
|
|||
amoc | rakudo: (<a ab>, <bc ad ba>).comb(m:Perl5/\S*a\S*/), <a ab ad ba>; | 18:21 | |
p6eval | rakudo 9fa0fc: RESULTĀ«["a", "ab", "ad", "ba", "a", "ab", "ad", "ba"]Ā» | 18:22 | |
amoc | oh? | ||
pmurias | ruoso: native types should support arbitary captures too? | ||
18:26
kst left,
kst joined
|
|||
ruoso | pmurias, Perl uses Artistic 2 + GPL | 18:38 | |
pmurias, yes, they need... | |||
pmurias, I think the only type we can accept requiring only native capture is the interpreter | 18:40 | ||
18:46
Tene_ is now known as Tene
18:49
eternaleye joined
18:50
japhb left
18:59
nihiliad left,
nihiliad joined
19:01
riffraff left
19:06
|jedai| is now known as jedai
19:24
rodi left
19:26
cognominal left,
icwiener joined
|
|||
pmurias | ruoso: Artistics 2 is gpl comaptible so there is no need to make a disjunction | 19:29 | |
ruoso | it's not a disjunction | ||
19:29
cognominal joined
|
|||
ruoso | it's a dual licensing... | 19:29 | |
you can choose whichever you want | |||
pmurias | Artistic 2 can be changed to GPL | 19:31 | |
and i think perl5 is Artistic 1 | |||
s/changed/sublicensed | 19:32 | ||
19:33
dKingston left
19:44
REPLeffect joined
|
|||
pugs_svn | r26016 | pmichaud++ | [S05]: Correct typo "by use if" ==> "by use of" | 19:45 | |
ruoso | pmurias, maybe let it just Artistic 2 | 19:52 | |
diakopter | yeah, al2 software may be relicensed as any certified by opensource.org | 19:54 | |
19:55
icwiener left
20:03
Cybera joined,
Cybera left,
Cybera joined
20:07
nww joined
20:27
eternaleye left
|
|||
Matt-W | whee | 20:32 | |
new passing tests for Form.pm | |||
20:34
frioux left
20:35
skids left
20:47
orafu left,
OuLouFu joined,
OuLouFu is now known as orafu
20:49
eternaleye joined
20:50
mikehh left
20:51
ZuLuuuuuu joined,
rblasch joined,
Grrrr left
20:52
Grrrr joined
20:54
sri_kraih_ joined
20:56
ruoso left
20:58
justatheory joined
20:59
M_o_C left
21:08
sri_kraih left,
orafu left,
OuLouFu joined,
OuLouFu is now known as orafu
21:20
donaldh joined
21:24
mberends joined
21:34
kate21de joined
21:36
skids joined
21:39
ron_ joined
21:40
ron_ left
21:43
Whiteknight joined
21:44
NoirSoldats left
21:45
ron_ joined
21:49
NoirSoldats joined
21:52
ZuLuuuuuu left,
Cybera1 joined,
Cybera left
21:53
Cybera1 is now known as Cybera
21:54
dKingston joined
21:55
nihiliad left,
FurnaceBoy left
21:59
justatheory left
22:01
ron_ left
22:02
pmurias left
22:07
mberends left
22:12
donaldh left
22:17
hercynium left
22:19
Whiteknight left
22:25
nww left
22:28
exodist left
22:31
alester left
22:33
dKingston left
22:44
Whiteknight joined
22:46
rblasch left
22:48
orafu left
22:52
orafu joined
22:54
nacho joined,
dKingston joined
23:00
nacho left
23:01
schmalbe left
23:02
nacho joined
|
|||
skids | how do you bind in PIR. e.g. $P0 = find_lex('$a') $S0 = $P0 but I want $S0 to BE the string in $P0 not a copy of it, | 23:10 | |
Tene | skids: look in docs/ops/set.pod | 23:24 | |
skids | not finding it. | 23:25 | |
23:27
jan_ left
23:28
kate21de1 joined
23:29
jan_ joined
23:44
kate21de left
23:47
orafu left,
OuLouFu joined
23:48
OuLouFu is now known as orafu
23:54
eternaleye left
|