»ö« 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.
00:00 captain-adequate left, pdurbin joined
pdurbin Does Perl 6 support tail call optimization? TCO is being discussed at botbot.me/freenode/pyladies/msg/44749357/ 00:02
skids pdurbin: it looks like "not in 6.0" according to irclog.perlgeek.de/perl6/2015-06-29#i_10823364 00:32
pdurbin skids: ah. ok. thanks 00:33
00:43 khw joined 00:44 aborazmeh joined, aborazmeh left, aborazmeh joined
timo1 pdurbin: i seem to recall at some point there was a bytecode-modifying hack for python that could do TCO, but i could be confusing it with something else 00:50
00:50 Brock is now known as awwaiid
timo1 pdurbin: i *think* at some point GvR explicitly said he wouldn't want TCO to be supported by CPython at least, no clue how out of date that information is, though 00:51
00:51 timo1 is now known as timotimo
timotimo i wonder if a tracing JIT will make TCO very easy to do 00:51
00:52 roguelazer joined, khw left
pdurbin timotimo: I just heard in #pyladies that Guido still opposes it 00:59
timotimo ok
perl6 is on kind of the opposite side of the "functional programming" spectrum 01:00
that may be a bad way to express it, though
01:04 llfourn joined, BenGoldberg joined, vendethiel joined 01:08 llfourn left 01:09 dha left 01:13 khw joined 01:14 roguelazer left 01:15 dccn joined, dccn left 01:18 b2gills joined, rmgk left 01:19 rmgk joined 01:22 meisl left 01:28 vendethiel left 01:45 ilbot3 left 01:47 ilbot3 joined 01:49 dayangkun joined, dayangkun left 01:52 dayangkun joined, dayangkun left 01:53 dayangkun joined 01:54 dayangkun left 01:59 dayangkun joined, dayangkun left 02:07 dayangkun joined 02:08 dayangkun left, noganex_ joined 02:10 kaila joined 02:11 noganex left 02:13 kaila left 02:14 dayangkun joined, dayangkun left 02:15 nys left 02:16 dayangkun joined, gfldex left 02:17 dayangkun left 02:27 dayangkun joined 02:28 dayangkun left, dayangkun joined 02:29 dayangkun left 02:39 colomon left, colomon joined 02:41 dayangkun joined 02:42 dayangkun left 02:43 dayangkun joined 02:44 dayangkun left, dayangkun joined 02:45 dayangkun left 02:49 atweiden left 02:50 aborazmeh left 02:52 prammer left 02:56 dayangkun joined 02:57 dayangkun left 03:00 prammer joined, dayangkun joined 03:01 dayangkun left 03:05 prammer left 03:10 coffee`_ left 03:13 dayangkun joined 03:14 dayangkun left, prammer joined 03:16 BenGoldberg left 03:18 AlexDaniel left 03:25 BenGoldberg joined, BenGoldberg left 03:28 dayangkun joined 03:29 dayangkun left 03:31 yqt left, dayangkun joined, dayangkun left 03:32 dayangkun joined 03:33 dayangkun left 03:34 dayangkun joined, dayangkun left 03:40 VinceDee joined 03:43 dayangkun joined 04:26 atroxaper joined 04:49 ShimmerFairy left 05:00 skids left 05:03 ShimmerFairy joined 05:04 llfourn joined, jack_rabbit joined 05:06 khw left 05:08 VinceDee left 05:17 kaare_ joined 05:22 mr-fooba_ joined, dustinm`_ joined, SmokeMachine_ joined, daxim_ joined 05:23 mr-foobar left, SmokeMachine left, isacloud left, ilbot3 left, avuserow joined, robins joined 05:24 SmokeMachine_ is now known as SmokeMachine
dalek ast: 22873ae | PerlJam++ | S16-filehandles/io.t:
Add some tests for lines(*) and lines(Inf)
05:25
ast: 2f299af | PerlJam++ | S32-str/words.t:
Add tests for words sub
05:25 lizmat joined 05:27 isacloud joined, ilbot3 joined 05:39 pyrimidine joined 05:46 bjz joined 05:52 llfourn left 05:53 gfldex joined 06:16 FROGGS joined 06:17 mr-fooba_ left 06:18 _mg_ joined 06:20 [Sno] left 06:22 daxim_ left 06:23 justaguy_ joined, justaguy_ left 06:24 daxim_ joined 06:26 dj_goku_ left
dalek kudo/nom: c0f03bf | lizmat++ | src/core/List.pm:
Streamline xx handling + fix #125627
06:27
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=125627
lizmat m: "x" x Inf # huh? 06:29
camelia ( no output )
lizmat m: say "x" x Inf # huh?
camelia rakudo-moar b606f9: OUTPUT«␤»
lizmat m: "x" x * 06:30
camelia ( no output )
lizmat m: say "x" x *
camelia rakudo-moar b606f9: OUTPUT«WhateverCode.new␤»
06:32 dj_goku joined
FROGGS lizmat: I've marked your ticket testneeded 06:34
lizmat FROGGS++ 06:36
Looking at #125628, I think we need to make the "foo" x Inf/* case fail with a NYI 06:37
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=125628
lizmat NYI as in 'Infinite strings (Cat) are NYI 06:38
FROGGS probably good idea, yeah
lizmat I'll look at that tomorrow (well, in ~ 10 hours) when I'm less tired and had some sleep 06:39
FROGGS :o)
lizmat unless someone beats me to it :-)
06:39 froppi joined
FROGGS I probably won't :o( 06:39
lizmat
.oO( I was more thinking lurkers on the channels :-)
06:40
anyways, time to go to bed
so good night, #perl6!
FROGGS gnight lliz 06:41
err
lizmat:
hmpf
-.-
sleep well, seems I'd need that too 06:42
06:43 domidumont joined, espadrine joined, abraxxa joined 06:47 domidumont left 06:48 domidumont joined, abraxxa left 06:52 colomon left, robins is now known as robinsmidsrod, bjz left, colomon joined 06:54 bjz joined 06:55 st_iron joined
st_iron good morning 06:55
FROGGS morning st_iron 06:57
07:03 abraxxa joined 07:08 atroxaper left 07:11 atroxaper joined 07:12 llfourn joined 07:13 mr-foobar joined 07:20 amurf left 07:26 bjz left 07:30 [Sno] joined 07:37 diana_olhovik_ joined 07:40 brrt joined 07:51 diana_olhovik_ left 07:57 g4 joined 07:58 laouji left, laouji joined 08:01 yeahnoob joined 08:02 laouji left, laouji joined, zakharyas joined 08:03 nightfrog left 08:10 atroxaper left
cdc Hello #perl6 08:11
FROGGS hi cdc
cdc m: sub f1 { default { return { :test1, :test2 } } }; sub f2 { default { { :test1, :test2 } } }; say 'f1:'; .WHAT.say for f1; say 'f2:'; .WHAT.say for f2;
camelia rakudo-moar c0f03b: OUTPUT«f1:␤(Hash)␤f2:␤(Pair)␤(Pair)␤»
cdc FROGGS: o/
is this ^^ expected? 08:12
the return value is flattened in f2
08:13 Foxcool_ joined 08:15 Foxcool left 08:19 virtualsue joined, atroxaper joined 08:22 RabidGravy joined
FROGGS cdc: to be honest, I often enough do not know what to expect wrt flattening 08:25
but as we know this is meant to change
08:27 shmibs joined 08:28 darutoko joined 08:29 atroxaper left
RabidGravy marning! 08:31
cdc FROGGS: even if flattening is currently a moving target, I wonder if this is a bug wrt explicit/implicit return. It's OK to me to wait for the GLR before submitting a ticket, however maybe this test/bug deserves to be added to roast (to know when/if this behavior changes).
08:35 ely-se joined
ely-se Konnichiwa. 08:35
FROGGS cdc: you can also mention your case here github.com/perl6/specs/issues/70
hi ely-se
DrForr ohaayo. 08:36
cdc FROGGS: ok, thanks! 08:37
froppi if I learn Perl 5 now (for its reliablility and documentation) how iritating will it be for me with my intermediate knowledge of the language to switch to Perl 6 in the future? 08:42
FROGGS froppi: hmmm, you can transpose some of the knowledge from P5 to P6
ely-se depends on how good you are at learning multiple distinct languages 08:43
FROGGS froppi: Perl 6 is a Perl after all, both languages share the same idea of how a language should be like
froppi so I should just treat them as distinct languages?
FROGGS froppi: ohh yes
ely-se there is doc.perl6.org/language/5to6 which highlights some of the differences
08:44 bjz joined
froppi I've seen that actually. Perl 6 looks more like a meta-programming language to me. SO Perl 5 as a text-processing language might still even be relevant in the future? 08:45
ely-se Perl 5 might become the new COBOL! 08:47
El_Che froppi: I love perl 5. Very useful here to get things done (I also use Java and Ruby depending on the setting)
masak good morning, #perl6! 08:48
Perl 6 day today! \o/
JimmyZ why not learn the two together, and you can use anyone that you want :P
ely-se hugs masak
El_Che is it christmas already? :)
ely-se Inline::Perl5
froppi ely-se: I thought Java was? 08:49
08:49 espadrine left
masak El_Che: technically, it's not Christmas already. 08:51
08:51 telex left
ely-se hmm, Java 08:51
FROGGS cool beans
FROGGS gets coffee
ely-se El_Che: unless you are Christmas, you can't even tell whether Christmas exists
masak El_Che: Christmas is planned for Christmas.
El_Che wel it the Eid, that's islams' correspondant holiday for christmas :) 08:52
08:52 telex joined 08:55 froppi left 08:57 brrt left 08:59 estrabd left
cdc m: sub f1 { my %h = :a, :b; %h }; sub f2 { my %h = :a, :b; { %h } }; .say for f1; .say for f2; 09:02
camelia rakudo-moar c0f03b: OUTPUT«a => True␤b => True␤a => True, b => True␤»
cdc FROGGS, all: another example where I don't understand why f2 returns a Hash, but f1 returns a List ^ 09:03
FROGGS well, one is itemized, the other isnt 09:04
09:05 atroxaper joined
cdc m: sub f3 { my %h = :a, :b; %h.item }; .say for f3; 09:05
camelia rakudo-moar c0f03b: OUTPUT«a => True, b => True␤»
cdc FROGGS: thanks! :) 09:06
I guess "%h.item" will become "%h" in post-GLR. 09:07
I mean, in this case
FROGGS hmmm, I'm not so sure
sigils have a meaning
09:09 amurf joined
cdc FROGGS: oh right: S02 -> "Array and Hash variables can be evaluated in item context by prefixing them with a single dollar sign" 09:09
my mistake!
09:10 espadrine joined 09:11 _mg_ left
masak m: say dir(".").elems 09:11
camelia rakudo-moar c0f03b: OUTPUT«36␤»
masak m: sub find($dir) { return gather for dir($dir) -> $file { take $file; if $file.IO ~~ :d { take find($file) } } }; say find(".").elems 09:12
camelia rakudo-moar c0f03b: OUTPUT«(timeout)»
masak hm.
09:13 amurf left
masak oh, it's working -- it's just taking its time on a rakudo directory. 09:15
09:16 dustinm`_ is now known as dustinm`
ely-se dustbin 09:16
09:16 espadrine_ joined
masak many things in Rakudo have gotten faster, but file I/O and directory traversal is still slow. 09:16
ely-se get an SSD!
masak like, noticeably so. 09:17
I'm on an SSD...
nwc10 get two, and RAID them!
masak :P
anyway, I think we can be faster there. not sure what it would take withoout benchmarking, though. 09:20
09:20 laouji left, espadrine left
nwc10 I/O will matter by Christmas 09:20
directories not as much
09:21 laouji joined
nwc10 but I/O speed and failure-to-cope-with-an-8-bit-world were the two things that Python 3.0 got wrong on release, and hence why 3.1 was quite soon. 09:21
IIRC
09:22 vendethiel joined 09:28 brrt joined
masak I think tree traversal is slow because it creates many heavy objects. (that's an un-benched opinion, though, so caveat lector.) 09:32
while I have your attention -- this is a thing I've asked before, but never quite got a good answer for: 09:34
RabidGravy ah-ha! find out what had broken "panda gen-meta"
masak why are the delimiters for quasi blocks spec'd to be variable?
RabidGravy hackety hack hack
masak like `quasi { ... }`, `quasi [ ... ]`, `quasi < ... >`
jnthn masak: I suspect simply 'cus all forms of quoting are 09:35
masak jnthn: we need to figure out how much a quasi block is actually a *block*, and how much we believe in the rule that "{} means block"
in this case it'd be more "block means {}" 09:36
jnthn Well, it doesn't when it's about a hash...
But yeah, I see where you're going.
masak hashes get a special exception :)
jnthn I don't know it is a block
vendethiel well, it'd make sense if it were string-ish, but it's block-ish
jnthn I mean, we don't see the quasi as introducing a new lexical scope... 09:37
masak jnthn: me neither. it's one of those "on some days yes, on some days no"
jnthn: currently in Rakudo, that's what they do.
jnthn *nod*
masak jnthn: turns out that's the shortest way to hygiene by default.
jnthn Right
masak duddn' mean we'll keep it, 'f'course
I buy into the "quoting delimiters can be anything" -- sometimes that's a lifesaver for things like s!!! and q<>
DrForr You have my attention now :)
masak I don't automatically buy it for quasis. 09:38
09:38 yeahnoob left
masak even if they're not *blocks*, they're certainly *block-like* 09:38
there used to be a time when I was all-in for quasis having different delimiters. that's when I still believed you could nest quasis to great effect: `quasi { ... quasi < ... > ... }` 09:39
then you could distinguish your unquotes to "beling" to the right quasi! 09:40
but TimToady has assured me that's not how quoting works, and that doesn't make sense.
so now I simply don't see the point.
belong*
09:44 ely-se left 09:45 laouji left
ShimmerFairy masak: since quasis aren't part of Q (that is, it's not like 'quasi' is short for 'Q :quasi' or anything), I don't think having different delimiters makes too much sense. 09:45
masak that, too. 09:46
it's called "quasi*quoting*", but ti's certainly not a kind of string quoting.
I do acknowledge that we have the problem of collisions between Perl 6 syntax and macro/quasi metasyntax. 09:47
ShimmerFairy
.oO(quasiblocking)
masak that's why we are talking about horrors like {{{ }}} and ¤, after all.
ShimmerFairy ¤? 09:48
masak suggested replacement for {{{ }}} 09:49
I'm not a big fan, but it does solve some problems
I'm constantly on the hunt for something less jarring
m: sub find($file) { @($file, $file.IO.d && @(dir($file)».&find)) }; say find(".").elems
^ turns out the above was what I wanted.
DrForr Also, {{{ }}} are default code markers for code folding in vim. 09:50
camelia rakudo-moar c0f03b: OUTPUT«(timeout)»
09:50 laouji joined
masak I'm a bit dissapointed I needed two @() to make that work 09:50
anyone know how to write it just as short but slightly nicer?
ShimmerFairy masak: question: what can macros do outside of quasi blocks? (that is, macro foo { #`(what can be done here?) quasi { ... } #`(here too) } )
jnthn Why'd you need the second one?
masak I don't know. just doesn't work without it :/ 09:51
jnthn sub find($file) { flat $file, $file.IO.d && dir($file)».&find } ?
masak can't show it on camelia, unfortunately. not without finding a smaller subdirectory to run it on :)
masak tries
works \o/ jnthn++
jnthn m: sub find($file) { flat $file, $file.IO.d && dir($file)».&find }; say find('t').elems 09:52
camelia rakudo-moar c0f03b: OUTPUT«2␤»
masak that's... wrong.
ShimmerFairy If you can't do anything besides quasi blocks inside a macro, then I'd suggest 1) turning the macro body into what quasi is, and 2) maybe then use quasi { } for unquoting?? 09:53
masak huh, why does it work here but give the wrong answer on camelia?
vendethiel m: sub find($file) { flat $file, $file.IO.d && dir($file)».&find }; say find('t')
masak ShimmerFairy: suggestion (1) is a bad idea.
camelia rakudo-moar c0f03b: OUTPUT«t Failed to find 't' while trying to do '.d'␤ in sub find at /tmp/6_PuvNA7sF:1␤ in block <unit> at /tmp/6_PuvNA7sF:1␤␤»
jnthn Probably selective copying of stuff?
vendethiel huh.
jnthn (camelia doesn't run in a build directory of Rakudo iirc)
masak aha. 09:54
could be it.
vendethiel m: sub find($file) { flat $file, $file.IO.d && dir($file)».&find }; say find('t').elems # the elem fixes it?!
camelia rakudo-moar c0f03b: OUTPUT«2␤»
jnthn So I was lucky wherever it does run has a t :)
vendethiel wats
ShimmerFairy masak: well, if you are supposed to be able to do stuff outside of quasi blocks in a macro, then obviously it's a bad idea :) (but then what _do_ you do beyond quasi blocks?)
jnthn Oh...or it's not there and I get a Failure? :P 09:55
m: sub find($file) { flat $file, $file.IO.d && dir($file)».&find }; say find('t').perl
camelia rakudo-moar c0f03b: OUTPUT«("t", Failure.new(exception => X::IO::DoesNotExist.new(path => "t", trying => "d", os-error => Any), backtrace => Backtrace.new))␤»
jnthn haha
vendethiel oooh...
jnthn Yeah, masak's original assumes the initial directory you give it exists :P
vendethiel that seems pretty bad
masak ShimmerFairy: the quasi block is "and here's the code I want to splice into the mainline". the rest of the macro body is all the rest: analysis, checks, dynamic generation of code.
ShimmerFairy: returning a simple quasi block is just the most basic use case of macros. 09:56
jnthn Oh, but that still doens't explain it all
Oddness
ShimmerFairy And unfortunately the only use case I've seen so far :)
masak ShimmerFairy: that's not true, you've most likely seen DEBUG
ShimmerFairy I have not, actually. 09:57
masak it's in my talk on macros.
m: say (flat 42).elems; say (flat ()).elems; say (flat (42 if False)).elems 09:59
camelia rakudo-moar c0f03b: OUTPUT«1␤0␤0␤»
masak m: sub find(IO() $file) { flat ($file if $file.e), (dir($file)».&find if $file.d) }; say find("t").elems 10:00
camelia rakudo-moar c0f03b: OUTPUT«0␤»
masak that's better.
10:00 laouji left
jnthn ah, yes :) 10:00
vendethiel I wonder why "flat" doesn't trigger the failure. should it? maybe not 10:01
10:14 laouji joined 10:16 laouji left
jnthn vendethiel: Don't think so 10:18
Woodi hallo #perl6 :) 10:20
so what that find() should do ? recurse into subdirs ?
masak m: say qq:to<FOO> for 1..5;␤ The current value is $_.␤ FOO 10:23
camelia rakudo-moar c0f03b: OUTPUT«Asked to remove 4 spaces, but the shortest indent is 2 spaces in any descend at src/gen/m-Perl6-Actions.nqp:100␤The current value is 1.␤␤The current value is 2.␤␤The current value is 3.␤␤The current value is 4.␤␤The current value is 5.…»
Woodi english.stackexchange.com/questions...i-semi-and :)
masak m: say qq:to<FOO> for 1..5;␤ The current value is $_.␤ FOO
camelia rakudo-moar c0f03b: OUTPUT«The current value is 1.␤␤The current value is 2.␤␤The current value is 3.␤␤The current value is 4.␤␤The current value is 5.␤␤»
masak wow. I didn't really expect that to work... :) 10:24
Woodi: find() is from File::Find. I just removed parts I didn't need.
Woodi: interesting, I didn't know that "pseudo" meant "false/lie". that makes a whole lot of sense, though. 10:25
"quasi" is a very good word for quasiquoting. it's almost quoting, except when there's an unquote. :) 10:26
Woodi I always thinked quasi- menas what semi- mins but with some ugliness...
s/mins/means/
masak yes, quasi is often used as a perogative. that's not how it's meant in "quasiquote", though. 10:27
10:27 ely-se joined
masak er, derogative* 10:27
ShimmerFairy quasi is similar to pseudo for me, both of which are not similar to "semi" at all :)
10:27 TEttinger left, cognominal left
arnsholt IIRC pseudo- is Greek and quasi- is Latin, but otherwise pretty much the same 10:27
Woodi so, what quasiquotes are ? :) 10:28
ShimmerFairy I tend to interpret pseudo as "kinda" and quasi as "almost"
masak Woodi: they're a way to create an AST denoting some code, instead of just writing the code. 10:29
ely-se quasiquotes are like, AST literals
10:29 cognominal joined
masak Woodi: kind of similar to what a block/closure is. except that blocks prevent immediate execution, whereas quasiquotes prevent immediate compilation. 10:30
10:30 ely-se left
Woodi imagine macros as playing CoreWars over source code arena. and macros using macros are quite high on "source control" skill... 10:33
in that mood there is nothing special in self-modifing code :)
can be pretty sparse and "perfect" code :) 10:34
10:34 pdurbin left 10:35 xiaomiao left 10:38 brrt left
masak m: say qq:to<FOO> for 1..5;␤ The current value is {$_}.␤ FOO 10:38
camelia rakudo-moar c0f03b: OUTPUT«Use of uninitialized value $_ of type Any in string context in block at /tmp/UNX8gcIBrf:1␤The current value is .␤␤Use of uninitialized value $_ of type Any in string context in block at /tmp/UNX8gcIBrf:1␤The current value is .␤␤Use of unini…»
masak hm, maybe it's not reasonable to expect that one to work...
10:39 xiaomiao joined 10:49 atroxaper left 10:50 dayangkun left 10:54 atroxaper joined 10:58 amurf joined
masak what's the Unicode-safe way to compare two strings case-insensitively. I always .lc both operands and then eq, but ISTR that doesn't always work. 11:01
jnthn .fc
masak m: say "Y".fc
camelia rakudo-moar c0f03b: OUTPUT«Method 'fc' not found for invocant of class 'Str'␤ in block <unit> at /tmp/mKxfUC1aS2:1␤␤»
jnthn Which somebody apparently needs to implement.
masak well, .fc you too
:P
jnthn :D
I was thinking the same :P
masak grapevines think alike
jnthn You heard that through the grapevine? 11:02
nwc10 you could just use Perl 5 :-)
masak touché
11:03 amurf left
nwc10 anyway, cool, we find somethign Perl 5 does better 11:03
jnthn But then your strings are NFG for the other meaning... :P
nwc10 it's been a long time.
some bugger fixed state in Perl 6.
jnthn Somebody filed an RT calling us on not handling SpecialCasing.txt from Unicode too
masak what was wrong with state in Perl 6?
nwc10 IIRC it couldn't do initialisers correctly
ie the implied (as was) START on the right of the = 11:04
masak oh!
not sure I remember that.
jnthn Yeah, we always assigned, not just on first time through 11:06
This was back when "state $x = 42" parsed the = as an infix:<=>
Which made everything hard, just about
nwc10 Perl 5 still can't do list assignment
because TimToady says that (state @a) = (...) is not a START 11:07
whereas state @a = (...) is
and I couldn't figure out how to distinguish the two in the Perl 5 parser
masak huh.
nwc10 (lex, yacc, smoke, mirrors - it has to be somewhere)
masak m: sub foo { (state $n) = now; say $n }; foo; foo 11:08
camelia rakudo-moar c0f03b: OUTPUT«Instant:1437131332.943274␤Instant:1437131332.947233␤»
masak m: sub foo { state $n = now; say $n }; foo; foo
camelia rakudo-moar c0f03b: OUTPUT«Instant:1437131351.818585␤Instant:1437131351.818585␤»
jnthn That falls out of the intializer thing I mentioned before. :) 11:09
11:10 atroxaper left
masak "Shaped variable declarations not yet implemented. Sorry." 11:13
jnthn Working on it :P
masak this was actually due to a typo in my code. (leftover `my`)
11:13 abraxxa left
masak but that "Sorry." at the end breaks my heart </3 11:13
jnthn :P
ShimmerFairy You could also take it as a rude "Sorry" :P 11:14
11:15 ely-se joined 11:19 laouji joined
cdc m: List.new(0).grep(0) 11:23
camelia ( no output )
cdc m: List.new(0).grep(0).say
camelia rakudo-moar c0f03b: OUTPUT«0␤»
cdc m: Buf.new(0).grep(0).say
camelia rakudo-moar c0f03b: OUTPUT«␤»
cdc is this ^ a known issue?
masak m: Buf.new(0).grep(1).say 11:24
camelia rakudo-moar c0f03b: OUTPUT«Buf:0x<00>␤»
masak there's your problem.
Buf doesn't implement .grep
jnthn Do .list on it to coerce it to a list so you can grep it
masak arguably there should be a .grep that does .list for you in Buf
jnthn Arguably; kinds depends how TimToady++ rules on one of my S09 questions :) 11:25
*kinda
cdc jnthn, masak: ok, thanks!
masak: I don't understand why Buf.new(0).grep(1).say returns Buf:0x<00> 11:30
jnthn cdc: Because a Buf acts as a single item
ely-se Buffet
jnthn Just like a Str acts as a single item
cdc m: Buf.new(0, 1).grep(1).say 11:34
camelia rakudo-moar c0f03b: OUTPUT«␤»
11:34 pecastro_ is now known as pecastro
cdc jnthn: I'm still confused. 11:35
jnthn cdc: .grep(1) is the same as .grep(* ~~ 1) 11:36
Smart-match with a number on the RHS coerces the LHS to a numeric too 11:37
A Buf in numeric context is the number of things in it
JimmyZ m: Buf.new(0, 1).grep(Buf.new(0, 1)).say
camelia rakudo-moar c0f03b: OUTPUT«␤»
11:38 laouji left
RabidGravy is there someone with commit on panda fancy merging github.com/tadzik/panda/pull/184 11:39
cdc m: Buf.new(0, 1).grep(2).say
camelia rakudo-moar c0f03b: OUTPUT«Buf:0x<00 01>␤»
cdc jnthn: yeah, thanks :D
RabidGravy the regular expression to get the provides isn't quite right but that was broken before 11:41
FROGGS RabidGravy: wouldn't it make more sense if $deps was an array of package names? 11:42
instead of a boolean I mean
RabidGravy possibly, it would enable other things to happen without the Builder/Tester having to know about it 11:46
let me have a look
11:53 okperl joined, xfix joined, xfix left, xfix joined
masak by the way, I don't dislike `quasi < ... >` because I'm the one (most likely) tasked with implementing it. :) 11:55
it's not trivial to implement, but there's plenty of prior art, what with other quoting mechanisms in the Perl 6 grammar.
I'm arguing against the feature because it seems both unnecessary and confusing. 11:56
11:56 okperl left
ShimmerFairy masak: And I agree with you :) . To me, it seems like one of those potential features that just seems nice to have, but not necessary at all. 11:58
arnsholt Yeah. The body of a macro is very code-y, so it should look like code too. 11:59
masak not even syre about the "nice to have"
vendethiel having the opportunity to decide on how you want to quote is interesting for strings *because strings might contain the delimiter* 12:03
that can't happen in quasi blocks. what's the purpose?
RabidGravy FROGGS, yeah that worked - changed it ;-) 12:04
masak vendethiel: that's a really good point. maybe *the* point. 12:05
12:06 cschwenz joined
cschwenz o/ #perl6 12:06
vendethiel \o 12:07
cschwenz How would one go about correcting a minor error in the doc.perl6.org/language/syntax docs?
vendethiel cschwenz: a pull request for this file. github.com/perl6/doc/blob/master/l...syntax.pod 12:08
cschwenz thanks! :-) 12:09
12:10 nightfrog joined, atroxaper joined 12:12 cschwenz left 12:15 atroxaper left 12:17 breinbaas joined 12:20 yqt joined 12:29 VinceDee joined 12:30 jack_rabbit left 12:33 lucasb joined
masak m: my %h = <foo 1 baz 3>; say %h<foo bar baz>:k 12:36
camelia rakudo-moar c0f03b: OUTPUT«foo baz␤»
masak that is so nice.
jnthn :)
masak m: my %h = <foo 1 baz 3>; say %h<foo bar baz>:p.perl
camelia rakudo-moar c0f03b: OUTPUT«foo => 1 baz => 3␤»
12:37 llfourn left
masak m: my %h = <foo 1 baz 3>; say %h<foo bar baz>:p>>.^name.perl 12:37
camelia rakudo-moar c0f03b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/3eijuFc6Nu␤Missing infix inside HYPER␤at /tmp/3eijuFc6Nu:1␤------> 3= <foo 1 baz 3>; say %h<foo bar baz>:p>>7⏏5.^name.perl␤ expecting any of:␤ infix␤ infix stopper␤»
masak m: my %h = <foo 1 baz 3>; say %h<foo bar baz>:p.map(*.name).perl
camelia rakudo-moar c0f03b: OUTPUT«foo => 1 baz => 3␤Method 'name' not found for invocant of class 'Bool'␤ in block <unit> at /tmp/Dt8OtHYwV_:1␤␤»
masak m: my %h = <foo 1 baz 3>; say (%h<foo bar baz>:p).map(*.^name).perl
camelia rakudo-moar c0f03b: OUTPUT«("Pair", "Pair")␤»
masak note to self: precedence is tricky.
12:39 andreoss joined
gfldex m: my %h = <foo 1 baz 3>; say %h<foo bar baz>:p ==> map(*.^name).perl 12:44
camelia rakudo-moar c0f03b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/S0zeygebJV␤Sorry, do not know how to handle this case of a feed operator yet.␤at /tmp/S0zeygebJV:1␤------> 3 %h<foo bar baz>:p ==> map(*.^name).perl7⏏5<EOL>␤»
gfldex should it know that or am i asking to much?
masak how do I match "end of paragraph" in a regex? 12:46
jnthn masak: Define "paragraph"?
masak (a sequence of non-blank lines that doesn't have a non-blank line after it) 12:47
dalek kudo-star-daily: 09be539 | coke++ | log/ (9 files):
today (automated commit)
12:48
jnthn token end-para { <?before \n [\n || $]> } # ?
[Coke] -> (22:47) From Garance [@vcc], to coding: 12:49
- ``Put #Haskell on your resume even if you don't know it. When asked, say
- that your resume is lazy, and you'll learn Haskell when results are needed''
masak jnthn: yeah, that's what I ended up with.
_itz [Coke]: hahaha
jnthn You can also comfort your potential employer that this approach will have no bad side-effects :P 12:50
masak unless your employer is in a monad, then all bets are off
_itz *groan*
cdc Is this a known defect? gist.github.com/anonymous/b794343a6e6713fca614 12:51
masak cdc: first off, nice golf. 12:52
cdc: I didn't know it, but I'm not up to speed on precompilation woes.
jnthn Bugger, another pre-comp bug.
masak guess that answers it.
jnthn I can't guess who'll have to fix that one :P
masak cdc: you you want to submit it to rakudobug, or shall I?
cdc masak: I will, thanks. 12:53
masak cdc++
12:55 cognominal left
cdc RT #125634 (with the right code/output this time) 12:59
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=125634
masak pro tip: don't write ^ when you mean ^^. your regex won't match most of the time. :) 13:03
cdc m: say ?('most of the time.' ~~ /^/) 13:05
camelia rakudo-moar c0f03b: OUTPUT«True␤»
cdc it matches most of the time \
\o/
jnthn :D
masak bwha. ha. :) 13:06
cdc :)
masak m: $*PROGRAM-NAME = "foo" 13:13
camelia rakudo-moar c0f03b: OUTPUT«Cannot modify an immutable Str␤ in block <unit> at /tmp/KZrMAJJp7R:1␤␤»
masak is there a good reason for $*PROGRAM-NAME to be immutable?
would make a lot of sense to me if it were mutable. 13:14
jnthn What do you expect mutating it to do?
masak oh, just change its contents.
nothing more magical than that.
jnthn Trouble is, folks may expect more magic...
masak I have code here that makes it seem like it worked, and I had use for it.
now I'll have to copy it into another variable and use that...
jnthn masak: Look up $0 in perldoc.perl.org/perlvar.html 13:15
13:16 llfourn joined
masak jnthn: um, yes. point taken. 13:16
masak tries not to want that, then
ShimmerFairy still thinks kebab-casing looks utterly wrong on allcaps names :) 13:17
13:18 [Sno] left
Juerd ShimmerFairy: Besides, [shift] + [-] ==> "_" 13:20
masak ShimmerFairy: as I changed my code, I accidentally wrote $*PROGRAM_NAME somewhere, and got a deprecation warning at the end of my run :/
Juerd So _ is prettier and easier to type (on a US keyboard, at least)
That is, for allcaps identifiers
ShimmerFairy Juerd: exactly my reasoning.
Juerd And if when reading [shift], your first thought is "shift is not infix", you may have been using Perl 6 for too long already :D 13:21
ShimmerFairy I find the kebab-case renaming to be utterly pointless in general, but with UPPER_CASE names it's detrimental (and I think $*PROGRAM_NAME is a good example of where the classic "but it'll make it rightly harder to type" really shines as the non-reason it is)
Juerd $non-reason 13:22
masak is glad that someone else is arguing against kebab-case, but is also willing to accept that we changed it once, it was bad, now let's just regret that and not change it back, which would be worse
Juerd use _; # fixed! ;-) 13:23
masak haha
[Coke] I like kebab case.
ShimmerFairy masak: I got an idea, just give me a moment :P
[Coke] whatever we do should be consistent.
Juerd Who will write _.pm? 13:24
[Coke] not me. ;)
so, if you want to change it back, great, but a compromise of stopping changing things now is bad.
ShimmerFairy [Coke]: I like it for lowercase names (like sub do-thing) , but not for uppercase (like sub DO-THING). Perl 6 has made me think of _ as an uppercase - , so DO-THING is eqv. to DOtHING in my mind
13:25 mr-foobar left
[Coke] ShimmerFairy: and I think TimToady already mentioned that making it harder to type things like MONKEY-TYPING is a -good- thing. 13:25
masak I don't like that line of reasoning.
ShimmerFairy but PROGRAM_NAME is a good example of where that doesn't even make sense
[Coke] (making it harder to type PROGRAM-NAME is arguably bad.)
ShimmerFairy And, frankly, when it comes to -/_, "harder to type" is just bullshit. 13:26
13:26 st_iron left
masak "yup, we thought about it, and we decided we *want* the language to be inaccessible. just so that you will stop and think how bad you are for wanting that particular feature. (because we know better.)" 13:26
[Coke] I don't think it's that harder to type. Especially with an IDE.
lucasb Since I turn caps on/off to type ALLCAPS, it is actually easier :) 13:27
[Coke] masak: some times there is a wrong way to do it.
... caps... on and off? like a ... capslock?
lucasb yes
[Coke] first thing I do on a new system is map capslock to control. :)
13:28 FROGGS left
masak [Coke]: but you just said "(making it harder to type PROGRAM-NAME is arguably bad.)" 13:28
[Coke]: my point is that it's presumptuous of us to pessimise all future uses of something.
[Coke] masak: I was pointing out what timtoady said, and then anticipating the argument. that's all. 13:29
masak: ... we are making something new, we kind of have to be presumptuous.
anyway: I don't care so much either way this ends, except: pick a consistent set of rules and let's follow them. 13:30
masak usually I like the flavor of presumptuousness we employ. this is the exception.
[Coke] don't have some stuff use _ and some use - if they are otherwise lookalike. if this means uppercase gets _ and lowercase gets -, that's OK to me. but I don't want some-stuff and some_other_stuff.
masak [Coke]: yeah, I also don't have a corgi in this race. there are two competing notions of consistency here, is all. 13:31
[Coke] if it means that some COMMON_STUFF and some UNCOMMON-STUFF, I'm also ok with that. it's teachable.
13:34 yqt left
ShimmerFairy I can't help but feel like FOO-BAR is entirely based in a desire to show off the fact that we can use dashes in our identifiers. 13:39
13:39 skids joined 13:41 ely-se left
PerlJam good morning! 13:41
PerlJam reads scrollback to see what's new on the - vs _ front 13:42
13:43 g4 left
timotimo tbh, i'd like $PROGRAM-NAME to be rw 13:45
and have the semantics $0 had in perl5
RabidGravy doesn't it depend on the behaviour of the OS on p5? 13:49
DrForr m: "a{uc("foo")}b" 13:50
camelia ( no output )
DrForr Oddly it works from the CLI.. 13:51
PerlJam What are the really good reasons that people want to over-write the name of the program? I can think of reasons, but nothing that compels me to argue for (or against) the feature. 13:52
geekosaur generally it's so a daemon can show its current state via ps
13:53 FROGGS joined
PerlJam yeah, that doesn't strike me as good enough. :) 13:53
lucasb If it was meant to be immutable, shouldn't it be $?PROGRAM-NAME ? but $*PROGRAM-NAME gives the impression that it *is* mutable 13:54
Yes there any constant-like thing in P6 that is sigilless?
*Is there any... 13:55
cdc m: pi
camelia ( no output )
cdc m: pi.say
camelia rakudo-moar c0f03b: OUTPUT«3.14159265358979␤»
masak DrForr: `say` 13:56
m: say "a{uc("foo")}b"
camelia rakudo-moar c0f03b: OUTPUT«aFOOb␤»
ShimmerFairy Well, $? is for compile-time constants, $* for run-time
timotimo we could keep the original PROGRAM-NAME around in the $? one 13:57
DrForr I'm just surprised at thee nested quoting, though I suppose it's the {} keeping things together.
timotimo well, "keep around" isn't really correct, is it? if it's substituted at compile time :)
DrForr: yeah, inside { } we parse regular perl6 code again
jnthn Yeah, $?PROGRAM-NAME would be the program name we compiled
DrForr Yep, I'll call that a feature.
jnthn DrForr: It's certainly a feature :)
masak PerlJam: my use case was "if $*PROGRAM-NAME is a symlink, then follow the symlink and assign back to $*PROGRAM-NAME. later, use the directory of $*PROGRAM-NAME to find a data directory in the directory of the original script file"
jnthn That we can do that is actually one of the key things about Perl 6 parsing. 13:58
We always know what langauge we're in.
masak DrForr: I used to hate that you could have "" in {} in ""
DrForr: I've since come around.
ShimmerFairy If we had $?PROGRAM_NAME, I'm not sure if I'd want $*PROGRAM_NAME to be writable (as it stands, I currently think it's better to not have it writable)
PerlJam masak: but you only needed $*PROGRAM-NAME assigned internally, not externally? 13:59
13:59 atroxaper joined
masak PerlJam: yes, it wasn't necessary for me to have any side-effects. 13:59
timotimo ShimmerFairy: can you explain a bit more?
geekosaur wait, is this the actual executable name / argv0 or the script?
timotimo it's supposed to be that, yeah
masak PerlJam: it was just convenient. and generally with $*FOO variables I expect to be able to assign to them.
DrForr Well, I'm sold only if it's because it saved me about 40 minutes of work.
[Coke] why would you need to override it internally instead of providing your own $* variable to track whatever it is you're tracking? 14:00
ShimmerFairy timotimo: if we had $?PROGRAM_NAME as a non-writable copy of the original program name, then I could see both arguments for $*PROGRAM_NAME's writability. But since we only have $*, I think it's better to not let someone accidentally toss that info forever.
DrForr Explaining that the translation actually works in the doco will be .. fun, though.
timotimo oh, i think i misread, ShimmerFairy 14:01
i thought you were against $* being writable if $? exists
masak [Coke]: that's what I rewrote it as.
ShimmerFairy timotimo: if $? exists, then I could see both sides for $* being writable or not, and further if it should do more than just change a string. 14:02
masak [Coke]: just noting that it (most probably) used to work the way I had used it.
[Coke] masak: roger 14:03
14:03 atroxaper left
masak errand & 14:04
14:07 khw joined 14:12 someone_ joined 14:13 someone_ left 14:21 [Sno] joined 14:24 cschwenz joined, cschwenz left 14:34 estrabd joined 14:36 amurf joined
_itz I'm using .perl and EVALFILE to serialize and it's slow .. are there any obvious tricks to speed up? 14:36
14:37 brrt joined 14:40 amurf left 14:43 AlexDaniel joined
timotimo at some point we'll likely want a "sereal" implementation 14:51
masak what's a "sereal" implementation? 14:59
PerlJam masak: metacpan.org/pod/Sereal 15:00
masak .oO( ah, the spelling was actually sereous )
AlexDaniel if some sub is cached, is there any way to force it run again? 15:03
PerlJam have a non-cached version and run that? 15:05
AlexDaniel oooooohh... 15:08
"This trait is a suggestion to the compiler that caching is okay. The compiler is free to choose any kind of caching algorithm (including non-expiring, random, lru, pseudo-lru, or adaptive algorithms, or even no caching algorithm at all)." 15:09
"Proper use of this trait should not change semantics of the program"
it seems like I misunderstood it
I mean, I've always thought that it is something I can rely on
and S06 says that I shouldn't, well, ok 15:10
PerlJam you can rely on it! It will always be there for you. :)
AlexDaniel: Why do you want to use "is cached" in the first place? What are you trying to do? 15:11
15:11 yqt joined
dalek c: 76d6ae3 | (Steve Mynott)++ | lib/Language/5to6.pod:
correct example to unit module
15:11
AlexDaniel PerlJam: nothing right now. But I remember doing something like sub getId(...) is cached { rand } 15:13
15:13 VinceDee left, JimmyZ_ joined
ugexe it means you shouldnt change your program to act differently based on adding that trait. so taking into account side effects its not usually as easy as just adding 'is cached' or 'memoize(func)' 15:13
AlexDaniel well, what are the chances that this will be a pitfall... 15:17
PerlJam I suppose it would be nice if "is cached" had a way to say "call this sub without caching" for the case where you want to debug your code to make it side effect free or something.
ugexe memoize was always a pitfall for me personally. but it was always an afterthought add-on
15:22 brrt left
ugexe the use of '--ll-exception' allows Test.pm to give a proper non-0 exitcode when it fails to find a dependency. maybe we can now figure out how to accomplish this without the huge stacktrace 15:28
examples can be seen here: gist.github.com/ugexe/ea87a90e4fd04fe74986 15:31
15:34 andreoss left
ugexe this appear to have led to many modules being marked as passing although they wont install unless you luckily have whatever depends they didnt put in their meta already 15:34
[Coke] prefers Pickle over Sereal. 15:35
jnthn Note that since "is cached" is simply a trait, you can easily write modules that export alternative implementations. 15:36
To get the policy/control you want
15:37 ][Sno][ joined
_itz prefers milk over cereal 15:37
15:38 [Sno] left
nwc10 is thinking about beer 15:39
[Coke] sips quietly on his diet soda. :P 15:40
nwc10 I have a timezone advantage.
which will be a disadvantage in about 60 hours :-)
ugexe arm7 jvm rakudo has been building for... 14 hours and counting heh 15:44
_itz I keep meaning to try QEMU arm
15:45 FROGGS left 15:47 captain-adequate joined, recojax left 15:48 zakharyas left, mr-foobar joined
PerlJam :q 15:49
:":q!
blah
[Coke] nwc10: you may also have a carb advantage :) 15:52
15:54 webstrand joined 15:58 atroxaper joined
webstrand Has perl6 done away with temporary values, as provided by perl5's local? Dynamic variables aren't quite the same, because they require the $*twigil 15:58
PerlJam webstrand: nope, just changed the declarator. It's "temp" now.
m: my $foo = 27; { temp $foo = 14; say $foo; }; say $foo; # for example 16:00
camelia rakudo-moar c0f03b: OUTPUT«14␤27␤»
[Coke] m: say 237-183 16:02
camelia rakudo-moar c0f03b: OUTPUT«54␤»
vendethiel is not sure when $* twigil + temp is useful? 16:03
[Coke] m: my $*FOO = 3; sub bar { $*FOO = 4 } ; bar; say $*FOO; 16:04
camelia rakudo-moar c0f03b: OUTPUT«4␤»
16:04 atroxaper left
[Coke] m: my $*FOO = 3; sub bar { temp $*FOO = 4 } ; bar; say $*FOO; 16:04
camelia rakudo-moar c0f03b: OUTPUT«3␤»
ugexe temp $*CWD
16:04 diana_olhovik_ joined
[Coke] that's a much better sample variable, aye. :) 16:04
jnthn vendethiel: Often when you want to keep the existing value, allowing modification in deeper dynamic scopes, but restore the value on exit
vendethiel m: my $*a = 5; sub f { say $*a; }; f; { $*a = 6; f; say ';;;;'; { my $*a = 7; f; }; '||||'.say; f; }; f; # [Coke]
camelia rakudo-moar c0f03b: OUTPUT«5␤6␤;;;;␤7␤||||␤6␤6␤»
vendethiel jnthn: ^ isn't that already the case with a "my"? 16:05
oh, yes, sorry.
jnthn vendethiel: my $*FOO gives you an empty $*FOO
vendethiel then, $* twigil + temp + assignment
jnthn Oh, right
Yeah, if you're assigning right off and using temp on a dynamic it's a bit odd :)
16:06 domidumont left
dalek kudo/nom: 48c0ba5 | PerlJam++ | src/core/Any.pm:
Fix RT #116731
16:08
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=116731
16:12 nys joined
dalek ast: a8a86ef | PerlJam++ | S32-list/map.t:
Add a test for RT #116731
16:14
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=116731
16:15 diana_olhovik_ left 16:20 ChoHag joined
webstrand Has rakudo implemented class DESTROY methods yet? The roast's S12-construction/destruction.t doesn't pass on my machine, but occasionally segfaults 16:21
16:21 espadrine_ left
jnthn webstrand: Only on MoarVM, and they're apparently not especially well tested. You shouldn't be able to get a SEGV though... 16:27
webstrand: Also important to note that we don't make any promise about how timely their being called will be, or promise to call them at all at shutdown. Also if an object is resurected DESTROY won't be called a second time. 16:28
jnthn has run it a bunch of times but can't get a SEGV out of it. 16:29
webstrand I'm using moarvm, though I don't know if i'm using JIT or not. I know there's no calling guarentee.
try increasing the iterations from 100 to 1000? it's consistant segv for me then
jnthn I have to increase it to 10000 before it actually GCs, and then I get two more passes... 16:30
JimmyZ_ maybe he is on OSX? 16:31
jnthn heh :)
Well, running it under ASAN might be informative.
The GC code isn't platform specific in this area.
JimmyZ_ I dont know why it is easy to get a seg on OSX... 16:32
webstrand I'm running on archlinux with rakudo, moarvm, nqp version 2015.06
jnthn Even bumping it up to millions of iterations I don't segv it on Windows. 16:34
Will have to try it on Linux. 16:35
Or if somebody's got an ASAN'd build to hand...
jnthn glances at nwc10 :)
webstrand How would I use asan? I can rebuild anything i need to
nwc10 I got "not ok" for tests 3 to 6 16:36
but ASAN was barf free
jnthn Aww
nwc10: And if you bump the for loop up to 10000 iteratinos or so?
webstrand: Just re-configuring MoarVM with the ASAN option and rebuilding/installing MoarVM should do it...you don't need to rebuild NQP and Rakudo iirc 16:37
16:39 domidumont joined
nwc10 jnthn: paste.scsys.co.uk/493506 16:40
vanilla SEGV
nwc10 rebuilds to see what valgrind thinks
so. there is *something* wrong here.
jnthn yowser
16:44 webstrand left 16:57 webstrand joined 17:00 atroxaper joined 17:05 telex left, atroxaper left 17:06 telex joined
lizmat good *, #perl6! 17:10
nwc10 good UGT, lizmat
lizmat YAWWP6W :-(
Yet Another Week Without Perl 6 Weekly 17:11
nwc10 o/ 17:13
geekosaur aka WATWEEK?
17:13 FROGGS joined
masak o/, lizmat 17:14
lizmat masak \o
masak ok, this use case turned up today -- see if #perl6 can help with it :) I have $topdir, $subdir, and $otherdir, all of them directories and IO::Path objects. we happen to know that $subdir is a few levels nested under $topdir. 17:15
now I want the following operation: "the 'same' subdirectory as $subdir relative to $topdir, but under $otherdir"
and I want this in a safe way that doesn't include messing with path strings. and that works regardless of whether each of the three is a relative or absolute path. 17:16
example: have `foo/bar/`, `foo/bar/a/b/c/`, and `baz/` -- want `baz/a/b/c/` 17:17
i.e. $topdir is the "common prefix" of $topdir itself and $subdir. remove that common prefix and replace it with $otherdir. 17:18
tony-o is rakudo build broken on moar right now? 17:19
gist.github.com/tony-o/951c2342c4e656547212
17:20 diana_olhovik_ joined
ugexe i do this for /path/lib/ -> /path/blib/lib by catdir the relative paths and then call .absolute($basedir), although its hard for me to explain better 17:20
masak gets the spooky sensation that the problem he's describing is categorially a en.wikipedia.org/wiki/Pushout_(category_theory)
17:24 domidumont left
ugexe oh the common part i overlooked. for that i look at .parts 17:24
ShimmerFairy masak: Something hypothetical I thought up of would be $subdir.chroot($topdir) and then however you actually do $otherdir ~ $subdir
ChoHag Check your assumption. HOW do you know $subdir is under $topdir? The means of determining that HOW should provide enlightenment. 17:25
17:25 xinming joined
ugexe if your paths are resolved the same then you just extract the unique pairs of the 2 .parts array 17:25
if they are IO::Paths then you have the cwd to determine that 17:27
or abs path. if passed as a string then you wouldnt be able true
17:28 domidumont joined
geekosaur tony-o, fwiw build just succeeded here 17:29
tony-o geekosaur++ ty
webstrand jnthn: The segfault disappears if I edit Test::is to remove the Mu:U annotation, like multi sub is(Mu $got, $expected, $desc = ''). Moreover, if I redefine is in my local file, the compiler claims that Mu:U doesn't match type Str and refuses to compile. 17:32
17:34 xinming left 17:35 xinming joined, Foxcool_ left 17:36 pnu left, Foxcool joined 17:38 pnu joined, yqt left 17:39 JimmyZ_ left, atroxaper joined
atroxaper Hello, #perl6 ! 17:41
masak atroxaper: \o 17:42
17:42 domidumont left
masak ChoHag: a very good point. 17:42
atroxaper Do somebody know some literature about rating systems? Like ELO. Something else. Maybe for not two people. 17:43
masak: o/
masak ChoHag: I guess one way is to start at $subdir and keep peeling off the last path component until either $topdir is reached, or we're trying to peel '/' and the hypothesis is disproved.
17:43 Foxcool left 17:44 llfourn left
masak ChoHag: and then (assuming success) we kind of want to "un-peel" those path components, in reverse, onto $otherdir. 17:44
masak feels like writing some tests
17:44 Foxcool joined
timotimo did i write anything to the channel? cat lounged on the keyboard for a bit ... 17:47
seems not so
lizmat: the good news is i already have a tab open with he wordpress editor :S 17:48
_itz github.com/RichyRich/AntiCat <=- OS X specific
webstrand What is the meaning of :U in a subroutine declaration like `sub example(Mu:U $a) {}`? 17:51
timotimo the sub requires the parameter $a to be undefined, i.E. a Type Object 17:53
the opposite is :D, which requires a defined value to be passed
ugexe m: sub foo(Mu:U $x) { say $x.WHAT }; my $a = Mu.new; my $b; foo($b); foo($a); 17:54
camelia rakudo-moar 48c0ba: OUTPUT«(Any)␤Parameter '$x' requires a 'Mu' type object, but an object instance was passed␤ in sub foo at /tmp/cvwlpU2Bjh:1␤ in block <unit> at /tmp/cvwlpU2Bjh:1␤␤»
nwc10 jnthn: valgrind doesn't add much: paste.scsys.co.uk/493524 18:03
18:04 llfourn joined
nwc10 well, other than "no undefined behaviour before the NULL pointer dereference" 18:04
timotimo so, we have a MVMString that's actually null get MVM_string_graphs called on it? 18:05
might want to go into #moarvm? 18:06
18:07 atroxaper left
webstrand timotimo: How is :U defined? Can I add custom :<arbitrary> to my own classes? 18:08
timotimo no, those are defined by the language; they are called "Type Smileys" 18:09
18:10 diana_olhovik_ left
PerlJam webstrand: see S12:1616 18:10
synbot6 Link: design.perl6.org/S12.html#line_1616
18:10 cognominal joined
cdc webstrand: you can use constraint on parameter instead 18:10
timotimo right, or subset types 18:11
cdc m: multi sub foo($a where * > 3) { say '> 3' }; multi sub foo($a where * <= 3) { say '> 3' }; foo(2)
camelia rakudo-moar 48c0ba: OUTPUT«> 3␤»
cdc m: multi sub foo($a where * > 3) { say '> 3' }; multi sub foo($a where * <= 3) { say '<= 3' }; foo(2)
camelia rakudo-moar 48c0ba: OUTPUT«<= 3␤»
cdc better :)
m: multi sub foo($a where * > 3) { say '> 3' }; multi sub foo($a where * <= 3) { say '<= 3' }; foo(5)
camelia rakudo-moar 48c0ba: OUTPUT«> 3␤»
18:13 amurf joined 18:17 diana_olhovik joined 18:18 amurf left
TimToady should probably not make any decisions today, since he's without caffiene before his endoscopy, and will undoubtedly be looped out after it... 18:18
ShimmerFairy wonders if that counts as a decision... 18:19
PerlJam but ... isn't your decision to not make any decisions itself a decision?
nwc10 without caffeine - isn't there something in the constitution about "cruel and unusual punishment"?
TimToady suspects it falls in the category of no-brainer
timotimo TimToady: i wish you the best of luck with that 18:20
TimToady doesn't know what to wish, for them to find something, or not...
timotimo hopefully they'll find you do still have a colon 18:21
[Coke] May you get the best result possible.
18:22 llfourn left
timotimo [Coke]: they find some gold in there and make him lots of money? 18:22
TimToady whoops, they just called and said come in early, which I don't mind at all 18:23
catch y'all on the flip side
ShimmerFairy return $*BEST_CHOICE;
TimToady afk &
:) 18:24
ShimmerFairy see ya! o/
PerlJam TimToady: good luck!
masak good luck, wish for a happy endoscopy! 18:31
18:38 yqt joined 18:39 eternaleye joined 18:59 coachshea joined, coachshea left
timotimo god damn you, wordpress 19:09
lucasb Let's make the p6weekly in blog.perl6.org using jekyll :) 19:12
timotimo it almost nommed my post
fortunately, i could get it back
but for two minutes it seemed like the text was gone foreverr
and i forgot to write a title %) 19:13
cdc timotimo++ # p6weekly 19:16
masak timotimo: the jaded web user always Ctrl+C before pressing "Submit". :)
timotimo yeah
fortunately, javascript has these things called "localstorage" and "session storage" that can keep stuff around
masak notices in passing that what Dependency::Sort does in 163 lines, ufo used to do in 20 19:23
github.com/jaffa4/Dependency-Sort/...6#L54-L216
github.com/masak/ufo/blob/bd412a11...#L162-L181 19:24
ugexe the rosetta code one also sorts them into parallizable levels
masak what I'm saying is, jaffa4 would probably love patches from all of us.
we could help turn his code shorter and more idiomatic.
also note there's a test() sub below that code, which probably should go into a t/*.t file using Test.pm instead 19:25
oh, and if someone wants to PR this line (which now should work), I will happily merge that PR: github.com/masak/ufo/blob/master/bin/ufo#L215 19:26
ugexe the fun part of the topo sort on p6 modules is taking into account multiple package names inside the same file 19:36
otherwise you end up coloring the same module multiple times while inside a single file 19:37
19:38 diana_olhovik__ joined 19:39 FROGGS left, diana_olhovik left
ugexe i modified the rosetta code version to work with an array of meta files, and then treat provides as their actual file names 19:41
19:43 espadrine_ joined
ugexe that way %seen{A::B} and %seen{A::C} and treated properly if they are both packages in the same file, ala %seen{/lib/A.pm} 19:44
ive also found it helpful for when i want to build a distribution but not install each repo before attempting to build/test the module that was explicitly requested 19:47
19:56 espadrine_ left 19:57 lucasb left 19:59 _itz_ joined 20:01 kyclark joined 20:03 amurf joined 20:07 amurf left 20:08 bin_005 joined 20:11 webstrand left 20:18 llfourn joined 20:20 kyclark left 20:21 kyclark joined, kyclark left 20:22 xfix left, llfourn left 20:23 darutoko left 20:24 webstrand joined 20:31 diana_olhovik__ left 20:36 raiph joined
PerlJam Is there a functioning "try perl6 in the browser" thingy somewhere? 20:57
masak no. 21:01
I guess we are all waiting for pmurias++ to surprise us with one, one of these days :>
21:02 webstrand left 21:06 lucasb joined 21:09 bin_005 left 21:10 bin_005 joined 21:12 skids left 21:16 webstrand joined
lucasb About what ugexe said in the backlog about Test.pm, I just want to add my understanding of the issue: 21:30
Since Test.pm has and END phasers with exit(0), one can type any arbitrary text and the script will always exit successfully 21:31
With the --ll-exception option, the END phasers are not run 21:32
perl6 -e 'use Test; asdf' && echo ok
perl6 -e 'die; END { exit 0 }' && echo ok
perl6 --ll-exception -e 'die; END { say "hi" }'
So I guess the question is: should END phasers run when an exception/failure is throw? 21:35
PerlJam lucasb: what if sometimes the answer is "yes" and sometimes it's "no"? :) 21:36
lucasb PerlJam: yeah, I don't know how this should be handled :) 21:39
21:49 dolmen joined 21:51 webstrand left 21:56 vendethiel left 22:19 TEttinger joined, vendethiel joined 22:28 lucasb left 22:30 Arpho joined, Arpho left
timotimo i think we want something somewhere that gets rid of assignments to $?ROUTINE if it's not needed ... 22:38
masak that sounds like it could be statically knowable. 22:40
22:44 vendethiel left
timotimo right, i think it ought to be 22:47
don't really know why it shows up in the code we gen
possibly because we want CALLER::('$?ROUTINE') or something? 22:48
22:55 kaare_ left 23:09 skids joined 23:16 RabidGravy left 23:19 llfourn joined, dolmen left, nightfrog left 23:23 nightfrog joined, llfourn left
timotimo i'm too dumb to use the act user management 23:32
when i try to register, it says there's already a user similar to that, when i try to "forgot password", it says "no such user"
geekosaur "similar to" 23:33
23:40 amurf joined
timotimo well, that one is me :) 23:41
and it has the login that i'm trying to use to recover my passwor 23:42
masak software. it sucks. 23:44
23:45 amurf left
ugexe lucasb: its more complicated than that. otherwise it would be trivial to add a BEGIN $start = 1; and inside END add unless $start exit(255) 23:45
masak timotimo: this might be relevant: github.com/blogs-perl-org/blogs.pe...issues/285 github.com/blogs-perl-org/blogs.pe...issues/206
23:46 jordman joined
ugexe the reason it happens is because of the code to handle tests without a plan 23:46
masak wow, reading through that issues list, I have the feeling that blogs.perl.org has All The Issues. 23:47
23:48 raiph left, xiaomiao left
masak "My password is compromised, I need to change it.." -- from November 2013 :/ 23:49
23:49 raiph joined
timotimo ~it seems like that's not the same thing? 23:50
masak: different kind of account perhaps?
23:51 jordman left
masak quite possibly. 23:51
those were the two I found from a quick scan of the issues list.
timotimo ooooh
it says "login or email address"
with just the login it works though 23:52
23:52 xiaomiao joined, vendethiel joined
timotimo signing up for the swiss perl workshop ... finally 23:53
i should have thought of a talk to give to make it less expensive :P
masak \o/
23:53 virtualsue left
masak timotimo: looking forward to meeting you at swiss 23:54
timotimo likewise :) 23:55
masak 'night, #perl6 23:57