»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
Set by moritz on 22 December 2015.
timotimo masak: i just pushed a branch that adds POSTBUILD 00:13
mst tadzik: you still awake? 00:14
timotimo i haven't tested how it behaves with regards to subclasses/superclasses
mst tadzik: ^^ timotimo made us a branch to play with 00:15
timotimo it took literally two lines of code to get you what you want 00:16
plus whatever is necessary to make it behave right in every corner case you can come up with
AlexDaniel oh, somebody finally implemented POSTBUILD? 00:22
mst apparently
AlexDaniel: ohai, did you get a ticket number yet? 00:23
AlexDaniel mst: no response yet
mst can you forward me the original email?
AlexDaniel sure
… what's your email? :) 00:25
mst [email@hidden.address]
AlexDaniel done 00:26
AlexDaniel hides
mst note that if your email wasn't "please can we have the button back" but instead cranky 00:27
I'll be expecting you to provide a written apology before I can get anything fixed
[Coke] is this on top of the email I sent?
I can forward you that one as well, mst. 00:28
mst please, assuming this is about the 'create ticket' button being disabled and the possibility of whitelisting some users
AlexDaniel mst: I think my email is alright, but I'm still expecting you to scold me 00:29
mst I suspect the person I'm going to have to nudge is somebody who's, well, more attuned to #perl6 levels of niceness than my normal attempts at nice 00:30
basically "if you were less nice than masak, you've probably made it worse" applies :P
AlexDaniel is still unsure what could possibly be wrong with “GET MY BUTTON BACK, NOW!” in terms of neceness 00:32
mst er, because the button was disabled due to a massive spam blast
again, you can't just have the button back
AlexDaniel i*
mst unless you're volunteering to go through every newly filed ticket for perl5 -and- perl6 and triage for spam 00:33
mst what -may- be possible is getting the button back for whitelisted users, which is what I told you to ask for, nicely 00:33
AlexDaniel … that's what I've been doing for quite some time…
not perl5 tickets though
mst yeah, and that's what got screwed 00:34
BenGoldberg m: { my $foo = 1; sub OUTER::bar { say ++$foo }; bar for ^3; 01:36
camelia rakudo-moar 9f9452: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Cannot use pseudo package OUTER in sub declaration␤at <tmp>:1␤------> 3{ my $foo = 1; sub OUTER::bar7⏏5 { say ++$foo }; bar for ^3;␤»
BenGoldberg m: { my $foo = 1; OUTER<&bar> = { say ++$foo } }; bar for ^3; 01:37
camelia rakudo-moar 9f9452: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Undeclared routine:␤ bar used at line 1. Did you mean 'VAR', 'bag'?␤␤»
BenGoldberg m: sub bar; { my $foo = 1; OUTER<&bar> = { say ++$foo } }; bar for ^3; 01:38
camelia rakudo-moar 9f9452: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤A unit-scoped sub definition is not allowed except on a MAIN sub;␤Please use the block form.␤at <tmp>:1␤------> 3sub bar;7⏏5 { my $foo = 1; OUTER<&bar> = { say ++$f␤»
BenGoldberg m: sub bar {...}; { my $foo = 1; &bar = { say ++$foo } }; bar for ^3; 01:38
camelia rakudo-moar 9f9452: OUTPUT«Cannot modify an immutable Sub␤ in block <unit> at <tmp> line 1␤␤»
BenGoldberg m: sub bar {...}; { my $foo = 1; &bar := { say ++$foo } }; bar for ^3;
camelia rakudo-moar 9f9452: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Cannot use bind operator with this left-hand side␤at <tmp>:1␤------> 3; { my $foo = 1; &bar := { say ++$foo } 7⏏5}; bar for ^3;␤»
samcv how do i upgrade all packages with never versions using panda? 02:13
seatek last i looked panda couldn't do that - you just install one again that you want to update. 02:14
samcv yeah that's what i thought : 02:15
:
:\
AlexDaniel :𝀨 02:17
mst samcv: so generate a list of all packages installed, and re-run an install for them
samcv yeah that's what i was about to do
mst that's basically the easy way to upgrade a local::lib in perl5
not sure how that's :/ really
samcv well if i rerun install it'll install it again even if it's not a newer version right? 02:18
mst why?
samcv well there's a --force option so maybe it only reinstalls if it's changed. i will see
mst exactly
try and avoid imagining extra problems that don't exist - programming is hard enough when you only have to deal with the real ones.
seatek i need all my cpu cycles to search for aliens with seti 02:19
mst you need all your brain cycles to deal with real problems
rather than extra ones you made up :P
seatek :)
mst certainly I do, at least
maybe you have more than me
samcv i am all for that
seatek i loose them all over the place
AlexDaniel well no, of course it is a problem that should be solved
seatek or lose. not sure which
samcv probably 'lose' :P 02:24
unless your problems are loose 02:25
mst AlexDaniel: the fact panda doesn't reinstall things that are already up to date is a problem how?
samcv that's not a problem mst
mst samcv: he just said it's a problem that should be solved
I'm asking him why
gfldex i know that zef doesn't look for version numbers. Does panda? 02:26
samcv well my issue was that it downloads and runs tests on thinks that are already at the same version
and then when trying to install it, it 'throws'
mst samcv: it does?
ooooh, wat
samcv so guessing it doesn't actually install it since it's the same
mst huh, that's ... yeah
seatek a WASTE OF CPU CYCLES!
samcv yes
AlexDaniel samcv: by the way, zef has “upgrade” command. It is marked as “beta”, so not sure if it works well enough
mst goes back to hating everything until he gets round to writing his own 02:27
seatek hehe
i was wondering if there was a standard place/requirement for version numbers in the packages 02:28
samcv zef should be able to manage packages as panda does right? or does panda rely on its own database?
of files/packages installed 02:29
ah no it doesn't seem to. seems to be totally seperate 02:31
ugexe zef will see any modules installed regardless of the installer. panda will see any modules installed by panda 04:25
gfldex: zef does check for version numbers on dependencies, just not on explicit requests 04:29
i dont even remember why it doesnt do it for explicit requests anymore - I think it had to do with :version<*> 04:31
github.com/ugexe/zef/blob/master/l...#L109-L111 04:32
ugexe `zef upgrade` should work for the most part too (see: gist.github.com/ugexe/78ac39353d70...55efb69af) 04:52
ugexe yeah a request for `My::Module` will be turned into `My::Module:ver<*>`, and if there is already a version * installed that doesn't mean its the same version as what will end up being installed 04:56
ugexe if zef finds a :ver<*> of something that is already installed as :ver<*> it can't just skip it. its up to the user to use --force to acknowledge this situation 04:59
otherwise rakudo could not throw an exception for :ver<*> thats already installed 05:00
(the exceptions mentioned earlier are thrown by rakudo, not panda) 05:01
anyways zef should already handle all of this - it just requires the right command 05:02
tbrowder hi #perl6 07:36
i'm having fits with Array and Lists and need help 07:37
what i want is to use, say "@arr", as an arg in a multi sub. in one it should be used in the sub as a copy. in the other sub is should be used effectively as rw, i.e., mutable. in all cases, the elems are simple strings, nothing fancy. i've tried explicitly typing as an Array, a List, and no typing. 07:42
tbrowder question: is there a simple way to distinguish between the two uses in the sub signatures? 07:44
moritz sub f(@a) { } # rw 07:45
sub g(@a is copy) { } # copy
tbrowder moritz: ok, i've tried that at one point but got into trouble when i started using the types. i'll go back to the lab. thanks. 07:47
tbrowder i think the trouble is in how i generate @arr. i do it programmatically with push, and when used as an arg i get error: replace this Array is copy logic 07:58
so how can i generate the @arr the simple 07:59
tbrowder *simplest way? coercion? if so, in caller land (would rather not if possible)? 08:01
moritz m: sub f(@a is copy) { @a[0] = 42 }; my @b = 1..3; f(@b); dd @b
camelia rakudo-moar 9f9452: OUTPUT«Array @b = [1, 2, 3]␤»
moritz tbrowder: sorry, I can't comment on code I don't know
tbrowder i understand, but it looks like you start with an explicit assignment to the first element. i'll try that and come back with a simple gist next time if that doesn't work. thank you, moritz! 08:04
moritz m: sub f(@a is copy) { @a.push: 42 }; my @b = 1..3; f(@b); dd @b 08:05
camelia rakudo-moar 9f9452: OUTPUT«Array @b = [1, 2, 3]␤»
stmuk www.youtube.com/watch?v=wSk1HHHXWis 08:47
errr si
stmuk Tal vez unos seis 08:51
FROGGS o/ 09:38
tbrowder moritz: still getting weird results--working on smallest example to show problem (probably not fully understanding diff between Array and List, especially in Signature). 12:38
tbrowder moritz: light bulb goes on: by declaring all arrays involved as Str all problems went away!!! thanks for hints. [SOLVED] 13:02
Herby o/ 14:16
yoleaux 18 Feb 2016 06:56Z <AlexDaniel> Herby: I cannot find any meaningful way to get diagonals…
AlexDaniel 18 Feb?… 14:17
nice
Herby I think its because I've been having to use a variation of Herby__
but thanks for the diligence, yoleaux
:)
Rotwang Hi, I wonder what's the relationship of nqp to say rakudo. As I understand it right now rakudo has moarvm specific code that implements perl6. 15:25
but where does nqp comes into play?
s/comes/come
FROGGS nqp is a sort of glue language 15:26
it is more easily portable to other virtual machines as rakudo 15:27
so you port nqp first, and then use nqp (which is a compiler toolkit after all) to build rakudo
Rotwang so if I wanted to add a new backend, I'd port nqp to it first 15:28
timotimo hm. no comments yet about POSTBUILD 15:30
DrForr NQP is "Not Quite Perl (6)". 15:39
timotimo Rotwang: in theory, rakudo could be fully bootstrapped and we could cut out NQP completely. that's a pretty daunting task, though, and it'd likely lead to the compiler becoming drastically slower 15:43
AlexDaniel timotimo: where are you expecting these comments to appear? 16:22
timotimo irc would be good enough 16:28
pmurias Rotwang: both nqp and rakudo compile down to QAST so if you port nqp first you then can reuse code when porting rakudo 16:29
Rotwang pmurias: qast is moar specific representation? 16:34
moritz no, QAST is backend independent 16:35
the next stge in the pipeline, MAST, is MoarVM specific
*stage
timotimo right. we also have PAST for parrot and JAST for the jvm 16:36
and i suppose JSAST?
Rotwang timotimo pmurias moritz: thanks for answers! 16:38
TimToady I would call it TWEAK, not POSTBUILD 16:39
TimToady since tweaking is what you're doing; you aren't "postbuilding" 16:40
timotimo a comment! hooray!
well, renaming it will be the easiest thing ever
did you see, the commit is only like 3 lines
i hadn't realized that two people have been wishing for this for like years 16:41
TimToady hasn't backlogged -dev yet...
timotimo nothing about that branch in -dev, though
TimToady the checking message? 16:42
timotimo ah, the check-in message
TimToady *in
timotimo yes, of course
github.com/rakudo/rakudo/commit/fdc90a2e76 - just a single commit
TimToady I presume it respects submethod correctly? 16:43
since tweaks are still infrastructural for the exact class 16:44
timotimo it's the exact same logic for BUILD, actually
TimToady and we wouldn't want to call the same tweak multiple times during constuction
okay, good
timotimo if you don't define it as a submethod, you're going to get the same weirdness as with BUILD
PerlJam What's the use-case for POSTBUILD/TWEAK ? 16:47
TimToady always running the attribute defaults first 16:48
timotimo well, not just "first"
having a BUILD will disable a bunch of features
so if you just want a single thing to happen after BUILD runs, you'll have to re-type all the attribute names in the BUILD signature 16:49
else, you'll lose all the data
PerlJam hmm.
yeah, that's been wanted for a long while. timotimo++ 16:50
TimToady BUILD gives you complete control of everything, except we do not yet have a verb that says "evaluate the attribute defaults right now"
(which would essentially turn the rest of the BUILD into tweaks) 16:51
timotimo BUILDBUTWITHOUTTHEHASSLE
moritz also, BUILD prevents the default binding of named args to .new() to attributes
timotimo that's what i meant :)
moritz which is kinda annoying, where "kinda" means "really" :-)
timotimo well, i'm glad people are saying positive things now :) 16:52
DrForr Well, the elections are almost over :) 16:54
TimToady you'd think we were electing the new world dictator or somethin' 16:55
PerlJam both POSTBUILD and TWEAK strike me as sub-optimal names. But I don't have anything better. It kinda fits the space of what I would have called "init", but having an INIT method might just be a tad confusing ;)
s/method/submethod/
TimToady that's why we called it BUILD instead
and "init" is also ambiguous as to whether it's pre- or post- default 16:56
AlexDaniel POSTBUILD is a bit too long
TimToady whereas "tweak" has heavy connotations of "most of the heavy work is done already" 16:57
TIDYUP is a bit unweildy
*wield 16:58
moritz POSTINIT
AlexDaniel /o\
TimToady no nouns
moritz NONOUNS 16:59
AlexDaniel \o/
moritz ok, now I'm just tolling
*trolling
PerlJam THINGTHATHAPPENSPRIORTOOBJECTUSE
PerlJam maybe PREPARE 17:00
PerlJam or STAGE (you build a house, then you stage it for viewing :) 17:04
moritz but it sound like PREPARE comes before BUILD
timotimo this discussion is why it was never implemented, afaik 17:05
AlexDaniel if that is a problem, just called it TWEAK
PerlJam timotimo: I always thought that it was because we were trying to make BUILD do double duty
AlexDaniel (because rule #1)
TimToady well, but I agree with mst that BUILD { ...; dodefaultsnow; ... } is probably about one word too many 17:07
I just think that POPULATE and BUILD really mean the same thing, and it would be better to give a more descriptive name to the other thing 17:08
PerlJam SET SETUP
TimToady slightly too overloaded, I suspect 17:09
and too much like nouns...
PerlJam CONFIG 17:10
TimToady (not that "tweak" can't also nounify, but it feels more verby to me)
that bikeshed is puke colored
timotimo so i rename it TWEAK and we cool?
TimToady dunno, we might be any or mu instead 17:11
timotimo we could name the submethod MOO 17:12
PerlJam heh
timotimo that's totally a verb
moritz ADJUST is less noun-y than TWEAK, right? 17:13
PerlJam TIDY
TimToady adjust is what accountants do 17:14
moritz that suggests all the changes in there are cosmetically
PerlJam ADAPT
TimToady tidy is fundamentally an adjective that can be verbed, but usually only with "up"
"adapt" means it wasn't intended in the first place
AlexDaniel TUNE?
lucs HONE? 17:15
PerlJam (clearly I'm exploring all of the bad ideas so that we know that TWEAK was right all along )
lucs: we like our objects sharps?
er, sharp
PerlJam CONS, CTOR ;-) 17:16
TimToady does not dignify that with a response... 17:17
timotimo how about RIGHT
that's totally a verb!
TimToady so's TWERK but we're not using that one 17:18
timotimo does this actually come with a language version change requirement? 17:19
seatek is this for a method to FIDDLE with attributes *after* they are auto-constructed with the normal BUILD process?
timotimo yeah, but you can do more than just FIDDLE, you can totally MESSWITH all the attributes 17:20
dalek c: 027db9e | gfldex++ | doc/Type/IO/ (2 files):
doc file test methods e,d,f,s,l,r,w,x,rw,rwx,z for IO::Path and
TimToady timotimo: I don't think so, since we feebly reserve ALLCAPS methods
timotimo well, but you probably want the script to complain early if your TWERK submethod won't even be run
PerlJam ANOINT :) 17:21
timotimo rathen than just not behaving right
PerlJam (I was going to suggest ALTER, but that made me think of ALTAR, so ...) 17:22
timotimo SACRIFICE
TimToady very few verbs for change imply that the old form was almost-very-nearly-but-not-quite perfect 17:23
that's why we have the word "tweak"
seatek TWEAK made me think of the right thing 17:24
PerlJam timotimo: so ... call it TWEAK and we're good :)
TimToady yeah, just tweak your patch :P 17:25
PerlJam timotimo++ and TimToady++ for enduring the bikeshed
TimToady it was an almost very nearly but not quite perfect bikeshed
timotimo done 17:28
moritz timotimo++ 17:30
skids
.oO(finesse)
17:36
timotimo now we just need someone to write a few tests, including how it behaves with subclasses/superclasses :) 17:41
pmurias mst: any progress on packaging up rakudo for cpan? 17:43
timotimo anything preventing us from just merging that branch already? 17:51
AlexDaniel we will know once it is merged :) 17:59
timotimo pff :) 18:00
pmurias timotimo: we don't have JSAST 18:17
timotimo: well, there are Chunks which are (js code + source map info + some type info) 18:18
timotimo ok 18:19
dalek c: cd799dc | coke++ | doc/Type/IO/ (2 files):
fix spelling
18:37
c: 5983d92 | coke++ | doc/Type/IO/ (2 files):
use preferred spelling
RabidGravy I can't believe people are using Adobe Flash for critical things in 2016 18:43
AlexDaniel RabidGravy: critical things like? 18:44
RabidGravy Mrs Gravy has a new job at a well known retail chemists and they do their entire "onboarding" process in a bunch of flash forms 18:45
we can't find a browser in which some of them work
RabidGravy I mean I was arguing with web developers fifteen years ago that is was a bad thing to use for user interfaces 18:47
AlexDaniel oh, but it's probably just some old stuff. For some reason I expected something like “In 2016, team X had a long discussion on what they should use. After comparing all alternatives, they decided to use Flash” :) 18:48
RabidGravy oh it's definitely some old stuff, it's served from some "Java Server Pages" and everything :-O 18:49
pmurias RabidGravy: Flash was one of the despicable things I was writing in 2015 at my previous job :/ 18:59
s/Flash/ActionScript/ 19:00
RabidGravy pmurias, I think I have avoided it completely all these years 19:35
pmurias RabidGravy: lucky you 19:42
pmurias RabidGravy: it's been re-focused as an animation tool nowdays which seem much more fun then doing uis in it 19:51
AlexDaniel can it output svg files? 20:07
pmurias AlexDaniel: I haven't used flash for anything beyond creating crappy uis 20:13
ajr_ I've just download 2016.10 to a Raspberry Pi 3, and the process appears to be stalled. It's spent 15 minutes at what I suspect is creating moar. 20:47
The machine appears to be completely locked. If I have to kill it, is there a restart point?
timotimo what did you use to build it? just Configure.pl --gen-moar or something? 20:48
ajr_ perl Configure.pl --gen-moar --gen-nqp --backend=moar 20:51
gfldex ajr_: expect it to take 2 hours to build. There is no JIT for arm yet
timotimo OK. the individual phases all look different from each other
if it's just a bunch of rather short lines with paths, that's moar being built
if it's a bunch of lines that span multiple lines on screen, it's either nqp or rakudo. if any of it contains the word "stage" (stage0, stage1, stage2), it's nqp. otherwise it's rakudo 20:52
building rakudo yourself can take a whole lot of ram
ajr_ Specifically, Stage start : 0.000
timotimo make sure you have sufficient swap space set up
that's rakudo doing its most resource-intensive piece of work
ajr_ followed by Stage parse: - that's where it seems to be halted 20:53
AlexDaniel ajr_: why not install it from a .deb package?
timotimo yes
that part takes really long 20:54
FROGGS ajr_: stage parse can take hours on a raspy
ajr_ I have a script set up to download and generate rakudo. 20:55
FROGGS s/raspy/raspi/
ajr_ I have to go now, but thanks.
timotimo good luck!
AlexDaniel patience is a virtue!
samcv m: use MONKEY-SEE-NO-EVAL; my ($varone, $vartwo) = 20 xx 2; for 'one', 'two' { my $code = '$var' ~ $_; say EVAL $code; } 21:58
camelia rakudo-moar c963ef: OUTPUT«20␤20␤»
samcv is there a way i can do this without EVAL? access variable names like this?
need to iterate over values which have coorasponding constants, and there's a bunch of them, there may be a better way to do this than eval 21:59
MasterDuke m: my $a = 2; say $::("a") 22:01
camelia rakudo-moar c963ef: OUTPUT«2␤»
awwaiid still ... any time I see someone wanting to loop over variables I suspect a hash or something else should be used 22:02
timotimo you can also bind variables so you can read-write-access variables
m: my ($varone, $vartwo) = 20 xx 2; my @things; @things[0] := $varone; @things[1] := $vartwo; ++<<@things; say $varone; say $vartwo 22:03
camelia rakudo-moar c963ef: OUTPUT«21␤21␤»
seatek OK. Wow. How have I lived without roles with parameters before? 22:30
I always though, neat! But.. using them... it can save so much, what was before, semi-redundant clutter 22:32
Herby \o 22:43