»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend! Set by sorear on 4 February 2011. |
|||
00:02
whiteknight joined
00:04
raiph left
00:06
benabik_ joined,
benabik left,
benabik_ is now known as benabik
00:09
Chillance left
|
|||
TimToady wonders if the chunk() routine from rosettacode.org/wiki/Floyd%27s_triangle#Perl_6 should be a built-in | 00:57 | ||
also, the formatter map would be improved if we had a fmt infix that we could say Zfmt with | 00:59 | ||
dinner & | 01:01 | ||
pmichaud | Zfmt -- interesting! | 01:02 | |
01:05
scott_ joined
01:07
xinming joined
01:10
xinming_ left
|
|||
colomon | TimToady: seems to me chunk ought to go in List::Utils. ;) | 01:14 | |
sorear | Z[&sprintf] ? | 01:17 | |
colomon | sorear: are you proposing that any sub which can take two arguments ought to be usable as an " | 01:26 | |
"operator" for a metaoperator? | 01:27 | ||
colomon kind of likes that idea.... | |||
colomon likes that idea much better than making a fmt operator | |||
sorear | colomon: github.com/perl6/std/commit/bd9fad832c | 01:28 | |
benabik | It works well for Haskell... x `func` y == fund x y | ||
sorear | someday I'm going to do something about the backlog of STD changes that haven't made it into niecza yet :/ | 01:30 | |
TimToady | you're supposed to be able to say [&fmt] as an infix, which I guess is already specced | 01:41 | |
er, wait, fmt is a method | |||
colomon | sorear, TimToady: That's awesome | 01:42 | |
sorear | I am not sure that ever made it into the synopses proper | 01:43 | |
fwiw | |||
TimToady | doesn't look like it | 01:44 | |
std: 42 [&atan2] 1 | |||
p6eval | std 30385f8: OUTPUT«ok 00:00 44m» | ||
TimToady | I guess it was just added to STD | ||
n: 42 [&atan2] 1 | 01:45 | ||
p6eval | niecza v19-1-gbd1bd16: OUTPUT«===SORRY!===Unable to parse bracketed infix at /tmp/dmhgZx_Zhk line 1:------> 42 [⏏&atan2] 1Couldn't find final ']'; gave up at /tmp/dmhgZx_Zhk line 1:------> 42 [&⏏atan2] 1Parse failed»… | ||
colomon | sorear: how hard / disruptive would it be for, say me, to just start importing changes from STD to niecza? | ||
sorear | colomon: the hardest part is keeping track of which changes need to be imported. :) | 01:46 | |
TimToady | or exported :) | ||
colomon | sorear: I was figuring on starting with a diff... | ||
sorear | colomon: importing that particular change should be quite trivial. | ||
pmichaud | ...deported? | ||
sorear | colomon: i'll just say that on the actions side you want to create an $OperatorFunction with arity 2 | 01:47 | |
and no preargs/postargs | |||
hmm, apparently '$' is silent to me | 01:48 | ||
01:52
stephenlb left
|
|||
TimToady | std: "%3s" [&sprintf] 42 | 01:54 | |
p6eval | std 30385f8: OUTPUT«ok 00:00 44m» | ||
pmichaud | btw, typos on STD.pm6:4967-4970? | ||
token metachar:sym<(?= )> { '(?:' <.obs("(?= ... ) for lookahead", "<?before ... >")> } | |||
should be | 01:55 | ||
'(?:' -> '(?=' | |||
(before the <.obs) | |||
std: / (?:xyz) / | 01:56 | ||
p6eval | std 30385f8: OUTPUT«Use of uninitialized value $x in pattern match (m//) at STD.pm line 66584.Use of uninitialized value $x in concatenation (.) or string at STD.pm line 66623.===SORRY!===Unsupported use of (?: ... ) for grouping; in Perl 6 please use [ ... ] at /tm… | ||
pmichaud | std: / (?=xyz) / | ||
p6eval | std 30385f8: OUTPUT«===SORRY!===Quantifier quantifies nothing at /tmp/jwa8BBOJT5 line 1:------> / (?⏏=xyz) /Unrecognized regex metacharacter = (must be quoted to match literally) at /tmp/jwa8BBOJT5 line 1:------> / (?=⏏xyz) /U… | ||
TimToady | I guess so | ||
pmichaud fixes | |||
dalek | d: fd2647b | pmichaud++ | STD.pm6: Typo fixes in obsolete P5 regex syntax detectors. |
01:57 | |
02:00
tyatpi left
|
|||
[Coke] | is there any way to introspect a character for unicode properties? | 02:01 | |
pmichaud | in a regex, or otherwise? | ||
I guess introspect implies "otherwise". I'm not aware of one. | |||
[Coke] | what about charname? | 02:03 | |
pmichaud | don't find 'charname' in the synopses | 02:04 | |
*I don't | |||
02:05
tomaw_ joined,
tomaw left
|
|||
pmichaud | and I don't think Parrot exposes a charname interface. We could add one to NQP, though. | 02:05 | |
sorear | n: use Unicode::UCD; say getprop('x', 'na') | 02:06 | |
p6eval | niecza v19-1-gbd1bd16: OUTPUT«Unhandled exception: Unable to locate module Unicode::UCD in @path at /home/p6eval/niecza/boot/lib/CORE.setting line 1402 (die @ 5)  at /home/p6eval/niecza/src/NieczaPathSearch.pm6 line 23 (NieczaPathSearch.load_module @ 17)  at /home/p6eval/niecza/sr… | ||
sorear | n: use Niecza::UCD; say getprop('x', 'na') | ||
p6eval | niecza v19-1-gbd1bd16: OUTPUT«===SORRY!===Q:CgOp not allowed in safe mode at /home/p6eval/niecza/lib/Niecza/UCD.pm6 line 4:------> { (ucd_get_ranges {$table} {$matcher}) ⏏}Q:CgOp not allowed in safe mode at /home/p6eval/niecza/lib/Niecza/UCD.pm… | ||
pmichaud | ...sigh, and then we have to ask "which name"? ;-) | 02:08 | |
sorear | 'na', not 'na1' | 02:09 | |
evalbot control restart | 02:11 | ||
02:11
p6eval left,
p6eval joined,
ChanServ sets mode: +v p6eval
|
|||
sorear | n: use Niecza::UCD; say getprop('x', 'na') | 02:11 | |
p6eval | niecza v19-1-gbd1bd16: OUTPUT«===SORRY!===Undeclared routine: 'getprop' used at line 1Unhandled exception: Check failed at /home/p6eval/niecza/boot/lib/CORE.setting line 1402 (die @ 5)  at /home/p6eval/niecza/src/STD.pm6 line 1147 (P6.comp_unit @ 37)  at /h… | 02:12 | |
02:13
ajs_home left,
ajs_home joined
|
|||
sorear | n: use Niecza::UCD; say value('na', "\x03BB") | 02:14 | |
p6eval | niecza v19-1-gbd1bd16: OUTPUT«GREEK SMALL LETTER LAMDA» | ||
sorear | n: use Niecza::UCD; say value('na1', "\x03BB") | ||
p6eval | niecza v19-1-gbd1bd16: OUTPUT«GREEK SMALL LETTER LAMBDA» | ||
sorear | pmichaud: what did you mean by "which name"? | ||
pmichaud | ICU offers several choices: UNICODE_CHAR_NAME, UNICODE_10_CHAR_NAME (obviously not this one), EXTENDED_CHAR_NAME, CHAR_NAME_ALIAS | 02:15 | |
so, for example, CHAR_NAME_ALIAS is the one that is corrected from NameAliases.txt | |||
sorear | n: use Niecza::UCD; say value('NameAlias', "\x03BB") | ||
p6eval | niecza v19-1-gbd1bd16: OUTPUT«Unhandled exception: NAMEALIAS does not exist as a UCD table at /home/p6eval/niecza/lib/Niecza/UCD.pm6 line 8 (get_value_num @ 5)  at /home/p6eval/niecza/lib/Niecza/UCD.pm6 line 20 (value @ 5)  at /tmp/Je6PjubW9D line 1 (mainline @ 4)  at /home/p6ev… | 02:16 | |
sorear | n: use Niecza::UCD; say value('Name_Alias', "\x03BB") | ||
p6eval | niecza v19-1-gbd1bd16: OUTPUT«Unhandled exception: NAMEALIAS does not exist as a UCD table at /home/p6eval/niecza/lib/Niecza/UCD.pm6 line 8 (get_value_num @ 5)  at /home/p6eval/niecza/lib/Niecza/UCD.pm6 line 20 (value @ 5)  at /tmp/GaBmuA5lBf line 1 (mainline @ 4)  at /home/p6ev… | ||
sorear | I think NameAliases.txt might only be supported in the reverse direction | ||
pmichaud | could be | 02:17 | |
u_charName() returns the "modern" name of a Unicode character; or the name that was defined in Unicode version 1.0, before the Unicode standard merged with ISO-10646; or an "extended" name that gives each Unicode code point a unique name. | |||
so yes, it looks like the corrected name isn't available (through this function) | |||
but we can get either the "modern" name or the "extended" one | |||
02:20
orafu left,
orafu joined
02:24
tokuhirom left,
tyatpi joined
02:30
awwaiid left
02:31
awwaiid joined
|
|||
colomon | sorear: hate to admit it, but I've got no idea how to add the action for [&function]. NieczaActions.pm6 method infixish? I'm off to bed in a moment, but any hints would be welcome. (Porting the grammar bit from STD seemed completely straightforward, on the other hand.) | 02:42 | |
sorear | yes, in infixish | 02:44 | |
colomon | I'm guessing $Operator.funop will be involved? | ||
sorear | yes | ||
colomon | would that part be as simple as $Operator.funop($/, function-name, 2); | 02:45 | |
sorear | check if $<infix> is actually a variable, then do_variable_reference and check_variable it | ||
colomon | like this bit? | 02:48 | |
make $Operator_Function.new(function => | |||
self.do_variable_reference($/, $<variable>.ast)); | |||
self.check_variable($<variable>); | |||
sorear | Yes. | ||
well, $<infix> | |||
because the parser fragment is <infix=.variable> | 02:49 | ||
colomon | instead of $<variable> | ||
sorear | Yes | ||
colomon | sigh. sorry for asking you to basically write it, but how do you check if $<infix> is a variable? | 02:50 | |
sorear | $<infix>.reduced eq 'variable' | 02:52 | |
or $<infix>.ast !~~ $Operator | |||
colomon | my first stab gave me this: | 02:55 | |
Excess arguments to Cursor.O, used 1 of 2 positionals | |||
I presume that's something to do with $¢.O(%additive) | |||
colomon should have gone to bed fifteen minutes ago... | 02:59 | ||
sorear | yeah, should be <O(|%additive)> | 03:02 | |
colomon | bother, different problem now. Will try to sort it out in the morning. | 03:05 | |
sorear++ | |||
sorear | does that ++ mean you got it working | ||
03:29
jaldhar_ left,
jaldhar_ joined
03:50
jaldhar_ is now known as jaldhar
04:02
tyatpi left
|
|||
moritz | \o | 04:18 | |
04:21
telex left
04:22
kaleem joined
04:23
telex joined
04:33
telex left
04:39
telex joined
04:59
fhelmberger joined
05:27
dukeleto left
05:31
leprevost left
05:40
birdwindupbird joined
05:42
dukeleto joined
05:44
cog_ joined
05:47
cog__ left
05:48
pupoque left
05:54
wtw joined
05:57
simcop2387 left
05:59
dukeleto left
06:00
simcop2387 joined
06:13
dukeleto joined
06:15
tyatpi joined
06:19
tyatpi left
06:20
pupoque joined
06:49
birdwindupbird left
07:04
larks left
07:06
alvis` joined,
bruges_ joined,
revdiablo left,
bruges left,
driador left,
alvis left,
yves_ left,
rsimoes left,
apejens left,
Tene left,
driador joined
07:09
apejens joined,
revdiablo joined
07:10
brrt joined
07:11
rsimoes joined,
Tene joined
07:17
birdwindupbird joined
07:20
yves_ joined
|
|||
dalek | kudo/nom: ed46bdb | pmichaud++ | src/ (2 files): METAOP_REDUCE -> METAOP_REDUCE_LEFT |
07:22 | |
kudo/nom: 46dacb9 | pmichaud++ | src/Perl6/Actions.pm: Refactor determination of reduction type for base operator. |
|||
kudo/nom: 433956d | pmichaud++ | src/ (2 files): Refactor to pass reduction type to CROSS and ZIP metaoperators. |
|||
kudo/nom: b639af6 | pmichaud++ | src/core/metaops.pm: Update METAOP_ZIP to honor associativity of the base operator. |
|||
kudo/nom: 5e3dfe9 | pmichaud++ | src/core/metaops.pm: Update METAOP_CROSS to honor associativity of the base operator. |
|||
07:24
kresike joined
|
|||
kresike | good morning all you happy perl6 people | 07:25 | |
07:25
[particle]1 joined
|
|||
moritz | \o kresike | 07:25 | |
kresike | moritz, o/ | 07:26 | |
07:26
larks joined
07:29
[particle] left
|
|||
brrt | kresike: i like your greeting | 07:30 | |
kresike | brrt, then you must be a happy perl6 person :) | 07:32 | |
brrt | i'm a happy parrot person at the moment, but close enough :-) | ||
07:33
pochi left
|
|||
moritz | :-) | 07:33 | |
kresike | the most important thing is that one's happy about something, the reason is secondary. | ||
to be honest, I borrowed that greeting from Droopy :) | 07:35 | ||
jnthn | good morning o/ | ||
kresike | hello jnthn o/ | ||
07:35
dylanwu left
|
|||
jnthn | ooh, pmichaud++ has been apatchin' | 07:35 | |
kresike | jnthn, what does the Q stand for in QAST, QRegex ... ? | 07:37 | |
jnthn | P++ | ||
;) | |||
moritz | Quantum! | ||
jnthn | r: say "P"++ | ||
p6eval | rakudo 1ffd6c: OUTPUT«Cannot assign to a non-container in sub postfix:<++> at src/gen/CORE.setting:1344 in block <anon> at /tmp/Kea0XOGr6c:1» | ||
jnthn | oops | ||
moritz | r: say 'P'.succ | ||
p6eval | rakudo 1ffd6c: OUTPUT«Q» | ||
jnthn | r: say "P".succ | ||
p6eval | rakudo 1ffd6c: OUTPUT«Q» | ||
jnthn | kresike: You can see it as a prefix to let you know "this is fairly new" :) | ||
kresike | jnthn, I figured as much, but does it involve some new idea or algorithm, or it's just a new and better implementation ? | 07:39 | |
moritz | there are lots of new ideas that make it a new and better implementation :-) | ||
kresike | hmmm, that came out redundant ... | ||
moritz | it's not a whole new paradigm | ||
it's mostly a rework to incorporate stuff that was missing in the previous model, and hard to add later on | 07:40 | ||
and it takes advantage of 6model, our newish object storage system | |||
07:40
pochi joined
|
|||
moritz | which, we hope, will reduce memory usage | 07:40 | |
jnthn | kresike: PAST (which QAST is replacing) is one of the oldest pieces of our compiler toolchain. It's served us pretty well, but we've learned a lot in those years, and have some things we simply didn't know would exist back then. | ||
Also PAST is written in PIR. Maintaining complex stuff in an assembly language is not so productive. | 07:41 | ||
So it's a port to NQP plus improvements plus making it better integrate with 6model and bounded serialization. | |||
kresike | I see | ||
jnthn | hmm...open doesn't take :$enc for what encoding to read the file in... | 07:42 | |
07:42
tomaw_ is now known as tomaw
|
|||
moritz | jnthn: shouldn't be too hard to change | 07:42 | |
there's already a call to $!PIO.encoding | |||
jnthn: we have a sub PARROT_ENCODING that maps from normal names to parrot encoding name | 07:43 | ||
s | |||
trying a patch now | 07:45 | ||
jnthn++ # dddx blog post | |||
blog.edument.se/2012/06/26/insights...12-part-1/ for those who don't twitter. (Not Perl 6 related, just general software engineering practise) | 07:46 | ||
jnthn: the part about delaying decisions kinda parallels the reasons for bottom-up building -- it delays the higher level design decisions | 07:47 | ||
07:47
thou left
|
|||
jnthn | Curious to see my other life leaking into #perl6 ;) | 07:50 | |
My reason for asking about $encoding is I'm faced with a bunch of latin-1 files here at $dayjob... | |||
moritz | well, there's another leak :-) | 07:51 | |
phenny: en nb "a year"? | 07:52 | ||
phenny | moritz: "et år" (en to nb, translate.google.com) | ||
moritz | now I have a test case for writing latin-1 stuff :-) | ||
moritz on a system without a compose key :/ | |||
07:52
brrt left
07:53
brrt joined
|
|||
moritz | gah, I only patched the method form of open(), not the sub :/ | 07:54 | |
jnthn | moritz++ | 07:58 | |
meeting & | |||
moritz | phenny: U+00E5 | 08:02 | |
.u U+00E5 | |||
phenny | moritz: Sorry, no results | ||
moritz | .u E5 | ||
phenny | moritz: Sorry, no results for 'E5'. | ||
dalek | kudo/nom: 88a9d69 | moritz++ | / (2 files): add :enc/:encoding support to &open |
08:06 | |
moritz | jnthn: there you go; my initial test was succesful | ||
to all the lurkers that have feature requests: voice them. Tell us. Some of them are easy to do | 08:07 | ||
08:13
sudokode left
|
|||
kresike | we would, but we're afraid :) | 08:16 | |
moritz | don't be. I promise we won't eat you. | ||
jnthn | omnomnom users | ||
moritz feeds jnthn with patches instead | 08:18 | ||
jnthn | another meeting... will try it in a moment | ||
moritz | no hurry | 08:19 | |
08:40
dakkar joined
08:57
dukeleto left
|
|||
dalek | ast: 5d689e8 | moritz++ | S06-signature/slurpy-and-interpolation.t: test arglist interpolation of ranges, RT #113804 |
08:59 | |
ast: c8b1ef4 | moritz++ | S04-declarations/constant.t: RT #112116, constant, hashes and map |
09:05 | ||
09:10
dukeleto joined
|
|||
jnthn | eek, I was using dir... | 09:14 | |
though | |||
for dir($path) -> $name { | |||
given "$path/$name" { | |||
when :f { | |||
I wonder if that gets simpler now... | |||
moritz | for dir($path) -> $io { when .f { ... } } | 09:15 | |
dalek | ast: d1355fd | moritz++ | S06-operator-overloading/sub.t: fix two operator overloading tests, unfudge one for rakudo |
09:17 | |
masak | so it does get simpler. that's a relief. | 09:18 | |
jnthn | No | 09:20 | |
Everythign else gets worse :( | |||
I actually only want the unqualified path part of the name in a bunch of plaes | |||
And to do regex matches and .index on it and so on | |||
And guess what? IO ain't Cool. | 09:21 | ||
So I have to .Str everywhere. | |||
So for my use case, dir returning IO is vastly worse. | |||
moritz | that's ugly | ||
jnthn | Having looked at a real word use of dir, my only feeling is, "revert please". | ||
It's theoretically righter. | |||
But practically wronger. | |||
*real world | 09:22 | ||
moritz | but for other use cases (like file handles) it would be wrong to make IO Cool | ||
jnthn | Right. | ||
moritz | ok, let's revert | ||
jnthn | Well, I'm happy to hear countr-arguments. | ||
But my gut feeling is, "ouch" | |||
hmm, though one place gets a bit nicer | 09:24 | ||
Hmm | |||
Hre's a before/after example on one snippet | 09:27 | ||
gist.github.com/4870f14c5f384e663daa | |||
09:28
daxim joined
|
|||
jnthn | And really ugly | 09:28 | |
my $fh = open($dir_item.Str, :enc('latin-1'), :r); | |||
I have to .Str it there | |||
.O | |||
o.O even | |||
moritz | hm, we could make the filename optional in IO.open | 09:29 | |
jnthn | $dir_item.open(:enc...) didn't work | ||
moritz | yes, but could be made to work | ||
jnthn | .oO( I don't get to be a whiney user very often...this is fun! :P ) |
09:30 | |
moritz | now if we had a class IO::File is IO is Cool { } returned from &dir, and you could call .file on it to get the file name only (not full path), and which also .Str's to that, and you could call .open on it... | 09:31 | |
jnthn | Right. | ||
09:31
immortal left
09:32
erkan joined
|
|||
jnthn | It feels quite clear to me now that we need to separate out these two concepts. | 09:32 | |
Actual file handles being Cool feels wrong. But whatever dir returns really wants to be. | |||
moritz | moritz.faui2k3.org/tmp/0001-Revert-...-dir.patch # if we don't come up with something better | ||
right, maybe it shouldn't inherit from IO at all | 09:33 | ||
jnthn | Or that. | ||
moritz | otoh it feels very convenient to be able to call .f, .s etc. on it | 09:34 | |
so, common role? | |||
IO::FileTests, and both IO and IO::File do that role? | |||
jnthn | That's starting to feel better | 09:35 | |
moritz | r: say $*IN.f | ||
p6eval | rakudo 88a9d6: OUTPUT«False» | ||
moritz | r: say $*IN.s | ||
p6eval | rakudo 88a9d6: OUTPUT«False» | ||
moritz | r: say ".gitignore".IO.s | ||
p6eval | rakudo 88a9d6: OUTPUT«True» | ||
moritz | erm | ||
r: say ".gitignore".IO.size | 09:36 | ||
p6eval | rakudo 88a9d6: OUTPUT«No such method 'size' for invocant of type 'IO' in block <anon> at /tmp/mdPL7aDefK:1» | ||
moritz | r: say ".gitignore".IO.bytes | ||
p6eval | rakudo 88a9d6: OUTPUT«No such method 'bytes' for invocant of type 'IO' in block <anon> at /tmp/oUM5s7D5xp:1» | ||
moritz | thing is | 09:37 | |
whatever objects &dir returns, we should think hard about what its .lines method should return | |||
if it's Cool, people will expect it to do the same as Str.lines | |||
so we shouldn't allow reading from it directly | 09:38 | ||
but allow an .open(*%opts) which returns an IO from which you can read | |||
jnthn | moritz: :$enc helped lots, btw. \o/ | 09:43 | |
09:43
odoacre left
|
|||
moritz | jnthn: good to hear | 09:46 | |
jnthn | Well, just updated the big script with it and dir now...let's see how that works out | 09:49 | |
09:51
odoacre joined
09:56
mucker joined
10:05
cognominal joined,
cog_ left
10:09
sergot joined
|
|||
sergot | hi o/ ! | 10:09 | |
kresike | hello sergot o/ | 10:11 | |
masak | sergot! \o/ | 10:13 | |
jnthn++ moritz++ # I like where this is going | |||
10:22
scott_ left
10:30
JimmyZ_ joined
10:50
tyatpi joined
|
|||
tadzik | \o/ | 10:56 | |
jnthn | Yeah, le other more complex script is working out far better now too. | ||
Oh, apart from I did a silly bug that makes the analysis useless... | |||
moritz | l'other or l'autre please :-) | ||
jnthn | :P | 10:57 | |
10:57
snearch joined
|
|||
jnthn corrects it and sets it off again | 10:58 | ||
11:01
cog_ joined
|
|||
moritz | jnthn: do paths like ./foo/bar.txt work under windows? | 11:03 | |
ie if I feed them to open() | |||
parrot's open, that is :-) | |||
11:03
cognominal left
|
|||
dalek | kudo/io: cc780c2 | moritz++ | src/core/IO.pm: move file tests to IO::FileTestable |
11:22 | |
moritz | l'experiment avec &dir based on this branch: gist.github.com/3003456 | 11:23 | |
jnthn, masak, pmichaud: ^^ see above, feedback welcome | |||
masak | (l'other)++ # :P | ||
moritz | it tries to to DWIM without exaggerating | 11:24 | |
masak looks, interested | |||
moritz | maybe I should add an .IO coercion method | ||
masak | "IO::File<$.path>" # nice | ||
moritz | r: say Buf.new(1, 2, 244) | 11:25 | |
p6eval | rakudo 88a9d6: OUTPUT«Buf:0x<01 02 f4>» | ||
moritz | same idea | ||
masak | waitwait, so then we would have IO and IO::File? | ||
moritz | yes | ||
masak | hmmmrm. | ||
that might be the only detail I dislike slightly. | |||
kresike | moritz, while you're at it maybe it would be nice to have an IO::Dir class too | ||
this way masak can have two things to dislike | 11:26 | ||
moritz | kresike: maybe | ||
kresike: i'll probably experiment with it | |||
masak: maybe we should rename IO to IO::Handle or so | |||
kresike | it makes sense because files can be opened while dirs cannot. | ||
among other things | 11:27 | ||
moritz | kresike: one could also just add an .opendir or .dir method to IO::File | ||
masak | moritz: +1 | ||
moritz | kresike: note that IO::File has an .open method even thought it could be a directory right now | ||
*though | |||
kresike | moritz, yes, I think that's wrong | 11:28 | |
unless you think of a directory like vim does, and when you open it, gives you a list of files contained within as content | 11:29 | ||
moritz | kresike: I agree that it's wrong from a theoretical point of view | ||
kresike: but in practise we often have methods that cause an error when used | |||
compare (-2).sqrt for example | |||
so, the question is, does it make sense from a user's perspective? | 11:30 | ||
I could further imagine that we have an IO::Path does IO::FileTestable | |||
kresike | moritz, the question is, are files and directories different enough to create a new class for each of them ? | ||
moritz | and then IO::File and IO::Dir, which both do IO::Path | 11:31 | |
kresike: correct | |||
I guess I'll experiment with it | |||
bikeshedding didn't get us very far until now; I think experiments and use cases are the best approach | 11:32 | ||
kresike | IO::Path feels a little overkill to me, I'd add IO::File.basename, IO::File.path and IO::File.name | ||
moritz | well, /if/ we separate file and dir into separate types, then we should also have a common type for path handling, which IO::Path would be | 11:33 | |
if you think that having all three of Path, File and Dir is too much, we should probably just have one of them | |||
kresike: IO::File.file is what you would call basename | |||
maybe it's better to rename file to basename though | 11:34 | ||
kresike | well to me basename means the file name because I'm a *nix user, doesn't mean I'm right about it | ||
moritz | on a different tangent, one reason for having 'IO' instead of 'IO::Handle' was to have short file tests a la $str.IO ~~ :e | 11:35 | |
kresike | you are right about the Path, File and Dir, Path should be an ancestor of the previous two | ||
s/previous/other/ | |||
moritz | if we rename it to IO::Handle, then we have to think of another way to do that | ||
kresike: agreed (though I'm currently inclined to do with roles instead of classes; not sure if/how much that matters) | 11:36 | ||
kresike | iiuc roles are a kind of abstract class | 11:37 | |
moritz | not quite | 11:38 | |
roles and classes are much alike, except that role composition forces you to resolve method name conflicts | |||
whereas with classes and inheritance, one of them just wins | |||
eiro | masak, jnthn did you sent me the price of your flight ? | 11:39 | |
kresike | I see | ||
eiro | (i'm afraid i lost the info) | ||
kresike | then I don't think it makes sense to use roles, since the Path of a File is very similar to that of a Dir | ||
moritz | kresike: you *can* get role semantics similar to Java's interfaces, but that's not how I mean to use them | ||
a more interesting question is: will you ever instantiate an IO::Path without making it a File or a Dir? | 11:40 | ||
the answer is probably "yes", because you might want to create path names without looking at the file system to see if it's a plain file or a directory | 11:41 | ||
that means it should probably a class | |||
arnsholt | We'll definitely want to be able to represent a file path without considering the existence or type of that file, I think | 11:42 | |
kresike | moritz, think of a filesystem as a cloud, that backs up making Path a class too | ||
frettled | Sounds nebulous to me. ;) | 11:44 | |
kresike needs to look up the differences between roles and classes in p6 | 11:47 | ||
11:49
cj left
11:52
k0ala joined
11:59
k0ala left
|
|||
moritz | gist.github.com/3003456#file_dir_split_up.pl # another version | 12:04 | |
12:11
k0ala joined
|
|||
moritz | that feels a bit more "engineered", I'm having trouble to decide whether that's a plus or a minus | 12:15 | |
pmichaud | good morning, #perl6 | 12:17 | |
kresike | moritz, on second thought is there a use case when either File or Dir would override any of Path's methods ? | 12:18 | |
moritz | kresike: well, IO::Dir might override method d { True } | 12:19 | |
kresike: or some such | |||
kresike | but that's Filetestable's job | ||
12:19
snearch left
|
|||
kresike | I mean Dir is in fact overriding a method of Filetestable | 12:20 | |
masak | eiro: we're going by train, at least on the way there. jnthn has the details. | ||
12:20
not_gerd joined
|
|||
kresike | oh wait, Filetestable is a role | 12:20 | |
not_gerd | hello, #perl6 | ||
moritz | kresike: currently I'm not aware of any overriding, but I wouldn't trust it to stay that way | ||
\o not_gerd | |||
kresike | my bad :) | 12:21 | |
moritz | kresike: but that doesn't matter too much; the role is alreday flattened out in IO::Path | ||
good am, pm | |||
not_gerd | moritz: S32/IO already specs things like File, Directory, Path | ||
I take it the draft is obsolete? | 12:22 | ||
moritz | pmichaud: you might be interested in gist.github.com/3003456 (two different approaches to &dir that both dwim, with varying degrees of engineering behind it; needs the 'io' branch of Rakudo for IO::FileTestable) | ||
not_gerd: I should read S32/IO again, but I usually mistrust that synopsis | |||
eiro | masak, train ? from sweden ? | 12:23 | |
moritz | not_gerd: it's not a coherent picture. People have added their favorite parts to some roles/classes without considering the big picture, and others have split up classes in multiple classes and roles without thinking through how it all works out | 12:24 | |
eiro | train+boat then ? | ||
masak | eiro: aye. | ||
no, not boat. | |||
we have a bridge. | |||
moritz | isn't there a bridge (over troubled water)? | ||
kresike | moritz, my point is, I can't think of a reason why Path cannot be a role, since it has to do the same things for File and for Dir too | ||
masak | the water ain't so troubled. | ||
eiro | OMFG! it must be a giant one | ||
pmichaud | moritz: looking | 12:25 | |
moritz | kresike: the class/role distinction is really minor at this point, and easily changable the other way if we get it wrong now. I'd rather not spent too much time on this point right now | ||
12:25
kaleem left
|
|||
kresike | moritz, right | 12:25 | |
eiro | masak, jnthn are your at Strasbourg Sunday? i'm planning a "flamekuche party" at hope | 12:26 | |
not_gerd | moritz: it's not all bad, but indeed there are some rough edges (Readable.read returns a new Buf on each read oO) | ||
eiro | home | ||
not_gerd | it lies as well: C89 does not specify integer file descriptors | 12:27 | |
moritz | also it uses camelCase method names, which no other part of Perl 6 does | 12:28 | |
arnsholt wonders how floating point fds would work | |||
moritz | arnsholt: fractionally | ||
arnsholt | Random selection of bytes from the integer numbered files, weighted by the position between the two perhaps ^_^ | 12:29 | |
12:29
Pleiades` left
|
|||
moritz | not_gerd: more to the point, it misses some crucial bits of information | 12:30 | |
not_gerd: like, what kind of object does open() return? | |||
not_gerd | moritz: IO? | 12:31 | |
moritz | =head2 IO | ||
The base role only tags that this is an C<IO> object for more generic | |||
purposes. It doesn't specify any methods or attributes. | |||
sounds like not specific enough for me | |||
if it returns an IO in the sense of S32/IO, you can do *nothing* with it | 12:32 | ||
not_gerd | I'm confused... - what about all the methods under that heading? | ||
moritz | they are in IO::Redable, IO::Writable etc. | ||
not_gerd | moritz: not according to what I'm reading | ||
moritz | and that's the real problem: there are scattered bits and pieces, but they don't fit together | 12:33 | |
pmichaud | I'll have to catch up on the &dir and IO discussion in a little while; still doing morning household chores here | ||
moritz | not_gerd: then maybe we're reading different documents? | ||
anyway, decommute now, will be available for discussion later | 12:34 | ||
& | |||
12:35
dukeleto left
|
|||
pmichaud | r say (1,2,3 Z, 4,5,6 Z, 7,8,9).perl # testing RT #113800 | 12:35 | |
r: say (1,2,3 Z, 4,5,6 Z, 7,8,9).perl # testing RT #113800 | |||
p6eval | rakudo 88a9d6: OUTPUT«((1, 4, 7), (2, 5, 8), (3, 6, 9)).list» | ||
pmichaud | \o/ | ||
afk, errands | |||
12:42
Pleiades` joined
12:43
kaleem joined
12:48
dukeleto joined
12:54
odoacre left
12:57
PacoAir joined
12:58
JimmyZ joined
12:59
JimmyZ_ left
13:01
k0ala is now known as thilp
13:02
mucker left
13:07
cognominal joined
13:10
cog_ left,
Psyche^ joined
13:11
Patterner left,
Psyche^ is now known as Patterner
13:12
tyatpi_ joined
13:14
[particle]1 left
13:15
[particle] joined
13:16
kaleem left
13:17
bluescreen10 joined
13:18
kaleem joined
13:24
driador left,
driador joined
|
|||
eiro | masak, jnthn i have to know for sunday: i'll go buy the stuff in a hour | 13:33 | |
13:35
atrodo joined
13:38
thilp left
|
|||
masak | that's a bit of a short notice. I'd give you the details but I don't have them. | 13:45 | |
I know we'll be going home on the Sunday but I don't know when. | 13:46 | ||
probably early-ish. | |||
hope that's enough. | |||
not_gerd | bye, #perl6 | 13:48 | |
13:48
not_gerd left
13:55
thilp joined
|
|||
eiro | masak, ok i'll buy enought for you, hope you'll be there | 13:55 | |
13:57
fgomez left
13:59
JimmyZ left
14:00
JimmyZ joined
|
|||
masak | I hope so to, but I think it might be too time-constrained. | 14:02 | |
eiro | i understand | 14:07 | |
14:22
fgomez joined
14:24
kaleem left
14:27
arlinius joined
14:29
fglock left,
hoelzro joined
14:30
fglock joined
|
|||
jnthn | I don't have the times to hand for our train, but I know we'll be heading of relatively early on Sunday. | 14:30 | |
14:33
mikemol joined
|
|||
TimToady dislikes camelCase | 14:36 | ||
14:36
thilp left,
Slacky joined
14:37
thilp joined
14:41
vmspb joined
|
|||
jnthn | masak: The boat bit is true. Our train drives onto a boat, and then is transported from Denmark to Germany. They're gonna build a tunnel there by 2017 or something... | 14:44 | |
arnsholt | Laziness truly is a virtue: thecodelesscode.com/case/29 | 14:47 | |
14:49
thou joined
14:57
wtw left
|
|||
jnthn | decommute & | 14:57 | |
15:00
fgomez left
15:13
szabgab joined
|
|||
szabgab | hi | 15:13 | |
moritz | \o szabgab | ||
Slacky | hi szabgab | ||
moritz | jnthn: I remember that boat trip. Train on a ferry is quite a nice thing IMHO :-) | ||
szabgab | I am trying to get away from most of IRC but it is quite hard with perl 6 :) | ||
sisar | arnsholt: the whole series is fun to read :) | 15:14 | |
moritz | iirc Puttgarden is one of the endpoints | ||
szabgab | I wonder if it would be ok with you guys if I started to post question on the mailing list ? | ||
and if it is ok, which one should I use? | |||
moritz | szabgab: sure, and I'll try to answer them | ||
arnsholt | sisar: Yeah, I just read the whole thing | ||
szabgab | [email@hidden.address] ? | ||
arnsholt | The testing one especially struck me as Perlish | 15:15 | |
moritz | szabgab: depends on your questions, but [email@hidden.address] if you don't know for sure | ||
sisar | arnsholt: thanks for bringing it to my notice. | ||
moritz | perl6-compilers when asking about rakudo or niecza | ||
szabgab | ok, I'll start with perl6-users as that's my POV and let me know if some question would be better discussed on the other perl6-complers list, I think I am on both | 15:16 | |
moritz | szabgab: ok; both are pretty low volume, so it doesn't matter too much | 15:17 | |
15:17
birdwindupbird left
|
|||
szabgab | Let's hope that generating some volume there is good for perl6 :) | 15:19 | |
15:20
hoelzro is now known as hoelzro|away
|
|||
szabgab | bye& | 15:20 | |
15:20
szabgab left
15:26
alester joined
15:28
JimmyZ left
15:29
mikemol_ joined
15:31
mikemol left,
dukeleto left
|
|||
jnthn home | 15:36 | ||
15:36
fglock left
|
|||
jnthn | moritz: Yes, Lubeck to Puttgarden :) | 15:36 | |
dalek | kudo/parrot-iocleanup1: d0dc2d3 | moritz++ | src/core/IO/Socket/INET.pm: explicitly set encoding on sockets |
15:40 | |
15:45
dukeleto joined
15:48
skids left
15:49
cog_ joined,
spider-mario joined
|
|||
dalek | ecs: 10d772f | larry++ | S03-operators.pod: Document [&func] form of infix |
15:50 | |
vmspb | Hello | 15:51 | |
prn: say [-](); say [-](1) | |||
p6eval | rakudo 88a9d6, niecza v19-1-gbd1bd16, pugs: OUTPUT«01» | ||
vmspb | [-](i) should be equal to (i) or (0 - i)? It falls out of the system. | ||
prn: say [~]() == ''; say [*]() == 1; say [+]() == 0; say [-]() == 0; | |||
p6eval | rakudo 88a9d6, niecza v19-1-gbd1bd16: OUTPUT«TrueTrueTrueTrue» | ||
..pugs: OUTPUT«1111» | |||
15:51
cognominal left
|
|||
vmspb | prn: say [~](1) == '' ~ 1; say [*](2) == 1 * 2; say [+](3) == 0 + 3; say [-](4) == 0 - 4; | 15:51 | |
p6eval | rakudo 88a9d6, niecza v19-1-gbd1bd16: OUTPUT«TrueTrueTrueFalse» | ||
..pugs: OUTPUT«111» | |||
TimToady | while an argument could be made for such behavior, reduction on non-commutative ops is rather non-sensical to begin with | 15:53 | |
and you can always add the 0 explicitly if you want the other behavior | 15:54 | ||
dalek | ar: 5138e08 | moritz++ | skel/docs/announce/2012.06: fiddle a bit with the release announcement |
||
15:54
sergot left
|
|||
moritz | ok, if nobody objects I'll release star tomorrow | 15:55 | |
TimToady | plus returning the first arg when there's only one works for reductions on operators that have no meaningful identity value | ||
15:56
fgomez joined
15:57
jaldhar left
15:59
Slacky left
|
|||
kresike | bye all | 16:00 | |
16:00
kresike left
16:04
brrt left
16:11
sergot joined
16:13
MayDaniel joined
|
|||
sorear | good * #perl6 | 16:18 | |
TimToady | o/ | 16:20 | |
sorear: is there any way to get a list of available UCD tables? | |||
unidata is kinda opaque... | 16:21 | ||
sorear | TimToady: not at the moment from within niecza; you may have better luck with github.com/sorear/multi-language-u...ucd-xml.pl | 16:26 | |
TimToady | thanks | ||
cxreg | as someone who never really learned BNF in depth, is there a post any where that compares it to perl 6 grammars? | 16:28 | |
diakopter | what's a domirrror | ||
cxreg | if not, i may have to learn enough to write one, because i think that would be useful | 16:29 | |
16:32
mikemol_ left
|
|||
dalek | ast: 9ab47bb | pmichaud++ | S03-metaops/zip.t: Add tests for proper list associativity with Z, (RT #113800). |
16:33 | |
moritz | r: say (<a b c> Z <d e f> Z <g h i>).perl | ||
p6eval | rakudo 88a9d6: OUTPUT«(("a", "d", "g"), ("b", "e", "h"), ("c", "f", "i")).list» | ||
sirrobert | Do perl6 modules need to end true? (1;) | ||
moritz | no | 16:34 | |
masak | sirrobert: no. | ||
sirrobert | great =) | ||
moritz | it was even an anachronism in p5, IMHO | ||
16:34
thilp left,
daxim left
|
|||
masak | "was"? :) | 16:34 | |
moritz | if you wanted the compilation to fail, you simply die()d | ||
well, it was 10 years ago | |||
and stil is :-) | |||
so, "has been rather" | |||
sirrobert | btw, someone (moritz?) requested I blog about adopting perl6 for my business. You can see it (in it's 1-post glory) at 6ing.wordpress.com/ | 16:35 | |
masak | what's the use case for wanting the compilation to fail? | ||
sirrobert++ | |||
moritz | masak: I dunno, maybe if you want to load a data file at compile time, and it can't find that file, die? | ||
but then it dies anyway | |||
sirrobert++ | 16:36 | ||
masak | "design for semantic compression at the cost of syntactic compression" # nice! | 16:39 | |
sirrobert | =) | 16:40 | |
moritz | sirrobert: thank you for that blog post, it's really nice | ||
sirrobert | you're welcome =) | ||
moritz subscribes to the RSS feed | 16:41 | ||
sirrobert | What's the irc command to do that? | ||
* sirrobert whatever. | |||
benabik | It's `/me whatever.` | 16:42 | |
benabik whatever. | |||
sirrobert | ok: | ||
sirrobert is curious how his CTO will respond when he comes back from vacation =) | |||
moritz | sirrobert: to you blogging, or to you chosing p6? :-) | 16:43 | |
sirrobert | p6 | ||
masak | sirrobert: really curious about hearing more about your adventures in Perl 6 land. | ||
sirrobert | me too. I posted a bug report the other day | ||
a problem parsing grammars. | |||
16:44
mucker joined
|
|||
masak | nice. | 16:44 | |
moritz | ah, the one about implicit <.ws> mishandling? | ||
sirrobert | apparently: rule { ^ <foo> $ } parses differently than: rule {^ <foo> $} | ||
yeah | |||
masak | yeah, that's wrong. | ||
jnthn | That used to be how it was spec'd to. | ||
sirrobert | huh | ||
jnthn | Until fairly recently. | ||
pmichaud | fixing that one is on my todo list :) | 16:45 | |
jnthn totally agrees with the spec change though :) | |||
moritz wonders if it's as easy adding an s* somewhere | |||
jnthn | No :) | ||
moritz | :( | 16:46 | |
jnthn | Well, maybe, but they you discover that NQP's and Rakudo's grammars rely on the current semantics. | ||
sirrobert | I tried a lot of variations of \s* | ||
moritz | sirrobert: I mean, insides the regex parser | ||
which is, I might add, surprisingly short | 16:47 | ||
sirrobert | oh | ||
pmichaud | I can work on that one now, a bit. | ||
sirrobert | thanks =) | 16:48 | |
TimToady | r: constant @t = [\+] 1..5; say (0,@t Z^.. @t).perl; | ||
p6eval | rakudo 88a9d6: OUTPUT«(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15).list» | ||
TimToady | that one still doesn't produce sub-parcels | ||
pmichaud: ^^ | |||
jnthn | r: my @t = [\+] 1..5; say (0,@t Z^.. @t).perl; | ||
p6eval | rakudo 88a9d6: OUTPUT«(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15).list» | ||
jnthn | OK, and constant ain't to blame this time :) | 16:49 | |
masak submits rakudobug | |||
pmichaud | TimToady: okay, looking. | ||
TimToady | probably Range behaving insufficiently like a Parcel somewhere | ||
16:50
kaare_ joined
|
|||
pmichaud | r: my @t = [\+] 1..5; say @t.perl | 16:50 | |
p6eval | rakudo 88a9d6: OUTPUT«Array.new(1, 3, 6, 10, 15)» | ||
pmichaud | r: my @t = [\+] 1..5; say (0,@t Z~ @t).perl | ||
p6eval | rakudo 88a9d6: OUTPUT«("01", "13", "36", "610", "1015").list» | ||
pmichaud | r: my @t = [\+] 1..5; say (0,@t Z, @t).perl | 16:51 | |
p6eval | rakudo 88a9d6: OUTPUT«((0, 1), (1, 3), (3, 6), (6, 10), (10, 15)).list» | ||
pmichaud | r: my @t = [\+] 1..5; say (0,@t Z.. @t).perl | ||
p6eval | rakudo 88a9d6: OUTPUT«(0, 1, 1, 2, 3, 3, 4, 5, 6, 6, 7, 8, 9, 10, 10, 11, 12, 13, 14, 15).list» | ||
pmichaud | okay, I can look at it. | ||
16:51
aloha left
16:52
thilp joined
|
|||
TimToady | n: constant @t = [\+] 1..5; say (0,@t Z^.. @t).perl; | 16:53 | |
p6eval | niecza v19-1-gbd1bd16: OUTPUT«(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15).list» | ||
TimToady | n: constant @t = [\+] 1..5; say (0,@t Z^.. @t)[3].perl; | ||
p6eval | niecza v19-1-gbd1bd16: OUTPUT«6^..10» | ||
TimToady | niecza has a similar difficulty somewhere | 16:54 | |
also, doesn't have .lol yet | |||
16:54
sudokode joined
|
|||
TimToady | r: constant @t = [\+] 1..5; say (0,@t Z^.. @t).lol[3].perl; | 16:56 | |
p6eval | rakudo 88a9d6: OUTPUT«Any» | ||
TimToady | and rakudo's .lol doesn't lol it right either | ||
pmichaud | it looks like some premature flattening in the Z metaop, to me. | 16:57 | |
16:57
GlitchMr joined
|
|||
sirrobert | lunch | 16:57 | |
pmichaud | r: say ((1,2) Z.. (3,4)).perl | ||
p6eval | rakudo 88a9d6: OUTPUT«(1, 2, 3, 2, 3, 4).list» | ||
TimToady | but then why would lol return Any? | ||
16:58
aloha joined
|
|||
pmichaud | not sure | 16:58 | |
TimToady | r: constant @t = [\+] 1..5; say (0,@t Z^.. @t).lol[0].perl; | ||
p6eval | rakudo 88a9d6: OUTPUT«ListIter.new()» | ||
TimToady hates it just about every time he sees ListIter.new()... | 16:59 | ||
pmichaud | agreed; I haven't figured that one out yet either. | ||
TimToady | eager doesn't seem to help with that either | ||
pmichaud | basically, ListIter.new() is saying "something lazy here" | ||
also, I think when it shows up it's been itemized | |||
TimToady | r: constant @t = [\+] 1..5; say (0,@t Z^.. @t).lol[0].eager.perl; | ||
p6eval | rakudo 88a9d6: OUTPUT«(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15).list» | ||
TimToady | well, that time it helped | ||
pmichaud | I can at least get ListIter.perl to show when it's an item | 17:00 | |
TimToady | but .perl should probably consider itself eager, unless it can reproduce the ..* ish ness | ||
17:00
dakkar left
|
|||
masak | +1 | 17:00 | |
pmichaud | I haven't figured out what ListIter.perl should look like in that case, though. | 17:01 | |
I suppose I could get ListIter to perlify it's generator | 17:02 | ||
*its | |||
sisar | r: say $::; | 17:08 | |
p6eval | rakudo 88a9d6: OUTPUT«===SORRY!===ResizablePMCArray: index out of bounds!» | ||
sisar | oops :) | ||
n: say $::; | |||
p6eval | niecza v19-1-gbd1bd16: OUTPUT«Any()» | ||
sisar | std: say $::; | 17:09 | |
p6eval | std fd2647b: OUTPUT«ok 00:00 40m» | ||
jnthn | Hmm, I thought I fixed that issue once... | 17:12 | |
I've no idea what it actually means :) | 17:13 | ||
sisar too :) | |||
masak | jnthn: "index out of bounds" means the index was either larger than the last index of the array, or negative. now you know. :P | ||
jnthn | .oO( You can't just type shit and expect it to do something sensible! ) |
||
sisar | lol | ||
jnthn | masak: :P | ||
masak is so helpful | 17:14 | ||
jnthn | Some things never change. :) | ||
17:14
immortal joined,
immortal left,
immortal joined,
immortal left,
erkan left
|
|||
pmichaud | Looks like the Z^.. is an issue with gather/take | 17:19 | |
sisar | can someone add sirrobert++'s blog to planetsix.perl.org ? | ||
or teach me how to do that ? | 17:20 | ||
pmichaud | gist.github.com/3005502 # take is flattening the range | ||
17:21
erkan joined,
erkan left,
erkan joined
|
|||
pmichaud | either that or the list managing the gather is flattening it. | 17:21 | |
gist.github.com/3005523 # more detailed example | 17:22 | ||
jnthn | Hmm...gather/take and flattening sounds familiar... | 17:24 | |
(As in, I think we've had issues in this space before.) | |||
pmichaud | TimToady: ping | 17:25 | |
jnthn | hmm... rt.perl.org/rt3/Public/Bug/Display...?id=106986 | ||
But it's marked resolved. | |||
pmichaud | jnthn: that one involves scalar arrays | ||
the scalar part wasn't being preserved. | |||
jnthn | *nod* | 17:26 | |
17:28
vmspb left
|
|||
TimToady | pmichaud: pong | 17:32 | |
pmichaud | okay, I see where the problem with Z^.. is, and I'm not quite sure how to address it. | ||
Here's the fundamental issue: | 17:33 | ||
r: my @a = <x y>; my @l := gather { take @a; take @a; }; say @l.perl | |||
p6eval | rakudo 88a9d6: OUTPUT«("x", "y", "x", "y").list» | ||
pmichaud | the results of the take's are being flattened | ||
TimToady | yes, each take should result in a parcel, methinks | 17:34 | |
p: my @a = <x y>; my @l := gather { take @a; take @a; }; say @l.perl | 17:35 | ||
p6eval | pugs: OUTPUT«\("x", "y", "x", "y")» | ||
TimToady | n: my @a = <x y>; my @l := gather { take @a; take @a; }; say @l.perl | ||
p6eval | niecza v19-1-gbd1bd16: OUTPUT«("x", "y", "x", "y").list» | ||
TimToady | everyone else has the same problem | ||
pmichaud | if we do that, then take 1; take 1; would result in a list like ((1,), (1,)) | ||
I don't know that this would be a problem... but it would seem... weird. | |||
TimToady | well, scalars are allowed to be their own parcel in general | 17:36 | |
pmichaud | it's actually not an issue of scalarness (more) | ||
because 1..5 is a scalar | |||
17:36
dukeleto left
|
|||
pmichaud | unless you mean "scalar" as "non-interpolating" | 17:36 | |
TimToady | but something is treating it slurpily and flattening it | ||
pmichaud | sure, because Arrays and Ranges are Iterable, thus they interpolate in lists | 17:37 | |
TimToady | 1..5 works as a single arg when binding to a non-slurpy, so what's different here? | ||
17:37
sirrobert left
|
|||
TimToady | npr: sub foo($x) { $x.say }; foo(1..5) | 17:37 | |
p6eval | pugs: OUTPUT«12345» | 17:38 | |
..rakudo 88a9d6, niecza v19-1-gbd1bd16: OUTPUT«1..5» | |||
pmichaud | as a single arg we're referring to its Positional nature (which doesn't have anything to do with flattening) | ||
(if binding to a positional) | |||
I'll put it another way -- slurpiness isn't entering into it at all. | 17:39 | ||
TimToady | r: my @a = <x y>; my @l := gather { take @a; take @a; }; say @l.DUMP | ||
p6eval | rakudo 88a9d6: OUTPUT«List<1956749320>(:items(▶Mu), :nextiter(ListIter<1956749344>(:reified(▶Mu), :rest(RPA<1956749364>(GatherIter.new())), :list(List<1956749320>))))» | ||
pmichaud | add an 'eager' @l first | ||
to flatten out the GatherIter | |||
TimToady | r: my @a = <x y>; my @l := gather { take @a; take @a; }; say @l.eager.DUMP | ||
p6eval | rakudo 88a9d6: OUTPUT«List<-1931207599>(:items(RPA<-1931174844>(▶"x", ▶"y", ▶"x", ▶"y")), :nextiter(▶Mu))» | ||
pmichaud | r: my @a = <x y>; my @l := gather { take @a; take @a; }; @l.eager; say @l.DUMP | 17:40 | |
p6eval | rakudo 88a9d6: OUTPUT«List<-135657117>(:items(RPA<-135607960>(▶"x", ▶"y", ▶"x", ▶"y")), :nextiter(▶Mu))» | ||
pmichaud | the list resulting from the gather ends up looking like (@a, @a) | ||
when then interpolates the @a's whenever you start doing anything with them | 17:41 | ||
(because they're iterable) | |||
same thing for ranges -- the List resulting from the gather ends up being (1..4, 1..4) | |||
and since Range is iterable, it interpolates. | |||
TimToady | which is why the old version of S07 distinguished get from getarg | 17:42 | |
pmichaud | just to make sure we're on the same page, note that "interpolate" ne "flattens" | ||
TimToady | it needs to be possible to iterate a lol without flattening things like these | 17:43 | |
pmichaud | oh! | ||
TimToady | okay, interpolating | ||
pmichaud | so, gather needs to return a LoL, then? | ||
that doesn't feel right either | |||
because it won't flatten. | |||
TimToady | a parcel of parcels/things that can behave like parcels | ||
what we used to call "arguments" | |||
pmichaud | flattening is what happens (or doesn't happen) to parcels | 17:44 | |
Parcel !~~ Iterable, thus it doesn't interpolate by default, interpolation of a Parcel is "flattening" | |||
TimToady | how does the binder avoid this problem? | ||
pmichaud | the binder never has this problem -- it doesn't ever involve interpolation or flattening except when doing slurpies | 17:45 | |
TimToady | it still has to "iterate" the argument list somehow | ||
what that is doing is what we need to do for take and return values when fed to things like .lol or .perl | |||
"getarg" in the old-fashioned terms | 17:46 | ||
pmichaud | I think it's the gather that is interpolating, not the take | ||
the take is correctly returning things | 17:47 | ||
basically, each take is like a "getarg" | |||
17:47
aj7504 joined
|
|||
pmichaud | if I say "take 1..5" it gives me a single range | 17:47 | |
(unflattened, uninterpolate) | |||
gather then has to put that into a structure | |||
TimToady | so maybe gather is not being quite primitive enough | 17:48 | |
pmichaud | and that structure is what ends up interpolating | ||
TimToady | r: say (1..5, 2..7).perl | ||
p6eval | rakudo 88a9d6: OUTPUT«(1..5, 2..7)» | ||
pmichaud | r: say (1..5, 2..7).list.perl | 17:49 | |
p6eval | rakudo 88a9d6: OUTPUT«(1, 2, 3, 4, 5, 2, 3, 4, 5, 6, 7).list» | ||
pmichaud | that's the difference. :-) | ||
the fact that the return from gather is a List means it interpolates. | |||
TimToady | yes, so gather needs to de-listify itself somehow, I suppose | ||
pmichaud | ...but it can't really be a Parcel, unless we start adding laziness to Parcels. | ||
17:50
dukeleto joined
|
|||
TimToady | well, we just need a kind of list that doesn't flatten subparcels then | 17:50 | |
pmichaud | ....no | ||
we need a list that doesn't flatten Iterables | |||
we already have a list that doesn't flatten subparcels | |||
r: say ((1..5,), (2..7,)).list.perl | 17:51 | ||
p6eval | rakudo 88a9d6: OUTPUT«((1..5,), (2..7,)).list» | ||
pmichaud | I have to leave in 2 mins to pick up kid, but will be back in 15 | ||
TimToady | so maybe the real problem is better described as Iterables don't properly behave as subparcels? | ||
pmichaud | if we make Iterables behave as subparcels, we lose all sorts of flattening behavior that we currently expect | ||
e.g., (1..5, 2..7).list.elems would end up being 2 | 17:52 | ||
as would (@a, @b).list.elems | |||
afk for 15 | |||
TimToady | only if list is the same as parcel-list | ||
later | |||
or maybe we've confused .list with .flat (yet again) | 17:55 | ||
17:56
aj7504 left
18:02
mikemol joined
|
|||
TimToady | in any case we seem to have de-lazified interpolation too much such that the recipient of the whatever-it-is is not able to make the decision | 18:02 | |
18:02
thilp left
18:03
thilp joined
|
|||
TimToady | if we have to make .elems flattening by default, and add a .args to get the other value, we could do that | 18:03 | |
18:05
skids joined
|
|||
TimToady | or a .rawelems, or whatever | 18:08 | |
sisar | r: print 1..10; | 18:11 | |
p6eval | rakudo 88a9d6: OUTPUT«12345678910» | ||
sisar | r: print (1..10).list; | ||
p6eval | rakudo 88a9d6: OUTPUT«12345678910» | ||
sisar | r: print (1..10).WHAT; | ||
p6eval | rakudo 88a9d6: OUTPUT«use of uninitialized variable $v of type Range in string context in block <anon> at /tmp/kISW4FfZ3Q:1» | ||
sisar | huh ? | 18:12 | |
r: print (1..10).WHAT.gist; | |||
p6eval | rakudo 88a9d6: OUTPUT«Range()» | ||
sisar | r: print (1..10).WHAT.perl; | ||
p6eval | rakudo 88a9d6: OUTPUT«Range» | ||
pmichaud | back again | 18:15 | |
18:15
arlinius left
18:16
Je joined
|
|||
sisar | nr: say (1, 2, 3, 4, 5).Range; #ooc, can the compiler figure out a Rnage which will generate this list? Expected output here would be "1..5" ;-) | 18:16 | |
p6eval | niecza v19-1-gbd1bd16: OUTPUT«Unhandled exception: Unable to resolve method Range in type Parcel at /tmp/QtmVnXOV6_ line 1 (mainline @ 3)  at /home/p6eval/niecza/lib/CORE.setting line 3917 (ANON @ 3)  at /home/p6eval/niecza/lib/CORE.setting line 3918 (module-CORE @ 562)  at /hom… | ||
..rakudo 88a9d6: OUTPUT«No such method 'Range' for invocant of type 'Parcel' in block <anon> at /tmp/zxXEIY5Hlx:1» | |||
pmichaud | well, it seems to me that .list has to interpolate, in order for @(1..5) to do what we want. | ||
as things stand now, .list interpolates Iterables, while .flat interpolates Iterables and Parcels | 18:17 | ||
18:17
cognominal joined
18:18
thilp left
|
|||
pmichaud | what we really might want is something between .list and LoL, or (equally likely) that LoL needs a redefinition | 18:18 | |
then we'd have | |||
we'd want potentially four levels, then: | 18:19 | ||
.flat -- interpolate Iterables and Parcels | |||
.list -- interpolate Iterables (but not Parcels) | |||
.xyz -- don't do any interpolation | |||
.uvw -- itemize everything | 18:20 | ||
.uvw is what we currently do for .lol and LoL | |||
i.e., (1..5, 6..10).lol results in a list where the ranges have been put into scalars | |||
(so they can't be interpolated any further by any subsequent operator) | |||
18:21
cog_ left
|
|||
pmichaud | r: say (1..5,6..10).lol.perl | 18:21 | |
p6eval | rakudo 88a9d6: OUTPUT«LoL.new(1..5, 6..10)» | ||
pmichaud | r: say (1..5,6..10).lol.list.perl | ||
p6eval | rakudo 88a9d6: OUTPUT«LoL.new(1..5, 6..10)» | ||
pmichaud | hmmm | ||
18:22
Je left
|
|||
pmichaud | r: my @a = 1,2; say (@a, @a).lol.[0] | 18:22 | |
p6eval | rakudo 88a9d6: OUTPUT«1 2» | ||
colomon | phenny: tell sorear I don't have [&atan2] working, just wanted to thank you for your help (and if you're patient enough, the help that I still require). | ||
phenny | colomon: I'll pass that on when sorear is around. | ||
pmichaud | r: my @a = 1,2; say (@a, @a).lol.[0].perl | ||
p6eval | rakudo 88a9d6: OUTPUT«[1, 2]» | 18:23 | |
pmichaud | (note non-flattening) | ||
TimToady | what is the use case for interpolating Iterables but not Parcels? | ||
pmichaud | ummmm | 18:24 | |
"that's what distinguishes .flat from .list" (yes, I know that's not a good answer here... still thinking) | |||
18:24
sergot left
|
|||
pmichaud | I'm certain there was a case at one time -- that's how we ended up with .flat and .list. Let me review the core and see if I can recall which case it's handling. | 18:27 | |
TimToady has to run errands now... | |||
18:27
fhelmberger left,
snearch joined
|
|||
pmichaud | the distinction may have had to do with with flattening/non-flattening versions of .map | 18:28 | |
which .map always flattens now, so might not be relevant anymore | |||
18:29
arlinius joined
|
|||
sorear | o/ colomon | 18:30 | |
phenny | sorear: 18:22Z <colomon> tell sorear I don't have [&atan2] working, just wanted to thank you for your help (and if you're patient enough, the help that I still require). | ||
colomon | \o | ||
pmichaud | I guess I can turn .list into .flat and see what breaks :-) | 18:31 | |
18:31
thilp joined
18:32
adu joined
|
|||
colomon | sorear: gist.github.com/3005906 is what I have at the moment | 18:32 | |
pmichaud | mainly I think that .list versus .flat is what makes Parcel do what it does -- a Parcel is something where the interpolating decision is postponed. | 18:33 | |
colomon | when I try it, I get "Cannot use hash access on an object of type Str" | ||
sorear: that's after infixish returns, as far as I can tell | |||
18:35
sergot joined
|
|||
sorear | colomon: which line do you get that error on? | 18:38 | |
colomon | sorear: I'm getting it from the REPL when I try 3 [&atan2] 4 | 18:39 | |
sorear | colomon: might be more useful to try from -e so that you have a stack trace. also, NIECZA_FAIL_FAST=1 to get stack traces from sorries | 18:40 | |
colomon | sorear: gist.github.com/3005936 | 18:41 | |
hmmm... my $inprec = $inO<prec>; | 18:42 | ||
looks like it is the problem. | |||
18:42
benabik left
|
|||
sorear | colomon: $O = $<infix><O> // <O(|%additive)>; # spot the problem here | 18:44 | |
I think // %additive; would work | 18:45 | ||
colomon | hmmm.... we're creating a precedence level for the new operator, I get that. but I don't particularly get what's wrong with <O(|%additive)> ... but then, I don't understand what it means, either. | 18:46 | |
pmichaud | r: say (gather { take 1,2,3; take 4,5,6 }).elems | ||
p6eval | rakudo 88a9d6: OUTPUT«2» | ||
pmichaud | r: say (gather { take 1,2,3; take 4,5,6 }).flat.elems | ||
p6eval | rakudo 88a9d6: OUTPUT«6» | ||
pmichaud | that's one difference between .flat and .list | ||
flussence | rn: regex { <[a b c #]> } | 18:47 | |
p6eval | rakudo 88a9d6: ( no output ) | ||
..niecza v19-1-gbd1bd16: OUTPUT«===SORRY!===Unrecognized regex metacharacter < (must be quoted to match literally) at /tmp/hE1bMAVFBP line 1:------> regex { <⏏[a b c #]> }Unhandled exception: Unable to resolve method ast in type Any at /home/p6e… | |||
18:49
dukeleto left
|
|||
colomon | sorear: errr, that worked! | 18:50 | |
pmichaud | but I guess that difference is exactly the error we've been dealing with. | ||
colomon | Wynne:niecza colomon$ NIECZA_FAIL_FAST=1 mono run/Niecza.exe -e "say 3 [&atan2] 4" | ||
0.64350110879328437 | |||
pmichaud | s/error/problem/ | ||
sorear | colomon: <O(|%additive)> is a string literal. | ||
colomon: that's what's wrong with it. | |||
colomon | what is %additive? | ||
sorear | %additive is the precedence level of + and - | 18:51 | |
the default precedence level for newly defined infixes | |||
colomon | sorear: I understand that, but I don't understand why it's a hash variable | ||
pmichaud | colomon: the hash variable defines precedence, associativity, and other things for operators at that level | 18:52 | |
constant %additive = (:dba('additive') , :prec<t=>, :assoc<left>, :pure); | |||
which says that operators at the %additive level are precedence "t=", left associative, and "pure" | |||
colomon | oh! so it's like a simple old-style p5 class. | ||
pmichaud++, sorear++ | 18:53 | ||
I'm assuming we don't have any tests for [&func] in roast? | 18:54 | ||
btw, Wynne:niecza colomon$ NIECZA_FAIL_FAST=1 mono run/Niecza.exe -e "say 3 R[&atan2] 4" | |||
0.92729521800161219 | |||
pmichaud | probably not; especially if it hasn't been put into the synopses | ||
18:54
sisar left
18:57
sisar joined
|
|||
sisar | pmichaud: TimToady++ just specced it ([&func]) today github.com/perl6/specs/commit/10d772fdfd | 18:58 | |
pmichaud | sisar++ # thanks | 18:59 | |
pmichaud takes a walk to think more about .flat and .list | |||
19:01
MayDaniel left
19:02
mikemol left,
brrt joined
19:04
eric left
19:14
sirrobert joined
|
|||
felher | sirrobert++ #nice blogpost and using perl6 :) | 19:16 | |
sirrobert | =) thanks | ||
What's the bit of code that installs perl6 modules (such as prerequisites that ufo finds)? | 19:17 | ||
Or, rather, I mean: How can I specify where perl6 modules are installed to? | 19:18 | ||
pmichaud | r: my @a = 1..10; say ((1,2,3), @a).elems; | 19:20 | |
p6eval | rakudo 88a9d6: OUTPUT«13» | ||
colomon | sorear: ye gads, we're failing spectests left and right today. (nothing to do with my code, I stashed my changes to check on things.) | ||
pmichaud | r: my @a = 1..10; say ((1,2,3), @a).list.elems; | 19:21 | |
p6eval | rakudo 88a9d6: OUTPUT«11» | ||
sorear | colomon: when I tested before the release I saw about a dozen failures, all seemingly new test | 19:22 | |
19:22
mikemol joined
|
|||
brrt | good afternoon #perl6 | 19:22 | |
19:23
sisar left
|
|||
pmichaud | TimToady: I'm still playing with things a bit... but what would be the expected answer of...: my @a = 1,2,3; say (gather { take @a; take @a; }).elems | 19:23 | |
brrt | i was warned that there would be some magic involved in getting nqp and the rest of parrot to interopterate | ||
19:23
benabik joined
|
|||
brrt | so i'm here with full curiosity as to what that magic entails | 19:24 | |
pmichaud | Rakudo doesn't like dealing with bare Parrot PMCs, because they don't fit into Rakudo's type hierarchy or dispatch system. | ||
brrt | thats fair enough | 19:25 | |
but i do need to run a script with rakudo as the compiler | |||
colomon | sorear: yeah, I do suspect that's it. I just hate checking in with a lot of failing spectests | ||
brrt | or nqp, that will be a start | ||
pmichaud | I don't understand "run a script with rakudo as the compiler". | 19:27 | |
(at least not in this context.) | |||
brrt | yes, that is vague | ||
long story short, what happens is that i get a request, i determine based on configuration which compiler should compile the file that is requested, i compile the file, and return the results | 19:28 | ||
rakudo (should be) one of those compilers | 19:29 | ||
as winxed is now | |||
and nqp-rx probably works, too | |||
19:29
rodent_ joined
|
|||
pmichaud | so, you want Rakudo to be able to work with load_language, yes? | 19:30 | |
brrt | yes | ||
and compreg() and the like | |||
19:30
GlitchMr left
|
|||
pmichaud | I'm pretty sure it already participates with compreg() | 19:30 | |
brrt | :yes: | ||
19:31
bluescreen10 left
|
|||
jnthn | r: pir::compreg__Ps('perl6').eval('say 42') | 19:31 | |
p6eval | rakudo 88a9d6: OUTPUT«42» | ||
brrt | oh, nice | ||
pmichaud | and "make install" already installs Rakudo into languages/perl6 | 19:32 | |
so you should just be able to do "load_language 'perl6'", and compreg and have everything "work". | |||
pmichaud tests | |||
19:32
bluescreen10 joined
|
|||
brrt | i'm going to try that out | 19:32 | |
however, embarassingly, i do not have p6 installed right now | |||
colomon | n: say [max] Any, Any, 2 | 19:33 | |
p6eval | niecza v19-1-gbd1bd16: OUTPUT«-Inf» | ||
colomon | r: say [max] Any, Any, 2 | 19:34 | |
p6eval | rakudo 88a9d6: OUTPUT«2» | ||
colomon | rn: say Any cmp 2 | ||
p6eval | niecza v19-1-gbd1bd16: OUTPUT«Increase» | ||
..rakudo 88a9d6: OUTPUT«use of uninitialized value of type Any in string context in block <anon> at /tmp/aQDVVXrGdU:1Increase» | |||
pmichaud | colomon: I think the problem is that 'max' in niecza treats a list with an undefined first element as being empty | ||
n: say [max] 3, Any, 4 | 19:35 | ||
colomon | rn: say Any max 2 | ||
p6eval | niecza v19-1-gbd1bd16: OUTPUT«4» | ||
rakudo 88a9d6: OUTPUT«2» | |||
..niecza v19-1-gbd1bd16: OUTPUT«-Inf» | |||
pmichaud | max in niecza treats a list with an undefined first value as being empty, and thus returns '-Inf' | ||
(without checking any other elements) | |||
colomon | pmichaud++ # think that's it | 19:36 | |
colomon was surprised to learn that infix:<max> takes a list! | 19:38 | ||
colomon is scared to check blame and see if he actually wrote it that way... | 19:39 | ||
pmichaud | infix:<max> takes a list -- yes -- it has %tight_or precedence, which has :assoc<list> | ||
constant %tight_or = (:dba('tight or') , :prec<k=>, :assoc<list>); | 19:40 | ||
colomon | is Any cmp 2 actually well-defined by the spec? | ||
brrt is cooling his computer for the next few minites, bye & | |||
19:40
brrt left
|
|||
[Coke] | sirrobert++ sirrobert++ | 19:40 | |
pmichaud | since the two are of differing types, it defaults down to string context (or at least did at the time that Rakudo's implementation of cmp was last worked on :) | ||
19:44
thilp left,
birdwindupbird joined
|
|||
colomon | I don't see any hint of that in the Comparison semantics portion of the spec. But then, I don't see any support for the Niecza implementation, and I did heavy hacking on that one. Gack, I regret the fact that everything I did all winter is just a blur now.... | 19:45 | |
dalek | ast: 3bddd1b | (Solomon Foster)++ | / (3 files): Fudge for niecza. |
19:46 | |
pmichaud | brrt / jnthn: It appears that "load_language 'perl6'" is not sufficient; I suspect that perl6.pir's mainline Sub never gets executed. | ||
19:46
cognominal left
19:48
cognominal joined
|
|||
pmichaud | it may be possible to fix that more easily now if Parrot has added the new sub tagging features (i.e., better introspection on whatever the Eval PMC has now morphed to :-) | 19:49 | |
19:49
szabgab joined,
snearch left
|
|||
pmichaud | afk for a bit | 19:49 | |
szabgab | and I just wanted to ask pmichaud about a compilation failure :) | 19:50 | |
after Stage post it is getting killed : make: *** [CORE.setting.pbc] Error 137 | |||
it is an ubuntu 12.04 32 bit | 19:51 | ||
anyone maybe knows what to do? | |||
sirrobert | What does this mean (trying to use panda): Missing or wrong version of dependency 'src/gen/Metamodel.pm' | 19:54 | |
besides the obvious ;) Any ideas how to fix it? | 19:55 | ||
szabgab | sirrobert: I think I installed panda again | ||
sirrobert | I tried that, but got the same error ;) | ||
ahh, because the script uses "panda install panda" | 19:57 | ||
heh | |||
20:00
fridim_ joined
|
|||
szabgab | hmm, it seem I ran out of memory and swap space | 20:03 | |
20:04
brrt joined
|
|||
sirrobert | szabgab: I hit that before... needed to use more than the RAM I had available on my server | 20:05 | |
(VPS with 1GB RAM running Ubuntu server) | |||
szabgab | sirrobert: and di you have any solution? | ||
was 1Gb enough? | |||
sirrobert | nope | ||
szabgab | oh | ||
sirrobert | temporary solution: develop locally =) | ||
szabgab | yes, I can build Rakudo at home and upload to the server | 20:06 | |
sirrobert | Since I have a VPS I might take a disk image, boot it up on my computer to compile, then pass it back | ||
colomon | pugs: say 2 max Any | 20:08 | |
p6eval | pugs: OUTPUT«***  Unexpected "max" expecting operator, ":" or "," at /tmp/ZfygxIXHhk line 1, column 7» | ||
20:11
brrt left
|
|||
szabgab | I'll try to build at home | 20:12 | |
20:14
bluescreen10 left,
brrt joined
20:16
szabgab left
|
|||
dalek | ast: 677362a | (Solomon Foster)++ | S03-operators/minmax.t: Fudge for niecza, add note doubting the correctness of the tests. |
20:16 | |
ast: 518ae1d | (Solomon Foster)++ | S06-signature/slurpy-and-interpolation.t: Fudge for niecza. |
20:17 | ||
ecza: b5cc8a1 | (Solomon Foster)++ | t/spectest.data: Turn off dir.t test. |
|||
pmichaud | colomon: I can't find it in the docs, but I'm pretty sure that min and max are to ignore undefined values in their computation | 20:18 | |
thus my $x; my $y; $x min $y min 2 returns 2 | 20:19 | ||
which is entirely unrelated to the result of Any cmp 2 | 20:20 | ||
colomon | pmichaud: that certainly sounds reasonable-ish. | ||
pmichaud | similarly: | 20:21 | |
r: my @a; @a[2] = 20; say [max] @a | |||
p6eval | rakudo 88a9d6: OUTPUT«20» | ||
tadzik | good evening | ||
pmichaud | r: my @a; @a[2] = 20; say [mi] @a | ||
p6eval | rakudo 88a9d6: OUTPUT«===SORRY!===Confusedat /tmp/p0UOjBvlq0:1» | ||
pmichaud | r: my @a; @a[2] = 20; say [min] @a | ||
p6eval | rakudo 88a9d6: OUTPUT«20» | ||
20:22
brrt1 joined
20:23
brrt left
|
|||
colomon | pmichaud: though I don't see it anywhere in the spec either, and it seems like it interacts a bit strangely with the min and max methods. | 20:23 | |
pmichaud | colomon: ? | ||
how so | |||
? | 20:24 | ||
colomon | (to be more precise... if there is a user defined ordering, do we do still skip undefineds?) | ||
pmichaud | rakudo does that, yes. | ||
20:27
bluescreen10 joined
20:28
larks left,
larks joined,
mikemol left
|
|||
pmichaud | although it wouldn't bother me if Any cmp 2 returned "Mu" or some other value to indicate "I don't know the ordering" | 20:29 | |
then min/max could simply skip elements where the comparison came back as "Mu" | 20:30 | ||
that would enable someone to write a custom comparator that handled undefined elements | 20:31 | ||
diakopter | 15:21 < pmichaud> r: my @a; @a[2] = 20; say [mi] @a | ||
sirrobert | Has anyone else encountered the panda problem ("missing or wrong version of Metamodel.pm") and know how to fix it? | ||
pmichaud | sirrobert: whenever I've gotten that error message, it's either because I didn't install perl6 or because my PERL6LIB environment variable isn't set. | 20:32 | |
sirrobert | I just reinstalled perl6, so it's not that... | ||
tadzik | sirrobert: yes | ||
jnthn | Generally it means there's a pre-compiled module hanging around compiled for a previous Rakudo build. | ||
PerlJam | sirrobert: and I've gotten it when the perl6 I'm running isn't the one I thought it was. | ||
sirrobert | looks like it might be $PERL6LIB | ||
tadzik | sirrobert: if you've reinstalled perl6, you need to reinstall panda as well | ||
20:33
adam7504 joined
|
|||
sirrobert is in another terminal a min... | 20:33 | ||
20:34
bluescreen10 left
|
|||
pmichaud | also, it would be really helpful if that error message could be split up to tell us which case has occurred; i.e. "missing Metamodel.pm" versus "wrong version of Metamodel.pm" | 20:36 | |
and if it got the wrong version, it would be helpful to let us know which version it got and which one it was looking for :) | |||
tadzik | I don't think anything is missing, it's just precompiled against another version of Metamodel.pir | 20:37 | |
PerlJam | Seems like that could easily become a FAQ in the future. | 20:38 | |
tadzik | it's been a FAQ in the past too :) | ||
pmichaud | which is why I'm saying the error message can help to avoid the FAQ :) | ||
tadzik | and in the present | ||
jnthn | Which is why I keep saying that Rakudo should manage the pre-compilation cache. | ||
tadzik | +1 | ||
sirrobert | $PERL6LIB was unset. I set it to ~/.perl6/lib and got a different error for panda: | ||
Missing or wrong version of dependency 'src/stage2/QRegex.nqp' | 20:39 | ||
20:39
arlinius left
|
|||
tadzik | fun | 20:39 | |
moritz | sirrobert: that always means that you're loading a .pir file that was compiled with an older rakudo | ||
tadzik | anyway, I'm quite convinced the reason is the same | ||
sirrobert | Ok... so a resolution would be | ||
jnthn | tadzik: Does panda have a rebuild-all-the-things option yet? | ||
tadzik | jnthn: nope | ||
sirrobert | remove ~/.perl6 and re-install everything? | 20:40 | |
moritz | sirrobert: try RAKUDO_MODULE_DEBUG=1 perl6 yourscript.pl | ||
tadzik | the bootstraping problems :) | ||
moritz | sirrobert: yes | ||
sirrobert | ok =) | ||
tadzik | maybe one could implement that in BEGIN, hmm | ||
before module loading | |||
jnthn figures that we should have all the needed people on hand at YAPC::EU to try and hammer out a good solution for all of this. | |||
PerlJam | sirrobert: Just remove all of the .pir files (they'll be made anew from the .pm files) | 20:41 | |
tadzik | I see a way, and it's going to be SOO dirty hack :) | ||
PerlJam: they won't, no :( | |||
but things will work | |||
sirrobert | What's .pir, btw? | ||
PerlJam | tadzik: oh, they're only made on install? | ||
tadzik | on build, to be exact | ||
pmichaud | I'm still quite uncomfortable with the "rakudo manages the cache" approach; it gives me that tension in my shoulders that says "wrong wrong wrong". | 20:42 | |
PerlJam | sirrobert: Parrot Intermediate Representation or somesuch. It's the language of the underlying Parrot VM. | ||
pmichaud | certainly I have trouble with "the" cache :) | ||
sirrobert | ah, got it | ||
jnthn | pmichaud: Caches :P | ||
pmichaud: I don't love it either, fwiw. | |||
pmichaud | but yes, I think yapc::eu is a good place to explore it. | ||
diakopter | BOOTArray->st is null | ||
ww | |||
pmichaud | tadzik: are you perchance going to make it to yapc::eu ? | 20:43 | |
pmichaud hopes "yes" | |||
tadzik | pmichaud: absolutely | ||
pmichaud | \o/ | ||
jnthn | \o/ | ||
tadzik | \o/ | ||
pmichaud | would you be able to attend a workshop/summit a couple of days before yapc::eu ? | ||
tadzik | (and I hope I can make it out without giving a talk, so I would be able to slack off all the time :P) | ||
pmichaud | ...no talk?!? are you kidding me?! :-) | 20:44 | |
tadzik | pmichaud: possibly. Anything in particular that you have in mind? | ||
tadzik checks the dates | |||
well, maybe something :) | |||
talks still make me a lot nervous | |||
pmichaud | tadzik: that's why you should do more, then. :) | 20:45 | |
tadzik | and to get rid of... exactly :) | ||
sorear | it is at this point looking highly likely I will be at yapc::eu | ||
i'd love to talk about the kinds of talks people want to hear from me | 20:46 | ||
i think there is overlap here with the concept of 'what would I use a blog for' | |||
20:46
bluescreen10 joined
|
|||
PerlJam | sorear: you need to figure out how to recruit more devs :) | 20:48 | |
pmichaud | sorear: tbh, any talk you give will likely be well received. (more) | ||
PerlJam | sorear: so ... whatever talk makes people go "I want to do that!" :) | ||
moritz | sorear: make a talk "how to make Perl 6 fast" | ||
pmichaud | Lots of people know about Rakudo, I suspect many are unaware of Niecza or what it is/can do | ||
PerlJam | moritz++ | ||
pmichaud | so if nothing else, a talk about niecza, how it works, how it compares to rakudo, etc would likely be very well received | 20:49 | |
moritz | sorear: and talk about your experiences about what worked well for niecza (speed-wise), and what not | ||
pmichaud | if you don't want to talk about niecza itself (or solely about that) -- well... any topic dealing with Perl 6 is likely of interest to all o fus :) | ||
*of us | |||
for that matter -- anyone have a specific talk they'd like to see me give? | 20:50 | ||
I can certainly do part 2 of my lists/iterators talk (that I didn't give last year at yapc::eu, and that I gave at yapc::na this year). | |||
PerlJam | pmichaud: how to make Perl 6 fast :-) | ||
pmichaud | PerlJam: that's jnthn++'s talk :) | ||
sorear | mmh. Later when I have more time I'd like to elaborate on this. maybe start coming up with notes that we can refine | 20:51 | |
i have never given a tech talk. | |||
PerlJam | Will YAPC::EU be videoed as well as YAPC::NA? | ||
(or at all?) | |||
pmichaud | sorear: I'll be happy to help any way that I can. I might also be able to forward you a copy of Damian Conway's "Presentation Aikido" notes that describe ways to give good talks :) | 20:52 | |
brrt1 | hi all, whom can i pester about nqp & load_language in relation to winxed | ||
and a segfault to boot :-) | |||
pmichaud | PerlJam: although, I suppose I could give a lightning talk on "how to make Perl 6 fast", which basically consists of a slide saying "recruit jnthn++ and stay out of his way" :-) | ||
jnthn | ;) | 20:53 | |
pmichaud | oh, and "make sure he's supplied with beer" | ||
jnthn | YAPC is in Germany this year. | ||
tadzik | :P | ||
jnthn | Beer. | ||
:) | |||
Not that the place in Riga that served 30 different types of beer on tap will be easy to beat :P | |||
PerlJam | "How to turn beer into Perl 6" | ||
pmichaud | PerlJam: lol | 20:54 | |
brrt1 would like to go to YAPC::EU | |||
jnthn | I suspect my main problem in the coming months will actually be to make sure I do enough $dayjob than it will be to make sure I do enough Perl 6. :) | ||
sorear | jnthn: I will need mentoring on that too, I am also a complete beer novice :p | ||
jnthn | Oh! | 20:55 | |
Well, Germany is a good first place :) | |||
brrt1 | land of the reinheitsgebot ;-) | ||
20:57
adam7504 left
|
|||
pmichaud | sorear: if you apply for a talk at yapc::eu (+1) you could also request that it be on the 2nd or 3rd day. That would give you time to see what other presenters do and what it looks like. | 20:57 | |
jnthn needs to get around to submitting. | |||
I'm planning a talk on roles. | 20:58 | ||
pmichaud | although you've likely already seen some of the videos from yapc::na. Generally, talks are low-key, not terribly formal (but you still want to have good preparation), and if you're interested in your topic then the audience almost certainly will be as well. | ||
roles +1. Very timely for yapc::eu, for a number of reasons. | |||
jnthn | And maybe a Rakudo "Achievements and Plans" talk | ||
tadzik | Plans Unlocked! | ||
jnthn | :D | ||
20:59
Je joined
|
|||
jnthn | I may start out by going back to my "plans" slides at the end of my Rakudo talk last YAPC::EU and pointing out how we did All The Things, pretty much. :) | 20:59 | |
sorear | watching the videos from yapc::na is on my agenda :D | ||
pmichaud | jnthn: you could do that as a lightning talk, perhaps. Although "All the Things" is hard to fit in five minutes. | 21:00 | |
sorear | whatever I decide to do, I'm probably going to use sandiego.pm as a guinea pig | ||
21:00
brrt1 left
|
|||
jnthn | pmichaud: Well, one doesn't preclude the other. :) | 21:00 | |
pmichaud | Although I did cover "Most of the Things" in my lightning talk at yapc::na. Only took me about 3 seconds. :-) | ||
PerlJam | Someone could do a "state of IO" talk. | 21:01 | |
pmichaud | PerlJam: only if we get a "state of Europa" to go with it :-P | ||
PerlJam | :-P | ||
jnthn | lol | ||
tadzik | I don't get it | ||
PerlJam | tadzik: moons of jupiter | ||
pmichaud | tadzik: moons of Jupiter | ||
jnthn | PerlJam: That's just trolling somebody into doing conference driven development on IO :P | ||
tadzik | oh :) | ||
pmichaud | plus, the state of Europ(e|a) is a little unsettled at the moment. | 21:02 | |
s/unsettled/interesting/ | |||
jnthn | Last I noticed, so was the state of IO :P | ||
pmichaud | _exactly_ | 21:03 | |
PerlJam | jnthn: Do the fish bite even if you tell them it's bait? | ||
jnthn | PerlJam: Only if it's really tasty bait. | ||
The state of &dir made me grrrr at $dayjob today. | |||
Curiously, that's the first thing I ran into as problematic while actually using Rakudo to Get Stuff Done. | 21:04 | ||
tadzik | heh, a lightning talk: "&dir makes me $grrr" | ||
PerlJam | sounds Dr. Seussian | 21:05 | |
21:05
kaare_ left
|
|||
pmichaud | "I do not like Perl and CPAN, I do not like them, Tim I am." | 21:06 | |
(Mark Keating)++ | |||
PerlJam | mdk++ indeed. Of all the YAPC talks I've seen so far, that one is my favorite. | 21:07 | |
pmichaud | (www.youtube.com/watch?v=NUAOns_WAXA in case you haven't seen it yet) | ||
pmichaud sadfaces at the pause in video uploads to youtube.com/yapcna | |||
sirrobert | removed everything and re-installed rakudo, panda, etc. from scratch. Now Panda is working again =) | 21:08 | |
gotta go to a meeting. thanks all =) | |||
21:08
sirrobert left
|
|||
jnthn | pmichaud: A PAUSE is pretty common in uploading related things in the Perl world... | 21:09 | |
pmichaud | *ouch* | ||
nterpolation of Parcel differently from Iterable. I think I would be happy to s | 21:11 | ||
erggg | |||
ee those unify. We still need to flesh out .list versus .flat a bit (working on that) | |||
phenny tell TimToady I can't recall or find the use cases that led me to treat interpolation of Parcel differently from Iterable. I think I would be happy to see those unify. We still need to flesh out .list versus .flat a bit (working on that) | 21:12 | ||
phenny: tell TimToady I can't recall or find the use cases that led me to treat interpolation of Parcel differently from Iterable. I think I would be happy to see those unify. We still need to flesh out .list versus .flat a bit (working on that) | |||
phenny | pmichaud: I'll pass that on when TimToady is around. | ||
pmichaud | obviously I need help with the irc interface today :-/ | ||
"How does one spell 'IRC', anyway?" | |||
pmichaud goes back to scribbling ideas for List and Parcel | 21:13 | ||
atrodo | pmichaud: I was curious, at YAPC::NA, I heard you talk about getting rakudo to run on other vm's and not just parrot. I wondered, if m0/lorito was implemented and ran on jvm/clr/etc, would that be a desirable? Would you still want rakudo to be able to target them directly? | ||
21:14
birdwindupbird left
|
|||
pmichaud | I think being able to run in more environments is always a plus (more) | 21:14 | |
21:14
brrt joined
|
|||
sorear | pmichaud: why did uploads pause? | 21:15 | |
pmichaud | Whether Rakudo would still target other machines directly would depend almost entirely on the cost/benefit of doing so. If there's little additional benefit to be gained, we probably wouldn't do it. | ||
sorear: I don't know. I just know that it's been a day or two since any new yapc::na videos have been uploaded. | |||
sorear | have you asked anyone? | 21:16 | |
pmichaud | sorear: no; I know that it can take some time. The blog post on the yapcna blog says they expect to have them all "by the end of the week", though. | ||
sorear | pmichaud: ah, ok. | 21:17 | |
masak | good night, brave and glorious #perl6 | 21:18 | |
pmichaud | masak: what about the rest of us? ;-) | ||
PerlJam | Why can't they dub mithaldu's videos official? | ||
pmichaud | PerlJam: well, I'm kind of hoping they don't do that, if only because the video of my talk has blackouts in it and I'm hoping the copy they have doesn't have the blackouts. | 21:19 | |
masak | pmichaud: there's no escaping bravery and glory :) | ||
tadzik | they have blanks :( | ||
masak | 'n | ||
tadzik | 'n | ||
PerlJam | pmichaud: make his official but only as a first approximation then? | ||
jnthn | atrodo: Given project velocities at the moment, my guess would be that Rakudo will get to targeting other things before m0/lorito is ready to support that use case. I could be wrong. | ||
21:19
Je left
|
|||
atrodo | pmichaud: So, in theory, using m0 as a compatibility shim on top of other environments would be a good thing? | 21:20 | |
jnthn: I'm talking in much more curiosity terms than reality. I would tend to agree. | |||
pmichaud | atrodo: s/would/could/. There's sometimes a long distance between theory and reality. :) | ||
tadzik | hmm, szabgab's mail seem to indicate that HTML::Template is alive and well | ||
PerlJam | jnthn: I don't know ... whenever I do pay attention to #parrot, there seems to be lots happening on the m0 and m1 fronts | ||
sorear | pmichaud: Why are there blackouts? | ||
pmichaud | sorear: I don't know. Something happened either in the recording or transmission of the video | 21:21 | |
tadzik | they seem to be deliberate | ||
atrodo | pmichaud: Gotcha. That makes sense. Thatnks | ||
pmichaud | I'm hoping it was in transmission (in which case there's a chance they're not blacked out in the archival copies) | ||
it's also possible there was a signal mismatch between my system and whatever was handling the video feed | 21:22 | ||
it might not have liked the smaller black text on all-white screen | |||
tadzik | that rings a bell | ||
pmichaud | but... I didn't find out about the blackouts until I saw the mithaldu videos myself. | 21:23 | |
(i.e., well after the conference) | |||
sorear | pmichaud: ah. in San Diego English blackout usually refers to a deliberate contract thing "we aren't authorized to share the video from 4:30 to 5:10, so we didn't" | ||
pmichaud | oh, I mean blackout in the sense of "power dropped for some technical reason beyond our control" :-) | 21:24 | |
what would be the San Diego English for the type of blackout where signal is lost unexpectedly? ;-) | |||
ggoebel | sorear: good advice on presentations, even when it isn't a keynote: thenextweb.com/lifehacks/2012/05/13...t-keynote/ | ||
tadzik | did we get to know what happened to mpo? | 21:25 | |
pmichaud | oops, have to run home quickly -- bbiaw | 21:26 | |
tadzik | (modules.perl6.org) | ||
PerlJam doesn't remember any blackouts while watching pmichaud's lists talk on the live streaming. | |||
(I don't know how they captured the video, but if it was the same source as the streaming, this might bode well for complete videos) | 21:27 | ||
tadzik: isn't it still broken? | 21:28 | ||
tadzik | PerlJam: it is | ||
PerlJam | I would think that if somoene figured out what happened, they'd fix it :) | 21:29 | |
tadzik | luck and tuits given, we may be able to build something awesome with sergot which might be able to steal some of its glory :) | ||
sergot | \o/ | 21:30 | |
21:35
stephenlb joined
|
|||
pmichaud | PerlJam: yeah, that's why I'm hoping it was some sort of transmission issue and not a recording one. | 21:45 | |
I know that my wife said she kept getting blackouts during the live stream of my talk | 21:46 | ||
jnthn | Time for some rest...train leaves kinda early tomorrow | 21:52 | |
(Heading to FPW) | |||
tadzik | heh, I still have an exam before the flight tomorrow | 21:53 | |
PerlJam | pmichaud: I was doing work while watching, so I may have just missed the blackout times. | ||
jnthn | tadzik: Good luck! | ||
tadzik | thanks :) | ||
jnthn | tadzik: What time do you arrive? | ||
tadzik | jnthn: 23-ish | 21:54 | |
jnthn | tadzik: Ah, ok | ||
tadzik: I guess I see you on the Friday then | |||
tadzik | when do you arrive? | ||
jnthn | (There's a pre-workshop beer) | ||
20:15 | |||
tadzik | hmm, huh | ||
workshop is saturday? | |||
jnthn | Friday and Saturday | ||
tadzik | and beer both friday and pre-workshop? | 21:55 | |
jnthn | I guess there's beer every night | ||
I was asking when you arrived in case you would be at the pre-workshop beer meetup | |||
tadzik | that doesn't surprise me | ||
oh | |||
I see, ok | 21:56 | ||
jnthn | But given your arrival time I guess, "no" | ||
tadzik | well, if you overstay at the bar... :) | ||
jnthn | masak and I should make it...by some stroke of luck our hotel is exactly half way between the train station and the meet. | ||
Me? Overstay at a bar? ;-) | |||
tadzik | and I'll manage to semi-prepare my talk by then... ;) | ||
jnthn | ;-) | ||
I'm cheating and giving the same one I did at GPW :) | 21:57 | ||
Apart from thanks to recent improvements I could make the code cuter. :) | |||
tadzik | okay, guess it's time for me to get some sleeps | ||
jnthn | Yup, me too | 21:59 | |
'night all o/ | |||
tadzik | \oo | ||
21:59
PacoAir left
22:00
bluescreen10 left
22:03
adam7504 joined
22:07
moukeddar joined,
moukeddar left
|
|||
sergot | good night ! | 22:13 | |
22:13
sergot left
22:14
pupoque left
22:15
brrt left
22:16
adu left
22:21
alester left
22:23
HarryS left
22:32
crazedpsyc is now known as DrQwest
22:34
dorlamm joined
22:37
DrQwest is now known as crazedpsyc
22:46
fridim_ left
22:48
adam7504 left
22:49
dorlamm left
22:54
cognominal left
22:55
cognominal joined
23:03
spider-mario left
|
|||
TimToady | pmichaud: I think I'm okay with .elems saying 6 there as long as we have something like .objects that says 2 | 23:07 | |
phenny | TimToady: 21:12Z <pmichaud> tell TimToady I can't recall or find the use cases that led me to treat interpolation of Parcel differently from Iterable. I think I would be happy to see those unify. We still need to flesh out .list versus .flat a bit (working on that) | ||
23:08
orafu left
|
|||
TimToady | that is, .elems migh thave an implicit .flat like .map and friends | 23:08 | |
flussence | r: say [+] 1..500000 | 23:10 | |
p6eval | rakudo 88a9d6: OUTPUT«(timeout)» | 23:11 | |
flussence | r: say [+] 500000..1 | ||
p6eval | rakudo 88a9d6: OUTPUT«0» | ||
flussence | r: gist.github.com/3007551 | 23:22 | |
p6eval | rakudo 88a9d6: OUTPUT«125000250000» | ||
23:40
thou left
|