Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-10-19

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:20 Jesmaybe joined #perl6
00:24 raiph joined #perl6
00:31 raiph joined #perl6
00:41 Actualeyes joined #perl6
00:52 telex joined #perl6
01:05 pierre_ joined #perl6
01:06 Derperperd joined #perl6
01:22 Jesmaybe joined #perl6
01:29 iBakeCake is_approx spotted in https://github.com/rakudo-p5/v5/blob/master/t/test.pl#L14
01:29 * iBakeCake was gonna create an Issue but I see that code is a rotting carcas
01:31 iBakeCake (to add context: is_approx is deprecated and will be removed entirely soon)
01:33 dataf4l joined #perl6
01:37 iBakeCake .tell rindolf the code's at https://github.com/rakudo/rakudo/blob/eb6907e/src/core/Cool.pm#L319 You want to profile stuff with --profile argument to perl6; perl6.party's articles with "Hacking" in their title may or may not prove helpful vis-a-vis getting and building source
01:37 yoleaux iBakeCake: I'll pass your message to rindolf.
01:38 iBakeCake .tell rindolf the stuff that starts with nqp:: is nqp ops and generally would be in https://github.com/perl6/nqp (see docs/)
01:38 yoleaux iBakeCake: I'll pass your message to rindolf.
01:46 Jesmaybe joined #perl6
01:48 pierre_ joined #perl6
02:01 aborazmeh joined #perl6
02:01 aborazmeh joined #perl6
02:05 aries_liuxueyang joined #perl6
02:07 msanderson joined #perl6
02:08 msanderson Hello there.  I'm new to perl6, and I'm running into something basic I can't seem to get my head around.  I have an array of hashes that I'm trying to sort.  I'm guessing it's something super simple and straightforward, but I've not figured it out so far.
02:09 msanderson If I do something like this: To exit type 'exit' or '^D' > my %nameHash = ( firstName => 'Bob' , secondName => 'Smith'); {firstName => Bob, secondName => Smith} > my @nameList [] > @nameList.push(%nameHash); [{firstName => Bob, secondName => Smith}] > my %nameHash = ( firstName => 'Sally' , secondName => 'Smith'); {firstName => Sally, secondName => Smith} > @nameList.push(%nameHash); [{firstName => Bob, secondName => Smith} {firstName =
02:10 geekosaur your client truncated the message
02:10 msanderson doing something simple like @nameList.sort doesn't work.  I get that, since the array contains hashes, but I can't figure out what I need to do to get the sort to work on one of the hash items
02:11 msanderson Ah, and I'm new to IRD as well, so I probably put too much into a biffer
02:11 msanderson er, buffer
02:11 msanderson my %nameHash = ( firstName => 'Bob' , secondName => 'Smith');
02:11 geekosaur also it's generally a good idea to use a pastebin of some kind (gist.github.com or dpaste.de or ...)
02:11 geekosaur irc has a rather short message length. some clients know to chop messages up, others don't
02:11 geekosaur some can be taught (there are scripts for irssi, for example)
02:12 * geekosaur uses hexchat and it autosplits
02:12 msanderson ah, I see ... probably going to sound bad, but I'm just using the CIRC app in chrome.  Total amatuer hour here.
02:13 msanderson I was looking for tips on the perl6 six site, and it indicated that I should look here.  So I figured, what the heck
02:13 snowman__ joined #perl6
02:13 msanderson If I have an array of hashes like:
02:14 msanderson say @nameList [{firstName => Bob, secondName => Smith} {firstName => Sally, secondName => Smith}]
02:15 msanderson The array of hashes is coming from an sqlite3 database I populated and accessed using DBIish and allrows(:array-of-hash)
02:16 msanderson I want to be be able to sort the array based on the values of one of the hashes.
02:17 msanderson I suspect that the answer is so simple, I'm missing it ... but then sometimes I get stuck on th simple things.
02:17 iBakeCake m: my @nameList = [{firstName => 'Bob', secondName => 'Smith'}, {firstName => 'Sally', secondName => 'Smith'}]; say @nameList.sort: { $^b<firstName> cmp $^a<firstName> }
02:17 camelia rakudo-moar eb6907: OUTPUT«({firstName => Sally, secondName => Smith} {firstName => Bob, secondName => Smith})␤»
02:17 iBakeCake m: my @nameList = [{firstName => 'Bob', secondName => 'Smith'}, {firstName => 'Sally', secondName => 'Smith'}]; say @nameList.sort: { $^a<firstName> cmp $^b<firstName> }
02:17 camelia rakudo-moar eb6907: OUTPUT«({firstName => Bob, secondName => Smith} {firstName => Sally, secondName => Smith})␤»
02:18 iBakeCake https://docs.perl6.org/routine/sort
02:18 * iBakeCake boos camelCase
02:18 iBakeCake kebab-case or no case :P
02:18 msanderson ;-)  Fair enough re: case ...
02:19 iBakeCake m: my @name-list = [{:first-name<Bob>, :second-name<Smith>}, {:first-name<Sally>, :second-name<Smith>}]; say @name-list.sort: { $^b<first-name> cmp $^a<first-name> }
02:19 camelia rakudo-moar eb6907: OUTPUT«({first-name => Sally, second-name => Smith} {first-name => Bob, second-name => Smith})␤»
02:20 iBakeCake m: my @name-list = [{:first-name<Bob>, :second-name<Smith>}, {:first-name<Sally>, :second-name<Smith>}]; say @name-list.sort: *.<first-name>
02:20 camelia rakudo-moar eb6907: OUTPUT«({first-name => Bob, second-name => Smith} {first-name => Sally, second-name => Smith})␤»
02:20 iBakeCake This works too, I guess
02:22 msanderson To me, that last one makes sense in my head.  I'm still thinking about the cmp  version.
02:22 msanderson The cmp version worlks because it pulls first one hash from the list as $a and then a second one into $b and does the compare, and then iterates over the list?
02:23 iBakeCake msanderson: the $^a and $^b create an implicit signature on the block, based on their alphabetical order, so $^a gets one argument and $^b the other. cmp returns Order::Less, Order::Same, and Order::More, which controls how .sort will arrange the two values against each other.
02:23 msanderson And call me crazy, but did I just realize that your nickname is camel case? ;-)
02:24 iBakeCake haha
02:24 iBakeCake I actually did code in camelCase nearly a decade ago. Can't believe it.
02:25 msanderson Thanks for the very succinct explanation.  I've a lot to learn.
02:25 msanderson Since I'm asking questions, maybe you could answer another.
02:25 msanderson Once I've finished this little application, how are they generally "distributed" with respect to modules.
02:26 msanderson I'm probably able to get the folks to download Rakudo, but I'm not certain I can get them to install git to download modules.
02:26 msanderson Can I bundle a module up so that's it's available with my code?
02:26 iBakeCake Yeah
02:26 msanderson For things like DBIIsh and Text::Table::Simple, etc.?
02:27 iBakeCake And I think zef ( modules.perl6.org/repo/zef ) can install from a .tar or a .zip
02:27 iBakeCake Oh, you mean someone else's module? Well, sure, you can bundle, but it'd make more sense to get it installed from the right place, I think
02:28 msanderson That's what I kinda thought ... since I'll have folks on all kinds of platforms using the little application (Windows, MacOS, Linux) I was hoping to make something without a lot of instructions.
02:28 cdg joined #perl6
02:29 msanderson Since the Windows guys won't git installed, they won't be able to use panda to get the module
02:29 msanderson For that matter, I'm guessing zef uses git to fetch the module's code too
02:30 iBakeCake Yeah
02:31 iBakeCake FWIW, it's a temporary system we got. Eventually, we'll move to CPAN and then one won't need git. It's a work in progress though... perhaps a bit short on volunteers too.
02:31 * iBakeCake & # bed
02:31 msanderson Well, if I ever get through the basics and learn enough to assist, I'll help out.  For now, I'm awfully wet behind the ears.
02:32 msanderson Bed is good.  Thanks for the help, I really appreciate it.  Cheers, Mike
02:36 mls joined #perl6
02:48 pierre_ joined #perl6
02:58 Actualeyes joined #perl6
02:58 noganex joined #perl6
03:28 stevieb joined #perl6
03:31 pierre_ joined #perl6
04:05 perl6817 joined #perl6
04:19 brillenfux joined #perl6
04:20 cpage_ joined #perl6
04:39 Cabanossi joined #perl6
04:45 perlawhirl joined #perl6
04:48 xinming joined #perl6
04:50 pierre_ joined #perl6
04:51 zrr joined #perl6
04:56 geekosaur joined #perl6
05:11 xtreak joined #perl6
05:13 _28_ria joined #perl6
05:23 domidumont joined #perl6
05:29 domidumont joined #perl6
05:34 ufobat joined #perl6
05:56 domidumont joined #perl6
06:00 geekosaur joined #perl6
06:08 geekosaur joined #perl6
06:10 pierre__ joined #perl6
06:15 nadim joined #perl6
06:15 geekosaur joined #perl6
06:16 andrzejku joined #perl6
06:18 Woodi_ hi today :)
06:21 geekosaur joined #perl6
06:21 RabidGravy joined #perl6
06:21 CIAvash joined #perl6
06:21 Woodi_ geekosaur: nice explanation about wantarray vs perl6. finally I got to the point of accepting single arg rule needs to be learned and why :)  geekosaur++
06:22 abraxxa joined #perl6
06:22 Woodi_ btw found small gem in "Multics Emacs implementation history" article :)  http://www.multicians.org/mepap.html
06:22 firstdayonthejob joined #perl6
06:23 andrzejku hello :)
06:23 Woodi_ cze andrzejku :)
06:24 andrzejku Woodi_: Poland?
06:24 neuraload joined #perl6
06:26 khisanth__ joined #perl6
06:26 Woodi_ "the command that switches buffers does so by saving up the values of all of the relevant Lisp variables and placing a saved image..."; "The alternate approach to multiple buffers would have been to have the buffer state variables referenced indirectly through some pointer... This approach is less desirable than the current approach, for it distributes cost at variable reference time, not buffer-switching
06:26 Woodi_ time, and the former is much more common."
06:26 Woodi_ andrzejku: yes :)
06:28 geekosaur joined #perl6
06:30 abraxxa joined #perl6
06:36 geekosaur joined #perl6
06:36 wamba joined #perl6
06:38 darutoko joined #perl6
06:40 geekosaur joined #perl6
06:41 andrzejku joined #perl6
06:43 geekosaur joined #perl6
06:44 pierre_ joined #perl6
06:56 brrt joined #perl6
06:57 pierre_ joined #perl6
06:59 cpage_ joined #perl6
07:27 ocbtec joined #perl6
07:30 pdcawley joined #perl6
07:33 zakharyas joined #perl6
07:41 canopus joined #perl6
07:50 pierre_ joined #perl6
07:52 Actualeyes1 joined #perl6
07:52 lizmat joined #perl6
07:53 rindolf joined #perl6
08:14 pierre_ joined #perl6
08:15 FROGGS joined #perl6
08:20 jonas3 joined #perl6
08:25 dakkar joined #perl6
08:51 eliasr joined #perl6
08:58 ilmari[m] joined #perl6
08:59 ctp joined #perl6
09:05 Guest46334 joined #perl6
09:05 M-Illandan joined #perl6
09:05 tadzik joined #perl6
09:05 Matthew[m] joined #perl6
09:05 Matias[m] joined #perl6
09:24 pierre_ joined #perl6
09:24 bjz joined #perl6
09:33 rindolf joined #perl6
09:40 dataf4l joined #perl6
09:46 Actualeyes joined #perl6
09:51 skids joined #perl6
10:03 bjz joined #perl6
10:33 bjz_ joined #perl6
10:38 bioduds joined #perl6
10:38 bioduds Hello, friends
10:39 bioduds I'd like to know from your experience if a blockchain build solely using Perl6 would be a good idea
10:40 moritz probably not yet
10:41 moritz reading and writing binary data isn't very mature in rakudo
10:41 moritz and iirc blockchain implementations need to keep much in memory, so there the memory overhead might hurt
10:43 pierre_ joined #perl6
10:46 bioduds moritz : thanks. I've bitcoin code, it is written in cpp so I wondered
10:47 bioduds *I've seen...
10:52 pierre_ joined #perl6
10:52 itaipu joined #perl6
10:54 pierre_ joined #perl6
10:57 grondilu bioduds: IMHO it'd make much more sense to wrap a C library around it.
10:57 grondilu with NativeCall, that is.
10:58 grondilu btw bitcoin was one of the first thing I've used Perl 6 for.  I still have an old repo:  https://github.com/grondilu/libbitcoin-perl6
10:59 grondilu it does not do much and it's probably too old to run straight away, though.
11:00 grondilu the Perl 5 version used to do a bit more:  https://github.com/grondilu/libbitcoin-perl
11:00 grondilu it's still very old and mostly useless, but it has historical merits, imho.
11:01 grondilu (for me, that is)
11:02 grondilu being frustrated writing this Perl 5 project was the main reason I looked into Perl 6 then.
11:34 * DrForr waves from work.
11:35 timotimo o/ DrForr
11:35 * masak .oO( wave-work duality )
11:36 DrForr Mmhmm.
11:38 DrForr Made it back from OSCON; the crowd was practically nonexistent. vmbrasseur got 30 people, I got ~20 *but* there was a group of 3 people in front row pointing at the screen and typing on their laptops. I assume they weren't tweeting "Ha ha p6 sucks". Or at least I hope they weren't :)
11:42 DrForr How's the C++ NativeCall stuff coming along?
11:44 moritz I don't think much has happened to C++ NC
11:44 timotimo i wonder what'd be missing for it to be better?
11:45 moritz sorry to hear it was so empty at OSCON
11:45 timotimo oh? :(
11:45 DrForr The convention hall was empty. The big problem is that FOSDEM sucks all the air out of the proverbial room.
11:46 timotimo oh, those are at the same time?
11:46 DrForr No, but it's the only explanation that makes sense.
11:47 timotimo maybe oscon was packed to the brim, but nobody wanted to go into the perl room?
11:49 DrForr They had maybe 500 people total.
11:49 timotimo what.
11:49 timotimo that's smaller than the gulaschprogrammiernacht
11:50 DrForr It may have been ~800, but certainly nowhere near the 4000+ at Austin.
11:50 El_Che hi DrForr
11:50 DrForr Afternoon.
11:51 El_Che no a lot of attendees?
11:51 El_Che hopefully 20 good ones
11:52 DrForr Well, there were a few people I'd not seen before sitting in the front row pointing at the screen and typing like "Does that example actually *work*?"
11:52 El_Che DrForr: what do you about Fosdem?
11:54 DrForr Well, Evozon will probably pay my way there, and since nobody else from the office went I'll probably talk at the conference and kick around for a few days s last time.
11:55 timotimo thank you for doing outreach, DrForr :)
11:55 El_Che I mean, I don't get "The big problem is that FOSDEM sucks all the air out of the proverbial room"
11:57 DrForr Why pay for some huge terribly-overpriced corporate affair when you've got the largest open source convention coming up in just a few months, and in a much *much* nicer city.
11:58 El_Che ah ok
11:58 El_Che I had the same thought today
11:58 canopus_ joined #perl6
11:59 El_Che about the oreilly security conference in Amsterdam
11:59 El_Che too corporate, too expensive, not really handon
11:59 El_Che s
12:01 DrForr Well, it's in Amsterdam so they *might* get an uptick from geeks wanting to ... enjoy the pastimes that the city offers, but what I saw at OSCON was mostly suits. Hell, like Wendy pointed out very few people there knew who Cory Doctorow was.
12:01 El_Che I went to this one last year: https://www.secappdev.org/program.html and although expensive it a full week very hands on. Probably going again
12:02 El_Che Hashiconf EU this year was in Amsterdam. It was a nice location certainly
12:02 El_Che I'll try to make it this year to yapc, thus maybe cutting on conferences :)
12:03 DrForr I'm not saying the venue city will be a major uptick, but it'll be at least a factor.
12:05 brrt joined #perl6
12:08 El_Che I think it will
12:08 El_Che nice venue, good connections
12:08 CIAvash joined #perl6
12:08 El_Che connectios to romania aren't on the same league
12:08 El_Che at least from .BE
12:12 DrForr Connections from *anywhere* to Romania aren't. At least from Cluj. Bucharest is better.
12:14 El_Che most flights took 6 hours at least (no direct connections)
12:17 DrForr Yep, most of 'em through Frankfurt.
12:17 DrForr *Munich
12:28 brrt in .nl, you can fly with Wizz air directly from Eindhoven to Cluj
12:29 rindolf joined #perl6
12:29 DrForr Yep.
12:36 El_Che brrt: yeah, I had a look at that. A lot cheaper as well. From Brussels it was long (6h+) and expensive
12:36 brrt Wizz is okay, I think, I've enjoyed it better than ... RyanAir or whichever it was
12:37 brrt not very modern perhaps
12:37 El_Che going to Rome in a few weeks with Ryan Air. I hope it's OK
12:37 El_Che at least you have seat numbers nowadays
12:41 tadzik they have seats now? Dayum!
12:42 nadim joined #perl6
12:43 DrForr Actually random seating was proved more efficient than assigned seating, at least in the Mythbusters trial.
12:44 apejens joined #perl6
12:44 moritz did they have kids in the mythbuster trial? :-)
12:44 DrForr Yep.
12:52 pierre_ joined #perl6
13:05 kent\n joined #perl6
13:07 aborazmeh joined #perl6
13:07 aborazmeh joined #perl6
13:08 andrzejku_ joined #perl6
13:08 cdg joined #perl6
13:08 [Coke] randomly assigned, or self-selected on boarding?
13:09 DrForr The latter.
13:12 moritz did the folks know they were under observation?
13:14 mst joined #perl6
13:18 CIAvash joined #perl6
13:24 * [Coke] does the fight to install Pod::To::BigPage again.
13:32 cgfbee joined #perl6
13:36 snowman__ joined #perl6
13:41 ohmyfish joined #perl6
13:41 ptolemarch joined #perl6
13:43 ctp joined #perl6
13:46 optikalmouse joined #perl6
13:59 BinGOs joined #perl6
14:01 go|dfish joined #perl6
14:06 maybekoo2 joined #perl6
14:06 kurahaupo__ joined #perl6
14:07 kurahaupo__ joined #perl6
14:07 kurahaupo__ joined #perl6
14:08 iBakeCake [Coke]: what fight? I believe RabidGravy++ fixed the MAST::Frame thing
14:11 RabidGravy in
14:12 RabidGravy yeah it was in LWP::Simple I think
14:12 RabidGravy so if it is still doing it, install a newer LWP::Simple
14:15 [Coke] installingn lwp::simple is problematic behind a corporate firewall
14:20 dalek doc: cf45bb8 | (Will Coleda)++ | doc/Language/rb-nutshell.pod6:
14:20 dalek doc: fix typo
14:20 dalek doc: review: https://github.com/perl6/doc/commit/cf45bb8709
14:22 Actualeyes joined #perl6
14:22 khw joined #perl6
14:24 itaipu joined #perl6
14:24 dataf4l joined #perl6
14:31 fumlead joined #perl6
14:33 bjz joined #perl6
14:37 dalek doc: 8897bc7 | (Will Coleda)++ | doc/Language/nativecall.pod6:
14:37 dalek doc: use full word
14:37 dalek doc: review: https://github.com/perl6/doc/commit/8897bc7152
14:40 dalek doc: 2c03626 | (Will Coleda)++ | doc/Language/operators.pod6:
14:40 dalek doc: expand
14:40 dalek doc:
14:40 dalek doc: use 'curly braces' (not brackets) to match other parts of the docs
14:40 dalek doc: review: https://github.com/perl6/doc/commit/2c03626c72
14:41 [Coke] operators.pod6 says "lists are replaced by the value from applying the meta'ed operator to the" ... can anyone suggest a better scanning word than "meta'ed" ?
14:42 kurahaupo__ metafied? metaized?
14:42 profan 4/win 12
14:42 profan ehh, wops
14:42 iBakeCake metaed
14:42 iBakeCake [Coke]: I'd just drop meta'ed
14:43 dalek doc: 5335de9 | (Will Coleda)++ | doc/Language/rb-nutshell.pod6:
14:43 dalek doc: fix typo
14:43 dalek doc: review: https://github.com/perl6/doc/commit/5335de9db2
14:46 kurahaupo__ "... applying the corresponding meta operator"
14:49 rindolf joined #perl6
14:49 ale1ster joined #perl6
14:51 dalek doc: 547ed3f | (Will Coleda)++ | doc/Language/operators.pod6:
14:51 dalek doc: simplify, avoid odd word
14:51 dalek doc:
14:51 dalek doc: iBakeCake++
14:51 dalek doc: review: https://github.com/perl6/doc/commit/547ed3f2fc
14:51 [Coke] iBakeCake: danke.
14:54 dataf4l joined #perl6
15:05 dalek doc: abb5a5c | (Will Coleda)++ | doc/Type/X/Does/TypeObject.pod6:
15:05 dalek doc: fix typo
15:05 dalek doc:
15:05 dalek doc: class name didn't match
15:05 dalek doc: review: https://github.com/perl6/doc/commit/abb5a5c163
15:07 amalia__ joined #perl6
15:07 dalek doc: efbe733 | (Will Coleda)++ | doc/Language/exceptions.pod6:
15:07 dalek doc: fix typo
15:07 dalek doc:
15:07 dalek doc: no dash needed
15:07 dalek doc: review: https://github.com/perl6/doc/commit/efbe733ece
15:11 grondilu joined #perl6
15:16 dalek doc: 3fe2698 | (Will Coleda)++ | doc/Language/unicode_entry.pod6:
15:16 dalek doc: fix typo
15:16 dalek doc: review: https://github.com/perl6/doc/commit/3fe2698261
15:35 TimToady hmm, to me, brackets are a general category, so "braces" means the same as "curly brackets", while in some dialects, "parens" and "round brackets" are interchangeable
15:35 TimToady I don't know of any short version of "square brackets" though
15:37 TimToady except that sometimes those are just "brackets", which doesn't help :)
15:41 dalek doc: 1f144fe | (Will Coleda)++ | doc/Language/operators.pod6:
15:41 dalek doc: simplify language
15:41 dalek doc: review: https://github.com/perl6/doc/commit/1f144fe9a8
15:42 dalek doc: f7607ce | (Will Coleda)++ | doc/Language/packages.pod6:
15:42 dalek doc: ok to use this as an adjective here
15:42 dalek doc: review: https://github.com/perl6/doc/commit/f7607ce634
15:44 dalek doc: 3be0d36 | (Will Coleda)++ | doc/Language/performance.pod6:
15:44 dalek doc: use a fake version here
15:44 dalek doc:
15:44 dalek doc: (avoid spellchecking issues)
15:44 dalek doc: review: https://github.com/perl6/doc/commit/3be0d36b8c
15:45 cschwenz joined #perl6
15:46 tokomer joined #perl6
15:46 dalek doc: 8685200 | (Will Coleda)++ | doc/Type/CurrentThreadScheduler.pod6:
15:46 dalek doc: use standard word
15:46 dalek doc: review: https://github.com/perl6/doc/commit/868520045c
15:49 [Coke] square brackets are "braces" according to unicode.
15:49 iBakeCake m: '['.uniname.say
15:49 camelia rakudo-moar 7a456f: OUTPUT«LEFT SQUARE BRACKET␤»
15:49 iBakeCake m: '{'.uniname.say
15:49 [Coke] we probably could use a style guid about what to call what there; my only concern at this point is to get the spellchecker to be quiet.
15:49 camelia rakudo-moar 7a456f: OUTPUT«LEFT CURLY BRACKET␤»
15:50 [Coke] Whoops, I thought that said brace the last time I checked. :)
15:50 ilmari [Coke]: guid is a microsoftism, the proper name is uuid ;-P
15:51 [Coke] ilmari: ?
15:51 ilmari [Coke]: you said "a style guid"
15:51 [Coke] *facepalm*
15:52 cschwenz anyone here able to help with a problem building rakudo via `rakudobrew build moar 2016.10`?  (full output: http://pastebin.com/SKZWuy8m )
15:54 dalek doc: 5f2c1fe | (Will Coleda)++ | doc/Language/operators.pod6:
15:54 dalek doc: better word form, maybe.
15:54 dalek doc:
15:54 dalek doc: (avoids spellcheck issue, also)
15:54 dalek doc: review: https://github.com/perl6/doc/commit/5f2c1fe5e4
15:55 dataf4l joined #perl6
15:56 [Coke] we ok with "truthy" and "falsy" (or "falsey") ?
15:56 [Coke] could probably be replaced with True and False in many cases.
15:57 [Coke] ... also found trueness
15:57 [Coke] ... and thruthiness
15:57 [Coke] *truthiness
15:58 cschwenz my opinion is to go with True and False; and truthiness has the exact opposite connotation you're looking for
16:00 perlpilot I'm ok with "truthy" and "falsey" and "truthiness" where appropriate (though "falsy" makes me think of "palsy" and that's not quite right)
16:01 cschwenz from https://en.wiktionary.org/wiki/truthiness :  "Even in the halls of Congress, economic arguments against immigration are losing their aura of truthiness, so pro-enforcement types are focusing on national security."
16:01 dalek doc: 28c6488 | (Will Coleda)++ | doc/Type/Str.pod6:
16:01 dalek doc: fix typo
16:01 dalek doc: review: https://github.com/perl6/doc/commit/28c648825a
16:01 domidumont joined #perl6
16:08 dalek doc: 8414910 | (Will Coleda)++ | doc/Type/Str.pod6:
16:08 dalek doc: avoid pluralizing with 's
16:08 dalek doc:
16:08 dalek doc: (also remove 'ss)
16:08 dalek doc: review: https://github.com/perl6/doc/commit/8414910708
16:10 [Coke] https://github.com/perl6/doc/blob/master/doc/Type/Supply.pod6#L235 - includes the word 'tock' which aspell doesn't like - i can add it, but tock there doesn't seem to refer to anything in particular, someone want to try to rewrite that?
16:11 TimToady one must be careful to distinguish the nouns True and False, which are values, from the predicates "evaluates to true" and "evaluates to false", which I tend to use "true" and "false" for
16:12 moritz [Coke]: I'd propose simply "starting from 0"
16:13 TimToady many things evaluate to true or false that are not True or False, so we should not use the capitalized forms for the verb
16:14 pecastro joined #perl6
16:16 dalek doc: 567ffdf | coke++ | doc/Language/testing.pod6:
16:16 dalek doc: Avoid neologism
16:16 dalek doc:
16:16 dalek doc: (that isn't quite what we mean here anyway)
16:16 dalek doc: review: https://github.com/perl6/doc/commit/567ffdf7ca
16:17 perlpilot [Coke], moritz: perhaps I read too much into it, but I would think "tock" was trying to imply synchronicity with the system clock.  i.e.,  If started in the middle of a second, your 0 would be on the start of the next full second.
16:17 [Coke] TimToady: "Perl 6 makes a clear distinction between definedness and trueness."
16:18 [Coke] perlpilot: we don't really guarantee that, though.
16:18 [Coke] Suggestions on how/if to replace trueness there?
16:18 moritz truthiness
16:19 iBakeCake +1
16:19 [Coke] -1
16:19 iBakeCake :D
16:19 moritz truthness
16:19 moritz veracity :-)
16:19 [Coke] moritz: ENOTAWORD
16:19 moritz [Coke]: *shrug* we make it one
16:19 gfldex there is truthless but not truthiless. Maybe that 's why truthiness sounds wrong to my ears.
16:20 [Coke] moritz: if you want to do that and add a glossary entry, sure.
16:20 * [Coke] is going with just "truth" for now.
16:20 gfldex i strongly disagree on truth
16:21 * perlpilot likes "trueness" as is.
16:21 [Coke] ok. leaving it as "trueness" which is apparently a word.
16:21 gfldex i picked^W made up that word because trueness relates to true as definedness relates to defined
16:22 gfldex not my fault that the fine english folk forgot to add that vital word to their language
16:22 moritz "Perl 6 makes a clear distincting between definedness, and whether it evaluates to True or False in a boolean context"
16:22 TimToady no, no, no
16:22 TimToady it never evaluates to True or False
16:23 TimToady well, sometime it might be
16:23 TimToady but no Bool has to be created
16:23 TimToady we should reserve True and False for actual Bool values
16:23 perlpilot indeed
16:24 TimToady or another way to say it is that boolean context is different from Bool context
16:24 moritz but the evaluation in a boolean context acctually produces True or False
16:24 moritz m: .say for ?0, ?1
16:24 camelia rakudo-moar 8e9fd0: OUTPUT«False␤True␤»
16:24 TimToady no, that's conversion to Bool
16:24 TimToady m: say "I'm not Bool" if 1;
16:24 camelia rakudo-moar 8e9fd0: OUTPUT«I'm not Bool␤»
16:25 gfldex m: say 'zero' if 0; # <--- no bool
16:25 camelia rakudo-moar 8e9fd0: ( no output )
16:25 TimToady it's a boolean evaluation without Bool conversion
16:25 moritz m: say "I'm so Bool" if 0 but role { method Bool { True } }
16:25 rgrinberg joined #perl6
16:25 camelia rakudo-moar 8e9fd0: OUTPUT«I'm so Bool␤»
16:25 moritz but even 'if' calls method Bool
16:25 gfldex Sir, please but that role down!
16:26 moritz so the distinction seems very artifical to me
16:26 moritz a Bool conversion happens, the result is just discarded
16:26 [Coke] you can optimize your way out of it, of course.
16:27 [Coke] moritz: QAST::Op(if) might know what to do when given a QAST::WVal(Int), e.g.
16:27 [Coke] anyway, I added the words to our dictionary, I'm done. :)
16:27 gfldex if a Bool is created or not is besinde the point. The question is, if the reader understands what is meant by that word.
16:28 dalek doc: df4f847 | (Will Coleda)++ | doc/Type/Supply.pod6:
16:28 dalek doc: remove reference to tock
16:28 dalek doc: review: https://github.com/perl6/doc/commit/df4f847267
16:29 gfldex i'm not writing for linguists, i'm writing for aspiring Perl 6 programmers. :)
16:29 [Coke] exactly, gfldex, and we were using 3 different ways to refer to it.
16:29 perlpilot moritz: I think of it kind of in terms of what the human needs to be responsible for.   Does the human need to make a Bool?  If so, we're talking about True and False.   If we're talking about evaluating 1 as "true",  then we're not talking about True or False, we're talking about true and false.
16:30 perlpilot or something like that
16:30 moritz nice rule of thumb. I just have to suppress my impulse that says "I'm a contributor to the settings, I'm the human responsible for returning True and False here" :-)
16:31 moritz anyway, afk, TTFN
16:32 harmil_wk joined #perl6
16:33 gfldex if it would be a book I would add a footnote to trueness to explain the difference between merely being Bool::* and implicit conversion by control structures.
16:33 Util joined #perl6
16:34 dalek Heuristic branch merge: pushed 30 commits to doc/spellcheck by coke
16:34 perlpilot DrForr: what gfldex just said would make a good side-bar in Learning Perl 6  ;)
16:35 gfldex Pod::To::BigPage does create marginals instead of footnotes, not sure if Pod::To::HTML does. Maybe worth adding if it doesn't.
16:37 gfldex i just checked /language/control#if and it's ... not very good
16:37 gfldex [Coke]: how much spelling do you guess is still ahead of you?
16:38 [Coke] with that, down to 5 files with spelling issues; 3 of those are due to N<> and E<> processing by p6doc, one is maybe an aspell issue, and the last is "nth's" which I think can be edited to be more clear anyway.
16:38 gfldex [Coke]: also, if you got the time, can you drop a few lines into CONTRIBUTING.md please?
16:38 [Coke] gfldex: sure, about what?
16:39 gfldex if you found common mistakes, it may be worthwile to avoid them in the future.
16:39 [Coke] oh, that's easy: "run the test". :)
16:39 * gfldex .oO( They should teach that in school. )
16:40 [Coke] I don't think there is a common enough class of error that it's worth calling any of them out specifically.
16:41 dalek doc: 30b9319 | coke++ | doc/Type/Str.pod6:
16:41 dalek doc: this is fine without possessive
16:41 dalek doc: review: https://github.com/perl6/doc/commit/30b9319072
16:43 [Coke] huh. can't hit alt-; here to get an ellipse; works fine in iterm.
16:43 [Coke] 4 files left.
16:44 user9 joined #perl6
16:46 hchienjo joined #perl6
16:49 [Coke] ok, the N<> issue is a rakudo problem. N<> is getting dumped in place., so "BadN<things are happening>" through perl6 --doc prints "Badthings are happening"
16:50 [Coke] I would be happy with "Bad (things are happening)" as a stopgap.
16:52 [Coke] ... although adding a single space before the N<> also works for my purposes.
16:52 gfldex [Coke]: if it's in some example I would remove the N<>. Markup in examples can collide with syntax highlighting, what is done automatically and as such may change without any author seeing the change.
16:53 [Coke] no, descriptive text.
16:53 gfldex and it tends to make the text noisy for little gain
16:57 dalek doc: 8b3d608 | coke++ | doc/Language/ (3 files):
16:57 dalek doc: space out N<> - problematic with perl6 --doc
16:57 dalek doc: review: https://github.com/perl6/doc/commit/8b3d608109
16:57 dalek doc: 559a4e7 | coke++ | doc/Language/modules.pod6:
16:57 dalek doc: E<> doesn't work in perl6 --doc; use a comma
16:57 dalek doc: review: https://github.com/perl6/doc/commit/559a4e7cfa
16:57 go|dfish joined #perl6
16:58 dalek doc/spellcheck: 0e35582 | coke++ | doc/Type/Str.pod6:
16:58 dalek doc/spellcheck: this is fine without possessive
16:58 dalek doc/spellcheck: review: https://github.com/perl6/doc/commit/0e35582100
16:58 dalek doc/spellcheck: b3e0f89 | coke++ | doc/Language/ (3 files):
16:58 dalek doc/spellcheck: space out N<> - problematic with perl6 --doc
16:58 dalek doc/spellcheck: review: https://github.com/perl6/doc/commit/b3e0f8982c
16:58 dalek doc/spellcheck: a3d41ee | coke++ | doc/Language/modules.pod6:
16:58 dalek doc/spellcheck: E<> doesn't work in perl6 --doc; use a comma
16:58 dalek doc/spellcheck: review: https://github.com/perl6/doc/commit/a3d41eeb90
16:59 [Coke] down to 2 files...
17:01 iBakeCake m: my num $x = 3e0; dd $x.WHAT
17:01 camelia rakudo-moar 697a0a: OUTPUT«Num␤»
17:02 iBakeCake How can I check whether something is a native type?
17:02 timotimo prim...something
17:02 timotimo https://github.com/perl6/nqp/blob/master/docs/ops.markdown#lexprimspec
17:03 timotimo that's not how i remember that op
17:03 timotimo yeah, you want ojbprimspec instead
17:03 timotimo objprimspec
17:04 iBakeCake m: use nqp; my num $x = 3e0; dd nqp::objprimspec($x)
17:04 camelia rakudo-moar 697a0a: OUTPUT«0␤»
17:04 iBakeCake m: use nqp; my Num $x = 3e0; dd nqp::objprimspec($x)
17:04 camelia rakudo-moar 697a0a: OUTPUT«0␤»
17:04 timotimo may have to decont
17:04 timotimo most probably will have to decont, actually
17:04 iBakeCake m: use nqp; my num $x = 3e0; dd nqp::objprimspec(nqp::decont($x))
17:04 camelia rakudo-moar 697a0a: OUTPUT«0␤»
17:04 timotimo hmm
17:04 timotimo m: use nqp; dd nqp::objprimspec(num)
17:04 camelia rakudo-moar 697a0a: OUTPUT«2␤»
17:05 timotimo m: use nqp; dd nqp::objprimspec(0.05e0)
17:05 camelia rakudo-moar 697a0a: OUTPUT«0␤»
17:05 timotimo m: use nqp; dd nqp::objprimspec(my num $a = 0.05e0)
17:05 camelia rakudo-moar 697a0a: OUTPUT«0␤»
17:05 timotimo m: use nqp; dd nqp::objprimspec(my num \a = 0.05e0)
17:05 camelia rakudo-moar 697a0a: OUTPUT«Type check failed in binding; expected num but got Num (0.05e0)␤  in block <unit> at <tmp> line 1␤␤»
17:06 [Coke] so, this is a problem, for some reason: Aspell thinks this line:
17:06 [Coke] say +DigitMatcher.subparse: '12', args => \(:full-unicode);
17:07 [Coke] ... dammit, my unicode is vanishing. :|
17:07 timotimo :o
17:07 [Coke] anyway, the \(:full- there shows up as a mispelled 'ull'
17:08 timotimo urgh
17:08 [Coke] trying to find something in the aspell docs that would explain it. in the meantime, I can add 'ull' and 'ffix' to the list to ignore, and that's it.
17:08 iBakeCake m: use nqp; my num $x = 3e0; dd nqp::lexprimspec(nqp::curlexpad(), '$x')
17:08 camelia rakudo-moar 697a0a: OUTPUT«2␤»
17:08 iBakeCake m: use nqp; my Num $x = 3e0; dd nqp::lexprimspec(nqp::curlexpad(), '$x')
17:08 camelia rakudo-moar 697a0a: OUTPUT«0␤»
17:08 iBakeCake timotimo++
17:09 iBakeCake m: use nqp; sub ($g) { dd nqp::lexprimspec(nqp::curlexpad(), '$g') }( my num $ = 3e0 )
17:09 camelia rakudo-moar 697a0a: OUTPUT«0␤»
17:10 iBakeCake dammit :(
17:12 AlexDaniel joined #perl6
17:15 dalek doc: e934bc2 | coke++ | doc/Language/classtut.pod6:
17:15 dalek doc: remove trailing whitespace
17:15 dalek doc: review: https://github.com/perl6/doc/commit/e934bc26ab
17:16 dalek doc/spellcheck: 22bba5a | coke++ | xt/code.pws:
17:16 dalek doc/spellcheck: aspell is confused
17:16 dalek doc/spellcheck: review: https://github.com/perl6/doc/commit/22bba5a6bf
17:16 dalek doc/spellcheck: ae026d1 | coke++ | doc/Language/classtut.pod6:
17:16 dalek doc/spellcheck: remove trailing whitespace
17:16 dalek doc/spellcheck: review: https://github.com/perl6/doc/commit/ae026d1c8c
17:18 sufrostico joined #perl6
17:19 timotimo if the name dont match, the value wont be right. ibakecake
17:19 timotimo oh, oops
17:19 timotimo misread
17:20 dalek doc/spellcheck: 56083d5 | coke++ | xt/aspell.t:
17:20 dalek doc/spellcheck: p6doc just uses this under the hood anyway
17:20 dalek doc/spellcheck: review: https://github.com/perl6/doc/commit/56083d5cff
17:22 firstdayonthejob joined #perl6
17:23 [Coke] anyone mind if when I merge spellcheck branch, I squish it?
17:26 japhb [Coke]: Why do you want to?
17:27 TEttinger joined #perl6
17:27 [Coke] \o/ All tests successful.
17:27 japhb (That's curiosity, not abject disagreement.)
17:27 mst I would suggest 'make it ff-clean but then merge it no-ff'
17:27 mst then you get a single commit in master
17:27 [Coke] japhb: because 99.% of the commits are small minor updates to the wordlist, or merges from master.'
17:27 mst but without swuashing away the history of the branch
17:27 mst also you should rebase it first to get rid of the merges
17:28 mst because ew
17:28 [Coke] ok. I don't mind changing the history if no one cares.
17:29 ocbtec joined #perl6
17:29 [Coke] any pointers on doing the rebase?
17:29 mst well you just proposed obliterating it entirely
17:29 mst I'm just suggesting we preserve the useful parts of it, while getting rid of the mistakes
17:29 ilmari [Coke]: git rebase master
17:30 ilmari (when you're on the branch you want to rebase)
17:30 [Coke] ilmari: thank you.
17:30 dalek doc/spellcheck: 65367e4 | coke++ | xt/ (2 files):
17:30 dalek doc/spellcheck: more words
17:30 dalek doc/spellcheck: review: https://github.com/perl6/doc/commit/65367e4f44
17:30 dalek doc/spellcheck: 808a063 | coke++ | xt/words.pws:
17:30 dalek doc/spellcheck: last word
17:30 dalek doc/spellcheck: review: https://github.com/perl6/doc/commit/808a063d02
17:31 seatek joined #perl6
17:31 dalek Heuristic branch merge: pushed 49 commits to doc/spellcheck by coke
17:31 [Coke] so, as long as I've rewritten history once, I can collapse a bunch of other commits as well
17:33 ilmari yeah, 'git rebase -i master', then you can shuffle them around and squash them
17:33 ilmari don't worry if you get confused or conflicts, you can always 'git rebase --abort'
17:35 [Coke] well, except I've already done the first rebase from master and pushed it.
17:36 [Coke] (and, also, that rebase has commits I didn't make in this branch, but only merged from master)
17:36 aod_ joined #perl6
17:37 perigrin the latter part is what rebasing master was supposed to fix.
17:38 perigrin you can manually move them to the top of the list though and pretend that was the way it was always supposed tob e
17:38 [Coke] yup. and it apparently did not.
17:38 ilmari git should skip commits that are already on the branch you rebased onto
17:38 ilmari was your local master up-to-date?
17:38 [Coke] out of 100s of commits? seems like a waste of my time to dig through them.
17:38 [Coke] ilmari: yes, that's how I was doing all the merges from master. :)
17:39 perigrin ilmari: if he has merge commits from master to his local branch the merge commits will be there still
17:39 perigrin since they're still commits in the tree.
17:40 ilmari perigrin: I thought it would drop the merge commits unless you said --preserve-merges?
17:40 [Coke] these aren't merge commits.
17:40 [Coke] they're commits that were made to master after I branched.
17:40 [Coke] e.g. d40da02
17:41 * perigrin needs to go talk to a child's principal
17:41 perigrin keep him from getting suspended or worse ... and/or make sure he gets suspended or worse if that's what'll get through to him
17:42 * iBakeCake gets flashbacks of his childhood
17:42 iBakeCake perigrin: what happened? :)
17:42 * [Coke] grabs lunch. laters.
17:45 firstdayonthejob joined #perl6
17:48 aod_ good afternoon guys. I would like to ask a question about promises. Is it ok I post code here?
17:49 iBakeCake aod_: it's best to use a pastebin: http://fpaste.scsys.co.uk/
17:50 iBakeCake This way we don't have to look at a scrolling piece of code on the screen (as people keep talking)
17:50 aod_ http://fpaste.scsys.co.uk/536818
17:50 aod_ I wrote a code launching promisses, and I watched the threads spawn using top
17:51 aod_ but the threads did not end, they remained there till the end of the program
17:51 aod_ I was expecting to see them close one at a time
17:52 aod_ can someone enlighten my why didnt the threads closed? werent they supposed to?
17:52 iBakeCake Have you tried seeing what happened if you await()ed them?
17:52 aod_ same
17:53 aod_ they remain open
17:53 aod_ till the end
17:53 harmil_wk If I have a variable, say, $x. And I want to know if that variable contains something that it's reasonable to treat as a single value or if I should iterate over it, what's the best way to do that?
17:53 gfldex aod_: Rakudo will reuse threads when possible.
17:54 gfldex harmil_wk: you can do $x ~~ Positional but that is likely a bad idea
17:54 harmil_wk I thought $x.^can("iterator") but that exists on Any, so even 1.^can("iterator") works.
17:54 iBakeCake harmil_wk: $x ~~ Positional # probably
17:55 harmil_wk gfldex: why is that a bad idea?
17:55 iBakeCake gfldex: why bad idea?
17:55 timotimo aod_: yes, the default ThreadPoolScheduler will not close threads. you can build your own scheduler that will, if you want to.
17:55 gfldex it's one of those cases where you may be missing a multi to make that decision early on
17:55 iBakeCake timotimo: will not close at all? Ever?
17:55 gfldex also, any single value will iterate just fine
17:56 timotimo iBakeCake: when the process ends, the threads will be closed
17:56 harmil_wk gfldex: it will, but I'll end up in an infinite loop that way, because on iterable things I want to recurse down and perform my operation on each element.
17:56 iBakeCake timotimo: well, that would explain why buggable is leaking then, I guess
17:56 gfldex harmil_wk: if you recurse, use a multi
17:57 timotimo iBakeCake: but the maximum number of threads from the TPS is fixed
17:57 dalek ecosystem: 8882872 | (Julien Simonet)++ | META.list:
17:57 dalek ecosystem: Add DNS::Zone : DNS zone file parser.
17:57 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/8882872c51
17:57 timotimo it should max out at some point
17:57 iBakeCake timotimo: OK. I get it now
17:57 iBakeCake harmil_wk: we have duckmap that's likely what you're looking for.
17:58 harmil_wk iBakeCake: I'll look
17:58 iBakeCake harmil_wk: or deepmap.... Are you working on is-polysomething-deeply? You probably want to use one of those routines
17:58 iBakeCake s: &duckmap
17:58 SourceBaby iBakeCake, Sauce is at https://github.com/rakudo/rakudo/blob/697a0ae/src/core/metaops.pm#L643
17:58 iBakeCake s: &deepmap
17:58 SourceBaby iBakeCake, Sauce is at https://github.com/rakudo/rakudo/blob/697a0ae/src/core/metaops.pm#L513
18:08 Derperperd joined #perl6
18:09 dwarring joined #perl6
18:11 robot joined #perl6
18:28 girafe joined #perl6
19:00 dataf4l joined #perl6
19:01 cognominal joined #perl6
19:02 labster joined #perl6
19:17 dalek doc/spellcheck: de336e6 | coke++ | xt/.aspell.pws:
19:17 dalek doc/spellcheck: ignore more words
19:17 dalek doc/spellcheck: review: https://github.com/perl6/doc/commit/de336e6450
19:17 dalek doc/spellcheck: 803b711 | coke++ | xt/aspell.t:
19:17 dalek doc/spellcheck: add overview comment, search only docs
19:17 [Coke] ... that's a wierd summary.
19:18 [Coke] so, no more merge commits, and most of the "add more words" commits have been collapsed.
19:18 dalek joined #perl6
19:19 [Coke] so, safe to merge, will push it this evening, probably.
19:24 rudi_s joined #perl6
19:34 atweiden joined #perl6
19:38 andrzejku joined #perl6
19:41 briandfoy joined #perl6
19:52 dataf4l joined #perl6
20:05 cdg joined #perl6
20:06 pyrimidi_ joined #perl6
20:08 pyrimidi_ joined #perl6
20:12 sjoshi joined #perl6
20:13 andrzejku is true that perl6 is lisp?
20:15 timotimo it surprises me they were here for half an hour before they asked the question and then disappeared 2 minutes after :(
20:18 skids joined #perl6
20:28 nine timotimo: IIRC you're into music. Are you also into Hi-Fi?
20:29 timotimo nah, don't have any money for that stuff
20:29 harmil_wk timotimo: The canonical answer to andrzejku's question should be "nil". Can we get that in a FAQ somewhere?
20:30 nine Well, I'm looking for someone to run an idea by (totally not Perl 6 related, sorry for that.)
20:30 timotimo well, we have #perl6-noise-gang :)
20:30 nine Aah...almost forgot about that. Will try there :)
20:31 timotimo :)
20:32 [Coke] ... /me wonders if 'perl6 --doc file' precompiles
20:34 dalek Heuristic branch merge: pushed 20 commits to doc by coke
20:35 wamba joined #perl6
20:37 [Coke] merged spellcheck branc.
20:37 [Coke] *h
20:37 harmil_wk I take that back, I'd say the correct answer is "(not (not Nil))" which is a boolean false in both CL and Perl 6.
20:38 nemo left #perl6
20:38 [Coke] 'make xtest' (along with aspell installed) will now complain about mispelled (or esoteric) words (or more likely, some literal string in a code example)
20:38 sufrostico joined #perl6
20:41 samcv are submethods not inherited?
20:43 [Coke] (xtest) you can also run perl6 xt/aspell.t <list of files> if you just want to test a few (because test is slooow)
20:43 [Coke] samcv: nope.
20:44 kurahaupo__ joined #perl6
20:44 [Coke] er, "no, they are not."
20:45 samcv ok that's what i thought. wanted to make sure it was that clear cut. the perl 6 page on methods uses 'submethod' but doesn't explain what it does explicitly
20:46 [Coke] if you docsearch for 'submethod', the class you find says it first P.
20:47 samcv docsearch? on the perl6 site?
20:48 samcv ooo nice :)
20:48 samcv yes. it does
20:48 samcv i will use the built in search from now on. :) very good
20:48 dalek doc: 5fb819c | coke++ | doc/Language/faq.pod6:
20:48 dalek doc: Christmas has come and gone.
20:48 dalek doc:
20:48 dalek doc: Be more definitive.
20:48 dalek doc: review: https://github.com/perl6/doc/commit/5fb819cbed
20:48 dalek doc: 2c64c21 | coke++ | doc/ (3 files):
20:48 dalek doc: use better preposition
20:48 dalek doc: review: https://github.com/perl6/doc/commit/2c64c21339
20:48 dalek doc: e2cdc2b | coke++ | doc/Language/faq.pod6:
20:48 dalek doc: add slightly tongue-in-cheek lisp faq
20:48 dalek doc:
20:48 dalek doc: harmil_wk++
20:48 dalek doc: review: https://github.com/perl6/doc/commit/e2cdc2bcfd
20:49 [Coke] harmil_wk: ^^
20:49 harmil_wk [Coke]: oh God, what I have done?!
20:52 bjz joined #perl6
20:55 geekosaur obviously that belongs in rakudo, similarly to 42 :p
21:04 samcv ok so submethods are not inherited. can you make $.var not inherited as well?
21:05 samcv probably some other way than putting it in a submethod
21:08 timotimo just make it $!var and have a submethod accessor
21:10 samcv kk
21:10 samcv that's what i was thinking
21:10 timotimo but $!var is always only available in the current class
21:10 timotimo so you can just as well leave out the submethod altogether and access the var directly by its "private" name
21:23 samcv so you can access $! variables outside of the class? by calling it by its private name? how is that done?
21:24 FROGGS samcv: $!var is only accessable from the inside
21:25 samcv yeah that's what i thought :P
21:25 FROGGS but you could a submethod yourself
21:25 FROGGS add a*
21:26 espadrine joined #perl6
21:27 sufrostico joined #perl6
21:28 nicq20 joined #perl6
21:29 nicq20 Hello o/
21:31 fumlead left #perl6
21:32 skids samcv: there is also a "trusts" trait but (at least right now) it only pertains to private methods, not attributes
21:32 samcv ah ok
21:45 pdcawley joined #perl6
21:46 bjz joined #perl6
21:55 eliasr joined #perl6
21:56 MasterDuke joined #perl6
21:57 AlexDaniel joined #perl6
22:07 lizmat joined #perl6
22:17 skids m: my Hash $h; $h.perl.say; $h{42}++; $h.say; my BagHash $b; $b.perl.say; $b{42}++; $b.say;
22:17 camelia rakudo-moar 74d0e3: OUTPUT«Hash␤{42 => 1}␤BagHash␤Type check failed in assignment to $b; expected BagHash but got Hash (${})␤  in block <unit> at <tmp> line 1␤␤»
22:17 woolfy joined #perl6
22:18 iBakeCake skids: that's cause you're calling it on a type object
22:18 skids In both cases.
22:19 iBakeCake m: my Hash $h; $h.perl.say; $h{42}++; $h.say; my BagHash $b = BagHash.new; $b.perl.say; $b{42}++; $b.say;
22:19 camelia rakudo-moar 74d0e3: OUTPUT«Hash␤{42 => 1}␤().BagHash␤BagHash.new(42)␤»
22:19 iBakeCake Yes, and by default type objects autovivify to a Hash
22:19 iBakeCake m: my $x = Int; dd $x; $x{42}++; dd $x
22:19 camelia rakudo-moar 74d0e3: OUTPUT«Int $x = Int␤Hash $x = ${"42" => 1}␤»
22:19 dataf4l joined #perl6
22:21 * skids wonders if the autovivify stuff is together enough to supply BagHash with behavior to override that default
22:22 iBakeCake skids: I think it should be possible by defining AT-KEY for :U in Baggy. I actually recently stumbled onto this myself and kinda got distracted and never investigated further than all :U autovivify to Hash :)
22:23 iBakeCake s: Any, 'AT-KEY'
22:23 SourceBaby iBakeCake, Something's wrong: ␤ERR: Type check failed in binding to &code; expected Callable but got Method+{<anon|51469040>} (Method+{<anon|5146904...)␤  in sub do-sourcery at /home/zoffix/services/lib/CoreHackers-Sourcery/lib/CoreHackers/Sourcery.pm6 (CoreHackers::Sourcery) line 42␤  in sub sourcery at /home/zoffix/services/lib/CoreHackers-Sourcery/lib/CoreHackers/Sourcery.pm6 (CoreHackers::Sourcery) line 33␤  in block <unit> at -e li
22:23 iBakeCake s: Any, 'AT-KEY', \(42)
22:23 SourceBaby iBakeCake, Sauce is at https://github.com/rakudo/rakudo/blob/74d0e36/src/core/Any.pm#L362
22:23 iBakeCake Here it does Hash.new, but for Baggies it't do self.new: https://github.com/rakudo/rakudo/blob/74d0e36/src/core/Any.pm#L364
22:23 skids Yeah I'm kinda 5 layers deep in what I'm working on right now so maybe a detour is ill advised.
22:23 iBakeCake And same should be done for Set/SetHash
22:24 iBakeCake :)
22:24 * iBakeCake would do it but too tired from doing all the trig stuff the entire day.
22:24 iBakeCake I'll take a look into this tomorrow, if I still remember
22:24 skids iBakeCake++
22:52 dataf4l joined #perl6
22:55 firstdayonthejob joined #perl6
23:08 sufrostico joined #perl6
23:09 devmikey joined #perl6
23:11 dataf4l joined #perl6
23:13 dataf4l joined #perl6
23:18 dataf4l joined #perl6
23:23 dataf4l joined #perl6
23:25 sufrostico joined #perl6
23:29 samcv ... or die "Error" is the same as die X::AdHoc.new(payload => "Error") ?
23:30 dataf4l joined #perl6
23:35 bjz joined #perl6
23:40 sufrostico joined #perl6
23:43 samcv also: open 'foo' or say "Error $!"; this doesn't work, but open 'foo'; say "$!"; does work. how do i access $! when using or?
23:47 dataf4l joined #perl6
23:48 Juerd samcv: I think you may be running into a bug in the REPL interface
23:49 samcv i get: Use of Nil in string context. when doing open 'foo' or die "Error: $!"
23:49 Juerd In the REPL I get "Control flow commands not allowed in toplevel"
23:49 samcv oh
23:49 Juerd But it seems to work if you add "try open 'aoeu';" before it...
23:50 samcv yeah i get that in repl. running the program directly it shows the other error i said
23:50 samcv ah.
23:51 Juerd Either way, are you aware that you could also use a CATCH block to catch the exception? :)
23:51 samcv yes i know how to do that :)
23:51 Juerd I don't really understand why open or say "...$!" wouldn't work.
23:51 samcv me either
23:51 Juerd It feels like it should just work :)
23:51 samcv without the `or´, it works fine
23:52 samcv like if they're on different lines
23:52 samcv and try/CATCH works fine accessing the exception as $_
23:52 Juerd Or if a dummy "try open 'foo';" is added before it. Which should probably be golfed, but I can't think of what mechanism may be causing this.
23:53 Juerd I happened to notice that after that it did begin to work as expected
23:53 Juerd But don't ask me why :)
23:53 dataf4l joined #perl6
23:53 samcv it worked doing `try open 'foo' or die "Error $!"; ´ ?
23:54 Juerd https://juerd.nl/i/07e8cc73b885814f41ca09cfa1448c34.png
23:54 samcv which rakudo do you have?
23:54 samcv i have 2016.10
23:55 sufrostico joined #perl6
23:55 Juerd This is Rakudo version 2016.08.1-113-g74f1edc built on MoarVM version 2016.08-32-ge52414d
23:55 samcv ah ok
23:55 samcv maybe a regression? idk
23:55 samcv m: open 'foo' or die "E: $!"
23:55 camelia rakudo-moar 74d0e3: OUTPUT«open is disallowed in restricted setting␤  in sub restricted at src/RESTRICTED.setting line 1␤  in sub open at src/RESTRICTED.setting line 9␤  in block <unit> at <tmp> line 1␤␤»
23:56 timotimo you probably want "orelse" instead of just "or"
23:56 timotimo and of course the restricted setting is Fing you over :)
23:57 samcv m: false or die "$!"
23:57 camelia rakudo-moar 74d0e3: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Undeclared routines:␤    false used at line 1␤    or used at line 1␤␤»
23:57 timotimo does open actually die, or does it fail?
23:57 samcv m: False or die "$!"
23:57 camelia rakudo-moar 74d0e3: OUTPUT«Use of Nil in string context␤  in block <unit> at <tmp> line 1␤␤  in block <unit> at <tmp> line 1␤␤»
23:57 samcv timotimo, uh it throws the error you just saw
23:57 timotimo m: try 0 / 0 orelse die "test: $!"
23:57 camelia rakudo-moar 74d0e3: ( no output )
23:57 timotimo m: (try 0 / 0) orelse die "test: $!"
23:57 camelia rakudo-moar 74d0e3: ( no output )
23:57 timotimo m: (try 0 % 0) orelse die "test: $!"
23:57 camelia rakudo-moar 74d0e3: OUTPUT«test: Attempt to divide by zero using %␤  in block <unit> at <tmp> line 1␤␤»
23:57 timotimo m: try 0 % 0 orelse die "test: $!"
23:57 camelia rakudo-moar 74d0e3: ( no output )
23:57 * geekosaur thought $! was obsolete at best... should be able to use the return value instead of a magic var
23:58 samcv obsolete? it's in the documentation tho. uhm so exceptions are returned?
23:58 timotimo no, failures are returned
23:58 geekosaur that's what Failure is
23:58 geekosaur it's a suspended exception that will throw if used as a value
23:58 samcv ok how to access the full exception using the return then geekosaur
23:59 geekosaur but you can introspect it to see if it's a failure and what kind it is, without making it throw
23:59 timotimo m: +"hello" orelse say "oh no! $_"
23:59 camelia rakudo-moar 74d0e3: OUTPUT«oh no! (HANDLED) Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5hello' (indicated by ⏏)␤  in block <unit> at <tmp> line 1␤␤»
23:59 timotimo m: +"hello" or say "oh no! $_"
23:59 camelia rakudo-moar 74d0e3: OUTPUT«Use of uninitialized value $_ of type Any in string context.␤Methods .^name, .perl, .gist, or .say can be used to stringify it to something meaningful.␤  in block <unit> at <tmp> line 1␤oh no! ␤»
23:59 timotimo m: +"hello" or say "oh no! !_"
23:59 camelia rakudo-moar 74d0e3: OUTPUT«oh no! !_␤»
23:59 timotimo m: +"hello" or say "oh no! $!"
23:59 camelia rakudo-moar 74d0e3: OUTPUT«Use of Nil in string context␤  in block <unit> at <tmp> line 1␤oh no! ␤»
23:59 timotimo see the orelse?
23:59 timotimo the (HANDLED) comes from the fact that it's a Failure, not a regular exception
23:59 samcv yeah. so orelse is the right way to do it then

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

Perl 6 | Reference Documentation | Rakudo