Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2015-07-02

Perl 6 | Reference Documentation | Rakudo

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:00 b2gills m: my @a := my Array $a; say defined $a; say defined @a # you can make it undefined though
00:00 camelia rakudo-moar a436fe: OUTPUT«False␤False␤»
00:02 lucasb b2gills: understood, thanks
00:02 b2gills `defined` back in Perl 5 would always return true if you declared, or used array or hash variables beforehand.
00:03 b2gills which means if you had `use strict` then calling defined on them was pointless
00:04 lucasb yeah, I never used defined on arrays/hashes in P5 because perldoc says it is deprecated
00:14 Akagi201 joined #perl6
00:18 TEttinger joined #perl6
00:27 BenGoldberg joined #perl6
00:35 davido_ joined #perl6
00:36 Akagi201 joined #perl6
00:37 tinyblak joined #perl6
00:40 geekosaur joined #perl6
00:41 gtodd joined #perl6
00:42 tinyblak joined #perl6
00:45 lolisa joined #perl6
00:52 atroxaper joined #perl6
00:58 aborazmeh joined #perl6
00:58 aborazmeh joined #perl6
01:05 laouji joined #perl6
01:08 rmgk_ joined #perl6
01:09 Akagi201 joined #perl6
01:10 asdf12z_ joined #perl6
01:13 vendethiel joined #perl6
01:14 geekosaur joined #perl6
01:29 Akagi201 joined #perl6
01:40 TEttinger joined #perl6
01:46 ilbot3 joined #perl6
01:46 Topic for #perl6 is now »ö« Welcome to Perl 6! | http://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: http://irc.perl6.org | UTF-8 is our friend!
01:53 cognominal joined #perl6
02:03 noganex joined #perl6
02:18 dayangkun joined #perl6
02:18 vendethiel joined #perl6
02:28 laouji_ joined #perl6
02:32 tinyblak joined #perl6
02:45 laouji joined #perl6
02:55 Sqirrel joined #perl6
02:58 jack_rabbit joined #perl6
03:07 vendethiel joined #perl6
03:09 kanl joined #perl6
03:37 dalek rakudo/nom: 4741d89 | hoelzro++ | INSTALL.txt:
03:37 dalek rakudo/nom: Remove reference to readline in INSTALL.txt
03:37 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/4741d897f1
03:37 dalek rakudo/nom: 1ea7b37 | hoelzro++ | INSTALL.txt:
03:37 dalek rakudo/nom: Mention Linenoise for line editing features
03:37 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/1ea7b3726a
03:41 atroxaper joined #perl6
03:49 kaare_ joined #perl6
04:19 laouji joined #perl6
04:22 laouji joined #perl6
04:22 kanl joined #perl6
04:27 ugexe sorry, looks like the comp unit pr i sent is failing jvm. it should work, but on jvm run/shell give a bad exitcode *if* any of :out/:err/:merge are used. However, the command still is executed properly and (for instance) stores the stdout in $proc.out properly
04:28 ugexe so precompilation still finishes successfully... its just marked as a failure because of the status check -> https://github.com/rakudo/rakudo/blob/bf717b8389e7d3a6764f2884e367d5667d5f6faa/src/core/CompUnit.pm#L133
04:29 ugexe perl6-j -e "my $proc = run('perl', '-v', :out, :!chomp); say $proc.status" # returns 65280
04:30 ugexe # but $proc.out.lines outputs the perl -v output
04:30 aborazmeh joined #perl6
04:30 aborazmeh joined #perl6
04:31 ugexe perl6-j -e "my $proc = run('perl', '-v', :!chomp); say $proc.status" # returns 0
04:32 kanl joined #perl6
04:39 tinyblak joined #perl6
04:44 pochi joined #perl6
05:03 dustinm` joined #perl6
05:04 ugexe actually im not sure if there is any fallout. i just expect there may be
05:10 vendethiel joined #perl6
05:17 kanl i'm experiencing a hash slice oddity.
05:17 kanl https://gist.github.com/anonymous/0fdb5c3da8c7b0d80934
05:18 kanl while i think i can understand any justification of the different behaviors, i find it quite counterintuitive.
05:19 kanl is this by design or might this be a known issue?
05:21 kanl or it also could simply be me using it all wrong :)
05:21 atroxaper joined #perl6
05:35 ugexe id say you are correct. not sure if its a known issue, but it looks like the type of thing that may be a side effect of the list refactor
05:35 kanl this apart, it'd be pretty magical to { say %h<1 2><a> } and get "1 (Any)" instead of errors, and be consistent with { %h<1><a> } getting 1.
05:35 ugexe unless its some autovivification thing
05:36 ugexe but they all have the same .perl output
05:37 kanl but if that can't be had, at least %h<...><foo> should be made consistent :)
05:37 ugexe %h{1|2}<a> might work
05:37 kanl err, .map i mean
05:39 kanl m: my %h = 1 => $%( a => 1 ), 2 => $%( e => 4 ); say %h<1|2><a>;
05:39 camelia rakudo-moar 1ea7b3: OUTPUT«(Any)␤»
05:39 kanl m: my %h = 1 => $%( a => 1 ), 2 => $%( e => 4 ); say %h{1|2}<a>;
05:39 camelia rakudo-moar 1ea7b3: OUTPUT«any(1, (Any))␤»
05:40 kanl cool, thanks ugexe!
05:40 ugexe m: my %h = 1 => $%( a => 1 ), 2 => $%( e => 4 ); say %h{1&2}<a>;
05:40 camelia rakudo-moar 1ea7b3: OUTPUT«all(1, (Any))␤»
05:42 kanl as for the oddity in the gist, do i need to ticket it or just wait for GLR to automagically fix it?
05:46 Psyche^_ joined #perl6
05:59 diana_olhovik joined #perl6
06:11 domidumont joined #perl6
06:11 domidumont joined #perl6
06:13 _mg_ joined #perl6
06:13 domidumont1 joined #perl6
06:17 domidumont joined #perl6
06:21 gfldex joined #perl6
06:22 [Sno] joined #perl6
06:34 telex joined #perl6
06:35 Sqirrel joined #perl6
06:57 fxbrain joined #perl6
07:05 zakharyas joined #perl6
07:07 RabidGravy joined #perl6
07:12 Quom m: my %h = 1 => $%( a => 1, b => 2, c => 3 ), 2 => $%( e => 4, f => 5, g => 6 ); say %h{1,}.map: *<a>
07:12 camelia rakudo-moar 1ea7b3: OUTPUT«1␤»
07:12 Quom ^^
07:12 Quom err
07:12 Quom kanl: ^^
07:13 Quom Also, when you did %h{[1]}, that did a lookup of %h{1}, but only because it did %h{[1].length}. My understanding is that this will be more intuitive post-GLR
07:15 Quom (In that [1] will be more like @([1]) instead of $[1])
07:17 g4 joined #perl6
07:19 Quom kanl: However it looks like all these cases will work with multi-dim syntax, %h{@i;<a>}
07:19 aborazmeh joined #perl6
07:19 aborazmeh joined #perl6
07:21 Possum joined #perl6
07:26 domidumont joined #perl6
07:28 RabidGravy morning!
07:28 masak \o
07:35 mr-foobar joined #perl6
07:35 Sqirrel joined #perl6
07:36 abraxxa joined #perl6
07:36 DrForr Morning all...
07:38 laouji_ joined #perl6
07:38 masak ahoy, DrForr
07:39 lizmat good *, #perl6!
07:39 lizmat jnthn: line 542 in Str.pm causes breakage on JVM with Str.perl: if $opener >= 256 && +uniprop($opener, 'Canonical_Combining_Class')
07:40 lizmat uniprop not being implemented on the JVM
07:42 DrForr o/
07:42 lizmat DrForr \o
07:44 DrForr \o/ ,o/ ,o. \o. \o/
07:47 jnthn morning, #perl6
07:47 jnthn yay, a decent-er night of sleep at last...
07:47 jnthn lizmat: d'oh, I knew .NFC wasn't on JVM, didn't realize uniprop wasn't either
07:48 lizmat I'm just making that if conditional on moar, seems to pass the tests
07:48 dalek rakudo/nom: 0347787 | lizmat++ | src/core/Str.pm:
07:48 dalek rakudo/nom: We no haz uniprop on JVM
07:48 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/03477873a9
07:50 jnthn lizmat++
07:57 brrt joined #perl6
08:02 laouji joined #perl6
08:02 dakkar joined #perl6
08:04 domidumont joined #perl6
08:05 oha joined #perl6
08:10 darutoko joined #perl6
08:12 lizmat m: my $a; { $a = ENTER 42 }; say $a    # now works
08:12 camelia rakudo-moar 1ea7b3: OUTPUT«42␤»
08:12 lizmat m: my $a; { $a = LEAVE 42 }; say $a    # shouldn't this work also?
08:12 camelia rakudo-moar 1ea7b3: OUTPUT«(Any)␤»
08:15 Woodi joined #perl6
08:16 masak lizmat: I can't see why not.
08:17 lizmat more generally, I guess that goes for all phasers,no?
08:18 masak sorry, my mind fails to generalize. what goes for all phasers?
08:18 lizmat to be usable as a r-value
08:18 jnthn No, it shoudln't work.
08:19 jnthn S04 has a list. It tells you exactly which ones work that way.
08:19 * lizmat checks
08:19 jnthn Also, think about when a LEAVE executes
08:19 jnthn That $a = ... happens *before*
08:19 jnthn So it'd be utterly useless
08:19 masak oh, troo
08:19 masak m: my $a; { LEAVE $a = 42 }; say $a
08:19 camelia rakudo-moar 1ea7b3: OUTPUT«42␤»
08:19 masak already works.
08:19 jnthn I think there's one phaser in the list now that should be r-value but ain't
08:19 jnthn And that's FIRST
08:20 lizmat m: my $a; { $a = LEAVE 42 }; say $a    # shouldn't this be a compile time error then ?
08:20 camelia rakudo-moar 1ea7b3: OUTPUT«(Any)␤»
08:20 jnthn And I have no darn clue where we're meant to keep the state
08:20 masak we could probably offer a warning when the phaser result can never be ready in time.
08:20 jnthn lizmat: Not worth the bloat
08:20 jnthn Maybe something for a lint tool
08:20 masak funny that lizmat and I had the idea at the same time, though :)
08:21 masak I agree that it might be too insignificatnt to merit a warning
08:22 lizmat m: my $a; for ^1 { $a = FIRST say "first" }; say $a   # so this one is not up to spec yet, then
08:22 camelia rakudo-moar 034778: OUTPUT«first␤(Any)␤»
08:22 jnthn lizmat: Correct.
08:22 jnthn I actually went through the list yesterday
08:22 jnthn uh, 2-3 days ago I guess
08:22 jnthn 'cus I was fixing ENTER
08:22 jnthn I don't know how on earth to implement FIRST as an r-value.
08:22 jnthn Probably something horrible with dynamic scoping... :)
08:23 lizmat perhaps FIRST should be implemented as a sort of "once" ?
08:23 mr-foobar joined #perl6
08:24 jnthn Lets wait until after GLR with it
08:24 jnthn Because the code-gen for loops is going to be changing.
08:24 jnthn (all of them)
08:26 lizmat yeah, fair enough :-)
08:30 lizmat hmmm... on what is most likely going to be the hottest day ever in NL, our tap water just turned brown  :-(
08:31 jnthn :-(
08:33 domidumont1 joined #perl6
08:35 lizmat it appears to be just excess Fe and Mn, drinkable they say, just don't do your washing with it
08:35 Sqirrel joined #perl6
08:36 lizmat still, having tea coloured water coming out of your tap
08:36 lizmat sorta weird
08:36 * masak .oO( excess of Fe... oh, the irony )
08:36 DrForr Beat me by -><- that much.
08:38 spintronic joined #perl6
08:38 masak DrForr: don't worry, I'll let you do a pun on magnesium :P
08:39 DrForr Elementary, my dear.
08:39 pdcawley joined #perl6
08:41 arnsholt Isn't Mn manganese though? =)
08:42 DrForr (╯°□°)╯︵ ┻━periodic┻
08:43 lizmat yeah, although the Mn is not as animated as one would expect
08:43 lizmat Mg in the water would be rather explosive and not brown at all
08:44 lizmat (having tried that once in high school)
08:44 lizmat (under semi-controlled conditions)
08:44 masak oh, my bad. manganese.
08:45 masak much nicer to have in water, as lizmat++ points out.
08:45 lizmat .oO( chinese manga )
08:45 masak generally, the things on the far left in the table are quite reactive.
08:45 DrForr Mostly white, excluding the bits of porcelain from the toilet you chucked it in...though of course I have no experience of that.
08:46 ShimmerFairy I'm guessing there's no way for an inner class to access the outer class' attributes, is there? That is,    class A { has $.foo; class B { method bar { do-stuff-with($!foo); } } }
08:46 DrForr Na,Ce,Mg,Rb...
08:46 lizmat ShimmerFairy: do stuff with $.foo ?
08:46 zakharyas joined #perl6
08:47 lizmat so . instead of !
08:47 ShimmerFairy I need to restart hexchat O_O
08:48 ShimmerFairy joined #perl6
08:49 ShimmerFairy There we go; my font became all boxes everywhere, and now my usual monospace font looks different. Hm.
08:50 ShimmerFairy lizmat: ah, that makes sense. I'm used to using $!foo whenever I'm in a class.
08:50 masak ShimmerFairy: no, even `$.foo` would try to find that accessor in B.
08:50 jnthn Um, also no, there's no inner/outer class relationahip
08:50 ShimmerFairy masak: yeah, I found that out just now :)
08:51 masak ShimmerFairy: I've come to realize that if you really want inner classes in Perl 6, what you need to do is have an attribute in the inner class pointing to an instance of the outer class.
08:51 masak ShimmerFairy: and then go through it. I do that sometimes.
08:51 ShimmerFairy jnthn: darn, I was hoping I could avoid duplicating attributes between two classes
08:51 masak to be honest, that's probably a cleaner solution than Java's A.this.foo syntax :)
08:52 [Sno] joined #perl6
08:52 ShimmerFairy Well, that sucks then, though I'm not surprised.
08:53 masak oh! had this thought about PDL autolooping yesterday that I didn't share:
08:53 masak it feels like this problem is less about custom keywords and slangs, and more about custom data containers.
08:53 masak that is, the solution might rest purely in OO space.
08:54 masak we certainly have the operator flexibility to handle it. don't have to make it all about methods.
08:54 iH2O joined #perl6
08:55 ShimmerFairy masak: The "reference to another class" thing feels too C-like for my taste in Perl 6, so I'd like to avoid that if possible. I don't know why it feels C-like to me, it just does.
08:55 lizmat wouldn't a simple 'class B is A', and then use $.foo do it then ?
08:55 lizmat ShimmerFairy: or is that not what you meant?
08:55 iH2O left #perl6
08:56 masak that wouldn't create a link between the original A object and the B object, though.
08:56 ShimmerFairy lizmat: sure, but it's not really appropriate in this case. I have a "Board" class and a "Piece" class. The Board has an array of 'Piece's
08:56 RabidGravy joined #perl6
08:56 RabidGravy I blame the weather
08:56 RabidGravy is the API of IO::Socket::Async stable enough to merit documenting it?
08:56 masak ShimmerFairy: why do you feel a need for a piece to know about its board?
08:57 ShimmerFairy masak: The piece has a "barriers" method to calculate what spots it's always in, which necessitates knowing the current bounds. (The edges of the board being a first pass, at least.)
08:58 jnthn RabidGravy: Well, it's been pointed out that it has some inconsistencies with some other places, though I suspect that'll boil down to renaming at most
08:58 bin_005 joined #perl6
08:58 vendethiel joined #perl6
08:58 dalek rakudo/nom: 2f61e18 | lizmat++ | src/core/Exception.pm:
08:58 dalek rakudo/nom: Grammar (english) fix
08:58 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/2f61e18ef6
08:58 masak ShimmerFairy: I'd be inclined to make the board->piece link unidirectional. then maybe that method/knowledge belongs on the board object.
08:59 ShimmerFairy masak: That's what I thought initially, but being able to do something like   @!pieces».barriers   seems too nice to not have
08:59 RabidGravy jnthn, cool.  I have a medium term view to making a networking page in /language
09:01 lizmat list of JVM problems (on OSX at least) updated: https://gist.github.com/lizmat/573712315223a7bbca11
09:02 espadrine joined #perl6
09:02 pdcawley joined #perl6
09:03 masak ShimmerFairy: well, design is about making that kind of tradeoff. the niceness of your application hinges on you making them well, so I'd stop and think carefully about this bit before proceeding.
09:03 masak s/application/game/
09:04 lizmat afk&
09:04 ShimmerFairy masak: The ultimate goal is a program that figures out how to divide a hexslide (or in my case right now, the square version) board into partitions. And it's very early in the coding process, of course :)
09:04 masak unidirectional links simplify things a great deal, but I agree there's also a cost. the @!pieces».barriers reason you mentioned above wouldn't be enough to sway me from using unidirectional links.
09:05 masak ooh
09:05 masak right, because the partitions can be analyzed independently
09:05 ShimmerFairy masak: yeah, I don't know if that will ever actually happen, it's just that in general it seemed natural to define the method for one Piece and then loop over Pieces, and the natural way to define a function on one Piece is as a method :)
09:05 masak actually, if you still retain the criterion of a bullet slide reaching the far end, only one partition will matter
09:07 ShimmerFairy masak: For cutting down on duplicate boards, you need to know partitions; Knowing the contents of each groove isn't sufficient, it's the contents of each partition that lets you determine that. (At least, that's what I've worked out in my head, who knows how true that is? :P)
09:08 masak sounds about right.
09:09 masak but also, see above: only the partition with the bullet ever matters if your goal is to "solve" the board.
09:09 abraxxa joined #perl6
09:11 masak actually, I had another idea long ago: to divide all the possible boards into "classes". each class has a description like "2-piece, 3-piece in groove d, 3-piece in groove k" and contains all possible configurations that match that description.
09:12 masak the configurations make up the nodes in a graph, with the edges being possible moves.
09:12 ShimmerFairy masak: Yeah, I think perhaps the goal is "is the space in front of the bullet one partition (solvable) or more (unsolvable)"? Interesting idea if that holds true.
09:12 masak and then you can break down the problem, solving it per class.
09:12 masak though the classes might be very large, I don't know.
09:12 masak there's certainly quite a few of them :>
09:13 ShimmerFairy masak: Here's a simple example of how the groove contents aren't sufficient for finding unique boards, in case you're interested: https://gist.github.com/lue/0d5b7d5b2608c2120ee9
09:15 ShimmerFairy BTW, in case it's not clear, or there can be multiple definitions, my definition of "equivalent boards" is "one can be rearranged to be the other, using only legal moves"
09:17 rurban joined #perl6
09:19 ShimmerFairy masak: with that classes idea, it certainly depends on how far you want to go classify, and if you want to try defining inheritance between classes :P (class 2-piece, 3-piece in groove d 'is' class 2-piece)
09:20 masak oh, that's what you mean by barriers.
09:20 masak well, I prefer to think of it in terms of graphs. your "equivalent boards" becomes my "component of a graph".
09:20 masak a given class graph can certainly have more than one component.
09:21 ShimmerFairy (The barriers method should probably take a list of bounds anyway, and be more generalized like that.)
09:22 ShimmerFairy I don't know where I came up with the term "barriers", by the way. "dividers" would be much more appropriate.
09:22 sergot hiho
09:23 cognominal joined #perl6
09:25 masak sergocie! \o/
09:26 tadzik hello hello
09:27 DrForr Morning.
09:27 RabidGravy I'm just going to kebab IO::Socket::Async right now unless anyone has any objections?
09:28 DrForr Only if you don't add onions and peppers.
09:29 RabidGravy but plenty of chilli sauce?
09:29 DrForr Oo, true, don't forget the sriracha.
09:33 DrForr ShimmerFairy: If I understand what you're after, maybe partitions would be more appropriate?
09:34 ShimmerFairy DrForr: "partitions" is for the space that gets divided by the dividers :)
09:34 DrForr Oh, true. I tend to think of 'partitioning the search space' in these cases.
09:34 lizmat hmmm, looks like a436fecb0c9143d6f49c9bd breaks t/spec/S24-testing/line-numbers.t
09:35 BooK where can I find out about perl6 and threads?
09:36 lizmat S17
09:36 aborazmeh joined #perl6
09:36 aborazmeh joined #perl6
09:36 lizmat S17:01
09:36 synbot6 Link: http://design.perl6.org/S17.html#line_01
09:36 sqirrel_ joined #perl6
09:37 BooK thanks
09:37 lizmat yw  :-)
09:38 mr-foobar joined #perl6
09:38 BooK lizmat: and do they work better than in perl 5?
09:38 lizmat they can't really be compared, I would say
09:38 lizmat Perl ithreads are not really threads
09:39 lizmat they're really old-Unix style, pre COW, forks
09:39 lizmat P6 concurrency *is* true concurrency, without copying anything
09:39 RabidGravy BooK, see also http://docs.perl6.org/language/concurrency which has somewhat of an overview
09:39 virtualsue joined #perl6
09:39 lizmat but with more responsiblity for developers
09:40 tadzik where is pmichaud's writeup on GLR?
09:41 lizmat https://github.com/perl6/specs/blob/master/S07-glr-draft.pod
09:41 tadzik thanks lizmat
09:41 tadzik oha: ^
09:43 tinyblak joined #perl6
09:45 amurf joined #perl6
09:48 itz__ joined #perl6
09:48 dams joined #perl6
09:54 rurban joined #perl6
09:54 RabidGravy KEBABED! https://github.com/rakudo/rakudo/pull/456
09:54 dalek roast: 974e459 | lizmat++ | S12-class/stubs.t:
09:54 dalek roast: Make test grammar correction free
09:54 dalek roast: review: https://github.com/perl6/roast/commit/974e459b4d
09:55 dalek rakudo/nom: 1950206 | RabidGravy++ | src/core/IO/Socket/Async.pm:
09:55 dalek rakudo/nom: Kebab case and deprecate chars_supply, bytes_supply
09:55 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/1950206c5e
09:55 dalek rakudo/nom: d9e3070 | lizmat++ | src/core/IO/Socket/Async.pm:
09:55 dalek rakudo/nom: Merge pull request #456 from jonathanstowe/kebab-io-socket-async
09:55 dalek rakudo/nom:
09:55 dalek rakudo/nom: Kebab case and deprecate chars_supply, bytes_supply
09:55 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/d9e3070ed7
09:55 _mg__ joined #perl6
09:58 lizmat_ joined #perl6
09:59 prammer joined #perl6
09:59 rindolf joined #perl6
10:02 itz_ joined #perl6
10:03 atroxaper joined #perl6
10:07 lizmat .tell FROGGS there's something weird going on with repeated qqx[], it seems
10:07 yoleaux lizmat: I'll pass your message to FROGGS.
10:07 timotimo DEPRECATED always makes stuff sooooo slow, but in this case it's methods that you only call every now and then, so it's fine
10:07 lizmat DEPRECATED is a lot faster nowadays, now that we have lazy backtraces
10:07 lizmat but yeah, there should be an incentive to migrate  :-)
10:07 timotimo oh, cool
10:07 atroxaper joined #perl6
10:08 * lizmat is looking at her screen and the only thing she can think of is "siesta"
10:10 cognominal more like coma here :(
10:12 itz_ joined #perl6
10:13 lizmat .tell FROGGS looking at failures in t/spec/S24-testing/line-numbers.t and t/spec/S32-io/IO-Socket-INET.t
10:13 yoleaux lizmat: I'll pass your message to FROGGS.
10:13 aborazmeh joined #perl6
10:13 aborazmeh joined #perl6
10:13 grondilu joined #perl6
10:13 * virtualsue gets the latests rakudo star after noticing that moarvm isn't building today
10:14 jnthn virtualsue: "isn't building"?
10:14 virtualsue well, isn't linking
10:14 blackbolt joined #perl6
10:14 tinyblak joined #perl6
10:14 jnthn Hm...if you still have it, could you gist the failure mode?
10:15 timotimo si, esta bene
10:16 virtualsue https://gist.github.com/virtualsue/0b757b139f3946c2515e
10:20 timotimo virtualsue: that's probably from a fresh extraction and clean build?
10:21 virtualsue yes
10:21 virtualsue well, after a pull and a make clean
10:22 jnthn Presume a re-Configure too?
10:22 virtualsue nope, will do that after i get back
10:22 timotimo ah
10:22 timotimo that'll be the problem; new files were added
10:22 timotimo that requires a re-configure
10:23 pdcawley joined #perl6
10:27 itz joined #perl6
10:27 itz morning
10:29 nwc10 ^good :-)
10:30 masak have the appropriate amount of morning goodness
10:30 nwc10 test!
10:30 CIAvash joined #perl6
10:33 blackbolt morning, timotimo, can you help me with "exit" method in GTK::Simple?
10:53 timotimo i haven't touched GTK::Simple in a long time
10:53 timotimo what's the problem?
10:54 blackbolt 4 dec 2014: "quick and dirty implementation of GTK::Simple::Window"
10:55 blackbolt i need secend window, and there is problem with method exit
10:59 blackbolt can you run this: http://pastebin.com/Ajqh1CpH
10:59 kaare_ joined #perl6
11:06 ShimmerFairy m: my @a = [1,2],[3,4]; my @b = [3,4],[5,6]; say @a (&) @b  # it's very annoying that this doesn't DWIM
11:06 camelia rakudo-moar d9e307: OUTPUT«set()␤»
11:08 ShimmerFairy I can see why it happens (=== right?), but that doesn't mean I like it :)
11:10 Zimbabwe joined #perl6
11:14 _mg_ joined #perl6
11:15 ShimmerFairy Is there any good reason why it _shouldn't_ do what I want it to?
11:16 timotimo you want the result to be [3,4], correct?
11:16 timotimo it's hard to do when you have mutable lists involved :\
11:17 Ulti jnthn just tried running your golf helper demo and got "Invalid GC status observed; aborting"
11:18 Ulti on OSX with rakudo moar built about 5 minutes ago
11:18 ShimmerFairy timotimo: yes, and considering [3,4] ~~ [3,4] , I'm tempted to say it's not that hard (but I imagine it's not as easy as ~~ makes it seem :P)
11:18 timotimo mhh
11:21 ShimmerFairy The only solution I see so far would be to turn those two-element lists into complex numbers, but that's really ugly.
11:22 timotimo m: my @a = [1,2],[3,4]; my @b = [3,4],[5,6]; say @a.grep(@b)
11:22 camelia rakudo-moar d9e307: OUTPUT«␤»
11:22 oha if i die [1,2,3] how can i distinguish it in a catch from a die "string" ?
11:22 timotimo m: my @a = [1,2],[3,4]; my @b = [3,4],[5,6]; say @a.grep(any(@b))
11:22 camelia rakudo-moar d9e307: OUTPUT«3 4␤»
11:23 ShimmerFairy Heh, that actually would work. Shame I can't use setops for the same thing, though.
11:24 brrt joined #perl6
11:25 timotimo yeah :|
11:25 timotimo you can redefine the set ops lexically
11:27 ShimmerFairy Considering I'm only doing this once (at least so far), I don't think it's quite worth redefining the setops :)
11:27 ShimmerFairy Oh, that reminds me, does the CORE setting still have that "no unicode characters" limitation?
11:28 timotimo OK
11:29 timotimo not sure
11:33 ShimmerFairy m: my @a = [1,2],[3,4]; my @b = @a[0]; say @a.perl; say @b.perl;
11:33 camelia rakudo-moar d9e307: OUTPUT«[[1, 2], [3, 4]]<>␤[[1, 2]]<>␤»
11:33 ShimmerFairy I don't think @b is supposed to be nested like that (but I just realized I may be the one who's mistaken)
11:35 gfldex m: my @a = [1,2],[3,4]; my $b = @a[0]; say @a.perl; say $b.perl;
11:35 camelia rakudo-moar d9e307: OUTPUT«[[1, 2], [3, 4]]<>␤[1, 2]␤»
11:35 amurf joined #perl6
11:36 ShimmerFairy I get why it happened, but I still want to say it's a bug that assigning a 1D row from a 2D array to an array results in a 2D array.
11:37 gfldex m: my @a = [1,2],[3,4]; my $b = @a[0]; my @c; @c.push($b); say @a.perl; say $b.perl; say @c.perl;
11:37 camelia rakudo-moar d9e307: OUTPUT«[[1, 2], [3, 4]]<>␤[1, 2]␤[[1, 2]]<>␤»
11:37 timotimo it's hard to put something into the initial @a that would flatten when you take it out but not flatten it into the original @a directly
11:37 timotimo m: my @a = [1,2]<>, [3,4]<>; say @a.perl; my @b = @a[0]; say @b.perl
11:37 camelia rakudo-moar d9e307: OUTPUT«[1, 2, 3, 4]<>␤[1]<>␤»
11:38 gfldex i think rakudo is right because (in my eyes) my @b = @a[0] is the same as @b.push(@a[0])
11:38 * sjn also gets surprised by ShimmerFairy's example
11:39 ShimmerFairy timotimo: Yeah, but it's still a bit of a WAT that I my 1D row became a 2D array inside @b (it caused a bug when @b[0] += $var became 2 (where $var == 0))
11:39 ShimmerFairy s/I//
11:39 timotimo mhm
11:39 timotimo i need to run now :)
11:39 masak ShimmerFairy: I don't think it's surprising.
11:39 ShimmerFairy masak: surprised me :)
11:39 gfldex m: my @a = [1,2],[3,4]; my @b := @a[0]; say @a.perl; say @b.perl;
11:39 camelia rakudo-moar d9e307: OUTPUT«[[1, 2], [3, 4]]<>␤[1, 2]<>␤»
11:40 masak ShimmerFairy: you need to realize that assignment to an array assigns to the *insides* of that array.
11:40 masak ShimmerFairy: like `my @a = 1, 2, 3;`
11:40 gfldex = is not the same then = as found in most languages
11:40 masak ShimmerFairy: there's no mention of the actual array there. you just get it for free.
11:40 gfldex we have := that does most of the = in non-perl6
11:40 ShimmerFairy gfldex: except := allows me to modify the original array, which I do _not_ want in this case.
11:41 masak ShimmerFairy: same thing with `my @b = @a[0];` -- there's two arrays in play here: @a[0], and the surrounding, implicit array.
11:41 gfldex if you want to clone, you should clone
11:41 gfldex m: my @a = [1,2],[3,4]; my @b = @a[0].clone; say @a.perl; say @b.perl;
11:41 camelia rakudo-moar d9e307: OUTPUT«[[1, 2], [3, 4]]<>␤[1, 2]<>␤»
11:41 ShimmerFairy I have never used (or even really known about) .clone in my life. What good is it?
11:42 ShimmerFairy masak: I still maintain that my expectation is more correct than what happened. I really hope this isn't going to stay the same post-GLR :P
11:42 masak gfldex: heh, that one surprised me :) why is it only one layer of array there?
11:42 gfldex it garantees to make a copy (that may be CoW tho)
11:42 moritz ShimmerFairy: DateTime uses it internally for creating derived objects
11:42 gfldex masak: i have no idea
11:43 gfldex .clone may even flatten at a spot where it shouldn't
11:43 ShimmerFairy masak: the implicit outer [] on assigning to @a vars used to trip me up when I started out with Perl 6, and I'm surprised it tripped me up again. I _really_ don't like it whenever it does.
11:44 gfldex m: my @a = [1,2,[5,6]],[3,4]; my @b = @a[0].clone; say @a.perl; say @b.perl;
11:44 camelia rakudo-moar d9e307: OUTPUT«[[1, 2, [5, 6]], [3, 4]]<>␤[1, 2, [5, 6]]<>␤»
11:45 masak ShimmerFairy: I kind of like it.
11:45 masak ShimmerFairy: it's one of the benefits of using the @ sigil
11:45 masak ShimmerFairy: bit less clutter.
11:45 ShimmerFairy masak: I've gotten used to it, but I wouldn't say I like it (esp. right now) :)
11:45 masak *nod*
11:45 masak it is quite unusual, I'll give you that.
11:45 masak and in that sense, it's definitely not Least Susrprise.
11:46 ShimmerFairy masak: I especially think it's bad that I can't easily take a 1D slice of a 2D array in this case; the fact that I have to do some kind of trick (mine is @a[0].flat) feels wrong here.
11:46 masak *nod*
11:47 masak Perl 5 has it easier there, because it flattens everything.
11:48 ShimmerFairy I really hope the GLR will eliminate most, if not all, of the problems I've run into with lists over the years :) . It's the one part of Perl 6 I've never been able to navigate without one or two frustrations (see the failure of set intersection earlier for another example)
11:48 gfldex I like that fact that i have to keep := and .clone in mind because I found myself on the wrong end of a stick that filled all my RAMs a few times in the past
11:48 gfldex please dont fill all my RAMs :(
11:49 ShimmerFairy $a := $b is more akin to  T& a = b  , in my mind
11:50 kanl Quom: thanks.
11:54 AlexDani` joined #perl6
12:04 rindolf joined #perl6
12:08 lizmat ShimmerFairy, timotimo : re http://irclog.perlgeek.de/perl6/2015-07-02#i_10838986 , no the CORE settings can haz unicode (now that parrot is no longer supported)
12:10 ShimmerFairy lizmat: that's what I thought. Maybe someone should go through and unicode-ify the CORE at some point, now that there's no real reason not to.
12:10 lizmat wrt to set operators, I've already done that
12:10 ShimmerFairy That you did. I forgot the last set_operators.pm I looked at was a quite old one :)
12:11 lizmat it was f4de5f36
12:11 RabidGravy anyone fancy golfing this async echo client example: https://gist.github.com/jonathanstowe/40ae924c79342d3ac244 - it works with the example echo server in the IO::Socket::INET but I can't get it shorter and work reliably
12:11 * lizmat goes back to siestaing
12:21 rurban joined #perl6
12:30 BooK just ran my first perl6 oneliner
12:30 BooK or at least my first since 2007
12:31 RabidGravy and did you get sucked into an alternate dimension?
12:31 BooK I'm still waiting for the ship to pick me up
12:31 RabidGravy cool
12:32 BooK I think I'll try to see if I can port Git::Repository to perl 6
12:32 BooK I sure hope there won't be any ugly implementation details as there are in the perl 5 version
12:33 colomon joined #perl6
12:35 RabidGravy there probably will be but you can just hide them better ;-)
12:37 colomon joined #perl6
12:41 tinyblak joined #perl6
12:53 itz joined #perl6
12:55 rindolf joined #perl6
13:04 itz__ joined #perl6
13:04 hoelzro morning #perl6
13:04 itz___ joined #perl6
13:07 tinyblak joined #perl6
13:10 itz_ joined #perl6
13:10 itz___ joined #perl6
13:12 masak morning, hoelzro
13:12 hoelzro morning masak
13:13 BooK so, where do I find the methods for an IO::Pipe object?
13:14 BooK http://doc.perl6.org/type/IO%3A%3APipe
13:14 Juerd 404
13:15 itz_ joined #perl6
13:16 sjn http://doc.perl6.org/type.html # has no IO::Pipe listed
13:16 itz__ joined #perl6
13:16 BooK perl6 -e 'say run( "ls" ).out.^methods' # introspection can help, in the absence of docs :-)
13:16 nys joined #perl6
13:17 moritz m: say IO::Pipe.^mro
13:17 camelia rakudo-moar d9e307: OUTPUT«IO::Pipe is disallowed in restricted setting␤  in sub restricted at src/RESTRICTED.setting:1␤  in method gist at src/RESTRICTED.setting:33␤  in block <unit> at /tmp/Xdb3nlX3Ng:1␤␤»
13:18 moritz BooK: I think IO::Pipe isa IO::Handle, so http://doc.perl6.org/type/IO::Handle might be of some interest
13:19 BooK perl6 -e 'say run( "ls" ).out.^parents'
13:19 BooK (IO::Handle)
13:20 BooK perl6 -e 'say run( "ls" ).out.lines' # dies loudly
13:21 moritz uhm
13:22 moritz don't you need to say  run("ls", :out) to make .out a Pipe?
13:22 moritz otherwise it might be just a type object
13:22 BooK I don't know, this is my first hour coding in perl 6
13:23 moritz plesae try say run( "ls", :out ).out.lines
13:23 BooK yes, that worked, except for the newlines
13:24 BooK .say for run( "ls", :out ).out.lines # DWIM
13:24 moritz it chomps by default; add a :!chomp if you don't want it to chomp
13:24 moritz run('ls', :out, :!chomp)
13:24 BooK where do I find those adverbs ?
13:25 moritz http://doc.perl6.org/type/Proc
13:25 moritz it's documented for &run and Proc.new together
13:25 BooK yes, just saw that
13:26 moritz maybe I should add a heading for 'sub run', just to have it searchable
13:26 BooK "Setting one (or more) of them to True makes the stream available as an IO::Pipe object of the same name, so for example $proc.out." # this is why I need the :out ?
13:26 moritz right
13:27 BooK oooh, because if I say :out = $some_other_pipe, then it will just pipe the data to the other?
13:27 moritz :out($some_other_pipe) or out => $some_other_pipe
13:27 moritz yes
13:27 BooK ok, let me try to run ls | sort this wya
13:28 g4 joined #perl6
13:28 moritz the synopsis has an example for that
13:28 skids joined #perl6
13:28 moritz well, echo | cat -n
13:28 moritz but same principle
13:28 BooK just trying to figure it out by myself
13:28 BooK to see how intuitive it is for this perl 5 dinosaur
13:29 moritz BooK: fwiw if you have feedback on how to improve the docs, feel free to share here and/or on https://github.com/perl6/doc/issues/
13:29 BooK I guess I first need to understand how they are organized
13:31 BooK of course, my first attempts hangs
13:31 dalek rakudo-star-daily: 33a7392 | coke++ | log/ (9 files):
13:31 dalek rakudo-star-daily: today (automated commit)
13:31 dalek rakudo-star-daily: review: https://github.com/coke/rakudo-star-daily/commit/33a7392198
13:31 dalek perl6-roast-data: 549528f | coke++ | / (9 files):
13:31 dalek perl6-roast-data: today (automated commit)
13:31 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/549528f201
13:39 yqt joined #perl6
13:42 Akagi201 joined #perl6
13:50 BooK so, let's say I have a class with a $.dir attribute, which is a IO::Path. I want to be able to call new with a Str, and get a IO::Path in my object
13:50 BooK is that done with BUILD ?
13:50 masak yes
13:51 BooK but can I do something like $!dir = IO::Path.new($.dir) if $.dir.isa(Str) ?
13:52 masak $!dir = $!dir.IO if $!dir ~~ Str
13:52 Juerd If you're going to use the $!, why not all the way?
13:52 masak you should all the way in submethods
13:52 * [Coke] yawns
13:53 masak BooK: might even be able to skip the `if`, given that .IO will tend to do the right thing if you already have an IO::Path
13:53 masak BooK: also might be possible to do this with a coercion type in the param list: IO::Path(Str)
13:54 masak m: sub foo( IO::Path(Str) $file ) { say $file }; foo( "file1" )
13:54 camelia rakudo-moar d9e307: OUTPUT«Method 'IO::Path' not found for invocant of class 'Str'␤  in sub foo at /tmp/9Ay0c0HlFO:1␤  in block <unit> at /tmp/9Ay0c0HlFO:1␤␤»
13:54 masak meh :/
13:54 masak m: sub foo( IO(Str) $file ) { say $file }; foo( "file1" )
13:54 camelia rakudo-moar d9e307: OUTPUT«"/home/camelia/file1".IO␤»
13:54 masak oh, that works.
13:54 masak m: sub foo( IO() $file ) { say $file }; foo( "file1" )
13:54 camelia rakudo-moar d9e307: OUTPUT«"/home/camelia/file1".IO␤»
13:55 masak BooK: ^
13:56 BooK I see
13:56 hoelzro when I was building the docker 2015.06 rakudo star image yesterday, I was bitten by the lack of readline facilities. Any chance we could add Linenoise to rakudo star?
13:56 moritz does it work on Windows?
13:57 moritz does it need a C compiler?
13:58 oha m: "abc" ~~ m{()};
13:58 camelia rakudo-moar d9e307: OUTPUT«5===SORRY!5=== Error while compiling /tmp/VUxsZTEF1F␤Null regex not allowed␤at /tmp/VUxsZTEF1F:1␤------> 3"abc" ~~ m{(7⏏5)};␤»
13:59 jnthn So putting it together, submethod BUILD(IO() :$!dir) { }
14:00 BooK not sure I understand what that means
14:00 BooK also, I have two such attributes and one of them is optional
14:00 hoelzro moritz: it does indeed need a C compiler
14:01 hoelzro I haven't tried it on Windows, but I recently updated the included linenoise.c file to use MoarVM/linenoise, which has Windows patches
14:02 BooK jnthn: basically signatures are so powerful you don't need any code :-)
14:02 moritz hoelzro: it should be tested on windows before we add it to star
14:02 hoelzro moritz: works for me
14:08 hoelzro "A successful match always returns a C<Match> object, which is generally also put into C<$/>..." is there a context in which $/ is *not* populated by a regex match?
14:09 BooK how do I actually load IO::Path, so that I can do things like IO::Path.new( "foo" ) ?
14:09 moritz BooK: it's already loaded
14:09 vendethiel joined #perl6
14:09 moritz m: sub f($/) { say $/ }; say f "foo"
14:09 camelia rakudo-moar d9e307: OUTPUT«foo␤True␤»
14:09 moritz hoelzro: ^^
14:09 moritz or the other way round
14:10 moritz m: grammar A { token TOP { .* } }; A.parse('foo'); say $/
14:10 camelia rakudo-moar d9e307: OUTPUT«「foo」␤»
14:10 moritz huh
14:11 colomon joined #perl6
14:13 JimmyZ_ joined #perl6
14:22 * timotimo did some errands in the city and had a piece of watermelon, too
14:26 hoelzro m: my $s = 'the quick fox jumped over the lazy dog'; my $m = $s ~~ m:s/$<one>=[\w+] $<two>=[\w+] $<three>=[\w+]/; say ( :one($<one>.Str), :three(do { ($m<three> ~~ /'fox' || 'dog'/).Bool }), :two($<two>.Str),).hash;
14:26 camelia rakudo-moar d9e307: OUTPUT«Use of Nil in string context  in block <unit> at /tmp/d1cCnrK4i2:1␤one => the, three => True, two => ␤»
14:27 hoelzro ^^ shouldn't the do block above get its own $/ variable?
14:27 jnthn $/ is per routine
14:27 jnthn YOu can declare your own $/
14:27 hoelzro ah, ok
14:27 masak <BooK> jnthn: basically signatures are so powerful you don't need any code :-)
14:27 masak BooK: in 2024, we'll be able to auto-generate signatures, thus eliminating programming altogether :P
14:28 moritz masak: oh, you still write your signatures by hand?
14:29 moritz :-)
14:29 masak lovingly hand-crafter, yessir
14:29 masak crafted*
14:29 hoelzro m: my $x = 1; do { my $x = $x; say $x }
14:29 camelia rakudo-moar d9e307: OUTPUT«(Any)␤»
14:30 hoelzro ^ should the RHS of the inner my be able to consult the outer $x?
14:30 masak most certainly not
14:30 jnthn OUTER::<$x>
14:30 masak after the `my $x`, a new $x is visible in the scope.
14:30 masak shadowing the old one.
14:32 noganex joined #perl6
14:32 hoelzro ok, got it
14:32 timotimo m: my $x = 1; do { say $x; my $x = 5; say $x }
14:32 camelia rakudo-moar d9e307: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Qm2AVx2HOE␤Lexical symbol '$x' is already bound to an outer symbol;␤the implicit outer binding must be rewritten as OUTER::<$x>␤before you can unambiguously declare a new '$x' in this scope␤at /tmp/Qm2A…»
14:33 timotimo "after the my $x", but also before it :)
14:39 moritz this allows one to write recursion into anonymous subs more easily
14:39 moritz m: my $f = sub ($x) { $x == 0 ?? 1 !! $x * $f($x - 1) }; say $f(4)
14:39 camelia rakudo-moar d9e307: OUTPUT«24␤»
14:40 moritz you can't do that in p5
14:40 jnthn m: my $f = anon sub fac($x) { $x == 0 ?? 1 !! $x * fac($x - 1) }; say $f(4)
14:40 camelia rakudo-moar d9e307: OUTPUT«5===SORRY!5=== Error while compiling /tmp/7mSxdS4Ic7␤Undeclared routine:␤    fac used at line 1␤␤»
14:40 jnthn aww, thought you could do that...
14:41 lucasb joined #perl6
14:44 moritz m: my $f = anon sub fac($x) { $x == 0 ?? 1 !! $x * &::ROUTINE($x - 1) }; say $f(5)
14:44 camelia rakudo-moar d9e307: OUTPUT«5===SORRY!5=== Error while compiling /tmp/AkBBzzqLap␤Undeclared routine:␤    &ROUTINE used at line 1␤␤»
14:44 moritz m: my $f = anon sub fac($x) { $x == 0 ?? 1 !! $x * &?ROUTINE($x - 1) }; say $f(5)
14:44 camelia rakudo-moar d9e307: OUTPUT«120␤»
14:46 VinceDee joined #perl6
14:51 timotimo hm, we can't do a levenshtein to find $? variables yet?
14:51 timotimo because they only get installed as soon as you mention them, perhaps?
14:52 timotimo LWP::Simple has a Sub isa_ok (from Test) seen at:
14:52 timotimo t/parse-url.t, line 48
14:55 lucasb Hello. Does it makes sense to say "given @a" or "given %h"? Will it bind the array/hash into $_ inside the block?
14:56 marchelzo_ joined #perl6
14:56 timotimo m: sub foobar(num $foo = 0e0) { }
14:56 camelia rakudo-moar d9e307: OUTPUT«5===SORRY!5=== Error while compiling /tmp/i90XTHojDs␤Default value '0' will never bind to a parameter of type num␤at /tmp/i90XTHojDs:1␤------> 3sub foobar(num $foo = 0e07⏏5) { }␤    expecting any of:␤        constraint␤»
14:56 timotimo lucasb: that's right
14:56 lucasb m: my @a = 1,2,3; given @a { .perl.say }
14:56 camelia rakudo-moar d9e307: OUTPUT«[1, 2, 3]<>␤»
14:56 lucasb m: my @a = 1,2,3; given @a { $_ = 42 }
14:56 camelia rakudo-moar d9e307: OUTPUT«Cannot assign to an immutable value␤  in block <unit> at /tmp/99RfBY9ulI:1␤␤»
14:57 timotimo hm, given probably doesn't set $_ to rw?
14:57 lucasb ^^ Any reason I can't assign to them?
14:57 dalek doc: 0caf9d5 | RabidGravy++ | lib/Type/IO/Socket/Async.pod:
14:57 dalek doc: Add documentation for IO::Socket::Async
14:57 dalek doc: review: https://github.com/perl6/doc/commit/0caf9d5b82
14:57 dalek doc: 319ddfb | RabidGravy++ | lib/Type/IO/Socket/Async.pod:
14:57 dalek doc: Merge branch 'io-socket-async'
14:57 dalek doc: review: https://github.com/perl6/doc/commit/319ddfb4aa
14:57 masak m: my @a = 1, 2, 3; for @a { $_ = 42 }; say @a
14:57 camelia rakudo-moar d9e307: OUTPUT«42 42 42␤»
14:57 masak lucasb: you can, if you use `for`
14:58 masak m: my @a = 1, 2, 3; given @a[1] <-> $_ { $_ = 42 }; say @a
14:58 camelia rakudo-moar d9e307: OUTPUT«1 42 3␤»
14:58 masak m: my @a = 1, 2, 3; given @a[1] { $_ = 42 }; say @a
14:58 camelia rakudo-moar d9e307: OUTPUT«1 42 3␤»
14:58 timotimo m: nqp::istype(0e0, num)
14:58 camelia rakudo-moar d9e307: OUTPUT«===============================================================================␤The use of nqp::operations has been deprecated for non-CORE code.  Please␤change your code to not use these non-portable functions.  If you really want␤to keep using nqp:…»
14:58 timotimo m: use nqp; nqp::istype(0e0, num)
14:58 camelia rakudo-moar d9e307: ( no output )
14:58 timotimo m: use nqp; say nqp::istype(0e0, num)
14:58 camelia rakudo-moar d9e307: OUTPUT«0␤»
14:58 masak lucasb: or if you do `given` on a single element of the list.
14:58 timotimo that'd be the reason.
14:59 RabidGravy someone might want to make better examples for that as I struggled to make a sensible client
14:59 timotimo m: say nqp::objprimspec(my num $foo)
14:59 camelia rakudo-moar d9e307: OUTPUT«===============================================================================␤The use of nqp::operations has been deprecated for non-CORE code.  Please␤change your code to not use these non-portable functions.  If you really want␤to keep using nqp:…»
14:59 timotimo m: use nqp; say nqp::objprimspec(my num $foo)
14:59 camelia rakudo-moar d9e307: OUTPUT«0␤»
14:59 timotimo m: use nqp; say nqp::objprimspec(num)
14:59 camelia rakudo-moar d9e307: OUTPUT«2␤»
14:59 timotimo m: use nqp; say nqp::objprimspec(nqp::decont(my num $foo))
14:59 camelia rakudo-moar d9e307: OUTPUT«0␤»
15:00 timotimo m: use nqp; say nqp::objprimspec(Str)
15:00 camelia rakudo-moar d9e307: OUTPUT«0␤»
15:00 timotimo ok
15:00 lucasb I was trying to assign a new array as a whole, not an individual element
15:00 lucasb more like "given @a <-> $_"
15:00 dalek rakudo/nom: 9b4463d | timotimo++ | src/Perl6/Actions.nqp:
15:00 dalek rakudo/nom: work around X::Parameter::Default::TypeCheck not understanding native parameters
15:00 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/9b4463d87b
15:00 lucasb but maybe it doesn't work, that's ok
15:01 timotimo ^- should i file a bug & build a test for this?
15:01 hoelzro === is object identity equivalence, and eqv is structural equivalence, right?
15:02 timotimo i think so, yeah
15:02 timotimo and =:= is container equivalence
15:02 timotimo er ... container identity check
15:02 marchelzo_ left #perl6
15:02 hoelzro alright, thanks for the sanity check!
15:02 rurban joined #perl6
15:12 telex joined #perl6
15:12 amurf joined #perl6
15:12 sivoais joined #perl6
15:17 ugexe i think i see the jvm shell/run exitcode bug. now i uh... just have to learn java
15:18 jnthn There's not very much Java to learn...
15:19 ugexe that what it looks like, but you shouldnt overestimate my abilities either heh
15:20 RabidGravy :)
15:32 nnms joined #perl6
15:34 nnms добрый день, у меня есть список названий тегов, как лучше и изящнее сопроставить их с существующими тегами в документе,  по классике пользоваться модулями нет желания
15:40 nine nnms: Good afternoon, could you repeat your question in English? I'm not sure anyone on the channel speaks Russian.
15:43 timotimo google translate does not help :(
15:43 RabidGravy (and even google translate doesn't help much)
15:44 timotimo nnms: is this a question about perl5 or perl6?
15:44 itz yeah I lost it at "sleeker soprostavit their existing tags"
15:44 nnms perl6
15:44 nnms Sorry
15:44 nnms Good afternoon, I have a list of tag names as better and sleeker soprostavit their existing tags in the document, use the modules on the classics is no desire
15:44 nine That's what Google translate produces :)
15:45 hoelzro soprostavit = juxtapose, I believe
15:45 nnms *
15:45 nnms matching
15:45 hoelzro heh
15:45 hoelzro thanks, Yandex!</sarcasm>
15:45 nnms :)
15:46 nnms sub htmp(@html){
15:46 nnms my @tags = <article aside command datalist details figcaption figure footer header hgroup keygen main mark menu meter nav output progress rp rt ruby section source summary time video wbr>;
15:46 nnms for @tags -> $cur {
15:46 nnms
15:46 nnms if $cur in @html {
15:46 nnms $cur.say;
15:46 nnms };
15:46 nnms }
15:46 nnms
15:46 nnms }
15:47 colomon in?
15:47 hoelzro you have a list of tags, and you want to know how to intelligently match them with existing tags in a document?
15:47 virtualsue time for pastebin
15:47 nnms my $novitates = open 'ind.html';
15:47 nnms my @shabl = $novitates.lines;
15:47 nnms htmp(@shabl);
15:47 hoelzro and something about not wishing to use classic modules?
15:48 hoelzro this is a reoccurring pattern with Russian and me; I'll understand 80% of the words by themselves, but not the sentence =/
15:48 nine Well the code is pretty clear I'd say. Seems like what's wanted is a grep for HTML tags.
15:49 ugexe possibly a transliteration
15:49 nnms No, i dont need classic module,  Unlearning my python programming :)
15:49 hoelzro nnms: "по классике пользоваться модулями нет желания" is the bit I don't understand =)
15:49 khw joined #perl6
15:50 hoelzro "нет желания" I get (I think)
15:50 nnms yes
15:50 TimToady that would be a great book title: "Unlearning Python"
15:50 nnms :)
15:50 hoelzro maybe I'm misunderstanding the usage of по here?
15:51 hoelzro regarding the actual problem, instead of my problems with the Russian language, you could probably do $cur eq any(@tags)
15:51 PhilH joined #perl6
15:52 tony-o m: dd
15:52 camelia rakudo-moar 9b4463: ( no output )
15:53 nnms in PL/pgSQL have EXCEPT, her return difference for any query
15:53 tony-o m: dd (1,2,3)
15:53 camelia rakudo-moar 9b4463: OUTPUT«(1, 2, 3)␤»
15:53 TimToady my $html = set(@html); for @tags -> $cur { $cur.say if $cur (elem) $html) }
15:53 TimToady we have set difference too
15:54 ShimmerFairy I think maybe  say $_ for @html.grep(any(@tags));  would also do the trick?
15:55 tony-o m: $_.say for (1..5).grep(any(1,2))
15:55 camelia rakudo-moar 9b4463: OUTPUT«1␤2␤»
15:56 phdphil Stupid question time: Given a string, how do I get a list of the characters in the string, or something I can iterate over/map with? 'abcde'.chars gives me a char count, which is pleasant...
15:56 TimToady .comb
15:56 nnms and that difference written to %hash tag_key: html_name
15:57 ugexe all($cur.words) ~~ any(@tags) if you are feeling frisky
15:57 tony-o m: $_.say for (a=>'b',c=>'d').keys.grep(any('a','e'))
15:57 camelia rakudo-moar 9b4463: ( no output )
15:58 nnms Thank you Ж)
15:58 nnms :)
16:02 RabidGravy phdphil, split will work too:
16:02 RabidGravy m:  for "abcd".split("") { .say }
16:02 camelia rakudo-moar 9b4463: OUTPUT«a␤b␤c␤d␤»
16:03 molaf joined #perl6
16:03 spider-mario joined #perl6
16:04 timotimo better to use .comb()
16:06 RabidGravy oh yeah for sure, fewer characters to mistype for one :)
16:06 timotimo and it has the right default value for its parameter
16:08 RabidGravy or (in ant-golf )
16:08 RabidGravy m: for "abcd".encode.list>>.chr { .say }
16:08 camelia rakudo-moar 9b4463: OUTPUT«a␤b␤c␤d␤»
16:10 phdphil Cool, thanks
16:10 timotimo what is this, a golf for ants!?
16:11 TimToady RabidGravy: that's a bit...ASCII-centric
16:11 kanl joined #perl6
16:13 TimToady m: for "°«»ª".encode.list>>.chr { .say }
16:13 camelia rakudo-moar 9b4463: OUTPUT«Â␤°␤Â␤«␤Â␤»␤Â␤ª␤»
16:14 TimToady m: for "Â".encode.list>>.chr { .say }
16:14 camelia rakudo-moar 9b4463: OUTPUT«Ã␤‚␤»
16:14 TimToady m: for "Ã".encode.list>>.chr { .say }
16:14 camelia rakudo-moar 9b4463: OUTPUT«Ã␤ƒ␤»
16:14 mr-foobar joined #perl6
16:14 hoelzro is DESTROY NYI?
16:16 nine hoelzro: DESTROY is implemented
16:16 TimToady but it's not reliable in the sense that a P5 programmer would expect
16:16 hoelzro hmmm...I take it there's no guarantee on when it will run?
16:17 nine or even if
16:18 hoelzro nine: the "if" seems to be what I'm observing =)
16:18 hoelzro I figured that DESTROY would run on global VM shutdown, but I take it that's up to the VM?
16:19 uncleyea1 joined #perl6
16:22 RabidGravy joined #perl6
16:22 RabidGravy TimToady, oh ok ;-)
16:22 RabidGravy m: for "ö™¥".encode("UTF-16").list>>.chr { .say }
16:22 camelia rakudo-moar 9b4463: OUTPUT«ö␤™␤¥␤»
16:23 TimToady a bit BMP-centric :)
16:24 timotimo moarvm does not run destroy on shutdown
16:25 vendethiel joined #perl6
16:25 TimToady m: for "🐼".encode("UTF-16").list>>.chr { .say }
16:25 camelia rakudo-moar 9b4463: OUTPUT«Error encoding UTF-8 string: could not encode codepoint 55357␤  in block <unit> at /tmp/Qys4x7DqiX:1␤␤»
16:26 TimToady m: for "\c[PANDA FACE]".encode("UTF-16").list>>.chr { .say }
16:26 camelia rakudo-moar 9b4463: OUTPUT«Error encoding UTF-8 string: could not encode codepoint 55357␤  in block <unit> at /tmp/Ko3SEHFLZX:1␤␤»
16:26 TimToady huh
16:27 TimToady m: say 55357.uniprop
16:27 camelia rakudo-moar 9b4463: OUTPUT«Cs␤»
16:27 TimToady m: say 55357.uniname
16:27 camelia rakudo-moar 9b4463: OUTPUT«<Non Private Use High Surrogate>␤»
16:27 TimToady ah
16:27 TimToady of course
16:27 * TimToady obviously needs a 3rd cuppa
16:28 TimToady m: for "\c[PANDA FACE]".encode("UTF-32").list>>.chr { .say }
16:28 camelia rakudo-moar 9b4463: OUTPUT«Unknown string encoding: 'utf32'␤  in block <unit> at /tmp/_n1PVojWTQ:1␤␤»
16:29 TimToady that's probably some LHF
16:29 colomon joined #perl6
16:34 lucasb joined #perl6
16:35 tinyblak joined #perl6
16:36 jack_rabbit joined #perl6
16:41 b2gills m: for 0, 0e0, 'a', 'a' { say $^a cmp $^b ~~ Same } # is there an operator for this?
16:41 camelia rakudo-moar 9b4463: OUTPUT«True␤True␤»
16:41 b2gills m: for 0, 0e0, 'a', 'a' { say $^a eqv $^b }
16:41 camelia rakudo-moar 9b4463: OUTPUT«False␤True␤»
16:44 lucasb since there is "before" and "after", there could exist also a "same" :)
16:45 ugexe m: for 0, 0e0, 'a', 'a' { say $^a cmp $^b }
16:45 camelia rakudo-moar 9b4463: OUTPUT«Same␤Same␤»
16:45 ugexe m: for 0, 1e0, 'a', 'a' { say $^a cmp $^b }
16:45 camelia rakudo-moar 9b4463: OUTPUT«Less␤Same␤»
16:48 lucasb m: say (1 cmp 2, 'is', 4 cmp 3)
16:48 camelia rakudo-moar 9b4463: OUTPUT«Less is More␤»
16:49 colomon joined #perl6
16:49 ShimmerFairy m: for 0, 0e0, 'a', 'a' { say $^a ~~ $^b }
16:49 camelia rakudo-moar 9b4463: OUTPUT«True␤True␤»
16:49 ShimmerFairy What about smartmatch?
16:50 TimToady not symmetrical, if that's desired
16:50 TimToady m: .say for "00" ~~ 0, 0 ~~ "00"
16:50 camelia rakudo-moar 9b4463: OUTPUT«True␤False␤»
16:51 TimToady m: .say for "00" cmp 0, 0 cmp "00"
16:51 camelia rakudo-moar 9b4463: OUTPUT«More␤Less␤»
16:52 TimToady well, cmp between different types has never beed adequately nailed down, due to contradictory expectations
16:52 TimToady *been
16:54 ShimmerFairy cmp has always been interesting to me. I've never used it, except I think for C strings, where that's the only thing you have for testing string equality.
16:54 beastd joined #perl6
16:57 jack_rabbit joined #perl6
17:01 TimToady leg doesn't work?
17:01 ShimmerFairy TimToady: I mean in C/C++ land, sorry if that wasn't clear.
17:02 TimToady speaking of clear, we should rename undefine
17:02 TimToady since it doesn't always
17:02 nine Is 3 spec test files failing on current nom/moarvm to be expected?
17:03 TimToady I only got one failure
17:03 nine t/spec/S01-perl-5-integration/exception_handling.t t/spec/S17-lowlevel/lock.rakudo.moar and t/spec/S24-testing/line-numbers.t[3~
17:03 TimToady after a reconfig, I only fail line-numbers
17:03 lucasb Can I haz @a.clear and %h.clear ?
17:04 itz I was seeing t/spec/S32-io/IO-Socket-INET.t  and t/spec/S32-io/IO-Socket-INET.t  fail and was rebuilding
17:04 TimToady lucasb: why not?
17:04 ShimmerFairy isn't that just @a = Nil and so on? Or am I misremembering or unaware of recent changes?
17:04 diana_olhovik_ joined #perl6
17:04 lucasb :)
17:04 nine TimToady: I guess you don't have Inline::Perl5 installed?
17:04 TimToady nope
17:05 TimToady prolly otta
17:05 nine Then maybe t/spec/S01-perl-5-integration/exception_handling.t would fail for you, too leaving only t/spec/S17-lowlevel/lock.rakudo.moar which curiously passes when I run it single
17:05 TimToady and lock is a flapper anyway
17:06 itz errr and t/spec/S24-testing/line-numbers.t  I mea
17:06 itz n
17:07 lucasb ShimmerFairy: yes, you are right. but now I think one should use Empty instead of Nil
17:08 lucasb but it always felt strange to me, because it seems to be overloading to assignment operator with an operation that is exactly the opposite of assignment: disassignment, or clearing its content
17:08 kanl joined #perl6
17:09 lucasb *to be overloading the assignment
17:09 mj41 joined #perl6
17:09 TimToady currently we have:
17:09 TimToady ./src/core/operators.pm:multi sub undefine(Mu \x) is rw { x = Nil }
17:09 TimToady ./src/core/operators.pm:multi sub undefine(Array \x) is rw { x = Empty }
17:09 TimToady ./src/core/operators.pm:multi sub undefine(Hash \x) is rw { x = Empty }
17:11 mj41 hoelzro: Hi, why 2015.05 https://registry.hub.docker.com/_/rakudo-star/tags/manage/ ? Newest rakudo * is 2015.06 :-).
17:11 geekosaur joined #perl6
17:11 hoelzro mj41: that's...a really question
17:11 * hoelzro looks
17:12 hoelzro ah, I labelled it wrong. =(
17:13 hoelzro mj41: good catch, just opened to PR to fix it
17:14 mj41 hoelzro: super, thx
17:15 nine .tell lizmat https://github.com/rakudo/rakudo/pull/457 fixes use lib:from<Perl5> and spectests fine.
17:15 yoleaux nine: I'll pass your message to lizmat.
17:15 lucasb Anyway, my wish was that the operation "clear its content" was a method on the objects, such that [1,2,3].clear and {:a=>1,:b=>2}.clear would work. But I agree I don't understand all the details.
17:19 TimToady well, regardless of how it's implemented, I think we should s/undefine/clear/, because clarity
17:19 flussence I'd imagine $var.=WHAT would've done the same thing, but it's an error
17:20 colomon joined #perl6
17:20 TimToady that doesn't work to reset to default
17:20 TimToady if the default isn't WHAT, assuming WHAT worked, which it doesn't, because it's not a real method
17:21 flussence I guess having a .clear makes sense then
17:24 domidumont joined #perl6
17:25 kaare_ joined #perl6
17:26 uncleyear joined #perl6
17:32 ShimmerFairy joined #perl6
17:34 freeze joined #perl6
17:37 vendethiel joined #perl6
17:40 _mg_ joined #perl6
17:42 molaf_ joined #perl6
17:43 b2gills What idiot came up with SVGCaptcha https://what.thedailywtf.com/t/svgcaptcha/49747/77 http://svgcaptcha.com/
17:44 SevenWolf joined #perl6
17:45 tony-o b2gills: lol
17:45 gfldex b2gills: him: https://bitbucket.org/scriptoid
17:48 brrt joined #perl6
17:50 rurban joined #perl6
17:50 tony-o b2gills: the hamburger discussion is the most interesting part of that whole thread
17:53 b2gills Yes. ... Yes it is.
17:54 ugexe a government portal i use uses a captcha that is just 'type the following number: XXXXXX', where the number is literally in the html
17:54 tony-o thanks obama
17:55 bin_005 joined #perl6
17:58 rurban joined #perl6
17:58 rurban joined #perl6
18:00 TimToady m: my @a = 1,2,3; given @a -> $_ is rw { $_ = 42 }; say @a
18:00 camelia rakudo-moar 9b4463: OUTPUT«Cannot assign to an immutable value␤  in block <unit> at /tmp/LkfsDUMPJJ:1␤␤»
18:01 TimToady that looks kinda sorta like a bug, maybe
18:02 tony-o m: my @a = 1,2,3; given @a <-> $_ { $_ = 42; }; say @a;
18:02 camelia rakudo-moar 9b4463: OUTPUT«Cannot assign to an immutable value␤  in block <unit> at /tmp/fV2xa06_Rw:1␤␤»
18:02 nine ugexe: for a small website, this could actually work. Obscurity can really help
18:03 TimToady m: my @a = 1,2,3; given @a -> @x is rw { @x = 42 }; say @a
18:03 camelia rakudo-moar 9b4463: OUTPUT«42␤»
18:03 TimToady it works with an @ sigil
18:04 TimToady m: my @a = 1,2,3; given @a -> $_ is rw { @$_ = 42 }; say @a
18:04 camelia rakudo-moar 9b4463: OUTPUT«42␤»
18:05 TimToady that works too
18:05 TimToady I'm guessing assignment isn't delegating through the container, or some such
18:06 TimToady I'm not sure if that should actually dwim or not
18:07 TimToady assignment to a scalar vs assignment to an array is a rather fundamental distinction, down underneath
18:07 TimToady m: my @a = 1,2,3; given @a { @$_ = 42 }; say @a
18:07 camelia rakudo-moar 9b4463: OUTPUT«42␤»
18:08 TimToady and we don't enforce the readonly there, with the @$_
18:11 jnthn TimToady: We case-analyze by sigil.
18:11 jnthn TimToady: And emit assignment code differently. For unsigilled cases we emit a runtime check.
18:12 jnthn TimToady: Since this is the first time that "cheat" got caught...I'm not too inclined to lose it ;)
18:13 tony-o m: my @a = 1,2,3; for @a <-> $_ { $_ = 42; }; say @a;
18:13 camelia rakudo-moar 9b4463: OUTPUT«42 42 42␤»
18:15 b2gills m: sub test ( *%_ ){ say %_ }; my %a = a => 0; test |%a, a => 1 # the |% always overwrites everything else
18:15 camelia rakudo-moar 9b4463: OUTPUT«a => 0␤»
18:17 lucasb m: sub f(*%_) { say %_ }; my %a = a=>1; f(|%a, a=>2, b=>3)
18:17 camelia rakudo-moar 9b4463: OUTPUT«a => 1, b => 3␤»
18:20 raiph joined #perl6
18:22 masak FROGGS++ # star
18:23 masak as we pass Christmas, will we stop advertising Rakudo Star as an "early adopter" distribution of Perl 6?
18:23 vendethiel FROGGS++ # star
18:24 masak also, in the release announcement, I think "Synopsis 9 and 11" should be "Synopses 9 and 11" :P
18:25 TimToady obviously, it will then become a late adopter distribution :)
18:25 masak "late-to-the-party adopter" distribution :)
18:38 Ven joined #perl6
18:38 domidumont joined #perl6
18:50 diana_olhovik_ joined #perl6
18:50 amurf joined #perl6
18:52 hoelzro I was working on a NativeCall binding for Xapian, so I decided to chronicle the experience in screencast form for people to learn from: https://www.youtube.com/watch?v=kY9gfEn8T7I
18:52 yqt joined #perl6
18:57 brrt joined #perl6
18:57 xfix joined #perl6
18:57 xfix joined #perl6
19:23 cognominal joined #perl6
19:25 jack_rabbit joined #perl6
19:26 Ulti nice video hoelzro++
19:27 gtodd joined #perl6
19:30 Peter_R joined #perl6
19:30 gtodd hopefully the p6doc server's design will have lots of those "affordances" everyone talked about a few years back
19:31 gtodd so that it can accidentally become a killer app ...
19:34 gtodd that everyone must have for their digital $THINGS ... p6doc-serve all the things!
19:34 noganex_ joined #perl6
19:34 [Sno] joined #perl6
19:48 itz_ another solution would be to use a faster serialisation solution than EVAL .. I believe there was talk of panda using one
19:48 DrForr Just a note for site authors - doc.perl6.org/type/Quoting%20Constructs doesn't exist (referenced from doc.perl6.org/language/terms
19:49 ab6tract joined #perl6
19:49 DrForr s/$/)/
19:49 b2gills Is it a known problem that trying to print to an instance of Proc::Async stops the REPL? ( I would guess it closes STDIN )
19:51 nys joined #perl6
19:57 timotimo yo hoelzro check this out for your audio track: https://auphonic.com/
19:57 ShimmerFairy joined #perl6
19:59 ab6tract o/ #perl6
20:00 ab6tract I hope everyone is having a nice summer :)
20:00 ab6tract m: class ε {}; role Greater[$n] { method near { $n }}; multi infix:«<»(Numeric:D $a, Greater $b) { $a == $b.near ?? True !! $a < $b.near }; multi infix:<+>(Numeric:D $n, ε:U $) { Greater[$n] }; say 5 < 5 + ε; say 5.00000001 < 5 + ε; # very cool example from Mouq
20:00 camelia rakudo-moar 9b4463: OUTPUT«True␤False␤»
20:00 timotimo i'm having a hot summer at the moment :)
20:00 nine DrForr: https://github.com/rakudo/rakudo/pull/457
20:00 ab6tract timotimo: Likewise :)
20:01 DrForr Ooo. /me looks in a moment.
20:01 ab6tract moritz: I'm returning to the topic of 'overlaps-with' . I'm currently implementing it as an object method.
20:02 ab6tract Is that a sufficient way for handling the excludes-* infinima?
20:03 ab6tract It seems like it might be a bit heavy for core
20:04 ab6tract hmm, and it has at least one small issue
20:06 colomon joined #perl6
20:06 flussence ooc: is the levenshtein sub in core accessible by user code?
20:07 DrForr Added my 2c to the matter.
20:13 zakharyas joined #perl6
20:15 timotimo it's not in the core setting, flussence
20:15 timotimo i don't think it's available to user code
20:19 flussence IWBNif there were a "use rakudo" for that and any other internal-but-generically-useful things, like there's a "use nqp" for low-level stuff. The internal json stuff could go behind that too, then.
20:20 ab6tract are WhateverCodes too heavy for core settings?
20:20 jack_rabbit joined #perl6
20:22 timotimo no, but WhateverCode is defined relatively late, isn't it?
20:22 timotimo oh, huh
20:22 tony-o timotimo: 114f here yesterday
20:22 timotimo at about like 4k
20:22 timotimo tony-o: i don't speak imperial
20:22 tony-o 45.5c
20:22 flussence m: say (114 - 32) * 9/5
20:22 camelia rakudo-moar 9b4463: OUTPUT«147.6␤»
20:23 flussence wait...
20:23 flussence m: say (114 - 32) * 5/9
20:23 camelia rakudo-moar 9b4463: OUTPUT«45.555556␤»
20:23 flussence that's the one
20:23 flussence ...and wow
20:23 tony-o had a couple 44c days last week
20:23 timotimo oh lord, 45 degrees
20:23 timotimo we have between 35 and 40 here
20:24 timotimo that's already terrible enough
20:24 timotimo don't want to imagine what 45 feels like
20:24 flussence it's only been in the 20s here, and I find *that* uncomfortable :(
20:24 tony-o 35 days feel good here now, after the 44-45
20:25 tony-o flussence: that used to be me too, when i lived somewhere that people knew what snow was
20:26 tony-o when it's 20s here people have the big puffy coats on
20:31 RabidGravy I like low to mid-30s but not in London
20:32 bin_005 joined #perl6
20:33 RabidGravy Rarely gets that hot here without getting humid
20:33 hoelzro timotimo: ah, thanks
20:33 hoelzro I did what I could to take off some of the noise =/
20:34 hoelzro but my Audacity skills are not very good
20:35 AlexDani` joined #perl6
20:38 dalek rakudo/nom: 19526f1 | (Stefan Seifert)++ | src/core/CompUnitRepo.pm:
20:38 dalek rakudo/nom: Obey use :from even when a similar named Perl 6 module is installed in a CUR
20:38 dalek rakudo/nom:
20:38 dalek rakudo/nom: There's no need to even look for a Perl 6 module in CompUnitRepo when there's
20:38 dalek rakudo/nom: a :from adverb present. So don't do that and let the Perl6ModuleLoader handle
20:38 dalek rakudo/nom: the case straight away.
20:38 dalek rakudo/nom:
20:38 dalek rakudo/nom: Fixes for example use lib:from<Perl5>
20:38 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/19526f12f0
20:38 dalek rakudo/nom: a25b55a | lizmat++ | src/core/CompUnitRepo.pm:
20:38 dalek rakudo/nom: Merge pull request #457 from niner/nom
20:38 dalek rakudo/nom:
20:38 dalek rakudo/nom: Obey use :from even when a similar named Perl 6 module is installed i…
20:38 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/a25b55a4ad
20:41 tinyblak joined #perl6
20:42 dalek rakudo/nom: 9e4f8bd | (Nick Logan)++ | src/core/CompUnit.pm:
20:42 dalek rakudo/nom: bugfix: `.precomp` returning Failure erroneously
20:42 dalek rakudo/nom:
20:42 dalek rakudo/nom: On JVM the pipe must be closed after reading but before the status is checked for `.precomp` to return a true value.
20:42 dalek rakudo/nom:
20:42 dalek rakudo/nom: side note: It would seem `process.waitFor()` does not close the channel, as if it never finishes reading the buffer.
20:42 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/9e4f8bd3a1
20:42 dalek rakudo/nom: c93ba94 | lizmat++ | src/core/CompUnit.pm:
20:42 dalek rakudo/nom: Merge pull request #458 from ugexe/patch-6
20:42 dalek rakudo/nom:
20:42 dalek rakudo/nom: bugfix: `.precomp` returning Failure erroneously
20:42 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/c93ba94418
20:42 xaduha joined #perl6
20:47 timotimo thank you, ugexe
20:48 timotimo hoelzro: i have a pretty nice microphone available, but i'm sort of too shy to put my voice (and especially the accent) on the 'net
20:48 timotimo hoelzro: also i'm not sure what i'd screencast about
20:49 hoelzro timotimo: I think you could screencast about a lot!
20:49 timotimo alot is a great topic :)
20:49 hoelzro anything that helps people learn Perl 6 would likely help
20:49 hoelzro I don't think I have a particularly good screencasting voice; I kinda mumble a lot =/
20:49 timotimo right, i've considered a tutorial series starting from knowing very little about p6 to ... whatever
20:49 timotimo mumble? i didn't notice that
20:51 hoelzro I had to record a few times to get it right =P
20:51 hoelzro timotimo: I was thinking the same thing - I decided to just start recording things I'm working on
20:52 hoelzro next up will be parsing Xapian class definitions to auto-generate the code I wrote in that video
20:52 timotimo mhm :)
20:52 * jnthn has considered doing screencasts sometimes, but has so much to do already... ;)
20:52 hoelzro jnthn: I think that would be great, but you have a lot of things on your plate
20:53 hoelzro leave it to the mortals =P
20:53 RabidGravy I've been nagged to do a show for the radio station I work with for a year and a half, but it wouldn't be about programming
20:53 hoelzro I really want to help make good learning materials
20:53 hoelzro RabidGravy: maybe you could lend your voice then =)
20:54 tony-o what are the tutorials on angularjs on?  those were a pretty cool way to teach folks
20:55 hoelzro tony-o: good idea; I think that that crowd had a pretty good handle on tutorials for people
20:58 tony-o the platform was cool, but the way the tutorial guided you through "here is a problem, here are the tools you need to solve it, try it out" was well thought out i think
20:58 tony-o i think angular's example was setting up an online heroin store or something
20:59 tony-o perl would be a little more difficult because its not just a web framework designed to make trmplating (or whatever) easy, but that development flow could work the same
21:00 tony-o just need a wider variety of problems to solve
21:00 ab6tract tony-o: an online camel marketplace?
21:02 rurban joined #perl6
21:02 ab6tract but more seriously, I've been imagining an 'interactive-fiction-inside-and-about-the-repl'
21:05 timotimo i'd love to figure out what in CALL-ME of NativeCall is allocating Scalar objects
21:05 timotimo it's using := almost everywhere
21:05 masak ab6tract: that's a new form of metacircularity :)
21:09 bin_005 joined #perl6
21:10 telex joined #perl6
21:10 lizmat ShimmerFairy: re http://irclog.perlgeek.de/perl6/2015-07-02#i_10838803 , it's because the .WHICH of [2,3] and [2,3] are not the same
21:10 yoleaux 17:15Z <nine> lizmat: https://github.com/rakudo/rakudo/pull/457 fixes use lib:from<Perl5> and spectests fine.
21:10 lizmat m: say [2,3].WHICH; say [2.3].WHICH
21:10 camelia rakudo-moar 9b4463: OUTPUT«Array|60893496␤Array|60893568␤»
21:11 lizmat if you make it parcels, it does DWIM:
21:11 lizmat m: my @a = $(1,2),$(2,3); my @b = $(2,3),$(3,4); say (@a (&) @b).perl
21:11 camelia rakudo-moar 9b4463: OUTPUT«set($(2, 3))␤»
21:18 hoelzro m: my $method = 'do-stuff'; say q:scalar"say $method()"
21:18 camelia rakudo-moar 9b4463: OUTPUT«Cannot find method 'postcircumfix:<( )>'␤  in block <unit> at /tmp/qALVtUldbP:1␤␤»
21:18 hoelzro ^ does :scalar activate method call interpolation as well as just plain ol' scalar interpolation?
21:18 jnthn yeah
21:18 jnthn There's no adverb that controls the postcircumfix interpolation...
21:19 hoelzro =(
21:20 jnthn In part 'cus that's parsed back in the main language
21:20 jnthn And the adverbs control the quote language's ability to delegate to the main language.
21:21 jnthn well, decision rather than ability
21:21 Sqirrel joined #perl6
21:22 ab6tract joined #perl6
21:22 ab6tract masak: I'm always on the lookout for another metalevel ;)
21:23 vendethiel *g*
21:25 ab6tract has there ever been consideration for the inclusion of Epsilon in core setting?
21:30 ab6tract we have sort of introduced it in ad absentia, via 5^..^6
21:30 masak I'm not sure Epsilon is... a thing
21:31 lizmat lucasb: re http://irclog.perlgeek.de/perl6/2015-07-02#i_10840839 , you can haz 'undefine @a'
21:32 lizmat which is "short" for @a = Empty (at least at the moment, not sure why it is Empty rather than () really)
21:32 lizmat oops, it already got answered...  it's too hot...
21:35 timotimo i have a "benchmark" that i've built as a very rough approximation of what i can do with an idea i have ... and i can get it to about 6 FPS and it doesn't even contain the computation for what i want to do with it >_>
21:35 timotimo top three methods by exclusive time are bind_one_param, bind and find_best_dispatchee
21:37 lizmat TimToady: re http://irclog.perlgeek.de/perl6/2015-07-02#i_10840951 s/undefine/clear/, shouldn't that be .CLEAR and CLEAR to make collisions with ecosystem code less likely?
21:37 timotimo after that comes roll, because i'm currently generating random data all the time ... taking that out makes it a whole lot faster
21:38 timotimo removing the calls to roll give me a much, much better FPS
21:38 lizmat you're rolling on a List ?
21:39 timotimo a Range in this case
21:39 timotimo (^255).pick
21:39 lizmat ^255??  not ^256 ?
21:40 timotimo er, yeah
21:40 timotimo but that doesn't matter :)
21:40 lizmat and you only pick one?
21:41 timotimo oh wow
21:41 lizmat then you're better off doing .roll
21:41 timotimo moving the ^256 into a variable on its own and just calling .pick over and over gives 2x the performance
21:41 lizmat as Range.pick just refers to Range.roll
21:41 lizmat yup, building a Range object is expensive
21:41 timotimo i was expecting that to be done at optimizer time
21:41 lizmat are you picking one?  then use .roll
21:42 timotimo curiously .pick seems to be faster :P
21:43 timotimo i'm at 21fps now :)
21:43 ab6tract masak: Is it not possible to do have sometging like 5 < 5 + AbstractInfinumMarker.new < 5.001 ?
21:44 timotimo now i've put in access to the array that's going to hold my data and it's at 3 seconds per frame
21:44 masak ab6tract: oh, I think you'd be able to design and implement a number class that worked like that, in module space.
21:44 ab6tract or better yet, just the type, without instantiation.. AbstractInfinumMarkerType ;P
21:45 lizmat timotimo: use nqp; say nqp::rand_I(nqp::decont(256), Int)
21:45 masak ab6tract: I'm not as sure that I see a fantastic use case for it.
21:45 timotimo ouch. the performance difference between @a[$x;$y] and @a[$x][$y] is *staggering*
21:45 masak ab6tract: you're basically proposing introducing nonstandard analysis into Perl 6 :)
21:45 lizmat yeah, I'm not surprised
21:46 ab6tract masak: more or less :)
21:46 masak yeah.
21:46 masak I prefer IEEE 754 :)
21:48 lizmat TimToady: re undefine/clear  I'm not sure we need either, now that we have Nil / Empty
21:48 ab6tract But really, it does feel weird to me that $range.min returns something that you can't effectively use in a numeric comparison
21:48 ab6tract and it makes implementing 'overlaps-with' a brain twister, to say the least :)
21:49 ab6tract I also note that .pick and .roll bothe use: my $least = $!excludes-min ?? 1+ $!min !! $!min;
21:50 lizmat ab6tract: fwiw, I tihink Range has too much functionality overloaded onto it
21:50 lizmat that's why I once started work on a RangeInt class
21:50 ab6tract I can agree with that
21:50 lizmat but that was considered to be a bad idea
21:50 lizmat :-(
21:52 ab6tract I can see that point as well :)
21:54 ab6tract_ joined #perl6
21:56 timotimo Type check failed in binding <anon>; expected 'Any' but got 'Int'
21:56 timotimo how did i even ...
21:56 masak m: say Int ~~ Any
21:56 camelia rakudo-moar c93ba9: OUTPUT«True␤»
21:56 ab6tract_ If I can get (6^..7).overlaps-with(6) to return False, I will be well-pleased by Range, I think
21:58 ab6tract_ the rest of it is pretty cool, though I, like timotimo, would sort of expect things like (^256) to be optimized out of the way
21:59 timotimo well, the optimizer can't get away with just using a constant Range object at that point; it'd still have to .clone
21:59 timotimo ... it's possible that that's actually what it does right now and that still takes somewhat long
22:06 lizmat timotimo: ^255 is just Range.new(0,255,:excludes-max) as per "sub prefix:<^>($max) { Range.new(0, $max.Numeric, :excludes-max) }
22:07 lizmat so I don't think it is optimized in any way atm?
22:07 jack_rabbit joined #perl6
22:09 timotimo there's no "is pure" there?
22:09 lizmat no
22:09 lizmat should there be?
22:09 lizmat only infix:<^..^>($min, $max) is pure has it
22:10 timotimo it'd make sense to put "is pure" on all of those
22:10 lizmat remind me again what that means exactly ?
22:11 lizmat (testing is pure on all of them)
22:13 timotimo that the optimizer is free to assume the result of the operator doesn't depend on external factors like IO etc
22:13 lizmat I guess S99:pure
22:13 synbot6 Link: http://design.perl6.org/S99.html#pure
22:13 timotimo so it's allowed to run that code at compile time if the arguments are all known
22:13 timotimo right
22:14 dalek specs: ace089e | lizmat++ | S99-glossary.pod:
22:14 dalek specs: Fix typo
22:14 dalek specs: review: https://github.com/perl6/specs/commit/ace089e004
22:14 timotimo https://gist.github.com/timo/5129c1f3de2f793d98b6 ← you can run this if you have SDL2::Raw installed and twiddle with the performance if you want
22:15 timotimo m: if True
22:15 camelia rakudo-moar c93ba9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/_iq3tlmuhl␤Missing block␤at /tmp/_iq3tlmuhl:1␤------> 3if True7⏏5<EOL>␤    expecting any of:␤        block or pointy block␤»
22:15 timotimo m: my $foo; if True { $foo++ if ^5.pick == 1 }
22:15 camelia rakudo-moar c93ba9: ( no output )
22:15 timotimo m: my $foo; if True { $foo++ if ^5.pick == 1 }
22:15 camelia rakudo-moar c93ba9: ( no output )
22:15 timotimo m: my $foo; if True { $foo++ if ^5.pick == 1 }
22:15 camelia rakudo-moar c93ba9: ( no output )
22:15 timotimo m: my $foo; if True { $foo++ if ^100.pick == 1 }; say "test"
22:15 camelia rakudo-moar c93ba9: OUTPUT«test␤»
22:15 timotimo m: my $foo; if True { $foo++ if ^100.pick == 1 }; say "test"
22:15 camelia rakudo-moar c93ba9: OUTPUT«test␤»
22:15 timotimo :\
22:16 timotimo there's a "0;" in that gist; when i removed that, the sink method of Nil threw a bogus binding error
22:16 timotimo "Type check failed in binding <anon>; expected 'Any' but got 'Int'"
22:17 dalek rakudo/nom: a32c1d3 | lizmat++ | src/core/Range.pm:
22:17 dalek rakudo/nom: Make .. ^.. ..^ ^ also "is pure", timotimo++
22:17 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/a32c1d3669
22:17 virtualsue joined #perl6
22:20 lizmat timotimo: feels to me "@neighbours.first(none($b, $b + 1, -1));" in a pretty hot code path could be optimisable at this point of rakudo development
22:21 timotimo could be
22:21 timotimo i had it as two junctions before that
22:21 lizmat especially the first (which returns a lazy list)
22:21 lizmat I don't have SDL2::Raw installed
22:21 lizmat so that's is as much feedback I can give you
22:22 masak 'night, #perl6
22:22 lizmat ah, and maybe precalculating x+1, y+1, y - 1?
22:22 lizmat good night, masak
22:23 * lizmat also wishes #perl6 a good night
22:23 timotimo gnite lizmat :)
22:23 timotimo ah, that precalculation isn't too bad an idea
22:26 timotimo feels a tiny bit faster already ;)
22:26 timotimo also not using --profile makes it a bit faster, too
22:27 timotimo oh, that's nice. CALL-ME from NativeCall is now the top routine in terms of exclusive time
22:28 timotimo roll is 4th place with just 6% exclusive time
22:29 timotimo ha!
22:29 timotimo i got a much faster version now
22:29 lizmat m: use nqp; say nqp::rand_I(nqp::decont(256), Int)  # timotimo, perhaps better than .roll ?
22:29 camelia rakudo-moar c93ba9: OUTPUT«181␤»
22:29 jnthn I'm guessing rand(256) does the same?
22:30 timotimo lizmat: i used Inf instead of -1 for the fallback value and now i can use .min instead of .first(...)
22:30 jnthn A little administrative update: https://6guts.wordpress.com/2015/07/02/grant-status-update/
22:31 lizmat m: rand(256)
22:31 camelia rakudo-moar c93ba9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/YQr9InRTVb␤Unsupported use of rand(N); in Perl 6 please use N.rand for Num or (^N).pick for Int result␤at /tmp/YQr9InRTVb:1␤------> 3rand7⏏5(256)␤»
22:31 jnthn d'oh
22:31 lizmat jnthn: so that would be 256.rand
22:31 lizmat m: say 256.rand
22:31 camelia rakudo-moar c93ba9: OUTPUT«88.373623134515␤»
22:31 jnthn Yeah, and you don't get an Int
22:31 lizmat yup
22:32 jnthn I'd hope we can optimize no-arg (^256).pick pretty well though
22:32 lizmat yeah, to: nqp::rand_I(nqp::decont(256), Int)  :-)
22:32 timotimo 20% of time now spent in CALL-ME of NativeCall
22:33 lizmat really off to bed&
22:33 timotimo i need to find another sponsor for jnthn's grant work %)
22:35 jnthn 'night, lizmat
22:41 ab6tract_ hmm...
22:41 ab6tract_ m: sub o( $r, $s ) { $r.min ~~ $s or $s.min ~~ $r }; o((0..6), (6^..12)).say; o((12^..^23), (23..44)).say; o((23..44), (42..64)).say;
22:41 camelia rakudo-moar c93ba9: OUTPUT«True␤False␤True␤»
22:41 ab6tract_ it's late, there's a real chance that I am missing an obvious corner case
22:42 pochi joined #perl6
22:42 ab6tract_ or... is that a working implementation for 'overlaps-with' ?
22:43 jack_rabbit joined #perl6
22:43 avuserow joined #perl6
22:44 ShimmerFairy joined #perl6
22:45 erdic joined #perl6
22:45 tinyblak joined #perl6
22:46 TEttinger joined #perl6
22:46 ab6tract_ nope, found at least one problem
22:49 japhb joined #perl6
22:55 timotimo the script i linked to is actually leaking :(
23:01 jnthn Time for some rest...should get lots more work in on the multi-dim arrays tomorrow :)
23:01 jnthn o/
23:01 Alina-malina joined #perl6
23:02 amurf joined #perl6
23:04 dha joined #perl6
23:05 Sqirrel joined #perl6
23:06 ShimmerFairy joined #perl6
23:07 timotimo hooray!
23:07 timotimo having that feature done by the end of the month will greatly impact the script i've got here right now, too
23:07 TimToady timotimo: ^100.pick is wrong precedence
23:08 TimToady unless you meant ^(100.pick)
23:08 TimToady which I tend to doubt
23:11 dha I note that "item context" is mentioned in the 5to6 doc under "Refrerence Creation", but I don't see where it's explained what item context *is*.
23:13 timotimo i meant to write (^100).pick
23:14 timotimo i have that in my code, don't i?
23:20 timotimo i kind of wish the profiler could measure how many instances of what class end up dying young and how many end up dying in the old generation and how many stick around until the program ends
23:20 timotimo it may be enough to just see how many of each die young
23:21 beastd joined #perl6
23:21 timotimo but i think the profiler only knows what exact type object got allocated because the type object was available at the exact position the "log this allocation" op was emitted in the first place
23:34 timotimo i suppose some sort of tracking could be put in and after every collection, all registered objects could be checked for their status
23:47 ab6tract_ ok, I may have finally cracked the nut
23:47 ab6tract_ just in time to get some snooooze
23:47 ab6tract_ o/ #perl6
23:49 dha Question: The docs say that C<//> returns the first defined operand. But that seems to me inaccurate.
23:49 dha m: say Any // 5
23:49 camelia rakudo-moar a32c1d: OUTPUT«5␤»
23:49 dha m: say Any // Any
23:49 camelia rakudo-moar a32c1d: OUTPUT«(Any)␤»
23:49 dha ... in that it's returning the last operand, despite it being undefined.
23:50 dha Is that, in fact, inaccurate, or am I misunderstanding?
23:50 tinyblak joined #perl6
23:58 raiph dha: S03:1411
23:58 synbot6 Link: http://design.perl6.org/S03.html#line_1411
23:58 vendethiel joined #perl6
23:59 dha Ah. In the operators page in docs.perl6.org, it says differently. will patch.
23:59 dha Kind of figured that, but wanted to make sure that was the desired semantics before changing the docs.

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

Perl 6 | Reference Documentation | Rakudo