»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg camelia perl6: ... | irclog: irc.perl6.org | UTF-8 is our friend!
Set by sorear on 25 June 2013.
TimToady n: /<?[\s'#']><[\s'#']>*/ 00:00
camelia niecza v24-95-ga6d4c5f: OUTPUT«===SORRY!===␤␤Please backslash # for literal char or put whitespace in front for comment at /tmp/Rxp8aWv33n line 1:␤------> /<?[\s'#⏏']><[\s'#']>*/␤␤Parse failed␤␤»
Mouq Yup, but Q is just kind of hacked on in NQP
TimToady so you're saying rakudo is NQP yet :) 00:03
Mouq One could either effectively have Q:cc functionality programmed in NQP and Rakudo seperately, or spread the Q lang between NQP and Rakudo 00:04
I think
TimToady well, how hard can it be? cclass_elem is just defined in STD as: "[" ~ "]" <nibble($¢.cursor_fresh( %*LANG<Q> ).tweak(:cc).unbalanced("]"))> 00:06
Mouq Although I'm pretty sure Q:cc doesn't actually work right in Rakudo because I remember just copying ( github.com/rakudo/rakudo/commit/0ec828 ) it in before I knew what I was doing
timotimo .tweak(:cc) is probably only one line of code
TimToady it's just deriving from Q at that point, not from Regex 00:07
so either it's deriving mysteriously from Regex, or it's doing 2-pass parsing with bad assumptions 00:08
00:09 xilo joined
TimToady or something got badly copy/pasted 00:10
or some set of cosmic rays is being mysteriously consistent 00:11
00:12 Psyche^_ joined
diakopter probably the ones from Florida. 00:14
00:15 Psyche^ left 00:17 denysonique left
timotimo good * #perl6 00:22
Mouq r: my $i = 4; say ' \qq[$i] ' 00:26
camelia rakudo 458880: OUTPUT« 4 ␤»
Mouq r: my $i = 4; say '$i\qq[$i]$i' 00:27
camelia rakudo 458880: OUTPUT«$i4$i␤»
Mouq r: my $i = "echo 1234"; say '$i\qqx[$i]$i' 00:28
camelia rakudo 458880: OUTPUT«qx, qqx is disallowed in restricted setting␤ in sub restricted at src/RESTRICTED.setting:2␤ in sub QX at src/RESTRICTED.setting:9␤ in block at /tmp/uHGXHZHt1H:1␤␤»
Mouq Aww
00:30 benabik left
Mouq r: say '-->\qqto[END]<--'␤BLABLAbla␤ (more bla)␤END 00:31
camelia rakudo 458880: OUTPUT«-->BLABLAbla␤ (more bla)␤<--␤»
Mouq r: say '\x [65]' 00:32
camelia rakudo 458880: OUTPUT«\x [65]␤»
Mouq r: say '\q [65]'
camelia rakudo 458880: OUTPUT«65␤»
Mouq n: say '\q [65]'
camelia niecza v24-95-ga6d4c5f: OUTPUT«65␤»
Mouq n: say '\x [65]'
camelia niecza v24-95-ga6d4c5f: OUTPUT«\x [65]␤»
Mouq std: say '\x [65]'
camelia std 4cde04e: OUTPUT«ok 00:00 42m␤»
00:38 grondilu joined
grondilu guys, a course on bioinformatics will start this month on coursera.org: 00:39
perlmonks.org/?node_id=1056427
I've watched the first few videos, it looks fun.
as I understand it, the programming challenges will work as in rosalind, so it will be possible to program in Perl 6. 00:40
TimToady can we get an extension on that project? :P 00:41
[Coke] .to woolfy my copy of the great dalmuti arrived today. Forced all 3 kids to play, they were hooked after the first round. 00:42
yoleaux [Coke]: I'll pass your message to woolfy.
00:43 btyler joined
TimToady now if we only had a fast regex engine...someone should work on that... 00:45
diakopter o+o
o+w
00:50 ivanshmakov left 00:51 imrudbu joined 00:53 btyler left 00:55 cognominal left, cognominal joined 00:57 avuserow joined 01:08 benabik joined 01:10 berekuk joined
dalek rl6-roast-data: a5df95b | coke++ | / (5 files):
today (automated commit)
01:12
rl6-roast-data: bb7b77d | coke++ | / (3 files):
today (automated commit)
01:13 btyler joined
BenGoldberg What's the syntax for perl6 threads? 01:18
I just added to the RosettaCode web page a perl5 solution for the Dining Philosophers task, and want to convert it to perl6 :) 01:19
diakopter well, technically the data structures aren't yet threadsafe on the jvm 01:21
and we don't have atomic operations that would let you create your own yet
[Coke] (APL) I did that back on parrot at one point:
code.google.com/p/paraplegic/ 01:22
probably not worth salvaging any of that given the phpish example to build on 01:30
01:38 Vlavv` joined
dalek p/cursless: 4bd4ea2 | jimmy++ | src/vm/jvm/QAST/Compiler.nqp:
proper handling of classes an zerowidth, jnthn++
01:40
grondilu rn: say <foo bar>.bag 01:45
camelia rakudo 458880: OUTPUT«No such method 'bag' for invocant of type 'Parcel'␤ in block at /tmp/pCvWociLP6:1␤␤»
..niecza v24-95-ga6d4c5f: OUTPUT«Unhandled exception: Unable to resolve method bag in type Parcel␤ at /tmp/1RJzydBdnF line 1 (mainline @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4583 (ANON @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4584 (module-CORE @ 576) ␤ at /…»
grondilu rn: say max :by(*.value), bag <foo foo bar> 01:47
camelia rakudo 458880: OUTPUT«bag(foo(2), bar)␤»
..niecza v24-95-ga6d4c5f: OUTPUT«Unhandled exception: Unable to resolve method value in type Bag␤ at /tmp/vpO2kr0Y6I line 1 (ANON @ 2) ␤ at /home/p6eval/niecza/lib/CORE.setting line 1808 (ANON @ 4) ␤ at /home/p6eval/niecza/lib/CORE.setting line 1812 (List.max @ 14) ␤ at /home/p6ev…»
grondilu rn: say max :by(*.value), bag(<foo foo bar>).hash 01:50
camelia rakudo 458880, niecza v24-95-ga6d4c5f: OUTPUT«"foo" => 2␤»
[Coke] (APL) except for the unicode characters, that might help.
01:52 FROGGS left 02:04 grondilu left, PZt joined 02:05 FROGGS joined 02:13 berekuk left 02:17 denysonique joined
TimToady rn: say max :by(*.value), bag(<foo foo bar>).pairs 02:39
camelia rakudo 458880, niecza v24-95-ga6d4c5f: OUTPUT«"foo" => 2␤»
TimToady that avoids creating a hash
nr: bag(<foo foo bar>).invert.max.say 02:41
camelia rakudo 458880: OUTPUT«No such method 'invert' for invocant of type 'Bag'␤ in block at /tmp/3m7Bgx47g1:1␤␤»
..niecza v24-95-ga6d4c5f: OUTPUT«Unhandled exception: Unable to resolve method invert in type Bag␤ at /tmp/CyzYhHQdDx line 1 (mainline @ 4) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4583 (ANON @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4584 (module-CORE @ 576) ␤ at /…»
TimToady nr: bag(<foo foo bar>).hash.invert.max.say 02:42
camelia rakudo 458880, niecza v24-95-ga6d4c5f: OUTPUT«2 => "foo"␤»
TimToady thinks invert should work on bags
02:46 cognominal left 02:49 berekuk joined 02:53 imrudbu is now known as ivanshmakov 03:06 preflex_ joined, ChanServ sets mode: +v preflex_ 03:07 preflex left, preflex_ is now known as preflex 03:15 skids joined 03:20 berekuk left
lue
.oO(You should seal the bag before inversion though.)
03:20
03:23 berekuk joined
TimToady bags are supposed to seal themselves now 03:25
04:15 fridim_ left 04:33 BenGoldberg left
japhb_ r: class A { has Int @.ints }; my A $one .= new(ints => [1, 2]); say $one.ints; my $two = $one.clone(ints => [3, 4, 5]); say $two.ints; 04:34
camelia rakudo 458880: OUTPUT«1 2␤Type check failed in assignment to '@!ints'; expected 'Int' but got 'Array'␤ in method REIFY at src/gen/CORE.setting:8102␤ in method reify at src/gen/CORE.setting:7027␤ in method gimme at src/gen/CORE.setting:7441␤ in method sink at src/gen/CORE.setting…»
japhb_ Is that ^^^ known?
04:35 clkao left 05:05 auscompgeek joined 05:10 xilo left 05:14 xenoterracide_ left 05:15 xenoterracide_ joined
moritz ¸o 05:19
sjohnson .o 05:21
diakopter .oo 05:22
05:26 kshannon left, kshannon joined 05:35 SamuraiJack_ joined 05:36 mtk left 05:37 ponbiki joined, ponbiki is now known as Guest22389 05:39 xenoterracide_ left
ingy wonders why he is about to renew perlster.org 05:46
its so 2003
05:48 mtk joined 05:49 sqirrel joined 05:53 Guest22389 is now known as ponpon 06:00 kaleem joined 06:21 [Sno] left 06:22 raghu joined 06:23 raghu left, sqirrel left 06:29 skids left, btyler left 06:32 daniel-s joined 06:35 FROGGS left 06:36 denis_boyun joined 06:38 aindilis` joined 06:39 aindilis left 06:47 dmol joined 06:48 skids joined
mathw morning 06:53
06:55 denisboyun joined, kaleem left 06:56 denis_boyun left, FROGGS joined 07:00 FROGGS left 07:02 FROGGS joined 07:05 berekuk left
moritz .u FFEF 07:06
yoleaux No characters found
moritz .u FFFE
yoleaux No characters found
moritz .u byte order mark
yoleaux U+FEFF ZERO WIDTH NO-BREAK SPACE [Cf] (<control>)
moritz .u FEFF 07:07
yoleaux U+FEFF ZERO WIDTH NO-BREAK SPACE [Cf] (<control>)
auscompgeek FEFF is LE, FFFE is BE. I think. 07:10
moritz and inside text, it's considered a zero-width non-breaking space 07:14
07:14 zakharyas joined
moritz which is why it's not "byte order mark" in character database 07:14
07:14 sqirrel joined
FROGGS .tell timotimo Spectest run doesn't look that bad, mind that there are changes in nom that we don't have atm: gist.github.com/FROGGS/0acdc051d455d9766bd8 07:17
yoleaux FROGGS: I'll pass your message to timotimo.
auscompgeek moritz: hm, interesting. 07:20
07:21 Guest6057 left 07:22 dmol left 07:23 PZt left 07:24 PZt joined
lizmat good *, #perl6! 07:33
moritz \o lizmat
07:38 mstwu00 joined 07:42 kaleem joined
lizmat rn: say max :by(*.value), bag(<foo foo bar bar>).pairs 07:42
camelia rakudo 458880, niecza v24-95-ga6d4c5f: OUTPUT«"foo" => 2␤»
lizmat why not bar => 2 ? 07:43
rn: bag(<foo foo bar bar>).hash.invert.max.say
camelia rakudo 458880, niecza v24-95-ga6d4c5f: OUTPUT«2 => "foo"␤»
moritz lizmat: bags are unordered, so what you get in response is pretty much random
lizmat why not 2 => <foo bar> ? 07:44
moritz lizmat: max only ever returns the first max value it finds
lizmat otoh, it will need to check all values anyway, so it can know there is more than one 07:45
rn: bag(<foo foo bar bar>).hash.invert.say 07:46
camelia rakudo 458880, niecza v24-95-ga6d4c5f: OUTPUT«2 => "foo" 2 => "bar"␤»
lizmat rn: say (a => "b").invert.WHAT 07:50
camelia niecza v24-95-ga6d4c5f: OUTPUT«(Pair)␤»
..rakudo 458880: OUTPUT«(Enum)␤»
lizmat fixing rakudo as we speak 07:51
07:52 zakharyas left
moritz I'm pretty sure that's intentional, though not sure if it's a good idea :-) 07:56
lizmat why would an inverted pair become an Enum? 07:59
moritz because the key isn't a container, so the value of the inverted thing doesn't need to be a container either
08:00 [Sno] joined
moritz and Enum is pretty much a pair, but the value is never a container 08:00
08:00 [Sno] left, [Sno] joined
moritz but from a type perspective, it's probably nicer to return a Pair 08:00
08:00 dmol joined
lizmat rn: bag(<foo foo bar bar>).hash.invert.max.WHAT.say 08:00
camelia rakudo 458880, niecza v24-95-ga6d4c5f: OUTPUT«(Pair)␤»
08:02 sqirrel left
hoelzro morning #perl6 08:02
moritz lizmat: so yes, having Pair.invert return a Pair is probably sensible 08:03
08:03 iSlug joined
dalek kudo/nom: d185d53 | (Elizabeth Mattijsen)++ | src/core/Enum.pm:
Make Pair.invert return a Pair, rather than an Enum

  (or anything else that inherits from Enum)
08:03
08:06 auscompgeek left
lizmat r: my @a=<a b c>; say @a[2,*-1]:delete; say @a.elems 08:09
camelia rakudo 458880: OUTPUT«c (Any)␤3␤»
lizmat I'm not sure what this would need to return and what the final state of @a should be 08:10
should the final state be "a" or "a b" ? 08:11
in other words, should the deletes be done in order *and* should the *-1 be calculated after each delete ?
moritz lizmat: I'd expect the *-1 to be evaluated first, and then any deletion happens
lizmat: because argument lists are also usually evaluated first, before the subroutine that is called does anything 08:12
lizmat well, that's how it's implemented now, but the spectest expects something else
well, that's an implementation detail
moritz then fix the spectests :-)
lizmat as long as we agree on this :) 08:13
08:13 preflex left 08:15 preflex joined, ChanServ sets mode: +v preflex
dalek ast: a081844 | (Elizabeth Mattijsen)++ | S32-array/delete.t:
Unfudge some multiple whatever related tests
08:16
08:24 mstwu00 left 08:25 mstwu00 joined
lizmat :q 08:26
hugme hugs lizmat, good vi(m) user!
lizmat :-)
mberends :q!!! 08:27
hugme hugs mberends, good vi(m) user!
mberends
.oO( you can check out anytime you like, but you can never leave )
08:28
diakopter hugs mberends, good vi(m) user! 08:30
mberends :smile 08:31
diakopter this seems to happen to me often.. sitting near two AA participants swapping stories at a restaurant.. 08:32
always interesting stories.
C:\Users\mwilson\src\MoarVM\nqp-cc\install\bin\nqp.exe nqp-moar-cc.nqp --setting=NULL --target=mbc --output=nqp-mo.moarvm nqp-src\nqp-mo.pm
NMAKE : fatal error U1077: 'C:\Users\mwilson\src\MoarVM\nqp-cc\install\bin\nqp.exe' : return code '0xc0000409'
argh.
masak good antenoon, good vi(m) users! 08:34
diakopter no clue where to start diagnosing that.
ok, nmake clean helped. 08:35
*whew*
(must be missing Makefile dependency)
moritz why diagnose if you can fix instead? :-) 08:36
08:36 mstwu00 left
dalek rlito: ccc33d7 | (Flavio S. Glock)++ | / (7 files):
Perlito5 - js - prototype() fix
08:37
08:38 mstwu00 joined
diakopter masak: cross your fingers... 08:38
nqptest is clean so far..... O_O
(did I speak too soon?)
yesp. 08:39
yes, and yep.
08:40 iSlug left
mberends diakopter: are you trying to replace the GC in Moar? Why? How is it going? 08:41
(anything you say will be reported to amsterdam.pm this evening) 08:42
masak .oO( you have the right to a laptop. if you cannot afford a laptop, an HP EliteBook will be appointed for you ) :/ 08:43
tadzik :D
diakopter mberends: nope, heh.
mberends "no comment"
08:44 zakharyas joined
moritz # no comment 08:44
diakopter gist.github.com/diakopter/581887f037bc98f878f9
Ulti so changing from slurp and comb to while-get and comb I go from >3 minutes for my script to run down to 3 seconds :S that feels like a disproportionate speed up! this is with 2k lines from a Gutenberg file.
what's so bad about the slurp? 08:45
thats with latest R* 08:46
masak Ulti: slurp reads the whole file into memory first? 08:47
but yes, I agree the difference is disproportionate. 08:48
maybe slurp does something Shlemiel-slow.
moritz or maybe it's not slurp that is slow, but the .comb on the much larger string
08:48 iSlug joined
masak ah, yes. 08:49
Ulti gist.github.com/MattOates/4a451d9f9c31ea055a45 vs gist.github.com/MattOates/d66d7a4cb23b51e3dc82 08:50
also keybags are really useful for the stuff I do day to day especially with the set operators
diakopter current gc_orch gist.github.com/diakopter/7b70423d7db7de3fcd72 08:53
08:57 iSlug left
diakopter ok, I still have no idea how to diagnose this. 09:00
I wonder how long I can stare at it waiting for inspiration. 09:01
09:08 daxim joined 09:16 denisboyun left 09:20 grondilu joined 09:23 fhelmberger joined
dalek rlito: b95d306 | (Flavio S. Glock)++ | / (3 files):
Perlito5 - grammar - use exists()
09:27
09:45 cognominal joined 09:58 sqirrel joined 10:13 SamuraiJack_ left 10:18 SamuraiJack_ joined 10:27 snarkyboojum joined
dalek kudo/nom: 85b9a40 | (Elizabeth Mattijsen)++ | src/core/ (2 files):
Make sure delete attempts past end of array doesn't vivify
10:36
ast: daa2ffe | (Elizabeth Mattijsen)++ | S32-array/delete.t:
Unfudge now passing test
10:51 snarkyboojum left
dalek kudo/nom: 95f6c00 | (Elizabeth Mattijsen)++ | src/core/Baggy.pm:
Added method "invert" to Baggy, as per TimToady's mumbling
10:52
tadzik std: my Baggy @pants 10:53
camelia std 4cde04e: OUTPUT«===SORRY!===␤In my declaration, typename 'Baggy' must be predeclared (or marked as declarative with :: prefix) at /tmp/VUJg5VWQbT line 1:␤------> my Baggy⏏ @pants␤Malformed my at /tmp/VUJg5VWQbT line 1:␤------> my ⏏…»
tadzik dum dum dum
masak std: role Rick::Astley {} 10:56
camelia std 4cde04e: OUTPUT«ok 00:00 42m␤»
lizmat :-) 10:58
www.washington.edu/news/2013/09/30/...hetic-dna/ .oO( a new life for bioperl6? )
masak r: role Rick { method never_gonna_give_you_up { ... } }; class Astley does Rick {} 10:59
camelia rakudo d185d5: OUTPUT«===SORRY!===␤Method 'never_gonna_give_you_up' must be implemented by Astley because it is required by a role␤»
tadzik heh, Warsaw University is also called UW
11:01 Mouq left
masak bah, article is behind a paywall. :/ 11:02
moritz masak: every Journal name that matches /^Nature/ implies that :/ 11:04
11:09 SamuraiJack_ left 11:17 frdmn is now known as frdmn|afk, SamuraiJack_ joined
dalek kudo/nom: 0808aca | (Elizabeth Mattijsen)++ | src/core/ (2 files):
Moved method .chrs from Iterable to Cool, as per other TimToady mumbling
11:18
tadzik hmm, we have chrs 11:19
11:19 benabik left
lizmat $ perl6 -e 'say 0x2202.chrs' 11:20
11:26 kay_ joined
masak lizmat++ # implementing mumblings 11:27
that must be every BDFL's wish, to mumble and things happen. 11:28
FROGGS masak: I have the same with my sons, really 11:29
11:29 iSlug joined 11:37 mstwu00 left
Ulti FROGGS they mumble and you do it? ;P 12:02
FROGGS yeah :o(
masak better than total silence, I guess. 12:03
FROGGS especially my youngest when it is about to sleep... he is talking in a way that only bats can here him
masak: depends on the time of day
masak yeah :) 12:04
12:05 iSlug left
lizmat r: my Int @a=^3; @a[1]:delete; @a.map:{say .WHAT.perl }; @a[1].WHAT.perl.say # losing type info deep in the bowels of MapIter 12:23
camelia rakudo 0808ac: OUTPUT«Int␤Any␤Int␤Int␤»
12:24 skids left
lizmat no more time to look at this now, maybe someone else has inspiration 12:24
commuting to Amsterdam for NL.pm meeting
12:29 mtk left
timotimo mhm mhm 12:31
yoleaux 07:17Z <FROGGS> timotimo: Spectest run doesn't look that bad, mind that there are changes in nom that we don't have atm: gist.github.com/FROGGS/0acdc051d455d9766bd8
12:34 sqirrel left 12:36 iSlug joined 12:44 berekuk joined 12:46 iSlug left 13:01 arnsholt joined 13:03 frettled joined 13:06 sqirrel joined 13:10 benabik joined 13:13 mtk joined 13:16 PacoAir joined 13:21 grondilu left 13:24 lowpro30 joined 13:28 ajr joined, ajr is now known as Guest78189 13:35 bluescreen10 joined 13:39 mberends left 13:43 btyler joined 13:51 skids joined 13:57 lowpro30_ joined 13:58 KroKite joined 13:59 lowpro30 left 14:09 xenoterracide_ joined 14:11 xinming left 14:12 xinming joined 14:16 denysonique left 14:18 sqirrel left
GlitchMr How can I do something like array[::2] from Python in Perl 6? In Python, [1, 2, 3, 4, 5][::2] returns [1, 3, 5]. 14:20
jnthn Index with a sequence maybe? 14:21
FROGGS r: say ^20[1,3..*]
camelia rakudo 0808ac: OUTPUT«0..^0␤»
jnthn ...
FROGGS was it something like that?
GlitchMr r: say ^20[1,3...*]
camelia rakudo 0808ac: OUTPUT«0..^0␤»
GlitchMr oh rite
FROGGS r: say ^20.flat[1,3..*] 14:22
jnthn yes, that but precedence
GlitchMr r: say (^20)[1,3...*]
camelia rakudo 0808ac: OUTPUT«0..^0␤»
rakudo 0808ac: OUTPUT«1 3 5 7 9 11 13 15 17 19␤»
FROGGS ahh, sure
jnthn heh, "..." wasn't me being "huh", it was the answer :P
GlitchMr r: say (^20)[1,3..*]
camelia rakudo 0808ac: OUTPUT«1 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19␤»
GlitchMr r: say (^20)[1,3...*]
camelia rakudo 0808ac: OUTPUT«1 3 5 7 9 11 13 15 17 19␤»
jnthn .. and ... are at different prec levels
The 1,3 is an argument to ...
But only the 3 is to .. 14:23
FROGGS yeah
GlitchMr Seems to work great, and that without strange syntax like in Python.
FROGGS have fun translating ::2 to 1,3...* :o)
tadzik std: ::2 14:24
jnthn yeah, it's longer but nice that we get it out of re-using another langauge construct
camelia std 4cde04e: OUTPUT«===SORRY!===␤Two terms in a row at /tmp/1bmbN4gacz line 1:␤------> ::⏏2␤ expecting any of:␤ POST␤ feed_separator␤ infix or meta-infix␤ infixed function␤ postcircumfix␤ postfix␤ postfix_prefix_meta_operator␤ postop␤
..statemen…»
jnthn hmm :)
tadzik oh, right, 2 is not a valid typename :)
jnthn r: sub prefix:<::>($n) { 1,1+$n ... * }; say (^20)[::2]
camelia rakudo 0808ac: OUTPUT«1 3 5 7 9 11 13 15 17 19␤»
jnthn bwahaha 14:25
peteretep
TimToady of course, 0,2...* is :2, not 1,3...*
yoleaux 08:06Z <diakopter> TimToady: ltm s05 patch - "whitespace is the archtypical" .. archtypical? or archetypical? or archetypal?
TimToady well, prototypical might be better anyway 14:26
GlitchMr 1,3..* is [1::2], but I doubt anybody cares.
1,3...*, I mean.
jnthn TimToady: details... :P
dalek ecs: 3d9eda7 | larry++ | S05-regex.pod:
typo
14:27
jnthn bah, didn't get chacne to backlog yet to see the commit that the typo is being fixed in...
FROGGS awwww :o( 14:28
TimToady
.oO(They said "Get a life!", but I don't need a getter, I need a setter.)
14:29
14:30 daxim_ joined, daxim left 14:35 amits2878 joined
TimToady nr: say 10 Rxx rand 14:37
camelia niecza v24-95-ga6d4c5f: OUTPUT«0.87435645604243339 0.87435645604243339 0.87435645604243339 0.87435645604243339 0.87435645604243339 0.87435645604243339 0.87435645604243339 0.87435645604243339 0.87435645604243339 0.87435645604243339␤»
..rakudo 0808ac: OUTPUT«0.417565598475875 0.417565598475875 0.417565598475875 0.417565598475875 0.417565598475875 0.417565598475875 0.417565598475875 0.417565598475875 0.417565598475875 0.417565598475875␤»
amits2878 hi all ... m amit from india I have been using perl for 8 years now under various flavours of linux. i have worked with perl 5 but havent had opportunity with perl 6. Please can some guide me through so that i can pick perl 6 quickly
peteretep amits2878: What have you tried searching for? 14:38
moritz amits2878: perl6.org/ has all the good links we know about
amits2878 Hi peter ... i just happened to visit perl portal on wiki ... thru there i got to know abt perl6
TimToady but mostly just hang out here :) 14:39
timotimo i wonder what parrot raiser experienced when they tried to join this irc channel; in my experience, "noob questions" are hardly ever shut down or made fun of too much (maybe a tiny bit, but i don't recall any instance where that was done in a hurtful way)
amits2878 i was wondering on how different it is ... or if i can go ahead by using it right away ...
or are there some points to be noted before i make a head start
timotimo there are many differences, like having a proper object and type system deeply integrated into the language itself 14:40
peteretep amits2878: I'd recommend a thorough read of perl6.org, and if you have any further questions, asking them here
TimToady well, main thing to know if you're coming from Perl 5 is that sigils don't change
my @foo = 1,2,3; say @foo[1] 14:41
r: my @foo = 1,2,3; say @foo[1]
camelia rakudo 0808ac: OUTPUT«2␤»
TimToady in p5 that'd be a $ in the second case
timotimo there are only a few modules, and you look at modules.perl6.org instead of the cpan to find them; your best bet is to install the newest "Rakudo *" from rakudo.org to get a compiler, REPL and a bunch of useful modules and the module installer
peteretep If I commit to getting my considerable development team to use Perl 6 in production for at least one thing, can I get some free training? ;-) 14:42
TimToady if you learn by example, rosettacode.org is a good place to compare perl5 solutions to perl6 solutions
timotimo peteretep: you can get the kind of free training we all get just by hanging out on IRC and asking questions :P 14:43
amits2878 using Rakudo is a recommendation or a requiirement to use with perl 6. Also as mentioned by "timotimo" does cpan doesnt goes well with perl 6
?
peteretep timotimo: I meant for my team, rather than me, but you're right. I was just trying to arbitrage publicity there
timotimo yes, that's correct amits2878
peteretep: i know nothing of training, so the only thing i have to offer is the snarky answer i gave above :( 14:44
TimToady well, a snarky answer is better than silence, barely :)
amits2878 ok timo
14:44 KroKite left
timotimo is going AFK for a bit now 14:45
TimToady amits2878: rakudo is the most advanced implementation in terms of features
niecza is faster, but not being developed much at the moment, and lagging in features 14:46
rakudo runs on JVM as well as Parrot, and soon will run on MoarVM as well
amits2878 so modules in cpan, are they still compatible with perl 6 ... i mean perl 6 has backward compatability. i am asking as replacing cpan modules in case of going to perl 6 is a major overhauling task. 14:48
moritz amits2878: Perl 6 isn't backwards compatible with Perl 5.
amits2878 ok 14:49
GlitchMr amits2878, there is no CPAN for Perl 6 (for now), but some modules are already written - modules.perl6.org/ 14:50
amits2878 replicating features of perl 5 application to perl 6 is going to be big task then ... 14:53
GlitchMr Well, Perl 6 isn't Perl 5.
moritz amits2878: most big Perl 5 applications will likely never be ported to Perl 6 14:54
TimToady the whole point of Perl 6 was to break backward compatibility so we could fix things that are wrong with Perl 5
but we're planning to provide emulation of Perl 5 so it can interoperate with Perl 6
moritz amits2878: maybe in the future we'll have some kind of interoperability (like embedding a perl5 compiler in Rakudo), so that you can extend Perl 5 programs in Perl 6
TimToady so you don't have to translate a whole project
GlitchMr Just wondering, could NativeCall be used to call Perl 5 C functions? 14:55
moritz GlitchMr: that's very hard, since the p5 C api mostly consists of macros, not functions 14:56
GlitchMr hm, yeah
amits2878 thanks everyone here for initial tips. i guess learning perl 6 with assumptions of perl 5 would be difficult .
thanks everyone
TimToady the embedding api lets you do that
amits2878: but nevertheless, Perl 6 is a lot like Perl 5 in the nice ways
GlitchMr Also, it's not that Perl 5 is Perl 4. I mean, Perl 4 didn't have lots of things that are used in modern Perl - lexical variables, scalar filehandles, :: as package separator (but not that anybody used them), OOP, quoted regexes (qr), calling subroutines without &, and so on. 14:59
It annoys me when I see Perl code using &subroutine().
Technically Perl 5 could run Perl 4 code, but Perl 4 is not Perl 5. 15:01
TimToady Perl 6 can run Perl 5 code with the "run" command... :) 15:02
GlitchMr The plan (as far as I know) is to allow running Perl 5 code in Perl 6, so you could slowly move to Perl 6.
(if you want to)
15:04 REPLeffect left 15:14 zakharyas left 15:15 FROGGS left
PerlJam GlitchMr: for some reason I find your "it's not that Perl 5 is Perl 4" comment interesting 15:18
Perl 5 has features that weren't possible in Perl 4. Does Perl 6 have features that aren't possible in Perl 5? 15:19
GlitchMr hm 15:20
You can write 3 > 2 > 1
And overload operators.
timotimo sensible smartmatch
GlitchMr junctions 15:21
nwc10 concurrency
GlitchMr builtin grammars
timotimo really anything that hangs off of the type system, like multiple dispatch
PerlJam ah, but Perl 5 has most (if not all) of those t hings via CPAN
nwc10 doesn't have viable concurrency
PerlJam nwc10: "viable"?
GlitchMr Well, of course you can completely ignore Perl, and import Python. 15:22
It's just that it's easier in Perl 6.
nwc10 efficiently spread a task out to multiple CPUs, and get the result back
GlitchMr In Perl 5, impossible things are merely hard.
timotimo in perl 6, impossible things are fun
15:23 REPLeffect joined
amits2878 i was also thinking the way CPAN is elaborated ... does perl 6 really makes a leap ahead of perl 5 for being a potential replacement? or perl 5 and perl 6 has a different application in real world? 15:24
GlitchMr If we talk in terms of possible, anything that can access C is equal.
diakopter in the unreal world, perl 6 won't replace perl 5. same for the real world. 15:25
timotimo perl6 will be better for some use cases, perl5 will be better for others
PerlJam amits2878: I can tell you that I like programming in Perl 6 quite a bit more than Perl 5.
timotimo both will be developed for a long time
GlitchMr faq.perl6.org/ 15:26
"Why should I learn Perl 6? What's so great about it?"
15:26 Guest78189 left
PerlJam I've long told people that Perl just fits my brain. Perl 6 continues that by giving me more useful abstractions that I can not only think in, but use directly :) 15:26
GlitchMr Of course you can use Perl6::Gather in Perl 5 to have lazy lists.
But by importing everything, you make initialization slower, and programs use more memory.
15:27 ajr joined
amits2878 m not underestimating perl 6. with all these conversations i am trying figure out how i am going start with it 15:27
15:27 ajr is now known as Guest85734
diakopter amits2878: what do you use Perl 5 for? 15:27
15:27 Guest85734 is now known as ajr_
GlitchMr Besides, even if you use Perl6::Gather, other modules don't use lazy lists. 15:27
15:29 [Sno] left
amits2878 automation, job monitoring with lsf, cgi apps, gui programming using gtk and tk 15:29
more or less work goes around this
timotimo cgi apps must die :) 15:30
PerlJam amits2878: "cgi apps"? You might consider using Plack if you're still doing CGI :)
TimToady now, now
15:30 bluescreen10 left
timotimo TimToady: what, you don't like death threats? 15:30
GlitchMr CGI? I still use PHP for small web scripts. Should I update to CGI? 15:31
TimToady we try to give the appearance of being nice here, even if we're not :)
amits2878 well may be you are right ... but legacy systems with cgi in place, its not a mere programmer decision to make. on personal front yes there are better options to cgi
TimToady GlitchMr: you should probably write a PHP2Perl6 translator
GlitchMr I don't feel like writing a code for every of 5 thousand functions. 15:32
jnthn
.oO( at least the sigls are easy :P)
GlitchMr Oh, right, old data, 8 thousand.
jnthn *sigils
PerlJam GlitchMr: that's why you write code that writes the code for you!
GlitchMr sub addslashes(Cool $value) { use Acme::Addslashes (); Acme::Addslashes::addslashes $value } # and so on 15:33
15:33 REPLeffect left
GlitchMr Some of PHP functions do really specific effect. 15:33
I stopped on addslashes. 15:34
PerlJam GlitchMr: write some code that will read the functions spec from php.net and generate the appropriate Perl ;-)
GlitchMr If they would have a spec.
PerlJam yeah, I guess I should have put "spec" in quotes there 15:35
GlitchMr It could work with EcmaScript, but not with PHP.
Ulti made a little text parody script using KeyBag gist.github.com/MattOates/62a5a3d4f86333939bbf yay for phasers >:3 not sure if they make the code more or less readable though :/
TimToady
.oO(This hammer doesn't do very well as a leaf-blower.)
15:36
GlitchMr Besides, implementing PHP in Perl 6 also means improving Perl 6. I mean, somebody has to make PDO bindings and so on. 15:37
PerlJam Ulti: why would you use the PRE phaser at all?
Ulti: moreover, why not use .words ?
jnthn Ulti: Not sure your use of PRE there helps, unless you want to explode when the line has no words?
Ulti to have @words initialised before shifting?
TimToady "parody"
diakopter TimToady: but they're pine needles... and made of steel..
TimToady but you're trying to blow them, not apply blows to them 15:38
ajr_ @timotimo I'm parrot_raiser in other contexts. I have no complaints about any treatment on this channel; you're all very civilised. My problem is catching on to the local jargon.
Ulti PerlJam: mostly because I didnt know .words exists
plus I'm going to add in punctuation and white space into the model
PerlJam ajr_: lizmat started a glossary to help with that. Perhaps you could fill it out as you learn things?
ajr_ I assume my note to the perl6language list got through, though it hasn't hit my inbox yet. 15:39
diakopter ajr_: I got it, yes, and appreciated it .:)
ajr_: you're right; the jargon on #perl6 is impenetrable to people who don't like researching lingos and codewords and pseudo-technical terms and the arcanest of trivia.. 15:43
ajr_: it's very much a whimsical game around here; a pastime for amusement and camaraderie, to be as esoteric as possible 15:45
ajr_ Any technical group is bound to develop its own language; it speeds communication within the group, at the expense of external understanding.
However, I'm trying to determine a route to grokking P6 that doesn't involve too much back-tracking or re-education. 15:46
jnthn Speeding communication, and being precise, is important for getting stuff done. :) All in all, though, a bunch of the terms thrown around relate to the implementation aspects of Perl 6 rather than user-centric things. It's a consequence of one channel for those building and those using. 15:47
timotimo ajr_: thank you for elaborating
jnthn I can completely see that from an outside perspective it's impossible to know what things written here are even worth trying to understand :) 15:48
diakopter ajr_: let's deconstruct your request some.. to you, what would it look like to have "grokked P6"?
timotimo if you just want to learn the language, there is a *lot* of off-topic going on in here
15:48 japhb__ joined
timotimo things like musings about language development, mathematical puzzles, paradoxes, strange fanfictions, ... 15:48
diakopter (would you be able to answer most questions from passersby on #perl6 about the history of Perl 6)
ajr_ Thanks, jnthn, that's what I was trying to say; it's "Perl 6 for the Masses" I'm after. (I refuse to use "Dummies; P6 is too powerful for dummies ."
PerlJam I think we just need more articles/books/whatever expounding on various bits of Perl 6. That way knowledge of our special words and symbols and incantations will diffuse out into the world so that others may learn.
TimToady
.oO(OT ≅ Culture)
timotimo Dummies? Where we're going, we don't need Dummies. 15:49
TimToady crash test, I assume you mean
timotimo i'm still eager to get rakudo-on-js to build that "prose with in-line code editors with eval button" thing i've been dreaming about for so long 15:50
diakopter see! obtuse allusion to 1988 sci-fi movie.. completely absurd unless you recognize the possibility of a tongue-in-cheek self-deprecating jab
TimToady ajr_: for what it's worth, the latest outline for the P6 "camel" takes a tiered approach such as you recommend 15:51
timotimo diakopter: DAMN IT! I totally did what i denounced a few lines prior
diakopter timotimo: haha. :) 15:52
ajr_ Speaking of obscure references, is the history of PL/1 significant to anyone here, or is it too archaic?
diakopter someone around here wrote a programming language in PL/1... 15:53
TimToady is that like PL/I ? :P
diakopter :X
ajr_ recursively, I assume.
15:53 xinming left
GlitchMr rn: say ([1..10] X* [1..10]).tree.perl 15:53
TimToady we don't want to study the history of PL/I, since we're trying so hard to repeat history, except for the failure part
camelia niecza v24-95-ga6d4c5f: OUTPUT«Unhandled exception: Unable to resolve method tree in type List␤ at /tmp/5n_fZOf9bz line 1 (mainline @ 4) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4583 (ANON @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4584 (module-CORE @ 576) ␤ at /h…»
..rakudo 0808ac: OUTPUT«(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 6, 12, 18, 24, 30, 36, 42, 48, 54, 60, 7, 14, 21, 28, 35, 42, 49, 56, 63, 70, 8…»
GlitchMr How can I get [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [2, 4, 6, ...? 15:54
diakopter ajr_: do you see a parallel?
15:54 xinming joined, zakharyas joined
ajr_ Definitely. 15:54
TimToady
.oO(Those who do not study history are doomed to have it repeated to them.)
15:55
PerlJam TimToady: re p6 camel ... when will ajr_ and others obtain the benefit of that tiered approach though? I think he's (and others) looking for something closer to "now"
TimToady ain't we all? 15:56
diakopter 8 years ago would help too
TimToady well, things written 8 years ago are largely accurate for that level of understanding
sigil invariance was already there
diakopter (also, I play dumb sometimes) 15:57
TimToady the apocalpyses largely got the basics right
diakopter (not during that statement though)
(I swear)
15:57 FROGGS joined, amits2878 left
timotimo r: (1..5).map: { 15:58
...
camelia rakudo 0808ac: OUTPUT«===SORRY!=== Error while compiling /tmp/g2bkk5rwjT␤Unable to parse expression in block; couldn't find final '}'␤at /tmp/g2bkk5rwjT:1␤------> (1..5).map: {⏏<EOL>␤ expecting any of:␤ statement list␤»
timotimo r: say (1..5).map: { [$_, 2 * $_, ... * > 100] }
camelia rakudo 0808ac: OUTPUT«===SORRY!=== Error while compiling /tmp/x0t0IZAy5o␤Comma found before apparent series operator; please remove comma (or put parens\n around the ... listop, or use 'fail' instead of ...)␤at /tmp/x0t0IZAy5o:1␤------> say (1..5).map: { [$…»
timotimo r: say (1..5).map: { [$_, 2 * $_ ... * > 100] }
TimToady we already knew what basic classes and attributes looked like back then
camelia rakudo 0808ac: OUTPUT«1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 …»
FROGGS ola
timotimo r: say ((1..5).map: { [$_, 2 * $_ ... * > 100] }).tree
TimToady the operator table has not changed much since 2005
camelia rakudo 0808ac: OUTPUT«1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 …»
timotimo r: say ((1..5).map: { [$_, 2 * $_ ... * > 100] }).tree.perl
jnthn hi FROGGS
camelia rakudo 0808ac: OUTPUT«([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, …»
timotimo sorry for the spam.
diakopter imagines amits2878's parting thought "WTF... who can penetrate that maelstrom of puns and winks"
timotimo r: say ((1..5).map: { [$_, 2 * $_ ... * > 12] }).tree.perl
camelia rakudo 0808ac: OUTPUT«([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13], [2, 4, 6, 8, 10, 12, 14], [3, 6, 9, 12, 15], [4, 8, 12, 16], [5, 10, 15]).list␤»
jnthn Finally, I have time to backlog...
diakopter jnthn: hahaha. 15:59
timotimo GlitchMr: you like?
GlitchMr timotimo, I want a table with equal number of elements.
TimToady jnthn: we were just having our own sales meeting here
GlitchMr Multiplication table, that is.
but interesting
timotimo r: say ((1..6).map: { [$_, 2 * $_ ... { (state $)++ <= 4 }] }).tree.perl 16:00
camelia rakudo 0808ac: OUTPUT«([1], [2], [3], [4], [5], [6]).list␤»
diakopter timotimo: I've given up understanding Perl 6 code involving sequences and placeholders and such
timotimo r: say ((1..6).map: { [$_, 2 * $_ ... { (state $)++ >= 4 }] }).tree.perl
camelia rakudo 0808ac: OUTPUT«([1, 2, 3, 4, 5], [2, 4, 6, 8, 10], [3, 6, 9, 12, 15], [4, 8, 12, 16, 20], [5, 10, 15, 20, 25], [6, 12, 18, 24, 30]).list␤»
timotimo GlitchMr: there you have it, same number of elements in each line :)
diakopter timotimo: give me baby C any day... I can follow that.
PerlJam diakopter: As long as there's a VM for it all to run on ... ;)
timotimo diakopter: :)
TimToady diakopter: that wouldn't be baby in C either 16:01
ajr_ How much of P6 can we say with confidence is not likely to change?
GlitchMr that's um, great.
TimToady ajr_: what are your units?
GlitchMr Except somehow I think that "state $" is a hack here.
timotimo r: say ([1..10] X* [1..10]).tree.perl
camelia rakudo 0808ac: OUTPUT«(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 6, 12, 18, 24, 30, 36, 42, 48, 54, 60, 7, 14, 21, 28, 35, 42, 49, 56, 63, 70, 8…»
timotimo whu?
diakopter units of time?
ajr_ or units of confidence?
timotimo but i wanted a tree :( 16:02
diakopter units of change distance?
TimToady ajr_: the trouble is one of scale; the coastline changes very slowly on a scale of miles, and very rapidly on a scale of millimeters
PerlJam ajr_: Most of the green bits of perl6.org/compilers/features aren't likely to change IMHO :)
timotimo GlitchMr: you could have done this, too: not (state @l = 1..5).shift
ajr_ I'd be willing to assert that sigil invariance is not likely to change.
japhb__ Did anyone answer my late-night query about the apparent bug in typechecking en-passant changes in .clone()? 16:03
TimToady very rarely do we dig new Panama Canals now
timotimo ajr_: yeah, sigil invariance is invariant :)
japhb__: i saw it and it made me sad :(
japhb__ (I didn't see anything skimming the backlog, but I could have missed it easily.)
diakopter PerlJam: just wait until I publish the p6todo list
japhb__: no.. 16:04
japhb__ timotimo: yeah ... I'm trying to un-bitrot samuraisam's p6-pb (Protobuffer) module, and he uses that a lot in his tests.
TimToady as a datapoint, I wrote an interactive quiz editor several years ago that weighs in at about 1000 lines; it has required only one or two minor tweaks in that time
and it's not just written to use "baby Perl 6" 16:05
so even the esoteric features tend to be pretty stable
PerlJam TimToady: but it *is* using Perl 6, right? ;)
GlitchMr rn: say join ", ", <some random arguments>
camelia rakudo 0808ac, niecza v24-95-ga6d4c5f: OUTPUT«some, random, arguments␤»
timotimo heads out
GlitchMr eval: say join ", ", <some random arguments>
perl5: say join ", ", <some random arguments>
japhb__ If someone can point me in the right directions, I've about a 50% chance of rakudo-matching tuits tonight to see if I can unbreak it. 16:06
(Of course, if someone manages to just fix it, then I can spend those tuits on the p6-pb work instead of yak-shaving ....) 16:07
16:09 kaare_ joined
FROGGS japhb__: to fix what? looks like I mmiss something 16:09
japhb__ r: class A { has Int @.ints }; my A $one .= new(ints => [1, 2]); say $one.ints; my $two = $one.clone(ints => [3, 4, 5]); say $two.ints;
camelia rakudo 0808ac: OUTPUT«1 2␤Type check failed in assignment to '@!ints'; expected 'Int' but got 'Array'␤ in method REIFY at src/gen/CORE.setting:8106␤ in method reify at src/gen/CORE.setting:7027␤ in method gimme at src/gen/CORE.setting:7441␤ in method sink at src/gen/CORE.setting…»
japhb__ ^^that
GlitchMr camelia: help
camelia GlitchMr: Usage: <(nqp-jvm|star|pugs|nqp|std|niecza|rakudo|b|nom|npr|n|r|perl6|prn|rn|p|rnp|nrp|pnr|rpn|p6|nr)(?^::\s) $perl6_program>
FROGGS ahh, no thanks
16:09 dmol left
FROGGS I don't think I can fix that within a few days 16:09
jnthn japhb__: Something's inconsistent there... 16:10
GlitchMr ~ $ perl -E'say join ", ", <some random arguments>'
some, random, arguments
Making Perl 5/6 polyglots is fun.
ajr_ There's a paradox (that ought to have a name), that those who understand a topic most deeply are probably the least able to explain it to newcomers, because they've forgotten what conscious incomptence felt like.
FROGGS jnthn / TimToady: I think I'm going to steal cclass_elems from std to nqp 16:11
japhb__ Yeah. It feels like there's just something missing in one code path, or the .clone code bitrotted a bit, or somesuch
jnthn FROGGS: That sounds like quite the task...
TimToady if anyone wants is interested in looking at the quiz editor, there's a copy at wall.org/~larry/qe 16:12
jnthn japhb__: Please RT it if you didn't already
FROGGS jnthn: "the task" ?
japhb__ jnthn: Ah, I was first asking if it was already known. But I'll take that as a "no".
jnthn FROGGS: Why not just fix the whitespace handling bug?
japhb__: I didn't know it, at least.
japhb__: But the RT queue is too big for me to keep in my head :)
FROGGS jnthn: I think I did
jnthn r: /<?[\#]>/ # this one? 16:13
camelia rakudo 0808ac: OUTPUT«===SORRY!=== Error while compiling /tmp/EfGdGvTSV8␤Unspace not allowed in regex␤at /tmp/EfGdGvTSV8:1␤------> /<?[\#⏏]>/ # this one?␤»
ajr_ @PerlJam thanks for the "features" link; that may be helpful 16:14
16:15 kaleem left, denysonique joined
japhb__ jnthn: RT'ed 16:17
PerlJam ajr_: sure, but note that just because something is implemented doesn't mean it won't change. (e.g., there's still some list foibles IIRC. I don't know if that's just an implementation problem or a spec problem, but if it turns out there's a spec problem, the language will change) 16:18
ajr_ That's why I'm trying to separate the language into "set in stone", "set in almost dry concrete", and "warm jello" 16:19
16:20 ugexe left, segomos left
FROGGS jnthn: ahh, the unspace bug... yeah, this would be fixed by stealing cclass_elem, so, I might try to get closer to std and fixing this bug 16:20
16:20 ugexe joined
FROGGS dinner & 16:20
16:20 segomos joined
ajr_ @TimToady - would you write the quiz the same way today? Some of the literals look as though they could be generated as lists. 16:21
PerlJam ajr_: The brief skim I did of his quiz editor made me want to patch it to use Term::ANSIColor :) 16:22
Ulti Str.words is just a .comb but sensitive only to white space not punctuation :/ which kind of sucks for,lists,of,words,in,some,text
why isnt it \w+ ?
16:23 zakharyas left
jnthn Ulti: For one "wouldn't" wouldn't count as a word... 16:25
Ulti yup but 'yay' and 'yay!' are different words with .words too
PerlJam Ulti: isn't that a feature for markov text generation? 16:29
jnthn FROGGS: Once we have that fix I may be able further improve ws
Ulti 'ese are the hardest ' characters to not strip, you'd have to actually check for balanced quotes :[
PerlJam ok what about every word with a comma on the end, that isn't really a word "end," 16:30
PerlJam still sounds like a feature to me :)
Even if not ... you'd still want something other than .comb(/\w+/) right? 16:31
Ulti yeah really you want something that handles balancing ' characters and other magic which sounds like overkill for some builtin 16:32
PerlJam yep
Ulti but .words I'd still kind of expect it to be using the word character meta character, its in the name ;P 16:33
.words feels more like a .token to me lol
PerlJam oddly, I think exactly the opposite. 16:34
TimToady it's \w that is really the anomaly here
Ulti also why is it a comb and not a split
TimToady why is what a comb? 16:35
PerlJam Ulti: to better reflect the dichotomy between what you want to keep vs what you want to throw away. .words is about what you want to keep
(I'm assuming you mean why is .words implemented as .comb)
TimToady split is kind of a figure/ground inversion
16:35 fhelmberger left
Ulti PerlJam: yeah 16:36
TimToady well, it could be implemented by split, but you'd have to remove any empty fields at the bow and stern
Ulti only my brain has a problem with comb I think mostly because I use a table in SQL every day called comb where its "combination" contracted so I dont think hair comb I think hard b sound 16:37
PerlJam
.oO( Should Str also have .spaces to get the bits between the .words? :)
16:37 jnap joined
TimToady think "beach combing" 16:37
Ulti heh I think hair combing to make it semantically closer to split :D
PerlJam
.oO( split ends? )
16:38
Ulti yeah and you comb to split hairs apart into clumps
one thread of hair being a character
TimToady was gonna make a football pun on "tight ends", but decided it would be misconstrued :)
16:38 Tene joined
TimToady r: say (1,2,3).combinations(2) 16:41
camelia rakudo 0808ac: OUTPUT«No such method 'combinations' for invocant of type 'Parcel'␤ in block at /tmp/OG8KNok1TF:1␤␤»
TimToady is surprised no one has implemented that yet
Ulti oh neat KeyBag doesn't have to be an Int count... so want KeyBag.normali[sz]e()
so all the weights are normalised to ratio values of some total you specify
TimToady a KeyBag should probably just track the total for you 16:42
Ulti .normalise(100) for percent .normalise(1.0) for expectation
TimToady: oh I thought that was what it was doing
.roll isnt working out the total every time???
TimToady dunno
Ulti heh
Ulti checks
16:47 not_gerd joined
not_gerd o/ 16:47
r: say q¡Hola!
Ulti ahhh roll in KeyBags isn't doing what I imagined
camelia rakudo 0808ac: OUTPUT«␀␀␀[␀␀␀3␀␀␀1␀␀␀m␀␀␀=␀␀␀=␀␀␀=␀␀␀␀␀␀[␀␀␀0␀␀␀m␀␀␀S␀␀␀O␀␀␀R␀␀␀R␀␀␀Y␀␀␀!␀␀␀␀␀␀[␀␀␀3␀␀␀1␀␀␀m␀␀␀=␀␀␀=␀␀␀=␀␀␀␀␀␀[␀␀␀0␀␀␀m␀␀␀ ␀␀␀E␀␀␀r␀␀␀r␀␀␀o␀␀␀r␀␀␀ ␀␀␀w␀␀␀h␀␀␀i␀␀␀l␀
not_gerd oO
Ulti I thought it was based on the value not just the keys
might make my own subclass with 'spin' as in wheel-of-fortune or something :) 16:48
TimToady nr: say [1,2,3].combinations 16:49
camelia niecza v24-95-ga6d4c5f: OUTPUT«Unhandled exception: Unable to resolve method combinations in type Array␤ at /tmp/uwD3g3hEWw line 1 (mainline @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4583 (ANON @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4584 (module-CORE @ 576)…»
..rakudo 0808ac: OUTPUT«No such method 'combinations' for invocant of type 'Array'␤ in block at /tmp/H4iXXzVJkW:1␤␤»
TimToady on JVM, btw, that error message says "Scalar" instead of "Array", which is LTA
"No such method" should know that Scalar always delegates 16:50
so I call it a rakudobug
TimToady does a pull to make sure it wasn't fixed recently... 16:51
dalek rlito: 9fca914 | (Flavio S. Glock)++ | / (4 files):
Perlito5 - js - save more compile-time information
16:54
jnthn TimToady: Yes, bug...
TimToady: file it, it's an easy fix 16:55
TimToady: But I'm washing up and looking at why apostrophe doesn't LTM at the moment... :)
TimToady leaves the bug sitting around as a botsnack 16:57
16:58 jnap left
TimToady Ulti: KeyBag is specced to involve the values too; if it isn't, that's a bug 16:59
nr: KeyBag.new('foo' xx 10, 'bar').roll(20).say 17:00
camelia niecza v24-95-ga6d4c5f: OUTPUT«foo foo foo foo foo foo foo foo foo foo foo foo foo foo bar foo foo foo foo foo␤»
..rakudo 0808ac: OUTPUT«bar foo foo foo bar foo foo foo foo foo foo foo foo bar foo foo foo foo foo foo␤»
TimToady looks right to me 17:01
nr: KeyBag.new('foo' xx 10, 'bar').keys.say
camelia rakudo 0808ac, niecza v24-95-ga6d4c5f: OUTPUT«foo bar␤»
TimToady nr: say KeyHash(:a(2),:b(.5),:c(.2)).roll(30).say 17:03
camelia niecza v24-95-ga6d4c5f: OUTPUT«===SORRY!===␤␤Undeclared name:␤ 'KeyHash' used at line 1␤␤Unhandled exception: Check failed␤␤ at /home/p6eval/niecza/boot/lib/CORE.setting line 1502 (die @ 5) ␤ at /home/p6eval/niecza/src/STD.pm6 line 1147 (P6.comp_unit @ 36) ␤ at …»
..rakudo 0808ac: OUTPUT«===SORRY!=== Error while compiling /tmp/Zgv59rQECa␤Undeclared name:␤ KeyHash used at line 1␤␤»
TimToady eh?
nr: say (:a(2),:b(.5),:c(.2)).KeyHash.roll(30).say
camelia rakudo 0808ac: OUTPUT«No such method 'KeyHash' for invocant of type 'Parcel'␤ in block at /tmp/Ge313PglPV:1␤␤»
..niecza v24-95-ga6d4c5f: OUTPUT«Unhandled exception: Unable to resolve method KeyHash in type Parcel␤ at /tmp/I7TPXbadoL line 1 (mainline @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4583 (ANON @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4584 (module-CORE @ 576) ␤ …»
17:04 jnap joined
TimToady I guess nobody actually implements KeyHash yet 17:04
nr: KeyHash
camelia niecza v24-95-ga6d4c5f: OUTPUT«===SORRY!===␤␤Undeclared name:␤ 'KeyHash' used at line 1␤␤Unhandled exception: Check failed␤␤ at /home/p6eval/niecza/boot/lib/CORE.setting line 1502 (die @ 5) ␤ at /home/p6eval/niecza/src/STD.pm6 line 1147 (P6.comp_unit @ 36) ␤ at …»
..rakudo 0808ac: OUTPUT«===SORRY!=== Error while compiling /tmp/FDZpy8bMxl␤Undeclared name:␤ KeyHash used at line 1␤␤»
TimToady still wonders whether all those Key* names are bad 17:05
should be HashSet, HashBag, HashWeight or so
Het, Hag, and Height... 17:06
17:08 kaleem joined
TimToady or M for "mutable" 17:08
17:10 jnap left, jnap joined
TimToady Setty, Baggy, Weighty, if those weren't taken as roles 17:11
17:12 kay_ left 17:14 [Sno] joined
TimToady SetM, BagM, WeightsM # need a better term for weights... 17:14
17:15 jnap left
TimToady feels like we have to change something major now that we've been talking about how stable Perl 6 is :) 17:15
PerlJam Well, +1 to changing the Key* names (sorry I don't have any suggestion other than that)
timotimo perl6 now has to be written RTL
TimToady that's APL you're thinking of 17:16
Setses, Bagses, and Weightses, my Precious! 17:17
ajr_ Loads, prices, coefficients/
?
TimToady those are all...almost... 17:18
jnthn r: say 1328158 - 1231085
camelia rakudo 0808ac: OUTPUT«97073␤»
TimToady deapostrophizing? 17:19
17:19 grondilu joined 17:21 sqirrel joined
dalek p/cursless: 02f8345 | jnthn++ | src/QRegex/P6Regex/Actions.nqp:
Build simpler QAST for some cclasses.

This brings a bunch more into the realm of what the NFA builder can handle (probably it should cope with yet more, but this fixes the LTM for the Perl 6 grammar's apostrophe token, which is a big win).
17:22
jnthn TimToady: Big win being that <identifier> now LTMs properly.
TimToady: Meaning that the <label> branch of statement is never hit, for example
TimToady: Plus no doubt other things.
Also fatarrow. :)
TimToady YäY
moritz \o/ 17:23
TimToady wants Setses and Bagses enough to try to come up with a gloss for "ses"...Scalars Emulating Scalars or so :) 17:24
jnthn r: say 2196370 - 1231085
camelia rakudo 0808ac: OUTPUT«965285␤»
jnthn r: say 1231085 / 2196370
camelia rakudo 0808ac: OUTPUT«0.5605089␤»
jnthn Wow. At this rate we might manage to halve the number of Cursor allocations in CORE.setting parsing. 17:25
TimToady well, you started out 8 times STD, so you still have lots of headroom :) 17:26
17:26 zwut00 joined, ajr_ left
TimToady though if you're cutting things down, that's more like headroom¯¹ 17:27
17:27 ajr joined
TimToady hmm, that's an overbar, not a minus 17:27
17:28 ajr is now known as Guest10279
TimToady .u ¯ 17:28
yoleaux U+00AF MACRON [Sk] (¯)
17:28 jnap joined
TimToady how to get superscript minus... 17:28
17:28 Guest10279 is now known as ajr_
not_gerd <sup>-</sup> 17:28
TimToady <dead_circumflex> <U2212> : "⁻" U207B # SUPERSCRIPT MINUS 17:29
<Multi_key> <asciicircum> <U2212> : "⁻" U207B # SUPERSCRIPT MINUS
<dead_circumflex> <minus> : "⁻" U207B # SUPERSCRIPT MINUS
none of these are helpful...
FROGGS jnthn: I changed my mine and did a cheaper <?[#]> fix :o) ... testing right now
diakopter there are 348 job listings on indeed.com with perl in the title. there are 3,667 with C# in the title, and 15,475 with Java in the title. discuss.
indeed.com aggregates job listings from thousands of job boards/sites 17:30
also, see here for trends of the top N goo.gl/kiJ4n9 17:31
top N as defined by goo.gl/lTSvvZ
TimToady 90% of everything is crud? 17:32
diakopter these data feel quite accurate and representative 17:33
TimToady most data do :)
diakopter no..
moritz let's face it. Perl has a lot of catch-up to do. 17:34
PerlJam And here I was thinking that perl was doing so well against those other languages... 17:35
grondilu had to search overlapping occurences of ATGATCAAG in beta.stepic.org/media/attachments/l...olerae.txt and perl6 was too slow. Anyone wants to try on the JVM to see how long it takes?
diakopter PerlJam: ok ok :P
TimToady um, there are no overlapping occurrences of those 17:36
PerlJam grondilu: "overlapping occurences"? ATGATCAAG isn't self-similar. 17:37
grondilu I meant 'potentially overlapping'
TimToady maybe someone needs to hack boyer-moore into our regex
grondilu PerlJam: indeed. I hadn't realized that.
PerlJam grondilu: yeah, you were probably too focused on how slow perl6 was to notice :) 17:38
TimToady though I don't think BM will actually do all that much better with a 4-letter alphabet
diakopter especially when the match will fail :P 17:39
TimToady no, BM is for failing faster
grondilu TimToady: I made a custom simple algo in P5 to solve the problem and it was quite fast. haven't tried to translate it in P6, though.
diakopter er, oops.
TimToady as well as finding faster
PerlJam grondilu: use index() in a loop and it's plenty fast I bet. 17:40
(in p5)
17:40 kaleem left
TimToady index in p5 uses BM 17:40
FROGGS perl6 -e 'say("#" ~~ /<?[#]>/)'
「」
grondilu still, if an algorithm made in 2 minutes in P5 is fast, shouldn't a simple $dna.match: /$pattern/, :overlap be fast as well? 17:41
moritz of course it should 17:42
nobody says the current state of affairs is acceptable
grondilu I mean it's really the simplest pattern matching there is. Why is it so slow??
moritz it's just that optimizing stuff is hard work
PerlJam
.oO( in theory, there's no difference between theory and practice. In practice, there is :)
not_gerd PerlJam: you just need a better theory 17:43
TimToady well, it would be interesting to put that into an eval and see if the DFA helps
since interpolating probably disables the DFA
that's my theory... 17:44
grondilu I can put the litteral value instead of $pattern 17:47
oh, it is indeed fast! 17:48
TimToady hopes it is also correct :) 17:49
grondilu the result seems correct indeed, and took only a few seconds. 17:50
I'm amazed that using interpolation or not can change the performance that drastically.
FROGGS hmmm, dalek is a bit sleepy 17:51
I pushed to nqp and rakudo @cursless
can somebody give camelia voice? 17:52
diakopter it shouldn't need it
FROGGS diakopter: right, but I have to scroll to click it :o) 17:53
grondilu so yeah, writing $dna.match: eval(/$pattern/), :global did indeed speed things a lot. Good to know.
PerlJam grondilu: An NFA has to do lots more bookkeeping than a DFA, ergo it takes longer 17:54
TimToady should probably be eval(/"$pattern"/) in that case
unless you're sure $pattern contains no regex metachars
s/no/no unwanted/
grondilu yeah I meant eval("/$pattern"), which is what I tried 17:55
eval("/$pattern/")
TimToady no, you want quotes inside to be safe
PerlJam um .. slightly different semantics there :)
TimToady eval('/"$pattern"/') or so 17:56
grondilu I confess I don't understand what eval(/"$pattern"/) means exactly.
TimToady also wants the single quotes
er, actually
grondilu with the single quotes I understand better
but then I don't get what the double quotes are there for 17:57
TimToady wants eval(qq[ /"$pattern"/ ])
PerlJam eval("/'$pattern'/")
TimToady oh, that works
17:57 sqirrel left
TimToady duh 17:57
PerlJam :-)
TimToady thought he had enough coffee this morning, but apparently it has worn off...
diakopter well, no
still can terminate the quote and regex in $pattern 17:59
TimToady well, yes, eval always has that problem
but at least now we're just assuming no ' or \
not that there are no regex metachars at all 18:00
and it's easy enough to preprocess the string to backwhack ' or \ 18:01
PerlJam The moral of the story is "know your data well" :)
18:02 daxim_ left
grondilu finally understood what the inside quotes were for :) 18:02
TimToady the fact that we need eval here probably means we're missing a less powerful feature 18:03
grondilu indeed
maybe a :dfa options to force DFA if that's the issue? 18:04
TimToady std: / <"foo"> /
camelia std 4cde04e: OUTPUT«===SORRY!===␤Unrecognized regex assertion at /tmp/dW0emHeVE4 line 1:␤------> / <⏏"foo"> /␤ expecting assertion␤Parse failed␤FAILED 00:00 42m␤»
18:04 djanatyn joined
moritz oh 18:04
moritz likes the trend of TimToady's thoughts 18:05
TimToady std: / <"$pattern"> / # could steal this to tell engine to count it as static enough to DFA
camelia std 4cde04e: OUTPUT«===SORRY!===␤Unrecognized regex assertion at /tmp/a75O08eW5T line 1:␤------> / <⏏"$pattern"> / # could steal this to tel␤ expecting assertion␤Parse failed␤FAILED 00:00 42m␤»
PerlJam grondilu: for some reason that smells like P5's /o flag to me. (and I really hate /o these days)
18:06 ChanServ sets mode: +v camelia
TimToady this would not be /o 18:06
this would, however, want to track the string to recompute the DFA if the string changes
moritz PerlJam: the bad thing about /o is that it's action-at-a-(timely)-distance 18:07
we don't have to repeat that mistake
PerlJam yes, please let's not
moritz and of course we could have an optimizer for QAST::Regex, which recognizes the case of a literal as the first thing inside a scan 18:08
TimToady at mininum, <"$pattern"> recalculating the DFA each time the pattern is entered would be better than using the NFA, at least on long scans like this
moritz and replaces it with an index scan
PerlJam TimToady: indeed. looks good at first blush.
TimToady otoh, it might be reasonable to assume that any $foo that comes from outside the pattern is sufficiently static to DFA 18:10
at least on a cached basis
though that mucks with the boundaries of what is considered declarative 18:11
so I think we need syntax to explicitly enable such an interpretation 18:12
moritz uhm
dalek p/cursless: 927729b | (Tobias Leich)++ | src/QRegex/P6Regex/Grammar.nqp:
fix # in cclass_elem
TimToady we can't just say that $foo is declarative in a pattern
moritz but we can say that <"$foo"> takes a snapshot at match start time 18:13
TimToady noting that it probably doesn't get transitively passed up your grammar
it's just a local optimization
moritz just like interpolation of a variable into a string doesn't change after the fact if you re-assign to that variable
r: my $x = 42; say "$x and { $x = 23}"; 18:14
camelia rakudo 0808ac: OUTPUT«42 and 23␤»
TimToady yes, and the optimizer is allowed to optimize locally based on the snapshot semantics
moritz in some sense the "$x" here has the same snapshot semantics, which would be strangely consistent
18:14 dmol joined
TimToady yeah 18:14
though "$0$2" shouldn't snapshot 18:15
PerlJam ajr_: And this is how the language changes :-)
TimToady there's no point in freezing the spec where it forces us to run too slow :) 18:16
jnthn FROGGS: pulled your commits :)
TimToady fsdo "too"
FROGGS jnthn: ossum :P
dalek kudo/cursless: c6079d0 | (Tobias Leich)++ | / (2 files):
<?before '#'> to <?[#]>
18:19
timotimo cool beans, we're getting somewhere :) 18:20
though we still need to get that down to 1/4th 18:21
also, we need to get a decisive speed difference out of it :|
jnthn Well, at least we know object allocation is relatively fast, if we don't get a big one :P 18:22
TimToady y'know, there's nothing that says all our DFAing has to be done with the declarative prefix only
we can DFA bits in the middle of a regex too
jnthn TimToady: I'd pondered that a bit :)
TimToady and the dynamicism of that has nothing to do with the static prefix
jnthn But...so much to do :)
TimToady so it feels like a bit more of hotspot/JIT issue in that way 18:23
so, conservatively, let's just stick with eval for now :)
jnthn notes that, good as cutting down cursors is, it doesn't help towards having Moar support in the Oct NQP release, or a JVM Star :)
TimToady it does if you can find more bugs because the cycle is faster :) 18:24
though yeah, the amortization probably comes out wrong
jnthn True ;)
timotimo jnthn: i bet fixing match( :global) in moarvm should be easy to do, and it would allow you to run the qregex test suite :)
ajr_ btw, is dalek a bot of some sort? 18:25
timotimo yes, i tis
jnthn ajr_: It reports commits to various interesting repos
ajr_ Thanks, that confirms my hypothesis.
18:26 ajr_ left
jnthn timotimo: t/serialization/ is maybe more pressing :) 18:27
18:28 zwut001 joined, zwut00 left
timotimo but serialisation is implemented? 18:29
jnthn sorta but not all 18:30
needs finishing, bugs fixing, etc.
timotimo right
i'll just try to hook up the test suite locally
Method x not found in cache, and late-bound dispatch NYI - ah well 18:31
Serialization Error: missing static code ref for closure - oh well 18:32
18:32 lizmat joined
FROGGS damn 18:35
my latest rakudo commit breaks S02-lexical-conventions/unspace.t again :o(
18:40 zwut001 left
FROGGS perl6 -e 'say("#" ~~ /<!before "#">/)' # 「」 18:41
perl6 -e 'say("#" ~~ /<![#]>/)' # Nil
that should output the same, right
?
moritz is <![#]> zero-width? 18:42
TimToady certainly
moritz if yes, it should match at the end of the string
so both should print 「」
dalek ecs: f617adf | (Elizabeth Mattijsen)++ | S32-setting-library/Containers.pod:
Fix copy'n'pasto, spotted by yary++
18:43
TimToady perhaps someone is checking end-of-string prematurely
n: say("#" ~~ /<![#]>/) 18:45
camelia niecza v24-95-ga6d4c5f: OUTPUT«===SORRY!===␤␤Please backslash # for literal char or put whitespace in front for comment at /tmp/XbzzczH65Y line 1:␤------> say("#" ~~ /<![#⏏]>/)␤␤Parse failed␤␤»
TimToady actually, should be an error :)
n: say("#" ~~ /<![\#]>/) 18:46
camelia niecza v24-95-ga6d4c5f: OUTPUT«「」␤␤»
18:46 kivutar joined 18:47 Khisanth joined
TimToady r: say("#" ~~ /<![\#]>/) 18:48
camelia rakudo 0808ac: OUTPUT«===SORRY!=== Error while compiling /tmp/Emwj3oXidi␤Unspace not allowed in regex␤at /tmp/Emwj3oXidi:1␤------> say("#" ~~ /<![\#⏏]>/)␤»
diakopter heh.
std: say("#" ~~ /<![\#]>/) 18:49
camelia std 4cde04e: OUTPUT«ok 00:00 44m␤»
18:51 zwut00 joined
TimToady r: say("#" ~~ /<![\x23]>/) 18:52
camelia rakudo 0808ac: OUTPUT«Nil␤»
TimToady r: say("#" ~~ /<?[\x23]>/)
camelia rakudo 0808ac: OUTPUT«「#」␤␤»
18:52 zwut00 left
diakopter r: say("#" ~~ /<![\\#]>/) 18:52
camelia rakudo 0808ac: OUTPUT«「#」␤␤»
TimToady r: say("" ~~ /<![\x23]>/)
camelia rakudo 0808ac: OUTPUT«Nil␤»
diakopter wt
TimToady r: say("" ~~ /<![x]>/)
camelia rakudo 0808ac: OUTPUT«Nil␤» 18:53
18:54 lizmat left
TimToady r: say("" ~~ /<[x]>/) 18:54
camelia rakudo 0808ac: OUTPUT«Nil␤»
TimToady r: say("" ~~ /<!![x]>/) 18:55
camelia rakudo 0808ac: OUTPUT«Nil␤»
TimToady !
18:56 zwut00 joined
TimToady n: say("" ~~ /<!![x]>/) 18:56
camelia niecza v24-95-ga6d4c5f: OUTPUT«Nil␤»
TimToady n: say("" ~~ /<?[x]>/)
camelia niecza v24-95-ga6d4c5f: OUTPUT«Nil␤»
timotimo is !! supposed to behave like ? or something?
TimToady oughta 18:57
18:57 sorear left
TimToady n: say("x" ~~ /<?[x]>/) 18:57
camelia niecza v24-95-ga6d4c5f: OUTPUT«「」␤␤»
TimToady n: say("x" ~~ /<!![x]>/) 18:58
camelia niecza v24-95-ga6d4c5f: OUTPUT«「」␤␤»
TimToady n: say("x" ~~ /<![x]>/)
camelia niecza v24-95-ga6d4c5f: OUTPUT«「」␤␤»
TimToady that one matches after instead of before
18:59 lizmat joined
TimToady r: say("x" ~~ /<![x]>/) 18:59
camelia rakudo 0808ac: OUTPUT«Nil␤»
TimToady but not in rakudo
19:00 sorear joined, sqirrel joined
TimToady r: say("x" ~~ /<!![x]>/) 19:00
19:00 zwut001 joined
camelia rakudo 0808ac: OUTPUT«「」␤␤» 19:00
19:00 zwut00 left 19:01 ssutch joined
FROGGS TimToady: nqp/master + rakudo/nom has not been patched yet 19:03
TimToady: so you say only <?[\#]> should be valid?
I think you said that last night already :/ 19:04
19:04 dmol left 19:05 lizmat_ joined
FROGGS k, another try 19:05
19:05 lizmat left 19:06 lizmat_ is now known as lizmat
FROGGS sqirrel 19:09
19:09 ssutch left 19:10 SamuraiJack_ left
FROGGS rn: say ' ' ~~ /<?[ ]>/ 19:11
camelia niecza v24-95-ga6d4c5f: OUTPUT«Nil␤»
..rakudo 0808ac: OUTPUT«===SORRY!===␤Error while compiling block (source text: "say ' ' ~~ /<?[ ]>/"): Error while compiling op call: Error while compiling block : Error while compiling block (source text: "/<?[ ]>/"): StopIteration␤»
19:11 ssutch joined
FROGGS rn: say ' ' ~~ /<?[\ ]>/ 19:11
camelia niecza v24-95-ga6d4c5f: OUTPUT«「」␤␤»
..rakudo 0808ac: OUTPUT«===SORRY!=== Error while compiling /tmp/CiRSssvawy␤Unspace not allowed in regex␤at /tmp/CiRSssvawy:1␤------> say ' ' ~~ /<?[\ ⏏]>/␤»
TimToady n: say ' ' ~~ /<[\ ]>/ 19:15
camelia niecza v24-95-ga6d4c5f: OUTPUT«「 」␤␤»
masak evenin', #perl6 19:16
19:17 lizmat_ joined
FROGGS hi masak 19:17
diakopter StopIteration??
timotimo ... huh? 19:18
diakopter 7 min ago
FROGGS I guess there will no cclass element end up in the QAST::Regex
diakopter camelia to FROGGS
masak diakopter: that looks like a NQP stacktrace. 19:19
nwc10 jnthn/masak: I've mailed perl6-compiler something surprising
masak ooh
19:19 lizmat left
nwc10 Iron*'s big bump is due to a rebase and branch merge by Jeff Hardy on Sep 7 2013 19:20
FROGGS masak: yes, cclass_elem that is
nwc10 ironruby.net appears to have been down for 5 weeks
masak nwc10: why add IronPython+IronRuby? feels like a weird sum. 19:21
nwc10 masak: "because I could"
but, really, because they are showing signs of being more Parrot than Parrot
masak :)
nwc10 2836 nick 20 0 1757m 173m 136 S 97.1 74.7 587:21.17 java
19:22 breinbaa1 joined
nwc10 I don't know if compiling the setting is supposed to end up with a bit that's very CPU bound 19:22
masak nwc10: anyway, yes, it is surprising that commits(p6) > commits(p5) for all of 2013.
19:22 risou_awy_ joined
nwc10 yes, because I thought that it had probably only crossed over this month 19:22
19:22 mathw_ joined, rjbs- joined, zakalwe_ joined
masak nwc10++ # crunching data 19:23
19:23 lizmat joined
masak *and* your Perl 5 code is a joy to read. figures. :) 19:24
timotimo cool :)
masak chomp @heads; # OFF WITH THEIR HEADS
19:24 ivan``_ joined 19:25 Lorn_ joined, atta_ joined
masak ooh, I want to port that script to Perl 6 now :) 19:25
nwc10 I was going to invite someone to
masak but I don't have time tonight :/
someone is welcome to beat me to it, and I will happily review the result. 19:26
nwc10 I considered trying to do it in Perl 6, but figured that I was more interested in the answer than the programming
19:26 Fatalnix_ joined
benabik Heh. "Stage parse : 15747.733" 19:26
19:26 lizmat_ left
nwc10 Stage jast : 23865.091 19:27
that's more troubling
19:27 ivanshmakov left, japhb left, johnny5_ left, ivan`` left, synopsebot left, frdmn|afk left, risou_awy left, mathw left, crazedpsyc left
nwc10 and even more troubling is that the JVM usually SEGVs somewhere in parse 19:27
19:27 johnny5_ joined, synopsebot joined
benabik Well, mine was probably due to me backgrounding the compile while I was on battery. 19:27
19:27 cotto joined, crazedpsyc joined
benabik JVM Segfaulting is depressingly common with some newer features (like invokedynamic). 19:27
nwc10 and the one time it completed 'jast' it then ran out of swap, presumably trying to create a buffer to put bytecode in
diakopter nwc10: microsoft stopped sponsoring the iron languages a few years ago 19:28
19:28 hugme joined
nwc10 this seemed to be depressingly common about 53 minutes in 19:28
19:28 ChanServ sets mode: +v hugme
nwc10 diakopter: yes, I became aware of that recently-ish. 19:28
masak hugme: hug me
hugme hugs masak
nwc10 It's sort of sad
19:28 lizmat_ joined, geekosaur joined
nwc10 Jython is also looking pretty stalled currently 19:29
19:29 dylanwh joined, rafl joined
masak hugme: hug the iron languages 19:29
hugme hugs the
diakopter yep; reimplementations are never good enough
19:29 jferrero joined
Util #ps time 19:30
masak diakopter: there are brilliant exceptions though (such as JScript)
19:30 lizmat left
diakopter masak: *cough* 19:30
timotimo JScript is good?
masak JScript, at its time (1996) was a *brilliant*, bug-for-bug reverse engineering.
quite possible the best Microsoft ever made.
possibly*
timotimo hm 19:31
masak they reimplemented bugs Brendan Eich wasn't even aware of yet!
(and then they had to be standardized through EcmaScript, because users were dependent on the bugs) 19:32
timotimo not bad! 19:33
19:38 shinobicl joined
lizmat_ r: my Int @a=^3; @a[1]:delete; @a.map:{say .WHAT.perl }; @a[1].WHAT.perl.say # losing type info deep in the bowels of MapIter 19:40
diakopter masak: point taken
camelia rakudo 0808ac: OUTPUT«Int␤Any␤Int␤Int␤»
lizmat_ I guess I'm going to rakudobug this
19:41 japhb_ left
lizmat_ unless someone has a suggestion? 19:41
masak was the thing the other day rakudobugged? it was similar. 19:43
lizmat_ I think I told timotimo that I had an idea where it was coming from 19:44
but I was wrong
jnthn nwc10: Will be interesting to see if the cursless branches help your cause :)
lizmat_ at least, in the short term
19:44 lizmat_ is now known as lizmat
jnthn nwc10: They won't reduce memory need as a total, but they will reduce GC churn. 19:44
benabik You're just trying to hide GC bugs by calling it less often. ;-) 19:45
jnthn benabik: I suspect it's indy bugs...
nwc10 jnthn: given that it hasn't crashed *yet* on this run, I'll leave it 19:46
running
TimToady masak: left a snack sitting at irclog.perlgeek.de/perl6/2013-10-01#i_7657519 for the masakbot
benabik jnthn: The JVM segfaults? Assuming indy = invokedynamic, I'd agree.
masak om nom nom
TimToady: could you provide a gist of the local output from Rakudo/JVM? 19:48
19:48 denis_boyun joined
masak without it, we're missing the "actual" part of the triplet. 19:48
lue hello world! o/ 19:49
TimToady > say [1,2,3].combinations(2)
Method 'combinations' not found for invocant of class 'Scalar'
masak submits rakuodobug
diakopter nwc10: 11,111 commits for the sixers; 8,636 for the fivers
in 21 months
TimToady diakopter: I'm sorry, you obviously made up that number, 11,111 19:50
diakopter yeah :( 19:51
jnthn benabik: Well, afaik they're doing it over in 8... :)
TimToady doubtless rounded down from 11,111.111
lue commits for what, exactly?
benabik jnthn: So you get to work around all new bugs?
19:52 lizmat_ joined
diakopter lue: www.nntp.perl.org/group/perl.perl6....g9200.html 19:52
masak lue: see p6c email.
diakopter++ # url
diakopter masak++ # description
nwc10++ # thanks 19:53
jnthn benabik: probably :P
19:53 japhb_ joined
lue
.oO(My biggest takeaway from those slides is that NQP hacking would satisfy my interest in lower-level areas of programming, I just needed to find the shallow end of the pool)
19:54
diakopter++ masak++ # prompt responses
19:55 lizmat left
benabik As a systems researcher I find "NQP is lower-level" somewhat mind boggling. ;-) 19:56
lue Wow, that's amazing. (Also Parrot's commit numbers look kind of sad, I almost don't want to look at it.)
benabik: I said low*er* instead of low for a reason :) In my eyes, working on a compiler is decidedly lower than, say, programming a game or office software. 19:57
diakopter only if you let it be
lue diakopter: the Parrot sadness, yes? 19:58
diakopter there are plenty of counterexamples
jnthn
.oO( some might say you have to be higher to write a compiler... :P )
diakopter no, the low-ness of compiler
counterexamples in both directions
benabik lue: I didn't say wrong, just mind-boggling... NQP is pretty far up the food chain from most of my code these days. 19:59
.oO( You don't even have to worry about cache misses or coherency! )
diakopter benabik: :D
20:00 jnap left
lue
.oO(Not that I think is a compiler is *that* low on the chain. I mean, there's the linux kernel, and also pure assembler for those very special situations.)
20:01
20:03 lizmat joined 20:04 lizmat_ left 20:05 frdmn joined, WABCXRW joined, lizmat left
lue
.oO(That reminds, we should have an :asm adverb for quoting constructs, no way that could go wrong...)
20:06
benabik use asm :NO_REALLY, :I_MEAN_IT 20:07
TimToady use LotsaTyping;
20:07 Grimnir_ joined 20:08 labster joined, japhb joined
lue Q:asm<PBC>" ... " 20:09
and then it fails if you can't use PBC on the current machine. Simple and in no way dangerous. Works just fine for C/C++ ...
TimToady prefers PVC to PBC 20:10
20:10 go|dfish joined
diakopter I prefer IBC 20:10
timotimo i prefer IRC 20:11
benabik likes PBJ
nwc10 likes IPA
oh, that had rather too many letter changed
TimToady hoppiness != happiness
20:11 jnap joined
benabik TimToady++ 20:11
timotimo beer doesn't make you happy? 20:12
benabik Hoppy beer rarely makes me happy.
TimToady some of it makes me hoppy
TimToady prefers his beer not to tastel like poison
*taste 20:13
benabik Non-alcoholic beer?
(Although many of my friends would argue that tastes *more* like poison.)
20:14 denis_boyun left
TimToady The flagon with the dragon holds the brew that is true. 20:14
masak :)
jnthn IPA++ # but stout is still better :) 20:15
hmm, I've got a supposedly nice IPA in my fridge...
lue
.oO(Wait, the secret to assembler is beer? I'm confused.)
20:16
20:16 ssutch left
benabik has a milk stout++ in his fridge. 20:16
geekosaur ballmer peak? 20:22
TimToady if he's confused, he's obviously past the peak...
geekosaur or not there yet
TimToady that's just wrong, not confused :) 20:23
20:23 jnap left
FROGGS n: say('#abc' ~~ /<?[\s\#]> '#abc'/) 20:25
camelia niecza v24-95-ga6d4c5f: OUTPUT«「#abc」␤␤»
FROGGS that returns nothing with my locally patched nqp
masak is enjoying a chocolate stout
FROGGS makes earl grey
masak: you are a pervert 20:26
diakopter _._.
timotimo FROGGS: isn't it a bit too late at night for caffeine?
20:26 jnap joined
FROGGS timotimo: I can't parse that 20:27
masak FROGGS: you're not so bad yourself :)
FROGGS and what exactly is a 'milk stout'?
that doesn't sound right
TimToady
.oO(milk chocolate stout)
20:27 sqirrel left
FROGGS that is not really that sort-of-beer with milk? 20:28
is it?
benabik FROGGS: A stout where they add lactose (milk sugar) while brewing. The bacteria can't process it to turn it to alcohol so you get a sweet(er) stout.
FROGGS ahhh 20:29
benabik: then I would drink it too :o)
20:29 ssutch joined
FROGGS thanks for explaining that 20:29
20:40 ajr joined 20:41 ajr is now known as ajr_ 20:47 kivutar left 20:58 sitaktif joined 20:59 donaldh joined 21:04 skids left 21:05 sqirrel joined 21:14 kaare_ left 21:21 sqirrel left, denis_boyun joined 21:22 denis_boyun left 21:27 bruges_ joined 21:28 kivutar joined 21:29 bruges left
FROGGS damn, <?before <[\s\#]> > is still different from <?[\s\#]> locally 21:33
jnthn grr
21:36 dalek left 21:37 PacoAir left, dalek joined, ChanServ sets mode: +v dalek, lowpro30_ left
FROGGS and I'm out of ideas 21:40
21:40 flussence joined
FROGGS to fix all the bugs we would need a quoting language in nqp I guess 21:41
err, fear even
21:49 pecastro_ joined
timotimo we can still merge our branch at a point where it makes things "never worse" :) 21:49
FROGGS true 21:50
I think we dont need to change more than 3 <?[...]>'s to <?before
.... to fix spectest fails, not to fix <?[\#]>, beause we can't 21:55
jnthn I suspect that can be fixed :) 21:57
But yeah, we can merge if spectests pass.
I think the curernt point, allocating 56% or so of the Cursor objects we used to, is a very notable improvement :) 21:58
FROGGS so we should are about spectests now... anyone like to merge in master/nom? :o)
jnthn I doubt it'll produce muchin the way of conflcits :) 21:59
donaldh does the reduction in cursor objects make a significant reduction in heap usage? 22:00
22:00 not_gerd left
jnthn donaldh: All the Cursors we've eliminated tended to have short lifetimes. 22:00
diakopter donaldh: so it would reduce frequency of gc runs
jnthn donaldh: It reduces the amount the GC has to collect, that's for sure.
donaldh: But probably not total heap since the things went away anyway 22:01
donaldh speedup?
jnthn Not sure
Didn't compare yet.
Presumably not allocating a million objects saves *something*
22:02 shinobicl left
donaldh has been looking at JVM heap dumps. 22:02
diakopter .. unless you're allocating a million other objects... :)
donaldh some micro optimisations seem to give a reasonable heap saving.
But, after parsing CORE.setting we seem to have >100 huge long[]s, identical sizes, maybe identical contents. 22:04
22:08 mberends joined
donaldh These long[]s have 20,480 slots and 17,112 values. 22:12
jnthn Hm 22:13
They ain't by any chance pointed to by NFAs?
22:15 BenGoldberg joined, kivutar left
donaldh VMArrayInstance_i contained in a SixModelObject[] stored in a CallFrame.oLex 22:17
diakopter heh locals?
donaldh Yeah, oLex[5] to be precise. Every time. 22:19
jnthn wonders if prior_invocation could in any way be to blame...
masak 'night, #perl6 22:22
japhb__ o/ masak
jnthn r: say 0x3cc55c55b0 - 0x3cc54cb040 22:23
camelia rakudo 0808ac: OUTPUT«1025392␤»
jnthn r: say 1025392 < 2097152
camelia rakudo 0808ac: OUTPUT«True␤»
22:29 zwut00 joined 22:32 zwut001 left
FROGGS donaldh: my gut feeling is that rakudo's stage parse is about 8 to 10% faster 22:35
donaldh nice.
FROGGS would be cool if someone benchmarks it properly 22:36
donaldh aha, linepos cache in HLL::Compiler.lineof 22:43
22:43 aindilis` left
donaldh conditional breakpoints ftw 22:43
jnthn ah... 22:45
donaldh but so many copies.
donaldh scratches head
jnthn yes, that's odd
I'd only expect one of those.
22:48 benabik left 22:50 btyler left 22:56 kay__ joined 22:58 zwut00 left
timotimo well, each invocation of Compiler.compile will get its own cache; does that get hit multiple times? 22:59
jnthn Oh, hm
Maybe it's that...
I did an epic hack to figure out where the anonymous entires in the Cursor creations come from 23:00
90051 are from <before ...> which I guess we knew about
timotimo put a say into the compile method to find out 23:01
jnthn timotimo: I think dynamic compilation will do it.
See compile_in_context in World
timotimo that would happen often in the optimizer of rakudo at least
jnthn it happesn whenever we compile 23:02
23:02 lizmat joined
timotimo yeah, like a begin block 23:02
or a use statement i guess
jnthn Right
timotimo in the use statement it makes sense to do it, because the file is a different one and you'd end up with different values
jnthn aye 23:03
23:03 grondilu left
jnthn but BEGIN, we can re-use the line number cache 23:03
Building it isn't the cheapest thing either, we may be onto a nice saving here... :)
timotimo sweet.
jnthn 37446anon (from !INTERPOLATE) 23:04
Hmm :)
timotimo the metamodel runs the compile method 27 times
i'll have a number for you for the core setting in just a bit.
jnthn ok
timotimo 134 times 23:06
and 14 times in the optimizer 23:07
jnthn method compile($source, :$from, *%adverbs) {
my %*COMPILING<%?OPTIONS> := %adverbs;
my $*LINEPOSCACHE;
Maybe if we make that
timotimo yes, it makes a new one every time
jnthn method compile($source, :$from, :$*LINEPOSCACHE, *%adverbs) { 23:08
...
And then in compile_in_context we pass in the existing contextual.
That should do it.
timotimo sounds sensible. i'd love to do the grunt work for you, but i really ought to go to bed early today
jnthn np, there's always tomorrow
jnthn is in need of sleep soon too :) 23:09
donaldh yeah, past my bedtime too.
jnthn Realized an opt but it involves parametric roles and interpolation of parameters in regexes... :)
So I may code that up tomorrow instead :)
donaldh is too tired to keep up :) 23:10
jnthn: what's the opt ?
jnthn donaldh: Think we can call the simpler !LITERAL for those rather than !INTERPOLATE in the NQP case. 23:12
23:17 Mouq joined
timotimo it turned out that making the changes was very easy 23:21
if i didn't do anything wrong, expect a result in 5 minutes
parse time down from 120s to ... 23:23
donaldh hmm, the linepos cache is first calculated when Grammar.nqp calls World.load_module
[Coke] wow, iphone tethering feels like dialup. 23:24
diakopter 4g is nice
[Coke] waves from the place of tuesday noms.
jnthn I hope the place of Tuesday noms is giving tasty noms
timotimo ... i hope it was worth it and i did it right ...
[Coke] has 4 bars of 4G and and is typing ahead by quite a bit. :(
timotimo 113s
jnthn 7s. I'll take that. :) 23:25
And a memory reduction too I guess
timotimo (that measurement is probably noisy as shit)
jnthn heh :)
[Coke] jnthn: chain called chipotle. I ditched my usual of panera when they wouldn't make me a breakfast sandwich at 7:15pm. ;)
donaldh Yeah, I can investigate the heap saving.
timotimo gist.github.com/timo/0432e2d7abbcf4c3dce9 - try for yourself
good * everybody!
donaldh thx timotimo 23:26
timotimo yw
(really, i just can't help myself)
maybe there's more invocations of compile inside World that could use that optimisation
jnthn I *think* they are all funneled thorugh the one place 23:27
'night, timotimo++
and 'night from me also o/
donaldh night o/ 23:31
23:32 donaldh left 23:33 ajr_ left 23:36 kay__ left
dalek rl6-roast-data: 3d4900e | coke++ | / (4 files):
today (automated commit)
23:37
23:46 jeffreykegler joined 23:47 pdurbin joined