»ö« 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. |
|||
ggoebel | jnthn: regarding looking up the unicode codepoint for a character name... you may want to google: apache fop getcodenameforglyph | 00:04 | |
source code and binaries aren't much different in size from icu though... | 00:05 | ||
00:09
alec__ joined
00:14
AndChat|98100 joined,
AndChat|98100 left
00:15
AndChat|98100 joined
00:17
AndChat|98100 left
00:28
mh joined
00:29
thou joined
|
|||
ggoebel | phenny tell jnthn: or perhaps just process www.unicode.org/Public/6.2.0/ucd/NamesList.txt | 00:36 | |
dalek | rl6-most-wanted: 504e1fa | (Geoffrey Broadwell)++ | most-wanted/modules.md: Continuing through task-belike-* |
00:37 | |
00:37
mh left
00:38
AndroUser2 joined,
alec__ left
00:43
AndroUser2 left,
alec__ joined
|
|||
[Coke] | phenny: ask curtispoe if github.com/Ovid/Config-Tiny is gone or moved. | 00:48 | |
phenny | [Coke]: I'll pass that on when curtispoe is around. | ||
[Coke] | japhb: ^^ looks like someone started on an ini configurator | 00:51 | |
japhb | [Coke], commits welcome (easier now that it's in the perl6 org) :-) | 00:54 | |
Or I will eventually get to it if it's listed in the Perl 6 module list | |||
[Coke] | I found a blog post that said he started it, but it's gone. | ||
00:55
alec__ left
|
|||
japhb | :-( | 00:55 | |
01:01
b1rkh0ff left,
anuby joined
01:06
PhilipS__ joined
01:07
PhilipS__ left
01:16
hypolin joined,
drbean joined
01:17
anuby left
01:21
alec__ joined
01:23
dayangkun left
|
|||
dalek | ecs: 703df65 | lue++ | S02-bits.pod: [S02] Fixed double angle bracketed formatting code. |
01:26 | |
01:27
alec__ left
01:29
Chillance left
01:31
alec__ joined
01:38
shinobicl joined
|
|||
shinobicl | hi... are there any plans for 'improving' META.info in perl6 packages? Like the thing that Maven's "pom.xml" does in java?. | 01:38 | |
01:41
Exodist left
01:52
Exodist joined
01:55
skids joined
|
|||
dalek | rl6-most-wanted: a792408 | (Geoffrey Broadwell)++ | most-wanted/modules.md: More task-belike-* results |
02:00 | |
02:03
sevin joined
|
|||
colomon | n: say 4.bin | 02:10 | |
p6eval | niecza v24-23-g0520c7c: OUTPUT«Unhandled exception: Unable to resolve method bin in type Int at /tmp/wUqKivx7va line 1 (mainline @ 3)  at /home/p6eval/niecza/lib/CORE.setting line 4233 (ANON @ 3)  at /home/p6eval/niecza/lib/CORE.setting line 4234 (module-CORE @ 580)  at /home/p6… | ||
02:14
dayangkun joined
02:16
MikeFair left
02:17
MikeFair joined
02:24
alec__ left
02:30
alec__ joined
02:31
s1n joined
02:33
sevin left,
lustlife joined
|
|||
dalek | rl6-most-wanted: 284cccf | (Geoffrey Broadwell)++ | most-wanted/modules.md: Finish going through current set of task-belike-* |
02:34 | |
02:35
s1n left
|
|||
colomon | forgive me, I have used a side-effect in a grep block. | 02:41 | |
diakopter | karma will introduce wrongness into your primality tests | 02:48 | |
benabik | retroactively. | 02:49 | |
02:52
FROGGS_ joined
02:56
FROGGS left
|
|||
dalek | rl6-most-wanted: 0fa6f10 | (Geoffrey Broadwell)++ | tools/prettify-json: Sort prettified JSON |
02:56 | |
colomon | I'm distressingly pleased by the code: gist.github.com/colomon/4974879 | 03:00 | |
benabik | colomon: It's definitely clever. By which I mean I don't understand it. | 03:02 | |
colomon | benabik: I had to do research. | ||
benabik | colomon: You might want to add comments so people don't have to research it to figure it out. ;-) | ||
colomon | and it's probably overkill. | ||
or wrong. | 03:03 | ||
I've actually twisted my brain in knots trying to figure out how to gracefully test it. | |||
The grep selects things from @items based on the bits of $gray. | 03:05 | ||
$gray is the Gray number corresponding to $i. Though now that I'm thinking about it I'm not sure why it's useful here. | |||
dalek | rl6-most-wanted: 808d96f | (Geoffrey Broadwell)++ | most-wanted/modules.md: Start marking up existing WIP modules from the Perl 6 modules list |
03:08 | |
colomon | yeah, the Gary number thing is totally useless in my implementation. | 03:13 | |
at least according to my tests. | |||
03:13
s1n joined
|
|||
colomon | oh, my routine is very inefficient in this case. | 03:16 | |
03:18
MikeFair left
03:21
s1n left
|
|||
colomon | so probably I need to figure a better way to use the Gray number thing. | 03:21 | |
03:29
orafu left,
orafu joined
03:32
shinobicl left
04:22
dayangkun left
04:31
dayangkun joined
04:33
odoacre joined
|
|||
skids | colomon: Are you trying to figure out a useful ordering for the combos? en.wikipedia.org/wiki/Combinatorial...ber_system might help. | 04:40 | |
04:43
kaleem joined
04:48
preflex_ joined,
preflex left
04:49
preflex_ is now known as preflex
04:59
ElDiabolo joined
|
|||
bonsaikitten | hrm. can anyone help me figure out a parrot issue? it's not detecting perldoc, which is installed and as far as I can tell functional | 05:03 | |
I don't quite understand the Configure.pl and the machinery behind it yet | |||
moritz | bonsaikitten: maybe try #parrot? | 05:05 | |
(on irc.perl.org, that is) | |||
dalek | rl6-most-wanted: 106229f | (Geoffrey Broadwell)++ | most-wanted/bindings.md: WIP bindings from the Perl 6 modules list |
||
rl6-most-wanted: 9cc09f6 | (Geoffrey Broadwell)++ | most-wanted/modules.md: WIP modules from the Perl 6 modules list |
|||
japhb | OK all -- that's a reasonable first take on perl6-most-wanted, but it's far from perfect. | 05:06 | |
bonsaikitten | moritz: hrm ok | ||
japhb | I'm burning out a bit, so if there is anyone else interested in keeping perl6-most-wanted, please do make commits at will | 05:07 | |
*keeping up | 05:08 | ||
I guess before I completely let go, I should note the current location on the most-wanted wiki page ... | |||
Done. | 05:12 | ||
*whew* | |||
moritz | japhb++ # cleanup before letting go | ||
japhb | Feels good to have it off my mind. | 05:13 | |
I knew it needed to be done, but it was a ton of pretty much slogging drudgery work to get it to a stage useful to the community at large. | 05:14 | ||
(And hopefully it is, at this point. :-) | |||
05:21
sevin joined
05:43
bluescreen10 left,
ElDiabolo left
05:57
ElDiabolo joined
06:02
ElDiabolo left
06:28
ElDiabolo joined
|
|||
ElDiabolo | when was operator overloading added to rakudo ? | 06:31 | |
06:32
quester joined
|
|||
TimToady | it's pretty much been part of the design from the beginning, though not always implemented quite right | 06:35 | |
and we don't really talk about "operator overloading", because it falls out from multiple dispatch and the fact that operators are just funny names for functions | 06:36 | ||
ElDiabolo | TimToady, I am getting a "Cannot add tokens of category 'operator'" from my debian sid rakudo and wanted to check if this is just not implemented there. It is however a 2012-10 thingy, so thats not the problem. | 06:39 | |
TimToady | there is no category "operator" | 06:41 | |
you must be more specific: "prefix", "postfix", "infix" etc. | |||
ElDiabolo | TimToady, Uh, thanks :) | 06:42 | |
benabik | r: multi postfix:<!>(1) { 1 }; multi postfix:<!>($i) { $i * ($i - 1)! }; say 5! | 06:45 | |
p6eval | rakudo b9ee89: OUTPUT«120» | ||
06:51
FROGGS_ left,
rindolf joined
06:57
lue left
07:07
rindolf left
07:08
rindolf joined
07:10
lue joined,
sizz left,
sizz joined
07:15
bapa left,
ElDiabolo left
07:17
PacoAir joined,
PacoAir left
07:18
sizz_ joined
07:19
sizz left
07:21
bapa joined
07:22
sftp left
07:26
rindolf left,
rindolf joined
07:27
ElDiabolo joined
|
|||
ElDiabolo | r: map {say "::$_";} <== (1, 2, 3); | 07:27 | |
p6eval | rakudo b9ee89: OUTPUT«::1::2::3» | ||
07:33
sevin_ joined
07:34
sevin left
07:38
rindolf left,
rindolf joined
07:40
daxim_ joined,
daxim left
07:43
kaleem left,
kaleem joined
07:45
SamuraiJack joined,
daxim_ left,
proller joined,
daxim_ joined,
daxim_ is now known as daxim
07:47
arlinius left
07:50
FROGGS joined
|
|||
FROGGS | morning | 07:50 | |
07:53
domidumont joined
07:57
tadzik1 joined,
tadzik left
07:58
tadzik1 is now known as tadzik
|
|||
ElDiabolo | r: sub prefix:<select>(@table) is looser(&infix:<+>) {} | 07:59 | |
p6eval | rakudo b9ee89: ( no output ) | ||
ElDiabolo | r: sub prefix:<select>(@table) is looser(&infix:<+>) is export{} | 08:01 | |
p6eval | rakudo b9ee89: OUTPUT«===SORRY!===Missing blockat /tmp/LkYh9EmZB9:1------> able) is looser(&infix:<+>) is export{}⏏<EOL> expecting any of: statement list» | ||
moritz | ElDiabolo: add a space before the { | 08:02 | |
ElDiabolo: otherwise it's parsed as a postcircumfix | |||
like in %hash{...} | |||
08:02
rindolf left
08:03
quester left,
rindolf joined
|
|||
ElDiabolo | moritz, Thx :) | 08:06 | |
r: sub prefix:<select>(@table) is looser(&infix:<+>) is export {} | 08:07 | ||
p6eval | rakudo b9ee89: ( no output ) | ||
FROGGS | ElDiabolo: why a select-prefix and not just a function? | 08:11 | |
08:11
am0c joined
|
|||
ElDiabolo | FROGGS, Thoughtlessness | 08:12 | |
08:14
dayangkun left
08:17
domidumont left
|
|||
ElDiabolo | Thx. | 08:17 | |
08:17
arlinius joined
|
|||
ElDiabolo | r: map {say "::$_";} <== (1, 2, 3); | 08:18 | |
p6eval | rakudo b9ee89: OUTPUT«::1::2::3» | ||
ElDiabolo | r: map {say "::$_";}, (1, 2, 3); | ||
p6eval | rakudo b9ee89: OUTPUT«::1::2::3» | ||
08:18
domidumont joined
|
|||
ElDiabolo | The above does nothing in my test script unless I do my @dumy = map ... . Any hints on why ? | 08:20 | |
moritz | ElDiabolo: map itself is lazy | 08:21 | |
ElDiabolo: and it is only evaluated when there's some indication that the elements are needed | 08:22 | ||
assignment to an array is such an indication | |||
as well as sink (void) context | |||
ElDiabolo | Good. Thx. | ||
moritz | ElDiabolo: though it might be interesting who you managed to not put it into sink context (or maybe sink context detection is imperfect) | 08:23 | |
s/who/how/ | |||
ElDiabolo | moritz, Sink context is wrong in my rakudo, I think. | 08:29 | |
08:29
Ovidius joined
|
|||
ElDiabolo | moritz, map {say "::$_";}, @table; as one line in a script fails. | 08:30 | |
fails to say anything, to be precise. | |||
08:32
fhelmberger joined
|
|||
FROGGS | I would might do: say map {"::$_";}, @table; | 08:32 | |
Ovidius | Can anyone point me to recent benchmarks for Rakudo? Someone's taking issue with my performance comments on my recent blog post. | ||
08:35
jerome left
|
|||
ElDiabolo | FROGGS, Yeah, I'll work around, just wondering if a bug report makes sense. | 08:35 | |
FROGGS | ya, thats the question, bug or feature? | 08:36 | |
08:37
sevin_ left
|
|||
moritz | ElDiabolo: what rakudo version are you using? | 08:40 | |
ElDiabolo | OK, now I can do say select {"--$_";} from @table; | ||
This means I can tackle the first (as masak has pointed out) problem. Table aliases. | 08:41 | ||
08:41
dayangkun joined
|
|||
ElDiabolo | What I would like to do is select {"--$t";} from @table $t; | 08:42 | |
rindolf | ElDiabolo: what does select do here? | 08:43 | |
ElDiabolo | rindolf Nothing by now. | 08:44 | |
rindolf | ElDiabolo: Nothing yet? | ||
ElDiabolo | moritz, 2012.10-1 (as debian sid calls it). | 08:45 | |
08:47
cosimo left
|
|||
ElDiabolo | rindolf, I am currently learning p6 by implementing a LINQuish SQL lookalike. | 08:47 | |
rindolf | ElDiabolo: ah, OK. | ||
moritz | ElDiabolo: that explains it. sink context was implemented in 2013.01 | 08:48 | |
(well, that was the first release containing it) | |||
ElDiabolo | The problem with the table alias $t is 1. that the statement declares a local variable and I don't know how to implement this and 2. that said $t is first used and then declared . | 08:49 | |
arnsholt | To implement aliases you're probably going to need macros | 08:50 | |
ElDiabolo | moritz, Ah, thx. Hope the debian package maintainer stays active :) | ||
08:51
dayangkun left
|
|||
arnsholt | masak++ has implemented a fair chunk of macros, but I don't think creating variable bindings is supported yet | 08:51 | |
ElDiabolo | rindolf, I would prefer to stay as close as possible to SQL. | ||
rindolf | ElDiabolo: OK. | 08:52 | |
08:53
cosimo joined
|
|||
moritz | ElDiabolo: what do you want the syntax to look like? | 08:56 | |
ElDiabolo | moritz, SQL. | 09:00 | |
moritz | ElDiabolo: well, SQL doesn't use sigils | ||
ElDiabolo | moritz, hehe. Embedded SQL to data. | 09:01 | |
09:03
dayangkun joined
|
|||
moritz | ElDiabolo: you might be able to pull of some tricks with self-declared formal parameters | 09:04 | |
for example if you look at perlgeek.de/blog-en/perl-6/physical...lling.html | |||
ElDiabolo | moritz, In the long run an SQL to the database could be implemented this wax, too. | ||
09:04
labster left
|
|||
moritz | y_acceleration => { $:force / $:mass }, | 09:04 | |
here $:force and $:mass are named parameters | |||
which can be discovered from the outside by introspecting the signature | 09:05 | ||
which is how Math::Model tracks interdependencies between the various expresions | |||
ElDiabolo | s/wax/way/ | ||
jnthn | morning o/ | ||
moritz | so, you might be able to get something running along the lines of | 09:06 | |
09:06
thou left
|
|||
moritz | { select $:alias.name from table as $:alias } | 09:06 | |
\o jnthn | 09:07 | ||
ElDiabolo | moritz, Oh, cool. I thought that I may have to get away from using variable declaration for aliases but did not know how yet. | 09:08 | |
FROGGS | moritz: is it possible to declare variables like $<id> for use in a while loop when doing: while $sth.fetch { ... } ? | 09:13 | |
so you dont need to explicitly bind them? | 09:14 | ||
moritz | FROGGS: $<id> just desugars to $/{ 'id' } | ||
FROGGS | hmmm | ||
moritz | but I'd do it like this: | ||
for $sth.rows { say $:id, $:name } | |||
tadzik | $:id? | 09:15 | |
std: $:id | |||
p6eval | std 7551b8f: OUTPUT«===SORRY!===Placeholder variable $:id may not be used outside of a block at /tmp/ZOWbTMREwf line 1:------> <BOL>⏏$:idCheck failedFAILED 00:00 41m» | ||
tadzik | hm | ||
moritz | r: { say $:id }.(id => 42) | ||
p6eval | rakudo b9ee89: OUTPUT«42» | ||
moritz | tadzik: like $^id, only named | ||
tadzik | today I learned | ||
nice | 09:16 | ||
FROGGS | so, $sth.rows returns hash and it will just work like that? | ||
r: my @rows = { id => 42 }, { id => 43 }; for @rows { say $:id } | 09:18 | ||
p6eval | rakudo b9ee89: OUTPUT«Required named parameter 'id' not passedcurrent instr.: '' pc 311 ((file unknown):146) (/tmp/MUwLLQ2ri_:1)called from Sub '' pc 256919 (src/gen/CORE.setting.pir:116553) (src/gen/CORE.setting:5590)called from Sub 'reify' pc 255934 (src/gen/CORE.setting.pir:116188… | ||
moritz | erm, no :( | ||
I didn't consider that | |||
you'd have to do differently after all | |||
$sth.rows: { $:id, $:name } | |||
$sth.rows: { say $:id, $:name } | |||
jnthn | r: my @rows = { id => 42 }, { id => 43 }; for @rows { say .<id> } | ||
p6eval | rakudo b9ee89: OUTPUT«4243» | ||
moritz | then $sth.rows can introspect the closure, and decide which arguments to pass into it | 09:19 | |
or like jnthn++ said :-) | |||
jnthn | r: my @rows = { id => 42 }, { id => 43 }; for @rows -> (:$id) { say $id } | ||
p6eval | rakudo b9ee89: OUTPUT«4243» | ||
jnthn | r: my @rows = { id => 42 }, { id => 43 }; for @rows -> $/ { say $<id> } | ||
p6eval | rakudo b9ee89: OUTPUT«4243» | ||
jnthn | :) | ||
moritz | my @rows = { id => 42 }, { id => 43, name => "foo" }; for @rows -> (:$id) { say $id } | ||
r: my @rows = { id => 42 }, { id => 43, name => "foo" }; for @rows -> (:$id) { say $id } | 09:20 | ||
p6eval | rakudo b9ee89: OUTPUT«42Unexpected named parameter 'name' passed in sub-signaturecurrent instr.: '' pc 383 ((file unknown):210529660) (/tmp/fDATWtoqwK:1)called from Sub '' pc 256919 (src/gen/CORE.setting.pir:116553) (src/gen/CORE.setting:5590)called from Sub 'reify' pc 255934 (src/g… | ||
moritz | that's the disadvantage if you go that route: you have to use all the elements | ||
jnthn | Or throw in a *% | ||
But yes | |||
FROGGS | okay, maybe .<id> might be the sanest | 09:21 | |
r: my @rows = { id => 42 }, { id => 43 }; for @rows { say "$.<id>" } | |||
p6eval | rakudo b9ee89: OUTPUT«===SORRY!===Non-variable $ must be backslashedat /tmp/N9LdLJTryB:1------> > 42 }, { id => 43 }; for @rows { say "$⏏.<id>" } expecting any of: argument list prefix or term prefix or meta-prefix … | ||
FROGGS | r: my @rows = { id => 42 }, { id => 43 }; for @rows { say "&.<id>" } | 09:22 | |
p6eval | rakudo b9ee89: OUTPUT«&.<id>&.<id>» | ||
FROGGS | hmmm | ||
r: my @rows = { id => 42 }, { id => 43 }; for @rows { say "$(.<id>)" } | |||
p6eval | rakudo b9ee89: OUTPUT«4243» | ||
FROGGS | ahh, right | ||
09:26
ObseLeTe joined
09:27
spider-mario joined
|
|||
dvj | perl6: my $a = "#12"; my $c = $a.match(/^\# (\d+) $/); | 09:33 | |
p6eval | rakudo b9ee89: ( no output ) | ||
..niecza v24-23-g0520c7c: OUTPUT«===SORRY!===No unspace allowed in regex; if you meant to match the literal character, please enclose in single quotes ('#') or use a backslashed form like \x23 at /tmp/e6pQHSS86S line 1:------> my $a = "#12"; my $c = $a.match(/^\… | |||
dvj | perl6: my $a = "#12"; my $c = $a.match(/^\# (\d+) $/); say $c; | ||
p6eval | niecza v24-23-g0520c7c: OUTPUT«===SORRY!===No unspace allowed in regex; if you meant to match the literal character, please enclose in single quotes ('#') or use a backslashed form like \x23 at /tmp/mmdva6p85p line 1:------> my $a = "#12"; my $c = $a.match(/^\… | ||
..rakudo b9ee89: OUTPUT«「#12」 0 => 「12」» | |||
dvj | perl6: my $a = "#12"; my $c = $a.match(/^'#' (\d+) $/); say $c; | 09:35 | |
p6eval | rakudo b9ee89, niecza v24-23-g0520c7c: OUTPUT«「#12」 0 => 「12」» | ||
dvj | My rakudo installation gives me: 0 => 「12」 | ||
Is the regex matching wrong? | 09:36 | ||
arnsholt | It matched the whole string, but you're only capturing the numbers | 09:37 | |
moritz | dvj: I agree with what rakudo and niecza do here on the channel | ||
dvj: if you just want the string, use .Str or prefix ~ | |||
dvj | rakudo: my $a = "#12"; my $c = $a.match(/^'#' (\d+) $/); say ~$c; | 09:38 | |
p6eval | rakudo b9ee89: OUTPUT«#12» | ||
moritz | the 0 => 「12」 means "the first positional capture (with index 0) matched the string '12') | ||
in general, regex matches return Match objects, which contain much richer information than just the matched string | 09:39 | ||
doc.perl6.org/type/Match | |||
dvj | rakudo: my $a = "#12"; my $c = $a.match(/^'#' (\d+) $/); say $c.Int; | ||
p6eval | rakudo b9ee89: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '⏏#12' (indicated by ⏏) in method Int at src/gen/CORE.setting:10512 in method Int at src/gen/CORE.setting:2392 in block at /tmp/IEz8E8D2Qq:1» | ||
moritz | r: my $a = "#12"; my $c = $a.match(/^'#' (\d+) $/); say $c[0].Int | 09:40 | |
p6eval | rakudo b9ee89: OUTPUT«12» | ||
moritz | r: '#12' =~ /'#' (\d+) $ / and say $0.Int | ||
p6eval | rakudo b9ee89: OUTPUT«===SORRY!===Unsupported use of =~ to do pattern matching; in Perl 6 please use ~~at /tmp/XBUFUM_rUh:1------> '#12' =~⏏ /'#' (\d+) $ / and say $0.Int» | ||
moritz | r: '#12' ~~ /'#' (\d+) $ / and say $0.Int | ||
p6eval | rakudo b9ee89: OUTPUT«12» | ||
dvj | ah, ok. I see. Takes some time getting used to stuff being wrapped into Match and Junctions coming from Perl5 :) | ||
moritz | dvj: yes. But once you've got used to Match objects, you won't ever want to go back | 09:41 | |
especially when you try to extract the value of quantified capturing groups in Perl 5 | |||
and I mean all values, not just the last one :-) | 09:42 | ||
09:42
kresike joined
|
|||
kresike | hello all you happy perl6 people | 09:42 | |
09:43
ElDiabolo left
|
|||
mathw | happy people? where? | 09:51 | |
FROGGS | me is somewhat happy | ||
diakopter | I'm happy | ||
FROGGS | hi kresike | ||
09:52
proller left
|
|||
kresike | FROGGS, o/ | 09:53 | |
masak | hello happy kresike | 09:55 | |
and good forenoon, #perl6 | |||
09:55
dakkar joined
|
|||
mathw | actually, I'm fairly happy this morning | 09:55 | |
although I have lots of dull work to do | |||
kresike | hello masak o/ | 09:56 | |
FROGGS | mathw: well, "dull work" is the definition of $work, isnt it? | 10:02 | |
or better: $day_job | |||
10:02
hypolin left
|
|||
diakopter | FROGGS: nah, some people are blessed with jobs they enjoy | 10:03 | |
mathw | FROGGS: Not always! My other job's usually rather more interesting. However in two weeks I'm starting a new job to replace both of them so I don't know how interesting that one's going to be. I'm hoping for 'occasionally' or better. | ||
FROGGS | I wanna have an interesting job too ó.ò | 10:04 | |
mathw | so does everyone else | 10:05 | |
however, the last year or so I've come to really value a stable job too | |||
even if it's a bit less interesting | |||
10:08
dayangkun left
|
|||
masak | FROGGS: my $dayjob is not dull. | 10:09 | |
mathw | my saturday job certainly isn't dull :D | 10:12 | |
10:14
jerome joined
|
|||
moritz 's job isn't dull, but being paid to work on Perl 6 would be even better :-) | 10:14 | ||
mathw | :) | ||
masak | I guess that's why we're here. | 10:23 | |
mmcleric | [Coke], japhb: about play-perl and p6mw - play-perl.org/quest/512203d8e05a54a63a000022 - can you comment on that? | 10:40 | |
tadzik | \o/ | 10:41 | |
mmcleric | ohai | 10:43 | |
moritz | \o mmcleric | 10:48 | |
10:54
mmcleric left
|
|||
FROGGS | r: say "foobar" ~~ / [f|oo||b||a||r]+ / # is it valid to mix | and || ? | 11:04 | |
p6eval | rakudo b9ee89: OUTPUT«「foobar」» | ||
11:18
b1rkh0ff joined
11:23
salv0 joined
11:36
ObseLeTe left
11:39
Targen left
11:42
rindolf left
11:46
xinming left
|
|||
moritz | FROGGS: they simply have different precedences | 11:47 | |
S05 has the details | 11:48 | ||
11:49
xinming joined
11:57
hubba joined,
hubba left
12:00
renormalist left,
brrt joined
|
|||
masak | TimToady: why are "replication" (x xx) and "concatenation" (~) their own precedence levels, rather than "multiplicative" and "additive", respectively? | 12:01 | |
moritz | nr: say "we have " ~ 1000 * rand " open tickets" | 12:04 | |
p6eval | niecza v24-23-g0520c7c: OUTPUT«===SORRY!===Two terms in a row at /tmp/IoD0owAAoI line 1:------> say "we have " ~ 1000 * rand ⏏" open tickets"Parse failed» | ||
..rakudo b9ee89: OUTPUT«===SORRY!===Two terms in a rowat /tmp/0fHdHa4z2V:1------> say "we have " ~ 1000 * rand ⏏" open tickets" expecting any of: postfix infix or meta-infix infix stopper statement end sta… | |||
moritz | nr: say "we have " ~ 1000 * rand ~ " open tickets" | ||
p6eval | niecza v24-23-g0520c7c: OUTPUT«we have 965.92582015596611 open tickets» | ||
..rakudo b9ee89: OUTPUT«we have 1.56008228393034 open tickets» | |||
moritz | nr: say "we have " ~ 20 + 100 * rand ~ " open tickets" | ||
p6eval | niecza v24-23-g0520c7c: OUTPUT«we have 102.22957611187806 open tickets» | ||
..rakudo b9ee89: OUTPUT«we have 31.8332726971374 open tickets» | |||
moritz | ok, this one actually illustrates the point I wanted to make :-) | ||
masak | yes, I accept your point. that's the consequence of the separation of precedence levels -- we can leave off the parens there. | 12:05 | |
but... hm. the fact that we can there is still (mildly) surprising to me. | |||
12:05
mberends joined
|
|||
masak | mberends! \o/ | 12:05 | |
moritz: I guess my expectations differ from the precedence table, and that's it. | 12:06 | ||
mberends | masak! moritz! | 12:07 | |
moritz | mberends! | ||
tadzik | \o/ | 12:10 | |
masak .oO( tvtropes.org/pmwiki/pmwiki.php/Main...uousScream ) | 12:11 | ||
mberends! | |||
moritz: as in, I'd totally write that as "we have " ~ (20 + 100 * rand) ~ " open tickets" -- even *knowing* that the precedence table is that way. | 12:12 | ||
tadzik | I'll go for | 12:14 | |
(damnit, Return key) "foo bar {100 * 20 + rand} baz" | |||
masak | tadzik: then for the sake of the example let's make it $prefix ~ (20 + 100 * rand) ~ $suffix | 12:16 | |
tadzik | well, I'd still go for "" with a block inside :) | 12:17 | |
masak | I guess the situation can be summarized as "the separation of those levels in the precedence table allows for numeric calculation to be done inside a chain of ~s, without parenthesizing" | 12:18 | |
tadzik | I guess so | ||
moritz | aye | ||
masak | I think my surprise comes from the fact that I consider infix:<x> to be a multiplication operator, and thus wouldn't be at all surprised if it were sorted with infix:<*> | 12:19 | |
...and indeed, that's how Perl 5 does it. | |||
12:20
SmokeMachine joined
12:21
SmokeMachine left,
SmokeMachine joined
|
|||
moritz | fwiw I don't feel strongly either way | 12:22 | |
masak | I'm curious because (a) it's a difference from Perl 5, and (b) I know TimToady wouldn't frivolously add prec levels, so there has to be a correspondingly good reason for it. | 12:23 | |
my suspicion is that the reason comes from TimToady, not from the RFCs. :) | |||
12:30
hoelzro|away is now known as hoelzro
|
|||
moritz | r: my $x = 42; $x; say $x | 12:39 | |
p6eval | rakudo b9ee89: OUTPUT«42» | ||
moritz | huh, still doesn't work | ||
have I forgotten again to push my commits? | |||
12:39
mmcleric joined
|
|||
dalek | kudo/nom: 018b73b | moritz++ | src/Perl6/ (2 files): warn about variables in sink context |
12:41 | |
12:43
renormalist joined
12:47
kaleem left
|
|||
masak | moritz: bloody distributed version control systems. people commit and commit, but what good does it do? it's all local. :P | 12:56 | |
arnsholt | =D | ||
moritz | masak: indeed. And it doesn't help that I program rakudo on four different hosts | 12:57 | |
arnsholt | My boss (to the extent that I have on, being in academia) tried to sell me on his "industrial-strength" version control system (SVN) the other day | ||
masak | "I forgot to push" is the new "the dog ate my homework". | ||
moritz | and occasionally remotely from one on the other | ||
arnsholt | All in good humour of course, but I've still to needle him about the deficiencies of SVN =) | 12:58 | |
13:03
kaleem joined
|
|||
dvj | perl6: my $a = "asdf"; $a.substr(/\s+.*$/, ''); | 13:09 | |
p6eval | niecza v24-23-g0520c7c: OUTPUT«Unhandled exception: System.InvalidCastException: Cannot cast from source type to destination type. at Anon.1.MAIN.3e9c0f7f-de90-4af4-8b94-dbbd4ca5c7c3.C1ANON (Niecza.Frame ) [0x00000] in <filename unknown>:0  at Niecza.Kernel.RunCore (Niecza.Frame& cu… | ||
..rakudo b9ee89: OUTPUT«No such method '!cursor_start_all' for invocant of type 'Int' in regex at /tmp/OkAeclaTjF:1 in method substr at src/gen/CORE.setting:3904 in block at /tmp/OkAeclaTjF:1» | |||
13:10
kaleem left,
kaleem joined
|
|||
dvj | oh, I was using substr instead of subst | 13:10 | |
still, weird error message by rakudo | 13:11 | ||
13:11
FROGGS left
13:20
spider-mario left
|
|||
moritz | I agree | 13:20 | |
r: so /\s+.*$/ | |||
p6eval | rakudo 018b73: OUTPUT«No such method 'match' for invocant of type 'Any' in method Bool at src/gen/CORE.setting:10772 in sub prefix:<so> at src/gen/CORE.setting:2587 in block at /tmp/Bcj0Dp8iyr:1» | ||
jnthn | Well, you can pass a *-1 there | ||
So it thinks it's getting a whatever block, and invokes it with the number of elements | 13:21 | ||
r: /\s+.*$/(1) | 13:26 | ||
p6eval | rakudo 018b73: OUTPUT«No such method '!cursor_start_all' for invocant of type 'Int' in regex at /tmp/RCQPow3JFD:1 in block at /tmp/RCQPow3JFD:1» | ||
moritz | that's the old "violating the regex calling conventions should produce better error messages" problem | 13:27 | |
masak | aye. | 13:28 | |
13:29
FROGGS joined,
daxim_ joined
|
|||
jnthn | yes. | 13:30 | |
13:33
daxim left
|
|||
FROGGS | jnthn: I'm trying to match stuff in <?before ...> tokens, is it possible to pass these matches to the Actions.pm methods? | 13:35 | |
I have problems getting these values | |||
moritz | <?before> doesn't capture | ||
FROGGS | damn it | ||
13:35
xenoterracide left
|
|||
moritz | I wonder if if you can say <alias=?before ...? | 13:36 | |
erm. <alias=?before ...> | |||
FROGGS | will try | ||
moritz: github.com/rakudo/rakudo/commit/93...4a6247a97d | 13:37 | ||
I cen use $<twigil> in that grammar, but I am unable to bind it, say, to $*SOMETHING | |||
but I can do: :my $*SOMETHING := "1" | |||
I do get the "1" within the actions | 13:38 | ||
moritz | well, you have to declare $*SOMETHING in an outer rule | ||
jnthn | r: say '1234' ~~ /<before 2> \d+/ | 13:39 | |
p6eval | rakudo 018b73: OUTPUT«「234」 before => 「」» | ||
jnthn | oh, yeah, it'z zerowidth... :) | ||
FROGGS | r: say '1234' ~~ /<before $<thing>=[2]> \d+/ | ||
p6eval | rakudo 018b73: OUTPUT«「234」 before => 「」» | ||
moritz | otherwise it's gone by the time the action method for this rule is called | ||
jnthn | r: say '1234' ~~ /<before (2)> \d+/ | ||
p6eval | rakudo 018b73: OUTPUT«===SORRY!===Unrecognized regex metacharacter ( (must be quoted to match literally)at /tmp/jMZD9COhbS:1------> say '1234' ~~ /<before (2)> \d+⏏/Regex not terminatedat /tmp/jMZD9COhbS:1------> say '1234' ~~ /<before (2)… | ||
jnthn | Yeah | 13:40 | |
FROGGS | r: my $*THING; say '1234' ~~ /<before $<thing>=[2]> \d+ { $*THING := $<thing> } /; say $*THING | ||
p6eval | rakudo 018b73: OUTPUT«===SORRY!===Cannot use bind operator with this left-hand sideat /tmp/VKQOlWVzZI:1------> $<thing>=[2]> \d+ { $*THING := $<thing> ⏏} /; say $*THING expecting any of: postfix infix or meta-infix infi… | ||
jnthn | Try assignment | ||
moritz | FROGGS: try assigning (in rakudo at least) | ||
FROGGS | nqp: my $*THING; say('1234' ~~ /<before $<thing>=[2]> \d+ { $*THING := $<thing> } /); say($*THING) | ||
p6eval | nqp: OUTPUT«234» | ||
13:40
xenoterracide joined
|
|||
jnthn | That's an option, yes :) | 13:41 | |
FROGGS | nqp: my $*THING; say('1234' ~~ /<before $<thing>=[2]> \d+ { $*THING := $<thing>.Str } /); say($*THING) | ||
p6eval | nqp: OUTPUT«234» | ||
FROGGS | I though I've seen that somewhere... | ||
moritz | r: '1234' ~~ /<before $<thing>=2>234/; say $<thing> | ||
p6eval | rakudo 018b73: OUTPUT«Any()» | ||
moritz | heh, would have been too easy | ||
FROGGS | r: say('1234' ~~ /$<zw>=<before $<thing>=[2]> \d+ /); | ||
p6eval | rakudo 018b73: OUTPUT«「234」 zw => 「」 before => 「」» | ||
FROGGS | ya, zerowidth | 13:42 | |
r: say('1234' ~~ /$<zw>=<?[2]> \d+ /); | |||
p6eval | rakudo 018b73: OUTPUT«「234」 zw => 「」» | ||
FROGGS | r: say('1234' ~~ /$<zw>=<?[2]>? \d+ /); | ||
p6eval | rakudo 018b73: OUTPUT«「1234」 zw => 「」» | ||
moritz | r: 'abc' ~~ /<before <alpha>> bc/; say $<before><alpha> | ||
p6eval | rakudo 018b73: OUTPUT«Any()» | ||
FROGGS | r: say('21234' ~~ /$<zw>=<?[2]>? \d+ /); | ||
p6eval | rakudo 018b73: OUTPUT«「21234」 zw => 「」» | ||
13:42
skids left
|
|||
FROGGS | moritz: is it not <?before ...> ? | 13:43 | |
with an "?" ? | |||
moritz | well, usualy yes :-) | 13:44 | |
13:44
hoelzro is now known as hoelzro|away
|
|||
arnsholt | Oh, how I wish I could have sub MAIN in Perl 5 | 13:45 | |
13:45
sevin joined
|
|||
FROGGS | okay, so if I cant capture it, then I might do that at runtime... like in Cursor.INTERPOLATE | 13:45 | |
but then I might run into problem when / || @a / is optimized to / @a /, right? | 13:46 | ||
s/problem/problems/ | |||
moritz | erm, what problems? | ||
neither || @a nor @a captures | |||
FROGGS | no, that's not what I'm trying to do | 13:47 | |
@a = <a b c>; / @a / is equal to /[a|b|c]/ | |||
but / || @a / should switch to sequential | 13:48 | ||
like /[a||b||c]/ | |||
it is tricky to make these things right | 13:51 | ||
13:51
benabik left
|
|||
masak | arnsholt: you mean there isn't a CPAN module for sub MAIN yet? :) surprising. | 13:51 | |
arnsholt: OTOH, it's not really nice unless you also have multis. | 13:52 | ||
moritz | www.digi.no/911787/opera-sendte-90-paa-doren # now I'm glad I didn't join Opera last year | ||
masak | "Perl 6 isn't a menu of features you can pick and choose from." | ||
moritz | first you need proper subroutine signatures | ||
and preferrably a type system | |||
masak | right. and make sure not to break prototypes in the process! | 13:53 | |
or the existing light-weight types system. | |||
arnsholt | moritz: Wow. That's the department where I interned | ||
And yeah, I've actually toyed with the idea of making a MAIN module for Perl 5, but decided the tools aren't really there | 13:54 | ||
13:57
zamolxes_ left
14:00
dayangkun joined,
dayangkun left
14:01
PacoAir joined
14:12
lustlife left,
lustlife1 joined
14:21
Psyche^ joined
14:24
Patterner left,
Psyche^ is now known as Patterner
14:32
kaleem left
14:33
bluescreen10 joined
14:37
bluescreen10 left
14:41
hoelzro|away is now known as hoelzro
14:42
bluescreen10 joined,
bluescreen100 joined
14:43
pmurias joined
|
|||
pmurias | hi | 14:44 | |
tadzik | hi | 14:45 | |
14:46
PacoAir left
|
|||
colomon | n: sub postfix:<!>($n) { [*] 1..$n; }; say 26! / (2! * 24!) | 14:46 | |
p6eval | niecza v24-23-g0520c7c: OUTPUT«325» | ||
14:46
bluescreen10 left
|
|||
nwc10 | masak: who was it who said "Perl 6 isn't a menu of features you can pick and choose from." ? | 14:46 | |
I've forgotten | |||
14:46
PacoAir joined
|
|||
daxim_ | it's got layers. | 14:47 | |
14:49
am0c left
|
|||
moritz | I think it was TimToady, not sure though | 14:49 | |
14:49
phenny left
14:50
phenny joined
|
|||
nwc10 | I'm not sure if anyone said *that* directly :-) | 14:51 | |
FROGGS | nwc10: looks like it's about that: www.gossamer-threads.com/lists/engi...ply;so=ASC | 14:52 | |
nwc10 | that's me :-) | ||
masak | nwc10: it was someone on p5p. | ||
heh, yeah seems it was nwc10 :) | |||
nwc10 | "Message-ID: [email@hidden.address] is in my sent mail folder. :-) | ||
FROGGS | nwc10: I guessed that :o) | 14:53 | |
masak | 'Larry's overriding design decision for Perl 6 seems to be "I can't fix this in Perl 5".' -- I like that one too. | ||
I have that one as "You can't get here from there." | |||
nwc10 | which is actually more serious than simonkidd.wordpress.com/2010/08/12/...from-here/ | 14:55 | |
"I can't fix this in Perl 5" is heresy in some circles. | 14:58 | ||
masak | yes, of course. | ||
nwc10 | excellent topic to rant about over beer :-) | 15:01 | |
but, one's two biggies for starters | |||
Perl 5 (the current implementation) is never going to have decent threads | |||
Perl 5 (the current implementation) is never going to have better than O(n) Unicode [for code points] and O(n**2) Unicode [for graphemes] | 15:02 | ||
daxim_ | lwn.net/Articles/537621/ has this article been already discussed? the log search didn't find anything, so I don't know whether it's because I'm using it wrong or not | ||
moritz | daxim_: the fulltext search just plain sucks | 15:03 | |
masak | daxim_: ISTR it was discussed a few days ago. | 15:04 | |
moritz | anyway, just seems like chromatic's usual Perl 6 FUD and ranting | ||
brrt | daxim_, imho (haven't seen it yet), its a distraction | ||
lets keep trucking on | |||
masak | wow, only now I see that the title of that one is "Goodnight, Perl 6" (when chromatic's article was "Goodnight, Parrot") | ||
FROGGS | nwc10: the link "Taking YAPC::EU 2003 in Paris seriously" on your page is borken | ||
nwc10 | FROGGS: I should ask Elaine where that image lives now. | 15:05 | |
moritz | oh sorry, this one wasn't by chromatic. I misread the meta data. | 15:06 | |
daxim_ | I didn't notice that this article is a reply/comment, either | ||
brrt | anyway, a lot of people don't believe in perl6, and luckily, some do | ||
masak | oh, it appears to be two distinct lwn posts. one the child of the other. | 15:07 | |
15:07
stopbit joined
|
|||
huf | why are all these people personally insulted that p6 isnt ready by their concepts of ready? | 15:08 | |
masak | it appears to be a kind of cargo-culted anger. | ||
15:09
sevin left
|
|||
masak | there's not much thought about it. it reaches ridiculous proportions when people write "I waited five years for Perl 6, and then I used X instead", as if all they did for five years was to sit on a stool outside of a closed door waiting for something to happen. | 15:10 | |
I bet no-one ever did that. :) | |||
moritz | well, they would have starved first | ||
evolution takes care of us, so to speak | |||
masak hugs evolution | |||
brrt | :-) | 15:11 | |
tadzik | that'd be natural selection, actually | ||
evolution is when they mutate, no? | |||
masak | tadzik: last I looked, evolution and natural selection were, at the very least, good buddies. | ||
tadzik | oh they are | 15:12 | |
tadzik hums De-evolving by Jonathan Coulton | |||
huf | one drives the other | ||
masak | random genotype changes add entroy. natural selection removes it. | ||
daxim_ | bribe me to port Algorithm-Combinatorics. that would be a low-level yak for me in order to do more interesting stuff in the language. | 15:13 | |
tadzik | daxim_: I'll teach you an optimal way to tie a shoe | ||
masak | :P | ||
tadzik | serious offer | ||
masak | can you do it with one hand? | ||
15:13
spider-mario joined
|
|||
tadzik | nah | 15:13 | |
daxim_ | tadzik, I already know that! plus.google.com/108247278178090416...d69rD4pHTk | 15:14 | |
tadzik | oh, that's merely about, er, Węzeł Płaski and Węzeł Babski, however you call that in English :) | 15:15 | |
huf | hmm? | ||
is this some nursery rhyme? | |||
tadzik decomutees | 15:16 | ||
daxim_ | okay, if you have something better to offer than this, then I accept your proposal! deal? | 15:17 | |
colomon | daxim_: For what it's worth, I just added combinations to List::Utils. | ||
daxim_ | oh, good | 15:18 | |
masak | huf: seems to be related to en.wikipedia.org/wiki/File:Granny_knot.svg | ||
the terms seem to mean "flat knot" and "woman's knot". | 15:19 | ||
colomon | r: my $a = [].shift; say $a | ||
p6eval | rakudo 018b73: OUTPUT«Element shifted from empty list in method gist at src/gen/CORE.setting:10516 in sub say at src/gen/CORE.setting:7601 in block at /tmp/Ml5j36QVfu:1» | 15:20 | |
colomon | r: my $a = [].shift; say $b; say $a | ||
p6eval | rakudo 018b73: OUTPUT«===SORRY!===Variable '$b' is not declaredat /tmp/yQKgiaQWKG:1------> my $a = [].shift; say $b⏏; say $a expecting any of: postfix» | ||
colomon | r: my $a = [].shift; say 42; say $a | ||
p6eval | rakudo 018b73: OUTPUT«42Element shifted from empty list in method gist at src/gen/CORE.setting:10516 in sub say at src/gen/CORE.setting:7601 in block at /tmp/fY0o3SYuJ5:1» | ||
huf | masak: how do you call one half of that? | ||
masak: the most basic building block of knots | |||
masak | huf: no idea. :) | ||
huf | cause yeah, they taught us this to tie our sails on the boom | 15:21 | |
colomon | r: my $a = [].shift; say 42; say $a ~~ Failure | ||
p6eval | rakudo 018b73: OUTPUT«42True» | ||
colomon | r: my $a = [].shift; say 42; say $a !~~ Failure | 15:22 | |
p6eval | rakudo 018b73: OUTPUT«42False» | ||
nwc10 | I had thought that the anger about lateness is sort of www.corsinet.com/braincandy/hlife.html | ||
but I'm not so sure | |||
Ovidius | I don't see it as anger so much as being tired of waiting and giving up. | 15:23 | |
nwc10 | there's this feeling that "something should be done to improve Perl 5" "Preferably yesterday" "without changing the stuff that I like" | ||
without, I feel, most people who want it (quite legitimately, I agree) | |||
arnsholt | To me, chromatic seems inordinately concerned with what other people spend their time on, as well | 15:24 | |
nwc10 | really having a good feeling for how hard it is to do. | ||
Do too little, and you ship, but are as popular as Python 3 | |||
do too much, and you don't ship (yet) | |||
arnsholt | Although, to be fair, I'm not really familiar with the history (of which there seems to be a fair amount) of that particular story | 15:25 | |
nwc10 | There are a lot of things I'm not going to say | ||
but I will say that chromatic gave a lot of his own time fixing hard, nonfun bugs in Parrot which no-one else wanted to get their hands dirty with. | |||
which has defineately helped Rakudo get where it is today | 15:26 | ||
arnsholt | That's good at least | ||
nwc10 | and, that I don't think that there is anyone now doing that unfun job that he used to do | ||
masak | indeed. | 15:27 | |
colomon | r: my $a = [].shift; say 42; say $a.defined | ||
arnsholt | Probably not, yeah | ||
p6eval | rakudo 018b73: OUTPUT«42False» | ||
PerlJam | good $localtime all | 15:32 | |
masak | PerlJam! \o/ | ||
PerlJam | masak! | ||
:) | |||
pmurias | nwc10: "re do little" there were a couple implementations compiling Perl 6 to Perl 5 (sacrificing some of the harder features), that were relatively usable but there was little interest in them | ||
15:34
sftp joined
|
|||
colomon | moritz: when you get a chance, can you look at the test failures in List::Utils? The code works fine in Niecza, I believe it used to work fine in Rakudo, but something weird is happening with exceptions (?) with the current Rakudo. | 15:36 | |
r: my $a = [].iterator.list.shift; say 42; say $a.defined | 15:37 | ||
p6eval | rakudo 018b73: OUTPUT«42False» | ||
15:37
tokuhiro_ joined,
sftp left
15:39
crab2313 joined,
thou joined
15:41
sftp joined
15:42
rindolf joined
|
|||
moritz | n: my $a = [].iterator.list.shift; say 42; say $a.defined | 15:44 | |
p6eval | niecza v24-23-g0520c7c: OUTPUT«42False» | ||
moritz | colomon: I'll try | ||
colomon | moritz: danke | ||
moritz | though tuits are stretched thin, and will be for quite a while :( | ||
dalek | kudo-js: 8854e88 | pawel++ | runtime.js: Bring our implementation of 6model closer to nqp-jvm. |
15:45 | |
kudo-js: 4f7e3dd | (Pawel Murias)++ | runtime.js: Remove *loads* of dead code from before the serialization refactor. |
|||
15:49
skids joined
15:50
kaare_ joined
15:57
kivutar joined
16:02
tokuhiro_ left
16:11
census joined
|
|||
PerlJam | Queen has taught me a couple of things this morning ... fat bottom girls make the rockin' world go 'round ... Queen will rock you ... and ... we are the champions. | 16:15 | |
:-) | |||
masak | "Queen" will rock you, but "we" are the champions? | ||
that sounds rather inconsistent :) | |||
PerlJam | masak: beware the hobgoblins of foolish consistency ;) | 16:16 | |
colomon | n: sub postfix:<!>($n) { [*] 1..$n; }; say 10! / (4! * 6!) | 16:17 | |
p6eval | niecza v24-23-g0520c7c: OUTPUT«210» | ||
masak | PerlJam: heh :) | ||
PerlJam | (also, I said "a couple of things", but I listed 3. It's poetic license or something ;) | ||
masak | that one is fine. the formal definiton of "a couple" is 2..3 | 16:18 | |
colomon | n: sub postfix:<!>($n) { [*] 1..$n; }; say 10! / (5! * 5!) | ||
p6eval | niecza v24-23-g0520c7c: OUTPUT«252» | ||
jnthn | .oO( Beware the Hobgoblins? But they taste so good! ) |
16:19 | |
PerlJam | masak: I've never seen anyone go "oh, what a cute couple!" when they see three people holding hands going down the street. | ||
jnthn | PerlJam: hah, I was thinking the same :) | 16:20 | |
moritz | PerlJam: that's why German has the distinction between "paar" and "Paar" | ||
:-) | |||
colomon remembers having the "3 is a couple" debate with his father back in elementary school. | 16:21 | ||
16:21
domidumont left
|
|||
PerlJam | masak: and how many is "a few" ? :) | 16:22 | |
FROGGS | at least two, that's all I know | 16:23 | |
kresike | bye folks | 16:29 | |
16:29
kresike left,
kivutar left
|
|||
PerlJam | I think something is defective in my brain ... everytime I see "kresike", I think of West Side Story and Officer Krupke | 16:30 | |
huf | i think of a very small crash | 16:31 | |
but i have inside information | |||
a ... crashling? | 16:32 | ||
16:32
brrt left
|
|||
skids prefers the trollish counting system. It has only three numbers: one, two, and "yes, definitely two". | 16:33 | ||
masak | :) | 16:36 | |
pmurias | jnthn: what's the difference between isnull and isnull_s? | 16:43 | |
colomon is a bit puzzled why his combinations routine is so painfully slow on, say 10 choose 5 | |||
masak | colomon: maybe it's generating big lists of things eagerly. | 16:44 | |
jnthn | pmurias: Object vs. native string | ||
colomon | masak: nope, it's lazy | 16:45 | |
jnthn | pmurias: On the JVM they go down to the same op | ||
colomon | well, I guess my test for it is not lazy. hmm. | ||
pmurias | jnthn: the distinction makes sense on Parrot? | ||
jnthn | pmurias: And anywhere else we need to keep native strings and objects distinct. | 16:46 | |
We only get away with it on the JVM because it can't tell one null from amother :) | |||
uh, another | |||
masak .oO( a Freudian slip is meaning one thing but saying your mother ) | 16:47 | ||
pmurias | jnthn: is null a valid native string? | ||
jnthn | pmurias: I guess it's more the absence of a string :) | 16:48 | |
pmurias | but a native string variable can store those? | ||
jnthn | Yes | ||
pmurias | on parrot we have both a null and string null? | 16:49 | |
jnthn | Correct. | ||
colomon | masak: aha, appears a lot of the slow is in my tests to verify the combine returned is correct. :) | ||
jnthn | On the JVM they're both just a NULL. | ||
uh, null | 16:50 | ||
aconst_null | |||
:) | |||
colomon | r: say +("a" .. "m") | ||
p6eval | rakudo 018b73: OUTPUT«13» | ||
colomon | n: sub postfix:<!>($n) { [*] 1..$n; }; say 13! / (5! * 8!) | 16:51 | |
p6eval | niecza v24-23-g0520c7c: OUTPUT«1287» | ||
colomon | oh | ||
r: say +("a" .. "h") | |||
p6eval | rakudo 018b73: OUTPUT«8» | ||
pmurias | jnthn: do we have docs on nqp ops somewhere? | ||
jnthn | nqp-opcode.txt is the closest to that | 16:52 | |
pmurias: They need documenting much better, it's just getting around to it... :) | 16:53 | ||
FROGGS | moritz / jnthn: can you help me with this? gist.github.com/FROGGS/d704ce02283dfdde53df | 16:59 | |
TimToady | masak: nah, it just means you're getting father from the truth | ||
FROGGS | I dont know where the error comes from | ||
FROGGS .oO( Truth, I am your father! ) | 17:00 | ||
pmurias | I'll start documenting the more tricky opcodes soon | 17:01 | |
jnthn | <.unset_SEQ> | 17:04 | |
That doesn't return a Cursor | |||
{ self.unseq_SEQ } | |||
But why not just { $*SEQ := 0 } :) | |||
FROGGS tries | |||
jnthn | But...how will that ever actually match? :) | 17:05 | |
It can't be before a || *and* before a sigil :) | |||
I think you'd have much better look setting a contextual in termaltseq and termalt | 17:06 | ||
*luck | |||
Or maybe nibbler | 17:07 | ||
masak | nibbler! \o/ | ||
jnthn | om nom nom nom nom regex! | ||
17:08
pmurias left,
b1rkh0ff left
|
|||
pmichaud | jnthn: (MARKED/MARKER) feel free to adjust them however you wish | 17:13 | |
ParseShared is indeed where I expected it to end up | 17:14 | ||
jnthn | pmichaud: OK, if it feels right to you too, I'm happy to go ahead and do it. | 17:15 | |
pmichaud | yeah, this week is going to be a little hectic for me :-/ | ||
jnthn | I'm gonna be fairly tied up tomorrow/Wednesday, but Thursday looks tuitful. | 17:16 | |
Maybe get some time this evening...depends how my slide writing godes :) | |||
uh, goes | |||
17:17
Chillance joined
17:20
b1rkh0ff joined
17:27
SmokeMachine left,
hoelzro is now known as hoelzro|away
17:28
SmokeMachine joined
17:31
Chillance left,
mberends left,
fgomez left,
avar left,
sorear left,
kshannon left
17:36
Chillance joined,
mberends joined,
fgomez joined,
avar joined,
sorear joined,
kshannon joined
|
|||
masak | "tuitful", what a delightful neologism. | 17:40 | |
TimToady | well, that's just using a productive suffix | ||
round tuition is more like a neologism | 17:41 | ||
not to mention a pun... | |||
I suppose a real linguist might consider "round tuition" to be a portmanteau | 17:42 | ||
TimToady tries to visualize an airportmanteau | 17:43 | ||
huf | ow | ||
nwc10 | milimetre backscatter? | 17:44 | |
at least, would that be the form that it takes? | |||
TimToady | backscattergun? | ||
FROGGS | jnthn: by "setting a contextual" you mean that I should add stuff to the AST that declares a var that I'll check in INTERPOLATE? | 17:46 | |
TimToady | a new word from Indonesia might be a Borneologism? | 17:47 | |
jnthn | FROGGS: I think you'd pass it as a parameter to interpolate | ||
FROGGS | I like INTERPOLITE though, always wanna type that instead... | ||
jnthn | FROGGS: But track the need to do so using the contextual | 17:48 | |
A little like we do with the case-insensitive flag | |||
FROGGS | so you mean like a global $*THING variable? then I must make sure to reset it right, in case of /[ 1 || @a] @b / | 17:50 | |
17:50
not_gerd joined
|
|||
not_gerd | o/ | 17:50 | |
jnthn | Well, it's not really global, it's dynamic. The important thing is that you're looking for being directly lexically nested in such an alternation, and dynamics at compile time represent the lexical shape of the program. | 17:51 | |
not_gerd | oO( s/expixit/explicit/ - the keys are like... right next to each other ) | ||
17:55
Targen joined
|
|||
TimToady | hmm, www.gossamer-threads.com/lists/perl...392#283392 seems just a bit revisionist to me; paraphrasing: "the initial four revisions of MOP weren't for Perl 6, they were for pugs." Right... | 18:03 | |
18:05
daxim_ left
18:06
dakkar left
|
|||
rjbs | That's weird. | 18:06 | |
sure is interesting times in perl, this month. | 18:07 | ||
(although I see that's pretty old) | |||
PerlJam | 2013 is shaping up to be a watershed year for Perl (both 5 and 6) | 18:08 | |
rjbs | watershed meaning that I'm shedding water from my eyes? | ||
PerlJam | I can't wait to see what happens in March and April! :) | ||
rjbs | Seems like the same old sound and fury to me. | ||
Significand yet to be determined. | 18:09 | ||
japhb | mmcleric, re: irclog.perlgeek.de/perl6/2013-02-18#i_6466917 , I'd simply say two things: 1) What coke said -- the work lists would have to be shared, since (as predicted) they ended up being rather extensive, and 2) p6mw moved to github.com/perl6/perl6-most-wanted , where you can see the size and scope of the current lists | 18:20 | |
Also, while I accept the necessity of using github to work with the Perl 6 ecosystem, I chafe at having to use Twitter for ... well, anything, but in particular just to use Play Perl. | 18:22 | ||
mmcleric | auth with github is already in works, and auth with one-time email tokens is not far away too | 18:23 | |
I know that's a popular demand | |||
those lists are huge | |||
are they prioritized? do we have to import everything, or can we start with a most important subset? | |||
japhb | Yay, glad to hear about the new auth methods | 18:24 | |
mmcleric | (I jus treplied to coke here: play-perl.org/quest/512203d8e05a54a63a000022) | ||
japhb | Yup, I told you the lists were big. ;-) | ||
colomon | woah, mmcleric is right. What's the point of having a most-wanted list if everything under the sun is on it? | ||
cotto | How much do people care about Parrot's current profiling tools? | ||
keep them? Nuke them? Fix them? | |||
PerlJam | cotto: I typically want to profile at a level above Parrot, so ... | 18:25 | |
japhb | colomon: Here's the problem -- we need both small and large things for people to work on; and clearly, a lot of people have been getting to work over the last couple years. | ||
jnthn | cotto: The sub-level profiler is useful | ||
cotto | jnthn: thanks | 18:26 | |
japhb | But I think people were kidding themselves about how ready Star was for people to be using it heavily in the wild. There's just so much that people expect to do easily in Perl that isn't there yet. | ||
jnthn | perl6 --profile x.p6 2> foo.callgrind # I've used this kinda thing quite a bit. The output is often helpful. | ||
japhb | So I threw some effort into figuring out (and detailing) just how much was left to do. | ||
cotto | jnthn: is that the only one you personally care about? | 18:27 | |
18:27
SamuraiJack left
|
|||
colomon | japhb: if the list is just "things it would be nice if someone worked on sometime", isn't that just the "wanted" list? | 18:27 | |
jnthn | cotto: I'm pretty sure --profile is doing the sub level profiling. I don't know that I've used (or found useful) anything else. In fact, I'm not aware of what else is out there ;) | 18:28 | |
colomon | japhb: ie I was expecting "most wanted" to be, OMG, we need this ASAP. | ||
18:28
SamuraiJack joined
|
|||
jnthn | colomon: I think that the "everything that's wanted" list would be a lot longer. :) | 18:29 | |
TimToady | just use a level of indirection and call it "CPAN" | ||
PerlJam | TimToady: heh, I was just thinking that | ||
cotto | jnthn: thanks. That's a useful data point. | 18:30 | |
japhb | colomon, Yes, I certainly see your point with that. However, I can't provide that prioritization by myself -- I basically took a collection of what different communities and people saw as important to their daily work, applied a modicum of sanity to it, and categorized it. But everything on there is important in some way. I'm not qualified without community input to judge *most* important. | ||
Though I guess that's the reasoning behind trying to port it to Play Perl. | |||
Because then people can actually vote it around and bubble the real key stuff to the top. | |||
mmcleric | exactly, PP can help you to crowdsourse prioritization | ||
[Coke] | which is going to give us much better answers than #perl6 is. | 18:31 | |
s/is/can/ | |||
japhb | heh | ||
PerlJam | mmcleric: so ... does PP have quests for others to take on? | ||
mmcleric | PerlJam: play-perl.org/quest/512203d8e05a54a63a000022 - read this and links from this | 18:32 | |
tl;dr: not yet, but it's my priority this week | |||
PerlJam | mmcleric++ :) | ||
mmcleric | note that my vacation is over, so I'll be a bit slower from now on than last week… but I still think it'll be ready in a few days | 18:33 | |
TimToady | we need an abbreviation for tl;dr | 18:34 | |
mmcleric | TimToady: new unicode character? | 18:35 | |
japhb | .oO( A little square box with tl at the top and dr at the bottom ) |
||
TimToady | or just use ⏏ | ||
your program was too long, and I didn't read it... | |||
std: your program was too long, and I didn't read it... | 18:37 | ||
p6eval | std 7551b8f: OUTPUT«===SORRY!===Bogus term at /tmp/Ascza9dlyL line 1 (EOF):------> am was too long, and I didn't read it...⏏<EOL>Undeclared routines: 'it' used at line 1 'long' used at line 1Parse failedFAILED 00:00 43m» | ||
TimToady | hmm, in this case, it did read it all | ||
I guess it "didn't read" the <EOL> | 18:38 | ||
colomon | mmcleric++ japhb++ | 18:47 | |
18:49
not_gerd left
18:55
SamuraiJack left
18:58
fhelmberger left
19:10
jac50 joined
19:17
alester joined
|
|||
Harzilein | what's are example for crazy internal dsls that work with niecza and rakudo right now? | 19:31 | |
what* | 19:32 | ||
examples* | |||
19:32
PacoAir left
|
|||
TimToady | that would depend on how you define "crazy", "internal", and "dsl" | 19:33 | |
PerlJam | Harzilein: Perl 6 ;) | ||
TimToady | but quotes and regex are the main ones | ||
Harzilein | i mean "programmer-defined" | 19:34 | |
19:34
PacoAir joined
|
|||
PerlJam | Harzilein: I believe ABC is a dsl that works on both R and N | 19:34 | |
TimToady | nr: say Q:s/ { my pid == $*PID } / | ||
p6eval | rakudo 018b73: OUTPUT« { my pid == 2919 } » | ||
..niecza v24-23-g0520c7c: OUTPUT«Use of uninitialized value in string context at /home/p6eval/niecza/lib/CORE.setting line 1290 (warn @ 5)  at /home/p6eval/niecza/lib/CORE.setting line 266 (Mu.Str @ 15)  at <unknown> line 0 (ExitRunloop @ 0)  at /tmp/kMgbioCqLW line 1 (mainline @ … | |||
masak | Harzilein: you can get pretty far by defining subs which use dynamic variables. | 19:35 | |
TimToady | Q:s is a user-defined quote | ||
masak | Harzilein: the really crazy stuff will need macros and/or slangs. | ||
PerlJam | Harzilein: github.com/colomon/ABC (but ask colomon about it) | ||
TimToady | to me, user-defined != internal | ||
PerlJam | Harzilein: maybe git://github.com/tadzik/Bailador.git fits your criteria too? | 19:36 | |
TimToady | or do you mean "defined by using Perl 6"? | ||
masak | right, the "internal" in "internal DSL" means "using the programming language itself to do the DSL". | ||
ABC would be very much an external DSL. | 19:37 | ||
that's Fowler's terminology, by the way. | |||
Harzilein | masak: i meant that with internal, right. | ||
masak | then I agree that Bailador is the best we have. | ||
Harzilein: you might also want to check out my advent post on the topic. | |||
dvj | I wrote a module to strip HTML tags using grammar. It turned out to be *very* slow. I'm new to Perl6, so could anyone give me pointers on what I'm doing wrong? | 19:38 | |
masak | but the *really* crazy stuff will come when we have sufficiently advanced macros and slangs. | ||
PerlJam | Harzilein: why do you ask anyway? Looking for something to work on? or just curious? | ||
dvj | module: github.com/dagurval/HTML-Strip/blo.../Strip.pm6 | ||
masak | Harzilein: here: perl6advent.wordpress.com/2012/12/2...-y-things/ | ||
PerlJam | dvj: what makes you think it's *you* that's done something wrong? ;) | 19:40 | |
masak | dvj: looks good to me -- I don't see any obvious slowdowns. | ||
TimToady | you might try it with niecza, which might run it faster than rakudo, if it runs | 19:41 | |
masak | dvj: of course, if all you want to do is strip HTML tags, then probably you could get away with .split(&html_tag_regex).join() :) | ||
dvj | good to hear :) Documents were taking up to 15min to parse so I thought it must be me | 19:42 | |
PerlJam | dvj: Maybe it's IO that's causing your grief? How big are the HTML files you're throwing at it? | ||
dvj | masak: Then I wouldn't learn grammar ;) | ||
FROGGS | 15minutes? wow | 19:43 | |
PerlJam | dvj: you can try github.com/perlpilot/Grammar-Profiler-Simple to see if there are any bottle-necks in your grammar. | ||
TimToady | dvj: currently grammars are designed for maximum flexibility, not maximum speed; the speed will come later (we hope) when we figure out how to optimize our grammars better | 19:44 | |
dvj | PerlJam: doc.perl6.org/ <-- takes several minutes | ||
TimToady: that sounds good to me. I'm just glad I'm using them right hehe | |||
TimToady | for instance, right now all method calls in our grammars are virtual | 19:45 | |
dvj | PerlJam: I'll try out that module | ||
TimToady | but de-virtualizing method calls will tend to take whole-program analysis | ||
and a certain amount of type inferencing | |||
but also, pretty much everything runs slow on rakudo/parrot so far. hoping this changes some when we get rakudo/JVM, but we'll see | 19:47 | ||
colomon | Harzilein: masak++ is right, ABC is about processing external ABC files, not making your p6 code look like ABC. | ||
alester | masak: I haven't forogtten about our article. | 19:52 | |
masak | colomon: would be kinda cool to have it as an internal DSL, I guess :) | 19:53 | |
but Perl 6 does not stop at the limits that, say, Ruby does. | |||
we mean to do internal DSL for realz. :) | 19:54 | ||
alester: oh, cool. PerlJam++ has supplied some starting material for when you're ready. | |||
colomon | masak: it's kind of a cool idea as a toy, but since the entire point of the project is to processing external files... | 19:55 | |
dalek | osystem: f773b23 | Dagur++ | META.list: Added HTML-Strip |
19:58 | |
osystem: 70539c4 | colomon++ | META.list: Merge pull request #18 from dagurval/patch-1 Added HTML-Strip |
|||
alester | masak: Can you drop it in mail to me please? | ||
20:01
benabik joined
|
|||
masak | alester: will do. | 20:06 | |
colomon: ah, ok. perhaps not so worthwhile, then :) | 20:07 | ||
alester: sent. | 20:08 | ||
20:08
benabik_ joined,
benabik left,
benabik_ is now known as benabik
20:14
benabik left
20:23
brrt joined
20:24
benabik joined
20:26
zamolxes joined
20:29
colomon left
|
|||
ingy | jnthn: are you going to .tw this osdc? | 20:31 | |
jnthn: and/or do you know anyone else who is? | |||
TimToady | r: 1+2 | 20:32 | |
p6eval | rakudo 018b73: ( no output ) | ||
TimToady | r: 1+2; 42 | ||
p6eval | rakudo 018b73: OUTPUT«WARNINGS:Useless use of constant expression "1+2" in sink context (line 1)» | ||
TimToady | r: $_ + 2; 42 | ||
p6eval | rakudo 018b73: OUTPUT«use of uninitialized variable $_ of type Any in numeric context in block at /tmp/98pvsVH2_P:1» | ||
TimToady | that should warn about useless use of + in sink context | ||
r: my $x = 1, 2; 42 | 20:33 | ||
p6eval | rakudo 018b73: ( no output ) | ||
TimToady | and that should warn about useless use of , in sink context, unless it distributes, in which case it's useless use of 2 | ||
jnthn | ingy: No, not this year I'm afraid. | ||
20:33
colomon joined
|
|||
TimToady | moritz: ^^ | 20:34 | |
ingy | jnthn: thx | 20:35 | |
TimToady | (I'm inclined to say that the sink context distributes to its list members) | ||
20:35
brrt left
|
|||
TimToady | otherwise we'll get warnings on loop(my $i = 1, my $j = 2; ...; ...) | 20:36 | |
which should be perfectly fine | |||
jnthn | Space before paren :P | 20:37 | |
TimToady | except for that | ||
it's missing a block too :P | |||
std: loop(my $i = 1, my $j = 2; ...; ...) # curious | 20:38 | ||
p6eval | std 7551b8f: OUTPUT«===SORRY!===Undeclared routine: 'loop' used at line 1Check failedFAILED 00:00 44m» | ||
TimToady | std: sub loop {...}; loop(my $i = 1, my $j = 2; ...; ...) # curious | ||
p6eval | std 7551b8f: OUTPUT«ok 00:00 45m» | ||
TimToady | (wasn't sure whether an arglist allowed ; or not | ||
) | 20:39 | ||
FROGGS | for Undeclared routine: '<built-in>' it might suggest to add a space to avoid function call syntax | ||
TimToady | std: if(42) {...} | ||
p6eval | std 7551b8f: OUTPUT«===SORRY!===Word 'if' interpreted as 'if()' function call; please use whitespace instead of parens at /tmp/wdpUkhsxpG line 1:------> if⏏(42) {...}Unexpected block in infix position (two terms in a row) at /tmp/wdpUkhsxpG line 1… | ||
TimToady | does for that one | ||
std: loop(my $i = 1, my $j = 2; ...; ...) {...} | 20:40 | ||
p6eval | std 7551b8f: OUTPUT«===SORRY!===Word 'loop' interpreted as 'loop()' function call; please use whitespace around the parens at /tmp/aqITgBAQXS line 1:------> loop⏏(my $i = 1, my $j = 2; ...; ...) {...}Unexpected block in infix position (two terms i… | ||
TimToady | does for that one too | ||
but it needs the block to trigger it | |||
it's really yet another ttiar error | |||
FROGGS | right, but that's perfectly fine I guess | 20:41 | |
(that it needs a block) | |||
TimToady | if there isn't a block, then they obviously wanted to call it as a function :) | ||
FROGGS | I did: "if( bla bla );{ more bla }" years and years ago in php and was searching at least 30minutes for the error -.- | 20:42 | |
and then I found the problem sitting on my chair | 20:43 | ||
20:44
rindolf left,
rindolf joined
|
|||
moritz | TimToady: I intentionally don't warn about stuff in sink context that warns or throws exceptions | 20:50 | |
because of things like ~$failure | 20:51 | ||
which blows up, and might be intentional | |||
FROGGS | \o/ locally: | 20:52 | |
./perl6 -e 'my @a = <x xxxxxxx xxx>; say "xxxxxxxxx" ~~ /1 | @a/' ==> 「xxxxxxx」 | |||
./perl6 -e 'my @a = <x xxxxxxx xxx>; say "xxxxxxxxx" ~~ /1 || @a/' ==> 「x」 | |||
though it needs something before || and | | |||
but I'll get around that | |||
jnthn | \o/ | ||
20:53
jac50 left
20:54
jac50 joined
|
|||
TimToady | moritz: the warning is still more useful; I'd suggest some other way to suppress the warning if that's what they intended | 20:56 | |
moritz | TimToady: I can experiment with it | 20:58 | |
21:01
adu joined
|
|||
lue | std: say#`[]42; # I'm curious as to how it's I<this> syntax error | 21:03 | |
p6eval | std 7551b8f: OUTPUT«===SORRY!===Unsupported use of bare 'say'; in Perl 6 please use .say if you meant $_, or use an explicit invocant or argument at /tmp/EBTn6Y1j2f line 1:------> say⏏#`[]42; # I'm curious as to how it's I<tTwo terms in a row (lis… | ||
21:09
rindolf left
21:12
alec__ left,
nik joined
21:13
nik is now known as Guest29967,
Guest29967 left
21:16
benabik left
21:17
benabik joined
21:19
alec__ joined
21:20
SmokeMachine left
21:22
spider-mario left
21:28
colomon left
21:29
domidumont joined
21:34
spider-mario joined
21:40
kaare_ left
21:42
alec__ left,
benabik left
21:49
domidumont left
21:50
domidumont joined,
PacoAir left
21:51
PacoAir joined
21:52
jac50 left
21:53
jac50 joined
|
|||
dalek | kudo/nom: 5101a54 | moritz++ | src/Perl6/Optimizer.pm: add some type annotations to the Optimizer code |
21:54 | |
22:00
donaldh joined
22:03
alec__ joined,
lustlife1 left
22:06
domidumont left
22:11
skids left
22:12
crab2313 left
22:17
bluescreen100 left
22:19
PacoAir left
22:27
proller joined
22:40
Targen left
|
|||
lue | What is a [...] composer? (I'm sure I've seen it, but don't know what the name means) | 22:42 | |
(from the top of S02, btw) | 22:43 | ||
masak | r: say [1, 2, 3] | ||
p6eval | rakudo 5101a5: OUTPUT«1 2 3» | ||
masak | lue: it's when the [] create an Array object, like that. | ||
r: say [+] 1, 2, 3 | |||
p6eval | rakudo 5101a5: OUTPUT«6» | ||
lue | See, I knew I've already seen it :) | 22:44 | |
masak | lue: the parser has to keep these two cases (array composer, reduce metaop) apart. | ||
and that means doing a bit of lookahead. | |||
dalek | p/target-pbc: 6840a47 | (Gerhard R)++ | src/HLL/Compiler.pm: Restore old semantics of HLL::Compiler.compile() Returning the main sub would have worked, but is conceptionally wrong For now, just add a note about the proper solution |
22:48 | |
22:54
pmurias joined
22:59
adu left
|
|||
pmurias | masak: re DSLs isn't that something to be afraid of. That is libraries being created as DSL sacrificing composability to gain cuteness? | 22:59 | |
masak | I'm not sure why that should be feared more for DSLs than for any modification of the current language. (adding global subs, or types) | 23:00 | |
DSLs are just that, but... more. | |||
rjbs wants a zero-qualification form of orelse. | 23:05 | ||
.commit orelse; | |||
As usual, I have a remedial question about a basic concept. | 23:06 | ||
infex:<orelse> returns the left argument if defined, otherwise, the right. Great, I get it. | 23:07 | ||
It says it is for "the first argument that evaluates successfully" (in S03). I understand "first" because it's showing a chain of orelse clauses. | |||
23:07
labster joined
|
|||
rjbs | Is "evaluates successfully" related to the concept that I understand only vaguely, of returning failures that seem undef, but are fatal if touched just so? | 23:08 | |
labster | lue: I was thinking about playing around with Lingua::EN::Numbers::Ordinal, can you accept GlitchMr++'s commit to make it panda compatible? | 23:11 | |
rjbs is now reading S04/Exceptions. | |||
labster | *pull request | ||
lue | ah, let me look it over. | ||
23:12
adu joined
|
|||
lue | done. :) | 23:13 | |
masak | rjbs: I believe so. | ||
rjbs: I tend to read "evaluates successfully" as "returns something defined", though. not sure that's an approximation that holds up. | 23:14 | ||
rjbs sees that orelse-ing a Failure marks it handling like any other defined() test. | |||
lue | .oO(I need to finish the "17th" form in Ordinal, IIRC) |
||
23:14
Chillance left
|
|||
rjbs | I think it has to hold up for this to be useful, most of the time. | 23:14 | |
perl6++ | 23:15 | ||
23:18
pmurias left
|
|||
labster | thanks lue++. I have this strange idea that I'd go through the ecosystem, find things that don't work, and see if I can bring it up to spec. | 23:18 | |
masak | labster++ | 23:19 | |
jnthn | labster++ # that's certainly a good hing | ||
*thing | |||
23:20
geekosaur left
|
|||
masak | 'night, #perl6 | 23:20 | |
labster | night, masak | 23:21 | |
I just got tired of waiting for Perl 6 to just happen, so I figure I should just contribute some code. There needs to be some sort of working ecosystem to attract developers, and I don't want people to get frustrated when things don't work and go to a different language. | 23:22 | ||
23:22
geekosaur joined
|
|||
rjbs | I often find it useful to throw "__END__" in a Perl 5 program to block off my pseudocode yet to be converted to real code. | 23:22 | |
Is there something to use for that in p6? | 23:23 | ||
jnthn | =END I think | 23:24 | |
23:25
colomon joined
|
|||
rjbs | S16 tells me to use q:p{filename} but :p is unrecognized adverb for Rakudo. Just drop it?" | 23:25 | |
geekosaur | I think most of that stuff is unimplemented as yet | 23:26 | |
jnthn | rjbs: Yes, though then you'll get a string, not a...path, whatever that should produce | 23:27 | |
rjbs produced a file of 0xF000 nuls, so that's a start! | |||
23:30
spider-mario left
|
|||
rjbs | How do I get a one-byte buffer containing (say) 0x01? | 23:32 | |
jnthn | my $b = Buf.new(0x01); | 23:34 | |
my $b = Buf.new(0x01); my $fh = open('foo', :w, :bin); $fh.write($b); $fh.close # gets me a 1 byte file | |||
rjbs | Thanks. I was about to use pack. | ||
23:36
alec__ left
|
|||
donaldh | jnthn: are findcclass and findnotcclass needed for nqp-jvm ? | 23:37 | |
colomon | > use List::Utils | 23:38 | |
> combinations("a".."d").perl | |||
([], ["a"], ["b"], ["c"], ["d"], ["a", "b"], ["a", "c"], ["a", "d"], ["b", "c"], ["b", "d"], ["c", "d"], ["a", "b", "c"], ["a", "b", "d"], ["a", "c", "d"], ["b", "c", "d"], ["a", "b", "c", "d"]).list | |||
jnthn | donaldh: Yes, I did iscclass already so they should not be hard to add | ||
rjbs | I'm sorry, please tell me if you need me to shut up with simple questions, but next I'm looking for docs on how I can concisely make a buffer from a(n all-ASCII) Str. | ||
jnthn | donaldh: Once you add them, some code that needs them in nqp-src/QRegex.nqp can be uncommented. | ||
23:38
proller left
|
|||
donaldh | jnthn: Okay, I have started. Need to build some tests. | 23:39 | |
rjbs | Ah, Str.encode? | ||
Great. | |||
jnthn | r: my $s = 'omgz'; say $s.encode('ascii') | ||
p6eval | rakudo 5101a5: OUTPUT«Buf:0x<6f 6d 67 7a>» | ||
rjbs | Yeah, got it... on to my next failure. :) | 23:40 | |
jnthn should sleep...gotta get up at sensible time tomorrow :) | |||
23:41
skids joined
|
|||
rjbs | gist.github.com/rjbs/4981789 | 23:45 | |
In this program, the first write-at succeeds. The second one fails, "seek failed: -1" | |||
[Coke] | so, I have a branch to kill pasm. NQP requires some generated pasm files (even in the setting); suggestions on how to deal with this? The best I have so far is that if someone asks for "foo.pasm" in that parrot branch, give them "foo.pir" instead. | 23:46 | |
rjbs | Am I doing something wrong, or is seek broken, or? | ||
rjbs just added a second file with a simpler demonstration. | 23:48 | ||
[Coke] | er, s/setting/stage0/ | ||
23:53
stopbit left
|
|||
rjbs gives up for now, back to the old grind. | 23:53 | ||
23:59
benabik joined
|
|||
rjbs | Aha! | 23:59 | |
method seek(IO:D: Int:D $whence, Int:D $offset) { |