»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
Set by moritz on 22 December 2015.
iBakeCake is_approx spotted in github.com/rakudo-p5/v5/blob/maste...est.pl#L14 01:29
iBakeCake was gonna create an Issue but I see that code is a rotting carcas
(to add context: is_approx is deprecated and will be removed entirely soon) 01:31
iBakeCake .tell rindolf the code's at github.com/rakudo/rakudo/blob/eb69...ol.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.
iBakeCake .tell rindolf the stuff that starts with nqp:: is nqp ops and generally would be in github.com/perl6/nqp (see docs/) 01:38
yoleaux iBakeCake: I'll pass your message to rindolf.
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:08
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:09
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:10
Ah, and I'm new to IRD as well, so I probably put too much into a biffer 02:11
er, buffer
my %nameHash = ( firstName => 'Bob' , secondName => 'Smith');
geekosaur also it's generally a good idea to use a pastebin of some kind (gist.github.com or dpaste.de or ...)
geekosaur irc has a rather short message length. some clients know to chop messages up, others don't 02:11
some can be taught (there are scripts for irssi, for example)
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.
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
msanderson If I have an array of hashes like: 02:13
say @nameList [{firstName => Bob, secondName => Smith} {firstName => Sally, secondName => Smith}] 02:14
The array of hashes is coming from an sqlite3 database I populated and accessed using DBIish and allrows(:array-of-hash) 02:15
I want to be be able to sort the array based on the values of one of the hashes. 02:16
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> }
camelia rakudo-moar eb6907: OUTPUT«({firstName => Sally, secondName => Smith} {firstName => Bob, secondName => Smith})␤»
iBakeCake m: my @nameList = [{firstName => 'Bob', secondName => 'Smith'}, {firstName => 'Sally', secondName => 'Smith'}]; say @nameList.sort: { $^a<firstName> cmp $^b<firstName> }
camelia rakudo-moar eb6907: OUTPUT«({firstName => Bob, secondName => Smith} {firstName => Sally, secondName => Smith})␤»
iBakeCake docs.perl6.org/routine/sort 02:18
iBakeCake boos camelCase
kebab-case or no case :P
msanderson ;-) Fair enough re: case ...
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})␤»
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})␤»
iBakeCake This works too, I guess
msanderson To me, that last one makes sense in my head. I'm still thinking about the cmp version. 02:22
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?
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? ;-)
iBakeCake haha 02:24
I actually did code in camelCase nearly a decade ago. Can't believe it.
msanderson Thanks for the very succinct explanation. I've a lot to learn. 02:25
Since I'm asking questions, maybe you could answer another.
Once I've finished this little application, how are they generally "distributed" with respect to modules.
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
Can I bundle a module up so that's it's available with my code?
iBakeCake Yeah
msanderson For things like DBIIsh and Text::Table::Simple, etc.?
iBakeCake And I think zef ( modules.perl6.org/repo/zef ) can install from a .tar or a .zip 02:27
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
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
msanderson Since the Windows guys won't git installed, they won't be able to use panda to get the module 02:29
For that matter, I'm guessing zef uses git to fetch the module's code too
iBakeCake Yeah 02:30
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
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.
msanderson Bed is good. Thanks for the help, I really appreciate it. Cheers, Mike 02:32
Woodi_ hi today :) 06:18
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:21
Woodi_ btw found small gem in "Multics Emacs implementation history" article :) www.multicians.org/mepap.html 06:22
andrzejku hello :) 06:23
Woodi_ cze andrzejku :) 06:23
andrzejku Woodi_: Poland? 06:24
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
time, and the former is much more common."
andrzejku: yes :)
bioduds Hello, friends 10:38
I'd like to know from your experience if a blockchain build solely using Perl6 would be a good idea 10:39
moritz probably not yet 10:40
reading and writing binary data isn't very mature in rakudo 10:41
and iirc blockchain implementations need to keep much in memory, so there the memory overhead might hurt
bioduds moritz : thanks. I've bitcoin code, it is written in cpp so I wondered 10:46
*I've seen... 10:47
grondilu bioduds: IMHO it'd make much more sense to wrap a C library around it. 10:57
with NativeCall, that is.
btw bitcoin was one of the first thing I've used Perl 6 for. I still have an old repo: github.com/grondilu/libbitcoin-perl6 10:58
it does not do much and it's probably too old to run straight away, though. 10:59
the Perl 5 version used to do a bit more: github.com/grondilu/libbitcoin-perl 11:00
it's still very old and mostly useless, but it has historical merits, imho.
(for me, that is) 11:01
being frustrated writing this Perl 5 project was the main reason I looked into Perl 6 then. 11:02
DrForr waves from work. 11:34
timotimo o/ DrForr 11:35
masak .oO( wave-work duality )
DrForr Mmhmm. 11:36
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:38
DrForr How's the C++ NativeCall stuff coming along? 11:42
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?
moritz sorry to hear it was so empty at OSCON 11:45
timotimo oh? :(
DrForr The convention hall was empty. The big problem is that FOSDEM sucks all the air out of the proverbial room.
timotimo oh, those are at the same time? 11:46
DrForr No, but it's the only explanation that makes sense.
timotimo maybe oscon was packed to the brim, but nobody wanted to go into the perl room? 11:47
DrForr They had maybe 500 people total. 11:49
timotimo what.
that's smaller than the gulaschprogrammiernacht
DrForr It may have been ~800, but certainly nowhere near the 4000+ at Austin. 11:50
El_Che hi DrForr
DrForr Afternoon.
El_Che no a lot of attendees? 11:51
hopefully 20 good ones
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?
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:54
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:55
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:57
El_Che ah ok 11:58
I had the same thought today
El_Che about the oreilly security conference in Amsterdam 11:59
El_Che too corporate, too expensive, not really handon 11:59
s
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: www.secappdev.org/program.html and although expensive it a full week very hands on. Probably going again
Hashiconf EU this year was in Amsterdam. It was a nice location certainly 12:02
I'll try to make it this year to yapc, thus maybe cutting on conferences :)
DrForr I'm not saying the venue city will be a major uptick, but it'll be at least a factor. 12:03
El_Che I think it will 12:08
nice venue, good connections
El_Che connectios to romania aren't on the same league 12:08
at least from .BE
DrForr Connections from *anywhere* to Romania aren't. At least from Cluj. Bucharest is better. 12:12
El_Che most flights took 6 hours at least (no direct connections) 12:14
DrForr Yep, most of 'em through Frankfurt. 12:17
*Munich
brrt in .nl, you can fly with Wizz air directly from Eindhoven to Cluj 12:28
DrForr Yep. 12:29
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
not very modern perhaps 12:37
El_Che going to Rome in a few weeks with Ryan Air. I hope it's OK
at least you have seat numbers nowadays
tadzik they have seats now? Dayum! 12:41
DrForr Actually random seating was proved more efficient than assigned seating, at least in the Mythbusters trial. 12:43
moritz did they have kids in the mythbuster trial? :-) 12:44
DrForr Yep. 12:45
[Coke] randomly assigned, or self-selected on boarding? 13:08
DrForr The latter. 13:09
moritz did the folks know they were under observation? 13:12
[Coke] does the fight to install Pod::To::BigPage again. 13:24
iBakeCake [Coke]: what fight? I believe RabidGravy++ fixed the MAST::Frame thing 14:08
RabidGravy in 14:11
yeah it was in LWP::Simple I think 14:12
RabidGravy so if it is still doing it, install a newer LWP::Simple 14:12
[Coke] installingn lwp::simple is problematic behind a corporate firewall 14:15
dalek c: cf45bb8 | (Will Coleda)++ | doc/Language/rb-nutshell.pod6:
fix typo
14:20
dalek c: 8897bc7 | (Will Coleda)++ | doc/Language/nativecall.pod6:
use full word
14:37
dalek c: 2c03626 | (Will Coleda)++ | doc/Language/operators.pod6:
expand

use 'curly braces' (not brackets) to match other parts of the docs
14:40
[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:41
kurahaupo__ metafied? metaized? 14:42
profan 4/win 12
ehh, wops
iBakeCake metaed
[Coke]: I'd just drop meta'ed
dalek c: 5335de9 | (Will Coleda)++ | doc/Language/rb-nutshell.pod6:
fix typo
14:43
kurahaupo__ "... applying the corresponding meta operator" 14:46
dalek c: 547ed3f | (Will Coleda)++ | doc/Language/operators.pod6:
simplify, avoid odd word

  iBakeCake++
14:51
[Coke] iBakeCake: danke.
dalek c: abb5a5c | (Will Coleda)++ | doc/Type/X/Does/TypeObject.pod6:
fix typo

class name didn't match
15:05
dalek c: efbe733 | (Will Coleda)++ | doc/Language/exceptions.pod6:
fix typo

no dash needed
15:07
dalek c: 3fe2698 | (Will Coleda)++ | doc/Language/unicode_entry.pod6:
fix typo
15:16
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
I don't know of any short version of "square brackets" though
except that sometimes those are just "brackets", which doesn't help :) 15:37
dalek c: 1f144fe | (Will Coleda)++ | doc/Language/operators.pod6:
simplify language
15:41
c: f7607ce | (Will Coleda)++ | doc/Language/packages.pod6:
ok to use this as an adjective here
15:42
c: 3be0d36 | (Will Coleda)++ | doc/Language/performance.pod6:
use a fake version here

  (avoid spellchecking issues)
15:44
dalek c: 8685200 | (Will Coleda)++ | doc/Type/CurrentThreadScheduler.pod6:
use standard word
15:46
[Coke] square brackets are "braces" according to unicode. 15:49
iBakeCake m: '['.uniname.say
camelia rakudo-moar 7a456f: OUTPUT«LEFT SQUARE BRACKET␤»
iBakeCake m: '{'.uniname.say
[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.
camelia rakudo-moar 7a456f: OUTPUT«LEFT CURLY BRACKET␤»
[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
[Coke] ilmari: ? 15:51
ilmari [Coke]: you said "a style guid"
[Coke] *facepalm*
cschwenz anyone here able to help with a problem building rakudo via `rakudobrew build moar 2016.10`? (full output: pastebin.com/SKZWuy8m ) 15:52
dalek c: 5f2c1fe | (Will Coleda)++ | doc/Language/operators.pod6:
better word form, maybe.

  (avoids spellcheck issue, also)
15:54
[Coke] we ok with "truthy" and "falsy" (or "falsey") ? 15:56
could probably be replaced with True and False in many cases.
... also found trueness 15:57
... and thruthiness
*truthiness
cschwenz my opinion is to go with True and False; and truthiness has the exact opposite connotation you're looking for 15:58
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:00
cschwenz from 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 c: 28c6488 | (Will Coleda)++ | doc/Type/Str.pod6:
fix typo
dalek c: 8414910 | (Will Coleda)++ | doc/Type/Str.pod6:
avoid pluralizing with 's

  (also remove 'ss)
16:08
[Coke] github.com/perl6/doc/blob/master/d....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:10
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:11
moritz [Coke]: I'd propose simply "starting from 0" 16:12
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:13
dalek c: 567ffdf | coke++ | doc/Language/testing.pod6:
Avoid neologism

  (that isn't quite what we mean here anyway)
16:16
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."
perlpilot: we don't really guarantee that, though. 16:18
Suggestions on how/if to replace trueness there?
moritz truthiness
iBakeCake +1 16:19
[Coke] -1
iBakeCake :D
moritz truthness
veracity :-)
[Coke] moritz: ENOTAWORD
moritz [Coke]: *shrug* we make it one
gfldex there is truthless but not truthiless. Maybe that 's why truthiness sounds wrong to my ears.
[Coke] moritz: if you want to do that and add a glossary entry, sure. 16:20
[Coke] is going with just "truth" for now.
gfldex i strongly disagree on truth
perlpilot likes "trueness" as is. 16:21
[Coke] ok. leaving it as "trueness" which is apparently a word.
gfldex i picked^W made up that word because trueness relates to true as definedness relates to defined
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"
TimToady no, no, no
it never evaluates to True or False
well, sometime it might be 16:23
but no Bool has to be created
we should reserve True and False for actual Bool values
perlpilot indeed
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
m: .say for ?0, ?1
camelia rakudo-moar 8e9fd0: OUTPUT«False␤True␤»
TimToady no, that's conversion to Bool
m: say "I'm not Bool" if 1;
camelia rakudo-moar 8e9fd0: OUTPUT«I'm not Bool␤»
gfldex m: say 'zero' if 0; # <--- no bool 16:25
camelia ( no output )
TimToady it's a boolean evaluation without Bool conversion
moritz m: say "I'm so Bool" if 0 but role { method Bool { True } }
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!
moritz so the distinction seems very artifical to me 16:26
a Bool conversion happens, the result is just discarded
[Coke] you can optimize your way out of it, of course.
moritz: QAST::Op(if) might know what to do when given a QAST::WVal(Int), e.g. 16:27
anyway, I added the words to our dictionary, I'm done. :)
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.
dalek c: df4f847 | (Will Coleda)++ | doc/Type/Supply.pod6:
remove reference to tock
16:28
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.
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" :-)
anyway, afk, TTFN 16:31
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
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 ;)
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:35
gfldex i just checked /language/control#if and it's ... not very good 16:37
[Coke]: how much spelling do you guess is still ahead of you?
[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?
[Coke] gfldex: sure, about what?
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. )
[Coke] I don't think there is a common enough class of error that it's worth calling any of them out specifically. 16:40
dalek c: 30b9319 | coke++ | doc/Type/Str.pod6:
this is fine without possessive
16:41
[Coke] huh. can't hit alt-; here to get an ellipse; works fine in iterm. 16:43
4 files left.
[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
I would be happy with "Bad (things are happening)" as a stopgap.
... 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.
[Coke] no, descriptive text. 16:53
gfldex and it tends to make the text noisy for little gain
dalek c: 8b3d608 | coke++ | doc/Language/ (3 files):
space out N<> - problematic with perl6 --doc
16:57
c: 559a4e7 | coke++ | doc/Language/modules.pod6:
E<> doesn't work in perl6 --doc; use a comma
dalek c/spellcheck: 0e35582 | coke++ | doc/Type/Str.pod6:
this is fine without possessive
16:58
c/spellcheck: b3e0f89 | coke++ | doc/Language/ (3 files):
space out N<> - problematic with perl6 --doc
c/spellcheck: a3d41ee | coke++ | doc/Language/modules.pod6:
E<> doesn't work in perl6 --doc; use a comma
[Coke] down to 2 files... 16:59
iBakeCake m: my num $x = 3e0; dd $x.WHAT 17:01
camelia rakudo-moar 697a0a: OUTPUT«Num␤»
iBakeCake How can I check whether something is a native type? 17:02
timotimo prim...something 17:02
github.com/perl6/nqp/blob/master/d...exprimspec 17:03
that's not how i remember that op
yeah, you want ojbprimspec instead
objprimspec
iBakeCake m: use nqp; my num $x = 3e0; dd nqp::objprimspec($x) 17:04
camelia rakudo-moar 697a0a: OUTPUT«0␤»
iBakeCake m: use nqp; my Num $x = 3e0; dd nqp::objprimspec($x)
camelia rakudo-moar 697a0a: OUTPUT«0␤»
timotimo may have to decont
most probably will have to decont, actually
iBakeCake m: use nqp; my num $x = 3e0; dd nqp::objprimspec(nqp::decont($x))
camelia rakudo-moar 697a0a: OUTPUT«0␤»
timotimo hmm
m: use nqp; dd nqp::objprimspec(num) 17:05
camelia rakudo-moar 697a0a: OUTPUT«2␤»
timotimo m: use nqp; dd nqp::objprimspec(0.05e0)
camelia rakudo-moar 697a0a: OUTPUT«0␤»
timotimo m: use nqp; dd nqp::objprimspec(my num $a = 0.05e0)
camelia rakudo-moar 697a0a: OUTPUT«0␤»
timotimo m: use nqp; dd nqp::objprimspec(my num \a = 0.05e0)
camelia rakudo-moar 697a0a: OUTPUT«Type check failed in binding; expected num but got Num (0.05e0)␤ in block <unit> at <tmp> line 1␤␤»
[Coke] so, this is a problem, for some reason: Aspell thinks this line: 17:06
say +DigitMatcher.subparse: '12', args => \(:full-unicode);
... dammit, my unicode is vanishing. :| 17:07
timotimo :o
[Coke] anyway, the \(:full- there shows up as a mispelled 'ull'
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.
iBakeCake m: use nqp; my num $x = 3e0; dd nqp::lexprimspec(nqp::curlexpad(), '$x')
camelia rakudo-moar 697a0a: OUTPUT«2␤»
iBakeCake m: use nqp; my Num $x = 3e0; dd nqp::lexprimspec(nqp::curlexpad(), '$x')
camelia rakudo-moar 697a0a: OUTPUT«0␤»
iBakeCake timotimo++
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 :(
dalek c: e934bc2 | coke++ | doc/Language/classtut.pod6:
remove trailing whitespace
17:15
c/spellcheck: 22bba5a | coke++ | xt/code.pws:
aspell is confused
17:16
c/spellcheck: ae026d1 | coke++ | doc/Language/classtut.pod6:
remove trailing whitespace
timotimo if the name dont match, the value wont be right. ibakecake 17:19
oh, oops
misread
dalek c/spellcheck: 56083d5 | coke++ | xt/aspell.t:
p6doc just uses this under the hood anyway
17:20
[Coke] anyone mind if when I merge spellcheck branch, I squish it? 17:23
japhb [Coke]: Why do you want to? 17:26
[Coke] \o/ All tests successful. 17:27
japhb (That's curiosity, not abject disagreement.)
mst I would suggest 'make it ff-clean but then merge it no-ff'
then you get a single commit in master
[Coke] japhb: because 99.% of the commits are small minor updates to the wordlist, or merges from master.'
mst but without swuashing away the history of the branch
also you should rebase it first to get rid of the merges
because ew 17:28
[Coke] ok. I don't mind changing the history if no one cares.
[Coke] any pointers on doing the rebase? 17:29
mst well you just proposed obliterating it entirely
I'm just suggesting we preserve the useful parts of it, while getting rid of the mistakes
ilmari [Coke]: git rebase master 17:30
(when you're on the branch you want to rebase)
[Coke] ilmari: thank you.
dalek c/spellcheck: 65367e4 | coke++ | xt/ (2 files):
more words
c/spellcheck: 808a063 | coke++ | xt/words.pws:
last word
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:32
ilmari yeah, 'git rebase -i master', then you can shuffle them around and squash them 17:33
don't worry if you get confused or conflicts, you can always 'git rebase --abort'
[Coke] well, except I've already done the first rebase from master and pushed it. 17:35
(and, also, that rebase has commits I didn't make in this branch, but only merged from master) 17:36
perigrin the latter part is what rebasing master was supposed to fix. 17:37
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.
ilmari git should skip commits that are already on the branch you rebased onto
was your local master up-to-date?
[Coke] out of 100s of commits? seems like a waste of my time to dig through them.
ilmari: yes, that's how I was doing all the merges from master. :)
perigrin ilmari: if he has merge commits from master to his local branch the merge commits will be there still 17:39
since they're still commits in the tree.
ilmari perigrin: I thought it would drop the merge commits unless you said --preserve-merges? 17:40
[Coke] these aren't merge commits.
they're commits that were made to master after I branched.
e.g. d40da02
perigrin needs to go talk to a child's principal 17:41
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
iBakeCake gets flashbacks of his childhood 17:42
perigrin: what happened? :)
[Coke] grabs lunch. laters.
aod_ good afternoon guys. I would like to ask a question about promises. Is it ok I post code here? 17:48
iBakeCake aod_: it's best to use a pastebin: fpaste.scsys.co.uk/ 17:49
This way we don't have to look at a scrolling piece of code on the screen (as people keep talking) 17:50
aod_ fpaste.scsys.co.uk/536818
I wrote a code launching promisses, and I watched the threads spawn using top
but the threads did not end, they remained there till the end of the program 17:51
I was expecting to see them close one at a time
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?
aod_ same
they remain open 17:53
till the end
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?
gfldex aod_: Rakudo will reuse threads when possible.
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.
iBakeCake harmil_wk: $x ~~ Positional # probably
harmil_wk gfldex: why is that a bad idea? 17:55
iBakeCake gfldex: why bad idea?
timotimo aod_: yes, the default ThreadPoolScheduler will not close threads. you can build your own scheduler that will, if you want to.
gfldex it's one of those cases where you may be missing a multi to make that decision early on
iBakeCake timotimo: will not close at all? Ever?
gfldex also, any single value will iterate just fine
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.
iBakeCake timotimo: well, that would explain why buggable is leaking then, I guess
gfldex harmil_wk: if you recurse, use a multi
timotimo iBakeCake: but the maximum number of threads from the TPS is fixed 17:57
dalek osystem: 8882872 | (Julien Simonet)++ | META.list:
Add DNS::Zone : DNS zone file parser.
timotimo it should max out at some point
iBakeCake timotimo: OK. I get it now
harmil_wk: we have duckmap that's likely what you're looking for.
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
s: &duckmap
SourceBaby iBakeCake, Sauce is at github.com/rakudo/rakudo/blob/697a...ps.pm#L643
iBakeCake s: &deepmap
SourceBaby iBakeCake, Sauce is at github.com/rakudo/rakudo/blob/697a...ps.pm#L513
dalek c/spellcheck: de336e6 | coke++ | xt/.aspell.pws:
ignore more words
19:17
doc/spellcheck: 803b711 | coke++ | xt/aspell.t:
doc/spellcheck: add overview comment, search only docs
[Coke] ... that's a wierd summary. 19:17
so, no more merge commits, and most of the "add more words" commits have been collapsed. 19:18
[Coke] so, safe to merge, will push it this evening, probably. 19:19
andrzejku is true that perl6 is lisp? 20:13
timotimo it surprises me they were here for half an hour before they asked the question and then disappeared 2 minutes after :( 20:15
nine timotimo: IIRC you're into music. Are you also into Hi-Fi? 20:28
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?
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 :)
nine Aah...almost forgot about that. Will try there :)
timotimo :) 20:31
[Coke] ... /me wonders if 'perl6 --doc file' precompiles 20:32
dalek Heuristic branch merge: pushed 20 commits to doc by coke 20:34
[Coke] merged spellcheck branc. 20:37
*h
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.
[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
samcv are submethods not inherited? 20:41
[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
samcv: nope.
[Coke] er, "no, they are not." 20:44
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:45
[Coke] if you docsearch for 'submethod', the class you find says it first P. 20:46
samcv docsearch? on the perl6 site? 20:47
ooo nice :) 20:48
yes. it does
i will use the built in search from now on. :) very good
dalek c: 5fb819c | coke++ | doc/Language/faq.pod6:
Christmas has come and gone.

Be more definitive.
c: 2c64c21 | coke++ | doc/ (3 files):
use better preposition
c: e2cdc2b | coke++ | doc/Language/faq.pod6:
add slightly tongue-in-cheek lisp faq

  harmil_wk++
[Coke] harmil_wk: ^^ 20:49
harmil_wk [Coke]: oh God, what I have done?!
geekosaur obviously that belongs in rakudo, similarly to 42 :p 20:55
samcv ok so submethods are not inherited. can you make $.var not inherited as well? 21:04
probably some other way than putting it in a submethod 21:05
timotimo just make it $!var and have a submethod accessor 21:08
samcv kk 21:10
that's what i was thinking
timotimo but $!var is always only available in the current class
so you can just as well leave out the submethod altogether and access the var directly by its "private" name
samcv so you can access $! variables outside of the class? by calling it by its private name? how is that done? 21:23
FROGGS samcv: $!var is only accessable from the inside 21:24
samcv yeah that's what i thought :P 21:25
FROGGS but you could a submethod yourself
add a*
nicq20 Hello o/ 21:29
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
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␤␤»
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;
camelia rakudo-moar 74d0e3: OUTPUT«Hash␤{42 => 1}␤().BagHash␤BagHash.new(42)␤»
iBakeCake Yes, and by default type objects autovivify to a Hash
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}␤»
skids wonders if the autovivify stuff is together enough to supply BagHash with behavior to override that default 22:21
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:22
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 lin
iBakeCake s: Any, 'AT-KEY', \(42)
SourceBaby iBakeCake, Sauce is at github.com/rakudo/rakudo/blob/74d0...ny.pm#L362
iBakeCake Here it does Hash.new, but for Baggies it't do self.new: github.com/rakudo/rakudo/blob/74d0...ny.pm#L364
skids Yeah I'm kinda 5 layers deep in what I'm working on right now so maybe a detour is ill advised.
iBakeCake And same should be done for Set/SetHash
:) 22:24
iBakeCake would do it but too tired from doing all the trig stuff the entire day.
I'll take a look into this tomorrow, if I still remember
skids iBakeCake++
samcv ... or die "Error" is the same as die X::AdHoc.new(payload => "Error") ? 23:29
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:43
Juerd samcv: I think you may be running into a bug in the REPL interface 23:48
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
Juerd But it seems to work if you add "try open 'aoeu';" before it...
samcv yeah i get that in repl. running the program directly it shows the other error i said 23:50
ah.
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 :)
Juerd I don't really understand why open or say "...$!" wouldn't work.
samcv me either
Juerd It feels like it should just work :)
samcv without the `or´, it works fine
like if they're on different lines 23:52
and try/CATCH works fine accessing the exception as $_
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.
I happened to notice that after that it did begin to work as expected 23:53
But don't ask me why :)
samcv it worked doing `try open 'foo' or die "Error $!"; ´ ? 23:53
Juerd juerd.nl/i/07e8cc73b885814f41ca09cfa1448c34.png 23:54
samcv which rakudo do you have?
i have 2016.10
Juerd This is Rakudo version 2016.08.1-113-g74f1edc built on MoarVM version 2016.08-32-ge52414d 23:55
samcv ah ok
maybe a regression? idk
m: open 'foo' or die "E: $!"
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␤␤»
timotimo you probably want "orelse" instead of just "or" 23:56
and of course the restricted setting is Fing you over :)
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␤␤»
timotimo does open actually die, or does it fail?
samcv m: False or die "$!"
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␤␤»
samcv timotimo, uh it throws the error you just saw
timotimo m: try 0 / 0 orelse die "test: $!"
camelia ( no output )
timotimo m: (try 0 / 0) orelse die "test: $!"
camelia ( no output )
timotimo m: (try 0 % 0) orelse die "test: $!"
camelia rakudo-moar 74d0e3: OUTPUT«test: Attempt to divide by zero using %␤ in block <unit> at <tmp> line 1␤␤»
timotimo m: try 0 % 0 orelse die "test: $!"
camelia ( no output )
geekosaur thought $! was obsolete at best... should be able to use the return value instead of a magic var
samcv obsolete? it's in the documentation tho. uhm so exceptions are returned? 23:58
timotimo no, failures are returned
geekosaur that's what Failure is
it's a suspended exception that will throw if used as a value
samcv ok how to access the full exception using the return then geekosaur
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! $_"
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␤␤»
timotimo m: +"hello" or say "oh no! $_"
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! ␤»
timotimo m: +"hello" or say "oh no! !_"
camelia rakudo-moar 74d0e3: OUTPUT«oh no! !_␤»
timotimo m: +"hello" or say "oh no! $!"
camelia rakudo-moar 74d0e3: OUTPUT«Use of Nil in string context␤ in block <unit> at <tmp> line 1␤oh no! ␤»
timotimo see the orelse?
the (HANDLED) comes from the fact that it's a Failure, not a regular exception
samcv yeah. so orelse is the right way to do it then