»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: irc.perl6.org | UTF-8 is our friend!
Set by masak on 12 May 2015.
skids Uladox: to do that, send a PR to the "perl6/ecosystem" module that adds the base URL to META.list. That PR will provide a place for any feedback during the process of addng the module. 00:07
Uladox Ok, back. Added pull request, thanks 00:12
skids wonders when pmichaud's talk will stop being a "live stream" which won't play, even though it is under "uploads" 00:57
geekosaur considering how often I see that happen with supposed professionals doing it... 01:06
gagalicious sorry discon 01:25
why doesnt this work ... <meta name="description" content="Reliable and affordable my $d_sAT = $p->look_down( _tag => 'meta', 'name' => 'description' ); print $d_sAT->as_text; <-- using HTML::TreeBuilder;
gagalicious wow... this fhelmberger<--- this guy should be banned 01:25
geekosaur forward ban to ##fixyourconnection would seem a good idea 01:26
gagalicious just ban it will be best 01:27
gagalicious can someone ban that guy pls... it's very annoying 01:27
flussence "/ignore #perl6 JOINS PARTS QUITS" works almost as well as the nuclear option... 01:43
tadzik Or weechat smartfilter
tadzik It only shows those events.for people who also spoke in a small interval from the event 01:44
dalek kudo-star-daily: 954ec25 | coke++ | log/ (2 files):
today (automated commit)
02:02
dalek rl6-roast-data: c8f6ed0 | coke++ | / (9 files):
today (automated commit)
02:02
Util gagalicious: It fails because the META tag has no content; nothing inbetween <META></META>, because META closes itself. 02:27
Util It does have an attribute, that is (confusingly) called "content", but that has nothing to do with the HTML concept of Content between tag pairs. 02:28
Util Try: 02:30
print $d_sAT->attr('content');
Util (although, $d_sAT is no longer a appropriate name for that var) 02:31
dalek osystem: 6d3122c | 'Uladox++ | META.list:
Adds Editsrc::Uggedit to META.list

Adds the Editsrc::Uggedit module to the module list. The module is, "The obvious in-source Perl6 based solution to avoid repetion in modifing text by using embedded code with your languages of choice, or just scanning using a perl6 module."
02:44
osystem: cd4614c | (David Warring)++ | META.list:
Merge pull request #47 from Uladox/master

Adds Editsrc::Uggedit to META.list
hoelzro .tell FROGGS I've started some panda work using openpipe3 so the smoker can tell output from warnings: github.com/hoelzro/panda/tree/dont...he-streams 03:31
yoleaux hoelzro: I'll pass your message to FROGGS.
lizmat Q: did we lose .graphs as a method or not? if we did, there appear quite a number of fossils then in the spec 03:58
socializing again&
JimmyZ github.com/perl6/ecosystem/commit/6d3122c264 # this is wrongish... 04:07
zostay m: $h = open('test', :w); $h.print("test\n"); $h.open('test', :r, :bin); $h.get.say; 04:25
camelia rakudo-moar 228168: OUTPUT«5===SORRY!5=== Error while compiling /tmp/RuxFDxHI_i␤Variable '$h' is not declared␤at /tmp/RuxFDxHI_i:1␤------> 3<BOL>7⏏5$h = open('test', :w); $h.print("test\n"␤»
zostay m: my $h = open('test', :w); $h.print("test\n"); $h.open('test', :r, :bin); $h.get.say;
camelia rakudo-moar 228168: OUTPUT«open is disallowed in restricted setting␤ in sub restricted at src/RESTRICTED.setting:1␤ in sub open at src/RESTRICTED.setting:9␤ in block <unit> at /tmp/0zUznqBjdk:1␤␤»
zostay i note that i can open the file in :bin and then use .get to get a Str, what encoding is being used in that case to decode the bytes? 04:26
zostay the default :enc? 04:27
japhb zostay: As far as I can tell diving through the stack (without being super-careful about it), it looks like opening with :bin explicitly does *not* set an encoding, and if you never set an encoding but try to read a string from a file anyway, MoarVM will use utf8. 04:53
moritz IMHO it should explode 05:08
dalek osystem: 9982d6d | skids++ | META.list:
Fix recently added URL
05:13
skids m: sub ud { Any }; my %b := :{ ud() => 1, Any => 2}; %b.perl.say 05:17
camelia rakudo-moar 228168: OUTPUT«Use of uninitialized value of type Any in string context in any p6sort at src/vm/moar/Perl6/Ops.nqp:349␤Hash[Mu,Any].new(Any => 1, "Any" => 2)␤»
RabidGravy marning 06:33
FROGGS mürning
yoleaux 03:31Z <hoelzro> FROGGS: I've started some panda work using openpipe3 so the smoker can tell output from warnings: github.com/hoelzro/panda/tree/dont...he-streams
FROGGS hoelzro++ # branch name :D 06:34
FROGGS hoelzro: can we do the following? get a line from stdout and the get a line from stderr, so that we are able to provide the merged err+out as well as the streams itself? 06:38
tadzik I merged one of your panda PRs, the other I'd like to take a closer look at when I get back to a computer 06:39
tadzik There's plenty of things wrong about revdep, it may need an overhaul of sorts, some of the issues are a bit connected to how panda generally does stuff 06:41
FROGGS tadzik: I commented to the revdep PR 06:43
tadzik I feel like I'm taking crazy pills! 06:48
moritz blue crazy pills or red crazy pills? 06:50
moritz
.oO( an R-B Tree of crazy pills )
06:50
tadzik So far they're grey, before I get to revisit it :) 06:51
FROGGS fhelmberger: ping 06:56
Ven o/, #perl6 07:07
twitter.com/puffnfresh/status/6080...8358927360 <- I should spend some time refining sixcheck. It doesn't integrate as neatly as I'd like it to...
cdc hello #perl6 07:21
cdc m: 0.^methods(:all).sort 07:21
camelia rakudo-moar 228168: OUTPUT«(signal SEGV)Code object coerced to string (please use .gist or .perl to do that) in any p6sort at src/vm/moar/Perl6/Ops.nqp:349␤Code object coerced to string (please use .gist or .perl to do that) in any p6sort at src/vm/moar/Perl6/Ops.nqp:349␤Code …»
cdc SEGV ^
RabidGravy nasty 07:23
wentam So, I wrote some bindings to my graphics engine: github.com/wentam/P6-Graffiks 07:24
wentam how do I get it listed on modules.perl6.org 07:24
FROGGS wentam: create a pul request for this: github.com/perl6/ecosystem/blob/ma.../META.list 07:25
FROGGS pull* 07:25
RabidGravy cdc, looks like a stack overflow 07:26
FROGGS wentam: or you tell me your github id, and I'll add you to the perl6 team, which lets you push to the ecosystem repository directly 07:26
RabidGravy cdc, valgrind say "Access not within mapped region at address 0x0" 07:27
wentam FROGGS, github.com/wentam/ 07:27
FROGGS wentam: invitation sent 07:28
wentam FROGGS, so now I just push my meta.info to that file? 07:28
FROGGS wentam: no 07:29
wentam I mean, the raw url to it 07:29
FROGGS go to your repo, click on your META.info, click on raw 07:29
wentam yeah, that's what I meant
FROGGS and copy that url to the meta list
wentam alrighty, tyvm
FROGGS it should look like the others
FROGGS wentam: are you related to retupmoca? 07:30
RabidGravy wentam, I would suggest doing "panda install ." in the source directory to check that panda understands your META.info if you didn't already do that
dalek osystem: 0242d1a | (Matt Egeler)++ | META.list:
Add Graffiks bindings to META.list
07:31
wentam FROGGS, yes, he's my brother
wentam github.com/perl6/ecosystem/commit/...e012d4184c 07:31
RabidGravy, oohh, good idea
FROGGS Egeler++ then :o)
wentam: your META.info is invalid JSON
wentam RabidGravy, should have said that slightly earier, it doesn't work :P 07:32
FROGGS wentam: you are missing commas
wentam oopsies 07:32
FROGGS I'll PR
wentam I already got it fixed
RabidGravy I have added one and realised I'd cocked up the META.info every time
RabidGravy maybe a "validate-meta" command for panda at some point 07:33
FROGGS wentam++
cdc RabidGravy: I've submitted RT #125365 07:34
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=125365
wentam I assume that modules list updates periodically, so it will appear after a while?
FROGGS wentam: every hours IIRC 07:35
FROGGS hour* 07:35
wentam rgr
moritz I can trigger a manual rebuild 07:35
moritz if anybody else wants to have that power, give me your ssh pubkey :-) 07:36
moritz ok, it takes less than a minute; I guess I can run it more often 07:37
FROGGS (more often)++
moritz 8,28,48 * * * * bash update.sh > update.log 2>&1 07:37
raw.githubusercontent.com/carbin/p.../META.info 404 07:38
dalek osystem: 88785dc | moritz++ | META.list:
Remove reference to repo that has gone pining for the fjords
07:39
RabidGravy moritz, any value in putting a github webhook on that (to trigger the rebuild) 07:40
moritz RabidGravy: not much; most changes are in the META.info files of the individual repos, not to the ecosystem repo itself 07:40
RabidGravy true 07:41
moritz RabidGravy: tough it might be nice to parallelize update.pl in the ecosystem repo a bit 07:41
it does mostly https request 07:42
RabidGravy poor fhelmberger 07:45
RabidGravy cdc, just added the gdb and valgrind to that RT 07:45
cdc thanks ! 07:46
breinbaas why don't you guys kick fhelmberger? his behavior makes it difficult to follow what goes on in this chennel 08:04
wentam It just links to the github homepage for Graffiks on the modules page, is my source-url wrong? github.com/wentam/P6-Graffiks/blob.../META.info 08:05
dalek c: a60ba58 | RabidGravy++ | WANTED:
Correct the spelling of Synatax
wentam I just used the checkout url github provides 08:05
FROGGS wentam: click on 'raw', and use that url 08:08
ahh wait
wentam I mean in meta.info
FROGGS misunderstood
FROGGS your source url might want to be github.com/wentam/Graffiks.git 08:09
wentam I'll try it 08:09
dalek c: 4edf556 | RabidGravy++ | lib/Language/variables.pod:
Add $*SPEC to variables
08:10
RabidGravy I know there was a small amount of doubt expressed as to whether that should stay but if it goes it can be removed again ;-) 08:11
dalek c: 0f60edd | paultcochrane++ | / (2 files):
Document substr-rw
08:14
jnthn morning, #perl6 08:26
FROGGS morning jnthn 08:27
RabidGravy erp 08:28
wentam FROGGS, yup, adding .git to the end fixed it 08:30
FROGGS wentam: there is a textbox on the right on this page, where you can copy from: github.com/wentam/Graffiks 08:32
wentam yeah, that's "github.com/wentam/Graffiks" 08:32
wentam doesn't have .git on the end there 08:33
wentam although 08:34
github.com/wentam/P6-Graffiks/comm...96a99625e3
that was half the problem
or perhaps all of it
dalek ake: 2a05e1b | arnsholt++ | src/Snake/Metamodel/ClassHOW.nqp:
Add forgotten change for previous commit.
08:36
snake: 81db926 | arnsholt++ | src/setting/builtins.py:
snake: Simple first implementation of isinstance().
arnsholt dalek: Sorry! =) 08:37
botsnack
synbot6 om nom nom
arnsholt Oops, wrong bot. Oh well
jnthn synbot6 noms all the snacks 08:38
jnthn
.oO( Dining bots problem )
08:39
dalek c: b2d6863 | RabidGravy++ | lib/Type/IO/Path.pod:
Missing colons after invocant type in signatures
08:44
c: 744bf16 | RabidGravy++ | / (2 files):
Merge branch 'master' of github.com:perl6/doc
_itz /last youtube 08:45
_itz oops 08:45
RabidGravy _itz, are you still working at that place? 08:47
_itz no I walked out because I wanted to do something more interesting 08:48
RabidGravy _itz++
_itz 3 years in a bank is enough :)
RabidGravy yeah 5 years ruined me 08:48
jnthn I talked to bank recruiters at the compsci career fair some years back and 5 minutes talking to them was enough of the bank industry for me. :-) 08:50
nwc10 _itz: any plans on how to spend your ill gotten gains?
nwc10 ("CFT" ?) 08:50
duetting with RabidGravy? 08:51
_itz playing with perl6 08:51
[ptc] _itz++
yoleaux 8 Jun 2015 23:43Z <japhb> [ptc]: Re: specs commit 5557888, I don't think the original meant "can be aliased also", I think it meant "can be the target of an alias", so the 'to' would be correct (though I recognize it's confusing wording all around)
nwc10 yay
"right answer" :-)
[ptc] _itz: ok, I'll look at the wording of the specs again and see if I can make it clearer 08:52
dalek ecs: 939451c | paultcochrane++ | S32-setting-library/Str.pod:
Add an initial string so that the code example runs
08:53
RabidGravy :) I can definitely say I have used my CFT more for ruining software than I have making music, I did a small drum loop for Laica last week but have significantly upped my github stats 08:53
RabidGravy In music/programming crossover I discussed with Robin Gareus the possibility of making silan a shared library so I can make a P6 binding 08:55
dalek ecs: b4b49fc | paultcochrane++ | S32-setting-library/Str.pod:
Improve wording about substr-rw aliasing

Thanks to itz++ for pointing out the sentence's meaning.
08:57
_itz that wasn't actually me! 08:57
[ptc] _itz: you're right, bugger. I misread 09:22
the line
[ptc] ... and obviously can't type anymore 09:22
[ptc] japhb++ # for pointing out the correct meaning about aliasing (and sorry for not mentioning you correctly in the commit!) 09:23
RabidGravy has anyone done anything like "Alien" to assist in working with thirdparty libraries/applications that may need to be installed? 09:50
FROGGS RabidGravy: for P5, yes 09:56
RabidGravy er, for P6 the P5 one was what I meant by "like Alien" ;-p 09:57
RabidGravy anyway just off out for a bit 09:57
Ven Wow. I just learned that Perl6 allowed to resume exeptions o_o 10:15
Ven that's totally amazing. brrt++ 10:16
Ven (yes, many people will say "lisp had that 30 years ago". I'm still happy :P) 10:22
ab6tract .tell moritz thanks for the github org invite! should I also be filling in some paperwork for TPF? 10:40
yoleaux ab6tract: I'll pass your message to moritz.
Ven ab6tract: I think it's only for moar? 10:42
ab6tract Ven: the paperwork? 10:44
Ven ab6tract: yes. maybe also for nqp?
jnthn The paperwork is for Rakudo 10:44
ab6tract I thought it was for all the perl6/ repos... so rakudo is not under TPF?
Ven ah, it's for rakudo
ab6tract ok, thanks for clearing up jnthn
Ven well, considering the number of PRs you sent, someone would've asked you sooner ab6tract :P
ab6tract Ven: having trouble parsing whether that was a jab or not :P 10:45
Ven ab6tract: not sure what a "jab" is :) 10:46
ab6tract Ven: 'diss'? 'smack talk'? not sure what the kids are calling it these days ;)
Ven ab6tract: would it be better if I had wrote ab6tract++ (as meant) there? :) 10:46
ab6tract :) 10:47
it's usually the :P that throws me off
ab6tract thanks for clarifying :) 10:47
ab6tract ahh, if nothing else fhelmberger has successfully taught me how to disable part/join messages in two separate clients 10:52
jnthn I was too lazy and just did /ignore :P 10:53
nwc10 we've *just* bothered to get ops on #austria.pm and (try to) ban it 10:53
nwc10 if we knew where he lived... 10:54
nwc10 OK, less than 5ms from here 10:55
less than 1.8ms from our colo
nwc10 actually, that's the hop before 10:56
[ptc] nwc10: you're in .at, you could drop in and say gudday ;-) 10:59
nwc10 [ptc]: "if we knew where he lived..." 10:59
also, I don't want to get arrested
[ptc] true :-)
nwc10 well, I'd go round and deliver a postcard or something 11:00
tadzik One for each join, one for each part 11:00
nwc10 [ptc]: my suspicion is that he's only a few km from me 11:00
tadzik: my arms would fall off 11:01
[ptc] nwc10: well, .at isn't that big :-P 11:01
nwc10 reverse DNS suggests that he's in vienna
jnthn well darn it 11:01
After that wild goose chase...it turns out that I do still have a regression thanks to my fix...and it *is* specific to the JIT 11:02
nwc10 there was a real goose at the end of your chase 11:02
nwc10 so, seems "2 real bugs" 11:02
1 of which is splaatted?
jnthn Something like 11:09
jnthn I'm guessing the JIT badly handles...something. I don't know what yet. 11:10
smls moritz: doc.perl6.org/type-basic.html <-- something broke? 11:10
[ptc] smls: that problem has been around for a while now (a couple of weeks or so) 11:13
[ptc] smls: no idea what's causing it, and the issue seems to be buried deep down in how htmlify.p6 is doing its processing 11:14
[ptc] smls: doc.perl6.org/type.html still works though 11:14
smls right
[ptc] interesting... I just turned off the JIT and now panda segfaults when bootstrapping 11:21
jnthn [ptc]: Almost certainly fixed in MoarVM HEAD 11:22
[ptc] jnthn: I'm building with --gen-moar so thought I was using HEAD. I'll merge the latest Rakudo HEAD and see if that helps 11:24
jnthn [ptc]: Thta uses the MOAR_REVISION/NQP_REVISION 11:26
Which I didn't bump yet
arnsholt --gen-moar=master might work? 11:27
[ptc] you're right it's not head 11:28
would --gen-moar=HEAD work?
jnthn What arnsholt said, I think 11:30
[ptc] just trying it with =HEAD and it pulled in master, which seems logical
although =master is probably the better way to do it 11:31
[ptc] thanks jnthn++, panda works again with moar HEAD and without jit 11:35
[ptc] although DBIish still gives the "Cannot invoke null object" error with a JIT-less moar 11:36
jnthn And with JIT? 11:37
[ptc] hang on a tick 11:38
[ptc] rebuilds moar/nqp/rakudo 11:38
Ven will present perl6 at a "in-school meetup" tomorrow 11:44
[ptc] jnthn: barfs with the same error with and without JIT
Ven task: building a "tv show episodes classifier" in perl6 (cli) 11:45
FROGGS Ven++ 11:50
smls Perl 6 feature idea of the day: Let .deepmap and .duckmap check the callback's signature (like .sort does), and if it allows more than one argument, pass the full path of indices+value at the current iteration! 11:58
So that this:
smls {foo=>[10, 20], bar => 30}.deepmap(-> *@_ { dd @_ }) 11:58
Would print:
('foo', 0, 10)
('foo', 1, 20)
('bar', 30)
smls Or maybe it should be controlled by a :path adverb and not the signature. 11:59
But in any case, I think it would be useful.
Ven m: { my $x = "a"; say $x; die 1 if True; say $x; CATCH { default { $x++; $_.resume; } } }; say 1; 12:03
camelia rakudo-moar 228168: OUTPUT«a␤b␤1␤»
dalek p: e8bb160 | jnthn++ | tools/build/MOAR_REVISION:
Bump MOAR_REVISION.

Gets us numerous fixes, mostly related to exceptions and optimization.
12:08
FROGGS \o/
dalek kudo/nom: 2aad0b2 | jnthn++ | tools/build/NQP_REVISION:
Bump NQP_REVISION for updated MoarVM.

This bump includes a resolution for RT #124191.
12:09
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=124191
dalek ast: 3b3af27 | jnthn++ | S04-exception-handlers/catch.t:
Test for RT #124191.
12:10
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=124191
smls is skeptical about resumable exceptions 12:11
smls Aren't they, by definition, action at a distance? 12:11
joe6780 hello 12:13
jnthn smls: The place you're most likely to actually take advantage of them is with warnings. 12:13
smls: Which are implemented as resumable exceptions.
jnthn lunch time & 12:14
smls
.oO( Code A: Welp, I can't continue with this state, the only safe thing is to bail out. Code B: I don't know what things actually look like at A, but whatever, I'll just force it to continue! *evil laughter*)
12:14
Ven smls: they're in lexical scope of the "try" block
Ven do you consider exceptions action-at-a-distance? resumable exceptions have the same distance 12:15
smls I suppose with warnings it should be safe 12:15
Ven smls: I'd recommend reading c2.com/cgi/wiki?CommonLispConditionSystem, it's *really* interesting
smls ok
_itz can anyone actually login to www.sicpdistilled.com (which looks interesting) or is the github auth broken just for me? 12:18
sue_ I see the big green 'authorize application' button 12:27
sue_ do you get that far, or must i authorize this unknown thing to finish the test? 12:27
Ven _itz: confirm it's broken
sue_ looks unfinished 12:28
psch hi #perl6 o/ 12:29
i just had to learn how to change my ssh keyfile password
psch ...'cause having my old one in hacks login log won't do 12:30
that's what i get for trying to use putty i guess
_itz thanks 12:35
psch hm, skimming through the clog there was something about .class and .jar files from p6 programs 12:43
psch i wonder if that's for something like standalone jar executables 12:43
psch i think i'll try and see if i get that working, anyway 12:44
i've been gone too long to dive right back into MOP stuff :s
smls sub list-substract (@a, @b) { my %b := set @b; @a.grep({ !%b{$_} }) } 12:46
smls masak: ^^this is what I use for "set difference, but preserving order" 12:46
smls Seems to be both shorter and faster than the Hash-based solutions posted to your "mini-challenge" two weeks ago, not to mention it can handle arbitrary objects. 12:48
FROGGS hi psch 12:54
psch hey FROGGS 12:55
colomon sub list-substract (@a, @b) { @a.grep(* ∉ @b ) }; # shorter but probably slower 12:58
m: sub list-substract (@a, @b) { @a.grep(* ∉ @b ) }; say list-subtract(<a b c>, <b d e>) # shorter but probably slower
camelia rakudo-moar 2aad0b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/q1nrf7p5nu␤Undeclared routine:␤ list-subtract used at line 1. Did you mean 'list-substract'?␤␤»
colomon m: sub list-subtract (@a, @b) { @a.grep(* ∉ @b ) }; say list-subtract(<a b c>, <b d e>) # shorter but probably slower 12:59
camelia rakudo-moar 2aad0b: OUTPUT«a c␤»
Ven m: my @a = <a b c>; my @b = <b d e>; say @a (-) @b; 13:00
camelia rakudo-moar 2aad0b: OUTPUT«set(a, c)␤»
Ven m: my @a = <a b c>; my @b = <b d e>; say list @a (-) @b;
camelia rakudo-moar 2aad0b: OUTPUT«set(a, c)␤»
andreoss m: my $x = "a" x 100; say $x ~~ /a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ 13:01
dalek osystem: 915ea34 | hoelzro++ | META.list:
Add PriorityQueue to module listing
13:01
camelia rakudo-moar 2aad0b: OUTPUT«(timeout)»
Ven m: my $x = "a" x 100; say $x ~~ /:r a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ 13:02
camelia rakudo-moar 2aad0b: OUTPUT«Nil␤»
andreoss Ven: but it should be "a" x 100 13:04
Ven m: my $x = "a" x 100; say $x ~~ m:r/a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ 13:05
camelia rakudo-moar 2aad0b: OUTPUT«False␤»
JimmyZ hoelzro: github.com/perl6/ecosystem/commit/915ea34e3d # is wrongish :P 13:06
jnthn ? is greedy, so with :r it'll never let go of the a
andreoss swtch.com/~rsc/regexp/regexp1.html 13:07
jnthn heh, I've seen that link so many times I don't even need to follow it any more :P 13:08
jnthn m: 0.^methods(:all).sort 13:12
camelia rakudo-moar 2aad0b: OUTPUT«Code object coerced to string (please use .gist or .perl to do that) in any p6sort at src/vm/moar/Perl6/Ops.nqp:349␤Code object coerced to string (please use .gist or .perl to do that) in any p6sort at src/vm/moar/Perl6/Ops.nqp:349␤Code object coerce…»
jnthn Wonder if the SEGV on that was one of those I fixed this morning... 13:12
jnthn RabidGravy: When you get chance, please could you check if ^^ no longer SEGVs on HEAD? 13:13
Locally and on evalbot it seems fine
moritz 13:16
yoleaux 10:40Z <ab6tract> moritz: thanks for the github org invite! should I also be filling in some paperwork for TPF?
moritz ab5tract: are you ab6tract? :-)
no extra paperwork required
RabidGravy jnthn: HEAD of rakudo? or moar? 13:18
jnthn RabidGravy: Rakudo; I bumped MOAR_REVISION/NQP_REVISION already for the patches in questoin. 13:20
*question
RabidGravy cool, 'ang on then 13:20
andreoss % time perl6 -e 'my $x = "a" x 30; say $x ~~ /a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/' 13:21
real6m46.970s
% time perl -E 'my $x = "a" x 30; say $x =~ /a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/'
real1m19.497s
_itz how do I link moar with -g ? 13:21
timotimo _itz: --debug=3 should put the -g into the LDFLAGS as well 13:22
in the Configure.pl invocation
_itz ah ty
dalek osystem: 874a21f | (Matt Egeler)++ | META.list:
Remove duplicate item in META.list
13:24
ugexe my $sock = IO::Socket::INET.new(:host<httpbin.org>, :port(80)); $sock.send("GET /status/200 HTTP/1.1\r\nHost: httpbin.org\r\n\r\n"); $sock.input-line-separator = "\r\n\r\n"; say $sock.get().perl # input-line-separator getting tripped up? seems to do something like match the line-separator, but returns the entire line while only removing $input-line-separator.chars[*-1] instead of $input-line-separator? 13:32
ugexe if $input-line-separator = 'TT' (to match the starting "HTTP") the first line returned is 'HT'. if $input-line-separator = 'T' the first line returned is 'H' 13:34
RabidGravy jnthn++, confirmed that no longer segfaults. Obviously the example was bogus, but hey ;-) 13:35
RabidGravy cdc: by the way what you really wanted was 13:41
m: say 0.^methods(:all).sort({ $^a.gist cmp $^b.gist })
camelia rakudo-moar 2aad0b: OUTPUT«ACCEPTS ACCEPTS ACCEPTS BUILDALL BUILD_LEAST_DERIVED Bool Bool Bridge CREATE Capture Complex DUMP DUMP DUMP-OBJECT-ATTRS DUMP-PIECES EVAL FOR FatRat IO Int Int Method+{<anon>}.new Method+{<anon>}.new Method+{<anon>}.new Method+{<anon>}.new Method+{<anon>}.…»
RabidGravy with some extra thing to remove the anon methods
jnthn m: say 0.^methods(:all).sort(*.name) # or this?
camelia rakudo-moar 2aad0b: OUTPUT«ACCEPTS ACCEPTS ACCEPTS Method+{<anon>}.new Method+{<anon>}.new Method+{<anon>}.new Method+{<anon>}.new Method+{<anon>}.new Method+{<anon>}.new BUILDALL BUILD_LEAST_DERIVED Method+{<anon>}.new Method+{<anon>}.new Bool Bool Bridge CREATE Capture Complex Met…»
RabidGravy or that 13:42
timotimo maybe a .unique :P
colomon Ven: set difference is shorter, but it’s also not order preserving 13:43
PerlJam m: say 0.^methods(:all).sort(*.name).unique;
camelia rakudo-moar 2aad0b: OUTPUT«ACCEPTS ACCEPTS ACCEPTS Method+{<anon>}.new Method+{<anon>}.new Method+{<anon>}.new Method+{<anon>}.new Method+{<anon>}.new Method+{<anon>}.new BUILDALL BUILD_LEAST_DERIVED Method+{<anon>}.new Method+{<anon>}.new Bool Bool Bridge CREATE Capture Complex Met…»
colomon m: sub list-subtract (@a, @b) { @a.grep(* ∉ @b ) }; say list-subtract(<c b a>, <b d e>)
camelia rakudo-moar 2aad0b: OUTPUT«c a␤»
colomon m: sub list-subtract (@a, @b) { @a.grep(* ∉ @b ) }; say @a (-) @b
camelia rakudo-moar 2aad0b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/F5ChBulsqc␤Variable '@a' is not declared␤at /tmp/F5ChBulsqc:1␤------> 3ract (@a, @b) { @a.grep(* ∉ @b ) }; say 7⏏5@a (-) @b␤»
colomon m: sub list-subtract (@a, @b) { @a - @b }; say list-subtract(<c b a>, <b d e>) 13:44
camelia rakudo-moar 2aad0b: OUTPUT«0␤»
colomon m: sub list-subtract (@a, @b) { @a (-) @b }; say list-subtract(<c b a>, <b d e>)
camelia rakudo-moar 2aad0b: OUTPUT«set(a, c)␤»
Ven Fox news talks about github... ouch... www.youtube.com/watch?v=k2vJNNAQZlg 13:51
timotimo hahaha, yeah 13:52
that video is so excellently bizzare
just imagine ... they probably make this kind of mistake in many circumstances
psch uhhh 13:53
PR before fork?
wow
Ven I think fox news is pretty well known for being terrible in the US, right?
psch yeah timotimo, that's scary
timotimo i think everybody knows, but a gigantic amount of people still watch them and take them seriously 13:54
nwc10 faux news striks again? 13:55
_itz "reposotory" 13:57
hoelzro o/ #perl6 14:03
JimmyZ: good catch; I don't know how that line got repeated =/ 14:04
.tell FROGGS I would like to do that; I just wanted to get the basics done
yoleaux hoelzro: I'll pass your message to FROGGS.
[Coke] bummer; pmichaud's talk is now not streaming, but is cut off at the end.
Ven _itz: they write it correctly at the very end! 14:07
ugexe perl-j (so probably nqp-j?) seems to do the more correct thing (re: multi character input line separators) for nqp::setinputlinesep 14:16
smls jnthn: Is it safe for one thread to assign a value to an rw attribute of an object, while another thread pushes that same object to a List/Array (but doesn't look at its attributes)? 14:32
jnthn smls: Should be 14:33
smls ok 14:34
jnthn smls: Pushing to the same list from two threads will get you trouble though
smls yeah
jnthn smls: Also, I'm currently trudging through a bunch of places we hve broken code-gen that accidentally ends up insufficient cloning of blocks
*have
smls: Which leads to some things seeing the wrong lexicals 14:35
nwc10 this is MoarVM specific, or cross VM?
jnthn Cross VM 14:36
lizmat good *, #perl6 14:40
only caught on with backlog of today
day #2 of YAPC::NA to begin soon
psch hi lizmat o/ 14:40
lizmat psch o/
hoelzro o/ lizmat 14:41
lizmat hoelzro \o 14:42
pmichaud Important GLR-related design question 14:43
lizmat pmichaud o/
pmichaud (may have already been discussed on-channel)
pmichaud since post-GLR we will only have two places that do flattening, should 14:44
TimToady don't ask to ask :)
pmichaud my $list = (1,2,3); for $list { .say }
TimToady actually, that was a topicalization, so acceptable :)
pmichaud produce three iterations?
(I vote yes)
timotimo in my understanding: no
wait, for becomes the flattening thing? 14:45
pmichaud in this formulation, for $list { .say } becomes isomorphic with $list.map: { .say }
still no flattening taking place 14:46
pmichaud (since any nested lists inside of $list aren't flattened out) 14:46
this would eliminate a lot of for $xyz.list { ... } formulations
smls Wouldn't that break $ sigils as an indicator for non-flattening though? 14:47
TimToady this has nothing to do with flattening
pmichaud no, but there's no flattening here.
timotimo mhm
smls $xyz.list can be written as @$xyz
TimToady it's "when do I access the list nature of the argument?"
pmichaud smls: yes, but why are we forcing people to write @$xyz in the first place?
previously this was so that something like 14:48
pmichaud for ($a, @b, $c) { ... } would flatten @b but not $a nor $c.... but 'for' no longer flattens, so why do we need to make the scalar distinction? 14:48
TimToady I think I'm +1 on this now, though I used to not be 14:50
pmichaud TimToady: yeah, I'm the same way. It's especially telling after seeing some of rjbs++ code yesterday :)
I just no longer see any case where for $scalar { ... } shouldn't automatically access $scalar's list nature, or treat it as an iteration of one element. 14:51
s/or treat/versus treat/
TimToady and that's the basic distinction between for and given now
timotimo t/spec/S03-metaops/hyper.rakudo.moar .......................... No subtests run
pmichaud exactly
timotimo is that my problem?
pmichaud I think a lot of other uses of .list disappear, and we don't have to worry about item-versus-list context nearly so much. 14:52
cdc RabidGravy, jnthn: many thanks for the fix and for the suggestion ("0.^methods(:all).sort(*.name)")!
pmichaud ("we" being "programmers" here)
TimToady interestingly, 'for flat $foo' is still a single iteration 14:53
pmichaud yes.
TimToady heading downstairs &
pmichaud I'll be heading that way also soon
jnthn timotimo: Context? :) 14:53
timotimo jnthn: the question should probably have been "does anybody else see this output?"
i'll take this back to #moarvm 14:54
smls m: my $x = (2, 4, 6); sub a(**@a) { dd @a }; a $x 14:59
camelia rakudo-moar 2aad0b: OUTPUT«(2, 4, 6)␤»
smls So I guess loops will parse their headers like a **@ slurpy?
That's at least consistent, I guess 15:00
PerlJam hopes that pmichaud and TimToady can explain themselves to the simple folk like myself at some point.
smls (though of course from a P5 perspective, it's sacrilegious :P)
lizmat also heads downstairs 15:01
dalek kudo/nom: 636bd32 | jnthn++ | src/Perl6/Actions.nqp:
Fix insufficient cloning in given/when/default.

This could lead to lexicals bleeding between threads.
15:07
kudo/nom: 70abc0b | jnthn++ | src/Perl6/Actions.nqp:
Must clone then p6capturelex.

Otherwise it's a race condition. This is the only place I spotted this bug; the other places seem to get it right.
hoelzro TIL "[] xx 4" DWIM 15:08
jnthn++
timotimo oh, this could have been what caused problems when i used regexes across threads 15:09
where i had to build my own $/ to make it not explode (though i'm not 100% sure that was enough)
hoelzro I did not know that xx auto-thunked the LHS 15:12
jnthn It does, so it'll DWYM :) 15:12
TimToady PerlJam: it's easy to explain to a P5 programmer, if one can make the P5 programmer realize that P5's 'for' is P6's 'for flat'
hoelzro jnthn: I actually had to try that example in your RT response =) 15:13
TimToady but for itself really just takes two arguments, one of which produces a list, and other of which is a closure
timotimo we even have an optimization in place that doesn't thunk if the LHS is "simple"
hoelzro timotimo: I saw that bit =)
I'm not sure if it's good or bad that Perl 6 still surprises me =P
this surprise is *definitely* welcome, though
jnthn hoelzro: Found the given/when bugs while looking into you RT #125346
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=125346
jnthn hoelzro: It gets things righter now but...still occasionally wrong. :/
timotimo made very famous by python's implementation of default function values :) 15:14
hoelzro jnthn: I saw that; interesting how that works
thanks for digging in
jnthn Yeah, the case in the ticket is fixed now
hoelzro oh, wow
jnthn Uh
PerlJam TimToady: I was having some agita from "for $list { }" being three iterations and "for flat $foo {}" being one iteration thinking that $foo and $list were meant to be the same.
jnthn the case I golfed it to
hoelzro ahhh
jnthn So there's someting else going on still
Your original is right most of the time rather than occasionally for me after this fix 15:15
hoelzro I'm just cleaning out stale branches and uncommitted tests @ home, so I don't expect most of this to get fixed right away =)
jnthn But still ends up with one promise Planned some of the time...
dalek ecs: ef4b8b7 | lizmat++ | S (4 files):
Remove .graphs fossils
15:30
ab6tract moritz: yup, ab6tract is my nick for the webchat 15:53
m: my %x = x => 8, y => 9, z => 8; my %r = %x.invert.unique; %r.say; 15:54
camelia rakudo-moar 70abc0: OUTPUT«8 => z, 9 => y␤»
ab6tract m: my %x = x => 8, y => 9, z => 8; (my %r).push: %x.invert.unique; %r.say;
camelia rakudo-moar 70abc0: OUTPUT«8 => x z, 9 => y␤»
ab6tract This makes sense to me conceptually, but I would love to read a deeper explanation of what is actually happening there. I guess it treats the values of %r as arrays and pushes onto them? 15:56
timotimo yeah, push on a hash will turn values into lists if the same key is encountered multiple times
pmichaud PerlJam: I would expect that my $list = 1,2,3; for flat $list { ... }; will still be one iteration 15:57
moritz too
pmichaud more concretely: for flat $a, @b, $c { ... } produces @b.elems+2 iterations, even if $a and $c are iterables 15:58
the real conclusion I was hoping to reach (and did) is that for <mumble> { ... } basically desugars to <mumble>.map({ ... }) 15:59
that should be easy enough for simple folk :) 16:01
smls will take some getting used to, but yeah, it's consistent. 16:02
smls (though I didn't mind the flattening `for` either.) 16:03
timotimo that's flattering
smls :P 16:04
pmichaud what really happens is that a lot of places where people were doing @(...) or .list can disappear, I think.
smls Alright, so an undefined value will happily propagate through a postscripting chain, but as soon as it hits a method call, it blows up: 16:08
m: my %x; say %x<foo>.<bar>.[4]; say %x<foo>.<bar>.[4].lc
camelia rakudo-moar 70abc0: OUTPUT«(Any)␤Method 'lc' not found for invocant of class 'Any'␤ in block <unit> at /tmp/uHu7Ex_n9a:1␤␤»
smls Do we have some way to say "only call this method if the invocant id defined; otherwise return the invocant directly"?
pmichaud m: my %x; say %x<foo>.?lc 16:09
camelia rakudo-moar 70abc0: OUTPUT«Nil␤»
timotimo m: my %x; %x<foo>.<bar>.[5] = 5; say %x
camelia rakudo-moar 70abc0: OUTPUT«foo => bar => (Any) (Any) (Any) (Any) (Any) 5␤»
pmichaud hmm, not that.
timotimo ^- this is why
smls Maybe && as metaop akin to the = metaop would be useful? As in $foo&&.method 16:10
Although, that looks kinda messy :P
timotimo m: my %x; say %x<foo>.<bar>.[4]; say %x<foo>.<bar>.[4] andthen .lc 16:11
camelia rakudo-moar 70abc0: OUTPUT«(Any)␤(Any)␤Method 'lc' not found for invocant of class 'Any'␤ in block <unit> at /tmp/7j1c0TFhUH:1␤␤»
timotimo m: my %x; say %x<foo>.<bar>.[4]; say %x<foo>.<bar>.[4] andthen .perl.say
camelia rakudo-moar 70abc0: OUTPUT«(Any)␤(Any)␤Any␤»
timotimo m: my %x; say %x<foo>.<bar>.[4]; say %x<foo>.<bar>.[4] andthen *.say
camelia rakudo-moar 70abc0: OUTPUT«(Any)␤(Any)␤True␤»
timotimo m: my %x; say %x<foo>.<bar>.[4]; say (%x<foo>.<bar>.[4] andthen .lc)
camelia rakudo-moar 70abc0: OUTPUT«(Any)␤(Any)␤»
timotimo m: my %x; say %x<foo>.<bar>.[4]; say (%x<foo>.<bar>.[4] andthen "ooooh" orelse "noooo!")
camelia rakudo-moar 70abc0: OUTPUT«(Any)␤noooo!␤»
smls nice 16:12
timotimo andthen has extremely low precedence
that has to be kept in mind
tony-o_ m: .say for 1...Inf 16:24
camelia rakudo-moar 70abc0: OUTPUT«(timeout)1␤2␤3␤4␤5␤6␤7␤8␤9␤10␤11␤12␤13␤14␤15␤16␤17␤18␤19␤20␤21␤22␤23␤24␤25␤26␤27␤28␤29␤30␤31␤32␤33␤34␤35␤36␤37␤38␤39␤40␤41␤42␤43␤44␤45␤46␤47␤48␤49␤50␤51␤5…»
lizmat m: my $a; say $a.?foo 16:25
camelia rakudo-moar 70abc0: OUTPUT«Nil␤»
lizmat this is assuming that Any doesn't have a foo method
m: my $a; say $a.?Int 16:26
camelia rakudo-moar 70abc0: OUTPUT«Nil␤»
lizmat m: my $a; say $a.?keys
camelia rakudo-moar 70abc0: OUTPUT«␤»
RabidGravy ooh 16:27
like
dalek c: 16c4d0c | pmichaud++ | lib/Language/operators.pod:
Add note about topicalizing rhs for infix:<andthen>.
16:29
RabidGravy lizmat, is that short cutting $a.defined && $a.can('foo') && $a.foo ? or just partially 16:33
pmichaud RabidGravy: $a.?foo returns Nil if $a doesn't have a 'foo' method. It doesn't check definedness of $a, I don't think. 16:34
RabidGravy still very useful 16:35
pmichaud m: say (Any.?list).WHAT
camelia rakudo-moar 70abc0: OUTPUT«(List)␤»
ssqq When get memory address of some object, How to return object according memory address?
timotimo you can only do that with NativeCall 16:39
lizmat RabidGravy: so yes, it's doing something close to what you want , but for maybe not th right reason
timotimo if you're working with memory addresses of objects, you must know that MoarVM's garbage collector is moving
if you hit a GC between calculating the address and grabbing the object from memory, you'll be majorly screwed 16:40
RabidGravy seems reasonable 16:41
ssqq timotimo: I want to know if it possible establish C language memory model using Perl6 16:43
JimmyZ_ I think he means object.id 16:43
timotimo you can get access to the underlying MVMObject as a C Struct, but there's no way to put it back into the VM so that it gets managed properly 16:44
lizmat Q: how can you be sure your object will not be moved by the GC while reading/writing it? 16:48
A: I don't think you can, therefore you should *always* use a MoarVM API function to read/write objects ?
JimmyZ_ the object won't move if object.id get called once 16:50
iirc
timotimo ah, right, it gets put into the second generation
but if it points at any other MVMObject, that pointer can change from under you
since you don't get to add additional roots from "outside" the internals
JimmyZ_ yeah 16:53
[ptc] hoelzro, ugexe: have just updated the Travis build stuff to what BanzaiMan wanted to have, hopefully he's happy with that 16:57
hoelzro, ugexe: am looking into how to add the relevant Perl6 docs page to travis now
ugexe [ptc]: did that `rakudo triple #{version} #{version} #{version}` get changed? 17:01
[ptc] ugexe: in what way? 17:08
ugexe: I updated both rakudobrew commands to be in a fold and to include timing info
smls "rakudobrew triple nom master master" still works for me 17:09
[ptc] also, I think the perl6 build scripts will need testing once they are available on travis before the functionality gets advertised
ssqq When parse C 'typedef int Int', new type would dynamically established, How to dynamically change grammar rule accordingly? 17:10
JimmyZ_ ssqq, 你可以看一下 tinycc 是怎么实现的 17:13
Util I am presenting a Perl 6 talk, 2 hours from now.
If anyone (not attending) wants to sanity-check my code,
colomon Util++
Util I will welcome corrections (and even suggestions) until then. Thanks! 17:14
[ptc] Util++
Util home.p6c.org/~util/talks/YAPC/YAPC_...counts.pdf
pmichaud Util++
ssqq p6: grammar G { my @types = <int float>; token type { @types }; token typedef-expr { 'typedef' \s+ <type> <ident> { push @types, $<name> }} 17:15
camelia rakudo-moar 70abc0: OUTPUT«5===SORRY!5=== Error while compiling /tmp/tmpfile␤Missing block␤at /tmp/tmpfile:1␤------> 3<type> <ident> { push @types, $<name> }}7⏏5<EOL>␤ expecting any of:␤ postfix␤ statement end␤»
ugexe [ptc]: That command is feeding the same $version as the perl6, moar, and nqp isnt it?
it should either be 3 different $version variables, or just `rakudobrew triple` 17:16
ssqq JimmyZ: 我想知道在Perl6中如何动态的修改 token
[ptc] ugexe: that it uses the same $version was the idea
pmichaud Util: (slide 16) Perl 6 now has a .is-prime method 17:17
ssqq JimmyZ_: 我用数组实现了,但感觉不太对劲
timotimo Util: is there a reason you show for @array.keys -> $i { and then use @array[$i] } rather than for @array.kv -> $i, $v { use $v } ?
[ptc] ugexe: if I just use rakudobrew triple, that doesn't run (iirc)
timotimo ah, it's in there later on 17:18
colomon Util: seems like you address for (well, foreach), do a few other things, then come back to for?
[ptc] ugexe: the version tie-in was something that I wanted: namely that a given Rakudo stack would be available when saying in .travis.yml, perl6: 2015.05 (for example)
timotimo Ulti: on slide 49 there's "@r =('z') x 3);" which misses a "("
colomon Util: all without ever showing for @array -> $v
Util: (or did I miss it?) 17:19
ugexe [ptc]: sounds like you want `rakudobrew build $backend $version`
Util pmichaud: .is-prime omission intentions; teaser for Ovid's last few slides
colomon: for() not all being together is intentional, for effect. 17:20
[ptc] ugexe: don't think so...
ugexe triple is for building version $0 of moar, version $1 of nqp, and version $2 of rakudo (order may be incorrect) i believe
colomon Util: k 17:20
[ptc] ugexe: what I'm trying to do (and possibly doing it incorrectly) is to build a given Rakudo release
pmichaud Util: just checking :) 17:21
ugexe yes, thats what the build command i posted does
[ptc] ugexe: and usually moar, nqp and rakudo are all at the same version number
ugexe: ah, ok
pmichaud Slide 49 paren typo in last line?
Util colomon: good point, I did never show single-var version, but I do say: for @array -> $city, $state, $zip 17:22
pmichaud Util: ^^
colomon Util: yeah, I’m still reading through, just got to the triple var version.
[ptc] ugexe: I need to try that out, thanks for the tip
ugexe: btw: I added your email address as listed on GitHub to the build file, similarly to other community-supported languages, hope that's ok 17:23
Util pmichaud: 49 paren typo - Fixed. Thanks!
ugexe only if you are a nigerian prince
timotimo BBIAB 17:24
[ptc] ugexe: well, as it happens, I *do* have 10^9 USD which I need to put in a bank account somewhere. Just send me all your bank details, passwords, etc. and I'll do the rest :-P 17:25
timotimo m: my @field_names = < CITY 'STATE NAME' ZIP # will change later␤>; say @field_names;
camelia rakudo-moar 70abc0: OUTPUT«CITY 'STATE NAME' ZIP # will change later␤»
timotimo m: my @field_names = << CITY 'STATE NAME' ZIP # will change later␤>>; say @field_names; 17:26
camelia rakudo-moar 70abc0: OUTPUT«CITY STATE NAME ZIP # will change later␤»
pmichaud m: my @field_names = < CITY 'STATE NAME' ZIP # will change later␤>; say @field_names.perl 17:26
camelia rakudo-moar 70abc0: OUTPUT«["CITY", "'STATE", "NAME'", "ZIP", "#", "will", "change", "later"]<>␤»
timotimo Util: one of your slides suggests this works -^
pmichaud m: my @field_names = << CITY 'STATE NAME' ZIP # will change later␤>>; say @field_names.perl
camelia rakudo-moar 70abc0: OUTPUT«["CITY", "STATE NAME", "ZIP", "#", "will", "change", "later"]<>␤»
Util timotimo: looksing... 17:31
JimmyZ_ ssqq, token 里面是可以使用变量的 17:33
lizmat Util: alternative to "say "My name is {$self.name}";" is "say "My name is $self.name()"; 17:35
Util timotimo: Thanks! I was remembering that that was specced to work, but did not check (in haste). Re-writing.
Util lizmat: Thanks! I had forgotten that (along with zen slices). I think that I will leave it as-is, though, since I am showing off interpolated code blocks. 17:36
[ptc] ugexe: `rakudobrew build $backend $version` is much better 17:39
ugexe: I'm going to leave $backend hardcoded as moar for now, however we can change this to support the jvm in future as well, what do you think?
ugexe sounds like the best option 17:41
RabidGravy boom 17:42
FROGGS o/ 17:50
yoleaux 14:04Z <hoelzro> FROGGS: I would like to do that; I just wanted to get the basics done
hoelzro o/ FROGGS 17:51
FROGGS hi hoelzro 17:52
jdv79 m: for 1..3 { try "foo".IO.rename("bar");} # usually not "broken" 17:54
camelia ( no output )
jdv79 m: for 1..4 { try "foo".IO.rename("bar");} # usually "broken"
camelia ( no output )
flussence it's a gc bug, afaik
jdv79 m: for 1..10 { try "foo".IO.rename("bar");} # usually "broken"
camelia ( no output )
jdv79 :( - that breaks pretty reliably locally and via msging camelia - idk 17:55
m: for 1..20 { try "foo".IO.rename("bar");} # maybe 17:56
camelia rakudo-moar 70abc0: OUTPUT«Use of uninitialized value <element> of type Any in string context in code at /tmp/9fpdYO6Mo0:1␤WARNING: unhandled Failure detected in DESTROY:␤Failed to rename '/home/camelia/foo' to '/home/camelia/bar': Failed to rename file: no such file or direct…»
jdv79 ah, there
jdv79 is that a bug? 17:56
flussence «dir('.').sort xx 2» gets me a segfault, and I have problems doing basic addition too many times, so I'm pretty convinced they all have the same root cause
jdv79 some gc thing you mean? 17:57
flussence yeah. I believe it's already known about, at least
ugexe can a role force an attribute on an interface like method stubs? or am i wandering into an anti-pattern...
jdv79 ok
jnthn: ^^ is the golfed version of what i hit the other day 17:58
masak evenin', #perl6
flussence o/ 17:58
lizmat flussence: seems related to what *is* in dir "." 17:59
can't get it to fail locally
flussence oh, I'm on 32-bit, that might be why
geekosaur very common cause of weirdness is stuff assuming that filenames are utf8, when on unixlikes they are octet strings and no encoding can safely be assumed 18:04
cue bug reports of gtk and OS X Aqua file picker crashes
pmichaud Excellent talk from DrForr++ . 18:05
Util DrForr++ indeed! 18:07
colomon on what? 18:10
Util colomon: Quaternions! You would have loved it. 18:11
colomon oooo, I think I would have!
jnthn To correct an inaccuracy in the backlog: the object *may* move after calling getting its unique object ID, it's just that the ID won't change. It's currently implemented by pre-choosing a gen2 address; that is an implementation detail, though, and also not useful as the move is not immediate. 18:31
jnthn flussence: I fixed a nasty SEGV this morning that was more likely to show up on 32-bit than 64-bit; you may want to grab latest if you haven't already 18:32
m: dir('.').sort xx 2
camelia ( no output )
jnthn m: dir('.').sort xx 10
camelia ( no output )
jnthn m: dir('.').sort xx 100
camelia ( no output ) 18:33
hoelzro I forget, does Str have a method that's like Perl 5's tr/abc/def/ expression? 18:44
ah, .trans
Util hoelzro: $str.trans( %mapping.pairs );
hoelzro thanks Util 18:46
Util yw
jnthn TimToady: In Failure, it seems that if we actually throw the exception (maybe because it got fatalized) then we don't mark the Failure as handled. This seems to be one of our big sources of leaked Failure. 18:52
TimToady: I figure since actually threw they count as handled at that point?
This is why we leak the rename ones in a try, as in the jdv79++ example earlier. 18:53
jnthn tries a patch to do this 18:55
moritz marking a thrown Failure as handled sounds sensible 18:56
jnthn OK. If the patch spectests fine I'll put it in :)
flussence jnthn++ # thanks, will give it a try now
Ulti not sure if anyone on here noticed www.reddit.com/r/perl/comments/392g...al_arrays/ 18:59
whatever happened to the constraint version of the shaped array declaration was it just abandoned in favour of waiting to do proper native like aligned arrays?
jnthn Ulti: constraint versoin? 19:03
FROGGS Ulti: you are talking about this? github.com/rakudo/rakudo/commits/s...r=Arcterus 19:04
IIRC it was had a "wrong approach"
jnthn *nod*
FROGGS s/was//
jnthn I'm planning to work on multi-dim arrays; they're next up, except it kinda doesn't make sense to dig in until I see the way Array will be post-GLR 19:05
Ulti sure
dalek kudo/nom: 80f8efc | jnthn++ | src/core/Failure.pm:
A Failure that throws counts as handled.

This means fatalized Failures will not report themselves as leaked.
19:06
jnthn jdv79: That should fix your rename issue, anyways.
Ulti jnthn out of interest is this going to be something that adds constraints to normal lists i.e. checks some boundary or something that is a bit more like a C multi-dim array? 19:07
zostay returning to my question last night about using .get or .lines on a :bin, it seems to me like that should work, but return a Blob instead of a Str or provide Blob-ish alternative methods 19:08
jnthn Ulti: That's one of the things I'm working out at the moment; S09 doesn't clearly say it has to be one way or the other
Ulti yeah
jnthn Ulti: It hints that it *can* be C multi-dim style though
Ulti I know which one everyone in PDL land would want >:3 19:09
jnthn Ulti: 'cus it points out that you might have to create a "view" kinda thing if you access just one dimension
FROGGS zostay: I understand it as .get/.lines being for strings, but .read is for bufs
Ulti FORTRAN style arrays :)
jnthn So I need to ponder the implementation consequences of that also. :-)
Ulti yeah I guess something like Java solved that by having Iterator 19:11
zostay FROGGS: i understand that... but the :bin option has very little meaning for :r files, you might as well not bother because read doesn't bother with encodings anyway 19:15
i'm suggesting a way to make :bin more powerful, allowing you to buffer records in a binary file 19:16
zostay in fact, the only place :bin seems to make any useful difference is in slurp 19:17
in which you can pass :bin there directly
dalek rl6-roast-data: 2542aff | coke++ | / (9 files):
today (automated commit)
19:18
zostay IO::Handle could be treated as an Iterable over Blobs or Strs if :bin was used more 19:19
[Coke] jnthn: I'm sure we can come up with a list of RTs or something if you're looking for work before GLR is done. :)
smls_ zostay: Isn't that what IO::Handle.lines and IO::Handle.words is for? 19:21
oh, nvm 19:22
zostay yes and no... encoded, buffered files yes, binary files no
jnthn [Coke]: I'm open to being given RTs people especially care about; I'm trying to pick off some of the most serious ones already :-) 19:23
rjbs jnthn: A question!
jnthn rjbs: An answer!
rjbs jnthn: I had a /very/ short talk with Pm earlier about NFG's representation in memory.
jnthn
.oO( Meta-discussion is so easy! )
rjbs jnthn: He said that it's an array of int16, and that high codepoints are /also/ represented by synthetics. 19:24
(or at least negatives)
jnthn rjbs: No, it's an array of int32 :) 19:24
rjbs Thanks, question answered!
jnthn rjbs: Though we'll probably use an array of uint8 for things in the Latin-1 range in the future. 19:25
jnthn To cheat a bit. :-) 19:25
But for now, it's all 32 wide
rjbs thanks! 19:26
nwc10 the slightly more funky plan was to use arrays of uint8s for anything with no more than 128 distinct non-ASCII codepoints 19:27
but "just latin 1, and done" beats "funky vapourware" 19:28
also, "just latin 1" (or some other fixed 8 bit) means memcmp()
jnthn nwc10: That is funky but the latin 1 thing goes together well with us storing things in the bytecode file as latin-1 when we can also. 19:29
jnthn nwc10: Latin-1 is in NFG for free, so we save a bunch of time at startup things to this. :-) 19:29
And if we can just use the bytes directly in the MVMString we build, we'll do even better. 19:30
jdv79 jnthn: thanks! seems so. 19:34
flussence I thought up a crazy idea about strings a while back and now seems as good a time as any to ask it: what if NFG strings were to default to the smallest int type that can contain all the synthetics, instead of int32? 19:39
jnthn You'd have to account for the non-synthetics too... 19:39
flussence and here's the crazy part: what if we were to stuff any random unicode characters encountered into unused synthetic codepoints :) 19:40
or in layman's terms: "hey, let's abuse NFG to reinvent fixed-width codepages!" 19:44
lizmat or in other words: make all codepoints synthetic internally ? 19:44
pmichaud okay, int32 array then.
works for me :)
I'm getting lots of vm-related questions here at yapc, so I'm having to make educated guesses :) 19:45
flussence lizmat: pretty much. the nice thing about the Str type is nobody using it in perl6 code has to ever know it's doing something horrifying underneath :) 19:45
pmichaud but my answers are often prefaced with "well, ask #perl6 to be sure, but I think it's likely ..... " 19:46
jnthn :-)
pmichaud I suppose I could actually learn about all of this stuff for real and become more authoritative... but NAAAAAHH
moritz flussence: except when you nativecall 19:47
FROGGS pmichaud: :D
flussence moritz: yeah, you got me there...
lizmat but nativecall code would need to be able to handle any "real" synthetics anyway 19:48
jnthn We encode a Str into an encoding before it escapes to native calls :)
lizmat so then it wouldn't matter whether all codepoints were synthetic or not
jnthn Synthetics are never to be leaked 19:49
flussence jnthn: before I forget to mention it: that segfault's fixed for me :D 19:51
jnthn Phew :)
It took some finding.
PerlJam Util++ 19:56
(watching now :)
flussence also, if we end up with a scenario where strings can map to any list of codepoints internally, that giant mountain of Encode:: modules perl5 has becomes trivial to do in perl6...
dalek ecs: 866db90 | (Stéphane Payrard)++ | S99-glossary.pod:
S99: spotted "synthetic character" on #p6. Added entries"
20:12
lizmat cognominal: I think it was more "synthetic codepoint" ? 20:13
jnthn aye
cognominal ok, will fix it 20:14
DrForr colomon: It's on youtube. 20:18
colomon DrForr++ \o/
DrForr Thanks. 20:19
Incidentally there's a possible way to do what I'm after (but not really seriously.) U+20D0..U+20FF have a Math property, and the combining solidus and arrows are in that range. 20:21
dalek ecs: afd68e6 | (Stéphane Payrard)++ | S99-glossary.pod:
S99: fixed previous entries; thx jnthn++, lizmat++"
DrForr Looks like we're getting quite a bit of perl6 participation this time 'round. 20:29
pmichaud yes, I estimated at least 50 people at Util++'s talk 20:30
my talk yesterday was standing-room-only (smaller room), which shocked me quite a lot
pmichaud I get to give my "How (not) to design a language" talk tomorrow :) :) 20:31
DrForr I got aybe ... 30?
pmichaud DrForr: I think it was at least 30, yes. 20:34
dalek osystem/jgoff-ANTLR4: 4183365 | (Jeffrey Goff)++ | META.list:
Add ANTLR4
20:35
DrForr That's the ANTLR-Perl6 translator. 20:36
lizmat DrForr++ :-) 20:37
masak 'night, #perl6 20:46
lizmat good night, masak
pmichaud m: sub fib(Int $nth where * >= 0) { $n }; fib(-3) 20:51
camelia rakudo-moar 80f8ef: OUTPUT«5===SORRY!5=== Error while compiling /tmp/EWs0VtiQxw␤Variable '$n' is not declared␤at /tmp/EWs0VtiQxw:1␤------> 3sub fib(Int $nth where * >= 0) { 7⏏5$n }; fib(-3)␤»
pmichaud m: sub fib(Int $nth where * >= 0) { $nth }; fib(-3)
camelia rakudo-moar 80f8ef: OUTPUT«Constraint type check failed for parameter '$nth'␤ in sub fib at /tmp/N0Ot8mbFJP:1␤ in block <unit> at /tmp/N0Ot8mbFJP:1␤␤»
pmichaud why the "type" in "Constraint type check"? Would "Constraint check" be better phrasing? 20:52
timotimo because we claim "subset Int where * >= 0" as a whole is a constraint type 20:53
pmichaud did you mean "subset Foo of Int where * >= 0" ? In that case, Foo is a constraint type, yes. 20:54
timotimo yeah 20:55
that's how it's implemented anyway ... i think?
hm, do we have the constraint directly on the Attribute object?
pmichaud is that implementation detail important?
timotimo if you think the wording should be better without "type" in there, we might be able to change it easily 20:56
pmichaud m: subset PosInt of Int where * >= 0; sub fib(PosInt $n) { $n }; fib(-3)
camelia rakudo-moar 80f8ef: OUTPUT«Constraint type check failed for parameter '$n'␤ in sub fib at /tmp/T_mTHYOqYN:1␤ in block <unit> at /tmp/T_mTHYOqYN:1␤␤»
dalek c: 2b7d3ce | ab5tract++ | lib/Type/Hash.pod:
Add an example for Hash.push
20:58
hoelzro if I want to create my own sub lines() that does a bit extra on top of CORE::lines, I just have to call CORE::lines(), right? 21:02
lizmat m: SETTING::&lines("foo").say 21:06
camelia rakudo-moar 80f8ef: OUTPUT«foo␤»
lizmat hoelzro: ^^ 21:07
hoelzro lizmat: why SETTING and not CORE? 21:07
lizmat m: CORE::&lines("foo").say # also works :-)
camelia rakudo-moar 80f8ef: OUTPUT«foo␤»
jnthn pmichaud: I don't think "type" adds a huge amount to the error
jnthn pmichaud: It's accurate, but not especially important. 21:08
pmichaud I think it might actually add some confusion, since the part that failed (the constraint) wasn't really a "type" as the programmer would think of it.
hoelzro ok, thanks lizmat!
pmichaud Ovid++ is giving his talk now, and that error message came up, and the use of the word "type" was a bit jarring to me (nobody else noticed/commented on it)
jnthn pmichaud: Depends on the programmer :P
Anyway, no objections. I think of it was a type for sure, but I woudln't miss "type" being in there 21:09
jdv79 any thoughts on default and lazy on attrs? default meaning being able to get back to the default value as a var can do with "is default(42)".
lizmat I think there shouldn't be a difference between my and has wrt "is default" 21:10
jdv79 and lazy in general as rjbs asked and lazy {} may be able to do or something
lizmat now, lazy, the word is still not out on that...
jdv79 i'd like to see an example of the back to default value case since i wasn't able to do it 21:11
lizmat as you can for now easily work around it with method foo { $!foo //= lazy evaluation }
jnthn Assigning Nil is the usual way to restore a default
Util PerlJam: o/ 21:12
jnthn Time for some rest &
lizmat m: class a { has $.a is default(42) } # can't do is default on attrs yet 21:13
camelia rakudo-moar 80f8ef: OUTPUT«5===SORRY!5=== Error while compiling /tmp/NS6Jy9v2Y3␤Can't use unknown trait 'is default' in an attribute declaration.␤at /tmp/NS6Jy9v2Y3:1␤ expecting any of:␤ rw␤ readonly␤ box_target␤ leading_docs␤ …»
lizmat good night, jnthn
pmichaud m: subset PL where -10.0 .. 10.0; say pi ~~ PL 21:15
camelia rakudo-moar 80f8ef: OUTPUT«True␤»
pmichaud m: subset PL where -10.0 .. 10.0; say "Hello" ~~ PL 21:15
camelia rakudo-moar 80f8ef: OUTPUT«False␤»
pmichaud m: subset PL where -10.0 .. 10.0; my @a = (1,2,3); say @a ~~ PL 21:16
camelia rakudo-moar 80f8ef: OUTPUT«True␤»
dalek c: 2e7179a | ab5tract++ | lib/Type/Hash.pod:
Add example of initialization of Hash.push
21:20
pmichaud question about "subset" keyword perhaps should be "subtype" 21:21
jdv79 m: class A { has $.a is rw = 42; }; my $c = A.new(:a("foo")); say $c.a; $c.a = Nil; say $c.a; # what?
camelia rakudo-moar 80f8ef: OUTPUT«foo␤(Any)␤»
jdv79 did jnthn mean that should have returned "foo\n42\n"? 21:22
RabidGravy I don't think so, the default assignment is made when the object is constructed 21:23
RabidGravy as I understand it anyway 21:24
flussence m: my Int $a is default(42); say $a; $a = 300; say $a; $a = Nil; say $a
camelia rakudo-moar 80f8ef: OUTPUT«42␤300␤42␤»
flussence m: class A { has Int $.a is rw is default(42) } 21:27
camelia rakudo-moar 80f8ef: OUTPUT«5===SORRY!5=== Error while compiling /tmp/k1DPqBsnI7␤Can't use unknown trait 'is default' in an attribute declaration.␤at /tmp/k1DPqBsnI7:1␤ expecting any of:␤ rw␤ readonly␤ box_target␤ leading_docs␤ …»
pmichaud default assignment occurs for uninitialized attributes after all other initialization has taken place 21:28
flussence m: my Int $a is default(42) = 300; say $a; $a = Nil; say $a
camelia rakudo-moar 80f8ef: OUTPUT«300␤42␤»
pmichaud however, I have a strong sense that default initialization and lazy are tightly coupled 21:29
timotimo pmichaud: it feels to me you already get a "subtype" by deriving a class from another 21:36
pmichaud timotimo: we're looking specifically at the case of 21:37
timotimo case of $foo { ... } ? :)
pmichaud subset PosInt of Int where * > 0; 21:38
why "subset" here instead of "subtype" ?
(since we're effectively declaring a new "type", not a "set")
timotimo hmm 21:39
"subsettype" %)
PerlJam pmichaud: also, "subset" looks like it might have some relation with set() and Set, but doesn't 21:40
pmichaud PerlJam: exactly what jarred me about the question (and why I think it's potentially legitimate) 21:40
pmichaud since we have built-in set operators now, I wonder if the term "subset" is subject to unfortunate punning 21:41
anyway, it's undoubtedly a TimToady call to make.
(unless/until someone comes up with the obvious reason it should remain 'subset')
moving tables 21:42
PerlJam "derive PosInt from Int where * > 0" :)
RabidGravy though there is a danger subtype might imply something about the things that isn't true
though I'd be happy with subtype 21:43
pmichaud well, I think it's pretty clear that "PosInt" is what we commonly refer to and think of as a "type"
PerlJam We also declare our other types with the "class" keyword. Why not do the same with "subtypes"? 21:45
PerlJam class PosInt of Int where * > 0; 21:46
pmichaud oh, please no.
I'd think of class as being something more than just "subtype"
class also means "and add these methods and add these attributes and ..."
PerlJam btw, some perl6 person needs to crash the "Symbolic Computation in Perl" talk (the examples so far have been using rationals and complex numbers) 21:47
pmichaud it's no so much that I want to see 'type' in the declarator, as much as I want it to not have 'set'
and we have several types of types. :)
we have roles, we have constraint types, we have classes, ...
flussence I propose s/subset/check/, since it's 5 chars like "class", and unambiguous about what comes next 21:49
PerlJam too verby
lizmat collection ?
flussence (and +1 to not calling it subset in any case, since we already have subbuf and substr...)
PerlJam gets the feeling that we're now exploring all the bad ideas so that we can have more confidence in calling it "subtype" 21:50
flussence
.oO( there's also the option of picking a long word and abbreviating it like enum )
21:51
PerlJam (though I did like the "derive" version)
flussence: anything-other-than-subset or abbreviated, aots :) 21:52
lizmat restricto 21:53
flussence
.oO( "constraint" -> "aint" -> "ain't PosInt an Int where * > 0;"... )
PerlJam flussence: nice! :)
flussence not a serious suggestion, but it worked there :) 21:54
PerlJam lizmat: why the trailing "o"? restrict PosInt of Int where * > 0; isn't bad at all.
lizmat too verby ?
PerlJam though, again, it's probably ... yeah
lizmat the "o" was for "I restrict" 21:55
flussence goes to see if postgres has a nice word for this, since their whole type system tends to align nicely with ours
PerlJam
.oO( <flussence> Guess what postgres uses? "subtype" )
21:56
flussence hm, they only mention "subtype" in the context of constraining a range to a specific number type :) 21:58
everything else is just... "type".
pmichaud I'm not strongly opposed to "subset", just noting the disconnect 21:59
PerlJam type PosInt of Int where * > 0; # works for me too :)
pmichaud Question of the day.... 22:00
"Why a butterfly?" 22:01
:)
RabidGravy that's me done for the day 22:03
Util Thank you to everyone who checked my slides! 22:05
DrForr +1 22:06
cognominal pmichaud, maybe because of the long larval stage. :) but then, the imago does not last long :( 22:07
Util pmichaud: github.com/perl6/mu/raw/master/misc/camelia.txt 22:09
cognominal Util, I like the : you can extend just about anything by attaching "P6" wings to it. 22:12
pmichaud Util: I'm planning my counter-heckle(s) for TimToady after he heckled me at my talk yesterday (with that question) 22:18
andreoss using something like 'has $.x = die "$.x is required"' is encouraged ?
TimToady avoids pmichaud... 22:21
Util pmichaud: Ah! Now I understand. 22:34
andreoss m: class Z { has Int $.x = Any }; say Z.new; 22:37
camelia rakudo-moar 80f8ef: OUTPUT«Type check failed in assignment to '$!x'; expected 'Int' but got 'Any'␤ in block <unit> at /tmp/fjbFvJ0BpL:1␤␤»
andreoss m: class Z { has Int $.x = die }; say Z.new;
camelia rakudo-moar 80f8ef: OUTPUT«Died␤ in method at /tmp/wqDzhUXTHN:1␤ in block <unit> at /tmp/wqDzhUXTHN:1␤␤»
pmichaud do violins have unicode strings? 22:38
flussence m: class Z { has Int $.x = Empty }; say Z.new # decently readable error, but not self-describing code 22:39
camelia rakudo-moar 80f8ef: OUTPUT«Type check failed in assignment to '$!x'; expected 'Int' but got 'Empty'␤ in block <unit> at /tmp/wh18ZIz1mq:1␤␤»
zostay is there a way to get the fileno of a file from an IO::Handle? 22:40
pmichaud zostay: I don't know of one. 22:42
Util zostay: looks like $the_handle.fileno . See: design.perl6.org/S32/IO.html#.fileno 22:44
zostay i thought i saw that somewhere, but it does not appear to be implemented at this point 22:45
pmichaud S32 is often conjectural, too
lizmat yeah, NYI
zostay that's fine... i'm thinking about how PSGI from Perl adapts to Perl 6
fileno is part of the Perl 5 PSGI spec so that it may be used as an optimization 22:46
pmichaud Looks like fileno was added to S32 in Sep 2014, so it's a recent conjecture :) 22:49
zostay if i want a lazy list containing each 100 bytes of a file, how would i write that... the equivalent to $fh.lines, but for fixed-length Blobs? 23:17
flussence probably easy to do in a gather/take loop 23:18
you'd "take $fh.read(100)"
timotimo right
and you'd have something to break it off on eof or exception 23:19
don't know which it'll do when it reaches the end of the file
zostay like, gather loop { take $h.read(10) or last }
timotimo i'd imagine it'd look like that, yes 23:20
ugexe my $bytes = Supply.from-list: gather while my $b = $byte-stream.read(1) { take $b } is what i use
timotimo pro-tip: do actually use "take" 23:22
you can probably get something nicer with map; isn't map also lazy?
timotimo m: my @test = 0..*.map({ say "test" }); say @test[^3] 23:22
camelia rakudo-moar 80f8ef: OUTPUT«WhateverCode.new␤»
timotimo m: my @test = 0..Inf.map({ say "test" }); say @test[^3] 23:23
camelia rakudo-moar 80f8ef: OUTPUT«test␤0 1␤»
timotimo m: my @test = (0..Inf).map({ say "test" }); say @test[^3]
m: my @test = (0 xx *).map({ say "test" }); say @test[^3]
...
camelia rakudo-moar 80f8ef: OUTPUT«(timeout)test␤test␤test␤test␤test␤test␤test␤test␤test␤test␤test␤test␤test␤test␤test␤test␤test␤test␤test␤test␤test␤test␤test␤test␤test␤test␤test␤test␤test␤test␤test␤test␤test␤test␤test␤te…» 23:24
timotimo m: my @test := (0 xx *).map({ say "test" }); say @test[^3]
camelia rakudo-moar 80f8ef: OUTPUT«test␤test␤test␤True True True␤»
timotimo there we go
no gather/take needed
(as it's quite a bit of overhead at the moment)
ugexe IO::Socket internally uses uses gather/take for lines()
timotimo hmm
ugexe i cant think of any reason it cant use map instead though 23:26
didnt know about the overhead difference though. good to know 23:32
pmichaud eventually it'll be simply: my @list = while ($h.read(10)) -> $a { $a }; or somesuch 23:33
imo, gather/take is overused for laziness right now... while is a bet better
*bit better 23:34
ugexe i just prefer the explicit statement to `take` something instead of whatever the last value is 23:37
pmichaud well, map would do much the same then
(in the GLR, map() may end up being just a fancy form of while loop :) 23:38
flussence would «$_ while $h.read(10)» be expected to work in that line there?
ugexe but can i do map({ blah(); take $value })? what i mean is, i dislike map({ blah(); $value }) because if for whatever reason i put debug info after $value, then my code no longer behaves the same. and im a clutz so it happens a lot 23:39
ugexe i suppose that can be implemented as-is with a LEAVE 23:44
dalek c: 48c0eb9 | ab5tract++ | lib/Type/Nil.pod:
Add the return of default values when Nil is assigned
ugexe guess not
jferrero m: say √2 == √2; 23:48
camelia rakudo-moar 80f8ef: OUTPUT«5===SORRY!5===␤Argument to "say" seems to be malformed␤at /tmp/TBbMahtWoB:1␤------> 3say7⏏5 √2 == √2;␤Bogus postfix␤at /tmp/TBbMahtWoB:1␤------> 3say 7⏏5√2 == √2;␤ expecting any of:␤ infix␤ infix s…»
jferrero m: say π == π; 23:50
camelia rakudo-moar 80f8ef: OUTPUT«True␤»
ugexe m: say(2 == 2) 23:58
camelia rakudo-moar 80f8ef: OUTPUT«True␤»
ugexe er
m: say(√2 == √2)
camelia rakudo-moar 80f8ef: OUTPUT«5===SORRY!5=== Error while compiling /tmp/at4T5BQ4tC␤Unable to parse expression in argument list; couldn't find final ')' ␤at /tmp/at4T5BQ4tC:1␤------> 3say(7⏏5√2 == √2)␤ expecting any of:␤ argument list␤ prefix…»