»ö« 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! | Rakudo Star Released!
Set by diakopter on 6 September 2010.
00:20 Patterner left 00:21 Psyche^ joined, Psyche^ is now known as Patterner 00:25 justatheory left 00:26 nymacro joined 00:28 xabbu42_ left 00:39 cbk left 00:40 cbk joined 00:45 blyle31 joined 00:49 mfollett joined 00:50 risou_ left, risou joined 00:51 kst left, kst joined 00:55 risou left 01:06 kcwu joined, hercynium joined
s_mosher successful thiele interpolation: gist.github.com/610694 01:06
01:07 ruoso joined
s_mosher not yet an answer to the rosetta code task, but the meat of it works (if slowly) 01:07
01:13 bluescreen joined 01:25 cdarroch left 01:28 justatheory joined 01:44 satyavvd joined 02:01 pythonian4000 is now known as pythonian4000afk 02:06 Italian_Plumber left 02:07 Eevee joined
colomon s_mosher++ 02:09
02:24 satyavvd_ joined 02:26 satyavvd left, satyavvd_ is now known as satyavvd 02:31 araujo left 02:37 satyavvd left 02:40 araujo joined
colomon rakudo: sub a($a, $b, $c) { say "boo!" }; my &b = &a.assuming(1); say &b.arity 02:41
p6eval rakudo 2ee5db: OUTPUT«0␤»
colomon rakudo: sub a($a, $b, $c) { say "boo!" }; my &b = &a.assuming(1); say &a.arity; say &b.arity
p6eval rakudo 2ee5db: OUTPUT«3␤0␤»
colomon where's masak++ when you need him? 02:42
(reported) 02:47
dalek rixel: 7a5f038 | diakopter++ | sprixel/ (11 files):
nested string-eval with full lexical-closure-chain access.
02:50
02:56 blyle31 left 03:09 justatheory left 03:15 cls_bsd left, cls_bsd joined 03:28 ruoso left
araujo wonders if he should ......... "borrows" some keywords name from perl 03:37
03:38 orafu left 03:41 meppel joined 03:45 meppl left 04:01 meppel left, blyle31 joined 04:02 meppl joined, blyle31 left 04:03 ash_ left 04:07 Italian_Plumber joined, justatheory joined 04:11 Italian_Plumber left 04:17 satyavvd joined 04:19 orafu joined
mfollett rakudo: multi countdown(0) { say "We made it to 0!"};multi countdown { countdown($^x-1) };countdown(100) 04:35
p6eval rakudo 2ee5db: OUTPUT«No applicable candidates found to dispatch to for 'countdown'. Available candidates are:␤:(Int where (0))␤:(;; Any $x)␤␤ in main program body at line 22:/tmp/zIbxvK93xQ␤»
04:38 pythonian4000afk is now known as pythonian4000
mfollett why doesn't that work? 04:38
04:39 nymacro left 04:42 molaf joined
mfollett rakudo: multi countdown(0) { say "We made it to 0!"};multi countdown($x) { countdown($x-1) };countdown(100) 04:53
p6eval rakudo 2ee5db: OUTPUT«We made it to 0!␤»
mfollett that works
04:56 molaf left 05:07 kst left, kst joined 05:14 sjn left 05:17 sjn joined 05:33 sftp left 05:41 mfollett left, mfollett joined
sorear good * #perl6! 05:42
... and I seem to have SLEPT THROUGH #PHASERS 05:43
sorear mopes
05:53 cottoo joined 05:54 cottoo is now known as cotto, Guest23195 joined, cotto left, cotto joined 05:55 cjk101010 joined
moritz_ good morning 05:57
sorear: I missed too
stackoverflow.com/questions/3858790...ike-perl-6 that's the kind of question I like :-) 05:59
06:00 mfollett left
sorear
.oO(maybe we should start #outofphasers for people who think a 0700UTC meeting would be cool)
06:06
mberends (180°outofphase) 06:13
06:16 Mowah joined
sorear TimToady: constant Foo = 2; class Foo::Bar { } # Does this create a name collision? 06:21
TimToady I suspect so. 06:24
typenames and labels are just funny constant names, more or less. 06:28
06:29 xabbu42 joined 06:30 cls_bsd left, cls_bsd joined 07:03 justatheory left 07:12 baux joined 07:18 _twitch joined 07:25 satyavvd left 07:28 mavrc joined 07:34 Mowah left 07:36 M_o_C joined 07:46 wtw joined 07:58 LaVolta joined 08:02 satyavvd joined
s_mosher rosettacode.org/wiki/Thiele%27s_int...ula#Perl_6 08:03
I'm all out of stupid bugs and it seems to converge correctly on all of them 08:04
08:07 pythonian4000 is now known as pythonian4000afk 08:09 pythonian4000afk is now known as pythonian4000, icwiener joined
s_mosher oh no, all the stupid bugs are gone but I just found an intelligent one. 08:11
I'm leaving it for now since it still works
s_mosher ZzZzz 08:12
08:15 Maddingu1 is now known as Maddingue 08:23 renormalist joined 08:26 M_o_C left 08:30 M_o_C joined 08:37 dakkar joined 08:41 LaVolta left 08:42 LaVolta joined 08:46 PerlJam left
dalek ecza/master: b45b211 | sorear++ | src/ (2 files):
Switch to a 'fat reference' stash model

Foo and Foo:: are now both referenced from GLOBAL::, to allow constants and type objects to coexist better.
08:47
ecza/master: 0fa6f23 | sorear++ | / (3 files):
Fix Foo::Bar regression
08:48 szabgab_ left 08:49 PerlJam joined 08:55 clkao_ is now known as clkao
sjohnson rakudo: say 2^64 09:00
p6eval rakudo 2ee5db: OUTPUT«one(2, 64)␤»
09:00 kst left
sjohnson rakudo: say 2**64 09:00
p6eval rakudo 2ee5db: OUTPUT«1.84467440737096e+19␤»
sjohnson rakudo: use bignum; say 2**64
p6eval rakudo 2ee5db: OUTPUT«===SORRY!===␤Unable to find module 'bignum' in the @*INC directories.␤(@*INC contains:␤ lib␤ /home/p6eval/.perl6/lib␤ /home/p6eval//p2/lib/parrot/2.8.0-devel/languages/perl6/lib␤ .)␤»
sjohnson when anyones awake, will p6 do bignum automatically like python and ruby? 09:01
sorear yes
09:01 kst joined 09:02 masak joined
masak \o/ 09:02
sjohnson sorear: just not now?
sorear sjohnson: correct
\o/ masak
sjohnson sorear: thanks
09:03 wamba joined
sjohnson and hi to you to masak 09:04
09:04 cls_bsd left, cls_bsd joined
sjohnson masak!!! 09:07
(´ー` ) 09:08
09:09 LaVolta left
masak I think this bug is horrible: rt.perl.org/rt3/Ticket/Display.html?id=78232 09:10
I'm a bit disappointed that something like that hits us in 2010.
I'd like it to be fixed with some sort of priority, if possible. 09:11
this one too: rt.perl.org/rt3/Ticket/Display.html?id=78234
jnthn Well, a start is to see what on earth PAST/PIR it's generating.
masak ok.
sorear jnthn!!! 09:12
masak sorear!!!
jnthn o/ sorear :-)
sorear niecza: for 1, 2, 3 { sub foo {}; $_.say }; say "alive" # on a lark
p6eval niecza 0fa6f23: OUTPUT«Potential difficulties:␤ &foo is declared but not used at /tmp/iKBUwlQOB5 line 1:␤------> for 1, 2, 3 { sub foo⏏ {}; $_.say }; say "alive" # on a lark␤1␤2␤3␤alive␤»
sorear :/ 09:13
masak it does produce the right thang.
sorear jnthn: what do you think about search.cpan.org/perldoc?UNIVERSAL%3A%3Aisa ?
09:14 LaVolta joined
sorear essentially, 'method isa($cl) { ... }' in perl5-land is supposed to be enough to fake out all type checks 09:14
and people get very rude (just read that) when it's not
masak I'm looking at the PAST, but I'm not accustomed enough to pick out the tasty pieces. it's too much even with the above short one-liner. 09:15
sorear is 6model going to support faking out type checks like that?
jnthn Not in such a global way.
It's not really a core issue anyway though.
.isa will tend to just delegate to .^isa 09:16
At which point it's up to the meta-class
OTOH, if you mix in, in place, to ClassHOW you could change isa for all classes.
Warning: my brane is currently shared between here and insurance calculations... :-) 09:17
mathw o/ 09:19
jnthn er, wait, you'd have to replace the method. Mix-in affects just an instance...
mathw I feel out of touch, what awesomeness is happening?
jnthn ...and these insurance calcs are wrong. Grrr...
.oO( the world needs more compiler writing jobs... )
09:20
mathw Well, the world does need better compilers 09:21
And languages
jnthn masak: Easiest way with PAST is to put some magic values in the source and then look for them in the tree.
mathw is starting to really hate C++ 09:22
masak jnthn: ok.
mathw jnthn: of course your insurance calculations are wrong, because insurance is wrong by definition.
jnthn :P 09:24
Whiuch is fine apart from somebody has an idea of the right answer. ;-)
They've also redefined the word "all", just for fun. :-)
09:25 M_o_C left 09:26 icwiener left
masak the PAST for `for 1, 2, 3 { sub foo {}; $_.say }` looks fine to my untrained eye. 09:26
sorear I blame autoclose
hrm, druid does some rather unpleasant things with regexes... 09:35
masak yes.
it needs to be rewritten.
I currently don't have the tuits. 09:36
sorear How much needs to be rewritten?
masak Druid::Base, mostly.
I tried once, and hit a number of cascade issues, described at least twice in the backlog. 09:37
something of a re-think is required.
sorear the "base class as a holding place for support methods" design pattern makes me vomit inside
how far back-log?
masak just search for masak saying 'Druid' a lot.
last month or so. 09:38
sorear: I'd like to discuss that dislike of that design pattern with you sometimes. it seemed to make a lot of sense at the time.
mathw It reminds me of the kind of twisted OO you get in a lot of Java code 09:46
masak I was very happy about the class hierarchy in Druid. it uses single inheritance, roles, and 'handles' delegation in a way that was new to me at the time. 09:47
sorear I think OO is very much overused these days 09:49
mathw You probably shouldn't listen to my thoughts on class heirarchy, I'm currently rather bitter about the whole OO thing
masak in retrospect and with possibly fuzzy memory, I guess Druid::Base might just as well have been a role instead. 09:50
sorear a lot of people treat "object oriented" as a synonym for "well designed"
masak: in my local branch, Druid::Base is a module named Druid::Common 09:51
it doesn't make any sense to go $board.sarsen-move
instead stuff is exported from Druid::Common and it never makes it into class hiercies 09:52
masak I'll be happy to see what you come up with.
I'm a bit disinterested in arguing specifics in this case, but I'll be happy to look at a new whole design with different design desicions.
mathw be interesting to see what sorear comes up with and how it compares 09:54
jnthn masak: Feel free to nopaste the PIR for me to glance over (don't have a Rakudo build environment here...)
masak ok.
jnthn Or harrass me at Utrecht station in the morning. :P
mathw I keep saying to my boss I don't know enough about how to structure software properly. I'm convinced I'm not doing it very well. 09:55
sorear masak: you should look at how many times I've completely reorganized niecza in the last three months 09:56
(around 7)
er, mathw
masak jnthn: gist.github.com/613105
sorear: I re-did GGE in a major way about 5 times. 09:57
sorear: usually it was an effect of a step up in my understanding of the mechanisms behind PGE.
sorear creates a Druid::Move class with a static .parse method 09:58
10:00 Italian_Plumber joined, cggoebel joined, ggoebel joined 10:06 timbunce joined
masak sorear: is your Druid branch viewable somewhere? 10:21
10:28 Michael0817 joined, Michael0817 left 10:36 Chillance joined 10:37 dju left
masak jnthn: any insights from the gist? 10:56
10:56 Italian_Plumber left 10:58 kst left, kst joined 11:01 Mowah joined 11:03 cggoebel left 11:04 rgdrdgr joined 11:06 bluescreen left 11:07 ggoebel left 11:09 Patterner left, rgdrdgr left
masak rakudo: say $*PID 11:12
p6eval rakudo 2ee5db: OUTPUT«10260␤»
masak getting 0 locally.
there's an RT ticket about this not working on Darwin.
jnthn My guess is that there needs to be a Parrot ticket, since the real issue is probably at that level. 11:13
If we're using some Parrot call to get it, but I figure we would be.
masak: (gist) Er, I got distracted by lunch :-)
masak here's the RT ticket: rt.perl.org/rt3/Ticket/Display.html?id=77850
jnthn: no rush. 11:14
I'll go submit a Trac ticket for the $*PID thing.
jnthn is very full of burger 11:15
11:15 nadim left 11:30 Italian_Plumber joined, Psyche^ joined, satyavvd left, Psyche^ is now known as Patterner 11:58 mavrc left, mavrc joined 12:03 sftp joined 12:17 pythonian4000 is now known as pythonian4000afk 12:21 bluescreen joined
jnthn masak: line 135 may be suspect 12:22
Will take some digging. Can try to fix it tomorrow in .nl 12:23
masak ok. 12:24
'find_lex_skip_current'? 12:25
jnthn aye
I'm curious what the signautre of that block ends up being
(the one passed to map)
rakudo: for 1, 2, 3 { sub foo {}; 42.say } 12:26
p6eval rakudo 2ee5db: ( no output )
jnthn :-S 12:27
masak that's the issue, yes.
jnthn rakudo: for 1, 2, 3 { sub foo {}; die("here?") }
p6eval rakudo 2ee5db: ( no output )
jnthn rakudo: for 1, 2, 3 { sub foo() {}; die("here?") } 12:28
p6eval rakudo 2ee5db: ( no output )
jnthn rakudo: for 1, 2, 3 { sub foo($a) {}; die("here?") }
p6eval rakudo 2ee5db: ( no output )
jnthn rakudo: for 1, 2, 3 { -> {}; die("here?") }
p6eval rakudo 2ee5db: OUTPUT«here?␤ in <anon> at line 22:/tmp/uquB3qXOJm␤ in main program body at line 1␤»
masak so, somehow it's the declaration of a non-anon sub. 12:29
rakudo: for 1, 2, 3 { sub {}; die "here?" } 12:30
p6eval rakudo 2ee5db: ( no output )
masak or a sub in general.
jnthn yes, it's something about a routine. 12:31
I'm still at a loss as to what.
masak shopping & 12:34
12:34 masak left
takadonet morning all 12:41
12:41 kst left 12:42 kst joined 12:45 jest joined 12:58 nymacro joined 13:00 mfollett joined 13:07 mfollett left
colomon rakudo: sub a($a, $b, $c) { say "boo!" }; my &b = &a.assuming(1); say &a.arity; say &b.arity 13:10
p6eval rakudo 2ee5db: OUTPUT«3␤0␤»
colomon (reported last night, but was it actually a new bug, oh bugmaster masak?) 13:11
13:18 Patterner left
jnthn 0 is certainly the wrong answer, but I'm not totally convinced you should be getting 2 there... 13:21
The assuming wrapper just takes a capture and interpolates it along with the curried args iirc. 13:22
Hmm...or is 0 wrong... 13:23
If it's just a capture arg in there I guess there's no required params.
hm
rakudo: sub a($a, $b, $c) { say "boo!" }; my &b = &a.assuming(1); say &b.count; 13:24
p6eval rakudo 2ee5db: OUTPUT«Method 'count' not found for invocant of class 'Sub'␤ in main program body at line 22:/tmp/gcfPz9iyVF␤»
jnthn oh.
rakudo: sub a($a, $b, $c) { say "boo!" }; my &b = &a.assuming(1); say &b.signature;
p6eval rakudo 2ee5db: OUTPUT«get_attr_str() not implemented in class 'Sub'␤ in main program body at line 1␤»
jnthn ah
buggar.
13:28 plainhao joined 13:30 Psyche^ joined, Psyche^ is now known as Patterner
colomon jnthn: it's a practical issue, because things like .min and the sequence op need to know the arity of the functions they work with. 13:38
jnthn Fixing it means doing assuming in a rather more complex way. 13:41
colomon seems like it needs to be done. :\ 13:43
(at some point...)
jnthn So long as folks can cope with .assuming getting a bunch slower. 13:44
colomon why should that be? 13:45
(and is it .assuming, or the functions that it generates that get slower?)
jnthn Becuase it'd have to build a signature object for every single thing that gets wrapped.
Maybe we can get away with it just being .assuming
Well, we can see what TimToady++ thinks. 13:46
colomon If the alternative is that you can't actually use functions generated with .assuming in most of the interesting places a closure can be used, that seems like it would be worth it.
jnthn aye, but it rasies some interesting questions about other places delegation shows up too. 13:47
PerlJam jnthn: What does "build a signature object" entail? 13:48
and do you have to bulid them from scratch? It seems to me that you'll always be able to clone the sig and then remove parts of it for .assuming. 13:49
13:49 thundergnat joined
jnthn Cloning still means building a copy. 13:50
Also it may not always be removing.
sub foo(*@x) { ... } # nothing to remove in this case
thundergnat good localtime #perl6 13:51
I added a new perl6 contribution to rosettacode: Truncatable primes. rosettacode.org/wiki/Truncatable_primes#Perl6 13:53
It may not be the fastest or most idiomatic, but it works. slowly... 13:54
takadonet thundergnat: nice!
colomon jnthn: what does .assuming do with multis? 13:57
jnthn Once we switch to the new model, wrap the proto.
Then you're at the mercy of the signature of the proto whatever we do. :-) 13:58
13:59 wtw left 14:01 cls_bsd left, cls_bsd joined 14:04 [particle] left 14:07 jest left, thundergnat left 14:10 PacoLinux joined 14:11 xinming left, [particle] joined 14:12 mfollett joined, Axius joined 14:16 xinming joined 14:18 Guest23195 left 14:19 MayDaniel joined, MayDaniel left, MayDaniel joined, Util left 14:20 Lorn left 14:21 Lorn joined, Juerd left 14:22 pmichaud left, hugme left 14:28 hatseflats joined, Util joined, pmichaud joined
colomon o/ 14:30
14:31 timbunce left 14:39 pmichaud left, Util left, hatseflats left 14:45 Italian_Plumber left 14:46 pmichaud joined 14:47 Util joined, hercynium left, hatseflats joined, MayDaniel left 14:48 cjk101010 left 15:03 nadim joined 15:04 ruoso joined 15:06 tadzik joined 15:08 Axius left 15:10 pmichaud left, pmichaud joined
pmichaud good morning, #perl6 15:11
phenny pmichaud: 04 Oct 16:44Z <moritz_> tell pmichaud my adverb question turned into a call for review for 2ee5db94. We'll need to do the same for s///, so should I abstract that ugly code block into a sub or method or something?
15:11 justatheory joined 15:15 takadonet left 15:17 masak joined
pmichaud c! 15:18
ww
masak pm! 15:19
cbk pmichaud, good morning 15:20
15:21 pmurias joined
masak colomon: no, it wasn't a new bug. 15:22
colomon: I already merged it with the older one from a few months back.
moritz_ oh hai 15:23
15:23 Juerd joined 15:25 Ross joined
masak moritz_: greetings. hope everything is well with you. 15:26
mberends and I are sitting inside, hacking. we're just back from a small shopping round. 15:27
moritz_ masak: yes, just exhausted
masak life can do that :) 15:28
moritz_ and little time for p6
15:28 takadonet joined
takadonet morning all 15:28
masak moritz_: aye -- been having the same feeling lately. a bit frustrating.
takadonet: \o
takadonet looks like a recent change in rakudo cause 300 tests to fail in bioperl.... 15:32
dukeleto takadonet: bisect to the rescue 15:35
takadonet ?
ic Boo:False is implement now and we expected just 0 as false 15:36
masak takadonet: there's a git subcommand called 'git bisect'. 15:37
dukeleto takadonet: git help bisect
masak takadonet: it basically allows you to automate finding a revision where something changed.
takadonet thanks guys
dukeleto takadonet: you should learn about it, it can really save the day sometimes
takadonet dukeleto: good to know since we just changed over to git and still just learning it
dukeleto takadonet: aren't we all :) 15:38
masak yes, bisect is one of the nice parts of git.
takadonet: take a good long look at rebase too if you haven't already :)
takadonet never heard of it till now
well I have more time now to start looking at that stuff
dukeleto takadonet: if you are familiar with "newton iteration" or "the bisection algorithm", it basicall does that, on git commits, to help you find when something changed
moritz_ half of my parrot bug reports are about some parrot change breaking rakudo, typically bisected from two known revisions
or "binary search" really 15:39
takadonet sweet
and this is the reason why I come here every day
dukeleto perl6++
masak takadonet: yes, same here. 15:40
15:40 tadzik left
masak for some reason, we have an island of quality content in here. 15:40
15:40 _kaare joined
_sri is there a Perl6::Tidy yet? :) 15:41
takadonet also that people are willing to share without thought of getting anything in return
dukeleto takadonet: that seems to be a pillar of all perl communities 15:42
15:42 jaldhar left
PerlJam _sri: no Perl6::Critic yet either. 15:42
_sri aww
masak _sri: totally possible to build one, though.
we should have a wiki page or something where people can put all those "it's possible and desirable, but none of us has taken on the task yet" projects. 15:43
moritz_ or simply a file in the Mu repo 15:44
15:44 cbk left 15:45 icwiener joined 15:49 ash_ joined 15:51 jnthn joined, Mirell joined
dukeleto moritz_: that sounds like a lovely idea 15:52
15:52 thundergnat joined 15:53 tadzik joined
thundergnat rakudo: sub f ($l is rw) { $l += 1 }; say f(1); 15:54
p6eval rakudo 2ee5db: OUTPUT«Cannot modify readonly value␤ in '&infix:<=>' at line 1␤ in 'f' at line 22:/tmp/Nje9ztCGhs␤ in main program body at line 22:/tmp/Nje9ztCGhs␤»
thundergnat has 'is rw' been deprecated?
moritz_ no
it works fine
it's just that you can't add 1 to 1, and store the result in a 1
you can only store the result in a variable 15:55
thundergnat oh. duh
moritz_ rakudo: sub f($l is rw) { $l += 1); f my $x = 3; say $x
p6eval rakudo 2ee5db: OUTPUT«===SORRY!===␤Unable to parse blockoid, couldn't find final '}' at line 22␤»
PerlJam literals don't make good lvalues :)
moritz_ rakudo: sub f($l is rw) { $l += 1); f(my $x = 3); say $x
p6eval rakudo 2ee5db: OUTPUT«===SORRY!===␤Unable to parse blockoid, couldn't find final '}' at line 22␤»
moritz_ rakudo: sub f($l is rw) { $l += 1}; f(my $x = 3); say $x
p6eval rakudo 2ee5db: OUTPUT«4␤» 15:56
moritz_ LTA error message, it could tell me that the brackets are mismatched
thundergnat thanks. that was pretty obvious in retrospect. 15:57
masak moritz_: a file in the Mu repo is probably better, yes.
generally, I find Rakudo to be poor at recovering from bracket mismatches. 15:58
but it is a tough problem.
sometimes I've been toying with the idea of a program that would be able to provide better diagnostics in such cases by keeping the previous version of the code around, and comparing the brace structure there; maybe also paying attention to indentation as an extra clue. 15:59
pmichaud std: sub f($l is rw) { $l += 1); f(my $x = 3); say $x; 16:00
p6eval std 237d266: OUTPUT«===SORRY!===␤Unable to parse block at /tmp/KAuV2AEzIs line 1:␤------> sub f($l is rw) ⏏{ $l += 1); f(my $x = 3); say $x;␤Couldn't find final '}'; gave up at /tmp/KAuV2AEzIs line 1:␤------> sub f($l is rw) { $l += 1⏏); f(my $x =
..3)…
moritz_ takadonet: (backlog) Bool::False was implemented before, it's juste the stringification that has changed 16:03
(as mentioned in the release announcement of the previous compiler release)
16:03 thundergnat left
moritz_ rakudo: say ?0 16:03
p6eval rakudo 2ee5db: OUTPUT«Bool::False␤»
pmichaud rakudo: say "{?0}"
p6eval rakudo 2ee5db: OUTPUT«Bool::False␤»
pmichaud that one's wrong. 16:04
dalek : 968479c | moritz++ | project-ideas.txt:
[project-ideas.txt] collection of medium to large scale Perl 6 project ideas
moritz_ pmichaud: shoulbe just "False"?
pmichaud should be ""
moritz_ huh? why?
16:04 AABA4VU joined
moritz_ rakudo: say False.Stringy 16:04
TimToady Bool never goes to ""
p6eval rakudo 2ee5db: OUTPUT«Method 'Stringy' not found for invocant of class 'Bool'␤ in main program body at line 22:/tmp/l9iwcvQloy␤»
pmichaud oh, never mind then.
I figured Bool.Stringy would go to ""
moritz_ no, it's an enum
pmichaud if it's never "", then no problem :-)
TimToady P5-Think? 16:05
moritz_ so it goes to the short name
pmichaud I'm probably a week behind on discussions :)
moritz_ Author: lwall <lwall@c213334d-75ef-0310-aa23-eaa082d1ae64> 16:06
Date: Tue Jul 13 00:55:37 2010 +0000
[S12] define more forced actions on enum values
more like, 2.5 months :-)
pmichaud well, since I was sitting on a beach in Hawaii when that commit occurred, I think I can be excused for overlooking it. :-)
TimToady slacking off is always a valid excuse around here :) 16:09
masak "Perl 6: slacking off since 2000" 16:11
pmichaud laziness is a virtue :-)
ash_ my to do list is really lazy
masak my resumé is lazy. 16:12
ash_ mines just out dates :-(
takadonet moritz_: thanks. I noticed that was the issue when I saw the tests output
16:12 sundar joined
ash_ rakudo: try { 1 = 3; }; say $!; 16:13
p6eval rakudo 2ee5db: OUTPUT«Cannot modify readonly value␤»
masak rakudo: say $!
p6eval rakudo 2ee5db: OUTPUT«Any()␤»
masak rakudo: try { 1 = 3 }; say $!.backtrace
p6eval rakudo 2ee5db: OUTPUT«Method 'backtrace' not found for invocant of class 'Perl6Exception'␤ in main program body at line 22:/tmp/iJex0CSMqe␤»
masak rakudo: try { $!.backtrace }; say $! 16:14
p6eval rakudo 2ee5db: OUTPUT«Method 'backtrace' not found for invocant of class ''␤»
ash_ rakudo: class A { has $.HOW }; try { A.new(HOW => 1); }; say $!
masak you can get the error that says there's no backtrace method without a backtrace, if you want.
p6eval rakudo 2ee5db: OUTPUT«Type objects are abstract and have no attributes, but you tried to access $!HOW␤»
masak o.O
ash_ that error still confuses me
masak rakudo: class A { has $.foo }; A.new(foo => 1) 16:15
p6eval rakudo 2ee5db: ( no output )
masak seems .HOW is a special case here.
ash_ ya
16:16 MayDaniel_ joined
ash_ jnthn said its not actually a method/attribute you can control like that 16:16
but if he finishes his changes to nqp-rx adding the knowhow stuff it should work
pmichaud iirc, HOW is a macro.
(in the spec)
it's not a normal method. 16:17
ash_ are you supposed to be able to toy with it? 16:18
pmichaud if so, it probably won't be by simply declaring a new method or attribute
one would have to "toy with it" through the metamodel interface or something.
(that's my guess)
masak .can("HOW").() 16:19
16:19 cdarroch joined, cdarroch left, cdarroch joined
pmichaud note that $x."HOW"() would be a method call, however. 16:19
same with .WHAT and ."WHAT"()
16:20 risou joined
masak oh, that's far simpler, then. 16:20
pmichaud lunchtime here -- bbiaw 16:22
moritz_ does t/spec/S11-modules/require.t fail the third test for anybody else? 16:23
16:24 justatheory left
moritz_ (fails here on newest parrot) 16:24
16:29 envi left 16:30 sundar left
masak moritz_: yes, here as well. 16:30
pid.t properties-derived.rakudo require.t IO-Socket-INET.rakudo -- those are the ones with failed tests here right now. 16:31
16:32 baux left 16:34 sundar joined
moritz_ I now have a newer libicu, and properties-derived now also has some failures here 16:37
16:38 pmurias left 16:39 ggoebel joined, cggoebel joined 16:40 sundar left
dalek ast: 282b48b | moritz++ | S05-mass/properties-derived.t:
[properties-derived.t] fudge out tests that depend on particular (older) icu verisons
16:40
masak moritz_++
I'd really like to see the failcount reach 0 in some way. 16:41
it hasn't been for a while for me.
flussence does that affect those 9 tests that keep failing for me? 16:42
moritz_ flussence: there's an easy way to find out :-)
flussence righto 16:43
masak is the semantics of &goto doing tailcalls no longer with us in Perl 6?
moritz_ thinks so 16:44
masak then something is odd in the spec.
because the spec doesn't say that Perl 6 removes this behaviour, and S01 says that everything that's not mentioned is the same. 16:45
...as in Perl 5.
colomon masak++ 16:46
flussence was thinking of trying to port frozen-bubble to p6 today, then looked at the code...
moritz_ masak: S04 (iirc) describes the new semantics of Perl 5
erm
new semantics of 'goto'
so it's not the same as in p5 16:47
masak moritz_: describing new semantics is not the same as saying that old semantics are not still in effect. 16:48
I do agree in that &goto probably doesn't have this function any more.
but I think it's worth pointing out in the spec, it being what it is.
moritz_ masak: it describes what goto does. Since the description does not include things that goto in p5 does, it mean it's gone.
masak I don't buy that logic. 16:49
pack/unpack are barely described at all in the spec.
and yet we assume that they work mostly as in Perl 5.
moritz_ (which, IMHO, is also wrong)
masak at least one of those things have to be wrong if we're to be consistent. 16:50
dalek kudo: e9e7fca | moritz++ | src/core/Bool.pm:
implement Bool.Stringy
16:51
16:53 ruoso left
dalek rixel: 56c944f | diakopter++ | sprixel/ (4 files):
fix intervening-lexical-scope compile-time lookup/binding to "hidden-class" slots.
16:55
16:59 dakkar left
masak could someone compare and contrast callwith($args) and &?ROUTINE($args), please? 17:05
moritz_ Use of C<callwith> allows the routine to be called without introducing 17:07
an official C<CALLER> frame. For more see "Wrapping" below.
17:07 rgrau_ joined
masak so does use of &?ROUTINE, according to S06. 17:07
at least it talks about tail-recursion in relation to it.
moritz_ where?
hm 17:08
& temp &thermo.wrap( { callwith($^t + 273.16) } );
17:08 Axius joined
moritz_ in that case, &?ROUTINE would refer to the next outer routine, afaict 17:08
not to &thermo
S06:2697
masak right.
S06:2813: "C<&?ROUTINE> is always an alias for the lexically innermost C<Routine> [...], so you can specify tail-recursion on an anonymous sub" 17:09
"tail-recursion".
oh well, it probably won't hurt to keep both variants around. 17:10
17:12 stkowski joined
masak though I wonder why tail-recursion is emphasized there, since presumably execution proceeds after a &?ROUTINE call. 17:12
to me, just "recursion" would be less confusing in that paragraph.
moritz_ indeed
will you remove it? 17:13
TimToady feel free to fix it
flussence hm, this test run's stuck on t/spec/S09-typed-arrays/arrays.rakudo... 17:16
stuck after "not ok 35"
moritz_ flussence: is your t/spec/ a git or an svn repo? 17:17
flussence there's a .git in there
17:25 risou_ joined
masak fixes it 17:27
17:27 risou left 17:28 cls_bsd left, cls_bsd joined
dalek ecs: cb8c848 | masak++ | S06-routines.pod:
[S06] s/tail-recursion/recursion/

Because you can use &?ROUTINE calls in a non-tail position (and execution still carries on afterwards), it's really just normal recursion.
17:28
17:29 nymacro left 17:34 Italian_Plumber joined, Axius left 17:35 Italian_Plumber left 17:36 Italian_Plumber joined 17:42 Italian_Plumber left
dalek rixel: 1762ccd | diakopter++ | sprixel/ (7 files):
made short and long versions of name manglers
17:43
takadonet .. 17:44
17:47 LaVolta left 17:48 alester joined
diakopter takadonet: ? 17:51
takadonet diakopter: very quiet in here today 17:53
flussence hmm, that S09 test passed now. Guess I just didn't make-clean enough stuff the first time. 17:57
sorear good * #perl6
18:15 kst left 18:16 kst joined
masak good whatevah, sorear. 18:24
what's the behaviour of a call[with|same] inside an only sub? 18:26
PerlJam surely an exception? 18:27
or, I guess, it could be like goto &sub in perl 5, but with possibly different args.
(where &sub is the only in question) 18:28
Util rakudo: sub foo ( ) { say 2*$lexical }; my $lexical = 4; foo();
p6eval rakudo 2ee5db: OUTPUT«8␤»
masak both the call- and the next- forms mean "go to the next *candidate*" only the former means "and come back afterwards".
Util Why did that not err with "Symbol '$lexical' not predeclared in foo"? Known bug? 18:29
masak seems to me they either are not applicable within an only sub, or they follow some different rules.
Util: hm. maybe.
I'll check.
PerlJam rakudo: { say $a; my $a = 42; }
p6eval rakudo 2ee5db: OUTPUT«Any()␤» 18:30
masak :(
rakudo: say $a; my $a = 42
p6eval rakudo 2ee5db: OUTPUT«Any()␤»
masak at least there's an old possibly closed bug for that.
s/bug/ticket/ 18:32
Util It is like any var that exists in a scope is legal from the start of scope, instead of from the point of declaration. I am suprised there is no spectest for that. 18:33
18:33 kjeldahl joined
PerlJam rakudo: say $foo; { my $foo = 42 } 18:33
18:33 Trashlord left
p6eval rakudo 2ee5db: OUTPUT«===SORRY!===␤too few positional arguments: 2 passed, 3 (or more) expected␤» 18:33
PerlJam oops 18:34
rakudo: say $foo; if 1 { my $foo = 42 };
p6eval rakudo 2ee5db: OUTPUT«===SORRY!===␤too few positional arguments: 2 passed, 3 (or more) expected␤»
masak I can't find a ticket for it either.
PerlJam hmm
masak I'm almost sure we had one.
masak submits rakudobug
Util++
PerlJam masak: me too, I remember we talked about a similar (the same) bug a long time ago 18:35
sorear Util: it's a pretty deep-seated bug in PAST
masak someone else might have better luck than I finding it in RT.
I found quite a number of similar ones, but not exactly that one.
ash_ std: say $foo; if 1 { my $foo = 42 };
p6eval std 237d266: OUTPUT«===SORRY!===␤Variable $foo is not predeclared at /tmp/KLl0FzrmrH line 1:␤------> say $foo⏏; if 1 { my $foo = 42 };␤Potential difficulties:␤ $foo is declared but not used at /tmp/KLl0FzrmrH line 1:␤------> say $foo; if 1 { my
..$foo⏏[…
sorear masak: i think callwith/same goes and accesses the nearest dynamically enclosing multi or method
masak: remember, you can use it inside an if { }
masak sorear: an if is just a block, not a routine, though. 18:36
Util Thanks, everyone
18:37 icwiener_ joined
masak sometimes I think that [call|next][same|with] only solve one of two types of problems out there. maybe the other problem can be seen as the use case for &?ROUTINE. 18:37
namely, what if I want to *not* use the same candidate list as originally, but do a (possibly tail) call to the same routine, but with a new dispatch? 18:38
18:39 icwiener left 18:40 stkowski left
masak rakudo: { my $foo = 42 } 18:42
p6eval rakudo 2ee5db: ( no output )
masak rakudo: say $foo; { my $foo = 42 }
p6eval rakudo 2ee5db: OUTPUT«===SORRY!===␤too few positional arguments: 2 passed, 3 (or more) expected␤»
masak wtf?
rakudo: say $foo; {} 18:43
p6eval rakudo 2ee5db: OUTPUT«===SORRY!===␤too few positional arguments: 2 passed, 3 (or more) expected␤»
masak rakudo: say $foo;
p6eval rakudo 2ee5db: OUTPUT«===SORRY!===␤too few positional arguments: 2 passed, 3 (or more) expected␤»
masak submits rakudobug
18:43 stkowski joined
masak *sigh* 18:43
taking a guess, that seems to be an error that occurs during parsing while trying to print the real error. 18:44
taking another guess, it has to do with the Parrot String/Rakudo Str conversion not always being perfect. probably a .trans call or something. 18:45
TimToady rakudo: exit; say $foo;
p6eval rakudo 2ee5db: OUTPUT«===SORRY!===␤too few positional arguments: 2 passed, 3 (or more) expected␤»
masak would be nice if someone would do a bisect on this one.
TimToady: if &goto's tailcall semantics are gone from Perl 6, how do I say "tail-call [i.e. overwrite this stack frame] and redispatch"? 18:49
TimToady it's kinda supposed to do that automatically when it can, but we've have a .tailcall proposed from time to time; don't think it's made it to specland 18:50
masak IIUC, the thing about tail-call optimisations is that if you don't spec when it must be done, then some implementations will skip doing that, and then some programs will blow serious stack on those implementations. 18:52
18:53 slavik joined
TimToady that sounds about right :) 18:53
masak ok then. nothing to see here, move along.
TimToady but probably more along the lines of speccing all the things that can disable tailcall optimizations 18:54
masak like, having a statement or some other evaluation temporally after the call? :)
TimToady that would be one obvious way :) 18:55
18:55 cls_bsd left
masak likes obvious ways 18:56
18:56 cls_bsd joined
sorear well, the flip side of that is that, if you spec too many tailcall points, life gets seriously annoying for implementors not using assembly 18:58
masak rakudo: sub foo($x where { $x == $y }, $y) { }; foo(1,2)
sorear r5rs is an infamous offender here
p6eval rakudo e9e7fc: OUTPUT«Use of uninitialized value in numeric context in <anon> at line 22:/tmp/u16S1HF52n␤Constraint type check failed for parameter '$x'␤ in 'foo' at line 1:/tmp/u16S1HF52n␤ in main program body at line 22:/tmp/u16S1HF52n␤»
sorear writing Scheme implementations in C is hard because of ... the tailcall rules, and not much else
masak rakudo: our $c; class T { $c++ }; T.new 18:59
p6eval rakudo e9e7fc: ( no output )
masak rakudo: our $c; class T { $c++ }; T.new; say $c
p6eval rakudo e9e7fc: OUTPUT«1␤»
sorear OTOH, Perl 6 has already made my life horrible with &take, so tailcalls won't be too much worse ;)
masak closes rt.perl.org/rt3/Ticket/Display.html?id=69460
TimToady well, if we require implementation of .tailcall, it can't be too much harder to apply it as needed
19:00 kjeldahl left
sorear note that .tailcall is going to have some very dark-corners interaction with LEAVE, temp, etc 19:00
masak sorear: does your &take decontainerize?
TimToady LEAVE would be one of the things that disables it, presumably
sorear masak: as of yesterday, yes 19:01
ashleydev pointme: dalek
where's the code for the dalek bot? 19:02
TimToady unless we take a p5-ish scope stack approach and just keep accumulating LEAVEs separate from call frames, to all be unwound together
then you're only blowing the scope stack, not the call frame stack :)
masak could someone help save this ticket from limbo? rt.perl.org/rt3/Ticket/Display.html?id=73074 -- TimToady, what's the value of &foo if a sub foo has not been declared?
sorear++
diakopter ashleydev: it's based on botnix 19:03
masak phasers are still one of my mid-term goals for Yapsi. I'd like to explore them and reach conclusions that no-one has thought about yet.
diakopter but its custom modules are in perl6/ on github
masak std: &foo
p6eval std 237d266: OUTPUT«ok 00:01 118m␤» 19:04
masak TimToady: if all subs are lexical, why isn't the above a compile-time error/warning?
diakopter std: goto goto;
p6eval std 237d266: OUTPUT«ok 00:02 115m␤»
sorear goto goto; = &goto(&goto()) 19:05
it's going to fail at runtime (No candidate for &goto takes 0 arguments)
but it's syntactically fine 19:06
masak :)
19:08 bluescreen left 19:09 masak` joined
sorear twice the masak! 19:09
19:09 plainhao left 19:10 bluescreen joined
masak` apologies -- network trouble. 19:11
19:11 masak left
sorear Who remembers anything about infix:+ ? 19:11
I see the bracketless syntax occasionally
masak` I remember.
sorear something about it says "fossil"
masak` it's from the days of the Apocalypses.
PGE has the operators that way as well. 19:12
sorear I see.
TimToady std: my $fooʹ = 42; say $fooʹ;
p6eval std 237d266: OUTPUT«ok 00:01 118m␤»
TimToady perl6: my $fooʹ = 42; say $fooʹ;
p6eval pugs, rakudo e9e7fc: OUTPUT«42␤»
sorear unrelatedly: infix:<but> means I need to have a role composer lying around at runtime.
sorear doesn't want to write a second one for the compiler 19:13
masak` the compiler is just an early form of runtime :)
sorear well, for niecza it's a bit unpleasant, since the compiler is Perl 5 and the runtime is C#/Perl 6 19:14
moritz_ sorear: for eval() you also need a role composer :-)
sorear eventually I'm hoping to have the compiler in (portable) Perl 6 too
TimToady .u ʹ
phenny U+02B9 MODIFIER LETTER PRIME (ʹ)
masak` rakudo: role B { method x { say "OH HAI" 19:15
p6eval rakudo e9e7fc: OUTPUT«===SORRY!===␤Unable to parse blockoid, couldn't find final '}' at line 22␤»
masak` argh.
19:15 masak` is now known as masak
sorear pretty decent error message 19:15
masak for once :)
moritz_ well, it would be nice to tell us what it found instead
TimToady std: role B { method x { say "OH HAI" 19:16
masak rakudo: role B { method x { say "OH HAI" } }; my $foo; eval q[$foo does B]; $foo.x
p6eval std 237d266: OUTPUT«===SORRY!===␤Unable to parse block at /tmp/Dd1GP8rJdo line 1:␤------> role B { method x ⏏{ say "OH HAI"␤Couldn't find final '}'; gave up at /tmp/Dd1GP8rJdo line 1 (EOF):␤------> role B { method x { say "OH HAI"⏏<EOL>␤
..expec…
rakudo e9e7fc: OUTPUT«Method 'x' not found for invocant of class ''␤ in main program body at line 22:/tmp/1mMLo60BdJ␤»
masak should the above work?
diakopter .u 았
phenny U+C558 HANGUL SYLLABLE ASS (았)
masak rakudo: role B { method x { say "OH HAI" } }; my $foo = 42; eval q[$foo does B]; $foo.x
p6eval rakudo e9e7fc: OUTPUT«OH HAI␤»
masak here on the channel, we try not to be 았-holes. 19:17
19:19 burning_aces joined 19:23 _twitch left 19:26 ggoebel left, cggoebel left 19:28 risou_ left, ggoebel joined, cggoebel joined 19:29 cls_bsd left, cls_bsd joined
masak rakudo: say &foo.WHAT 19:29
p6eval rakudo e9e7fc: OUTPUT«Could not find sub &foo␤ in main program body at line 22:/tmp/Ry6az95fgz␤»
masak since no-one has spoken up, let me propose (1) that the use of an undeclared &foo be caught at compile time, and (2) that we find some better way to ask the question "is there a sub named &foo in this scope?" 19:31
sorear niecz: &foo 19:32
niecza: &foo
p6eval niecza 0fa6f23: OUTPUT«Internal error: failed to resolve lexical &foo in mainline at /home/p6eval/niecza/src/CSharpBackend.pm line 296.␤»
sorear ?
moritz_ std: &foo 19:34
p6eval std 237d266: OUTPUT«ok 00:01 118m␤»
sorear moritz_: I am confident that is a bug.
masak that what is a bug? STD.pm6's response? 19:35
19:36 dju joined
sorear yes 19:36
&foo and $foo go through different code paths in STD 19:37
because the stuff after &foo is parsed as a category as well as a desigilname
it looks like the check_variable call is missing in the &foo case
19:39 dju left
masak pls fix :) ++sorear 19:40
19:40 dju joined
sorear STD.pm6 falls into the "I don't understand it well enough to fix it on the first try, and I don't have the patience to fix it 10 times at 5 minutes per rebuild" category. :/ 19:43
masak fair enough. I can respect that. :) 19:45
19:49 buubot left
masak anyway, it seems I can close #73074, because the old alpha behaviour doesn't adhere to what STD.pm6 would do, were it bug-free. 19:53
19:55 buubot joined, burning_aces left
Tene std: my $fooʹ = 5; 19:57
p6eval std 237d266: OUTPUT«ok 00:01 117m␤»
Tene rakudo: my $fooʹ = 5; say $fooʹ; 19:58
p6eval rakudo e9e7fc: OUTPUT«5␤»
Tene Nice.
sorear .u ʹ
phenny U+02B9 MODIFIER LETTER PRIME (ʹ)
masak std: my $fooʹʹʹʹʹ = 5 19:59
p6eval std 237d266: OUTPUT«ok 00:01 118m␤»
TimToady phone 20:00
std: my $foo-ʹ = 42; say $foo-ʹ; 20:01
p6eval std 237d266: OUTPUT«ok 00:01 118m␤»
TimToady std: my $foo'ʹ = 42; say $foo'ʹ;
p6eval std 237d266: OUTPUT«ok 00:01 118m␤»
20:04 kst left, kst joined 20:10 ggoebel left, cggoebel left 20:13 ggoebel joined 20:15 cggoebel joined, MayDaniel_ left 20:19 cggoebel left, ggoebel left 20:21 orafu left 20:23 orafu joined, cognominal joined 20:24 ggoebel joined, cggoebel joined, tadzik left 20:26 cggoebel left, ggoebel left 20:28 stkowski_ joined 20:29 stkowski left, stkowski_ is now known as stkowski 20:30 mfollett left 20:31 fuad joined
fuad hi 20:31
masak fuad! \o/ 20:32
fuad hey masak:)
20:32 ggoebel joined, cggoebel joined 20:33 alester left
Tene fuad! 20:34
fuad Tene ,yo:)
20:35 bluescreen left 20:36 aloha left
sorear Hello! 20:36
20:39 Mowah left
masak meanwhile, here at the .nl hackathon, we have a new suggestion for the name of "the sub which would be the opposite of &slurp": &clobber 20:40
any takers?
ash_ whats the opposite of slurp supposed to do? 20:43
put a bunch of text into a file?
masak aye.
potentially overwriting old content.
PerlJam I'm not sure that particular semantic is opposite of slurp, but it sounds like a good name anyway 20:44
frettled masak: &splur;
masak I think I'd like to see a "/path/to/file".IO.clobber($text) form
masak slaps frettled :)
ash_ what about something like: write-over, overruled, barf, spew, write, print, say :P
TimToady stuff
PerlJam &vomit
frettled &purls?
PerlJam :)
frettled hopes for another slap.
masak PerlJam: I had forgotten about that one. you insolent clod. :P
frettled ash_, PerlJam: high five! 20:45
mberends slaps frettled with a wet fish. frettled: enjoy!
frettled yummy.
20:45 f00li5h joined
masak ok, all you smug bikeshedders. forget I ever mentioned it. :) 20:45
frettled &tool8 20:46
masak std: &tool8
p6eval std 237d266: OUTPUT«ok 00:01 118m␤»
ash_ "/tmp/big-file.bak".spew(curl.the-internet);
masak ash_: needs an .IO in there for sanity.
ash_ good point
masak ash_: it's an operation on a file, not on a Str.
std: &subroutine-lookup-bug 20:47
ash_ ya, i remebmer that change now
p6eval std 237d266: OUTPUT«ok 00:01 118m␤»
ash_ remember*
frettled std: &°
p6eval std 237d266: OUTPUT«===SORRY!===␤Non-declarative sigil is missing its name at /tmp/DanWcR4Vnf line 1:␤------> <BOL>⏏&°␤Preceding context expects a term, but found infix & instead at /tmp/DanWcR4Vnf line 1:␤------> <BOL>⏏&°␤Parse failed␤FAILED
..00:…
frettled std: &C™
p6eval std 237d266: OUTPUT«===SORRY!===␤Confused at /tmp/T2vrgOqktB line 1:␤------> &C⏏™␤ expecting any of:␤ POST␤ bracketed infix␤ infix or meta-infix␤ postfix␤ postfix_prefix_meta_operator␤ statement modifier loop␤Parse failed␤FAILED
..00:01 120m␤»
frettled *sniff*
20:48 cggoebel left, ggoebel left, aloha joined 20:50 bluescreen joined
Tene masak: I've seen "spew" used in plenty of places. 20:54
Str.spew(IO); IO.spew(Str); # not possibly confusing to anyone ever 20:55
masak Tene: right. the reason we advocate &clobber is that it contains a clue as to what happens if a file is already there. 20:56
Tene masak: or you could support different write modes.
create, truncate, append
masak I'm unfamiliar with the middle one. 20:57
Tene replace?
overwrite?
masak ah; and the first one dies if something's there?
Tene Yes.
masak since it's supposed to be a tool for simplicity, it feels wrong to provide it with a lot of options.
Tene The second fails if nothing is there.
20:58 Entonian left
masak and if you genuinely don't care? 20:58
Tene Then you probably want both.
I expect that that's probably the most-expected default.
masak already, we've moved quite some distance away from the simplicity of &slurp.
Tene Sure. 20:59
20:59 pythonian4000afk is now known as pythonian4000
PerlJam clobber works for me. :) 20:59
masak I think this is the fundamental problem with a hypothetical &spew function.
(and that's what &clobber attempts to solve)
if you do want finer-grained control, there's .open, .print and .close :)
frettled It's clobberin' time! 21:00
Tene clobber(..., :append) might be nice, but seems a little semantically weird
frettled masak: I can see the use for a thing that spews a whole bunch by appending, though.
PerlJam frettled: $hulk.smash($filename) # ;-) 21:01
frettled :D
Tene I do agree that requiring mode specification would be too much. Just trying to speculate if there's a simple way to reduce some errors.
masak "my &clobber function overwrote my old file!" -- "nuh, yah..."
Tene That function is already pretty firmly established in my mind as 'spew', though, so I'm not much help at speculating optimal names.
masak I hereby banish anyone with a gross liquid-related name for the function into a predeclared module for all eternity. 21:02
Tene That seems like a pretty weird sort of thing to worry about, to me. It would not have occurred to me to be concerned that someone might mistake an IO function for not doing IO? I'm not sure what the speculated mis-thought is.
masak the speculated mis-thought is about the failure modes of such a function. 21:03
Tene One slightly unusual IO failure mode I've seen before happens with people who always quit vim with ":wq!" every time with the ! 21:04
in the case that you don't have write permissions on the file, but *do* have write privs on the directory it's in, and you include the !, vim will delete the file and create a new one, thereby changing ownership of the resulting file. 21:05
Not something I think we're likely to do, just an associated memory.
masak I'm too stupid to connect the dots right now. but thanks anyway :)
21:06 icwiener_ left
sjohnson p6 friends 21:06
masak sjohnson! \o/
frettled Tene: but you're raising an interesting question: will &clobber clobber a file you don't have permissions to, if you have permissions to remove it from the directory? 21:07
sorear I propose slurp("foo") = "bar"
Tene frettled: *that* name suggests that it would try to do whatever it can.
21:07 ggoebel joined, cggoebel joined
Tene I recommend against it, though. 21:08
sorear or "foo".IO.contents = "bar"
frettled Tene: no, it does not quite suggest that
sorear Do subtypes have type objects?
sjohnson yo
frettled unlinking the file is not what happens when you "clobber" a file in normal unix operations, AFAIK.
masak sorear: I think so.
sorear masak: S12 hints that , as parameters, Foo :$bar where ... and SubFoo :$bar are identical 21:09
masak sorear: not sure that's related. 21:10
but yes, in a way they are.
sorear masak: in the not-passed case, should the anonymous subtype of the former have a type object of its own, or just use Foo?
masak subtypes are just condensed where clauses on nominal types.
it's a bit like the surreal numbers, in which a real number can have some infinitesimals clutching onto it. 21:11
21:21 stkowski_ joined 21:22 fuad left 21:25 stkowski left, stkowski_ is now known as stkowski 21:26 kst left 21:27 ggoebel left, cggoebel left 21:29 bluescreen left
mberends rakudo: say %*ENV.exists('PERL6LIB'); say %*ENV<PERL6LIB>.defined; say %*ENV<PERL6LIB>; 21:31
p6eval rakudo e9e7fc: OUTPUT«Bool::True␤Bool::True␤lib␤»
21:32 kst joined
mberends rakudo: say %*ENV.exists('FOO'); say %*ENV<FOO>.defined; say %*ENV<FOO>; 21:34
p6eval rakudo e9e7fc: OUTPUT«Bool::False␤Bool::True␤␤»
masak submits rakudobug
mberends++
21:35 _kaare left
diakopter was clobber selected? 21:37
or are suggestions still being taken?
masak no conclusion has been reached.
I know an overwhelming acclaim when I see one :) 21:38
diakopter noise & attention aren't acclaim
mberends clobber does not describe what happens in the create new file scenario.
masak diakopter: exactly.
diakopter oh, I see 21:39
TimToady mentioned stuff
on that note, I suggest jam
masak both feel mostly non-verby to me...
diakopter ??
mberends "put"
diakopter they're both verbs that require indirect objects
masak yes.
but they are chiefly nouns. 21:40
fsvo "chiefly"
diakopter I heartily disagree
masak adds a notch to the bikeshed board
sorear diakopter: &spew was selected long ago 21:41
bikeshedding at this point is just a harmless diversion, with no effect on anything
masak in what sense what &spew selected long ago? 21:42
I don't see it in the spec.
diakopter that's just plain wrong. things in the spec are changed quite often.
sorear but not as a result of bikeshedding
diakopter None Dare Call It Bikeshedding
masak s:2nd/what/was/ 21:43
diakopter Anyone can call something bikeshedding to slight the topic.
apparently.
frettled Are we going to bikeshed about bikeshedding now?
masak it doesn't take much to actually make it bikeshedding.
I draw the line at about four or five name proposals, which were quickly reached in this case. 21:44
claiming that that's not bikeshedding is just meta-bikeshedding.
diakopter then you should have told everyone on the channel that any further attempts to name it would be considered bikeshedding by you.
especially when asked directly by me. 21:45
masak I wasn't aware that everyone else would be so interested in what I consider bikeshedding.
I'll know that till next time.
let's talk about sorear's claim that &spew was decided on long ago instead. 21:46
frettled Not that there's anything wrong with that.
dukeleto wonders: who will bikeshed the bikeshedders?
masak that seems to be a slightly more productive line of thought.
diakopter agrees
masak sorear: what in the world do you mean, and how?
21:46 xinming_ joined
frettled I present the following evidence that spew is something else ;) :www.perlmonks.org/?node_id=124838 21:47
21:48 xinming left
frettled Seriously, though: "spew" is often used as the opposite of "slurp", it seems that there is a good case for using that. 21:48
diakopter even if sorear is right that spew was selected, that doesn't mean that synopsis was rolled up and sealed with wax
frettled Additionally, it's merely four letters long, whereas "clobber" is seven. If there is no particularly good reason for selecting the longer name, then the longer name loses with pragmatists like me. 21:49
21:49 SAABHSN joined, PAA9G8H joined
frettled diakopter: it may have been sealed with spew, however ;) 21:49
diakopter heh
frettled …I hope nobody lost their meal over that. 21:50
masak diakopter: there's no "spew" in the synopses.
frettled: there is a good reason for selecting the longer name. 21:51
sorear there is, however, spew in viv
masak viv isn't spec, and especially not in that sense.
frettled: "spew" might as well mean "create a new file" as "append to an old file". "clobber" unambiguously means "overwrite any old file". 21:52
diakopter it was in gen_mutable_pmc.pl in parrot
(as added by jnthn) 21:53
masak ok.
frettled masak: not quite unambiguously, as per my concern, and apparently also mberends's concern.
mberends masak: %*ENV and 'use' strange behaviour: gist.github.com/614159 21:54
masak mberends: thanks.
masak submits rakudobug 21:55
mberends++ 21:56
22:01 jferrero joined 22:05 ggoebel joined, cggoebel joined 22:11 leprevost joined 22:25 Ross left 22:35 leprevost left, szabgab joined 22:37 ruoso joined
dalek ecza/master: 53a549d | sorear++ | / (2 files):
Hack importation of classes into working
22:39
ecza/master: 6dbac00 | sorear++ | / (4 files):
Move MRO calculation to compile time
masak blogged: strangelyconsistent.org/blog/to-tak...-of-bitrot 22:40
zzz & 22:43
22:43 masak left 22:54 kst left, kensanata joined, kst joined 22:55 buu left, buu joined 22:56 alester joined 22:57 Italian_Plumber joined 22:58 Italian_Plumber left 23:00 Raynes left 23:05 Raynes joined 23:11 wamba left 23:12 stkowski_ joined 23:15 stkowski left 23:17 stkowski_ left, jaldhar joined 23:22 Italian_Plumber joined 23:24 kensanata left 23:25 jferrero left, Italian_Plumber left 23:30 xabbu42 left 23:42 HarryS joined, HarryS left 23:47 HarryS joined 23:48 rgrau_ left