»ö« 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.
00:08 pmurias left 00:16 FROGGS left 00:17 raiph left 00:19 raiph joined 00:22 xenoterracide left
flussence [Coke]: git describe --long should work 00:33
00:49 cognominal left 00:50 cognominal joined 01:03 Nom- left 01:11 Nom- joined 01:14 woosley left 01:16 woosley joined 01:39 cognominal left 01:46 lowpro left 01:52 lowpro joined, lowpro left 02:00 lowpro joined 02:08 BenGoldberg left 02:11 BenGoldberg joined 02:12 btyler_ left
BenGoldberg rn: say ("O".."z").Str 02:16
camelia niecza v24-88-g1f87209: OUTPUT«(timeout)»
..rakudo 4a608a: OUTPUT«O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z␤»
BenGoldberg rn: "Oz".ords.say 02:17
camelia rakudo 4a608a, niecza v24-88-g1f87209: OUTPUT«79 122␤»
timotimo r: say("O".."z")[^20] 02:18
camelia rakudo 4a608a: OUTPUT«"O".."z"␤»
timotimo r: say("O".."z").map(*.Str)[^20]
camelia rakudo 4a608a: OUTPUT«"O".."z"␤»
BenGoldberg rn: .print for "O".."z" 02:19
timotimo r: say ("O".."z")[^20]
camelia niecza v24-88-g1f87209: OUTPUT«(timeout)OPQRSTUVWXYZAAABACADAEAFAGAHAIAJAKALAMANAOAPAQARASATAUAVAWAXAYAZBABBBCBDBEBFBGBHBIBJBKBLBMBNBOBPBQBRBSBTBUBVBWBXBYBZCACBCCCDCECFCGCHCICJCKCLCMCNCOCPCQCRCSCTCUCVCWCXCYCZDADBDCDDDEDFDGDHDIDJDKDLDMDNDODPDQDRDSDTDUDVDWDXDYDZEAEBECEDEEEFEGEHEIEJEKELEME…
..rakudo 4a608a: OUTPUT«OPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz»
rakudo 4a608a: OUTPUT«O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b␤»
timotimo (spacebaris a bit busted)
...
r: say ("O".."z")[^30]
camelia rakudo 4a608a: OUTPUT«O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l␤»
timotimo r: say ("O".."z")[^100]
camelia rakudo 4a608a: OUTPUT«O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z␤»
BenGoldberg n: .say for ("O".."z")[^20]
timotimo r: say ("O".."z")
camelia niecza v24-88-g1f87209: OUTPUT«O␤P␤Q␤R␤S␤T␤U␤V␤W␤X␤Y␤Z␤AA␤AB␤AC␤AD␤AE␤AF␤AG␤AH␤»
rakudo 4a608a: OUTPUT«"O".."z"␤»
timotimo r: .say for ("O".."z") 02:20
camelia rakudo 4a608a: OUTPUT«O␤P␤Q␤R␤S␤T␤U␤V␤W␤X␤Y␤Z␤[␤\␤]␤^␤_␤`␤a␤b␤c␤d␤e␤f␤g␤h␤i␤j␤k␤l␤m␤n␤o␤p␤q␤r␤s␤t␤u␤v␤w␤x␤y␤z␤»
timotimo it does work
diakopter .seen sorear
yoleaux I saw sorear 21 Jul 2013 06:33Z in #perl6: <sorear> admittedly it's largely out of necessity
timotimo oh, it was niecza who timeout'd
BenGoldberg Why does niecza follow Z with AA, while rakudo follows Z with [
timotimo well, because this:
r: say ("a".."zz")[1, 5, 10 ... *]
camelia rakudo 4a608a: OUTPUT«Unable to deduce sequence␤ in method sink at src/gen/CORE.setting:11241␤ in block at src/gen/CORE.setting:14827␤ in any coro at src/gen/CORE.setting:6919␤ in method reify at src/gen/CORE.setting:6901␤ in method reify at src/gen/CORE.setting:6643␤ in method r…
timotimo r: say ("a".."zz")[1, 5, 11 ... *] 02:21
camelia rakudo 4a608a: OUTPUT«Unable to deduce sequence␤ in method sink at src/gen/CORE.setting:11241␤ in block at src/gen/CORE.setting:14827␤ in any coro at src/gen/CORE.setting:6919␤ in method reify at src/gen/CORE.setting:6901␤ in method reify at src/gen/CORE.setting:6643␤ in method r…
timotimo oh?
r: say ("a".."zz")[0, 5, 10 ... *]
camelia rakudo 4a608a: OUTPUT«(timeout)»
timotimo huh.
r: say ("x"..*)[^20]
camelia rakudo 4a608a: OUTPUT«x y z aa ab ac ad ae af ag ah ai aj ak al am an ao ap aq␤»
timotimo it's just that rakudo notices that O and z are not part of the same sequence
r: say ("X"..*)[^20]
camelia rakudo 4a608a: OUTPUT«X Y Z AA AB AC AD AE AF AG AH AI AJ AK AL AM AN AO AP AQ␤»
BenGoldberg r: say ("a".."zz") 02:25
camelia rakudo 4a608a: OUTPUT«"a".."zz"␤»
BenGoldberg r: say ("a".."zz")[^*]
timotimo i think we may have more luck with the ... operator
camelia rakudo 4a608a: OUTPUT«(timeout)»
timotimo r: say "a"..."z"
camelia rakudo 4a608a: OUTPUT«a b c d e f g h i j k l m n o p q r s t u v w x y z␤»
timotimo r: say "a"..."zz"
camelia rakudo 4a608a: OUTPUT«a b c d e f g h i j k l m n o p q r s t u v w x y z aa ab ac ad ae af ag ah ai aj ak al am an ao ap aq ar as at au av aw ax ay az ba bb bc bd be bf bg bh bi bj bk bl bm bn bo bp bq br bs bt bu bv bw bx by bz ca cb cc cd ce cf cg ch ci cj ck cl cm cn co cp cq cr cs …
timotimo r: say +("a"..."zz")
camelia rakudo 4a608a: OUTPUT«702␤»
timotimo r: say ("a"..."zz")[^*] 02:26
camelia rakudo 4a608a: OUTPUT«a b c d e f g h i j k l m n o p q r s t u v w x y z aa ab ac ad ae af ag ah ai aj ak al am an ao ap aq ar as at au av aw ax ay az ba bb bc bd be bf bg bh bi bj bk bl bm bn bo bp bq br bs bt bu bv bw bx by bz ca cb cc cd ce cf cg ch ci cj ck cl cm cn co cp cq cr cs …
timotimo r: say ("a".."zz")[{ say $^length }]
camelia rakudo 4a608a: OUTPUT«702␤b␤»
timotimo r: say ("a".."zz")[{ $^length }]
camelia rakudo 4a608a: OUTPUT«Nil␤»
timotimo r: say ("a".."zz")[^{ $^length }]
camelia rakudo 4a608a: OUTPUT«Cannot call 'Numeric'; none of these signatures match:␤:(Mu:U \v: Mu *%_)␤ in method Numeric at src/gen/CORE.setting:952␤ in sub prefix:<^> at src/gen/CORE.setting:6601␤ in block at /tmp/wv2G6lakwA:1␤␤»
timotimo er, haha
r: say ("a".."zz")[{ ^$^lenger }]
that's interesting.
camelia rakudo 4a608a: OUTPUT«(timeout)» 02:27
BenGoldberg r: say ("a".."zz")[{ ^$^foobar }]
camelia rakudo 4a608a: OUTPUT«(timeout)»
BenGoldberg r: say ("a".."b")[{ ^$^foobar }]
camelia rakudo 4a608a: OUTPUT«a b␤»
timotimo $^frobfrob is the syntax for an implicit signature's argument
r: say ("a".."bz")[{ ^$^argh }] 02:28
camelia rakudo 4a608a: OUTPUT«a b c d e f g h i j k l m n o p q r s t u v w x y z aa ab ac ad ae af ag ah ai aj ak al am an ao ap aq ar as at au av aw ax ay az ba bb bc bd be bf bg bh bi bj bk bl bm bn bo bp bq br bs bt bu bv bw bx by bz␤»
BenGoldberg r: say ("a".."b")[{ say ^$^foobar }]
camelia rakudo 4a608a: OUTPUT«0..^2␤b␤»
BenGoldberg r: say ("a".."b")[{ say ^$^length }]
camelia rakudo 4a608a: OUTPUT«0..^2␤b␤»
timotimo maybe a multi candidate for postcircumfix:<[ ]> would be in order that understands ranges
r: say (^10).WHAT
camelia rakudo 4a608a: OUTPUT«(Range)␤»
BenGoldberg r: say ("a".."d")[{ say ^$^asdflkjwef }] 02:29
camelia rakudo 4a608a: OUTPUT«0..^4␤b␤»
02:29 xenoterracide joined
timotimo why did a perl6 advent post just bubble up in my feed reader? 02:42
02:47 lue joined 02:50 lue left 02:53 btyler joined, ssutch left 03:19 ssutch joined 03:41 Ben_Goldberg joined 03:42 BenGoldberg left 03:45 btyler left 03:47 Ben_Goldberg left 03:48 BenGoldberg joined 04:27 raiph left, grondilu left 04:30 konundra left 04:31 konundra joined 04:37 raiph joined 04:38 BenGoldberg left 04:39 djanatyn left, djanatyn joined 04:44 birdwindupbird joined 04:45 konundra left 04:52 xilo left 05:12 SamuraiJack_ joined
moritz \o 05:22
diakopter o/ 05:37
Woodi hallo 05:41
could someone give ~ info about what's broken in Star ATM ? 05:42
05:42 ssutch left 05:44 ssutch joined 05:48 preflex left 05:49 preflex joined, ChanServ sets mode: +v preflex 05:52 logie left, logie joined
frettled Good morning, #perl6 :) 06:03
06:10 silug joined 06:14 dmol joined 06:15 lowpro left 06:26 daniel-s__ joined 06:32 huf joined 06:35 robinsmidsrod joined 06:47 zacts joined 06:49 xinming left 06:52 xinming joined
moritz \o frettled 06:53
06:59 sidus joined 07:04 FROGGS joined 07:22 fhelmberger joined 07:27 kaleem joined
lizmat good *, #perl6 07:41
FROGGS gmorning lizmat 07:49
lizmat morning FROGGS!
arnsholt Woodi: I know that Zavolaj fails some tests 07:52
moritz: Incidentally, the Zavolaj fail is likely to impact DBIish I think
moritz :/ 07:54
arnsholt It'll only fail when you use explicitly-manage() (which I'm looking forward to axing, BTW), but IIRC at least the Pg driver needs that 07:56
dalek rlito: 95e6b6c | (Flavio S. Glock)++ | TODO-perlito5:
Perlito5 - TODO cleanup
07:59
lizmat Q: is there an easy way to complete fudge a test file for niecza and pugs ? 08:06
arnsholt Not sure what you want to do 08:07
lizmat working on $var will foo {} tests, and these won't work on niecza nor pugs
arnsholt If you want to run a single (fudged) test file you can make t/spec/path-to-file.t
lizmat so all tests need to be fudged
arnsholt At least on Rakudo
Oh, right. Mark the entire file as to be skipped should be possible 08:08
I've no idea how though, sorry
lizmat :-(
:-)
hmmm… some conditional skip_rest. but what would the condition be? 08:09
ah, fudge that line for rakudo :-)
FROGGS lizmat: if you dont want to run a single file, just remove it from spectest.data 08:10
lizmat I don't want to run this for niecza and pugs 08:11
they have their own "spectest.data", no?
FROGGS they have 08:13
so if you add a new test file for example for rakudo, you are always safe
lizmat for now, this seems to do the trick: 08:14
#?rakudo 1 skip "don't skip on rakudo"
BEGIN skip_rest( "can only do this on rakudo" );
masak mornin', #perl6 08:16
lizmat morning masak 08:17
S04:1454 states "These have the advantage of passing the variable in question into the closure as its topic" 08:22
synopsebot Link: perlcabal.org/syn/S04.html#line_1454
lizmat I wonder what that would mean for cases such as 08:23
my @a will begin { say $_.WHAT } # Array ?
masak r: my @a; BEGIN { say @a.WHAT } 08:24
camelia rakudo 4a608a: OUTPUT«(Array)␤»
masak nods
lizmat r: my @a; $_ := @a; say $_.WHAT # more like this, I guess 08:25
camelia rakudo 4a608a: OUTPUT«(Array)␤»
lizmat r: my @a will begin { say $_.WHAT } # Array ? 08:28
camelia rakudo 4a608a: OUTPUT«(Mu)␤»
masak I don't see why it shouldn't be (Array) 08:29
masak submits rakudobug
08:30 sqirrel joined
lizmat masak: don't bother, it's NYI 08:30
one of the blockers I'm banging my head against
masak ok, submitting as [NYI] instead of [BUG] :) 08:31
08:34 daxim joined
lizmat r: my @a will begin { say @a.WHAT } # the crux of the current problem 08:35
camelia rakudo 4a608a: OUTPUT«===SORRY!===␤Variable '@a' is not declared␤at /tmp/psEdqWxtJ9:1␤------> my @a will begin { say @a.WHAT⏏ } # the crux of the current problem␤ expecting any of:␤ method arguments␤ postfix␤»
08:37 preflex left, ecocode joined
masak lizmat: now that *is* a bug. 08:39
08:39 preflex joined, ChanServ sets mode: +v preflex, dakkar joined
masak one I can partly explain, though, having dealt with macros. 08:39
lizmat no, its's NYI
08:39 rindolf joined
lizmat when the code of the block gets executed, the variable has not been properly declared yet 08:39
masak a variable is *always* declared as soon as the parser is past 'my @a' 08:40
but I see what you're saying. it's an interesting edge case.
lizmat that's the point: it only is declared, afaics, *after* the next ; or , 08:41
masak forget the connection to macros (and scopes), your explanation is simpler.
r: my $x = $x
camelia rakudo 4a608a: ( no output )
masak lizmat: then that wouldn't compile.
lizmat hmmm… add '=' to the list of boundaries :-) 08:42
masak you keep adding epicycles. :)
just say it's after the 'my $x' :)
because we also have cases like 'say (my $x) + $x' 08:43
lizmat well, fwiw, the same probem we had with "is readonly"
masak r: say my $x + $x ** $x
lizmat it would mark the variable as readonly before it could get initialize
camelia rakudo 4a608a: OUTPUT«use of uninitialized value of type Any in numeric context in block at /tmp/pvrQRsBJMv:1␤␤use of uninitialized value of type Any in numeric context in block at /tmp/pvrQRsBJMv:1␤␤use of uninitialized value of type Any in numeric context in block at /tmp/pvrQRs…
lizmat d
FROGGS I think the problems is that "declaring a var" has several steps
-s
when the parser spots my $x it is known to the parser, even if a trait is following 08:44
lizmat masak: now that is interesting :-)
FROGGS but that is all that happened at that time
masak lizmat: my point is that 'at the next boundary' is too late. 08:53
lizmat: see also parameters: '$x where { $x == 7}'
lizmat hmmm... 08:54
first I'll write a large set of (todo/skip) tests, then I'll look at the "where" case
masak r: sub foo($x, $y where { $y == $x + 2 }) { say "yep, $x and $y works!" }; foo(10, 12); foo(7, 8) 08:56
camelia rakudo 4a608a: OUTPUT«yep, 10 and 12 works!␤Constraint type check failed for parameter '$y'␤ in sub foo at /tmp/n4M9QbAZAq:1␤ in block at /tmp/n4M9QbAZAq:1␤␤»
lizmat fwiw, jnthn++ spent only a few hours on this initial var trait implementation before he went on holiday 08:59
I'm just trying to get the rough edges off, but my sander is definitely not strong enough yet 09:00
masak lizmat++ # tuit source
lizmat: as Head Bug Wrangler, I feed off people's attempts to make things work. the friction that causes drives the bug-filing metabolic cycle. 09:01
lizmat wish I could spend my tuits more economically though, instead of head banging most of the time / waiting for make to finish
arnsholt I think the problem is that traits are part of the variable_declarator token (Grammar.pm:2110) and the corresponding action method is where it's installed in the symbol table 09:12
masak that doesn't sound insurmountable, though. 09:16
that sounds like "oh bother" but not "I... see. back to the drawing board."
arnsholt Yeah, shouldn't be completely crazy 09:17
09:17 fridim__ left
arnsholt From a skim of Actions.pm, looks like some of what happens in declare_variable() has to happen between the declaration of the name and the traits 09:18
lizmat it's too crazy for me at the moment :-( but I will get there somehow
FROGGS lizmat: that is why moarvm is so much fun, after changing stuff, it only takes a fraction of a minute to recompile and run the given test
arnsholt Installing a stub container descriptor or something like that
FROGGS arnsholt: that is what I tried to say earlier
arnsholt Ah, right 09:19
lizmat grrr… and now I find that "will end" should throw an exception, but doesn/t :-( 09:20
r: my $a will end { say "Goodbye" } 09:21
camelia rakudo 4a608a: ( no output )
lizmat r: my $a will foo { say "Goodbye" } 09:22
camelia rakudo 4a608a: OUTPUT«===SORRY!===␤Can't use unknown trait 'will foo' in a variable declaration.␤at /tmp/CR86bWmxRS:1␤------> my $a will foo { say "Goodbye" }⏏<EOL>␤ expecting any of:␤ begin check final init end␤ enter leave keep und…
09:37 raiph left, fhelmberger left
lizmat hmmm… even a die() doesn't work in a "will foo {…}' trait mod 09:49
masak I realized a couple of days back that a fairly essential part of the Nomic-in-p6 game would have to be a decent "Nomic simulator", in which a player could run his proposed patch offline with full mocking of other players, turns, voting, etc. 10:02
10:04 ecocode left 10:10 aindilis left
dalek kudo/nom: 59ec2d1 | (Elizabeth Mattijsen)++ | src/core/Variable.pm:
Remove useless exceptions from variable "will" trait
10:14
10:19 sidus left
masak std: say 00 10:24
camelia std c2215f0: OUTPUT«Potential difficulties:␤ Leading 0 does not indicate octal in Perl 6; please use 0o0 if you mean that at /tmp/GUrPKFCnDV line 1:␤------> say 00⏏<EOL>␤ok 00:00 42m␤»
masak std: say 00 #OK
camelia std c2215f0: OUTPUT«ok 00:00 42m␤»
FROGGS r: say 00
camelia rakudo 4a608a: OUTPUT«Potential difficulties:␤ Leading 0 does not indicate octal in Perl 6; please use 0o0 if you mean that␤ at /tmp/YF2NTpNjIs:1␤ ------> say 00⏏<EOL>␤ Leading 0 does not indicate octal in Perl 6; please use 0o0 if you mean that␤ at /tm…
FROGGS r: say 00 #OK
camelia rakudo 4a608a: OUTPUT«Potential difficulties:␤ Leading 0 does not indicate octal in Perl 6; please use 0o0 if you mean that␤ at /tmp/xaOcYwP1or:1␤ ------> say 00⏏ #OK␤ Leading 0 does not indicate octal in Perl 6; please use 0o0 if you mean that␤ at /tmp…
FROGGS k
dalek ast: 73f8c5b | (Elizabeth Mattijsen)++ | S04-declarations/will.t:
Initial work on "will" variable trait tests
10:28
kudo/nom: bb86d1a | (Elizabeth Mattijsen)++ | t/spectest.data:
Add new "will" variable trait tests
10:34 sqirrel left
masak still thinks gist.github.com/masak/5237570 is a thing of beauty and hopes to find tuits to implement it during 2013 10:37
I just went through it and found/fixed a bug or two. 10:38
10:38 sidus joined
masak programming mid-air is never a good idea ;) 10:38
(by which I don't mean "programming in airplanes", which should be fine, but "programming without having runnable code to make sure it actually works") 10:43
train & 10:45
FROGGS I'm getting sick when hacking in airplanes :/ 10:48
Teratogen std: 1 while fork; 10:50
camelia std c2215f0: OUTPUT«ok 00:00 42m␤»
Teratogen baw
FROGGS Teratogen: what do you expect? blowing up a parser? 10:51
Teratogen maybe "Out of memory" 10:52
std: @a=1..10000000000000000000000000000000000
camelia std c2215f0: OUTPUT«===SORRY!===␤Variable @a is not predeclared at /tmp/V_aa8iRKks line 1:␤------> <BOL>⏏@a=1..1000000000000000000000000000000000␤Check failed␤FAILED 00:00 43m␤»
Teratogen std: my @a=1..10000000000000000000000000000000000
camelia std c2215f0: OUTPUT«ok 00:00 43m␤»
Teratogen I give up
std: my @a=(1..10000000000000000000000000000000000) 10:53
camelia std c2215f0: OUTPUT«ok 00:00 45m␤»
Teratogen baw
std: $a = 1
camelia std c2215f0: OUTPUT«===SORRY!===␤Variable $a is not predeclared at /tmp/_UNfVKgScL line 1:␤------> <BOL>⏏$a = 1␤Check failed␤FAILED 00:00 43m␤»
Teratogen interesting, everything must be predeclared in Perl 6?
FROGGS Teratogen: std is "just" a parser
Teratogen ah
FROGGS Teratogen: no, there is a "lax"-mode specced 10:54
std: v6; say $a # maybe NYI ?
camelia std c2215f0: OUTPUT«===SORRY!===␤Variable $a is not predeclared at /tmp/6cMWmDHsZT line 1:␤------> v6; say ⏏$a # maybe NYI ?␤Check failed␤FAILED 00:00 42m␤»
FROGGS right, NYI
10:54 fgomez left
FROGGS but is shouldnt be too hard to implement that fwiw 10:54
11:00 leont joined
Teratogen Did Perl 6 do away with typeglobs? 11:00
Typeglobs are so very very Perlish! 11:01
leont They're also quite terrible ;-)
GlitchMr Teratogen: yes 11:06
But aliasing still exists if you need it.
my $a = 42; my $b := $a; 11:08
11:08 mj41 joined
Teratogen It's just not the same! 11:08
11:09 sqirrel joined
leont is coming to the perl 6 hackathon at YAPC::EU, but doesn't know what he's planning to do there yet􏿽x85 11:09
GlitchMr What else typeglobs could be used for? 11:10
leont filehandles of course :-( 11:11
And the weirdest objects ever!
GlitchMr Filehandles are proper objects in Perl 6.
Teratogen a typeglob is just a structure of references.
It's not that big of a deal.
nwc10 leont: I was wondering about "drink!" 11:12
Teratogen Going to Europe? Try the absinthe!
leont GlitchMr: that was sarcasm
GlitchMr You can have bareword filehandles, but they are still proper objects. 11:13
niecza> my \file = open 'file'
TextReader.new(...)
niecza> file
TextReader.new(...)
(it seems there is a bug in Rakudo with bareword filehandles, but in Niecza it works)
Teratogen ack 11:14
Camelcase =(
text_reader <== I am Multics old school
Ulti way of the camel case
GlitchMr TextReader is class name.
Teratogen why not text_reader
it's easier on the eyes
GlitchMr In Perl 5, TextReader->new would be fine (if TextReader would be a package). 11:15
Ulti I'm with GlitchMr on this one
Teratogen I don't get it!
text_reader->new
GlitchMr Because packages and classes are important.
Ulti JavaDoesThis variable_name
GlitchMr Java actually does JavaDoesThis variableName
Perhaps Python, or Ruby. 11:16
Ulti types in Perl6 are capitalised already so why wouldnt you do the same with your own types
GlitchMr Also, TextReader is a bug in Niecza.
In Rakudo, it's IO::Handle object.
FROGGS in Perl land packages (= types) were always PascalCased
GlitchMr And, well, it's from Perl 5. 11:17
There is nothing wrong IMO with CamelCaseClasses.
Also, text_reader is ugly in Perl 6. Perhaps text-reader? 11:18
11:18 pmurias joined
FROGGS right 11:18
dalek kudo-js: d1204ad | (Pawel Murias)++ | run_tests:
Add passing test 64 to run_tests.
GlitchMr Underscores generally are avoided in Perl 6.
Ulti $_
GlitchMr $_ is exception. 11:19
FROGGS s/avoided within names//
GlitchMr $- would be ugly.
FROGGS we basically have $_, $! and $/, and I love all three 11:20
GlitchMr I'm not sure whatever Perl 6 needs $!, but it's still improvement compared to Perl 5. 11:21
Ulti I kind of like Icon's take on magic variables they have their own sigil &
GlitchMr With lots of global filehandle variables.
leont couldn't resist looking up $- in perl5, it's "The number of lines left on the page of the currently selected output channel.", thank goodness perl 6 doesn't have formats
GlitchMr Perl 6 has formats, just that they are external module available in ecosystem.
But Perl 6 formats don't depend on global variables and nonsense like that. 11:22
github.com/mathw/form/
The formats were going to be a part of Perl 6, but were moved to external module. 11:23
leont They're not formats in the perl 5 sense, they're just a template system
GlitchMr Formats in Perl 5 are templating system too.
(well, yeah, formats in Perl 5 could only write to filehandles, but nothing stopped you from opening variable filehandle) 11:24
leont But not "just one". Syntactically they're part of the language as much as subs are 11:25
Down to little things like all globs having a FORMAT field􏿽x85
GlitchMr True.
Perl 5 formats need syntactical support from language itself. 11:26
Perl 6 formats are just a function.
But is there any difference between standard function call and special syntax? 11:27
(also, Perl 6 modules can easily add special syntax, so well...) 11:28
leont What do you mean?
GlitchMr You can modify Perl 6 grammar from language itself. 11:29
11:29 rindolf left
GlitchMr r: sub infix:<!@#> { $^a * 2 + $^b * 3 }; say 7 !@# 3; 11:29
camelia rakudo bb86d1: OUTPUT«23␤»
GlitchMr Doing something like format would be more complex, but possible.
leont Ah, like that 11:30
Yeah, you don't really want that
GlitchMr The Perl 6 grammar is written in Perl 6. 11:31
github.com/perl6/std/blob/master/STD.pm6
leont I meant, you don't want to recreate formats that way, you want to have a modifiable grammar, I agree on that! 11:34
GlitchMr You can insert a token into grammar
Something like 'format' <stuff>
arnsholt (This is mostly not yet implemented, mind) 11:35
GlitchMr I think it's possible in STD.pm6.
Not sure about Rakudo or Niecza.
By STD.pm6, I mean viv.
arnsholt viv actually handles macros? 11:36
GlitchMr No.
But I guess it could parse the token added to grammar.
viv is just a parser.
arnsholt Oh, right. But that's not terribly useful for Rakudo/Niecza though 11:37
As long as we can't attach actions and generate AST for new syntax, we can't make it do anything 11:38
GlitchMr STD.pm6 knows what is a 'macro'.
But it doesn't run it...
11:50 odoacre left 12:03 mtk left 12:12 mtk joined
Ulti out of interest is there any difference between doing @list ==> map {$_+=3} ==> reduce {$^a+$^b} and map {$_+=3}, @list ==> reduce {$^a+$^b} 12:26
in the first could the map be done in parallel as well as the reduce and the second the map is done sequentially?
or is it all just sequential pipe style doing things 12:27
as in its just a different process for each expression between ==>
GlitchMr Ulti: it just looks differently 12:30
==> shows piping process.
12:31 cognominal joined
GlitchMr But IMO, mixing two styles is ugly. 12:31
12:33 kingbeast joined
Ulti so there is no practical difference between reduce {$^a+$^b}, map {$_+=3}, @list and the ==> form? as in I should expect something like forking with ==> ? 12:34
*shouldn't
GlitchMr ==> has nothing with forking 12:35
Ulti GlitchMr: I like the ==> just because you can use left to right read order which is easier for non functional types to read
[Coke] flussence: no, git describe --long also says "nothing to describe"
GlitchMr I mean, you have @list in middle, not at beginning or end. 12:36
Ulti huh? 12:37
GlitchMr: the 'and' was english not Perl6 ;)
GlitchMr I prefer something like @list ==> map { $_ += 3 } ==> reduce { $^a + $^b }
Ulti so the feed operator does nothing apart from syntax sugar? 12:38
GlitchMr But that is ugly in my opinion
12:38 dmol left
GlitchMr Rather, I would do [+] @list X+ 3 12:38
Ulti yeah I know but it was just an example with the feed operator so I could talk about it 12:39
GlitchMr And yes, feed operator is just a syntactic sugar.
reduce {} is always confusing, by the way.
Ulti really why?
GlitchMr (when not used with simple infix operator) 12:40
12:40 kingbeast left, crab2313 joined
GlitchMr And when you use it with infix operator, you have [] prefix operator anyway. 12:40
Or reduce &[+], but that's more verbose.
[Coke] Woodi: here's a list of everything failing in star: github.com/coke/rakudo-star-daily/...odules.log
mathw that's a matter of opinion
[Coke] (assuming we want to upgrade to latest module versions of rakudo+nqp+modules)
[Coke] wonders who updated perl6advent.wordpress.com/2012/12/...-me-on-it/ 12:41
GlitchMr There is a reason why reduce() is avoided in Python.
Ulti Python avoids any functional trope as far as I can see 12:42
like removing lambda in version 3
GlitchMr lambda never was removed
Ulti orly
GlitchMr lambda wasn't removed*
>>> lambda: 42 12:43
<function <lambda> at 0xf727c2ec>
Ulti docs.python.org/3.3/faq/programming...-in-python its not advised either, and is picked on a lot
GlitchMr Guido wanted to remove it, but there was no good alternative for it in many cases. 12:44
mail.python.org/pipermail/python-de...60415.html
But reduce() was moved to functools.
He also wanted to remove map() and filter(). 12:45
www.artima.com/weblogs/viewpost.jsp?thread=98196
Only reduce() was removed (or rather, moved to functools).
mathw That's a Python decision though
It doesn't mean reduce is intrinsically bad
Functional programmers use it all the time 12:46
GlitchMr sum() is still available in Python
(even when it's just specific case of reduce)
mathw this is why I don't like Python
why demote reduce in favour of, what, foreach loops? 12:47
leont list comprehensions
Ulti " filter(P, S) is almost always written clearer as [x for x in S if P(x)] " wtf that makes no sense /unless/ you are already a Python programmer
leont Yeah, they are powerful but not exactly obvious
Ulti list comprehensions aren't exactly common everywhere but the word filter with two parameters I can have a good guess at
leont Then again, we're talking about the people who make fun of perl's syntax, and then copy the very worst part of it (regexps) verbatim􏿽x85 12:48
Ulti map reduce is also a lot more common an idea now thanks to BigData hype too
leont: its more they use the actual implementation and feed it strings :)
GlitchMr reduce with something other than { $^a + $^b }, { $^a * $^b } or { $^a lcm $^b } doesn't make much sense IMO. 12:49
mathw I have no issue with list comprehensions, they can be a neat way to express things
GlitchMr In Perl 6, also stuff like [>] are useful, except reduce cannot do it.
Ulti mathw: neither do I, but arguing they are easier to read than a named function is a bit of a streth imho 12:50
though calling grep filter might be a good plan ;) 12:51
since windows people have no idea what grep is
GlitchMr grep is part of Perl.
It should stay grep.
mathw I'm always wary of judgements about 'easy to read' because most languages are incomprehensible until you learn them
GlitchMr With filter, Perl doesn't look Perl. 12:52
mathw if you follow easy to read to its conclusion you end up with visual basic
leont mathw: I think perl people tend to understand that a lot better than python people
Ulti heh dont know about that, most VB I've had to look at wasnt readable lol
readable has more to do with the developer than the language
mathw obviously it's possible to write unreadable VB :) 12:53
just like you can also write readable Perl 5, much as it might shock some parts of the internet to say that
GlitchMr If you don't know VB, it looks unreadable.
Ulti remembers thedailywtf.com exists
GlitchMr Or even confusing.
For example, & operator for concatenation.
I mean, everybody (read; C-like languages) uses it as bitwise and. 12:54
Ulti I never got why & isnt used for string concatenation WAY more
moritz hardware upgrade&
Ulti whats more intuitive & or ~ . +
"hello" & "world"
GlitchMr Ulti: ++
Or // if you prefer that.
mathw ++ works nicely in Haskell 12:55
Ulti I guess its all a hangup on programming not being so much about strings, a legacy from computers being about logic and calculation
GlitchMr Or strcat()
mathw although for serious string handling you need something else, because you need the Text library and ++ is really list-append
GlitchMr I mean, strcat() says what it does.
Ulti really if two strings are next to each other with no op that should mean concatenation too 12:56
12:56 sqirrel left
GlitchMr (if you ignore lame, C-style name of function) 12:56
Alternatively, there is AWK with it's concatenation operator.
mathw heh, good luck writing the grammar for that one :)
GlitchMr its* 12:57
mathw: what is difficult with writing grammar for two strings next to each other
rule concatenation { <string> <string> } 12:58
Ulti make any amount of white space between stuff force a string interpretation and concatenate, doesnt sound too crazy
GlitchMr ~ $ awk 'BEGIN { print 4 2 }'
42
Sounds about right. 12:59
Or shell scripts, where nothing is concatenation.
mathw I don't think string concatenation is important enough to justify such a valuable place in the syntax
Ulti the way you define rules in Perl6 is basically this anyway 13:00
GlitchMr If I write $var$var2 in shell script, it's concatenation of $var and $var2.
But if I write $var $var2, it isn't concatenation.
Ulti yeah significant white space like that I draw the line at 13:01
the no white space and any white space being concatenation I can get behind
13:02 _ilbot joined 13:03 moritz joined 13:04 SamuraiJack_ left 13:12 telex left 13:13 telex joined 13:14 konundra joined 13:18 PacoAir joined 13:22 xilo joined 13:26 stevan_ joined
moritz fwiw the machine behind irclog.perlgeek.de now has more ram, so with a bit of luck it's faster now 13:37
and with even more luck I can compile rakudo on it, and use the Perl 6 logging bot
[Coke] moritz: MORITZ!
moritz has trouble upper-casing the [ and ] in [Coke] :-) 13:39
[Coke] r: say '['.uc 13:40
camelia rakudo bb86d1: OUTPUT«[␤»
PerlJam moritz: the capslock key helps :) 13:41
[Coke] hates the []
moritz PerlJam: :-)
[Coke] ... people still have that wired to caps lock!? ;)
moritz [Coke]: you could always do a /nick ]Coke[ :-) 13:42
mathw do you have to have the ] 13:45
or the [
13:49 rindolf joined 13:52 PacoAir left 13:53 PacoAir joined, PacoAir left 13:54 PacoAir joined
[Coke] mathw: I can't have just Coke, is the problem. 13:54
13:54 [Coke] is now known as Coke
Coke ... I can't *register* Coke, is the problem. :) 13:54
yoleaux 5 Apr 2013 14:55Z <[Coke]> Coke: hi.
13:54 Coke is now known as [Coke] 13:55 [Coke] is now known as Coke, btyler joined 13:57 Coke is now known as [Coke], dmol joined
mathw ah 13:59
[Coke] irc--
PerlJam (dude who registered "Coke" before [Coke] was able to)-- 14:00
:)
14:00 kaare_ joined
mathw specificity++ 14:02
huf isnt { the uppercase of [ ? 14:04
or the other way around... 14:05
FROGGS it is sort of () on my keyboard
huf i dont dare look down because the painted layout will utterly confuse me 14:06
FROGGS moritz: can you give me a hint, where the code is for lazy evaluation in rakudo? 14:07
huf () is particularly hard
GlitchMr huf: { is lowercase of [
(but I don't think it matters much)
huf except for nicks, yeah
mathw { is uppercase of [ on my keyboard 14:08
huf i dont think i could be {coke}
GlitchMr huf: I'm not talking about that. 14:09
I'm talking it doesn't really matter whatever [ is lowercase, or { is lowercase.
huf right 14:10
mathw: sure, in reality it's that way on mine too, since us layout. but the paint is funny.
but this is from the finnish layout originally...
(what an odd way to choose upper/lowercase pairs)
14:11 jaldhar joined
GlitchMr {}| []\ 14:11
14:21 skids joined
moritz FROGGS: lazy evaluation? in which context? 14:22
of lists? or of thunks? 14:23
GlitchMr Lazy evaluation? my @array = map { do_something $_ }, @stuff 14:25
I meant, my @array := map { do_something $_ }, @stuff 14:26
FROGGS moritz: of lists
GlitchMr Or gather { take }
Or grep
Or anything that returns iterator
FROGGS like: my @b = ^9; my @a := map { say 1; $_ + 1 }, @b; say @a[2] 14:27
moritz FROGGS: that's really in ListIter/MapIter, but also spread out all over the List code
FROGGS I want to try to put the calculation in a thread
k, thanks
14:27 xilo left, sqirrel joined
moritz FROGGS: that would be fine for feeds, for example 14:27
FROGGS: but lazy is really the opposite of parallel
FROGGS but it shares some logic: you try to access @a[2], and for the multithreaded case it would wait for the thread at that point 14:28
at least that is my understanding
moritz FROGGS: but when does it start evaluating? 14:29
compiling current NQP segfaults on my VM 14:30
the stage that creates src/stage2/QAST.pbc
FROGGS I see two options here :o)
moritz (and no, there isn't any cruft in $PATH; there was never another rakudo build on this machine)
FROGGS This is nqp version 2013.07-25-g1541771 built on parrot 5.5.0 revision RELEASE_5_5_0 # this one built fine here 14:31
14:36 dmol left 14:37 Psyche^ joined
moritz tries with nqp master 14:37
14:38 Psyche^_ left
FROGGS okay, I found the right place to play with threads... 14:42
moritz FROGGS: it would be nice to evaluate 'hyper' or hyper ops or feeds in parallel, but I don't think there is anything to gain with lazy lists 14:43
FROGGS why not? what if you only use a fraction of the to-be-computet values of a list? 14:44
and, if at the point of creating such a lazy+multi-threaded thing, there maybe still run other parallel tasks from previous actions 14:45
moritz then people will be very suprised that the side effects from creating the list items happen even for stuff that they never use
FROGGS so, there could be a usecase IMO, but of course I'll try the other way first 14:46
what side effects?
moritz stuff that happens in the loop body, for example
FROGGS well, it will not happen for values which are never used, when you have a lazy list 14:47
moritz like a die() or a say()
so you only want to start processing when you know the values will be used?
FROGGS it would be nice to support both ways somehow
moritz well, hyper() is meant to support the other way 14:48
FROGGS what? immediate processing begin or delayed? 14:49
moritz anyway, it's a rather hairy subject to parallelize lazy evaluation, which is why I'd rather go for the stuff that's specced to be (potentially) parallel
and junction evaluation, come to think of it
FROGGS: it executes as soon as you call the hyper() 14:50
which might on the same line as the definition of the list, or might not be.
14:53 dmol joined
FROGGS moritz: I'm just experimenting a bit, if I have something to show I will start reading the spec :o) 14:55
moritz FROGGS++
14:57 konundra left
masak doesn't understand what the commenter wants at perl6advent.wordpress.com/2012/12/...-me-on-it/ 15:02
jercos masak: view the source wordpress spits out. The heredoc was indented, and because of that, each line was preceeded by a tab character. 15:03
15:04 ssutch left
masak jercos: ah. thanks. 15:05
jercos pastebin.com/cxGXLSEk reconstructed.
:)
timotimo r: gist.github.com/timo/6132249 15:06
camelia rakudo bb86d1: OUTPUT«Array.new("Superhero", "Identity", "Secret Superpower")␤Array.new(("The Bowler", "Carol Pinnsler", "Haunted bowling ball").list.item, ("The Bowler", "Carol Pinnsler", "Haunted bowling ball").list.item, ("The Bowler", "Carol Pinnsler", "Haunted bowling ball").list.i…
timotimo a bit crufty still, but it seems to work and handle at least some wacky cases 15:07
masak well, yes, actually.
if I use tabs to indent everything, Rakudo doesn't remove the indent.
hm, let me see if I can reproduce this nicely from within Rakudo...
15:08 ssutch joined
masak r: eval "say q:to/E/;\n\tfoo\n\tbar\n\tE" 15:08
camelia rakudo bb86d1: OUTPUT« foo␤ bar␤␤»
masak submits rakudobug
probably a bug in .indent :/ 15:09
n: eval "say q:to/E/;\n\tfoo\n\tbar\n\tE"
camelia niecza v24-88-g1f87209: OUTPUT«foo␤bar␤␤» 15:10
timotimo oh, i recently touched that code and may have b0rked it :( 15:11
masak if so, then we're missing at least one test.
timotimo yes, it knows nothing about tabs 15:12
it will just look at nqp::chars of the match of <ws>
nqp: say(nqp::subst("\t", "\t", nqp::x(" ", 8))) 15:13
camelia nqp: OUTPUT«Error while compiling block : Error while compiling op call (source text: "nqp::subst(\"\\t\", \"\\t\", nqp::x(\" \", 8))"): Error while compiling op subst (source text: "nqp::subst(\"\\t\", \"\\t\", nqp::x(\" \", 8))"): No registered operation handler for 'subst'␤current in…
timotimo nqp: "\t \t" ~~ /(\t)/; say($/[0]); 15:14
camelia nqp: OUTPUT«Null PMC access in get_pmc_keyed_int()␤current instr.: '' pc 134 ((file unknown):146774728) (/tmp/71CUNNSoMg:1)␤»
timotimo nqp: "\t \t" ~~ /(\t)/; say($/0);
camelia nqp: OUTPUT«Confused at line 2, near "say($/0);"␤current instr.: 'panic' pc 14721 (src/stage2/gen/NQPHLL.pir:5232) (src/stage2/gen/NQPHLL.nqp:279)␤»
timotimo nqp: "\t \t" ~~ /(\t)/; say($0);
camelia nqp: OUTPUT«Confused at line 2, near "say($0);"␤current instr.: 'panic' pc 14721 (src/stage2/gen/NQPHLL.pir:5232) (src/stage2/gen/NQPHLL.nqp:279)␤»
timotimo hm.
what's the sanest way to count occurences of a char in a string in nqp? 15:15
nqp: for ^5 { say "a" } 15:16
camelia nqp: OUTPUT«Confused at line 2, near "for ^5 { s"␤current instr.: 'panic' pc 14721 (src/stage2/gen/NQPHLL.pir:5232) (src/stage2/gen/NQPHLL.nqp:279)␤»
timotimo nqp: for 1..5 { say "a" }
camelia nqp: OUTPUT«Missing block at line 2, near "..5 { say "␤current instr.: 'panic' pc 14721 (src/stage2/gen/NQPHLL.pir:5232) (src/stage2/gen/NQPHLL.nqp:279)␤»
timotimo right.
rakudo: say $?TABSTOP; 15:17
camelia rakudo bb86d1: OUTPUT«8␤»
timotimo i'll have to look up that name in $*W, don't i? 15:18
15:18 gtodd joined
masak think so. 15:19
15:19 birdwindupbird left 15:30 jaldhar left, xinming left 15:32 xinming joined 15:33 jaldhar joined
masak "We have an employee whose last name is Null." stackoverflow.com/questions/4456438...n-web?rq=1 15:34
FROGGS CDATA would work, no? 15:35
but it is funny anyway :o)
gtodd wow
masak there are so many ways to fail it.
still, you should be allowed to have "Null" as a last name. 15:36
gtodd Maybe change it to Nüll :)
15:38 sqirrel left
timotimo my patch seems to be working fine. 15:39
FROGGS timotimo++ 15:42
15:44 isBEKaml joined
frettled masak: brilliant :D 15:45
masak gtodd: excellent süggestion! :) 15:46
frettled I think he had a nice solution, given his constraints: «to resolve this I created a structure and passed the parms as part of that object»
It's similar to what I do with P5 when parameters spread forth and multiply; I go from list to hash. 15:47
masak frettled: the problem feels like a kind of semipredicate problem to me. 15:48
isBEKaml Nüll? Is that guy anywhere near scandinavian? :) 15:49
frettled masak: there's an answer by Reboog711 further down that seems to explain why this is a problem.
arnsholt Yeah, it's an easy problem to hit if your protocol is text-based
gtodd Nułł
15:52 kaleem left
masak gtodd: Ñull 15:53
timotimo nqp: say(nqp::substr("foo bar", 1)) 15:54
camelia nqp: OUTPUT«oo bar␤»
masak frettled: found it. nice.
timotimo that would explain why that didn't work out properly, heh.
isBEKaml Funny, both Reboog711 and the op (bill) went AWOL after fiddling with it. Sick due to handling this issue, perhaps? :D 15:55
15:57 cognominal left
mathw I'm in awe of the wrongness in the encoding method 15:57
I think if I ran into that problem in my code I'd cry
dalek ast: 978e4a8 | (Timo Paulssen)++ | S02-literals/heredocs.t:
add tab tests for heredocs
16:00
timotimo pull request'd at number 189 16:01
the only failure mode i can think of now is when somebody sets $?TABSTOP to a ridiculous value, like -1 or 0 16:02
16:03 xilo joined 16:07 cognominal joined 16:08 mj41 left, isBEKaml left
masak timotimo: DIHWIDT 16:10
timotimo not quite sure what should be done at that point; it doesn't really make sense to me to allow a user to assign those weird kinds of values
i don't know how to interpret that, masak :| (i do know what it expands to, though) 16:11
oh wait
yes, i do know how to interpret that
masak timotimo: I mean, if someone does that, they had it coming.
timotimo: we could be user-friendly about their stupidity, but that feels like a future concern.
[Coke] r: $?TABSTOP = Inf; 16:13
camelia rakudo bb86d1: ( no output )
[Coke] r: $?TABSTOP = NaN;
camelia rakudo bb86d1: ( no output )
[Coke] r: $?TABSTOP = Int;
camelia rakudo bb86d1: ( no output )
16:14 btyler left
moritz somehow gists complain about a JS error in firefox 16:15
s/gists/pull requests/ 16:16
masak "For every benefit, there's usually a drawback." -- i.imgur.com/4JhVbiV.png -- sounds isomorphic to masak's law. :) 16:24
16:24 btyler joined 16:26 bluescreen10 joined
gtodd masak: I guess if people change their names to accomodate xml it's sort of like the way people's names get changed when they immigrate ... 16:29
16:30 rindolf left
[Coke] gtodd: that's how I got my last name, aye. 16:30
arnsholt "Welcome to the Democratic Republic of XML. Here's your new XML-compliant name." ^_^
daxim arnsholt =~ /$XML::RegExp::NCName/ 16:32
moritz so, what was the drawback of Hermione using the time turner? 16:34
timotimo she got older too quickly? 16:35
moritz that's not apparent from reading this blurb 16:37
timotimo didn't read the page at all
moritz has a working rakudo on irclog.perlgeek.de o/ 16:40
FROGGS cool!
moritz seems that 2GB RAM on an otherwise pretty minimal system are enough
panda is next. 16:42
... and now NativeCall bombs :( 16:46
[Coke] is that the zavolaj bug? 16:47
github.com/jnthn/zavolaj/issues/28 ?
moritz aye
masak moritz: nono, the "drawback" was for JKR because she introduced a device into her universe which was too powerful and would disturb further plots too much. so she essentially killed off the device by smashing all time-turners in existence. 16:48
(similarly, a WAT is something a user suffers from, but as language designers we're primarily interested in the language deisgner's suffering)
perhaps most importantly, WATs tend to hinder feature composability. 16:49
lizmat or other godlike suffering
arnsholt moritz: You can force the install and most functionality will work. But the broken stuff remains broken, of course 16:50
masak yes, godlike suffering is the common denominator between fiction devices and PL design.
16:50 raiph joined
daxim that reminds me to catch up with hpmor 16:51
arnsholt Speaking of time-turners, I'm in principle opposed to any plot involving time travel
It's just too easy to mess up
moritz arnsholt: me too, but IMHO it's still real fun in HPMoR
masak arnsholt: do you say that as someone having read HPMoR or not?
arnsholt Haven't read HPMoR =)
daxim how did you like The City on the Edge of Forever?
16:51 benabik left
masak arnsholt: because IMO EY does a *really* good job of it. 16:51
arnsholt Cool
16:52 Mouq joined
arnsholt Least messed up example I can think of right now is Babylon 5, and even that wasn't a highlight of the series 16:52
masak arnsholt: this is the kind of author that asks (around chapter 7 or 8) what if I can use time-turners as a Turing oracle and *tests it*.
moritz (and the time travel in HPMoR has clear limits, and the serious opponents understand them)
16:52 benabik joined
dalek o: 027fa5a | moritz++ | bin/ufo:
fix infinite recursion in dirwalk

also remove two redundant tests
16:53
masak moritz++ 16:54
timotimo thanks!
arnsholt daxim: Haven't read that one either =) 16:57
daxim it's an award winning star trek episode, find yourself a copy
16:59 vk_ joined
arnsholt Aha. I'll try to do that 17:03
17:03 dakkar left
jercos moritz: DO NOT MESS WITH TIME TRAVEL :p 17:04
17:06 spider-mario joined
dalek volaj/fix-rw-issues: c213a99 | moritz++ | lib/NativeCall.pm6:
do not use autogenerated accessors of type CStr

they cause all sorts of weird issues. Now the error message changes :-)
17:11
17:12 kaleem joined 17:13 btyler left
colomon didn't Harlan Ellison write that one? 17:16
(City on the Edge of Forever, that is)
17:17 kaleem left
masak hm. in Python, class definitions do not have BEGIN semantics. 17:18
moritz in this branch in zavolaj, I now get
Cannot call 'AUTOGEN'; none of these signatures match:
:(CStr : Str:D $encoding, Mu *%_) in method AUTOGEN at src/gen/CORE.setting:510
which seems to be about auto-generating a proto 17:19
arnsholt moritz: That's the new error message? 17:20
I've been meaning to bisect this, find out which commit is the culprit 17:23
It just takes so long, and I'm a bit tuit starved
huf today i once again realized how incredibly awesome map and hashes are in perls :) 17:24
daxim you're easily amused
huf i'm writing js at the moment, so yes.
masak JavaScript has both map and hashes. 17:25
moritz our proto method AUTOGEN(::T $: |) { * }
why does that use a type capture?
17:26 leont left
huf masak: but you cant do the equivalent of my %hoh = map { $_->{foo} => $_ } @aoh; 17:26
lizmat to be able to generate the right proto ?
Mouq Are hashes actually distinct from objects?
huf that is, you need some other special kind of map for this, one generic map wont do 17:27
moritz lizmat: but where is that type capture used?
masak huf: ah -- so you like the fact that arrays and hashes are plastically assignable to each other in Perl? :)
huf masak: _definitely_
i miss it every day in nonperls :)
lizmat moritz: no idea, out of my league there 17:28
masak huf: I kinda like that too. 17:29
huf: granted, if you miss it in JS, you can probably create your own custom map that will do that for you.
moritz or just a separate list-to-hash sub or method
huf aye, if we agree on a what a pair is, sure 17:30
and i can hide the loop
Mouq Yeah, trying to do it in console now. Not fun. Perl please 17:33
masak huf: an [x, y] array could easily emulate a pair.
and yes, the implementation of your alternative map would hide the loop, just as the normal map does. 17:34
dalek rl6-roast-data: 9e49943 | coke++ | / (5 files):
today (automated commit)
[Coke] # of rakudo.parrot failures monotonically increasing. :| 17:35
daxim shortest I could come up with: var fnord = {}; [ { foo: 23}, { foo: 42 } ].map(function(h) { fnord[h.foo] = h })
types and mutating vars poo 17:36
huf no i like the one with an extra function called pairlist_to_object()
but i like it even better without! :)
masak huf: Array.prototype.hashmap = function (fn) { var o = {}; for (var e in this) { if (!this.hasOwnProperty(e)) { continue }; var pair = fn(this[e]); o[pair[0]] = pair[1]; }; return o } 17:39
huf: [1, 2, 3].hashmap(function(e) { return [ "A" + e, e ] })
(returns {A1: 1, A2: 2, A3: 3} )
huf yes, i know that works, but my original grief was the proliferation of slightly different maps :) 17:40
oh well, js is what it is, at least it's fixable in a fairly painless manner
masak Mouq: no, hashes are not distinct from objects. that is, instances of the Object type in JS are all hashes. 17:41
(but they are hashes with a prototype pointer, which makes quite a big difference for hash lookup)
lizmat Red2&
masak huf: sometimes it amazes me how fixable JavaScript is.
huf :)
masak I think that's part of its success. 17:42
huf there's very little of it at heart, so yeah
GlitchMr Objects as dictionaries are broken IMO in JS
huf some of what's there is seemingly idiotic but the community's found ways around that :)
masak I wonder if JavaScript isn't the metacirculariest of the mainstream languages, after all.
GlitchMr To begin with, you cannot have __proto__ property in object used as dictionary.
masak GlitchMr: that seems like a rather minor problem. 17:43
GlitchMr (but that's issue with non-IE JS implementations)
masak GlitchMr: that's like pointing to where the optical nerve meets the retina, and exclaiming "look! broken!" 17:44
and yet the eye sees.
GlitchMr Without strange issues
--
[19:44:06.078] ({__proto__: [1, 2, 3]}).length
[19:44:06.081] 3
huf it _is_ broken though!
masak yes, of course it is.
huf the fact that evolution forced a workaround that's fairly good is just our luck :)
GlitchMr Workaround - define a hash object, with .set and .get methods.
masak there are hundreds of eye designs out there. I don't know how many of them suffer from the optical nerve bug.
GlitchMr When using these, they would prepend a character such as ~, to avoid any problems. 17:45
huf octopus eyes are done the right way around iirc
and yet, we hunt them :)
(unless it's silly movie week)
masak my point exactly.
GlitchMr And if you set __proto__ property of object to something that isn't object, nothing happens. 17:46
masak for the purpose of the discussion, let's assume it's not silly movie week.
GlitchMr And by nothing, I mean that you don't get an exception, and property isn't assigned.
masak GlitchMr: I'm not sure why you're upset at all this. it's a meta-thing, and you're kicking at it as if it were a thing.
GlitchMr: it's also not news that JavaScript doesn't have a perfect design. 17:47
GlitchMr It's an issue when you use keys from user.
I'm not aware of any other language having such issues with dictionaries. 17:49
dalek kudo-star-daily: d6fc913 | coke++ | / (2 files):
log versions used in building this star candidate
GlitchMr Also, `in` operator in JavaScript is useless because it also notices keys like... `constructor`.
Oh, and __proto__ is magical, even with Object.create(null).
masak still don't quite see your beef here. 17:50
maybe I'm just too used to JavaScript at this point ;)
huf GlitchMr: you know php demonstrates every problem like this...
GlitchMr Actually, it seems that in Firefox, Object.create(null) doesn't have magical __proto__, but in V8, it does... 17:51
masak if your need is so strong to store a '__proto__' property, then may I ask what your problem domain is? implementing JavaScript in JavaScript?
GlitchMr Security, perhaps?
huf unsanitized userinput in hashes? what could possibly go wrong :) 17:52
masak what huf said. 17:53
if user input is your concern, then you've got bigger problems to worry about. 17:54
huf on the other hand, this is often done. as we saw with the slew of hashing related bugs found in various scriptlangs
GlitchMr huf: github.com/joyent/node/issues/1707 17:57
this could go wrong
HTTP server in Node.js could be once crashed by /foo?hasOwnProperty=x 17:58
huf :) 17:59
18:00 daxim left
GlitchMr Programming language should be safe by default 18:01
Mouq Off topic; what does :fiddly mean? All I see is github.com/perl6/std/blob/master/STD.pm6#L3333 18:02
GlitchMr It means it cannot be used with reduce if I remember correctly
Mouq Huh. Okay thx 18:03
GlitchMr [,] just wouldn't make much sense 18:04
Mouq r: [,] 1,2,3 18:05
camelia rakudo bb86d1: ( no output )
GlitchMr std: [,] 1, 2, 3
camelia std c2215f0: OUTPUT«ok 00:00 43m␤»
Mouq oh, duh
r: say [,] 1,2,3 18:06
camelia rakudo bb86d1: OUTPUT«1 2 3␤»
GlitchMr std: 1 X, 2
camelia std c2215f0: OUTPUT«ok 00:00 42m␤»
GlitchMr Perhaps I confused it with something else
olive.undo.it/log?channel=perl6&...rch=fiddly
Interesting.
18:07 cognominal left
GlitchMr rn: my $x; 5 R:= $x; say $x 18:07
18:07 cognominal joined
camelia rakudo bb86d1: OUTPUT«Nominal type check failed for parameter 'op'; expected Any but got Mu instead␤ in sub METAOP_REVERSE at src/gen/CORE.setting:15112␤ in block at /tmp/ZMWM_C9Rzp:1␤␤» 18:07
..niecza v24-88-g1f87209: OUTPUT«===SORRY!===␤␤Cannot reverse the args of := because list assignment operators are too fiddly at /tmp/R7iuezE3NV line 1:␤------> my $x; 5 R:=⏏ $x; say $x␤␤This macro cannot be used as a function at /tmp/R7iuezE3NV line 1…
Mouq r: [??] 1, 2, [!!] 4, 5, 6 # heh 18:10
camelia rakudo bb86d1: OUTPUT«===SORRY!===␤Bogus statement␤at /tmp/bWp7rDzpof:1␤------> [??⏏] 1, 2, [!!] 4, 5, 6 # heh␤ expecting any of:␤ statement list␤ prefix or term␤ prefix or meta-prefix␤ infix stopper␤ infix or m…
Mouq I suppose that wouldn't work anyway 18:11
masak nope.
Mouq :p 18:12
masak n: [==>] 1, 2, 3
camelia niecza v24-88-g1f87209: OUTPUT«===SORRY!===␤␤Cannot reduce with ==> because sequencer operators are too fiddly at /tmp/1jZ0VIXEFK line 1:␤------> [==>]⏏ 1, 2, 3␤␤Unhandled exception: Check failed␤␤ at /home/p6eval/niecza/boot/lib/CORE.setting line 1…
masak I don't really see why comma gets a :fiddly in STD, though.
Mouq It doesn't even look like :pure is used 18:14
GlitchMr :pure is optimization
Not used by STD
It means "no side effects".
Mouq Ah, and here I was thinking it was to see if they got to go to op heaven 18:15
GlitchMr By the way, "is pure" exists in Rakudo 18:16
It means the function is allowed to be done compile time.
r: sub magic is pure { say "Hello, world!" }; if False { my $magic = magic } 18:17
camelia rakudo bb86d1: OUTPUT«Hello, world!␤»
masak Mouq++ # "op heaven" :)
GlitchMr (well, this is "is pure" abuse, but still)
18:17 SamuraiJack_ joined
masak GlitchMr: your examples are very confusing when they do the exact opposite of the thing you're showing. 18:17
GlitchMr I mean, "magic" looks like a sheep, but is actually evil function with side effects.
Mouq That's awesome
masak r: my $global = 0; sub magic is pure { $global = 42 }; if False { magic }; say $global 18:18
camelia rakudo bb86d1: OUTPUT«0␤»
masak huh :)
GlitchMr I lied the function doesn't have side-effects to show "pure" can be optimized during compilation.
r: my $global = 0; sub magic is pure { $global = 42 }; if False { my $magic = magic }; say $global
camelia rakudo bb86d1: OUTPUT«0␤»
GlitchMr huh? 18:19
Actually, that makes sense
r: my $global; sub magic is pure { $global = 42 }; if False { my $magic = magic }; say $global
camelia rakudo bb86d1: OUTPUT«42␤»
GlitchMr $global = 0 is ran after $global = 42
masak oh!
yes.
GlitchMr++
Mouq GlitchMr++
GlitchMr Still, "is pure" shouldn't be used for functions with side-effects. 18:20
masak I wouldn't have been upset with the optimizer if it just winked the 'if False' block out of existence, though.
moritz right, by saying "is pure" when it's not pure you're lying to the compiler
masak right.
so 'magic' should've been called 'DIHWIDT' ;)
GlitchMr I guess I did something as evil as outputing text in object destructor. 18:22
18:23 rindolf joined 18:24 colomon left 18:29 grondilu joined 18:30 colomon joined
grondilu what's this 'will' trait and where is it documented? (it's not an easy word to grep in the doc) 18:30
timotimo perlcabal.org/syn/S14.html#Traits - i think 18:32
actually perlcabal.org/syn/S06.html#Subroutine_traits
perlcabal.org/syn/index_C.html <- found it here
masak 'is pure' feels kinda like the opposite of 'is thunky' :) 18:35
18:36 zby_home joined 18:37 pnu left 18:38 pnu joined
GlitchMr r: sub destruction is destructive { 2 + 2 } say destruction 18:42
camelia rakudo bb86d1: OUTPUT«===SORRY!===␤Can't use unknown trait 'is destructive' in a sub declaration.␤at /tmp/ZoPo9nS68X:1␤------> ␤ expecting any of:␤ rw parcel hidden_from_backtrace␤ pure default DEPRECATE inlinable␤ prec equiv tighter looser asso…
GlitchMr r: sub destruction is DEPRECATE is hidden_from_backtrace { 2 + 2 } say destruction
camelia rakudo bb86d1: OUTPUT«===SORRY!===␤Can't use unknown trait 'is DEPRECATE' in a sub declaration.␤at /tmp/5CCjaqyR_f:1␤------> ␤ expecting any of:␤ rw parcel hidden_from_backtrace␤ pure default DEPRECATE inlinable␤ prec equiv tighter looser assoc␤…
GlitchMr r: sub destruction is hidden_from_backtrace { 2 + 2 } say destruction
camelia rakudo bb86d1: OUTPUT«===SORRY!===␤Two terms in a row␤at /tmp/CAttloC_zd:1␤------> tion is hidden_from_backtrace { 2 + 2 } ⏏say destruction␤ expecting any of:␤ postfix␤ statement end␤ statement modifier␤ statement modif…
GlitchMr r: sub destruction is hidden_from_backtrace { 2 + 2 }; say destruction
camelia rakudo bb86d1: OUTPUT«4␤»
GlitchMr r: sub destruction is hidden_from_backtrace { 2 + 2; die "no" }; say destruction 18:43
camelia rakudo bb86d1: OUTPUT«no␤ in block at /tmp/EvMQLDgK8B:1␤␤»
GlitchMr r: sub destruction{ 2 + 2; die "no" }; say destruction
camelia rakudo bb86d1: OUTPUT«no␤ in sub destruction at /tmp/riatEaYh_b:1␤ in block at /tmp/riatEaYh_b:1␤␤»
18:44 fgomez joined 18:50 konundra joined 18:51 btyler joined
dalek kudo-star-daily: 28e7785 | coke++ | log/ (5 files):
today (automated commit)
19:00
[Coke] whoever asked for the specific shas being used, see: 19:01
19:01 Mouq left
[Coke] github.com/coke/rakudo-star-daily/...ersion.log 19:01
19:02 Mouq joined
masak today's autopun spotting: twitter.com/bethcodes/status/36270...88/photo/1 19:03
Mouq lol 19:04
PerlJam masak: nice. 19:06
19:06 huf left
FROGGS hehe 19:08
19:10 rindolf left 19:15 SamuraiJack_ left 19:25 lue joined
lue hello! o/ 19:25
FROGGS hi lue 19:26
timotimo still fondly remembers the time where he thought it was called "the mythical man-moth" 19:31
Mouq I'm not sure how useful I'll be, but if I'm a free hand, where should I apply myself (in #perl6's opinion)? 19:32
masak lue! \o/
Mouq: any non-negative contribution is useful, if you ask me. 19:33
moritz Mouq: a good start would be to write code that you use regularly
Mouq: and if you discover that you need a module for that task which doesn't exist yet, write it
masak Mouq: solve problems that interest you. learn things that interest you. find bugs along the way. publish modules. 19:34
diakopter masak: how is "non-negative" different from "useful"
masak Mouq: complain loudly when you fall down a hole due to missing documentation or bad error messages :)
moritz diakopter: funny stuff is non-negative, but usually not useful
masak contradicting my statement ;)
diakopter .. but masak.. yeah 19:35
masak I guess some negative things can be useful, too.
Mouq Okay, will do :) Thanks
diakopter Mouq: what kinds of things do you like to program
Mouq I don't really have a focused direction that I'm aware of. Currently using perl to simulate some things 19:37
19:37 kaare_ left 19:40 zby_home left 19:45 jaldhar left
masak Mouq: we find the biggest determinant to positive contribution is if the contributor is happy. so do something you enjoy. :) 19:54
I can almost guarantee we'll benefit from it, too.
19:55 crab2313 left
diakopter masak: so.. what are his choices? :) 19:55
masak well, there are several places to start. 19:56
Mouq Right now I'm looking into implementing Math::Vector::kdTree (I'm quite fond of SALVA's Math::Vector::Real modules)
masak ooh
Mouq Oop, go ahead :p
masak small scripts. reading the spec. looking at RT tickets and trying to reproduce them. just talking about OO or something else on channel. 19:57
turning a joke on-channel into code.
(I've found dozens of rakudobugs that way!)
Mouq diakopter: I saw your grant proposal on TPF. I wish you the best of luck!
masak reading other people's module code, thinking of ways to either use that code, or improve it. 19:58
diakopter cool; thanks. I hope there's no impediment to acceptance and completion
masak reading the list of modules, thinking about what's missing.
diakopter .. what's missing from what?
what list of modules?
FROGGS diakopter: our ecosystem 19:59
diakopter .. we has an ecosystem? 20:00
lue diakopter: github.com/perl6/ecosystem
FROGGS diakopter: sort of :o) 20:01
diakopter it was my impression that only a handful of the modules on modules.perl6.org still worked 20:02
FROGGS that might be true 20:03
diakopter [maybe I had a very wrong impression]
FROGGS no, I think you are right
20:04 raiph left
diakopter Mouq: do you use the XS version of Math::Vector::Real? 20:06
Mouq yup
diakopter do you have an idea of how much slower the pure-perl one is? [I have no idea] 20:07
[I also have no idea whether it matters]
Mouq ...nope
[Coke] we had a thing that would run once a day to report on whether or not it was passing tests, but it ... broke, I think. 20:09
s/it was /all of them were /
pmurias diakopter: one question about the moarvm-perl5-interop-grant wouldn't it be better to first do the interop on the jvm and then port it to moarvm? 20:11
[Coke] aside: it's not like the jvm port is that far ahead of the moarvm port.
pmurias how much of the spectest does moarvm run? 20:12
[Coke] I mean, sure, it's passing nearly 100% of the tests, but ... hurm, perhaps it really is that much further ahead. never mind. :)
as I understand it, though, moarvm is where the jvm port was about 2 weeks before it started passing spectests. 20:13
masak last I heard, moarvm passes "most of the nqp tests". 20:15
FROGGS it failes just a handfull nqp and hll test files AFAIK 20:16
20:17 sidus left
pmurias masak: bootstrapped? 20:17
FROGGS pmurias: I'd say for p5interop it helps that you can design the needed primitives in C land
pmurias: that is the next big goal 20:18
masak pmurias: I don't know. maybe ask on #moarvm?
pmurias: or just wait till jnthn comes back ;)
benabik It's not bootstrapped yet, although IIRC jnthn at least stubbed in the required bits before he left.
FROGGS true
we are really just a few weeks away from that... (by 'we' I mean jnthn++ :o) 20:19
masak .oO( we all mean 'jnthn' by 'we'... ) :P 20:20
FROGGS *g* 20:21
I hope he enjoys the Alps 20:22
masak he deserves Alps... 20:24
grondilu what are the prospects about MoarVM as far as speed is concerned? How will it likely compare to parrot and JVM?
20:24 BenGoldberg joined
benabik There are definite advantages to having a VM designed for your purposes instead of having to deal with layers of interop. 20:25
FROGGS grondilu: we all hope that it will be awesome fast, but I think it is too early to tell 20:26
20:26 leont joined
BenGoldberg In spite of having just joined today and not having looked at the irclog, my psychic powers are telling me that we're discussing moarvm? 20:27
:)
pmurias yes
masak it's too early to tell.
FROGGS I mean, I've seen a microbenchmark diakopter++ did where you can see that it is more than four times faster than nqp@parrot, but I'd wait for rakudo@moarvm benchmarks
PerlJam grondilu: my completely uninformed guess is that it will be mostly faster than parrot all around and initially slower than jvm for execution but faster than jvm on startup.
benabik I would bet notably faster than Parrot... JVM it's harder to tell.
masak JVM is crazy optimized.
not just Java, but the bytecode.
diakopter FROGGS: well, to be precise, that microbenchmark (fib.) wasn't nqp-on-moarvm; it was handwritten moarvm bytecode essentially 20:28
benabik But NQP/Rakudo also have to deal with extra layers for nearly everything AFAICT.
masak the JIT has man-decades of effort poured into it.
diakopter (analogous to pir)
so, it was comparing the frontier of what you could expect an optimizer able to optimize to
FROGGS diakopter: that makes it a single microbenchmark :o) 20:29
diakopter (without any native machine code generation)
obviously with machine code it could potentially outperform luajit^Wpotion
FROGGS I know one killer feature MoarVM has and JVM has not... any guesses?
diakopter hrm. 20:30
C vs C++?
PerlJam FROGGS: an awesome dev team? ;)
FROGGS no
hehe
no
masak ponies?
FROGGS no
masak actually killers?
actual*
FROGGS almost
PerlJam FROGGS: smaller footprint?
BenGoldberg Why are there no ponies? :)
FROGGS no
chdir()
how do we handle the lack of it @JVM? 20:31
diakopter we talked about how to emulate it the other day
it's not too hard, as long as you control every entry from bytecode to native libraries 20:32
grondilu FROGGS: a meta model (sounds too easy)
?
BenGoldberg JVM also doesn't have getpid(), iirc
[Coke] there are java tools that can tell you that information, so it's doable, I think. 20:33
FROGGS BenGoldberg: but I'd guess that chdir is used moar often
BenGoldberg You can fake it in a platform dependent way, on some platforms
pmurias wouldn't it be possible to implement this things by calling native code?
[Coke] there's always JNI. *shudder*
pmurias s/this/those/
grondilu finally notices the answr was chdir
FROGGS [Coke]: I've heard about unreliable tricks... but something sane would be cool when we start caring about the modules
diakopter thing is, if you're gonna load native code anyway, you're gonna want to use sun.misc.Unsafe all over the place for speed 20:34
since you can get order of magnitude improvements in many cases 20:38
*orders
FROGGS and since we already do type checks and everything... 20:39
diakopter yeah
pmurias FROGGS: re unreliable tricks you mean JNI?
FROGGS pmurias: no, it was something else but I dont remember anymore... I think it was something about a userdir or homedir, but I'm not a Java dev so it is likely that I am wrong 20:40
20:42 konundra left
diakopter FROGGS: did you guys make progress on that void return bug? 20:42
FROGGS diakopter: no 20:43
Mouq What's the standard way to run tests (i.e. in a t/ dir) with perl6? :p
FROGGS we still just know that $*WANT is unset when it should not
spider-mario Mouq : ufo is handy 20:44
it generates a makefile that has a test target
pmurias once we have the p5 interop how will one specify if we want real of FROGGS perl5 for 'use v5'?
diakopter pmurias: it won't use v5
you won't use 'use v5' I mean 20:45
besides, we won't have inline p5 for a long time anyway
FROGGS well yes and no
diakopter (that works with the embedded thing anyway, I mean)
pmurias diakopter: why is inline p5 hard? 20:46
FROGGS pmurias: at the end, you would have "my" grammar, combined with dispatches to the perl 5 interpreter, so there are no two things finally
Mouq spider-mario: Okay, thank you. I was thinking more along the lines of p5's `prove`
spider-mario it can be used
but you have to tell it to use perl6 (or rely on the shebang)
diakopter well, to do it with the embedding thing, we'll need to set up phantom scalarish things to emulate all outer lexicals and namespaces that are visible to the p5 code
PerlJam Mouq: prove -e perl6 # should do it. 20:47
pmurias FROGGS: I didn't understand that
Mouq PerlJam: Oh! 'k thx 20:48
FROGGS pmurias: you need to parse the inlined code and do actions while you do that, like registering variables... and after that stage, the code snipped would be executed by libperl5 (or what it might be called)
PerlJam Mouq: you might need to set PERL6LIB to contain your module's lib dir too
diakopter pmurias: he meant that 'use v5' will eventually use froggs' grammar to pre-parse as much as possible (including begin-time stuff perhaps), then call into the p5interop for the mainline
pmurias: did you see what I meant about outer lexicals and namespaces? 20:49
pmurias diakopter: yes
diakopter they'd need to be thigs that, upon STORE and FETCH, actually fetched from the proper outer lexical slots
pmurias diakopter: I had that problem when thinking about 'use v5' for mildew 20:50
FROGGS if you just load a Perl 5 module like: use JSON::XS:from<Perl5>, then there is much less trouble
diakopter pugs emulated this by wrapping with declared lexicals, then syncing upon return
but for concurrent code, that doesn't work.
pmurias diakopter: I didn't figure out a better solution then you are proposing
diakopter pmurias: nope, I don't think there is a better one
interestingly, if you set them up as tied variables in p5 that call into xsubs, they don't acdtually have to call into moarvm bytecode 20:51
er.. pugs used arguments.. duhhhh 20:54
er. arguments assigned to lexicals.
argh.
Mouq PerlJam: Yup, thanks 20:57
20:58 sidus joined
BenGoldberg For embedded perl5, what about, instead of setting up (lots and lots of) fake scalarish scalars so that the perl5 code will see the surrounding perl6 variables correctly do the following... in the perl5 compiler, each time a dynamic variable is first used, tie() it, so it will see the appropriate perl6 outer lexical variable or whatever. 21:03
pmurias BenGoldberg: you mean s/dynamic/lexical/ 21:04
masak 'night, #perl6
diakopter BenGoldberg: yes; the problem is you want to be able to use strict 21:05
FROGGS gnight masak
pmurias and there is no hook for missing lexical in the perl5 interpreter
or at least there wasn't one last time I checked
so unless we are using a custom patched version we can't do that 21:06
diakopter pmurias: well, actually, a p5p person said they'd be glad to add whatever hooks we needed
pmurias if we had such a hook then things should be easier 21:07
diakopter I'm not sure of that particular one, actually.
21:08 Mouq left
pmurias normally an exception is thrown when no lexical is found 21:08
so it shouldn't be a bottleneck place
besides there shouldn't be a lot of lexicals
diakopter well it's just you're gonna end up having to have the same sort of references to link names->slots
leont BenGoldberg: instead of ties, you may want to use proper magic 21:09
diakopter so those would have by-name lookups with each fetch and store
pmurias well yes
diakopter but with dedicated lexicals, you dont have by-name lookups at all
pmurias what do you mean by dedicated lexicals? 21:10
diakopter the scalars tied to p6 lexical slots in closures
pmurias if we had a lexical hook it could create those scalars when needed 21:11
diakopter but it still wouldn't be using the built-in portion of the p5 compiler that pre-resolves those
21:12 bruges_ joined
pmurias well those are optimalization matters 21:12
anything else blocking us as opposed to making things slow? 21:13
21:14 bruges left
diakopter I think the "fake" lexical-scalars would be much easier to implement than an unknown hook that overrode use strict vars 21:14
pmurias yes, emitting some ties seems easier than patching the perl5 interpreter and then making it insert ties at runtime ;) 21:15
diakopter also, would work for everyone and not just bleaders 21:16
pmurias diakopter: determining where the '{use v5;...}' block ends seems tricky but I have been able to do that with some XS 21:17
diakopter pmurias: that's what FROGG's grammar is for, hopefully. 21:18
hopefully it can run all the BEGIN-time stuff (also by sending those to libperl)
pmurias that seems really crazy
diakopter then replace any inner { use v6; ... } blocks with stubs to call them, then send it to libperl
pmurias why parse the perl5 code twice? 21:19
21:19 skids left
diakopter b/c you really need to remove any inner use v6 blocks 21:19
21:19 labster left
diakopter [to make it work as specified in S01] 21:20
pmurias hmm, we could always 'use v6-rakudo' ;)
diakopter yeah, but it'd only work in perl >= 5.12
er, 5.16
which added the parser hooking 21:21
pmurias use v6-rakudo as opposed to
use v6
works in older perls
diakopter but how would p5 parse the p6 code? 21:22
pmurias 'use v6-rakudo;' vs 'use v6;'
I don't remember the exact tricks but I made it work for 'use v6-mildew' 21:23
on 5.10 or something like that
metacpan.org/module/v6 21:24
diakopter interesting, ok 21:28
hopefully a source filter..
.oO( if we're at position X in the file ..... )
grondilu not programming to P6 or programming at all: how do you say "moving forward by doing successive small jumps on a single foot"? 21:34
s/not programming/not related to programming/
geekosaur hopping? 21:35
grondilu yes
lizmat grondilu: variable trait "will foo {…} is described at S04:1454
synopsebot Link: perlcabal.org/syn/S04.html#line_1454
pmurias diakopter: it might be possible to use Devel::Declare to support a bare 'use v6', but I need some sleep before I can deal with reading the horrible Devel::Declare documentation
diakopter I looked at that
grondilu geekosaur: thanks 21:36
diakopter but really, it should be possible to track the number of { descended *before* reaching the use v6; then inject continuations to the rest of the blocks and } at the end of the srapper, then excise the entire rest of the compilation unit, deferring all of it
... using a source filter
lizmat diakopter: please don't use a source filter, please 21:37
diakopter yep; FROGGS' grammar would be .. better. 21:38
lizmat please look up why source filters don't work in mod_perl
I wouldn't be surprised if MoarVM wouldn't have the same problem
diakopter lizmat: right, I wasn't serious 21:39
lizmat *phew*
diakopter well, I was serious it would work, but joking that it'd be a good idea
fsvo work. 21:41
pmurias diakopter: it's possible to make the perl 5 parse just return the info where it ended parsing the block, no need to do idiotic things like counting } 21:42
diakopter well, counting { I meant 21:43
21:43 spider-mario left 21:49 konundra joined 21:54 labster joined, lue left 21:58 raiph joined, labster left
lizmat r: for 1 { NEXT say "first"; NEXT say "second"} # is this expected behaviour ? 22:01
camelia rakudo bb86d1: OUTPUT«second␤first␤»
22:04 huf joined 22:05 Ben_Goldberg joined 22:07 lue joined 22:08 BenGoldberg left
dalek ast: 445c5a8 | (Elizabeth Mattijsen)++ | S04-declarations/will.t:
More variable trait "will" tests
22:08
lizmat I dropped the fudged "skip_rest" construct: it was confusing everything too much 22:09
and on that thought, gnighT #perl6!
22:10 pupoque_ left 22:11 pupoque_ joined 22:13 FROGGS left
timotimo i was thinking about replacing the type on METAOP_ASSIGN_TEST to Mu instead of Any, so that this works: 22:14
r: my Mu $foo; $foo //= 1;
camelia rakudo bb86d1: OUTPUT«Nominal type check failed for parameter 'lhs'; expected Any but got Mu instead␤ in sub METAOP_TEST_ASSIGN:<//> at src/gen/CORE.setting:15104␤ in block at /tmp/d2WCKcFLI6:1␤␤»
timotimo but if i allow Mu, i'll break stuff like this:
r: say ( 1 & 2 & 3 & Any & Mu ) //= 10
camelia rakudo bb86d1: OUTPUT«Cannot assign to a readonly variable or a value␤ in sub METAOP_TEST_ASSIGN:<//> at src/gen/CORE.setting:15104␤ in sub thread_junction at src/gen/CORE.setting:2769␤ in block at src/gen/CORE.setting:2790␤ in method AUTOTHREAD at src/gen/CORE.setting:2780␤ in su…
timotimo oh?
well, i'm not sure if i need to split it into a multi with Any and Mu:U rather than just one candidate with Mu 22:15
22:15 labster joined
lizmat TimToady: should "for 1..2 { my $a=once {$_}; say $a }" say "1 Mu", "1 1" or "1 Any" ? 22:16
sleep&
or even "1 Nil" 22:17
really sleep&
22:17 dmol left 22:21 vk_ left 22:30 PacoAir left, sidus left 22:38 raiph left 22:42 btyler left 22:43 skids joined 22:48 jaldhar joined 22:51 jaldhar left, jaldhar joined, lue left 22:55 japhb joined
japhb I'm baaaaaack .... 22:55
Sadly, apparently after everyone's gone to bed. :-/ 23:00
timotimo japhb: i'm not yet in bed ;) 23:01
japhb \o/
timotimo your benchmark program/system is pretty darn cool :)
japhb Thanks. :-)
timotimo i've made a few changes, but i'm not sure if i've pullrequested it yet
japhb Finally got the authorization from the right people to get back to coding on that.
Yes, please do.
timotimo one thing i didn't do yet is the trim_string benchmark; perl5 cheats on it and doesn't actually create the trimmed string 23:02
japhb oh?
It notices a void context?
timotimo not quite sure what exactly; it's just too darn fast and the performance grows too quickly i think
23:03 raiph joined
japhb o/ 23:03
timotimo, have you dumped the opcode tree generated by Perl 5 for that one? 23:04
timotimo no, i don't know anything about perl5 at all ;) 23:05
and right now i'm about to go to bed because i have a headache; also the computer that has my most recent benchmark changes isn't up ATM
irclog.perlgeek.de/perl6/search/?ni...;q=p6bench - here, have a few of my benchmark results :) 23:06
japhb ah
Will check
perl -MO=Terse foo.pl
That's the trick, IIRC
23:06 jaldhar left
timotimo i'm quite sad that i haven't been able to get either rakudo-jvm or rakudo-parrot to do the forest fire benchmark with a workload of more than 8 :| 23:07
23:08 bluescreen10 left
timotimo but since rakudo-jvm is still lacking the trial bind operation that's used to compile-time-dispatch calls, i'm sure we'll get there some day 23:09
no i'm off to bed :)
japhb sleep well
and thanks
23:09 jaldhar joined
timotimo i have to thank *you*! :) 23:09
japhb That's what pull requests are for. ;-)
diakopter japhb: howdy 23:10
japhb Hey there!
timotimo japhb: will you be online tomorrow? maybe a bit earlier than right now? 23:12
japhb I will try to, yes.
timotimo cool. i'll try to get a pull request formulated with good changes 23:14
japhb *Excellent*
timotimo the most prominent of the changes is probably adding the jvm port, for which there already is exactly one commit up on github:timo/perl6-bench - i'm not sure if it's correct yet. 23:15
<- off 23:16
japhb k
23:22 jaldhar left
japhb meeting & # but bbiab 23:22
23:23 benabik left 23:36 Mouq joined 23:37 jaldhar joined
Mouq I had to go on an errand, but from a quick throw-together script, at least half the modules (96) pass their tests. 23:38
I was not checking for dependencies or (as I should probably have been to begin with, but was too lazy) `make`ing and `make test`ing them 23:39
plus I was, as I said, on an errand and did not have connectivity the entire time, so the Internet-based modules failed 23:40
Anyway...
23:41 jaldhar left 23:42 jaldhar joined 23:46 pmurias left 23:58 leont left