»ö« 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! | YAPC::NA talk submissions due end of Month. Have you submitted your talk?
Set by toddr_ on 18 March 2013.
00:05 ruoso joined 00:14 aindilis joined 00:16 jerome left
jnthn 'night, #perl6 00:28
00:37 Entonian left 00:39 grondilu joined
grondilu Hello #perl6 00:40
colomon \o 00:44
00:48 erkan left 00:49 erkan joined, erkan left, erkan joined, jerome joined 00:54 Chillance left 00:59 fgomez left 01:04 anuby joined, gdey left 01:13 fgomez joined 01:26 hypolin joined 01:43 lichtkind joined
lichtkind can it bee that rules are allowed to overwrite methods? 01:44
diakopter example? 01:47
lichtkind sure but i tried nearly everything 01:48
i cant come up with example where roles throw exception
diakopter wait, roles or rules? 01:50
grondilu r: role R { method talk { say "I'm a role" } }; class Foo does R { method talk { say "I'm Foo" } }; Foo.new.talk
p6eval rakudo 2a41b3: OUTPUT«I'm Foo␤»
diakopter ok; the question said rules :)
grondilu typo I guess
lichtkind r:role R { method reset {$.d = 0; self} } class A does R { has $.d is rw = 2; method reset {$.d = 1} }; say B.new(:d(3)).reset.d 01:52
grondilu lichtkind: you need a space after 'r:'
lichtkind home it says 0
r: role R { method reset {$.d = 0; self} } class A does R { has $.d is rw = 2; method reset {$.d = 1} }; say B.new(:d(3)).reset.d 01:53
p6eval rakudo 2a41b3: OUTPUT«===SORRY!===␤Two terms in a row␤at /tmp/1Mj73nR5RR:1␤------> role R { method reset {$.d = 0; self} } ⏏class A does R { has $.d is rw = 2; meth␤ expecting any of:␤ postfix␤ statement end␤ statement modifie…
diakopter need a semi
lichtkind r: role R { method reset {$.d = 0; self} }; class A does R { has $.d is rw = 2; method reset {$.d = 1} }; say B.new(:d(3)).reset.d
p6eval rakudo 2a41b3: OUTPUT«===SORRY!===␤Undeclared name:␤ B used at line 1␤␤»
lichtkind yes
diakopter HONK SCREECH CRUNCH
^^ semi
lichtkind r: role R { method reset {$.d = 0; self} }; class A does R { has $.d is rw = 2; method reset {$.d = 1} }; say B.new(:d(3)).reset.d; 01:54
p6eval rakudo 2a41b3: OUTPUT«===SORRY!===␤Undeclared name:␤ B used at line 1␤␤»
grondilu r: role R { method reset {$.d = 0; self} }; class A does R { has $.d is rw = 2; method reset {$.d = 1} }; say A.new(:d(3)).reset.d
p6eval rakudo 2a41b3: OUTPUT«No such method 'd' for invocant of type 'Int'␤ in block at /tmp/voCg8NUqGu:1␤␤»
lichtkind yes that should be the output
but here it is 0 01:55
no
allright but still no exception
grondilu r: role R { method reset {$.d = 0; self} }; class A does R { has $.d is rw = 2; method reset {$.d = 1} }; my $a = A.new: :d(3); $a.reset; say $a.d 01:56
p6eval rakudo 2a41b3: OUTPUT«1␤»
diakopter r: role R { method reset {$.d = 0; self} }; class A does R { has $.d is rw = 2; method reset {$.d = 1; self} }; say A.new(:d(3)).reset.d
p6eval rakudo 2a41b3: OUTPUT«1␤»
grondilu lichtkind: you sure you get 0 with the above? 01:57
diakopter (either one) 01:58
02:01 kurahaupo left
lichtkind no i dont get 0 02:04
was my fault
juggling with too much example code in one file
but still wondering where exception is
diakopter where would the exception be? 02:05
lichtkind in the output last time i read synoses role conflict throws one 02:13
02:15 kurahaupo joined 02:25 japhb_ left 02:38 LlamaRider left 02:42 lichtkind left 02:46 grondilu left 02:48 adu_ joined 02:52 lustlife joined 02:54 sizz_ joined, sizz left 02:55 FROGGS_ joined 02:58 lustlife left, FROGGS left 03:02 orafu left, orafu joined 03:04 lustlife joined, uasi joined 03:05 adu_ is now known as adu 03:11 sizz joined 03:12 sizz_ left, uasi left, uasi joined 03:21 jaldhar_ joined 03:35 jaldhar_ left 03:36 jaldhar_ joined 03:50 araujo left, uasi left, Tabrenus joined 03:51 Tabrenus left 03:53 jerome left 03:56 fgomez left 03:59 orafu left, OuLouFu joined, OuLouFu is now known as orafu 04:02 sftp_ joined 04:03 fgomez joined, sftp left 04:07 jerome joined 04:13 bonsaikitten joined 04:42 preflex left, preflex_ joined 04:43 preflex_ is now known as preflex 05:01 Cynede joined
Cynede good morning 05:01
what is @rem = '--*-Perl-*-- in bash? 05:02
I see it in panda.bat file but it doesn't work for me, just interesting what is it o_O
05:05 sizz_ joined, sizz left 05:10 adu left 05:11 baest joined
lue Cynede: beats me. Aren't .bat files Windows batch files though? 05:14
apejens @rem is a comment I think, the rest looks like a modeline for an editor
lue (If it is a modeline, it's surely for emacs) 05:15
Cynede lue: it is
for win 05:16
lue you said "in bash" earlier, so I was curious.
05:16 uasi joined
Cynede ah... fault. It's in batch 05:17
perigrin what apejens said ... REM is the comment and the @ squashes output
er REM is the comment signifier
and @ squashes the prompt output
05:18 fgomez left 05:21 kurahaupo left
Cynede so... 05:23
anyways it doesn't work
says Variable @rem is not declared 05:24
05:27 labster joined 05:29 fgomez joined
apejens Cynede: and you are running panda.bat with what program? 05:29
Cynede apejens you mean I need powershell? 05:30
diakopter Cynede: are you in bash? 05:38
oh
batch
what is your prompt
labster r: if 0 { use MONKEY_TYPING; augment class Str { method Int { 'foo';}; }; 05:51
p6eval rakudo 2a41b3: OUTPUT«===SORRY!===␤Package 'Str' already has a method 'Int' (did you mean to declare a multi-method?)␤at /tmp/2LEn69rlRY:1␤------> ␤»
05:51 SamuraiJack joined
labster huh. that conditional didn't help at all. 05:53
06:00 Harzilein left 06:02 Jimmy_ joined
Cynede diakopter usual windows prompt 06:03
06:04 Cynede is now known as Heather 06:05 Jimmy_ left
Heather wonders about Google Drive gist.github.com/Heather/5194008 06:05
06:06 bonsaikitten left, DrEeevil joined 06:23 ilogger2 joined, ChanServ sets mode: +v ilogger2
diakopter p5eval: eval 'print '.('BEGIN { ' x 100 ).' 55 '.('}' x 100)) 06:25
p5eval diakopter: ERROR: syntax error at (eval 7) line 3, near "))"
diakopter erm
p5eval: eval('BEGIN { ' x 100 ).' print 55 '.('}' x 100)) 06:26
p5eval diakopter: ERROR: syntax error at (eval 7) line 3, near "))"
diakopter p5eval: eval(('BEGIN { ' x 100 ).' print 55 '.('}' x 100))
p5eval diakopter: 55
diakopter p5eval: eval(('BEGIN { ' x 1000 ).' print 55 '.('}' x 1000)) 06:27
p5eval diakopter: 55
diakopter p5eval: eval(('BEGIN { ' x 10000 ).' print 55 '.('}' x 10000))
p5eval diakopter: 55
diakopter p5eval: eval(('BEGIN { ' x 100000 ).' print 55 '.('}' x 100000))
p5eval diakopter: Out of memory!
diakopter oo
p5eval: eval(('BEGIN { ' x 50000 ).' print 55 '.('}' x 50000)) 06:28
p5eval diakopter: Out of memory!
diakopter p5eval: eval(('BEGIN { ' x 25000 ).' print 55 '.('}' x 25000))
p5eval diakopter: 55
diakopter rnp: eval("say {'BEGIN { ' x 25000 } 5 {'}' x 25000 }") 06:29
p6eval rakudo 2a41b3, niecza v24-35-g5c06e28, pugs: OUTPUT«(timeout)»
diakopter rnp: eval("say {'BEGIN { ' x 12500 } 5 {'}' x 12500 }") 06:30
p6eval rakudo 2a41b3, niecza v24-35-g5c06e28, pugs: OUTPUT«(timeout)»
diakopter rnp: eval("say {'BEGIN { ' x 6250 } 5 {'}' x 6250 }")
p6eval rakudo 2a41b3, niecza v24-35-g5c06e28, pugs: OUTPUT«(timeout)» 06:31
diakopter rnp: eval("say {'BEGIN { ' x 3125 } 5 {'}' x 3125 }")
p6eval rakudo 2a41b3, niecza v24-35-g5c06e28, pugs: OUTPUT«(timeout)» 06:32
diakopter rnp: eval("say {'BEGIN { ' x 1562 } 5 {'}' x 1562 }")
p6eval rakudo 2a41b3: OUTPUT«(timeout)» 06:33
..pugs: OUTPUT«5␤»
..niecza v24-35-g5c06e28: OUTPUT«(timeout)5␤»
diakopter niecza?
timeout and 5?
Heather where are this bot's sources?
diakopter github.com/perl6/evalbot 06:35
Heather diakopter thanks 06:36
diakopter although..
hm I never pushed the nqp-jvm thing
06:38 araujo joined
diakopter oh well, I'll leave it to someone more diligent 06:38
Heather diakopter how nqp generate makefile? 06:41
06:41 sftp_ joined
diakopter what do you mean 06:41
when building nqp? 06:42
Heather with use NQP::Configure ...
yes I need to track PERL variable path generation
sorear diakopter: print 5, then timeout. (timeout) and (signal FOO) are deemed important enough to promote to the front. 06:44
even though semantically they happen after all output...
n: say "hi"; sleep 1000 06:45
p6eval niecza v24-35-g5c06e28: OUTPUT«(timeout)hi␤»
Heather does someone know how Configure.pl is getting $(PERL) e.g. perl5 path
because after last perl update this path there is still being old :S so I want to know why 06:47
that will be sane if it somehow check which perl is running this configure.pl but it's not 06:49
what is @perl@ 06:54
tadzik Heather: I think it gets perl from parrot_confi 06:56
g
(hello #perl6)
Heather tadzik hi
tadzik parrot config? 06:57
06:57 uasi joined 06:58 kaleem joined
Heather and parrot is setting it during building? 06:58
then I will try to rebuild parrot 06:59
tadzik yeah, that sounds right 07:01
07:02 daniel-s_ joined
Heather tadzik then it's rule that we must rebuild parrot after perl5 update 07:04
yes... seems like you're right it's building now
tadzik well, I updated to 5.16.3 and didn't notice :) 07:07
presumably because path is /home/tadzik/perl5/perlbrew/perls/perl-5.16.0/bin/perl
so 5.16.0, no matter what minor version
Heather I don't like to work in user environment ) 07:08
tadzik I do :) I like to pretend that I'm not the only user of this machine
Heather tadzik I like to pretend that I'm not the only user of my distribution ^__^ 07:10
tadzik hehe
Heather tadzik by the way I hate to work from user -_-' it's KDE affected me to. 07:12
usually I use root and user's stuff is mess for me
with next setup I'm gonna pick something lighter even if I love KDevelop I will try to bring it to some openbox or... something else 07:13
tadzik I moved from KDE to i3 few months ago
Heather tadzik tiling? 07:14
tadzik yes
KDE dropped tiling in some release, which made it completely useless for me
not that it was particularly good before anyway
Heather I don't like tiling
offtopic but I don't understand for what it can be useful 07:15
tadzik I don't like using mouse, and it's non-trivial to manage windows without mouse and without tiling
it's useful for not wasting screen space
Heather tadzik so... what can you use w/o mouse at all? 07:16
tadzik instead of terminal
tadzik Heather: web browser, email client, music player
Heather -_-' and use open website and make tab -> tab -> tab ... 07:17
tadzik hehehe, no
welcome to XII century
er, wait, no 07:18
anyway
Heather -_-'
tadzik you press [f], and suddenly every link on the page is hilighted, like 'fxca'
when I type 'fxca', it presses this link for me
it's faster than aiming at it, even with a trackpoint
Heather nah ! I can headshot you faster 07:19
but ... agreed about trackpoint
tadzik try me
I used to defeat people in nexuiz online playing without mouse, trackpoint only
Heather I used to play with keyboard only when I was 5... or... nevermid :) I just don't get tiling 07:20
tadzik nothing to get, I guess. I just don't like overlapping windows :) 07:21
Heather matter of taste. some people say that they like tiling but they are working with terminals only. so I wonder why they need xorg. I see you're different kind :P 07:23
tadzik hehe 07:27
naturally, tiling WMs are better than managing terminals than non-X environments :)
although I've seen tiling "WMs" being non-X apps themselves, what was the name of this... 07:28
dvtm, that's the thing
Heather I use tmux and emacs and I don't need some multi-terminals to work this way
tadzik www.brain-dump.org/projects/dvtm/ 07:29
I guess tmux is capable of this too 07:30
Heather tadzik github.com/Heather/dotfiles/blob/m....tmux.conf this is much better though :)
tadzik and sure emacs... emacs in tmux is tiling in tiling... I really don't need another wm level tiling XD 07:31
07:32 kivutar joined
Heather tadzik but I need remove KDE monster -_-' 07:33
DrEeevil Heather: and replace it with gnome3? ;) 07:35
Heather DrEeevil I need own WM with blackjack and google reader
07:42 domidumont joined
masak .oO( does the KDE monster eat kookies all the time? ) :P 07:56
morning, #perl6 07:57
moritz good morning, masak, *
masak is honored not to be in the globbed part :)
Heather morning masak 07:58
moritz masak: oh, whatever :-) 07:59
masak :P
labster morning (Whatever) 08:00
hoelzro ahoy #perl6 o/
I pushed some new stuff to my NQP fork
08:00 wtw joined
hoelzro if someone could take a look at it =) 08:00
moritz URL?
hoelzro github.com/hoelzro/nqp 08:01
labster Hey, is anyone here on windows? If so, I'd like to see what the results of this is: say nqp::p6box_i(nqp::stat(nqp::unbox_s('..'), pir::const::STAT_PLATFORM_INODE)) 08:02
I think I saw that parrot had some custom code for getting file IDs on windows, but I was wondering if it actually worked.
Heather hoelzro a lot commits :(
hoelzro =)
it's a lot of stuff on top of a lot of other stuff; I'll clean it up pre-merge 08:03
Heather hoelzro you made work for maintainers -_-'
hoelzro commute &
Heather hoelzro github.com/hoelzro/useful-scripts/...compact.pl - what it makes? 08:08
diakopter labster: "STAT_PLATFORM_INODE not supported" 08:10
labster diakopter: guess not! thanks. 08:11
I've been thinking about a .inode method for IO, because it would be pretty useful for a couple of the things I've worked on. But if it's not going to work on all platforms, it might not be such a bright idea. 08:15
moritz do you want it to uniquely identify files? 08:17
08:17 domidumont left
moritz if so, you also need to know which mount point you're under 08:17
08:17 domidumont joined 08:41 fhelmberger joined
labster Well, device is in the stat array as well, for identifying files. Though so far, I've been looking at things in the same folder. But we don't have a function to access the stat array as a whole yet, so I'm getting it piecemeal. 08:46
08:51 wtw left 08:57 wk joined 08:59 kivutar left 09:00 kivutar joined 09:03 salv0 joined
hoelzro has anyone had a chance to check out my NQP changes? 09:06
09:06 wtw joined 09:09 kivutar left, wtw left, wtw joined
masak Heather: if you were to participate in a 4-hour Perl 6 course, (a) what time of the week would you prefer? and (b) what topics would you like to see? 09:12
Heather masak depends course format 09:13
hoelzro in token something:sym<{ }>, is 'sym' special, or can anything follow the colon and sym is used by convention? 09:14
09:15 kivutar joined
moritz sym is special 09:17
Heather masak (a) for casual course format it will be Mon->Fri from 9->17 in UTF+4 timezone (b) in topic I will discover something that can help me in production alike if I can use it in embedded systems, also parser writing, compiler and core modules infrastructure, and many more... 09:21
hoelzro ok, good to know! 09:26
I'll create a special case for it in the pygments lexer
09:30 rindolf joined 09:38 kresike joined
kresike hello all you happy and/or unhappy perl6 people 09:38
09:40 dakkar joined
Heather I have a suggestion! 09:43
let keep all the stuff in /usr/lib/perl6 by default? :)
tadzik 1) what's "all the stuff"? 09:49
2) I think everyone loves the fact that installing stuff without root Just Works 09:50
hoelzro I *definitely* think you should be able to install modules/applications as a regular user
even if your installation is system-wide
Heather tadzik examine some real software for all users, how will you install it? 09:51
09:51 daxim joined
tadzik Heather: with a system package manage 09:52
which, as you probably know, almost never uses default settings anyway
Heather hoelzro no, for secure reason you should not be able to install secure-wide stuff without some privilegies, and that's security feature
masak Heather: thank you. that is valuable. I will try to accomodate that.
tadzik you're missing the point, Heather
hoelzro right, if you want to install a module or application system-wide, you should need priviledges 09:53
tadzik the point is: make it easy for the user to install module X
hoelzro but if I want to install a module or application for my personal use, I should be able to do it
tadzik and it has nothing to do with system-wide
hoelzro kind of like a personal local::lib that's active by default
Heather then panda does it well
I talk about /usr/lib/parrot/5.1.0/languages/perl6/site/
which is part of default path 09:54
hoelzro oh, so /usr/lib/perl6 as opposed to that long path? I'm behind that 09:55
I think the way parrot lays things out might make that tricky, though
but I'm not an expert 09:56
hoelzro defers to an expert
tadzik ah well, I don't care :)
(about the system path)
what we use now is mostly what Parrot conventions dictated
(I think)
Heather Panda overrides it -_-' to add home folder
tadzik not really
Heather adds to it
more correct 09:57
tadzik panda uses the directory that is writable for it
if /usr/lib/ was writable for bootstrap.pl, it'd use /usr/lib
Heather tadzik let separate root level and usr level stuff :)
tadzik of course 09:59
Heather so ... all I need is to add /usr/lib/perl6 to PERL6LIB defaults...
or... /usr/lib/perl6/lib ... which looks some more weird :) 10:00
so for now I can say that it's to complex, unclear for me to setup everything there 10:01
10:04 Rix joined
Heather tadzik must be nooby question but why I can't see echo ${PERL6LIB} 10:05
hoelzro Heather: it's probably empty 10:06
env | grep PERL6
Heather nothing
hoelzro right, so it's not set
PERL6LIB isn't always set; it's a way of adding to the defaults
10:06 wtw left
Heather I see... 10:07
hoelzro do the characters following :sym have to be < and >? or any bracketing chars? 10:09
10:19 pjcj left 10:20 BooK joined, bruges_ joined, baest_ joined, pjcj_ joined, rjbs- joined, djanatyn joined, betterworld joined 10:21 chee joined, s0rear joined, baest_ is now known as baest 10:22 s0rear is now known as sorear 10:25 am0c joined 10:27 wtw joined
jnthn Hello, #perl6 10:28
hoelzro ahoy jnthn
colomon o/ 10:43
dalek p: 87b52fb | jnthn++ | src/QAST/Operations.nqp:
Avoid a circularity; pmichaud++ for noticing.
10:47
nwc10 jnthn: worked on my machine prior to that commit. Probably still does. Let's find out ... 10:48
hoelzro jnthn: I updated my NQP fork to use nqp::x_posixerrno and pir::const::POSIX_E*
(if you feel like having a look)
Heather r: say %*ENV<PERL6LIB>
p6eval rakudo 2a41b3: OUTPUT«(Any)␤»
moritz jnthn: what's wrong with that circularity? 10:51
jnthn moritz: If the values Parrot used for those things were to change, we'd not follow them, iiuc. 10:52
moritz ah
right
they'd better not change :-)
jnthn ;) 10:53
11:21 sizz joined
Heather damn! 11:41
I can't use PERL6LIB as global variable
masak why not?
or, maybe rather, what do you mean? 11:42
Heather masak I've got PERL6LIB set to /usr/lib (for example)
but panda (for example) don't care about it 11:43
doesn't
only if I do inline PERL6LIB=XXX panda then it works
moritz stupid question, did you export PERL6LIB?
masak are you using `export` when you set the env variable?
moritz hah, masak had the same idea 11:44
Heather masak I'm using env files, but it works same way as export
11:44 erkan joined, erkan left, erkan joined
Heather I need to set custom path for it forevA 11:45
not everytime :(
moritz panda manipulates PERL6LIB
Heather markov yes
moritz ^
moritz but I don't think it touches RAKUDOLIB
Heather can I echo this variable? 11:47
like it's added /root/.perl6/2013.02.1/lib but echo ${PERL6LIB[@]} says nothing about it
mystic :( 11:48
moritz Heather: erm, I think you might misunderstand something
Heather: PERL6LIB *adds* paths to @*INC
Heather moritz inc?
moritz Heather: but of course there paths in @*INC that aren't in PERL6LIB
r: say @*INC.perl
p6eval rakudo 2a41b3: OUTPUT«Array.new("/home/p6eval/nom-inst/lib/parrot/4.10.0-devel/languages/perl6/site/lib", "/home/p6eval/nom-inst/lib/parrot/4.10.0-devel/languages/perl6/vendor/lib", "/home/p6eval/nom-inst/lib/parrot/4.10.0-devel/languages/perl6/lib", "/home/p6eval/.perl6/2013.02.1-147-g…
moritz Heather: the list of paths used by the module loader to locate modules
Heather right .... so if i run something that is not panda then I will not see this added path? 11:49
moritz define "see"? 11:50
Heather it will not be in INC
11:50 xinming_ joined
moritz if you add a path to PERL6LIB, it will show up in @*INC 11:50
Heather once 11:51
right?
not forever stay there
moritz it's added to @*INC every time you start the 'perl6' binary
so it's a matter of how long-lived the enviroment variable is 11:52
Heather it confuses me even more...
moritz let me try again
rakudo itself doesn't keep any state between invocations 11:53
so
when you run
perl6 -e '.say for @*INC'
before the program is parsed, rakudo reads the environment
Heather I see path added by panda...
moritz and adds paths to @*INC from PERL6LIB and from RAKUDOLIB
Heather: panda doesn't add any paths 11:54
Heather ah
true
it's default one...
moritz and is there way to change default path? 11:55
moritz yes, by patching rakudo
src/core/terms.pm
search for INC 11:56
Heather I see... 11:57
I feel that I'm going to do something wrong now 11:58
moritz what are you trying to do?
Heather moritz install anything to root level 11:59
moritz in current state it's hell complicated
moritz but for that you don't need to remove paths from @*INC, no?
afk
Heather moritz I just need to add some env variable to defaults so I can setup stuff to /usr/lib/perl6 or to /usr/lib 12:00
I can count other ways of making job done, there are several ways but this one is most clear for me personally 12:01
wait... 12:07
@INC.push(%ENV<PERL6LIB>.split($VM<config><osname> eq 'MSWin32' ?? ';' !! ':')) if %ENV<PERL6LIB>;
it pushes PERL6LIB ENV here
I just need to use this env before installation...
I'll try 12:09
12:14 shlomif joined 12:15 rindolf left, shlomif is now known as rindolf 12:22 wtw left 12:25 LlamaRider joined 12:30 LlamaRider left, SmokeMachine joined 12:31 LlamaRider joined
Heather Attempting to get PIR backtrace. No guarantees. Here goes... make: *** [NQPP5QRegex.pbc] Error 1 12:31
oh :( 12:32
[Coke] (don't have the posix file generate posix.pasm - have it generate posix.pir but put the same constants in it.)
hoelzro [Coke]: I take it this is regarding my work? 12:36
[Coke] It's from about 12 hours ago. if you're generating a file of parrot constants, please use pir instead of pasm. (the generated file is exactly the same, just has a .pir extension) 12:37
(when pasm goes away, this will be one less thing that needs changing.)
hoelzro [Coke]: and that PIR would be checked in? 12:38
[Coke] whatever you would have done with the constants.
if posix constants are the same everywhere, sure. If there is some change per-machine, then I imagine each builder would need to generate their own.
Heather it was bug of rebuilding 12:39
I need to uninstall and install again
hoelzro ok, so I should build PIR instead of PASM, then?
[Coke] Yes. again, it's the same file, just call it .pir
hoelzro ok 12:40
I'll try that when I get home =)
[Coke] Danke. 12:41
12:56 woosley1 joined
Heather m... I should specify both, perl6lib and rakudolib 12:58
13:00 LlamaRider left 13:05 domidumont left 13:14 rindolf left 13:16 rindolf joined 13:17 jaldhar joined 13:18 xinming joined, bluescreen10 joined 13:19 cognominal joined 13:21 xinming_ left
dalek p/cont: 3c65140 | jnthn++ | src/ (2 files):
Toss current container spec config op.

Not used in NQP itself, and we'll be changing how container stuff is handled.
13:21
p/cont: 11b1430 | jnthn++ | src/ (6 files):
Start replacing container spec approach.

This is the minimum needed to get NQP to build and pass its tests again with the data structure updates. Still needs some more infrastructure before we can start updating Rakudo to use this new approach.
arnsholt Containers! 13:26
nwc10 twenty foot units?
oh, not *that* sort of container 13:27
jnthn arnsholt: Doing a re-work of the container spec stuff. 13:28
arnsholt: It's partly portability related, partly related to fixing the whole "natives and is rw don't end well" thing.
arnsholt Yeah, I figured. Which is awesome! =) 13:31
13:33 PacoAir joined 13:46 amkrankruleuen joined, amkrankruleuen left, amkrankruleuen joined, amkrankruleuen left 13:48 Kuss joined, kaleem left 13:49 Kuss left
nwc10 jnthn: I assume that it is totally expected that the new nqp/cont branch breaks nqp-jvm with a load of: Unhandled exception: java.lang.RuntimeException: Unknown serialization format version 4 14:00
(which looks like a sanity test that is working as designed)
14:04 woosley1 left
jnthn nwc10: Yes 14:05
dalek p/cont: 564d659 | jnthn++ | src/6model/sixmodelobject.h:
Don't decontainerize type objects.
14:21
p/cont: d5acd05 | jnthn++ | / (5 files):
Add container spec registry and code_pair spec.

The registry keeps track of different containerization strategies we have. Implemented one that relies on a pair of code objects (a fetch and a store), which provides one aspect of the previous functionality.
p/cont: 6037461 | jnthn++ | src/6model/serialization.c:
Deserialization for new container support.
14:23 Psyche^ joined, FROGGS joined 14:24 SmokeMachine left
dalek c: 4774f93 | (Gabor Szabo)++ | lib/IO.pod:
a few entries in IO
14:26
14:26 Psyche^ is now known as Patterner
dalek p/cont: 7ca7a40 | jnthn++ | src/ (2 files):
Add new nqp::setcontspec and an nqp::assign op.
14:26
p/cont: 61011ea | jnthn++ | t/nqp/67-container.t:
Some tests for the new container stuff.
p/cont: 8e570d8 | jnthn++ | src/6model/containers.c:
Fix a replace-o.
14:27 domidumont joined 14:30 xilo joined 14:31 SmokeMachine joined 14:32 xilo left
jnthn FROGGS: In docs/ROADMAP in Rakudo, you may want to review it - think you may have completed the array interpolation in regexes item in there? 14:33
14:34 xilo joined
FROGGS jnthn: well, it does it almost right... should I remove that item? 14:35
hoelzro are Str:D/Str:U special, or are they just general adverbs applied to types? 14:36
pmichaud good morning, #perl6
FROGGS r: class XXX { }; say XXX:D 14:37
p6eval rakudo 2a41b3: OUTPUT«(XXX)␤»
FROGGS hoelzro: ----^
hoelzro FROGGS: right, but can you do XXX:FooBar?
jnthn FROGGS: How almost is almost? :)
o/ pmichaud
FROGGS hoelzro: dont think so, D is for defined, U for undefined
hoelzro ok
cool
FROGGS jnthn: well, almost means that pmichaud pointed out a few things that are bugs (regexes within arrays) 14:38
jnthn: well, I would consider it done 14:40
jnthn FROGGS: OK, I leave it up to you :)
FROGGS :o)
jnthn May want to update the features page too since it claims we only can interpolate scalars. :) 14:41
14:43 cognominal__ joined 14:45 cognominal left
FROGGS jnthn: where is that feature page? do you mean that webpage? 14:47
jnthn yeah 14:48
on perl6.org
There's a repo which contains a JSON file that you twiddle
features under the perl6 org, iirc
14:49 kivutar left
FROGGS ahh, here it is github.com/perl6/features/blob/mas...tures.json 14:49
moritz "This page is generated by process.pl from template.html and features.json, all of which can be found in the perl6/features repository. The canonical location for this page is at perl6.org/compilers/features and is updated at least hourly." 14:53
pmichaud moritz: nobody sees that... it looks too much like a README entry. :-P
FROGGS hehe
moritz pmichaud: I should start that section with "Secret, hacker-only knowledge ahead" or so :-) 14:54
pmichaud moritz++
[Coke] oh, too complicated, I can't read that.
dalek p/cont: 335e5c9 | jnthn++ | src/ (4 files):
Add nqp::assignunchecked(...).

Used for the case when the compiler (probably the optimizer) already concluded that the assignment is safe.
14:56
p/cont: 92f47c4 | jnthn++ | t/nqp/67-container.t:
Test nqp::assignunchecked op.
kudo/nom: b3b5f8e | pmichaud++ | docs/ChangeLog:
Update ChangeLog with Range as Range endpoint error.
14:57
14:58 kaare_ joined, benabik joined
cognominal__ reading Operations.nqp, I can't find the documentation for the strings describing the registers. Not the first time I ask, but I keep forgetting. Sorry 15:00
15:01 xilo left
cognominal__ I see that it is treated by the sub pirop_mapper 15:03
15:04 xilo joined 15:10 d4l3k_ joined 15:11 bruges joined
moritz what do you mean by "strings describing the registers"? 15:13
a register is either named $P1, $S42 etc., or as an identifier if it's pre-declared 15:14
15:14 xinming_ joined, integral joined, integral left, integral joined, Util_ joined 15:15 SmokeMachine left 15:16 `patch` joined
cognominal__ moritz, for example, in QAST::Operations.add_core_pirop_mapping('bindcurhllsym', 'set_hll_global', '1sP'), '1SP' describes the type of the registers 15:17
15:18 xorp_ joined
cognominal__ I search the doc that describes the convention for building that string 15:18
pmichaud it describes the types of the arguments
's' means string register or string constant 15:19
'P' means PMC register
'1' means that the result of the operation is whatever one of the arguments evaluated to
(since set_hll_global doesn't return a value itself)
cognominal__ there is also a 'Q' somewhere 15:20
moritz '1' means that argument with index 1 (so the second argument) is returned
cognominal__ but I know there is a doc for that
moritz at least there was a doc for that :-)
pmichaud yes, in PCT
cognominal__ ha!!
pmichaud I don't know that it's ever been put into nqp
moritz ah, so parrot repo
15:20 SmokeMachine joined
pmichaud it needs to be. 15:20
jnthn Go for it, but remember that what is supported now probably differes from in PCT. 15:21
15:21 xinming left, bruges_ left 15:22 d4l3k_ is now known as dalek
moritz cognominal__: Q has something to do with the Key syntax in PIR 15:22
like ["foo";1]
pmichaud actually, like $P0["foo"]
15:23 grondilu joined
arnsholt cognominal__: sub pirop_mapper in Operations.nqp is the bit of code that does the transformation 15:23
moritz pmichaud: no, that can be mapped with a simple nqp::atkey
pmichaud Q indicates a keyed PMC, with the next character indicating the type of key
moritz oh
ok
pmichaud thus Qs indicates something of the form $P0[str] 15:24
moritz then probably not used very often in modern nqp :-)
cognominal__ ok. this is so strange to see high level stuff the functionnal style encouraged by nqp when usual perl stuff like vivification is missing :)
*stuff like the
Also is there a doc about the way nqp is bootstrapped? I don't get it. 15:25
pmichaud QAST::Operations.add_core_pirop_mapping('positional_get', 'set', 'PQi', :inlinable(1));
QAST::Operations.add_core_pirop_mapping('positional_bind', 'set', '1QiP', :inlinable(1));
QAST::Operations.add_core_pirop_mapping('associative_get', 'set', 'PQs', :inlinable(1));
QAST::Operations.add_core_pirop_mapping('associative_bind', 'set', '1QsP', :inlinable(1));
arnsholt moritz: FWIW, atkey uses Q =)
pmichaud and all of the atkey/bindkey etc operations use the Q type
moritz ok, I stand corrected 15:26
pmichaud indeed, Q is how they're able to work :-)
cognominal__ btw, I have a pull request for nqp which is probably harmless
pmichaud cognominal__: I don't know if there's a doc about it.
cognominal__: essentially, there are PIR files in src/stage0 that build an instance of the nqp compiler. That nqp compiler is then used to build a "real" nqp compiler from the nqp sources. 15:27
since the nqp sources are "official" 15:28
15:28 xilo left 15:29 xilo joined 15:31 cognominal joined, cognominal__ left
cognominal thx, my connection is unstable but I am reading the irc log 15:33
I guess I understand the principle but not the ultimate magic. How this stage0 pir files were generated? 15:35
pmichaud from a previous compilation of nqp 15:36
cognominal is that just an historical process that could not be repeated ?
pmichaud it is repeated
after we build an "official" nqp from the nqp sources, we can copy its .pir files into the stage0 directory and update the repo with them
cognominal but the original nqp must come from somewhere
jnthn The stage0 is that somewhere :) 15:37
moritz the original nqp was bootstrap with nqp-rx
which again was bootstrapped from the original nqp
which was bootstrapped from PCT, iirc
which was written in PIR
cognominal moritz++
pmichaud well, the original nqp-rx was bootstrapped with some manual help
moritz cognominal: it's a bit like with a C compiler: you need to compile it with some C compiler first 15:38
either with an earlier version, or with a different compiler
cognominal so nqp-rx has still some utility at the bootstrapping stage
pmichaud no.
moritz no
cognominal: the first version of nqp was bootstrapped with nqp-r
pmichaud forget nqp-rx, it's not important except for historical value.
moritz *nqp-rx
now nqp bootstrapps itself
nwc10 and that gets you to cm.bell-labs.com/who/ken/trust.html
pmichaud cognominal: once we have a built copy of 'nqp', the "make bootstrap" target copies its files into src/stage0 15:39
in particular, it copies its .pir files into src/stage0
if we then check those .pir files into the repo, that instance of nqp becomes the new stage0 for building future instances of nqp
er, "make bootstrap-files" it looks like. 15:40
arnsholt Yeah, bootstrap-files 15:41
nwc10 self hosted bootstrapping compilers, and separating out the front and back ends so that cross compiling is possible, are awesome. Someone explained it to me 20 years ago, and after I digested it, it was "wow" 15:42
as in "very worth it, for the flexibility"
15:43 orafu joined, cognominal left 15:45 cognominal joined
dalek kudo/cont: b17ffa8 | jnthn++ | src/ (28 files):
Eliminate nqp::p6decont for plain nqp::decont.

We'll attach the Rakudo semantics/optimization directly to the type using the new container spec handling.
15:46
kudo/cont: a5aa552 | jnthn++ | src/binder/sixmodelobject.h:
Get latest 6model header file.
kudo/cont: c7911a2 | jnthn++ | src/ (6 files):
Eliminate p6store op in favor of nqp::assign.

Note some more work needed before this will work.
p/cont: 80f6d1a | jnthn++ | src/6model/ (2 files):
Provide a way for libs to register containers.

This means that Rakudo will be able to set up its scalar handling.
p: efb432b | pmichaud++ | src/QAST/Operations.nqp:
Add some documentation about signature argument to pirop_mapper.
15:48
cognominal thx
[Coke] pmichaud++ cognominal++ # i remember having to find those in parrot more than once.
pmichaud it still needs better documentation elsewhere, but at least it's now in the nqp repo 15:49
[Coke] (or their cousins, anyway)
cognominal pmichaud++ 15:51
dalek kudo/cont: 8b49b7a | jnthn++ | src/Perl6/Metamodel/BOOTSTRAP.pm:
Update nqp::setcontspec usages for new protocol.
kudo/cont: 044f377 | jnthn++ | src/core/ (2 files):
A couple of stray nqp::p6decont => nqp::decont.
jnthn pmichaud: The good news: Rakudo now builds with the new container stuff 15:52
pmichaud: The bad news: we relied on a failover of "this isn't a scalar but we're trying to assign to it" to call a .STORE method, for array assignment.
And hash, and parcel...
pmichaud I thought you knew that already. 15:53
jnthn I'd...forgot ;/
Grrrrrr.
That's a pain.
pmichaud well, how should it be done, then?
jnthn Good question.
Maybe just by making it explicit in the code-gen. 15:54
15:54 chinaXing joined
jnthn Rather than trying to have it fail over at C level 15:54
pmichaud I kind of figured you had already taken that into account with "Rakudo can just register its functions for this"
jnthn Yeah but... 15:55
Those are for if we've already decided it's a container.
moritz we know at compile time whether an = is list assignment or item assignment, right?
jnthn moritz: In many cases.
Today we actually try to optimize a bunch of those. 15:56
The failover is not idea 'cus it happens in C code, which means it's an inferior runloop whenever we do it.
pmichaud hold that thread for a second
jnthn *ideal
pmichaud there's a related question of "what should C<my @a> do in the first place?"
Rakudo has always had it vivify an array. There's an argument to be made that @a should not vivify to an array until something is put into it. 15:57
I don't know what the official spec position is on that, thesedays.
at one point it was "fall back to p5 behavior", which would have @a be undef
15:58 renormalist joined
pmichaud thus, for a while we had a "we need to change @a to be a container" todo item that we never acted on because it was too disruptive to the codebase 15:58
jnthn I think the problem with that is we'd have to have some kind of container around the Array type object, so when you pass it it can update the container with the vivified thing. 15:59
And that is indeed disruptive because today "is a container" is really "is a *scalar* container"
Plus it's rare you'd declare an array and then never use it, so it is mostly just a promise of another level of indirection. 16:00
The only reason to do it would be if there's some correctness that depends on it, imho.
pmichaud such as "an array is undefined until something is put into it"
moritz iirc the spec requires this at two points 16:01
one of them is sub f(@a?) { } leaving @a undefined if it's not filled
pmichaud istr there's even an RT ticket with a complex problem that is supposedly solved by undefined aggregate definitions. I'll see if I can find it.
jnthn
.oO( This is not the can of worms I was looking for :/ )
16:02
github.com/rakudo/rakudo/blob/nom/...s.pm#L4482 is the opt I was mentioning, fwiw. 16:04
r: my @a; my $x := @a; $x = (1,2,3); say @a 16:05
p6eval rakudo b3b5f8: OUTPUT«1 2 3␤»
kresike bye folks
16:05 kresike left
jnthn Dunno if the above eval is considered correct 16:05
prn: my @a; my $x := @a; $x = (1,2,3); say @a 16:06
p6eval pugs: OUTPUT«123␤»
..rakudo b3b5f8: OUTPUT«1 2 3␤»
..niecza v24-35-g5c06e28: OUTPUT«Unhandled exception: Writing to readonly scalar␤ at /tmp/j60RB3Iu39 line 1 (mainline @ 4) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4299 (ANON @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4300 (module-CORE @ 583) ␤ at /home/p6eval/niecza/li…
pmichaud note that rakudo still has a scalar binding discrepancy from last summer that has yet to be resolved, also.
(discrepancy with niecza, that is) 16:07
(and niecza's interpretation was deemed 'more correct')
jnthn Note that in my cont branch, we now actually give the same answer as Niecza
Because we don't even attempt the fallback now.
pmichaud just a sec, let me find the other change that we'd have to make from last summer, as it obviously is implicated in these changes also 16:08
jnthn *nod*
16:09 tokuhiro_ joined
pmichaud rn: my @a = 1,2,3; my $s := @a; say $s =:= @a; 16:09
p6eval niecza v24-35-g5c06e28: OUTPUT«False␤»
..rakudo b3b5f8: OUTPUT«True␤»
moritz nr: my @a = 1, 2, 3; my $s := @a; my $cnt; $cnt++ for $s; say $cnt 16:10
p6eval niecza v24-35-g5c06e28: OUTPUT«1␤»
..rakudo b3b5f8: OUTPUT«3␤»
pmichaud niecza is correct here.
jnthn pmichaud: In *both* of the above? 16:11
pmichaud in at least the second one.
16:11 cognominal left
jnthn I struggle to see how to make the second one happening without making the first one happen. 16:11
16:12 cognominal joined
pmichaud iirc, when confronted with my $s := @a, niecza sees that @a isn't a scalar container and therefore makes one for it. 16:12
the interesting case is:
rn: my @a = 1,2,3; my $s := @a; my $t := @a; say $s =:= $t;
p6eval rakudo b3b5f8, niecza v24-35-g5c06e28: OUTPUT«True␤»
pmichaud in other words, $s and $t both end up with the same scalar container
jnthn ...huh.
moritz is baffled 16:13
pmichaud neither of which are @a
jnthn Or =:= is doing magic...
pmichaud rn: my @a = 1,2,3; my $s := @a; my $t := @a; say $s =:= $t;; say $s =:= @a; say $t =:= @a;
p6eval niecza v24-35-g5c06e28: OUTPUT«True␤False␤False␤»
..rakudo b3b5f8: OUTPUT«True␤True␤True␤»
16:14 domidumont left
pmichaud well, the second one could happen if we separated the notion of 'flattening' from 'scalar container'. There's nothing in the spec that yet requires it. 16:15
...except that it then becomes a weirdly syntactic issue.
which is somewhat implied in the notion of "if you see a '$' it doesn't flatten", which is obviously syntactic. 16:16
arnsholt jnthn: Which REPR method should get_number() dispatch to, in your opinion?
jnthn It...shouldn't...
pmichaud shudders at the notion of "get_number"
s/notion/mention/ 16:17
jnthn Parrot confused coercion (a HLL concept) and unboxing (a representation concept) for ages.
pmichaud and also tried to treat "num" as the type that could hold all numeric representations.
arnsholt Right 16:18
16:18 am0c left
jnthn I don't really know how to deal with this too well. 16:18
arnsholt Aha. It's my latest error on the vmarray branch
It's +@array which becomes set $N..., $P... 16:19
Which in turn calls the get_number VTABLE
jnthn Yeah. On the JVM it hits a smart_numify op that is too clever for its own good. 16:20
pmichaud arnsholt: in qrpa, get_number just gets forwarded to elements
jnthn Rakudo doesn't ahve the issue because +@array boils down to a call to .Numeric.
hoelzro when writing an EXPORT for a module, how does one inject values into the calling context? Something with CALLER, I presume?
arnsholt pmichaud: There is that. But now it's a sixmodel object, so the fix is going to impact all sixmodel objects, not only the VMArray stuff 16:22
pmichaud jnthn: so, it sounds like to continue progress on the container branch, we need to flesh out exactly what should happen for binding/assignment of aggregates
jnthn pmichaud: Yes. 16:23
pmichaud jnthn: when shall we do that?
jnthn pmichaud: Well, it's kinda a blocker for this branch :) 16:24
pmichaud: I can look at it now
pmichaud I guess I'm asking "today" versus "tomorrow" :)
jnthn But dunno if you've other stuff you should be doing
Tomorrow I have some $dayjob stuff to attend to. Today I don't. )
pmichaud okay
arnsholt: sorry, I haven't been following VMArray enough to know how that should be. 16:25
arnsholt Oh, right
pmichaud arnsholt: other than to suggest that perhaps +@array should throw an exception, and that the correct nqp code is nqp::elems(@array)
similarly @array + 1 would need to be nqp::elems(@array) + 1 16:26
arnsholt Hmm, that's not a bad idea, methinks
jnthn arnsholt: The problem is messy enough in general that it had made me wonder if I could put of ever having to resolve these issues with the Parrot backend...
*put off
pmichaud right now nqp relies on Parrot's get_number polymorphism to get prefix:<+> and infix:<+> to work on arays.
*arrays
jnthn On NQP JVM, nmumification calls an op called smart_numify 16:27
It basically says, "does this thing have a Numeric method", and if so it calls it.
Otherwise it does a few bits of case analysis.
It's not particularly wonderful.
But for NQP it's sufficient. 16:28
And for Rakudo the problem doesn't exist 'cus everything has a Numeric method :)
arnsholt Right. So it might be just as good to kill off all uses of implicit numification of lists? 16:30
pmichaud jnthn: okay, I think I need a bit more understanding about how the new container stuff should work.
jnthn pmichaud: OK. I'll start off with what is the same. 16:32
STables have a container_spec slot. It's NULL for non-containers (which means non-scalars to date) 16:33
nqp::setcontspec(SomeType, ...) hangs some stuff off container_spec indicating "this type serves as a scalar container"
Before, we always specified enough information to do a decontainerization. However, it was inflexible. You could either (a) specify what attribute held the value, or (b) specify an invokable thing (which handled the Proxy case) 16:34
Now, rather than configuring attributes, or code refs, or whatever, the form is always 16:35
nqp::setcontspec(SomeType, 'some_name', nqp::hash(...))
16:36 census joined
jnthn some_name specifies a kind of container configuration, the hash is optional and is used of the container configuration needs some more info 16:36
16:36 gdey joined, betterwo1ld joined, betterworld left
jnthn For example, Proxy does this: 16:36
nqp::setcontspec(Proxy, 'code_pair', nqp::hash(
'fetch', $PROXY_FETCH,
'store', $PROXY_STORE
));
Rakudo registers its own rakudo_scalar configuration, which just knows about the layout of the Scalar type and pokes the value into he right place, or retrieves it from the right place. It needs no configuration hash. 16:37
(that registration/lookup being done in C land)
Before, the only thing we had that wasn't Rakudo specific was was nqp::decont
However, it was a slow path, 'cus it always went through the attribute lookup. We had a fast-pathed p6decont 16:38
Now, p6decont is gone, and we can hang the fast-path right off the container_spec.
Meaning we save doing any kind of type check there too
There was no generalized notion of assign before. Now there is an nqp::assign op, which boils down to a "is this a container" check and then just STABLE(cont)->container_spec->store(interp, cont, decont_value) 16:39
Thing is, before Rakudo had its own opcode for assigning. 16:40
16:40 domidumont joined
jnthn The bit I'd forgot is that op didn't just check "is this a container" and then did its work. 16:40
It had an "else" there that instead of complaining, said "oh, so does it have a FETCH method"
uh, sorry, STORE.
And called it. In an inferior runloop.
We avoided many of those by the sigil analysis I linked to earlier. 16:41
16:41 census_ joined 16:42 domidumont left, mikemol joined, census left
jnthn That's the story so far, I think. 16:42
pmichaud got it, thinking and researching a bit 16:43
jnthn OK
16:43 census_ left
jnthn I'm trying one possible "easy fix" to see if it's viable in any sense. 16:43
16:43 census joined
pmichaud okay. I'm thinking we're at the point where we need to look at all of these related issues in terms of a unified whole. 16:43
n: my @a; say @a.defined; # curious 16:44
p6eval niecza v24-35-g5c06e28: OUTPUT«True␤»
16:44 kivutar joined
pmichaud n: sub foo(@a?) { say @a.defined }; foo() 16:44
p6eval niecza v24-35-g5c06e28: OUTPUT«True␤»
16:45 domidumont joined
pmichaud I'm trying to find the ticket that wanted @a to be undef 16:48
16:48 cognominal__ joined
nwc10 defined on arrays and hashes turned out to be a bad thing in Perl 5 16:48
pmichaud nwc10: I think it was the fact that they would return to undef status at some point
not that they were initially undefined 16:49
16:49 cognominal left
nwc10 I'm not sure if I'm missing your point, but it got painful once we wanted to change things so that some things were never undef (eg symbol tables) 16:49
geekosaur the problem is that defined on either actually refers to whether there has been memory allocation for the container or not, not whether it has values or not
FROGGS for me @arr+@arr
err
for me @arr.defined is more like +@arr
nwc10 because a bunch of code was assuming that a symbol table you hadn't yet populated was undef
16:50 Celelibi joined
nwc10 is summoned for food 16:50
cognominal__ salut, Celelibi
jnthn pmichaud: rt.perl.org/rt3/Ticket/Display.html?id=64928 maybe 16:52
pmichaud yes, that's it.
let me see if I can enumerate the issues we have 16:54
16:54 rafl joined
pmichaud 1. we need to have a way to distinguish $x and @x, even when bound (:=) to the same object 16:54
2. we need a way of handling array, hash, parcel, and list assignment
3. we need support for Proxy-like objects 16:55
FROGGS .oO( an enum starts with 1 these days? )
pmichaud 4. we may need to have the capability to have @a and %h to be undefined, e.g. as optional parameters
5. our scalar containers need to be able to perform type-checking 16:56
6. including the scalar containers in aggregates such as Array and Hash
any others? 16:57
jnthn I think 5 isn't a problem (we've got that solved), but 6 is (though perhaps more NYI than anything) 16:58
But yes, it's a good summary I think.
I'd maybe add 7. we don't want nested runloops 16:59
pmichaud well, "issues" should be "things that a solution has to accommodate"
jnthn Ah, then in that case yes
on 7 though I'd say maybe Proxy can cope with having 'em, but in general... 17:00
pmichaud is there anywhere other than flattening that having "container" mean "scalar container" is important? 17:01
jnthn The other thing is that we need to be able to pass native things as rw
17:01 SunilJoshi joined
pmichaud 7. pass native things as rw values 17:01
jnthn Which really means taking a reference to them, which is technically doable with a Proxy but we want something more efficient.
pmichaud I'm not entirely comfortable with Proxy, fwiw. 17:02
jnthn But that falls out of the other bits I've been doing so it's not a "new problem"
17:02 chinaXing left
jnthn Well, the way I was planning to do it was to have some notion of reference there 17:03
pmichaud where "it" is...?
17:03 chinaXing joined, chinaXing left
jnthn The "passing native things as rw" 17:04
pmichaud okay
jnthn I can't think of anything other than flattening where that is the case.
pmichaud I think I need to take a short walk to re-orient my head around these things again. 17:05
jnthn ok 17:06
pmichaud I should note that as far as I'm concerned there's nothing locking us into the current way that assignment is handled for lists/arrays/hashes
it's just the way things were
oh
jnthn *nod*
pmichaud 8. handle autovivification on assignment 17:07
jnthn Hm, that's done with the whence thingy today...oh, which is also a nested runloop
pmichaud and there's an issue with that also
whence and proxy seems to me like they're two solutions to the same problem. 17:08
(where there perhaps should be only one really fast solution) 17:09
17:09 mls joined
jnthn Hm, perhaps. 17:09
pmichaud rn: my @x = 1, 2, [3,4,5], 6; for @x[2] { .say } 17:11
p6eval rakudo b3b5f8, niecza v24-35-g5c06e28: OUTPUT«3 4 5␤»
pmichaud okay, taking a walk -- bbi15 17:15
17:25 tokuhiro_ left 17:28 cognominal__ left 17:29 SHODAN joined 17:32 census left 17:33 cognominal joined 17:34 census joined
pmichaud back again 17:36
jnthn wb
pmichaud right now, is there an implicit assumption that any Proxy object won't flatten? 17:37
jnthn It counts as a container, which I think we use to mean "don't flatten" 17:39
pmichaud (since it has its own setcontspec)
hmmm
jnthn But we hardly use Proxy afaik.
checking
pmichaud we use it in Str and Bag and a few places
which I think to be fundamentally wrong -- a code-around for a more correct solution
jnthn Oh, I'm wrong
yeah
Bag, Set, Str, terms
Str for substr-rw 17:40
pmichaud it's either fundamentally wrong and needs a more correct solution, or it's fundamentally right and we should be using it in a lot more places.
jnthn One notable difference between it and the $!whence mechanism is that a $!whence is on a normal scalar, whereas when you use Proxy it's a different container type 17:42
arnsholt jnthn: Oh, this is a fun one. foo(|@a) is broken now
jnthn And we probably want %h<some_key_to_autoviv> to use Scalar
pmichaud well, $!whence is also a coarse approximation of the WHENCE spec 17:43
what we have now are coarse approximations to various pieces of the spec that are likely waiting for implementations to figure out how it should be done
our Proxy is a coarse approximation of the mention of Proxy in S06 :-)
TimToady probably what we should be asking ourselves is whether we really need a separate object, or just some role mixin that can intercept fetches and stores 17:45
17:45 wk left
pmichaud "role mixin that can intercept fetches and stores" implies some way of quickly detecting that there's an intercept, I think. 17:46
jnthn Role mixin to what, exactly?
pmichaud well, in the substr-rw example, it'd be a mixin to a Str value
TimToady to the type of an attribute somehow, is what I was thinkin'
not claiming to be thinking straight... 17:47
TimToady realizes that fetches and stores are kinda subterranean to normal Perl 6 17:48
jnthn pmichaud: Today we've carefully separated out containers and values.
pmichaud except where they appear in the spec as things like C<Proxy> and C<WHENCE> :-)
17:48 kivutar left
jnthn pmichaud: That would seem to confuse them a little I guess. But maybe it's OK for that particular case. 17:49
pmichaud jnthn: I'm not sure what you mean by "separated out containers and values"
jnthn pmichaud: Scalar and Proxy are containers.
Str is a value.
pmichaud yes, but what does that have to do with Proxy, WHENCE, FETCH, etc?
are you saying that we can never STORE to a value? 17:50
jnthn I'm saying that so far as Scalar things go today, we never do.
pmichaud well, in some sense it has an implicit STORE operation
TimToady store is kind of a native concept, where memory cells are containers 17:51
pmichaud what we have for Scalar is an assignment operation that avoids the overhead of finding and invoking a STORE method
PerlJam Am I the only one who wants some hungarian way to distinguish value types and container types?
pmichaud I like the notion of "store as a native concept"
jnthn Yes, that's exactly the thing I've been cleaning up today.
So we can cleanly have additional native concepts like "this native int lexical here" 17:52
PerlJam (or at least some sort of decoration on container types)
TimToady thing is, we have varying abstraction levels of "container", some of which can support dynamic typing, and some of which can't 17:53
natives generally can't
jnthn To me "native concept" feels like REPR level things, where there's no way you should ever be going and calling back into code.
TimToady so any typing information has to ride either with the container/pointer or with the static type system
jnthn But it seems that we need things to be hookable (run this FETCH/STORE) in some cases too. 17:54
pmichaud yes, in that sense Scalar is like int, num, str, etc.
so perhaps it should be "scalar" with a lowercase 's'
in that sense, 'scalar' acts like a native. 17:55
TimToady to me, the 'scalar' is the actual pointer, while the surrounding Scalar provides the extra type info needed to box/unbox 17:56
pmichaud that's possible too.
TimToady but that's just the C programmer coming out in me, I suspect :)
jnthn That bitis kinda how we have it now, apart from we kep the extra type info a level of indirection away
PerlJam TimToady: quick! put it back in before it escapes!
jnthn *keep
TimToady in C, the compiler itself would know the type of the 'scalar'
jnthn Is that kinda what the Container Types bit of S02 is saying? 17:57
pmichaud well, in REPR we know the 'type' of the 'scalar' as well, I think.
17:58 cognominal left, cognominal__ joined
pmichaud TimToady: one quick question that will likely clear a lot of things up.... (apologies if you've answered this before) 17:58
what should happen with:
sub foo(@a?) { say @a } or sub xyz(@b?) { say @b.defined }
where we invoke using foo() and/or xyz() ? 17:59
similarly: my @a; say @a.defined;
18:00 dakkar left
TimToady that probably depends on whether we decide that Nil is a true 'bottom' type, or we stick with (Array) for that purpose 18:01
we haven't yet pushed Nil to be a true bottom
(that is, make it validly the subtype of every other type)
pmichaud can I assume from your answer that the result is undefined, though?
as opposed to being simply a defined-but-empty array?
TimToady certainly .defined should return False
pmichaud okay.
jnthn What about .DEFINITE?
TimToady I'd tend to think that should be false too 18:02
jnthn (Which is really asking, is it that we really have a type object there?)
pmichaud I think he's saying we have either a type object or Nil
but not an Array.
but not an Array:D 18:03
jnthn Well, an Array type object :)
I guess Nil is going to be something we always refer to by its type object...
pmichaud Nil in rakudo is a singleton, yes :)
TimToady r: say Nil ~~ Array
p6eval rakudo b3b5f8: OUTPUT«False␤»
pmichaud r: say Nil.new
p6eval rakudo b3b5f8: OUTPUT«Nil␤»
TimToady that would be true if Nil were truly a bottom type
PerlJam Given pmichaud's subs above, foo(Nil) and xyz(Nil) would be the same as foo() and xyz(), correct? 18:04
pmichaud jnthn: anyway, I think TimToday's answer is indicative that we have to change the way we handle Array declarations
TimToady at the moment we don't ever bind Nil though, by spec, but say that it sets to default (Array) in this case
jnthn pmichaud: Yes, seems so. 18:05
TimToady yes, by current spec binding Nil is supposed to be the same as omitting the argument entirely 18:06
18:06 daxim left
moritz woah, that means we can use it for missing arguments in currying 18:06
jnthn TimToady: um, so you could call an arity-2 thing as foo($a, Nil, $b) ?
TimToady yes, that is part of the intent
jnthn: that is not the intent :) 18:07
jnthn oh, phew
arnsholt jnthn: How do you handle the foo(|@a) thing in NQP/JVM?
jnthn arnsholt: By pulling the things out of the array using the REPR API when I need to flatten. 18:08
TimToady (also, I think an implication of what I'm thinking is that the only way to pass a Nil in as an argument is to bind it to \foo, that is, do no binding work) 18:09
jnthn arnsholt: May be worth seeing how Parrot handles such things; it may be enough to throw "does array does hash" onto the SixModelObject PMC
arnsholt Good point
pmichaud jnthn: okay, so perhaps "my @a;" causes @a to be bound to a Proxy of some sort. 18:10
which then causes the STORE method to come into play
TimToady it needs to be able to spring into existence in a whence-like way,yes
jnthn Does this have semantics along the lines of, a fetch is always a cheap pointer follow, but a store implies a method call? 18:11
I guess it means that Array isn't the thing with the STORE method any more, in that case. 18:12
pmichaud well, it may still be
perhaps in that sense Proxy is more like a role than an object
it's a container that says "if you STORE to me, do it via method"
18:12 cognominal__ left
pmichaud I suppose we can move STORE out of Array, but we'd need to do the same for Hash too 18:13
and List
and Parcel
TimToady has to run some errands, alas...hope you figger it all out while I'm gone... :) 18:14
afk &
jnthn I guess I'm trying to work out if we have lexpad -> container -> Array type object, and the initial STORE replaces the type object with a real array
Is that what you were thinking?
pmichaud it might be an initial $!whence
which is then what the STORE gets invoked on 18:15
that's kinda what happens with array elements now
except the STORE is native instead of a method
jnthn It's native and then has to invoke the $!whence 18:16
Which is icky
pmichaud well, it's a separation of vivification and STORE
18:17 cognominal joined
jnthn Hm, yes. They are different things 18:18
FROGGS TimToady: is there a way to build a ./viv script that shows the STD_P5 parse tree? 18:19
PerlJam jnthn: for natives, could the $!whence be invoked at compile time? 18:20
moritz FROGGS: use viv, and start the input with 'use v5;' ? 18:23
18:25 Chillance joined
moritz though I guess that viv just calls a $someGrammar.parse method at some point 18:25
and if you replace that with the p5 grammar, you're done too
FROGGS: replacing STD->parsefile with STD5->parsefile (and loading it first, of course) you get you going 18:27
18:29 cognominal left
FROGGS moritz: thanks! 18:29
18:34 SunilJoshi left, japhb_ joined 18:37 cognominal joined 18:38 wk joined 18:42 cognominal left 18:47 cognominal joined
pmichaud errands... bbl with more container discusion later 18:53
18:58 fhelmberger left 19:10 stevan_ joined 19:11 cognominal left, Gruber joined 19:19 cognominal joined 19:25 cognominal left 19:33 kivutar joined, cognominal joined 19:35 jferrero joined
dvj topic 19:35
19:44 LlamaRider joined
FROGGS jnthn: is there a trick to localte things like this? Method 'ast' not found for invocant of class 'NQPMu' 19:50
hmmm, can I add a fallback to NQPMu? 19:51
jnthn FROGGS: Normally, the stack trace tells you 19:52
FROGGS I have none
jnthn Huh? 19:53
That error would typically occur inside the actions, though?
FROGGS right 19:54
I get that for: use v5; 1
I've skimmed through all methods which are in use for it but can't see an error
jnthn: this happens within P5Actions btw 19:55
which is a modified copy of Perl6::Actions
jnthn Can always try --trace=4 19:56
Which tells you all the things that get invoked
FROGGS ohh nice
jnthn may be a lot of output 19:57
FROGGS hmmm, I get output for 'use v5;' but not for 'use v5; 1'
timotimo did you try --ll-exception? 19:59
it usually gives me stacktraces
FROGGS timotimo: I'll try in a bit (recompiling) 20:00
20:02 zby_home_ joined
FROGGS Method 'ast' not found for invocant of class 'NQPMu' 20:05
current instr.: 'integer' pc 22479 (src/stage2/gen/NQPHLL.pir:8433) (src/stage2/gen/NQPHLL.pm:742)
timotimo++
timotimo you're welcome :)
FROGGS why do I get stacktraces all the time but not this time?
PerlJam FROGGS: the bug you're twiddling clobbered the stack? :) 20:06
timotimo good question
FROGGS PerlJam: I added about 6k lines of code, no idea what effects this has :o) 20:07
20:08 spider-mario joined 20:12 guest0 joined 20:17 guest0 left 20:22 kivutar left 20:24 cognominal left 20:29 cognominal joined 20:30 kaare_ left 20:41 uasi left 20:44 rindolf left, kurahaupo joined
hoelzro NQP fork update! 20:47
I think this should do it; if this set of changes looks good, I'll push to perl6/nqp
20:55 cognominal left
hoelzro also, new improvements to the pygments lexer! 20:55
\o/
21:01 cognominal joined 21:05 zby_home_ left 21:06 cognominal left
FROGGS hoelzro++ 21:11
so, I can expect to have Perl 6 highlighting on github soon? 21:12
21:12 cognominal joined
hoelzro well, I think I have two issues left before I push it upstream 21:13
token something(@params) doesn't work
and language detection
hopefully the pygments folk accept my changes =)
21:18 aindilis joined 21:22 bruges left 21:23 spider-mario left 21:24 bruges joined 21:33 SmokeMachine left 21:36 cognominal left 21:41 domidumont left 21:42 cognominal joined 21:54 LlamaRider left 22:05 xilo left
dalek atures: 06e7d10 | (Tobias Leich)++ | features.json:
array interpolation is supported too
22:09
hoelzro does multi dispatch of private methods count as a feature? 22:11
dalek kudo/nom: e0ce08f | (Tobias Leich)++ | docs/ROADMAP:
array interpolation is supported now

Even if there are issues like that we're using eval. See irclog.perlgeek.de/perl6/2013-03-11#i_6574722
22:12 colomon joined
FROGGS hoelzro: well, multi dispatch is listed, no? 22:13
hoelzro it is
I didn't know if private dispatch is considered separately
FROGGS I can't imagine a reason to do that 22:14
22:14 PacoAir_ joined
hoelzro ok 22:15
22:16 PacoAir left, PacoAir_ is now known as PacoAir
jnthn The pair don't currently work together 22:16
22:16 xilo joined 22:20 cognominal left
dalek p: 5400ed8 | jnthn++ | / (2 files):
Store REPR data offset in STables data also.

This makes it much easier for anything that wants to try and work out sizing/layout before deserializing objects.
22:26
22:29 cognominal joined, bluescreen10 left 22:45 census left 22:47 PacoAir left
pmichaud release note item: LWP::Simple fails with rakudo master/parrot master 23:11
23:13 benabik left
pmichaud github.com/cosimo/perl6-lwp-simple/issues/20 23:15
23:31 LlamaRider joined 23:37 FROGGS left 23:41 Chillance left
jnthn 'night, #perl6 23:45
colomon \o 23:47
23:49 bbkr joined