»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend!
Set by sorear on 4 February 2011.
00:07 molaf_ joined 00:10 thou left 00:11 molaf left, Ingis left 00:18 whiteknight joined 00:19 whiteknight is now known as Guest10129 00:25 replore_ joined 00:26 Ingis joined 00:35 thou joined 00:36 fridim_ left, tyatpi_ joined
dalek odel: 358cadd | diakopter++ | lua/ (17 files):
oodles of fixes. many many more to come.
00:41
odel: 358cadd | diakopter++ | lua/ (17 files):
oodles of fixes. many many more to come.
00:43 _jaldhar joined 00:50 tyatpi_ left 00:54 gfldex left 01:04 tokuhiro_ left 01:20 cooper left 01:23 cooper joined
dalek odel: de55f49 | diakopter++ | lua/runtime/Metamodel/ (2 files):
fix some off-by-one error
01:24
odel: de55f49 | diakopter++ | lua/runtime/Metamodel/ (2 files):
fix some off-by-one error
01:26 alc joined 01:31 gfldex joined 01:33 Chillance left 01:37 molaf_ left, Guest10129 left 01:43 hypolin joined 01:46 woosley joined 01:58 eT-eB joined
eT-eB Hi, are perl 6 executables smaller than perl 5? 01:59
02:06 wolfman2000 joined
diakopter executables? 02:06
eT-eB diakopter: the kind of thing you get from perl2exe 02:12
dalek odel: c7d3c7d | diakopter++ | lua/ (5 files):
more fixes; Setting begins to compile.
odel: c7d3c7d | diakopter++ | lua/ (5 files):
more fixes; Setting begins to compile.
eT-eB In Perl 5 i could use perl2exe to make executables and share them with people who might not "get" cpan. In perl6 is there anything like perl2exe and if so how big are the files? 02:15
diakopter there's nothing like that 02:16
there are several implementations of Perl 6, too.
02:16 packetknife joined
eT-eB really, they abandoned standalones in perl6 ?? 02:17
diakopter that's not how I would put it. perl2exe is a commerical product; if someone wants to make a product to do that with one of the Perl 6 implementations, they could do that.
eT-eB besides perl2exe there was B 02:18
and C
C made C code out of perl
so there were FOSS options 02:19
i just used perl2exe to convey the idea of executable to you diakopter, because you asked "(10:05:12 PM) diakopter: executables?"
diakopter there is, of course, the PAR toolkit, which I would recommend over perl2exe
eT-eB PAR is in Perl6 too? 02:20
diakopter I wouldn't say "abandoned"; the Perl 6 community is hundreds of thousands of times smaller than the Perl 5 userbase; there is much less available resources to implement things.
02:20 daniel_ joined
diakopter no, there is no PAR for Perl 6 02:21
as I already said
"there's nothing like that"
eT-eB The problem i have with PAR is that even a simple "Hello, World" is a 4Mega standalone file. 02:22
02:23 packetknife left 02:24 danishman left
diakopter afk& 02:25
02:28 LoRe left 02:29 LoRe joined 02:30 am0c joined
[Coke] eT-eB: more like "haven't gotten around to it yet" rather than "oh, we'd never do that." 03:06
you can generate parrot bytecode with rakudo already and ship that. (I /think/ that works...)
03:08 daniel_ left
benabik [Coke]: Kind of. You'd have to ensure that Rakudo was installed because it needs to load the ops and library. 03:10
[Coke] yes, in general, you need to install rakudo. 03:11
eT-eB So it would not be stand alone, but it would be in a machine readable format. 03:14
03:15 envi_ joined
benabik eT-eB: Yes. 03:17
eT-eB Thanks benabik and [Coke]. I need to find another programming language for this task. 03:22
03:26 packetknife joined
djanatyn The day with the most birthdays was incidentally 10/30, with 6 birthdays occuring in one day. 226/365 days in the year have at least one or more birthdays according to my friends list on facebook. Interestingly enough, 146 people have unique birthdays. This means that for each day, there is a 61.9% chance that it is someone's birthday. If I bought everyone in my friend's list a $5 present, I would have to work at a minimum wage job ($7/25) at McD 03:28
now to mess with oop in perl6 to figure out which months had the highest concentrations of birthdays
who knew that you could have so much fun with the "export birthdays" button on facebook? :) 03:29
also what's up with github :( 03:30
ah, just went back up
benabik When I want to know what's up with github, I read their blog. It's informative. github.com/blog 03:31
PerlJam also ... there's bitbucket.org :) 03:32
benabik Bitbucket speaks git? I thought they were hg only. 03:33
PerlJam They used to be, but they realized the err of their ways ;)
djanatyn benabik: bitbucket changed everything about themselves to be more like github 03:34
they even *look* like github now
benabik djanatyn: Does look that way, yeah.
PerlJam indeed. It's a little scary
djanatyn they are probably the best place for hg hosting though 03:35
sorear good * #perl6 03:37
djanatyn I've started work (read: written about three lines) of a really simple script to keep track of schoolwork and tasks in perl6
sorear updates to the latest mono
djanatyn might be kinda fun, I did something similar with perl5
I'll work on it tommorow 03:38
I think the major advantage that bitbucket has over github right now is free private hosting 03:39
but that's not really major at all
benabik Free unlimited edu accounts is nice. :-d 03:40
*:-D
03:41 thou left 03:42 djanatyn is now known as djanatyn|afk, molaf joined 04:08 envi_ left
sorear :| seems new mono's profiler wants a kernel upgrade, brb 04:18
04:23 colomon left, colomon_ joined, colomon_ is now known as colomon 04:26 kaleem joined 04:27 am0c left
sorear survived 04:37
eT-eB: if you want to ship _small_ standalone executables, Perl (all versions past or future) is right out 04:40
eT-eB: you need to use a language with a very small runtime (some Forth or Lisp), or a language where the runtime ships with Windows (C, C++, VB) 04:41
does the CLR ship with Windows these days?
Ingis yup 04:43
3.5 at least 04:44
sorear if you're determined to use Perl, Niecza/CLR has a space overhead of 200k-700k bytes depending on whether you're willing to manually cull the setting
how big is Rakudo's compiled setting these days? pre-nom it was around 4 Mwords 04:45
welcome, Ingis 04:46
Ingis hey :)
eT-eB thank you for the information sorear, im going to check out Niecza/CLR. 04:52
05:01 shinobicl_ joined 05:09 replore_ left 05:10 shinobicl_ left 05:12 molaf left, mls left, jfried left, mls joined, LoRe left, LoRe joined 05:13 jfried joined 05:14 orafu left 05:18 orafu joined, replore joined 05:19 renormalist left, renormalist joined, bonsaikitten left 05:20 bonsaikitten joined 05:27 mkramer joined 05:40 lrnperl joined 05:47 alvis left 05:48 replore left 06:00 alvis joined
moritz good morning 06:02
sorear: 10MB
tadzik good morning moritz
moritz \o tadzik 06:03
std: /<A::b>/
p6eval std be1f10e: OUTPUT«ok 00:01 120m␤»
sorear o/ moritz 06:15
06:15 eT-eB left 06:19 dual joined 06:27 kst left 06:28 koban joined 06:30 wolfman2000 left, cognominal joined 06:33 cognominal___ left
felher Whats that repr-api mentioned in a few log messages? 06:38
moritz a low-level storage API 06:45
felher moritz: for storing perl6 objects? 06:47
moritz felher: yes 06:48
felher moritz: k, thnx :)
Woodi repr-api is used via parrot in Rakudo ?
06:50 kst joined
moritz it's currently defined at the NQP level 06:51
fsergot good morning. :-) 06:55
where can i find nqp and pir instructions? 06:56
moritz nqp: say(1); # that's an nqp instruction
p6eval nqp: OUTPUT«1␤»
moritz fsergot: what kind of introcutions are you looking for? 06:57
06:57 wtw joined
moritz *instruction 06:57
fsergot moritz, dont know. i want to be able to do some perl6 stuff, to help in developing. :-) 06:58
moritz fsergot: for PIR, see docs.parrot.org/parrot/latest/html/ scroll down to "PIR book" 06:59
fsergot: there's not much direct docs for NQP. It's a subset of Perl 6, so knowing Perl 6 helps. Apart from that, you need to look at example code
fsergot: but there are lots of things you can do for Perl 6 development that can be done in pure Perl 6 07:00
for example in Rakudo, the .perl method in Parameter needs lots of love 07:01
fsergot moritz, right, but pir and nqp can help. Well, thanks You very much moritz++
moritz and Str.trans needs to be ported from the old branch 07:02
07:02 lrnperl left
moritz and Str.indent 07:02
07:02 mkramer left
fsergot Are there any sites, where can i find some informations about "whats to do in p6"? Or i should just do what i thinks is good for perl6? :) 07:05
think*
07:06 im2ee joined, im2ee left 07:07 dual left
sorear mono statistical profiler thinks niecza spends 40% of its time in _IO_fflush 07:07
I wonder if it's counting the time spent writing the profile data
07:08 sayu joined 07:21 xinming joined 07:25 Shozan joined 07:26 Shozan left 07:34 am0c joined 07:52 daniel-s joined 07:57 sayu left 08:01 buubot_backup left 08:05 jonasbn joined 08:06 jonasbn left 08:10 wk_ joined
moritz fsergot: there's no general TODO page. Several projects have their own bug trackers, and people ask in here 08:11
fsergot: a good start is writing modules. modules.perl6.org/ gives an overview of what's there, and how to get started
08:15 ethndbst joined 08:18 wk_ left 08:20 buubot_backup joined
sorear sleep 08:21
fsergot Thanks moritz. :) 08:25
ethndbst Perl 6 looks nice. 08:26
08:26 simcop2387 left
moritz ethndbst: glad to hear that 08:27
moritz agrees :-)
fsergot agress too. :)
*agrees :D 08:28
08:28 simcop2387 joined
moritz fsergot, ethndbst: out of curiosity, how did you came across Perl 6? 08:28
ethndbst I came across Perl 6 when I was interested in Perl 5.
moritz so the Perl brand works :-) 08:29
ethndbst I guess... 08:30
I'll probably be dead when there is an official Perl 6 interpreter
moritz yes, because we're just working on compilers these days, no interpreters :-)
ethndbst Really?
Interesting. 08:31
So why was it decided to kill the interpreter?
moritz which one? :-) 08:32
ethndbst For Perl
moritz waitwaitwait
08:32 [particle] left
moritz there's still the 'perl' executable for Perl 5 08:32
ethndbst Yes
fsergot moritz, i'm reading evalbot's code, but i have a question. Your bot makes file with code to execute, and then run it?
moritz, You wrote evalbot right? :)
moritz that's a hybrid interpreter/compiler, and it's not killed. It just doesn't run Perl 6 08:33
fsergot: yes, I wrote it. Yes, it writes tempfiles and runs them
rakudo: say callframe().file
p6eval rakudo cb6374: OUTPUT«/tmp/SJIZHGAOTG␤»
moritz temp files like these :-) 08:34
08:34 daniel-s left
moritz and most approaches to implement Perl 6 simply took the compiler route 08:34
fsergot moritz, thanks. :)
moritz but for a language like Perl, the distinction is a bit artifical; it needs a fat runtime anyway, so you could argue it's a bit of an interperter anyway 08:35
08:35 bbkr1 left
moritz otoh it doesn't reparse the source code when you run a function twice, so it needs a compilation step too 08:35
fsergot nom: say callframe().file 08:42
p6eval nom cb6374: OUTPUT«/tmp/ZOS42SXWUl␤»
fsergot nom: say callframe()
p6eval nom cb6374: OUTPUT«CallFrame.new(level => Int, annotations => ("file" => "/tmp/0a94V4F7_L", "line" => 1).hash, my => EnumMap.new("\$=POD", Array.new(), "GLOBALish", GLOBAL, "EXPORT", EXPORT, "\$?PACKAGE", GLOBAL, "\$_", Any, "\$/", Any, "\$!", Any, ))␤» 08:43
snarkyboojum nom: say callframe().^methods 08:45
p6eval nom cb6374: OUTPUT«new line file callframe level annotations my eager elems end classify infinite flat hash list pick roll reverse sort values keys kv pairs Array grep first join map min max minmax postcircumfix:<[ ]> at_pos all any one none postcircumfix:<{ }> reduce ACCEPTS WHERE WHIC…
moritz nom: say callframe().^methods(:local)
p6eval nom cb6374: OUTPUT«new line file callframe level annotations my␤»
snarkyboojum nom: say callframe().my
p6eval nom cb6374: OUTPUT«EnumMap.new("\$=POD", Array.new(), "GLOBALish", GLOBAL, "EXPORT", EXPORT, "\$?PACKAGE", GLOBAL, "\$_", Any, "\$/", Any, "\$!", Any, )␤»
08:47 mj41 joined 08:51 mj41 left 08:59 [particle] joined 09:04 envi_ joined 09:09 mj41 joined
fsergot What did --setting=SAFE in nom? 09:18
What is the SAFE mode? :)
moritz nom: shell('echo pwnd')
p6eval nom cb6374: OUTPUT«shell is disallowed in safe mode␤ in sub restricted at src/SAFE.setting:2␤ in sub shell at src/SAFE.setting:7␤ in block <anon> at /tmp/g3neuNrSIN:1␤ in <anon> at /tmp/g3neuNrSIN:1␤»
fsergot does* 09:19
moritz fsergot: that's what it does :-)
fsergot And nothing with time limit etc.? :)
moritz nope
that's done in EvalbotExecuter.pm
fsergot Thanks. :) 09:21
09:22 Vlavv` joined 09:23 satyavvd joined 09:25 Vlavv_ left
moritz nqp: say(try { 1 }) 09:27
p6eval nqp: OUTPUT«1␤»
09:33 daxim joined 09:37 [particle] left
moritz nom: say $Inf 09:42
p6eval nom cb6374: OUTPUT«Inf␤»
moritz meh 09:45
the setting relies on variables that are used before they are declared :(
snarkyboojum nom: say $Inf - now 09:46
p6eval nom cb6374: OUTPUT«(timeout)»
snarkyboojum whoops
moritz nom: say now.WHAT 09:48
p6eval nom cb6374: OUTPUT«Instant()␤»
moritz nom: say now.Numeric 09:49
p6eval nom cb6374: OUTPUT«Instant:1320227422.46064␤»
moritz nom: say now.bridge
p6eval nom cb6374: OUTPUT«Method 'bridge' not found for invocant of class 'Instant'␤ in block <anon> at /tmp/o2P8UlYg_L:1␤ in <anon> at /tmp/o2P8UlYg_L:1␤»
moritz nom: say "%s\t%s" 09:52
p6eval nom cb6374: OUTPUT«%s %s␤»
moritz nom: say "%s\t\%s"
p6eval nom cb6374: OUTPUT«%s %s␤»
moritz oh. 09:53
moritz has a 'WTF?' moment 09:54
09:55 [particle] joined
moritz for a bit of context, I'm trying to make rakudo complain about undeclared variables 09:55
as in
nom: $x; my $x;
p6eval nom cb6374: ( no output )
snarkyboojum nom: printf("%s")
p6eval nom cb6374: OUTPUT«'' is not a valid sprintf format␤ in sub sprintf at src/gen/CORE.setting:1644␤ in sub printf at src/gen/CORE.setting:1649␤ in block <anon> at /tmp/vJnz9c47ZC:1␤ in <anon> at /tmp/vJnz9c47ZC:1␤»
snarkyboojum nom: say printf("%s") 09:56
p6eval nom cb6374: OUTPUT«Null PMC access in get_string()␤ in sub sprintf at src/gen/CORE.setting:1644␤ in sub printf at src/gen/CORE.setting:1649␤ in block <anon> at /tmp/4E03uib4ON:1␤ in <anon> at /tmp/4E03uib4ON:1␤»
moritz now when I make it complain about undeclared variables, it also complains about the %s in an interpolated string
my theory is that it first parses the %s as a variable, triggers the action method (that can complain), and then decides whether to actually use it as a variable 09:57
snarkyboojum what change is required to make it complain about undeclared variables? 09:59
nom: $x++; say my $x 10:00
p6eval nom cb6374: OUTPUT«1␤»
moritz when a variable is parsed, look it up in the current $*ST; complain if it doesn't exist
but as I just outlined, that's overly simplified
snarkyboojum niecza: $x++; say my $x 10:01
p6eval niecza v11: OUTPUT«===SORRY!===␤␤Variable $x is not predeclared at /tmp/o6qOV50twP line 1:␤------> <BOL>⏏$x++; say my $x␤␤Potential difficulties:␤ $x is declared but not used at /tmp/o6qOV50twP line 1:␤------> $x++; say my ⏏$x␤␤␤U…
moritz niecza: say "@a" 10:02
p6eval niecza v11: OUTPUT«@a␤»
snarkyboojum yay niecza
or not ;)
moritz it's correct 10:03
snarkyboojum is niecza right there?
ok
moritz only $ variables are always interpolated
all others only if the expression ends in a postcircumfix
snarkyboojum different to p5 then?
moritz so "@a[]" would interpolate, "@a" not
yes
snarkyboojum okydoke
b: say "@a" 10:04
p6eval b 1b7dd1: OUTPUT«@a␤»
10:04 hypolin left
snarkyboojum b: $x++; say my $x 10:05
p6eval b 1b7dd1: OUTPUT«1␤»
snarkyboojum awww
moritz one of our 15 oldest, known bugs
snarkyboojum saw the mail yeah.. not a bug in niecza tho :) 10:06
moritz if you discount TODO and spec tickets, it's our 5th oldest open bug
snarkyboojum a golden oldie eh
dalek kudo/check-vars: 430c564 | moritz++ | src/Perl6/Actions.pm:
align code vertically, no functional changes
10:08
kudo/check-vars: c18c888 | moritz++ | src/Perl6/Actions.pm:
complain about undeclared variables

breaks the build
kudo/check-vars: 0381c3c | moritz++ | src/core/ (2 files):
move declarations of $Inf and $NaN before its first usage
kudo/check-vars: 9464ea5 | moritz++ | src/core/Enum (2 files):
work around variable interpolation issues in the setting; restores the build
kudo/check-vars: 430c564 | moritz++ | src/Perl6/Actions.pm:
align code vertically, no functional changes
kudo/check-vars: c18c888 | moritz++ | src/Perl6/Actions.pm:
complain about undeclared variables

breaks the build
kudo/check-vars: 0381c3c | moritz++ | src/core/ (2 files):
move declarations of $Inf and $NaN before its first usage
moritz snarkyboojum: that's the first step of fixing it
kudo/check-vars: 9464ea5 | moritz++ | src/core/Enum (2 files):
work around variable interpolation issues in the setting; restores the build
moritz dalek-- # double reports
10:13 mkramer joined
moritz niecza: "@a[]"; my @a 10:13
p6eval niecza v11: OUTPUT«===SORRY!===␤␤Variable @a is not predeclared at /tmp/e3zdfvgj4b line 1:␤------> "⏏@a[]"; my @a␤␤Potential difficulties:␤ @a is declared but not used at /tmp/e3zdfvgj4b line 1:␤------> "@a[]"; my ⏏@a␤␤␤Unhandled …
snarkyboojum bulletproof :D 10:14
moritz aye :-)
sorear++ I guess :-)
I currently see a workaround that makes $x; my $x complain and *not* complain about "@a" if @a is not predeclared 10:15
but it will incorrectly fail to complain about "@a[]"; my @a 10:17
but don't tell masak :-)
snarkyboojum :P 10:19
nom: say "boo" 10:22
10:22 daxim_ joined
snarkyboojum method check_variable seems to do the job in STD.pm6 in niecza and STD 10:24
10:24 robins joined 10:28 jdhore left, spacebat left, jfried left, ashleydev left, stepnem left, DarthGandalf left, baest left, sivoais left, smash left, fhelmberger_ left, imarcusthis left, yath left, _ilbot left, orafu left, Exodist left, Tene left, sftp left, uniejo left, slavik1 left, Yappoko___ left, apejens left, pochi left, mkramer left, colomon left, _jaldhar left, tlocalhos left, huf left, skangas left, cotto left, PerlJam left, daemon left, betterworld left, TimToady left, Helios left, jjore left, zostay_ left, diakopter left, cognominal left, renormalist left, kaleem left, packetknife left, cooper left, Ingis left, p6eval left, carlin left, fsergot left, mtk left, odoacre_ left, PacoLinux left, tadzik left, bbkr left, mattp_ left, wtw left, sjn left, tomaw left, cxreg left, BooK left, broquaint left, felipe left, mdxi left, Bucciarati left, yahooooo left, neoliteral left, buubot_backup left, alvis left, Trashlord left, aloha left, zamolxes left, s1n1 left, miso2217_ left, risou_awy left, jevin left, tokuhirom3 left, cosimo left, revdiablo left, krakan_ left, [particle] left, envi_ left, LoRe left, y3llow left, kranius left, nebuchadnezzar left, Khisanth left, [Coke] left, eiro left, chitragupt left, tty234 left, Maddingue left, arthur-_ left, BinGOs left, ascent__ left, sbp left, nsh left, mls left, domidumont left, SHODAN left, frettled left 10:29 saaki left, sunnavy left, breinbaas left, [Sec] left, jlaire left, rhr left, dju left, shachaf left, ribasushi left, szabgab left, bonsaikitten left, gfldex left, f00li5h left, preflex left, japhb left, tewk left, itz left, mikemol left, overrosy left, Util left, moritz left, Woodi left, jrockway left, ingy left, nsh- left, mux left, koban left, alc left, pothos left, dalek left, prammer left, c1sung left, szbalint left, Lorn left, satyavvd left, Patterner left, Juerd left, wooden left, pnu left, flussence left, Gothmog_ left, hillu left, robinsmidsrod left, benabik left, drbean left, kfo left, ponpon left, ponbiki left, Grrrr left, TiMBuS left, hanekomu left, jerome_ left, xinming left, felher left, HarryS left, lumi_ left, Vlavv` left, __sri left, lestrrat left, djanatyn|afk left, ruz left, araujo left, Sarten-X left, pmichaud left, ranguard left, pjcj left, domm left, athomason_ left, takesako left, kent\n left, daxim left, mj41 left, simcop2387 left, am0c left, ethndbst left, woosley left, thowe left, REPLeffect left, PZt left, dukeleto left, ruoso left, sorear left 10:30 wooden joined 10:33 sbp joined, nsh joined, ascent__ joined, krakan_ joined, sjn joined, tomaw joined, cxreg joined, BooK joined, felipe joined, broquaint joined, mdxi joined, Bucciarati joined, yahooooo joined, neoliteral joined, BinGOs joined, revdiablo joined, cosimo joined, jevin joined, risou_awy joined, tokuhirom3 joined, arthur-_ joined, Woodi joined, jrockway joined, ingy joined, ribasushi joined, szbalint joined, szabgab joined, Lorn joined, mux joined, nsh- joined, Maddingue joined, jdhore joined, spacebat joined, miso2217_ joined, moritz joined, tty234 joined, c1sung joined, mattp_ joined, TimToady joined, Helios joined, jjore joined, zostay_ joined, diakopter joined, shachaf joined, chitragupt joined, betterworld joined, dju joined, rhr joined, bbkr joined, s1n1 joined, daemon joined, Util joined, [Coke] joined, PerlJam joined, tadzik joined, overrosy joined, Yappoko___ joined, apejens joined, pochi joined, mikemol joined, slavik1 joined, zamolxes joined, jlaire joined, eiro joined, prammer joined, cotto joined, uniejo joined, [Sec] joined, Khisanth joined, breinbaas joined, itz joined, tewk joined, sunnavy joined, nebuchadnezzar joined, japhb joined, preflex joined, sftp joined, Tene joined, baest joined, sivoais joined, smash joined, fhelmberger_ joined, imarcusthis joined, yath joined, _ilbot joined, PacoLinux joined, kranius joined, skangas joined, saaki joined, Exodist joined, odoacre_ joined, f00li5h joined, huf joined, aloha joined, DarthGandalf joined, dalek joined, mtk joined, frettled joined, stepnem joined, tlocalhos joined, fsergot joined, SHODAN joined, carlin joined, p6eval joined, ashleydev joined, y3llow joined, pothos joined, domidumont joined, Ingis joined, _jaldhar joined, cooper joined, alc joined, gfldex joined, packetknife joined, colomon joined, kaleem joined, mls joined, LoRe joined, jfried joined, orafu joined, renormalist joined, bonsaikitten joined, alvis joined, koban joined, cognominal joined, wtw joined, buubot_backup joined, envi_ joined, [particle] joined, mkramer joined, avar joined, Gothmog_ joined, Vlavv` joined, xinming joined, benabik joined, __sri joined, felher joined, lestrrat joined, drbean joined, djanatyn joined, ruz joined, hubbard.freenode.net sets mode: +vv dalek p6eval, araujo joined, kfo joined, ponbiki joined, ponpon joined, Grrrr joined, Sarten-X joined, TiMBuS joined, pmichaud joined, HarryS joined, kent\n joined, lumi_ joined, hanekomu joined, ranguard joined, jerome_ joined, pjcj joined, domm joined, athomason_ joined, takesako joined, kshannon joined, jtpalmer joined, jasonmay joined, clkao joined, simcop2387 joined, satyavvd joined, flussence joined, mathw joined, \patch joined, Juerd joined 10:34 nine joined, sorear joined, Psyche^ joined, Psyche^ is now known as Patterner, jnthn joined, kthakore joined, pnu joined, lucs joined, ruoso joined, alim joined 10:37 risou_awy is now known as risou, thowe joined
snarkyboojum my comment about the 'job seems to be done in method check_variable in STD.pm6 in Niecza and STD' didn't seem to survive the netsplit :) 10:38
10:39 hillu joined 10:47 robins is now known as robinsmidsrod
moritz I skimmed the check_variable code in STD, and don't see how it deals with this issue in particular 10:47
10:47 charsbar__ joined 10:48 woosley joined
dalek kudo/check-vars: c6bbbf8 | moritz++ | src/core/EnumMap.pm:
fix typo in EnumMap.pm
10:55
kudo/check-vars: 5a22e59 | moritz++ | src/Perl6/Actions.pm:
work around over-eager complaints about things that might turn out to be variables in double-quoted strings
kudo/check-vars: c6bbbf8 | moritz++ | src/core/EnumMap.pm:
fix typo in EnumMap.pm
kudo/check-vars: 5a22e59 | moritz++ | src/Perl6/Actions.pm:
work around over-eager complaints about things that might turn out to be variables in double-quoted strings
flussence for a few seconds there I though it'd fixed itself...
(I wonder if something's changed on github that's causing these double messages...) 10:56
10:58 am0c joined, satyavvd left, satyavvd joined 11:02 simcop2387 left, simcop2387 joined 11:03 flussence left, flussence joined 11:04 cognominal_ joined 11:05 wk joined, Trashlord joined 11:06 cognominal left, Trashlord is now known as Guest67676 11:07 am0c left 11:09 alc left 11:10 Guest67676 is now known as Trashlord 11:13 Trashlord left, Trashlord joined, [particle]1 joined 11:16 [particle] left 11:17 ponpon left
tadzik oh hai 11:20
11:23 ethndbst joined 11:24 [particle]1 is now known as [particle], wk left, ethndbst left, ethndbst joined 11:34 odoacre_ left, carlin left 11:36 simcop2387 left 11:38 Psyche^ joined, simcop2387_ joined 11:39 simcop2387_ is now known as simcop2387 11:42 Patterner left, Psyche^ is now known as Patterner 11:45 alim left 11:46 [particle]1 joined, ethndbst left 11:47 ethndbst joined 11:48 [particle] left 11:52 pernatiy joined 12:01 woosley left 12:06 satyavvd left 12:12 neoliteral is now known as literal 12:21 benabik left, JimmyZ joined 12:23 pernatiy_ joined 12:25 pernatiy left 12:28 envi_ left 12:29 kaleem left 12:34 alim joined 12:35 mkramer left 12:36 tyatpi_ joined 12:41 packetknife left 12:42 packetknife joined
masak oh hai, #perl6 12:44
moritz lol it's masak!
masak <moritz> but don't tell masak :-) 12:45
12:45 kaleem joined
masak tell me what? :P 12:45
as I said, it's been a while since we had one of those semicolon parsing bugs. 12:46
I remember being quite bothered by them back in 2009.
moritz masak: nope, something completely different
irclog.perlgeek.de/perl6/2011-11-02#i_4649873
masak oh, ok.
moritz that's the check-vars branch 12:47
12:47 mj41 joined, kaleem left 12:48 kaleem joined
moritz ... which introduces a parsing bug in t/spec/S04-declarations/my.rakudo which I completely fail to comprehend 12:48
masak ah. 12:49
12:54 araujo left
jnthn moritz: ...well, that's quite a wtf. 12:55
12:56 tyatpi_ left 12:57 wk joined
moritz ok, I've golfed it down, nopaste forthcoming 12:57
jnthn: gist.github.com/1333561 12:59
I wonder if maybe the error is bogusly thrown, and caught, and causes a parsefail somehow
or... something 13:00
jnthn moritz: Or a contextaul ends up in an undesirable state somewhere
moritz well, my patch only ever reads contextuals, afaict 13:01
jnthn or some other such oddity
moritz *patches
git pull; git diff origin/nom origin/check-vars 13:02
jnthn moritz: I can golf it further
try { eval '$b' }
eval('
my $d = 1;');
So it's nothing to do with Test.pm
moritz jnthn: you're on that branch too? 13:03
jnthn yes 13:04
moritz wonders if a cursor gets messed up with $/.CURSOR.panic, and then is somehow reused to parse the insides of the eval 13:05
... which is probably a rather stupid idea 13:06
jnthn moritz: MARKED and MARKER are globals. I'm wondering if they're to blame. 13:08
moritz ah, a fun we've had before 13:09
13:12 Sarten-X left
jnthn moritz: it's that 13:18
gist.github.com/1333597
moritz so, what's the fix? making %markhash an attribute in HLL::Grammar, and creating an instance before parsing?
jnthn (not suggesting this for direct application, just as proof that it's a marking problem) 13:19
13:19 Sarten-X joined
jnthn Well, the problem with that is we'd need to copy it to every cursor 13:19
A contextual would work
moritz that would have been my next suggestion 13:20
are they fast?
jnthn Slower than what we currently have
I'm wondering if we can maintain a stack of mark hashes reliably
STD uses @*MEMOS for these kinds of thing. 13:23
13:24 daniel-s joined
moritz jnthn: should I merge the branch anyway, and fudge the test for now? This is starting to get over my head :-) 13:24
jnthn moritz: Well, or apply it with the hack
So we don't have to regress on the test
Just clearly mark my patch as a hack.
moritz jnthn: ok 13:25
jnthn I'll try and work out the best way to fix this.
Or pmichaud may appear and give us an opinion ;)
Make sure my hack doesn't cause regressions too, btw 13:26
moritz sure, will spectest
oh and btw it won't be a branch merge
jnthn I suspect you could get something weird with a BEGIN time eval.
13:26 y3llow left
moritz because I changed stuff back and forth 13:26
jnthn ah, ok
moritz and the overall diff is rather small
jnthn however you prefer it :) 13:27
13:27 y3llow joined 13:31 sftp left
masak nom: sub foo { my $x; our sub bar { $x = 42 }; say $x }; our &bar; bar(); foo 13:38
p6eval nom cb6374: OUTPUT«Any()␤»
masak niecza: sub foo { my $x; our sub bar { $x = 42 }; say $x }; our &bar; bar(); foo
p6eval niecza v11: OUTPUT«Any()␤»
masak fair enuf :)
I guess bar is modifying a pad that is then thrown away...
jnthn yes
Or 13:39
Well, yes, it will be. But the real issue is that the call to foo makes a new one :)
13:43 envi_ joined 13:44 sftp joined 13:49 mtk left 13:51 benabik joined
[Coke] thedailywtf.com/Articles/The-True-A...ative.aspx 13:51
13:52 thou joined, PZt joined, colomon left
[Coke] nom: sub EmailList { return True CATCH { return False } } ; say EmailList() 13:52
p6eval nom cb6374: OUTPUT«===SORRY!===␤Unable to parse blockoid, couldn't find final '}' at line 1␤»
[Coke] nom: sub EmailList { return True; CATCH { return False } } ; say EmailList()
p6eval nom cb6374: OUTPUT«Bool::True␤»
masak nom: sub foo { my $x; our sub bar { $x = 42 }; say $x }; foo; our &bar; bar(); foo 13:53
p6eval nom cb6374: OUTPUT«Any()␤Any()␤»
masak right.
moritz niecza: sub EmailList { return True; CONTROL { return False } } ; say EmailList()
p6eval niecza v11: OUTPUT«Bool::True␤»
masak is that correct? 13:59
moritz erm, yes, because I'm stupid
niecza: sub EmailList { return True; CONTROL { default { return False } } } ; say EmailList() 14:00
p6eval niecza v11: OUTPUT«Bool::True␤»
moritz now *that* should come out as False, afacit
*afaict
dalek kudo/nom: 430c564 | moritz++ | src/Perl6/Actions.pm:
align code vertically, no functional changes
14:03
kudo/nom: d307831 | moritz++ | src/ (4 files):
Catch variable use before declaration (RT #61838)

Does not catch unused non-$ variables in double quoted strings.
This also moves $Inf and $NaN to an earlier setting file, because they were used before the declaration.
It also contains a very ugly workaound around a problem with the nqp
  %markhash being global, and reused for multiple evals. This bug
was exposed by other parts of the patch.
moritz evalbot rebuild nom
p6eval OK (started asynchronously)
dalek kudo/nom: 430c564 | moritz++ | src/Perl6/Actions.pm:
align code vertically, no functional changes
kudo/nom: d307831 | moritz++ | src/ (4 files):
Catch variable use before declaration (RT #61838)

Does not catch unused non-$ variables in double quoted strings.
This also moves $Inf and $NaN to an earlier setting file, because they were used before the declaration.
It also contains a very ugly workaound around a problem with the nqp
  %markhash being global, and reused for multiple evals. This bug
was exposed by other parts of the patch.
14:05 koban left
masak "yo dawg, I know you like commit messages, so I doubled them" 14:05
14:06 flussence left 14:10 JimmyZ left
dalek ast: 1947757 | moritz++ | S0 (2 files):
unfudge two passing tests for rakudo
14:16
ast: 1947757 | moritz++ | S0 (2 files):
unfudge two passing tests for rakudo
moritz closes rt.perl.org/rt3/Ticket/Display.html?id=61838 14:17
jnthn \o/
masak \o/
moritz++
moritz nom: $x; my $x 14:19
p6eval nom cb6374: ( no output )
[Coke] would chip in a few bucks to help fund a cert for rt.perl.org. 14:20
moritz++
moritz: there may be some near-dups that also closes. excellent. 14:21
moritz another that it fix is sub f { $x; $^x } 14:22
14:23 _jaldhar left
masak [Coke]: I would chip in a few bucks for that too. 14:24
14:25 JimmyZ joined
jnthn Next challenge: 14:25
nom: my $x = 42; { say $x; my $x = 69 }
p6eval nom cb6374: OUTPUT«Any()␤»
jnthn std: my $x = 42; { say $x; my $x = 69 }
p6eval std be1f10e: OUTPUT«===SORRY!===␤Lexical symbol '$x' is already bound to an outer symbol (see line 1);␤ the implicit outer binding at line 1 must be rewritten as OUTER::<$x>␤ before you can unambiguously declare a new '$x' in this scope at /tmp/llF9xD75w6 line 1:␤---…
jnthn :)
moritz jnthn: I guess the infrastructure for that one isn't quite as ready as for the last fix :-) 14:26
jnthn Hm :) 14:27
moritz (because we don't track usage of variables per scope in the $*ST
only declarations)
jnthn Yes, though we could track usages too :) 14:28
moritz ... and burn even more memory. Sigh. 14:29
jnthn We already keep a per-block symbol table.
[Coke] masak: I pinged the admins. 14:37
14:39 tyatpi joined
masak [Coke]++ 14:40
14:48 tokuhiro_ joined
moritz nom: $x; my $x 14:50
p6eval nom cb6374: ( no output )
moritz the previous rebuild seems to have vm-panic'ed 14:51
14:55 am0c joined
fsergot What is the easiest way to write in p6 an old dump function. Like this one: gist.github.com/1333837 14:59
I wrote some code, but i think it's too complicated. 15:00
jnthn fsergot: You have a string of data and you want to see the bytes?
moritz nom: say Buf.new(123, 0, 128).gist 15:01
p6eval nom d30783: OUTPUT«Buf:0x<7b 00 80>␤»
moritz you can just look how Buf.gist does it :-)
15:01 pernatiy_ left
jnthn nom: "abcd\nef".encode('utf-8').list.perl.say 15:01
p6eval nom d30783: OUTPUT«encoding 'utf-8' not found␤ in method encode at src/gen/CORE.setting:3444␤ in block <anon> at /tmp/h1IObLRjOR:1␤ in <anon> at /tmp/h1IObLRjOR:1␤»
jnthn er
nom: "abcd\nef".encode('utf8').list.perl.say
p6eval nom d30783: OUTPUT«Array.new(97, 98, 99, 100, 10, 101, 102)␤»
jnthn That gets you the bytes
moritz that's a bit of a f*ckup (that parrot thinks 'UTF-8' is 'UTF8') 15:02
jnthn m
fsergot I want to see hex hex hex | a b c :)
moritz utf8 exists within the Perl community as a relaxed version of UTF-8
fsergot: just show the code you've got so far, we can make then suggestions on how to improve it 15:03
15:04 araujo joined, araujo left, araujo joined
moritz nom: sub dump-line($s) { $s.comb>>.base(16) ~ ' | ' ~ $x.comb.map({ 31 < .ord < 127 ?? $_ !! '.'}) }; say dump-line("abc") 15:06
p6eval nom d30783: OUTPUT«===SORRY!===␤Variable $x is not predeclared at line 1, near ".comb.map("␤»
moritz nom: sub dump-line($s) { $s.comb>>.base(16) ~ ' | ' ~ $s.comb.map({ 31 < .ord < 127 ?? $_ !! '.'}) }; say dump-line("abc")
p6eval nom d30783: OUTPUT«Method 'base' not found for invocant of class 'Str'␤ in method reify at src/gen/CORE.setting:4051␤ in method reify at src/gen/CORE.setting:3958␤ in method reify at src/gen/CORE.setting:3958␤ in method gimme at src/gen/CORE.setting:4320␤ in method eager at src/gen…
fsergot moritz, my code is undone yet. It's to complicated too. :)
moritz nom: sub dump-line($s) { $s.comb>>.Int>>.base(16) ~ ' | ' ~ $s.comb.map({ 31 < .ord < 127 ?? $_ !! '.'}) }; say dump-line("abc")
p6eval nom d30783: OUTPUT«0 0 0 | a b c␤»
moritz nom: sub dump-line($s) { $s.comb>>.ord>>.base(16) ~ ' | ' ~ $s.comb.map({ 31 < .ord < 127 ?? $_ !! '.'}) }; say dump-line("abc")
p6eval nom d30783: OUTPUT«61 62 63 | a b c␤»
moritz fsergot: something like that? :-) 15:07
fsergot This is what i want! :)
15:07 pernatiy joined
moritz nom: $x; my $x 15:07
p6eval nom d30783: OUTPUT«===SORRY!===␤Variable $x is not predeclared at line 1, near "; my $x"␤»
fsergot Exactly!
moritz \o/ # finally
jnthn moritz++
moritz now there's just one case that doesn't work right yet 15:08
nom: "@a[0]"; my @a
p6eval nom d30783: ( no output )
moritz that's the one where I said "don't tell masak" :-)
fsergot moritz++ , can You explain your code? :)
moritz fsergot: which part of it? 15:09
fsergot All between { } :)
The subroutine :)
moritz $s.comb returns a list of characters in the string
>>.something is a method call done on each item of the list 15:10
.ord returns the Codepoint number
are you with me so far?
fsergot hmmm 15:12
Don't understand the >>. :) 15:13
moritz nom: say ("a", "b").uc.WHAT
p6eval nom d30783: OUTPUT«Str()␤»
moritz if I call string method like this on a list, it first converts to string
does its operation 15:14
and then returns a string
nom: say ("a", "b").uc.perl
p6eval nom d30783: OUTPUT«"A B"␤»
moritz but when I call it as >>.uc, the method is called on each list element, and a new list is constructed and returned 15:15
nom: say ("a", "b")>>.uc.perl
p6eval nom d30783: OUTPUT«("A", "B")␤»
moritz fsergot: a bit clearer now? 15:16
fsergot It's clear now. :)
So, "does something on each element of a list"? :) 15:17
moritz yes
fsergot Great moritz++ :)
moritz nom: say "abc".comb.perl
p6eval nom d30783: OUTPUT«("a", "b", "c").list␤»
moritz nom: say "abc">>.ord.comb.perl
p6eval nom d30783: OUTPUT«("9", "7").list␤» 15:18
moritz stupid
nom: say "abc".comb>>.ord.perl
p6eval nom d30783: OUTPUT«(97, 98, 99)␤»
moritz nom: say "abc".comb>>.ord>>.base(16).perl
p6eval nom d30783: OUTPUT«("61", "62", "63")␤»
15:18 dukeleto joined
moritz so, .base(16) just converts the number to base 16 15:18
~ is concatenation 15:19
fsergot Great. :)
Ok, it's clear all now. :)
moritz \o/
15:19 bluescreen10 joined
fsergot ?? !! is the same as? : in e.g. c, right? 15:20
moritz yes
fsergot Thank You very much. :)
I have another question, just for pure curiousity. 15:21
moritz sure, shoot
fsergot Where should i looking for if i want to add this function to standard functions on Str type, like e.g. "abc".perl? 15:22
moritz you shouldn't
fsergot Why? 15:23
moritz you can add methods to core classes from within your own programs, but it's very dangerous, because other users might add another method of the same class
ruby people have experienced a lot of pain because it was cultural acceptable (and easy) to do in ruby 15:24
15:24 tokuhiro_ left
moritz so two different libraries added two different (and incompatible) .json methods to the core classes 15:24
so you can't use both libraries at once
15:25 Grrrr left
moritz that's why you just put such functions into a module, and import that module when you do need it 15:25
15:25 kaare_ joined, alester joined
moritz if you really want do perform the black magic, it goes like this: 15:26
nom: use MONKEY_TYPING; augment class Str { method dump() { "generate dumped string here" } }; say 'abc'.dump
p6eval nom d30783: OUTPUT«generate dumped string here␤»
benabik nom: role Foo { method foo() { say "foo" } }; my $x = "bar" but Foo; $x.foo 15:28
p6eval nom d30783: OUTPUT«foo␤»
benabik How I'd do it ^^ 15:29
fsergot Ok, clear. Thanks. But what if i would write it in rakudo files, to add it to standard method. You know, someone is downloading the rakudo and he can use this method at once. :)
moritz fsergot: then you'd just put the method in src/core/Str.pm
though we'd need to agree that it's generally useful, and spec it 15:30
and it'd need a less general name, maybe "hexdump" or so
benabik: I'd still like a sub (or multi sub) better
fsergot So, it's quite simple. 15:31
Of course, community is community. :)
moritz fsergot: yes, it's simple
benabik: with a sub, you can dump any string, not just those with the role mixed in. And you have to load the module in any case
benabik moritz: Well, yes. But if I wanted to make it a method on a String, I'd do mixins not monkey around with core types.
fsergot Perl becomes better, and better. it makes me very happy, i love perl! :) 15:32
moritz benabik: ok, agreed on that part
benabik Might be useful to pass a String to some _other_ sub that expects a .foo method, for example. 15:33
fsergot What is the difference between role and class? When should i use a role and when a class?
15:33 tyatpi left 15:34 Grrrr joined, wtw left
moritz you use a class when you want to make objects from it directly 15:36
and you use a role when you have a piece of code that you want to share between different classes or roles
well, at least that's the basic rule of thumb :-) 15:37
benabik Or random objects with the power of but
moritz S12 and S14 have more on that matter
fsergot Thanks :)
15:37 molaf joined
JimmyZ nom: say "abc".>>.ord.comb.perl 15:38
p6eval nom d30783: OUTPUT«===SORRY!===␤Confused at line 1, near "say \"abc\"."␤»
fsergot nom: say <5/10>.perl 15:44
p6eval nom d30783: OUTPUT«"5/10"␤»
15:44 packetknife left 15:50 JimmyZ left
fsergot nom: say <55/5>.perl 15:51
p6eval nom d30783: OUTPUT«"55/5"␤»
moritz just a string
15:58 worr joined
masak very interesting PerlMonks thread: www.perlmonks.org/index.pl?node_id=233565 16:02
especially Abigail-II's answer close to the bottom.
jnthn and the ASCII-art screw 16:04
masak indeed, that was nice too.
16:15 cognominal___ joined 16:18 cognominal_ left 16:21 cognominal_ joined, flussence joined 16:22 fsergot left 16:23 cognominal___ left 16:27 phenny joined 16:32 alim left 16:34 kaleem left 16:46 kaleem joined 16:48 fsergot joined, kaleem left 16:49 kaleem joined 16:50 cognominal joined
masak oh my, there's a quantum version of the Monty Hall problem... 16:51
16:51 lateau_ joined
masak but the solution turns out to be the same as in the classical version, assuming the position has been correctly randomized. ;) 16:52
16:52 dual joined 16:53 cognominal_ left
sorear good * #perl6 16:59
phenny sorear: 01 Nov 06:48Z <japhb> tell sorear Perhaps one of the command-line capable JS engines. Would be nice to see how well Niecza's design fits into that type of VM, and whether the way that JS VMs are tunes can work well with the kind of generated code Niecza would throw at it.
sorear o/ masak
niecza: sub EmailList { return True; CONTROL { default { return False } } } ; say EmailList()
p6eval niecza v11: OUTPUT«Bool::True␤»
sorear niecza: sub EmailList { CORE::return True; CONTROL { default { return False } } } ; say EmailList()
p6eval niecza v11: OUTPUT«Bool::True␤»
sorear so much for that idea
moritz sorear: fwiw dalek reports every commit twice, any idea what could be wrong?
sorear moritz: github changed the API on us 17:00
17:00 icwiener joined
moritz :( 17:00
masak sorear: \o 17:02
17:04 pernatiy_ joined 17:05 pernatiy left
masak decommutes 17:06
dalek kudo/nom: fde126b | jnthn++ | src/Perl6/Optimizer.pm:
Make sure the optimizer knows about PAST::Want nodes; stub for PAST::Var consideration.
17:08
17:20 MayDaniel joined
sorear #phasers in 5? 17:25
moritz yes
17:25 pernatiy joined
jnthn grrr, DST :/ 17:25
17:26 pernatiy_ left 17:27 mj41 left 17:37 lateau_ left 17:41 pernatiy_ joined 17:43 pernatiy left 17:44 kaleem left
fsergot Can You show me how to use gather and take? 17:52
17:52 bluescreen10 left 17:53 cognominal_ joined, Chillance joined
Juerd my @foo = gather { ... }; Within the block, have one or more of take $item;. @foo will end up containing the items taken. 17:53
17:54 pernatiy_ left
fsergot Juerd++, tahnks. :) 17:54
thanks
Juerd e.g. my @foo = gather { while (...) { for (...) { if (...) { take $_ } } } } };
In p5 you'd write my @foo; and then use push instead of take. 17:55
fsergot Hm, right. :)
Juerd You can still do that :)
sorear the real advantage of gather/take is that it is _lazy_ and creates a _coroutine_ 17:56
17:56 cognominal left
sorear niecza: my @infinite-list := gather { my $i = 0; loop { take $i++ } }; for @infinite-list -> $x { say $x; last if $x > 10 } 17:57
p6eval niecza v11: OUTPUT«===SORRY!===␤␤Confused at /tmp/OcMf20672L line 1:␤------> = gather { my $i = 0; loop { take $i++ }⏏ }; for @infinite-list -> $x { say $x; l␤␤Parse failed␤␤»
sorear niecza: my @infinite-list := gather { my $i = 0; loop { take $i++ }; }; for @infinite-list -> $x { say $x; last if $x > 10 }
p6eval niecza v11: OUTPUT«0␤1␤2␤3␤4␤5␤6␤7␤8␤9␤10␤11␤»
sorear note the use of := there, which tells niecza to do an "aliasing" operation instead of a "copy" (which would fail for an infinite list) 17:58
Juerd - in identifiers still confuses me
17:58 daniel-s left
PerlJam Juerd: why? 18:00
18:01 tewk left
Juerd PerlJam: I don't really know. I read it as the minus operator. 18:02
Even though I always do write whitespace around the infix op, it appears that when reading I'm not as whitespace conscious... :) 18:03
fsergot sorear, only in niecza? 18:05
i think about :=
moritz in rakudo you should also use := there 18:06
18:06 tlocalhos left 18:07 tlocalhos joined 18:08 bluescreen10 joined
sorear I understand niecza's behavior and requirements very much better than I do rakudo's, so I tend to use it as an example, is all. 18:09
fsergot sub foo ( |$some ) { ... } 18:10
What means the | prefix?
I can't find it in S06 18:11
18:11 frettled left
sorear $some is a Capture object 18:11
moritz and it holds all the arguments passed to &foo 18:12
in a raw form
18:12 wk left
fsergot Clear, thanks! :) 18:13
18:13 frettled joined, sjn left, Lothar joined
fsergot So, what means the * prefix? :) 18:18
jnthn *@foo # all the positionals 18:19
*%foo # all the nameds
er, all those we didn't yet bind.
fsergot Thanks jnthn :) 18:20
18:21 karamorf joined
fsergot And what about ** ? :) 18:21
moritz that's non-flattening List of List context
if you write (1, 2), (3, 4) that will bind as 4 list items to *@a, and as 2 list items to **@a 18:22
fsergot Great, thanks. :) 18:23
masak moritz++ jnthn++ # explainers 18:25
fsergot right
nom: multi sub foo { say "foo"; }; multi sub foo (Int $a) { say "$a foo"; }; foo(); foo(1); 18:26
p6eval nom fde126: OUTPUT«foo␤1 foo␤»
fsergot nom: multi sub foo (Int $a) { say $a; }; multi sub foo (Int $a) { say "$a foo"; }; foo(); foo(1);
p6eval nom fde126: OUTPUT«===SORRY!===␤CHECK FAILED:␤Calling 'foo' will never work with no arguments (line 1)␤ Expected any of:␤ :(Int $a)␤ :(Int $a)␤»
fsergot nom: multi sub foo (Int $a) { say $a; }; multi sub foo (Int $a) { say "$a foo"; }; foo(1); foo(2); 18:27
p6eval nom fde126: OUTPUT«Ambiguous dispatch to multi 'foo'. Ambiguous candidates had signatures:␤:(Int $a)␤:(Int $a)␤␤ in block <anon> at /tmp/C9VaquTaEB:1␤ in <anon> at /tmp/C9VaquTaEB:1␤»
fsergot nom: sub name ( 1||2 ){ say 1; } name(1); 18:36
p6eval nom fde126: OUTPUT«===SORRY!===␤Malformed block at line 1, near "( 1||2 ){ "␤»
fsergot nom: sub name ( 1||2 ) { say 1; }; name(1);
p6eval nom fde126: OUTPUT«===SORRY!===␤Malformed block at line 1, near "( 1||2 ) {"␤»
jnthn You can't quite do that 18:37
fsergot I have to write 2 subroutines?
jnthn nom: sub name($a where 1|2) { say $a }; name(1); name(2); name(3)
p6eval nom fde126: OUTPUT«1␤2␤Constraint type check failed for parameter '$a'␤ in sub name at /tmp/tWFhWdcmvp:1␤ in block <anon> at /tmp/tWFhWdcmvp:1␤ in <anon> at /tmp/tWFhWdcmvp:1␤»
jnthn Note | (junction), not || (logical and) 18:38
fsergot Thanks jnthn++ :)
18:41 cognominal___ joined, am0c left
dalek kudo/nom: 58c4721 | jnthn++ | src/Perl6/Actions.pm:
Include and propagate a bit more type information.
18:43
kudo/nom: 325ea3c | jnthn++ | src/Perl6/Actions.pm:
Various improvements to handling of native types; get back to producing stuff the inliner can do well with.
kudo/nom: 5b98ef4 | jnthn++ | src/core/Int.pm:
Start to simplify various of the native ops thanks to native handling improvements; don't need the nqp::want rigmarole any more.
18:44 cognominal_ left, icovnik joined
dalek odel: 630d886 | diakopter++ | lua/ (9 files):
bunches more bugfixes. still many to go I'm sure.
18:44
jnthn moritz: If you're about and have tuits - feel free to continue the cleanup started in 5b98ef4. :) 18:45
jnthn goes to sort out dinner
moritz jnthn: will take a look 18:46
18:47 fridim_ joined
moritz jnthn: how much do we benefit from 'returns int' and 'returns Int:D' annotations? 18:50
18:53 tyatpi joined
icovnik hello please can you point me to some docs about installing modules into rakudo? 18:54
i am trying to install panda
moritz ... and it fails
because we've regressed on protoregexes
icovnik to install some other modules
ahhh 18:55
that would be it :)
moritz and it needs JSON to parse its state files
so what I'm currently using as a hack is ufo
icovnik heh
moritz github.com/masak/ufo
I clone the repos by hand, then do
18:55 risou is now known as risou_awy
moritz ufo && make install 18:55
icovnik and ufo is the replacement for panda? 18:56
moritz no
it's a hack we use until panda works again
sorry for the incovenience
icovnik :)
no problem 18:57
moritz (that's also the reason why we don't have a nom-based rakudo star release yet)
icovnik today i said to myself it is about the time to try to do something in rakudo
TimToady japhb: I see very little use case for 0X, 0B, etc. and I'd hate to be responsible for encouraging their use. 18:58
icovnik ok so no problem, there is another thing what i have a problem with
i wanted to install Digest::MD5 18:59
but don't know how
so i just wanted to try it
downloaded source
cd'd into it
but it somehow... doesn't work 19:00
so is there a way I can make it work?
moritz takes a look
icovnik hm maybe quite a big task with my 1-hour experience with rakudo and parrot :) 19:01
i got an error "Cannot assign a non-Perl 6 value to a Perl 6 container" in method md5_hex at a.pl:13
moritz sees why 19:02
jnthn moritz: Without the returns annotations, we can't inline, say, $a * $b + $c fully, even if we know that all are int. We need to know that int * int gives int. 19:03
moritz jnthn: ok, so they make sense to add where they are missing
jnthn: working on the cleanup
fsergot Can i build something like C's structure in perl? 19:04
jnthn moritz: Yes, and returns Bool on the comparrisons too.
moritz icovnik: I probably have a fix, but I need to wait until my rakudo is compiled again :-) 19:05
icovnik moritz: no problem 19:06
moritz: i can recompile too if needed
moritz icovnik: probably not necessary
19:07 tinmrn joined
icovnik ok in the meantime, can you direct me to some http client library? LWP::Simple? HTTP::Client? 19:09
moritz LWP::Simple exists 19:10
icovnik: github.com/moritz/perl6-digest-md5 branch nom
github.com/cosimo/perl6-lwp-simple/
19:11 Trashlord left
moritz jnthn: now that we have much more magic, should we simply return native things from all kinds of ops? 19:13
like infix:<+>(Int:D $a, Int:D $b) { ... }
19:13 wk joined
moritz could return int just as well as Int 19:13
19:14 Trashlord joined
jnthn moritz: I'd rather not 19:14
moritz: Also, all the Int ops will change soon.
moritz: Because bigint.
moritz ok, and yes 19:15
19:15 tyatpi left
TimToady sorear: would hash lookup overhead be distributed over your flat profile? and how much hash lookup is it doing for all the Cursors these days? 19:16
dalek odel: 5c50076 | diakopter++ | lua/ (3 files):
more fixes
19:17
TimToady i.e. would a repr change help there?
icovnik moritz: yes, after few minutes wrestling with git it really works :) thank you
moritz \o/
19:19 sjn joined 19:20 Chillance left
icovnik moritz: ok another question, how to run test suite of the module Digest::MD5 please? 19:22
moritz: i tried prove t
moritz icovnik: PERL6LIB=lib prove -e perl6 -r t/ 19:23
19:23 Chillance joined
moritz jnthn: problem, my native int/num patches make rakudo segfault :( 19:23
icovnik moritz: ...that answers another question of mine, how to include lib dir in module search path 19:24
moritz or if you use ufo
ufo && make test
jnthn moritz: int eresting...
19:24 mkramer joined
jnthn moritz: Can you figure out if it's the int or num bit, and send me a diff/intructions to reproduce? 19:25
19:25 wolfman2000 joined
moritz oh, I've made a mistake somewhere 19:25
I've accidentally returned a list from one of the ops 19:26
that shouldn't make it segfault, but it shouldn't be done anyway
jnthn no, segfaults are bad.
moritz recompiles and retests
jnthn I like to hunt those down if they're something that can happen without nqp::ops
benabik moritz: as in `return list;` inside a .ops file? 19:27
jnthn (e.g. if it could happen in user space)
moritz benabik: no
'Ii', nqp::cmp_i(...) or so
19:29 molaf left
TimToady nom: say "abc".ords 19:30
p6eval nom 5b98ef: OUTPUT«97 98 99␤»
moritz oooh
I completely forgot about .ords
even though I implemented it :-)
diakopter :) 19:31
icovnik moritz: ufo works really well, but another problem, now with URI 19:36
moritz: while running make: Invalid hard reference syntax at line 10, near "%%02X\", $c" 19:37
[Coke] nom: say "aֻ".ords 19:39
p6eval nom 5b98ef: OUTPUT«97 1467␤»
moritz icovnik: how does the line 10 look like? 19:41
19:41 mkramer left
icovnik moritz: that line of URI/Escape.pm looks good i think 19:41
19:41 envi_ left
icovnik moritz: %escapes{ chr($c) } = sprintf "%%%02X", $c; 19:42
19:42 daxim_ left
icovnik moritz: the problem is that part "%%%02X", $c 19:42
tadzik hello #perl6
19:42 colomon joined
icovnik moritz: i tried sprintf "%02X", $c and that works, i tried sprintf "%%" and that works too, i tried sprintf "%% %02X", $c and even that works, but "%%%02X" doesn't work 19:43
moritz nom: say sprintf "%%%02X", 123
p6eval nom 5b98ef: OUTPUT«===SORRY!===␤Invalid hard reference syntax at line 1, near "%%02X\", 12"␤»
moritz nom: say sprintf '%%%02X', 123
p6eval nom 5b98ef: OUTPUT«%7B␤»
moritz that's a possible fix 19:44
though I guess it's a rakudobug
PerlJam that's a crazy error message
moritz std: my $x; %%$x
p6eval std be1f10e: OUTPUT«===SORRY!===␤Invalid hard reference syntax at /tmp/efDntrSl4p line 1:␤------> my $x; %⏏%$x␤ expecting any of:␤ desigilname␤ twigil␤Parse failed␤FAILED 00:01 120m␤»
dalek kudo/native-ints: 41359ec | moritz++ | src/core/Int.pm:
get rid of nqp::want in Int.pm
19:46
moritz jnthn: bnrach native-ints pushed to github. Segfaults t/spec/S03-operators/reduce-le1arg.rakudo for me
on [+&]
yes, bad branch name, I hope we can delete it soon 19:49
19:49 ICheer_No0M joined, ICheer_No0M left
icovnik moritz: another one, again file lib/URI/Escape.pm: Typed arrays/hashes/callables not yet implemented at line 46, near ", Bool :$n" 19:50
moritz: the problematic line: sub uri_unescape(Str *@to_unesc, Bool :$no_utf8 = False) is export {
moritz is that also in the URI module? 19:51
icovnik yes
19:54 fsergot left, ksi joined 19:55 hugme joined
moritz hugme: list projects 19:55
19:55 ChanServ sets mode: +v hugme
hugme moritz: I know about Math-Model, Math-RungeKutta, MiniDBI, bench-scripts, book, gge, hugme, ilbot, java2perl6, json, modules.perl6.org, november, nqp-rx, nqpbook, perl6, perl6-examples, perl6-wtop, proto, pugs, rakudo, star, svg-matchdumper, svg-plot, tardis, try.rakudo.org, tufte, ufo, web, yapsi 19:55
19:57 mj41 joined
moritz icovnik: seems that URI isn't easy to fix :/ 19:58
icovnik moritz: hm hm hm so it looks like i am going to try HTTP::Client, that states that URI is replaced with some regex-fu 20:00
moritz: thanks 20:01
moritz: heh sorry again, it seems i am not going to load web pages today :) 20:05
tadzik just use Star :)
Star is based on the old Rakudo branch and most of the modules work there
icovnik module HTTP::Client, file lib/HTTP/Client/Response.pm6, error: Undefined routine '&splice' called (lines 108, 130) 20:06
moritz right, splice in NYI in nom
icovnik tadzik: please can you explain that to total novice (= me)?
tadzik: hmm do you thing rakudo star? 20:07
icovnik is really clever sometimes... ;) 20:08
tadzik icovnik: sure. You are now using the Compiler release, which is the best compiler ever known to man. Unfortunately, the old one still has advantages, one of them being that modules work on the old one only. While the new one is released, it's still quite experimental in some fields, I'd say
masak "Rakudo -- the best compiler ever known to man"
tadzik saw this one coming
20:09 tyatpi joined
masak the sun was setting, and it was not a humble day in #perl6... :) 20:09
tadzik :)
I may be talking silly, I've slept below 4 hours and spent 12 hours on the university today
masak know the feeling.
I slept too little and worked too much too.
tadzik but I got the highest grades from everything today :) 20:10
masak \o/
tadzik morale boost!
jnthn masak: You just get a way for a few days...take a break ;)
moritz tadzik++
masak jnthn: I could totally use a vacation now.
tadzik also managed to accidentally setup a password on a cisco router, which was quite entertaining
moritz tadzik: want to implement splice() in nom?
masak jnthn: good thing I don't have to prepare three talks or anything.
jnthn masak: eek!
tadzik moritz: sure thing, will just finish me pasta
masak more like one and two half talks, but still... 20:11
tadzik masak: yeah, and tomorrow is "only" 10 hours on the uni :) 20:12
good thing it's mostly "Battle for Wesnoth Day"
masak oh yeah. good thing.
er, what? :)
tadzik well, 7 hours of lectures after 3 hours of table tennis cannot possibly result in any productivity 20:13
tadzik looks at splice
masak attempts to mind-map what his missing talk will be about 20:14
tadzik augment's working, si? 20:18
masak nom: use MONKEY_TYPING; augment Str { method foo { say "si" } }; "OH HAI".foo 20:19
moritz oui
p6eval nom 5b98ef: OUTPUT«===SORRY!===␤In "augment" declaration, typename Str must be predeclared (or marked as declarative with :: prefix) at line 1, near " { method "␤»
masak nom: use MONKEY_TYPING; augment class Str { method foo { say "si" } }; "OH HAI".foo
p6eval nom 5b98ef: OUTPUT«si␤»
masak si.
tadzik si! \o/
20:21 GlitchMr joined 20:25 skangas left 20:28 fsergot joined
masak perl6: my $a = "OH HAI"; say q"$a"' 20:35
p6eval pugs b927740: OUTPUT«*** ␤ Unexpected "'"␤ expecting term postfix, operator, ":" or ","␤ at /tmp/lzRQY9tHqn line 1, column 28␤»
..niecza v11: OUTPUT«===SORRY!===␤␤Confused at /tmp/eC7u_yEZr2 line 1:␤------> my $a = "OH HAI"; say q"$a"⏏'␤␤Parse failed␤␤»
..rakudo 5b98ef: OUTPUT«===SORRY!===␤Confused at line 1, near "say q\"$a\"'"␤»
masak perl6: my $a = "OH HAI"; say q"$a"
p6eval niecza v11: OUTPUT«Potential difficulties:␤ $a is declared but not used at /tmp/m4tIhUGL8r line 1:␤------> my ⏏$a = "OH HAI"; say q"$a"␤␤$a␤»
..pugs b927740, rakudo 5b98ef: OUTPUT«$a␤»
masak \o/
fsergot :-) 20:36
masak perl6: say < :-) :-> :-P ;-) >.pick 20:39
p6eval niecza v11: OUTPUT«===SORRY!===␤␤Confused at /tmp/eHG8KelQCQ line 1:␤------> say < :-) :-> ⏏:-P ;-) >.pick␤␤Parse failed␤␤»
..rakudo 5b98ef: OUTPUT«===SORRY!===␤Confused at line 1, near "say < :-) "␤»
..pugs b927740: OUTPUT«*** ␤ Unexpected ")"␤ at /tmp/PMj3AwSY_v line 1, column 21␤»
masak oh, of course :/
perl6: say < :-) :-P ;-) >.pick
p6eval pugs b927740: OUTPUT«:-)␤»
..niecza v11: OUTPUT«:-P␤»
..rakudo 5b98ef: OUTPUT«;-)␤»
masak nom: say [+](1..9).grep({ $_ %% 2 }) 20:40
p6eval nom 5b98ef: OUTPUT«20␤»
masak niecza: say [+](1..9).grep({ $_ %% 2 })
p6eval niecza v11: OUTPUT«␤»
masak niecza: say [+] (1..9).grep({ $_ %% 2 }) 20:41
p6eval niecza v11: OUTPUT«20␤»
masak I think Niecza is right and nom is parsin' it rong.
I guess there's an RT ticket for it, too.
moritz I thikn so
jnthn pulls moritz's branch 20:42
moritz tadzik: gist.github.com/1334853 I couldn't resist :-) 20:43
jnthn moritz: oh
moritz: It's 'cus you use pir:: instead of nqp:: :)
moritz oh.
jnthn moritz: I guess I should try and make it handle those...
moritz: Yeah, it relies on knowing the result register type of nqp::, which we always do. 20:44
moritz ... and we don't know that for pir:: ?
jnthn moritz: Only if it's explicitly written in the opcode...which it is in these cases.
moritz so, what's the problem then? 20:45
jnthn moritz: That I only bothered to implement the type handling for nqp::
moritz oh
jnthn :) 20:46
moritz I thought the two compiled down to the same thing anyway
jnthn moritz: Yes, but I handle attaching .type for them earlier.
(In the actions)
moritz: anyway, I can make it work for pir::foo_II etc too
moritz: Or we can add the missing nqp ops
moritz or we make nqp:: opcodes for it all 20:47
jnthn Well, that needs to happen anyway really :)
moritz how shall we name the binary ops?
jnthn Are bor_i, band_i etc bad?
moritz no 20:48
jnthn bitwiseor_i is a bit long :)
moritz maybe bitor, bitand
jnthn Yes, with _i
moritz sure
tadzik moritz: there's nqp::splice :) And I have something that mostly works 20:49
benabik Would there be non _i bitwise ops?
moritz benabik: yes, for strings
benabik moritz: Hm. That could be very useful for cryptography… Shame I don't have the time to make a AES dynop lib for parrot. 20:52
moritz benabik: nqp is about to adopt libtommath, which can be used to build crypto stuff... libtom.org/?page=features&newsi...atfile=ltm 20:58
tadzik moritz: wanna implement item() in the meantime? my splice seems to work :) 20:59
besides occasional maximum recursion depth exceeded
moritz tadzik: I'm on the nqp:: opcode stuff right now, so probably not today 21:00
tadzik okay 21:01
nom: sub indirect_slurpy_context( *@got ) { @got }; my @a = 1, 2, 3; @a = indirect_slurpy_context(@a); # masak, your call :)
21:01 baest left
p6eval nom 5b98ef: OUTPUT«maximum recursion depth exceeded␤Method 'dispatch:<.?>' not found for invocant of class 'ResizablePMCArray'␤current instr.: 'is-hidden' pc 863722 (src/gen/CORE.setting.pir:239050) (src/gen/CORE.setting:6249)␤» 21:02
21:02 baest joined
benabik Line numbers from CORE.setting.pir scare me sometimes. 21:02
(Assuming, of course, that IMCC isn't just lying about them.) 21:03
moritz nom: my @a = 1, 2, 3; @a = @a
p6eval nom 5b98ef: OUTPUT«maximum recursion depth exceeded␤ in method infinite at src/gen/CORE.setting:4310␤ in method infinite at src/gen/CORE.setting:4003␤ in method infinite at src/gen/CORE.setting:4320␤ in method infinite at src/gen/CORE.setting:4003␤ in method infinite at src/gen/COR…
jnthn benabik: It's 250000 lines or so...
moritz simpler :-)
the ones from src/gen/CORE.setting seem to be accurate
tadzik eww, splice.t, you so silly 21:04
#?rakudo skip "splice is no longer spec'd as taking non-Int offset or size"
why is it in spectests then?
jnthn I love how we do infinite recursion...in a method called infinite
tadzik we should have the irony() method. It'd be so ironic
benabik Is infinite recursing infinitely really a bug? 21:05
tadzik any idea why github.com/perl6/roast/blob/master...ice.t#L136 wouldn't just be killed with fire?
these are supposed to be spec-tests, not "in-the-land-before-time-spec-tests" 21:06
moritz because fire hurts our hard discs
benabik Killed with magnets then?
moritz tadzik: most of the Cool stuff isn't really specced
tadzik I'm worried about the "no longer" part. Or is it planned to be put back in? 21:07
aw, whatever, I'll leave that to spec ninjas :) 21:12
fsergot o/ tadzik
sorear good * #perl6 21:13
tadzik hello fsergot
hello sorear
masak hello sorear
sorear o/ MASAK
TimToady: hash lookup isn't that high 21:14
fsergot hello sorear
21:14 GlitchMr left
jnthn
.oO( good guess though...hash and high do go together well... )
21:14
sorear TimToady: thinking I'll try to port tryfile/STD to niecza in their own right, to see how much of this is parser vs action methods
dalek p: d75deea | moritz++ | src/PAST/NQP.pir:
more math nqp:: ops
p: 3400e44 | moritz++ | src/PAST/NQP.pir:
more nqp:: math ops
21:15 bluescreen10 left
moritz jnthn: pir:: -> nqp:: qill probably have to wait until tomorrow 21:15
jnthn moritz: That's fine
moritz: Will a bit offline at times tomorrow
(Travel to Blava...) 21:16
Hotel should have wifi though :)
dalek kudo/nom: aecd2fc | jnthn++ | src/Perl6/Optimizer.pm:
Remove fossil analysis from optimizer.
21:18
icovnik jnthn: (Blava ta uz caka ;) sorry didn't resist) 21:19
jnthn ;) 21:21
jnthn suspects he's going to find his Slovak terribly rusty tomorrow :(
icovnik jnthn: heh no problem it's quite interresting if someone even tries to learn slovak :) 21:22
masak good night little cacti and cloudberries 21:26
masak sleeps
jnthn icovnik: It's a beautiful, but tricky to learn language. :)
shachaf masak: Cloudberries! 21:27
That's lakka, right?
21:29 benabik_ joined 21:30 benabik_ left
moritz aren't the berries callte målte or so? 21:30
but yes, the liquor is called lakka
dalek ast: cbcca7c | tadzik++ | S32-array/splice.t:
Fudge splice.t for rakudo
21:31
p: 7e4bb20 | moritz++ | src/PAST/NQP.pir:
forgot nqp::sinh_n
kudo/nom: b441203 | tadzik++ | / (2 files):
Implement splice(); run S32-array/splice.t
21:32
moritz tadzik++ # one step closer to running HTTP::Client on nom 21:33
moritz -> sleep
jnthn 'night, moritz
21:33 benabik left
tadzik 'night moritz 21:33
icovnik jnthn: for me it's only the tricky part... :( i really don't understand how can someone speak 3 languages heh 21:36
pmichaud I'm not sure that splice() should be eager, fwiw.
phenny pmichaud: 27 Oct 14:37Z <moritz> ask pmichaud to please review github.com/perl6/nqp/commit/fa9f99...20f76fe6d9 when he has a spare minute. My first regex built-in, so I'm not sure at all if that's the right approach
tadzik pmichaud: I stole that from ng 21:37
pmichaud ng had an eager splice? hmmm
well, I guess it makes sense for it to be eager.
so, keep it that way :)
we might want a lazy splice somewhere.
jnthn suspects it has to be eager up to the elements it's replacing, at least. 21:38
pmichaud I'm thinking of the elements that are being spliced in.
jnthn pmichaud: You'll be happy to know that those nqp::want-s in the native ops are going away :)
pmichaud: oh...yeah, those are more arguable.
pmichaud jnthn: yes, I saw some of the patches \o/
I have been somewhat following along, even if my tuit shortage doesn't let me do much commit/review of my own :) 21:39
jnthn pmichaud: btw, optimizer stats:
my int $i = 0; while $i < 10000000 { $i = $i + 1; }; say $i
Without optimizer: 82.26s
With optimizer: 3.51s
pmichaud \o/
jnthn And we've improvements to come yet.
pmichaud yes, indeedy
jnthn Oh, there was one issue I was going to ask you about. 21:40
That while is in void context
sorear jnthn: What exactly does your optimizer do here? Just replace + with add_i_i_ic?
jnthn However, PAST::Compiler seems to like making sure the while body always produces a result.
sorear: heh, "just" :)
sorear is still dubious of the "statement level loops return values" rule 21:41
jnthn sorear: It does that, and the < too
pmichaud: The thing is it really wants that to be a PMC
So even if we don't emit code that leads to such a thing, we end up with a new ['Integer'] thingy getting emitted.
sorear: Also flattens the loop body into the outer scope.
pmichaud I think we could update PAST::Compiler so that while loops honor rtype 21:42
jnthn sorear: Note that it does the replacement by first doing a compile time multi-dispatch.
sorear I don't see why there should be a huge speed diffierence between $i++ while $i < 1000000; and $i++ while $i < 1000000; say $i
jnthn sorear: And then checking if the resulting candidate can be inlined.
21:42 dorlamm joined
jnthn sorear: That is, it's quite generalized. 21:42
pmichaud: Could be good :) 21:43
pmichaud jnthn: maybe add a ticket for me to look at it?
can go in the RT queue for now
(even though it's a change to nqp and/or parrot)
jnthn pmichaud: can do
pmichaud I probably won't be able to get to it until early next week, though
jnthn np
sorear jnthn: do you follow my specgripe? ^^^ 21:44
jnthn pmichaud: Note that I have things so it actually boxes anyway at the moment.
pmichaud sure thing
jnthn sorear: yeah, I see the issue
sorear is annoyed by the new 2.10 mono profiler 21:53
colomon profiler not working, or results still too flat? 21:56
sorear results are pretty flat, and the profiler itself has Issues
I run the profiler against a 50-60 second program run 21:57
it takes 30-45 minutes and generates a 5.1 G output file
when profiler overhead is 98% of the runtime, I don't put much faith in the ability of the profiler to subtract out the overhead 21:58
gist.github.com/1335063 # typical mprof-report output 22:00
also, the profiler goes insane on recursive functions 22:02
dalek odel: a5cabb9 | diakopter++ | lua/ (9 files):
more bugfixes
22:04
diakopter yay; nearly all of the NQPSetting runs 22:05
by runs I mean Loads 22:06
jnthn :D 22:08
sorear \o/ 22:10
22:20 whiteknight joined, whiteknight is now known as Guest78509 22:27 kaare_ left, arnsholt joined 22:32 Guest78509 left
sorear put differently: I think that, as flat as the profile is, stupidly rewriting the parser in a closer-to-the-machine language would give a better return on time spent than trying to optimize specific code regions. 22:34
...of course the ideal would be for this language to be "type-rich Perl 6"
ping jnthn 22:39
jnthn sorear: pong 22:41
(I'm about for 10 more minutes...then gotta sleep...early flight)
sorear jnthn: not much time then. (Where to if I may ask?) I wanted an explanation of how native types should work with the binder 22:44
jnthn sorear: Rakudo's binder is largely just another thingy that works with Parrot's calling conventions. 22:47
sorear: A CallContext has a set of cells
Each cell is a union
Then there's a (static per callsite) set of flags, iirc, so you know which element of the union to take 22:48
Oh, no, I think that's not true
Yeah, it stores the type with each cell
So the binder just walks through them, sees if there's a native there, sees if it expects a native register to be set, and maybe does a box/unbox if needed.
sorear jnthn: I'm asking in a slightly more general context, to determine what Niecza should do 22:49
22:49 ksi left
sorear nom: sub foo(num $x) { say $x }; foo(1) 22:50
p6eval nom b44120: OUTPUT«===SORRY!===␤CHECK FAILED:␤Calling 'foo' will never work with argument types (int) (line 1)␤ Expected: :(num $x)␤»
sorear What will happen when we have int8 and int16? Should the binder widen stuff?
nom: sub foo(num $x) { say $x }; foo(1.0)
p6eval nom b44120: OUTPUT«Cannot unbox argument to '$x' as a native num␤ in sub foo at /tmp/ZoKMInuSz0:1␤ in block <anon> at /tmp/ZoKMInuSz0:1␤ in <anon> at /tmp/ZoKMInuSz0:1␤»
sorear nom: sub foo(num $x) { say $x }; foo(1e0)
p6eval nom b44120: OUTPUT«1␤»
jnthn sorear: Those don't carry around type information really
22:51 worr left
jnthn sorear: I mean, an int is an int 22:51
sorear in Parrot or in Perl6?
jnthn In Perl 6.
sorear I know Parrot is limited to just INSP :D 22:52
jnthn Not sure why you're so happy about that :/
But anyway, the spec says that intermediate values are at CPU width, iirc.
So it's only on storage that we widen/narrow
So we don't have int16, int8, int candidates for infix:<+> for example 22:53
sorear oh, hmm, so native types wider than the natural CPU width are not very useful?
22:54 sftp left
sorear thought that intermediate values were supposed to be bigint 22:54
jnthn Correct
No
S09: "An implementation of Perl is not required to support 64-bit integer types or 128-bit floating-point types unless the underlying architecture supports them."
So Rakudo not supporting int64 on 32-bit hardware is completely legitimate.
22:54 alester left
jnthn Int is DTRT oriented 22:55
22:55 sftp joined
jnthn int is be fast oriented 22:55
And int itself is machine specific in meaning.
22:55 worr joined
sorear seems suboptimal since most integer hardware supports double-wide integers with a modicum of efficiency, and a lot of 32-bit C code uses long long for various essential purposes 22:56
22:56 wolfman2000 left
sorear lseek64 comes to mind 22:56
jnthn I didn't say an implementation coudln't *choose* to support thsoe on 64-bit.
er, on 32-bit
The spec says it's not *required* to, not that it musn't. :)
22:56 Exodist left, Exodist_ joined
sorear oh right. 22:57
sorear would like to make $i64 = $i64 + 1 DTRT
jnthn sorear: Well, to some degree you only have to worry so much about the binder handling natives really efficiently. (more) 22:58
For large routines the body of the routine will be where the cost is.
For small ones, they'll get inlined and never pass through the binder.
That's the nice thing about native types. There's always lots of type info to work with.
sorear The binder is one of the only real hot spots in Niecza
probably because it gets called from every real function
jnthn In Rakudo it's fairly high, but still beats Parrot's invocation overhead in general. 22:59
And I know I can make the binder faster yet.
sorear s/beats/beaten by/?
jnthn er
well, depends what you consider winning ;)
The binder shows up lower on the profile than invocation.
sorear ok
jnthn In terms of Rakudo specific code though, yes, the binder is fairly hot. 23:00
sorear seems I'll also need to consider a new invocation protocol, 'Frame Invoke(Frame caller, Variable[] pos, VarHash named)' isn't going to work for much longer :)
jnthn Yes :) 23:01
karamorf I'd like to play with File::tools and WWW::App but can't seem to figure out which versions of rakudo/parrot/nqp that actually works with those modules ... I think I want to use 201107 but I can't get nqp to compile with parrot 3.6 for that. Also given 201109 and 201110 with parrot 3.8 and/or 3.9 without success. The MongoDB module might be nice as well ...
sorear jnthn: for mmd purposes, is int considered exactly the same as Int:D etc? 23:02
jnthn karamorf: If you're looking at 201107, it uses the nqp bundled inside Parrot, not the thing in the nqp repository
sorear: natives are always narrower than non-natives 23:03
sorear: I inherited that notion from SMOP, fwiw. It's played out well so far.
23:03 MayDaniel left
karamorf jnthm: oh, so I'm just missing a flag on my parrot compile ... thanks 23:03
sorear jnthn: what value set is an "int" parameter allowed to match? Int & -2**31 .. 2**31+1 ? 23:04
jnthn karamorf: The nqp should be built by default.
sorear: The multi-dispatcher will only consider a native candidate if the argument being supplied is marked as a native one in the capture. 23:05
sorear And it requires the "same" native argument type?
jnthn sorear: Only at the int vs num level 23:06
sorear: Not at the int8 vs int16 level
That is, there's no sense in which foo(255) and foo(256) might dispatch to an int8 and an int16 candidate respectively. 23:07
er, those would have to be unint, but you get the point :)
OK, *really* going to sleep now...this flight won't be easy to get up for :) 23:08
sorear jnthn: But single dispatch boxes and unboxes.
bye
jnthn oh, you asked where to...Vienna/Bratislava for Twin City Perl Workshop
single - yeah, I'm not at all comfortable with the unboxing there though...consider it endangered. It doesn't make sense in the face of bigints really... 23:09
and the multi-dispatcher handles the boxing direction
'night
dalek odel: 48f33e8 | diakopter++ | lua/runtime/Runtime/Signatures/Parameter.lua:
evil evil hack.
23:13
23:13 dual left 23:14 tyatpi left 23:15 icwiener left 23:19 dorlamm left
[Coke] whoa. www.xray.mpe.mpg.de/mailing-lists/p...00076.html 23:34
Juerd Amazing 23:44
gfldex perl6 is contagious already :)
Juerd Oh, it has been for ages :)
I love acme's patch but I'm really surprised to see all the positive response on p5p 23:45
sorear I guess they're all just in a good mood today 23:46
Juerd reached the end of the patch and thinks Wait, that's all? 23:49
23:50 mj41 left 23:52 thou left
Tene Juerd: and if someone had committed that two years ago, you could use it in distro perl today! 23:53
Juerd I'll still be using Perl in two years so I don't worry about that :) 23:54
Tene :) 23:56