Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-06-01

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:23 aries_liuxueyang joined #perl6
00:31 Xliff hoelzro++
00:32 Xliff Nice article.
00:32 * Xliff grabs jq
00:32 huggable joined #perl6
00:43 teatime yar, +1 for uniprops command
00:47 Xliff Hmm.... what package is uniprops in?
00:49 Actualeyes joined #perl6
00:49 dalek doc: b6ce6ba | coke++ | htmlify.p6:
00:49 dalek doc: We aren't using pack, so don't use it
00:49 dalek doc: review: https://github.com/perl6/doc/commit/b6ce6ba221
00:51 mcsnolte joined #perl6
00:52 [Coke] Xliff: it's core
00:52 [Coke] ... or so I thought. one sec.
00:53 [Coke] er, "uniprop" is core.
01:02 mattp_ joined #perl6
01:03 teatime [Coke]: we're talking about a CLI tool
01:04 teatime Xliff: article says Unicode::Tussle
01:04 kalkin- who do i have to ping here to get the blessing for a PR adding a module to ecosystem?
01:05 hoelzro kalkin-: I can help!
01:05 hoelzro Xliff: thanks! glad you liked it
01:05 kalkin- hoelzro: this would be great! :)
01:06 dalek ecosystem: 3eda843 | (Bahtiar `kalkin-` Gadimov)++ | META.list:
01:06 dalek ecosystem: Add Hashids to ecosystem
01:06 dalek ecosystem:
01:06 dalek ecosystem: See https://github.com/kalkin/perl6-hashids
01:06 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/3eda843d99
01:06 dalek ecosystem: 18e665e | hoelzro++ | META.list:
01:06 dalek ecosystem: Merge pull request #213 from kalkin/master
01:06 dalek ecosystem:
01:06 dalek ecosystem: Add Hashids to ecosystem
01:06 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/18e665e4a3
01:06 hoelzro kalkin-++
01:06 kalkin- hoelzro: Thank you! :)
01:07 hoelzro happy to be of service!
01:07 anomie__ joined #perl6
01:09 perlawhirl joined #perl6
01:13 Xliff hoelzro++, now see? THAT is service! ;)
01:17 xinming joined #perl6
01:28 kalkin-_ joined #perl6
01:29 pierre_ joined #perl6
01:30 pierre_ joined #perl6
01:47 ilbot3 joined #perl6
01:47 Topic for #perl6 is now »ö« Welcome to Perl 6! | https://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:,  or /msg camelia p6: ... | irclog: http://irc.perl6.org or http://colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
01:54 BenGoldberg joined #perl6
02:10 pierre_ joined #perl6
02:10 Zoffix joined #perl6
02:19 pierrot joined #perl6
02:31 pierre_ joined #perl6
02:41 Actualeyes left #perl6
02:44 noganex joined #perl6
02:56 pierre_ joined #perl6
03:10 dj_goku joined #perl6
03:18 MadcapJake joined #perl6
03:21 jrusso joined #perl6
03:29 jack_rabbit joined #perl6
03:34 labster joined #perl6
03:41 cpage_ joined #perl6
03:43 cpage_ joined #perl6
03:53 PerlJam nine++ Just saw your GPW talk.  Very nice!
03:56 Actualeyes joined #perl6
03:57 Ben_Goldberg joined #perl6
04:01 Ben_Goldberg joined #perl6
04:31 Cabanossi joined #perl6
04:32 huggable joined #perl6
04:46 pierre_ joined #perl6
04:52 mohae joined #perl6
04:56 azawawi joined #perl6
04:57 Sgeo joined #perl6
04:57 azawawi http://pasteboard.co/1lKrDoSB.png  # GTK::Scintilla: Zoom and long lines API :)
05:02 anomie__ joined #perl6
05:20 ssotka joined #perl6
05:25 nine PerlJam: thanks :)
05:32 domidumont joined #perl6
05:37 domidumont joined #perl6
05:38 kent\n joined #perl6
05:38 kent\n joined #perl6
05:47 pierre_ joined #perl6
05:52 nadim joined #perl6
05:59 bjz joined #perl6
06:00 Actualeyes joined #perl6
06:13 rurban joined #perl6
06:17 silug joined #perl6
06:18 wamba joined #perl6
06:19 ufobat joined #perl6
06:20 pierre_ joined #perl6
06:23 bjz joined #perl6
06:26 firstdayonthejob joined #perl6
06:32 _mg_ joined #perl6
06:39 abraxxa joined #perl6
06:44 abraxxa joined #perl6
06:54 abraxxa joined #perl6
06:55 ufobat joined #perl6
07:05 jjido joined #perl6
07:06 cosimo joined #perl6
07:08 cosimo joined #perl6
07:14 bjz joined #perl6
07:16 darutoko joined #perl6
07:20 g4 joined #perl6
07:20 g4 joined #perl6
07:22 labster joined #perl6
07:29 zakharyas joined #perl6
07:34 jack_rabbit joined #perl6
07:37 kanishka joined #perl6
07:44 luiz_lha_ joined #perl6
07:45 pierre_ joined #perl6
07:47 pierre_ joined #perl6
07:51 mr-foobar joined #perl6
07:52 sno joined #perl6
07:56 dakkar joined #perl6
08:09 pierre_ joined #perl6
08:11 pierre_ joined #perl6
08:22 TreyHarr1 joined #perl6
08:23 ocbtec joined #perl6
08:24 aries_liuxueyang joined #perl6
08:26 rurban left #perl6
08:48 Ven joined #perl6
08:53 pierre_ joined #perl6
09:02 iH2O joined #perl6
09:03 iH2O left #perl6
09:06 pierre_ joined #perl6
09:11 RabidGravy joined #perl6
09:20 RabidGravy boom
09:44 domidumont joined #perl6
09:54 zakharyas joined #perl6
09:58 rindolf joined #perl6
10:02 bjz joined #perl6
10:03 ocbtec joined #perl6
10:09 wamba joined #perl6
10:09 grondilu joined #perl6
10:21 Zoffix .ask TimToady would you have time to offer a ruling on what the default tolerance to is-approx in Test.pm6 should be? Is it relative or absolute, and what value? My ideal choice would be absolute with $*TOLERANCE to match ≅. The specs/docs use absolute at 1e-5. And current impl uses relative at 1e-6. My more detailed plan for rewrite of is-approx: https://github.com/zoffixznet/debug/blob/master/mu/approx-rework.md
10:21 yoleaux Zoffix: I'll pass your message to TimToady.
10:21 Zoffix yoleaux, join #perl6-dev
10:31 Zoffix .tell TimToady sorry, ≅ uses relative tolerance, not absolute, but my ideal choice would still be to match it.
10:31 yoleaux Zoffix: I'll pass your message to TimToady.
10:33 Zoffix That or change it to absolute :P Why is it relative? I thought it was at 1e-15 to get rid of Num fuzziness
10:33 Zoffix (change it on ≅)
10:34 Zoffix m: say 3e20 ≅ 3e20+100000
10:34 camelia rakudo-moar 33ab86: OUTPUT«True␤»
10:34 Zoffix m: say 3e20 ≅ 3e20+1000000
10:34 camelia rakudo-moar 33ab86: OUTPUT«False␤»
10:41 Zoffix m: say &[≅](”Your mamma so fat”)
10:41 camelia rakudo-moar 33ab86: OUTPUT«True␤»
10:50 grondilu (well that's a weird string fill-in)
10:52 Zoffix ≅ should also use <= and not < methinks
10:52 Zoffix m: my $*TOLERANCE = 0; say 24 ≅ 24
10:52 camelia rakudo-moar 33ab86: OUTPUT«False␤»
10:53 Zoffix Maybe I'll file a bug report to find out why from Sam why I'm wrong....
10:55 azawawi joined #perl6
10:55 azawawi hi
10:56 Zoffix \o
11:03 brrt joined #perl6
11:06 azawawi RabidGravy: ping
11:06 azawawi Zoffix: :)
11:07 azawawi Zoffix: i need menubar wrapped in GTK::Simple (https://github.com/perl6/gtk-simple/tree/master/lib/GTK/Simple)
11:07 azawawi http://pasteboard.co/1lKrDoSB.png  # GTK::Scintilla demo should have a menu bar
11:12 kid51 joined #perl6
11:14 xinming joined #perl6
11:17 kid511 joined #perl6
11:18 RabidGravy boom
11:21 RabidGravy azawawi, the only thing that is preventing me from implementing menus there is that there is just so much to implement
11:22 azawawi link it plz
11:26 RabidGravy https://developer.gnome.org/gtk3/stable/GtkMenuBar.html
11:27 RabidGravy I haven't made anything yet
11:28 azawawi http://zetcode.com/gui/gtk2/menusandtoolbars/ ?
11:30 azawawi so basically wrap GTK::MenuBar and GTK::Menu and GTK::MenuItem ?
11:31 RabidGravy yeah
11:32 dalek gtk-simple: 7791648 | azawawi++ | README.md:
11:32 dalek gtk-simple: Make AppVeyor CI badge work
11:32 dalek gtk-simple: review: https://github.com/perl6/gtk-simple/commit/7791648080
11:46 kyrose joined #perl6
11:47 kyrose Hi, I am new to Perl language (both 5 and 6). I wanted to know, should I learn perl 5 first and then move to perl 6?
11:47 RabidGravy Thinking of using http://martinfowler.com/apsupp/recurring.pdf as a basis for a high level scheduling thingy, is there any other useful reading on the matter
11:48 RabidGravy kyrose, well a lot of the Perl 5 knowledge will be transferrable to Perl 6, but it's not required
11:49 ilmari if you don't already know Perl 5, trying to learn both at the same time could get confusing
11:49 RabidGravy if you're doing it just for more knowledge I would leap in to 6, if you're doing it for more pragmatic reasons (such as work) then I'd start with 5
11:49 ilmari like trying to learn e.g. spanish and italian at the same time
11:50 kyrose I just wanted to learn for fun. I like the C-syntax style of this high level language, but also wanted to learn perl 6 for production(maybe)
11:50 ilmari in that case I'd go straight for perl 6
11:50 RabidGravy yeah, 6
11:51 kyrose thanks. Ermm, also, is Perl 6 got an official forum and somehow the infamous CPAN?
11:52 ilmari there's http://modules.perl6.org/
11:52 RabidGravy well there are a fraction of the number of modules, but http://modules.perl6.org/
11:53 RabidGravy at some point it will be folded into the architecture that underlies CPAN
11:54 kyrose Ty. So, how about perl 5, will it stay version 5 forever? The website says 'perl 6 and perl 5 is a different language'?
11:54 RabidGravy yeah, the sub-version will monotonously increase forever
11:54 DrForr It should really be considered 'perl5' version 24, at the moment.
11:56 RabidGravy yeah, it's significantly different to the 5.000m that I first used
11:56 kyrose I see
11:58 kyrose Oh I just realized travis-ci build for github do support Perl 6. This is very useful.
11:58 RabidGravy yeah, most of the module developers use it
11:59 bjz joined #perl6
12:00 kyrose I hope perl will be supported more soon. I always see 'perl is dead, perl is ugly, perl is this perl is that', even looking for tutorial :(. And a web dev told me to not use Perl.
12:01 RabidGravy Well Perl is most definitely not dead, it's just not quite as fashionable as some languages
12:01 teatime yeah, that has become the fashionable opinion
12:02 teatime but it's so undeserved :(
12:02 DrForr It's fashionable for Python users to slag it for no good reason.
12:02 kyrose Yeah true. I tried perl 5 for my sysadmin task, even I'm very new at it, I can do much useful stuff in 2 lines.
12:02 RabidGravy that's been true since the late 90s
12:03 RabidGravy anyhow, I've got to go out and buy a garden fork as the previous one self destructed on Monday
12:03 RabidGravy toodles
12:05 kyrose Bye. Anyway, I'm kyrose, I think I wanna familiarize myself with Perl 6 community. Nice to meet you guys.
12:05 DrForr Check out perl6.org for starters.
12:07 kyrose Thanks for the reference.
12:08 pmurias joined #perl6
12:09 cgfbee joined #perl6
12:10 literal m: my $foo = <foo bar>.SetHash; say $foo.WHAT
12:10 camelia rakudo-moar 725054: OUTPUT«(SetHash)␤»
12:10 literal m: my %foo = <foo bar>.SetHash; say %foo.WHAT
12:10 camelia rakudo-moar 725054: OUTPUT«(Hash)␤»
12:10 literal why is the latter not a SetHash?
12:11 jnthn Because assignment is *into* the thing on the left
12:12 jnthn So you have a Hash (resulting from `my %foo`) and you're assigning the values from the SetHash into it
12:12 jnthn m: my %foo := <foo bar>.SetHash; say %foo.WHAT
12:12 camelia rakudo-moar 725054: OUTPUT«(SetHash)␤»
12:12 jnthn Binding is what's wanted in this case
12:12 literal I was under the impression that the % sigil could be used for many 'hashy' types, not just Hash. Is that incorrect?
12:12 jnthn It can, but you need to bind
12:12 literal ok, so with assignment @ and % are always Array and Hash ?
12:13 jnthn Yes
12:13 literal alright
12:13 jnthn Unless you bind something else
12:13 jnthn Or use `is`
12:13 xinming joined #perl6
12:13 jnthn m: my %foo is SetHash = <foo bar>; say %foo.WHAT
12:13 camelia rakudo-moar 725054: OUTPUT«Cannot modify an immutable SetHash␤  in block <unit> at /tmp/UGhEW5ZIwo line 1␤␤»
12:13 jnthn Ah, but SetHash has not STORE method I guess
12:13 rindolf joined #perl6
12:14 jnthn So yeah, use the binding thing I mentioned above
12:14 literal yeah
12:16 El_Che wouldn't be a good idea to add "rakudobrew build zef" to thttp://rakudo.org/how-to-get-rakudo/#Installing-Rakudo-Star-Source-Rakudobrew? Now it only mentions panda
12:19 pmurias joined #perl6
12:26 ZoffixW joined #perl6
12:27 ocbtec joined #perl6
12:28 ZoffixW kyrose, you can use most of Perl 5's modules (https://metacpan.org/) from Perl 6. See Inline::Perl5 . Talk for the module: https://www.youtube.com/watch?v=CEs1g94qNso&amp;feature=youtu.be
12:28 ZoffixW hugTABTAB.,.. damn you bot :(
12:28 kyrose Thanks ZoffixW
12:28 timotimo i'm surprised synopsebot6 is still up :P
12:30 kyrose https://allisonrandal.com/2013/03/31/mythbusters-why-i-still-love-perl/ - Whoa! Perl philosophy makes the devs so different in expressing their thought!
12:31 huggable joined #perl6
12:31 ZoffixW Yey.. 10th time the charm it seems.
12:31 ZoffixW huggable, Inline::Perl5
12:31 huggable ZoffixW, nothing found
12:31 ZoffixW huggable, module Inline::Perl5
12:31 huggable ZoffixW, nothing found
12:32 ZoffixW Ah, right. I never reimplemented that feature after the time I wiped the server...
12:32 kyrose can I ask. what is huggable? Is that bot command?
12:32 ZoffixW kyrose, yes, huggable is a Perl 6 IRC robot
12:33 ZoffixW There's a major bug that prevents it from joining half the time that I'm yet to find time to fix :P
12:33 kyrose wait, you're the bot developer?
12:33 ZoffixW huggable, Inline::Perl5 :is: Inline::Perl5 lets you use most of Perl 5's CPAN from Perl 6. See http://modules.perl6.org/repo/Inline::Perl5 and the talk about the module https://www.youtube.com/watch?v=CEs1g94qNso
12:33 huggable ZoffixW, Added Inline::Perl5 as Inline::Perl5 lets you use most of Perl 5's CPAN from Perl 6. See http://modules.perl6.org/repo/Inline::Perl5 and the talk about the module https://www.youtube.com/watch?v=CEs1g94qNso
12:33 ZoffixW kyrose, I guess :)
12:34 kyrose ZoffixW, cool!
12:36 perlpilot buenos dias señors y señoras
12:38 DrForr ?Que tal?
12:39 perlpilot good this morning so far
12:45 huf joined #perl6
12:52 Akagi201 joined #perl6
12:55 _mg_ joined #perl6
12:55 sufrostico joined #perl6
13:00 [Coke] Many eyes make light work.
13:01 pierre_ joined #perl6
13:03 grondilu hello.  Question : in linear algebra we often see expressions like transpose(A)*M*A.  Do you think it's possible to define a ternary operator a*b*c in order to optimize this kind of expression?
13:04 grondilu of course a, b and c would have constraints.
13:05 perlpilot grondilu: Almost all "is it possible" type questions have an answer of "yes" in Perl 6  ;)
13:06 grondilu I'm not sure there is a syntax for ternary operator though
13:06 grondilu m: sub ternary:<§ §>($, $, $) {...}
13:06 camelia rakudo-moar 725054: OUTPUT«5===SORRY!5=== Error while compiling /tmp/p6LhJIsk7i␤Cannot add tokens of category 'ternary'␤at /tmp/p6LhJIsk7i:1␤------> 3sub ternary:<§ §>7⏏5($, $, $) {...}␤»
13:06 timotimo we currently implement the ?? !! with a special grammar rule in the perl6 grammar
13:06 grondilu timotimo: yeah that's what I thought
13:07 grondilu though I suppose I could mix the output of a*b with a role used as a constraint for the second multiplication.
13:09 grondilu though it'd be pretty ugly, especially since I want the constraint on c depending on a.
13:09 grondilu like where c == transpose(a) for instance.
13:09 tbrowder joined #perl6
13:10 perlpilot grondilu: I think it was brrt that was saying the other day that there wasn't going to be enough pressure to make "PDL in Perl6" because why not just use PDL or NumPy or R or etc.   Whatever you're doing ... keep doing it  :)
13:11 grondilu truly it's not for linear algebra that I'm considering it, rather for my Clifford module.  But the linalg exemple makes things simpler to explain.
13:11 brrt joined #perl6
13:16 perlpilot grondilu: for that particular example, it seems like you'd want a binary op on A and M that would do transpose(A)*M*A
13:20 |meta joined #perl6
13:20 ZoffixW joined #perl6
13:21 ZoffixW m: class MyTernaryFalse {}; class MyTernaryTrue { has $.value }; sub infix:<§> { ($^a ~~ MyTernaryFalse) ?? $^b !! ($^a ~~ MyTernaryTrue) ?? $^a.value !! $^a ?? MyTernaryTrue.new(:value($^b)) !! MyTernaryFalse.new  }; say 0 § "a" § "b"; say 1 § "a" § "b"
13:21 camelia rakudo-moar ef376d: OUTPUT«b␤a␤»
13:21 skids joined #perl6
13:23 DrForr I still want to see § as a sigil for sets :)
13:23 ZoffixW .u §
13:23 yoleaux U+00A7 SECTION SIGN [Po] (§)
13:24 ZoffixW m: 1 ~~ Illegal ?? 2 !! 3; class Illegal {}
13:24 camelia rakudo-moar ef376d: OUTPUT«5===SORRY!5=== Error while compiling /tmp/vPjLothpBE␤Expected a term, but found either infix ?? or redundant prefix ?␤  (to suppress this message, please use a space like ? ?)␤at /tmp/vPjLothpBE:1␤------> 1 ~~ Illegal ??7⏏5 2 !! 3; class…»
13:24 ZoffixW ^ LTA error
13:24 ZoffixW m: (1 ~~ Illegal) ?? 2 !! 3; class Illegal {}
13:24 camelia rakudo-moar ef376d: OUTPUT«5===SORRY!5=== Error while compiling /tmp/53guuJnmev␤Illegally post-declared type:␤    Illegal used at line 1␤␤»
13:26 kyrose joined #perl6
13:26 ZoffixW m: wat ?? 2 !! 3;
13:26 camelia rakudo-moar ef376d: OUTPUT«5===SORRY!5=== Error while compiling /tmp/rz9bTxDv4M␤Expected a term, but found either infix ?? or redundant prefix ?␤  (to suppress this message, please use a space like ? ?)␤at /tmp/rz9bTxDv4M:1␤------> 3wat ??7⏏5 2 !! 3;␤»
13:26 ZoffixW m: (wat) ?? 2 !! 3;
13:26 camelia rakudo-moar ef376d: OUTPUT«5===SORRY!5=== Error while compiling /tmp/7MWXNvY9ts␤Undeclared routine:␤    wat used at line 1. Did you mean 'WHAT'?␤␤»
13:26 kyrose Hi, is this a good way to write simple perl class - http://pastebin.com/Zu42sb99
13:27 grondilu perlpilot: I don't want to introduce an other symbol.  I'd like the optimization to be invisible.
13:27 ZoffixW kyrose, that looks good to me
13:27 ZoffixW Though, I'd pic FtoF as method name
13:27 ZoffixW *CtoF
13:28 kyrose ZoffixW: thanks ^_^
13:29 ZoffixW kyrose, and you ought to make ℃ and ℉ as postfix ops :P
13:29 yqt joined #perl6
13:29 bjz_ joined #perl6
13:29 ZoffixW I had a plan to release a module like that at the back of my mind for awhile
13:30 kyrose ah
13:30 Zero_Dogg joined #perl6
13:30 timotimo ℉  ought to give a syntax error immediately
13:30 ZoffixW Why?
13:31 timotimo because, ugh, fahrenheit
13:31 timotimo please autodefenestrate if you want to use fahrenheit for anything :P
13:31 kyrose I'm happy to try to make a module now! ^^
13:32 [Coke] timotimo: hey, some of us are stuck with it. :|
13:32 Actualeyes joined #perl6
13:33 timotimo be the change i want to see in the world! ;)
13:34 ZoffixW m: sub postfix:<℃> ($c) { class :: { method to-f { $c * 9/5 + 32 } }.new }; say 100℃.to-f
13:34 camelia rakudo-moar ef376d: OUTPUT«212␤»
13:34 * geekosaur thinks both of those should produce Kelvin
13:35 DrForr Rankine FTW :)
13:36 kyrose <> <- what is that called?
13:36 ZoffixW m: sub postfix:<℃> ($c) { my $z = class :: {}.new; $z.^add_method('℉', { $c * 9/5 + 32 } ); $z }; say 100℃."℉"()
13:36 camelia rakudo-moar ef376d: OUTPUT«212␤»
13:36 gtodd joined #perl6
13:37 ZoffixW kyrose, wordspace or something like that
13:37 ZoffixW m: say <blah blah blah and more blah>.join: '|'
13:37 camelia rakudo-moar ef376d: OUTPUT«blah|blah|blah|and|more|blah␤»
13:37 RabidGravy qw
13:37 ZoffixW Saves you from typing 'blah', 'blah', 'blah', 'and', 'more', 'blah',
13:37 ZoffixW quote words
13:38 kyrose ZoffixW, oh you mean like <dog cat chicken> instead of ("dog", "cat", "chicken")?
13:39 ZoffixW right
13:39 kyrose oh, so it's more like a symbol?
13:39 kyrose and how do you use that compiler XD
13:39 kyrose *camelia bot
13:39 ZoffixW m: code to execute
13:39 camelia rakudo-moar ef376d: OUTPUT«5===SORRY!5=== Error while compiling /tmp/zXs7XKu99Z␤Undeclared routines:␤    code used at line 1␤    execute used at line 1␤    to used at line 1. Did you mean 'so', 'tc'?␤␤»
13:39 ZoffixW or m: URL to a gist
13:40 kyrose m: print "Hello world\n";
13:40 camelia rakudo-moar ef376d: OUTPUT«Hello world␤»
13:40 kyrose oh I see now
13:40 kyrose Man, I'm such a noob. I need to learn a lot!
13:40 ZoffixW kyrose, I feel the same... and I wrote my first program 16 years ago :P
13:40 DrForr So do I :)
13:41 DrForr Only 16? Wowsers.
13:41 kyrose 16 years?! You guys are perl hackers it seems.
13:42 RabidGravy I wrote my first program 38 years ago and I still haven't a clue, obviously not Perl though
13:42 DrForr I've done this (not professionally) for about 36 years myself :)
13:42 kyrose I just started 3 hours ago. :O
13:43 gtodd I am goofing around with feeds and lists/arrays to see how fast they are compared with last time I checked :)
13:43 DrForr (obviously not all Perl, but ... At least the last ~20 years.)
13:44 ZoffixW Sheesh, the argument for Fahreinheit over Celcius is so flimsy http://www.zmescience.com/other/fahrenheit-vs-celsius-did-the-u-s-get-it-right-after-all/
13:44 kyrose and you guys still loyal to it by being here.
13:44 ZoffixW The author obviously never seen a decimal point.
13:44 gtodd some of the "tests" (not really) might have been from pre GLR ...  so this is now an error  perl6 -e 'my @arr := "/usr/share/dict/web2".IO.slurp.lines(:eager); @arr ==> grep({m/<<zygote>>/}) ==> my $word; say $word'
13:44 gtodd "expected Positional but got Seq"
13:44 ZoffixW kyrose, I'm not loyal :) I use it 'cause I like it and I'll be gone the second something better comes along.
13:45 gtodd and this works:  perl6 -e 'my @arr = "/usr/share/dict/web2".IO.slurp.lines(:eager); @arr ==> grep({m/<<zygote>>/}) ==> my $word; say $word
13:45 wamba joined #perl6
13:45 kyrose ZoffixW: :)
13:45 kyrose oh oh, I tried this but doesn't work. hold on
13:46 tony-o i like celsius, that's one of the few measurements i like from the metric system
13:46 gtodd I'm assuming that why I needed :=   (vs.  =  in current perl6) is "something about GLR, just forget this and move on"
13:46 pmurias joined #perl6
13:46 kyrose m: perl -e 'my $x = 0; while ($x <= 100) { print "The [$x]\n"; $x++}'
13:46 camelia rakudo-moar ef376d: OUTPUT«5===SORRY!5=== Error while compiling /tmp/pCKRwKkOA_␤Two terms in a row␤at /tmp/pCKRwKkOA_:1␤------> 3perl -e7⏏5 'my $x = 0; while ($x <= 100) { print "␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤   …»
13:47 ZoffixW m: my $x = 0; while ($x <= 100) { print "The [$x]\n"; $x++}
13:47 camelia rakudo-moar ef376d: OUTPUT«The [0]␤The [1]␤The [2]␤The [3]␤The [4]␤The [5]␤The [6]␤The [7]␤The [8]␤The [9]␤The [10]␤The [11]␤The [12]␤The [13]␤The [14]␤The [15]␤The [16]␤The [17]␤The [18]␤The [19]␤The [20]␤The [21]␤The [22]␤The [23]␤Th…»
13:47 ZoffixW Seems to work fine for me
13:47 kyrose whot, hmm
13:48 ZoffixW m: "The [$x]".say for ^100
13:48 camelia rakudo-moar ef376d: OUTPUT«5===SORRY!5=== Error while compiling /tmp/PATZXYY1Dv␤Variable '$x' is not declared␤at /tmp/PATZXYY1Dv:1␤------> 3"The [7⏏5$x]".say for ^100␤»
13:48 ZoffixW m: "The [$_]".say for ^100
13:48 camelia rakudo-moar ef376d: OUTPUT«The [0]␤The [1]␤The [2]␤The [3]␤The [4]␤The [5]␤The [6]␤The [7]␤The [8]␤The [9]␤The [10]␤The [11]␤The [12]␤The [13]␤The [14]␤The [15]␤The [16]␤The [17]␤The [18]␤The [19]␤The [20]␤The [21]␤The [22]␤The [23]␤Th…»
13:48 kyrose wow, there's more than one way to do it.
13:49 gtodd anyway the above used to take 44 seconds and now only takes 29 :-)
13:49 ZoffixW That's the Perl moto
13:49 timotimo what? for just 100 ints? :o
13:50 gtodd and time perl6 -e 'say "/usr/share/dict/web2".IO.slurp.lines(:eager).grep("zygote");'   used to take 61 seconds and now only takes 0.87 seconds
13:50 timotimo oh
13:50 ZoffixW gtodd, is your rakudo older than two hours?
13:50 gtodd heheh
13:50 ZoffixW ?
13:50 kyrose ZoffixW: yeah, forgot the philosophy of Perl XD
13:50 gtodd the old results were from 9 months ago I think
13:50 ZoffixW I think jnthn++ pushed a whole bunch of performance fixes 2 hours ago is why I ask
13:51 gtodd Zoffix rakudo from about an hour ago
13:51 gtodd ZoffixW: I was just taking a walk down memory/performance lane ...
13:51 darutoko joined #perl6
13:56 gtodd ZoffixW: there was a "naïve benchmark" I'd always try:   http://www.perlmonks.org/?node_id=1099617
13:58 ptolemarch joined #perl6
13:59 ZoffixW Calling it naive is giving it too much credit :P
13:59 gtodd ZoffixW:  the difference is still large but on my system I think perl5 is around 0.5 second and perl6 is around 20 seconds on a log file with 500k+ lines so massive speed up by perl6
13:59 ZoffixW Which perl5 version?
14:00 gtodd ZoffixW: well you'd have to write it differently now anyway  doesn't  ~~ m/ /  give an error in perl6 ?
14:00 gtodd perl5 is 5.22 I think
14:00 gtodd yes
14:00 ZoffixW m: say 'foo' ~~ m/'f'/
14:00 camelia rakudo-moar ef376d: OUTPUT«「f」␤»
14:02 DrForr 5.24.0 is current.
14:03 gtodd hrrm yes:  as written on the perlmonks node   perl6 -n -e 'say $0 if ~~ m/(<<\w**5>>)/'   logs.txt gives me an error about terms
14:04 perlpilot "if ~~ m//"  doesn't make any sense
14:05 zakharyas joined #perl6
14:05 gtodd yeah I guess it used to work anyhway I changed it to:   if m//
14:06 gtodd heheh look away :)     perl6 -n -e 'say $/.Str if /(<<\w**5>>)/' logs.txt
14:06 gtodd anyway that node is notorious :)
14:06 gtodd grrr
14:09 perlpilot why does the P6 put the word boundaries within the parens, but the P5 puts them outside?
14:11 cdg joined #perl6
14:12 perlpilot time perl -n -E 'say $1 if /\b(\w{5})\b/;' /usr/share/dict/words >/dev/null  --> real0m0.296s
14:12 perlpilot time perl6 -n -e 'say ~$0 if m/<< (\w**5) >>/;' /usr/share/dict/words >/dev/null  --> real0m56.632s
14:19 gtodd perlpilot:  time perl6 -n -e 'say $/.Str if m/<<\w**5>>/;' /usr/share/dict/web2   ....  works without the parens and is faster  for me so I don't know :-D
14:19 kyrose I don't know why, but class for perl 6 really make my eye seeing perl code easier. I can track where object and output goes now.
14:21 RabidGravy yeah
14:21 gtodd perlpilot:  although still 25 seconds versus 0.24
14:28 kyrose Okay. I gtg. Bye!
14:28 kyrose left #perl6
14:32 gtodd perlpilot: anyway I think the word boundary stuff in perl5 is more part of the regex "sub language"  ??    with perl6 there is a :P5  modifier for matching using the RE syntax ... it slows things down a bit AFAICT
14:37 kanishka joined #perl6
14:40 cosimo joined #perl6
14:41 kyrose joined #perl6
14:43 kyrose Hi, I see there are Int, Str, but is there Float? Or how to make like 'my Float $e = 90.2; say $e;'
14:43 timotimo we have Num for that
14:44 timotimo but when you write 90.2 you get a Rat instead
14:44 kyrose oh
14:44 kyrose thanks
14:45 sena_kun joined #perl6
14:45 perlpilot kyrose: you really want to use Rat if you can.
14:46 kyrose I'll see what I can do perlpilot
14:46 ZoffixW There's Numeric too, if you don't care what type of number it is
14:46 ZoffixW Or you can omit a type entirely. Gradual Typing, baby <3
14:47 sena_kun hi, folks. Please, check out new PR to ecosystem.
14:47 ZoffixW http://perl6.party/post/Perl-6-Types--Made-for-Humans
14:47 dalek ecosystem: 927ec76 | Altai-man++ | META.list:
14:47 dalek ecosystem: Add WWW::DuckDuckGo to the ecosystem
14:47 dalek ecosystem: See https://github.com/Altai-man/p6-WWW-DuckDuckGo
14:47 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/927ec768ce
14:47 dalek ecosystem: 1b73f40 | (Zoffix Znet)++ | META.list:
14:47 dalek ecosystem: Merge pull request #214 from Altai-man/master
14:47 dalek ecosystem:
14:47 dalek ecosystem: Add WWW::DuckDuckGo to the ecosystem
14:47 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/1b73f402bf
14:47 sena_kun thanks.
14:47 perlpilot heh, ZoffixW++  you're too fast.
14:48 perlpilot As I was looking at it, the PR changed before my eyes as if by magic  ;)
14:48 ZoffixW :)
14:48 gregf_ /aws
14:49 gregf_ :/ sorry
14:51 kyrose m: my $tenth = 1/10; say $tenth.WHAT;
14:51 camelia rakudo-moar ef376d: OUTPUT«(Rat)␤»
14:52 timotimo m: say 0.1e0.WHAT
14:52 camelia rakudo-moar ef376d: OUTPUT«(Num)␤»
14:52 kyrose weird..my rakudo didn't compile above code with perl -e
14:52 [Coke] jezu, I'm coming up on 40 years here.
14:52 ZoffixW m: my $tenth = 1/10; say $tenth.nude;
14:52 camelia rakudo-moar ef376d: OUTPUT«(1 10)␤»
14:52 timotimo well, yeah, you need perl6 -e instead :)
14:53 [Coke] (in time from first program from backscroll)
14:54 kyrose well, yeah, you need perl6 -e instead :), I just realized I use perl5. Thanks Errgh. (annoying when 2 version of perl installed in the same machine)
14:54 ZoffixW kyrose, use camelia via /msg instead of perl6 -e '...'
14:54 ZoffixW /msg camelia m: 'blah'
14:55 kyrose thanks for that info
14:55 ZoffixW kyrose, for scripts, some folks like to plop `use v6` at the start that cries when you run the script with the wrong perl
14:55 kyrose so do i need to include that even for one liner?
14:55 RabidGravy and indeed modules
14:55 RabidGravy no, it's not required
14:56 * ZoffixW never uses it
14:56 kyrose ^^
15:02 kurahaupo joined #perl6
15:12 RabidGravy I think I've broken my brane trying to reconcile http://martinfowler.com/apsupp/recurring.pdf and rrules from https://www.rfc-editor.org/rfc/rfc5545.txt
15:14 ZoffixW that looks scary :)
15:14 ZoffixW 172 pages... like a small novel
15:15 geekosaur horror story, probably
15:15 pmurias joined #perl6
15:28 atje joined #perl6
15:28 _mg_ joined #perl6
15:30 titsuki Hi all. I have a question. Is the behavior that the submethod doesn't check its name of the arguments a bug ?
15:30 titsuki m: class A { multi submethod BUILD(:%hash) { "hash".say; }; multi submethod(:$text) { "text".say; }; multi submethod BUILD(:@array) { "array".say; }; }; A.new(text => "10");
15:30 camelia rakudo-moar 4a2929: OUTPUT«hash␤»
15:31 titsuki I think that it should say "text".
15:32 timotimo hah
15:32 timotimo you have a method called "submethod" there
15:32 timotimo you may want a multi submethod called "BUILD" instead
15:33 titsuki class A { multi submethod BUILD(:%hash) { "hash".say; }; multi submethod BUILD(:$text) { "text".say; }; multi su
15:33 titsuki bmethod BUILD(:@array) { "array".say; }; }; A.new(text => "10");
15:33 titsuki class A { multi submethod BUILD(:%hash) { "hash".say; }; multi submethod BUILD(:$text) { "text".say; }; multi submethod BUILD(:@array) { "array".say; }; }; A.new(text => "10");
15:33 titsuki sorry
15:34 titsuki m: class A { multi submethod BUILD(:%hash) { "hash".say; }; multi submethod BUILD(:$text) { "text".say; }; multi submethod BUILD(:@array) { "array".say; }; }; A.new(text => "10");
15:34 camelia rakudo-moar 4a2929: OUTPUT«hash␤»
15:34 titsuki it still says "hash"
15:34 Xliff titsuki: You are getting a hash because that's what you are passing.
15:34 Xliff m: class A { multi submethod BUILD(:%hash) { "hash".say; }; multi submethod BUILD(:$text) { "text".say; }; multi submethod BUILD(:@array) { "array".say; }; }; A.new(:text("10"));
15:34 camelia rakudo-moar 4a2929: OUTPUT«hash␤»
15:35 Xliff Technically named parameters are hashes.
15:35 timotimo um, only if you slurp it
15:35 psch m: class A { multi submethod BUILD(:$text) { "text".say; }; multi submethod BUILD(:%hash) { "hash".say; }; multi submethod BUILD(:@array) { "array".say; }; }; A.new(:text("10"));
15:35 camelia rakudo-moar 4a2929: OUTPUT«text␤»
15:35 psch order of declaration
15:35 Xliff psch++
15:35 ugexe it because you need to mark them required, named arguments are optional
15:35 ZoffixW :o
15:36 ZoffixW I didn't know order of declaration mattered.
15:36 psch it does for nameds, and optionals in general i think too
15:36 jnthn For tie-breaking, yes, and named parameters only ever act as tie-breakers in multi dispatch
15:36 ZoffixW m: class A { multi submethod BUILD(:%hash!) { "hash".say; }; multi submethod BUILD(:$text!) { "text".say; }; multi submethod BUILD(:@array) { "array".say; }; }; A.new(:10text);
15:36 camelia rakudo-moar 4a2929: OUTPUT«text␤»
15:36 ZoffixW ugexe++
15:37 psch ah, right, it's actually just for tie-breaking.  not related to the parameter type
15:37 titsuki ugexe: I see. Thanks !
15:37 Xliff I get confused with the (:(val)name) passing method.
15:37 psch m: say :("foo")bar # ?
15:37 camelia rakudo-moar 4a2929: OUTPUT«5===SORRY!5=== Error while compiling /tmp/oh_N8OS3HN␤Two terms in a row␤at /tmp/oh_N8OS3HN:1␤------> 3say :("foo")7⏏5bar # ?␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        statement end␤       …»
15:38 psch Xliff: not sure what you mean, no such form exists :)
15:38 Xliff In named parameter passing. Look at Zoffy's last example. Particularly the last statement.
15:38 ZoffixW :4242foo
15:38 kaare__ joined #perl6
15:38 ZoffixW Xliff, if it's digits only, you can write it first and avoid parens
15:38 psch right, but that's explicitly only [ <colon> <numeric> <ident> ]
15:38 Xliff ZoffixW, I prefer :foo(4242)
15:39 ZoffixW too many parens for my taste :)
15:39 Xliff LOL
15:39 Xliff I understand that. Really.
15:39 ZoffixW m: say :١١١foo
15:39 camelia rakudo-moar 4a2929: OUTPUT«===SORRY!===␤Error encoding ASCII string: could not encode codepoint 1633␤»
15:39 Xliff Except I have a higher tolerance. Now anything LISPy.... that is Too Many Parens.
15:39 ZoffixW 0.o
15:40 psch .u circled ten
15:40 yoleaux U+2469 CIRCLED NUMBER TEN [No] (⑩)
15:40 yoleaux U+24FE DOUBLE CIRCLED NUMBER TEN [No] (⓾)
15:40 yoleaux U+277F DINGBAT NEGATIVE CIRCLED NUMBER TEN [No] (❿)
15:40 ZoffixW m: say % = :١١١foo
15:40 camelia rakudo-moar 4a2929: OUTPUT«===SORRY!===␤Error encoding ASCII string: could not encode codepoint 1633␤»
15:40 psch m: say :⑩foo
15:40 camelia rakudo-moar 4a2929: OUTPUT«5===SORRY!5===␤Argument to "say" seems to be malformed␤at /tmp/5V8oziV1za:1␤------> 3say7⏏5 :⑩foo␤Confused␤at /tmp/5V8oziV1za:1␤------> 3say :7⏏5⑩foo␤    expecting any of:␤        colon pair␤Other potential difficultie…»
15:40 ZoffixW .u ١
15:40 yoleaux U+0661 ARABIC-INDIC DIGIT ONE [Nd] (١)
15:40 psch $<num> = [\d+] <identifier>
15:40 psch is the actual part of the rule
15:41 psch m: say "١" ~~ /\d/
15:41 camelia rakudo-moar 4a2929: OUTPUT«「١」␤»
15:41 psch nqp-m: say "١" ~~ /\d/
15:41 camelia nqp-moarvm: OUTPUT«Confused at line 2, near "say \"١\" ~~"␤   at gen/moar/stage2/NQPHLL.nqp:706  (/home/camelia/rakudo-m-inst-1/share/nqp/lib/NQPHLL.moarvm:panic)␤ from gen/moar/stage2/NQP.nqp:927  (/home/camelia/rakudo-m-inst-1/share/nqp/lib/nqp.moarvm:comp_unit)␤ from gen/m…»
15:41 psch nqp-m: say( "١" ~~ /\d/ )
15:41 camelia nqp-moarvm: OUTPUT«١␤»
15:41 psch still, that's a bit curious
15:41 ZoffixW What's nqp-m?
15:41 psch nqp-moar
15:41 timotimo it's the nqp compiler for moarvm
15:41 ZoffixW Just nqp, with no rakudo on top?
15:42 psch exactly
15:42 timotimo correct
15:42 timotimo just like what we use to build rakudo
15:42 khw joined #perl6
15:43 ZoffixW reported it: https://rt.perl.org/Ticket/Display.html?id=128306
15:44 ZoffixW nqp-m: say("١" ~~ /\d/)
15:44 camelia nqp-moarvm: OUTPUT«١␤»
15:49 psch oh, i see why that's broken
15:49 ZoffixW Why? :)
15:50 psch nqp-m: say +"١"
15:50 camelia nqp-moarvm: OUTPUT«Error encoding ASCII string: could not encode codepoint 1633␤   at /tmp/dr08X0vIo6:1  (<ephemeral file>:<mainline>)␤ from gen/moar/stage2/NQPHLL.nqp:1505  (/home/camelia/rakudo-m-inst-1/share/nqp/lib/NQPHLL.moarvm:eval)␤ from gen/moar/stage2/NQPHLL.nqp:1708 …»
15:50 psch because nqp doesn't convert that properly to a numeric type
15:51 psch the moar fix would be in MoarVM/src/core/coerce.c i suppose
15:52 psch 'cause i don't think we want to have coerce logic in nqp itself
15:52 psch i suppose moar already should have access to the necessary unival pieces
15:53 psch m: say +"١"
15:53 camelia rakudo-moar 4a2929: OUTPUT«1␤»
15:54 psch yeah, line 251, we have to reach into whatever exactly sits behind unival when the ascii decode fails and see if we get a value there
15:55 ZoffixW m: use Test foo => 'bar', 42
15:55 camelia rakudo-moar 4a2929: OUTPUT«5===SORRY!5=== Error while compiling /tmp/_exhwyVr8D␤Error while importing from 'Test': no such tag 'foo'␤at /tmp/_exhwyVr8D:1␤------> 3use Test foo => 'bar', 427⏏5<EOL>␤»
15:55 ZoffixW m: use Test [foo => 'bar', 42]
15:55 camelia rakudo-moar 4a2929: OUTPUT«5===SORRY!5=== Error while compiling /tmp/ON6L3MG2vY␤Error while importing from 'Test': no such tag 'foo'␤at /tmp/ON6L3MG2vY:1␤------> 3use Test [foo => 'bar', 42]7⏏5<EOL>␤»
15:55 psch not sure how we do that in moar though.  in nqp-j i'd put a try/catch... :)
15:55 ZoffixW No easy way to pass a list of Pair|Str into sub EXPORT, is there?
15:56 wamba joined #perl6
15:57 ZoffixW m: use Test @(foo => 'bar', 42)
15:57 camelia rakudo-moar 4a2929: OUTPUT«===SORRY!===␤Cannot invoke this object (REPR: Null; VMNull)␤»
15:57 ZoffixW :(
15:57 ssotka joined #perl6
15:58 nine m: use Test ("foo" => 'bar', 42)
15:58 camelia rakudo-moar 4a2929: OUTPUT«5===SORRY!5=== Error while compiling /tmp/NViUsnsn6g␤Error while importing from 'Test': no such tag 'foo'␤at /tmp/NViUsnsn6g:1␤------> 3use Test ("foo" => 'bar', 42)7⏏5<EOL>␤»
16:01 ZoffixW m: use Test [[[42, "foo" => 'bar']]]
16:01 camelia rakudo-moar 4a2929: OUTPUT«5===SORRY!5=== Error while compiling /tmp/P8gJS1_7xO␤Error while importing from 'Test': no such tag 'foo'␤at /tmp/P8gJS1_7xO:1␤------> 3use Test [[[42, "foo" => 'bar']]]7⏏5<EOL>␤»
16:01 ZoffixW ~_~
16:02 ZoffixW m: use Test 42, ['foo' => 'bar']
16:02 camelia rakudo-moar 4a2929: OUTPUT«5===SORRY!5=== Error while compiling /tmp/nWa4aFG0rj␤Error while importing from 'Test':␤no EXPORT sub, but you provided positional argument in the 'use' statement␤at /tmp/nWa4aFG0rj:1␤------> 3use Test 42, ['foo' => 'bar']7⏏5<EOL>␤»
16:02 ZoffixW Well... this isn't too too bad
16:03 Yary joined #perl6
16:04 ZoffixW or use Test 42, <foo bar>
16:04 Yary Is there a way to make a "private subclass" such that only the parent class can "see", instantiate an object of that subclass?
16:04 Xliff RabidGravy, are you working on some kind of Scheduler or Events Calendar?
16:04 Xliff (RFCs seem designed to hurt branes, tho)
16:05 psch m: class A { my class B { }; method getB { B.new } }; say A.getB.WHAT; try say A::B.new; say $!.perl
16:05 camelia rakudo-moar 4a2929: OUTPUT«(B)␤X::AdHoc.new(payload => "Could not find symbol '\&B'")␤»
16:05 psch Yary: ^^^ like that?
16:05 Yary perfect! Yes & I was just trying the same thing here :-)
16:05 domidumont joined #perl6
16:06 Yary scoping works
16:07 RabidGravy Xliff, yeah part of the requirement for Emitria6 (or whatever I end up calling it,) I already made Chronic to dip my toe in the water but need "every two weeks at the same wall-clock time" and friends
16:09 Xliff And what is Emitria6, again? =)
16:09 ZoffixW *sigh* this is royally annoying. Was going to write a quickie module, but struggling with damn arg passing to EXPORT
16:09 ZoffixW m: sub (*@args) { say @args.elems }( 42, <foo bar> )
16:09 camelia rakudo-moar 4a2929: OUTPUT«3␤»
16:09 ZoffixW ^ is there a way to make <foo bar> go in as one el and not be broken into two?
16:09 Xliff m: sub (*@args) { say @args.elems }( 42, [<foo bar>] )
16:09 camelia rakudo-moar 4a2929: OUTPUT«3␤»
16:09 psch m: sub (*@args) { say @args.elems }( 42, $(<foo bar>) )
16:09 Xliff Hrm.
16:09 camelia rakudo-moar 4a2929: OUTPUT«2␤»
16:09 RabidGravy Xliff, I plan to finish https://github.com/jonathanstowe/Emitria in P6 rather than 5
16:10 Xliff Ooh! Nice!
16:10 ZoffixW psch, is that a least ugly way? the "42, <foo bar>" is user-facing :/
16:10 psch ZoffixW: well, $<> doesn't work cause that's looking into $/
16:11 jnthn m: sub (**@args) { say @args.elems }( 42, <foo bar> )
16:11 camelia rakudo-moar 4a2929: OUTPUT«2␤»
16:11 psch jnthn++
16:11 ZoffixW jnthn++
16:11 Xliff jnthn++
16:11 Xliff But...but.... **!
16:11 Xliff Where can I find docs on that?
16:11 psch http://doc.perl6.org/type/Signature#Slurpy_(A.K.A._Variadic)_Parameters
16:12 Xliff \o/
16:12 Xliff psch++
16:13 Xliff OK. I need to find a book for doctor visit.
16:13 Xliff \o
16:13 timotimo psch, um, not sure we want +"silly-unicode-numeral-here" to Just Work
16:13 psch timotimo: but it already does work?
16:13 timotimo it ... does?
16:13 psch timotimo: well, unless you mean in nqp of course
16:13 psch .u circled ten
16:13 yoleaux U+2469 CIRCLED NUMBER TEN [No] (⑩)
16:13 yoleaux U+24FE DOUBLE CIRCLED NUMBER TEN [No] (⓾)
16:13 yoleaux U+277F DINGBAT NEGATIVE CIRCLED NUMBER TEN [No] (❿)
16:14 psch m: say +"⑩"
16:14 camelia rakudo-moar 4a2929: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5⑩' (indicated by ⏏)␤  in block <unit> at /tmp/UDHu5B1g9b line 1␤␤Actually thrown at:␤  in block <unit> at /tmp/UDHu5B1g9b line 1␤␤»
16:14 psch ah, that one doesn't
16:14 psch the arabic did
16:14 psch .u arabic numeral one
16:14 yoleaux No characters found
16:14 psch m: say +"١"
16:14 camelia rakudo-moar 4a2929: OUTPUT«1␤»
16:14 timotimo :o
16:14 timotimo i did not know that
16:14 psch timotimo: i'd totally agree on circled ten or such
16:14 psch but that one seems fine
16:15 ptolemarch joined #perl6
16:17 Yary for funny number discussion, see http://www.nntp.perl.org/group/perl.perl6.language/2016/05/msg36616.html
16:17 Yary especially http://www.nntp.perl.org/group/perl.perl6.language/2016/05/msg36618.html
16:17 timotimo that's about identifiers, not string content
16:17 timotimo identifiers and terms, that is
16:18 Yary well, once you numify a string... ok they are different
16:18 setty1 joined #perl6
16:19 Yary For the sake of consistency I'd expect "Nd" unicode to evaluate to the same number quoted or unquoted
16:19 ZoffixW m: "⑩" + 0
16:19 camelia rakudo-moar 4a2929: OUTPUT«WARNINGS for /tmp/5jJ6KTP9fb:␤Useless use of "+" in expression "\"⑩\" + 0" in sink context (line 1)␤Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5⑩' (indicated by ⏏)␤  in block <unit> at /tmp/5j…»
16:19 ZoffixW m: say "⑩" + 0
16:19 camelia rakudo-moar 4a2929: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5⑩' (indicated by ⏏)␤  in block <unit> at /tmp/zaVgbbXxcD line 1␤␤Actually thrown at:␤  in block <unit> at /tmp/zaVgbbXxcD line 1␤␤»
16:20 ZoffixW lizmat, I thought you made these work awhile back? ^
16:20 Yary m: +"६೬𝟨"
16:20 camelia rakudo-moar 4a2929: OUTPUT«WARNINGS for /tmp/CpG1JF2Csx:␤Useless use of "+" in expression "+\"६೬𝟨\"" in sink context (line 1)␤»
16:20 Yary m:  0 +"६೬𝟨"
16:20 camelia rakudo-moar 4a2929: OUTPUT«WARNINGS for /tmp/HagNOv_Ldp:␤Useless use of "+" in expression "0 +\"६೬𝟨\"" in sink context (line 1)␤»
16:20 psch m: say +"६೬𝟨"
16:20 camelia rakudo-moar 4a2929: OUTPUT«666␤»
16:20 ZoffixW Yary, you need a say
16:20 Yary yup thx
16:21 ZoffixW .u half zero
16:21 yoleaux U+0F33 TIBETAN DIGIT HALF ZERO [No] (༳)
16:21 ZoffixW m: say +"༳"
16:21 camelia rakudo-moar 4a2929: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5༳' (indicated by ⏏)␤  in block <unit> at /tmp/f1n6lBcnp5 line 1␤␤Actually thrown at:␤  in block <unit> at /tmp/f1n6lBcnp5 line 1␤␤»
16:21 psch m: say ༳
16:21 camelia rakudo-moar 4a2929: OUTPUT«-0.5␤»
16:21 ZoffixW I think maybe the fix was abandoned due to fractions. There's an RT somewhere on this topic though
16:22 stmuk_ joined #perl6
16:24 ZoffixW m: sub (**@args where {(.all ~~ Str) or (.all ~~ List)}) { }( 'foo', <foo bar> )
16:24 camelia rakudo-moar 4a2929: OUTPUT«Constraint type check failed for parameter '@args'␤  in sub  at /tmp/pPF8WLQGNJ line 1␤  in block <unit> at /tmp/pPF8WLQGNJ line 1␤␤»
16:24 ZoffixW What is its problem now? ~_~
16:25 ZoffixW Oh
16:25 ZoffixW Never mind
16:26 ZoffixW m: sub (**@args where {not .grep: {$_ !~~ Str|List} }) { }( 'foo', <foo bar> )
16:26 camelia rakudo-moar 4a2929: ( no output )
16:26 ZoffixW m: sub (**@args where {not .grep: {$_ !~~ Str|List} }) { }( 'foo', <foo bar>, 42 )
16:26 camelia rakudo-moar 4a2929: OUTPUT«Constraint type check failed for parameter '@args'␤  in sub  at /tmp/gRIwxo2pM9 line 1␤  in block <unit> at /tmp/gRIwxo2pM9 line 1␤␤»
16:28 psch m: sub (**@args where .none !~~ Str|List) { }( 'foo', <foo bar> )
16:28 camelia rakudo-moar 4a2929: ( no output )
16:28 psch m: sub (**@args where .none !~~ Str|List) { }( 'foo', <foo bar>, 42 )
16:28 camelia rakudo-moar 4a2929: ( no output )
16:28 ZoffixW Smartmatch on two junctions
16:28 psch huh, does that do something other than i assumed?
16:28 psch m: say 1|2 ~~ Int|Str
16:28 camelia rakudo-moar 4a2929: OUTPUT«True␤»
16:29 psch m: say 1|2 ~~ Num|Str
16:29 camelia rakudo-moar 4a2929: OUTPUT«False␤»
16:29 psch m: say 1|"foo" ~~ Int|Str
16:29 camelia rakudo-moar 4a2929: OUTPUT«True␤»
16:29 ZoffixW m: say 4.4|4.4 ~~ Int|Str
16:29 camelia rakudo-moar 4a2929: OUTPUT«False␤»
16:29 ZoffixW hmm
16:29 ZoffixW m: say 4|4.4 ~~ Int|Str
16:29 camelia rakudo-moar 4a2929: OUTPUT«True␤»
16:30 psch m: say 1&2 ~~ Num|Str
16:30 camelia rakudo-moar 4a2929: OUTPUT«False␤»
16:30 psch m: say 1&2 ~~ Int|Str
16:30 camelia rakudo-moar 4a2929: OUTPUT«True␤»
16:30 timotimo doesn't smart match with junctions do "strange things"?
16:30 psch m: say 1&"foo" ~~ Int&Str
16:30 camelia rakudo-moar 4a2929: OUTPUT«False␤»
16:30 timotimo m: say <1> ~~ Int&Str
16:30 camelia rakudo-moar 4a2929: OUTPUT«True␤»
16:30 ZoffixW All I recall is a conversation that .all ~~ Int|Str wasn't working because of Junction ~~ Junction, but I don't recall more than that
16:31 psch i don't know, it looks ok from here.  i rather assume i'm misunderstanding how .none and .any work together
16:31 timotimo m: say <1>&<foo> ~~ Int&Str
16:31 camelia rakudo-moar 4a2929: OUTPUT«False␤»
16:31 timotimo m: say <1>&<99> ~~ Int&Str
16:31 camelia rakudo-moar 4a2929: OUTPUT«True␤»
16:31 timotimo m: say <1>|<bbq> ~~ Int&Str
16:31 camelia rakudo-moar 4a2929: OUTPUT«True␤»
16:31 ZoffixW .oO( I need to write about Junctions.... )
16:31 psch well, throwing IntStr on top of that doesn't make it easier to see through :S
16:31 timotimo hahaha
16:32 psch m: say ('foo', $(<foo bar>), 42).none !~~ Str|List
16:32 camelia rakudo-moar 4a2929: OUTPUT«True␤»
16:32 psch m: say ('foo', $(<foo bar>), 42).none !~~ Str
16:32 camelia rakudo-moar 4a2929: OUTPUT«True␤»
16:32 psch m: say ('foo', $(<foo bar>), 42).none !~~ Nil
16:32 camelia rakudo-moar 4a2929: OUTPUT«False␤»
16:32 psch m: say ('foo', $(<foo bar>), 42).none !~~ Int
16:32 camelia rakudo-moar 4a2929: OUTPUT«True␤»
16:33 psch that seems somewhat wrong
16:33 psch m: say (1, 2, 3).none ~~ * < 2
16:33 camelia rakudo-moar 4a2929: OUTPUT«{ ... }␤»
16:33 psch m: say (1, 2, 3).none ~~ { $_ < 2 }
16:33 camelia rakudo-moar 4a2929: OUTPUT«none(True, False, False)␤»
16:33 molaf joined #perl6
16:34 ZoffixW m: say (1, 2, 3).none.List
16:34 camelia rakudo-moar 4a2929: OUTPUT«none((1), (2), (3))␤»
16:34 ZoffixW m: say (1, 2, 3).none.List[0]
16:34 camelia rakudo-moar 4a2929: OUTPUT«none(1, 2, 3)␤»
16:35 timotimo when you ().none.List, it'll distribute the .List to all elements in the Junction
16:35 timotimo if you want to get the individual values out of a junction, you're Doing It Wrong™ and you should be using sets instead
16:38 ZoffixW Seems $juncA ~~ $juncB is similar to calling for $juncB.elems { $_ ~~ $juncA }, which in turn becomes $juncB.elems -> $outer { for $juncA.elems -> $inner { $outer ~~ $inner } },
16:38 * ZoffixW feels just more confusion was added right now :)
16:39 mst ZoffixW: eh?
16:39 ZoffixW mst, I thought I was the Canadian out of the two of us :P
16:39 timotimo don't call it .elems :)
16:40 ZoffixW Well, I see my int $elems = nqp::elems($states); in the sauce so :)
16:41 timotimo yeah, but "for 10 -> $outer { ... } doesn't give you a sensible result
16:41 ZoffixW Ah, right :) My bad
16:41 ZoffixW .each
16:41 ZoffixW Do we have .each?
16:41 timotimo we don't yet have that
16:41 timotimo the specs speculate its existence, though
16:41 timotimo but i imagine calling .each on a junction will give you a junction of each-junctions
16:42 ZoffixW m: say 'foo' ? 'bar' : 'ber';
16:42 camelia rakudo-moar 4a2929: OUTPUT«5===SORRY!5=== Error while compiling /tmp/sapHdEN0fo␤Unsupported use of ? and : for the ternary conditional operator; in Perl 6 please use ?? and !!␤at /tmp/sapHdEN0fo:1␤------> 3say 'foo' ?7⏏5 'bar' : 'ber';␤»
16:42 ZoffixW Is this actually a fatal error?
16:43 ZoffixW Damn. My dream of creating a 'customary' ternary in Perl 6 has been crushed right when I was about to taste the sweetness of accomplishing it.
16:43 ZoffixW m: sub infix:<?> { $^a < $^b }; sub infix:<:> { $^a < $^b }; say 1 ? 'foo' : 'ber';
16:43 camelia rakudo-moar 4a2929: OUTPUT«5===SORRY!5=== Error while compiling /tmp/WGMQbRoXjF␤Unsupported use of ? and : for the ternary conditional operator; in Perl 6 please use ?? and !!␤at /tmp/WGMQbRoXjF:1␤------> 3 }; sub infix:<:> { $^a < $^b }; say 1 ?7⏏5 'foo' : 'ber';␤»
16:43 ZoffixW ^ that is broken in my book
16:43 ZoffixW And not only because it's preventing me to create a customary ternary :)... I don't think
16:44 psch ZoffixW: you can write a Slang to get around that
16:44 psch ZoffixW: but it's a hard parser rule
16:44 ZoffixW I don't know Slangs :(
16:44 psch which means you have to change the parser to allow it
16:44 psch Slang::Tuxic is fairly approachable i'd say
16:44 ZoffixW psch, by "hard" you mean difficult?
16:44 psch ZoffixW: no, i mean hard in the sense of fixed :)
16:45 ZoffixW Tuxic looks pretty scary
16:46 ZoffixW I guess not knowing grammars along with not knowing Slangs is a hindrance :P
16:46 psch well, yeah, you should know grammars to write a Slang
16:46 psch considering a Slang is a partial overwrite of Perl6::Grammar :S
16:47 ZoffixW Do we have any decent docs on them? Other than http://docs.perl6.org/language/grammars, which is super basic
16:48 psch the only thing i see missing there is proto regexes
16:48 timotimo and it's not a documentation on slangs :)
16:48 psch ah, no, that's actions down there...
16:49 psch ZoffixW: http://docs.perl6.org/type/Grammar has a bit more
16:49 ZoffixW Really? The Grammars I've seen seem miles more complex than what's described in that doc. Like wtf is .add_mystery here and $pos and $/.CURSOR stuff two lines above: https://github.com/FROGGS/p6-Slang-Tuxic/blob/master/lib/Slang/Tuxic.pm#L23
16:49 timotimo hehe.
16:50 timotimo well, $/.CURSOR is just long for $¢
16:50 timotimo does that help? :D
16:50 ZoffixW The last thing that code needs is adding mystery :P
16:50 psch ZoffixW: that's Perl6::Grammar internals that we unfortunately have to expose because no one has tuits or a plan for a good user-facing Slang interface
16:50 ZoffixW psch, are there docs for Perl6::Grammar internals?
16:50 psch ZoffixW: there's a few comments... :)
16:51 ZoffixW heh
16:51 * ZoffixW will try to read that later
16:51 psch you'll probably also want to at least glance at nqp/HLL::Grammar
16:51 ZoffixW Thanks. Will do
16:51 psch but in general i found that --target=parse with a snippet that you want to understand and following the tokens through Perl6::Grammar is a good start
16:52 psch there's not many spots where that isn't enough - one of them is EXPR :P
16:54 ZoffixW m: sub infix:<?> { $^a < $^b }; say 1 ? 5
16:54 camelia rakudo-moar 4a2929: OUTPUT«5===SORRY!5=== Error while compiling /tmp/1HNIQNZ4WV␤Confused␤at /tmp/1HNIQNZ4WV:1␤------> 3sub infix:<?> { $^a < $^b }; say 17⏏5 ? 5␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        statement end…»
17:03 RabidGravy If anyone is into in making short examples then working through https://en.wikibooks.org/wiki/Computer_Science_Design_Patterns might be fun
17:06 aries_liuxueyang joined #perl6
17:14 ZoffixW m: sub infix:«xx» is assoc<left> { $^a - $^b }; sub infix:<xxx> is assoc<left> { $^a + $^b }; say 1 xx 5 xxx 6
17:14 camelia rakudo-moar 4a2929: OUTPUT«-10␤»
17:14 ZoffixW Shouldn't this produce 2 ?
17:14 firstdayonthejob joined #perl6
17:16 psch m: sub infix:«xxxx»  { $^a - $^b }; sub infix:<xxx>  { $^a + $^b }; say 1 xxxx 5 xxx 6
17:16 camelia rakudo-moar 4a2929: OUTPUT«2␤»
17:16 psch i guess you're stepping on the CORE xx somehow
17:16 ZoffixW Ah. thanks
17:17 ZoffixW ummm...
17:17 psch m: sub infix:«xxxx» is assoc<left> { $^a - $^b }; sub infix:<xxx> is assoc<left> { $^a + $^b }; say 1 xxxx 5 xxx 6
17:17 camelia rakudo-moar 4a2929: OUTPUT«2␤»
17:17 psch just to verify left is actually the default associativity :)
17:17 ZoffixW m: sub infix:«<» { say 'first'; $^a - $^b }; sub infix:<»> { say 'second'; $^a + $^b }; say 1 < 5 » 6
17:17 camelia rakudo-moar 4a2929: OUTPUT«second␤first␤-10␤»
17:17 ZoffixW Is this now because I'm stepping on core '<' ?
17:18 psch i'd assume so, yeah
17:18 ZoffixW That has the aroma of a nice, juicy bug stew
17:19 psch m: sub infix:«<» is looser(&infix:«<») { say 'first'; $^a - $^b }; say 1 < 2 < 3
17:19 camelia rakudo-moar 4a2929: OUTPUT«5===SORRY!5=== Error while compiling /tmp/ShXEns1VME␤Routine given to looser does not appear to be an operator␤at /tmp/ShXEns1VME:1␤»
17:19 ZoffixW wat
17:20 psch m: sub infix:«<» is looser('&infix:«<»') { say 'first'; $^a - $^b }; say 1 < 2 < 3
17:20 camelia rakudo-moar 4a2929: OUTPUT«5===SORRY!5=== Error while compiling /tmp/fOyQ76h9zM␤Can't use unknown trait 'is looser' in a sub declaration.␤at /tmp/fOyQ76h9zM:1␤    expecting any of:␤        rw raw hidden-from-backtrace hidden-from-USAGE␤        pure default DEPRECATED i…»
17:20 ZoffixW 0.0
17:20 ZoffixW m: sub prefix:<∑> (*@els) is looser(&infix:<,>) { @els.sum }; say ∑ 1, 2, 3, 4;
17:20 camelia rakudo-moar 4a2929: OUTPUT«10␤»
17:21 psch m: sub infix:«<»($a, $b) is tighter('&infix:«<»') { say 'first'; $a - $b }; say 1 < 2 < 3
17:21 camelia rakudo-moar 4a2929: OUTPUT«5===SORRY!5=== Error while compiling /tmp/HiEWTCAvLR␤Can't use unknown trait 'is tighter' in a sub declaration.␤at /tmp/HiEWTCAvLR:1␤    expecting any of:␤        rw raw hidden-from-backtrace hidden-from-USAGE␤        pure default DEPRECATED …»
17:21 timotimo ZoffixW: the error is b0rked. it complains because there's no match with a String
17:21 psch m: sub infix:«<»($a, $b) is tighter(&infix:«<») { say 'first'; $a - $b }; say 1 < 2 < 3
17:21 camelia rakudo-moar 4a2929: OUTPUT«5===SORRY!5=== Error while compiling /tmp/8tRUVeoPLO␤Routine given to tighter does not appear to be an operator␤at /tmp/8tRUVeoPLO:1␤»
17:21 ZoffixW m: sub prefix:«∑» (*@els) is looser(&infix:<,>) { @els.sum }; say ∑ 1, 2, 3, 4;
17:21 camelia rakudo-moar 4a2929: OUTPUT«10␤»
17:21 psch multi sub trait_mod:<is>(Routine $r, Str :$looser!) {
17:21 ZoffixW timotimo, where in Junction stuff?
17:21 psch is the decl in operators.pm
17:22 timotimo uh?
17:22 timotimo no, "is looser" i mean
17:22 timotimo oh, huh?
17:22 timotimo that's weird.
17:22 timotimo anyway, AFK
17:22 psch :D
17:22 psch m: sub infix:«<»($a, $b) is tighter(&infix:«>») { say 'first'; $a - $b }; say 1 < 2 < 3
17:22 camelia rakudo-moar 4a2929: OUTPUT«5===SORRY!5=== Error while compiling /tmp/3z1w46v0ZM␤Routine given to tighter does not appear to be an operator␤at /tmp/3z1w46v0ZM:1␤»
17:23 psch well, yeah, weird :)
17:23 ZoffixW m: sub infix:«<»($a, $b) is equiv(&infix:«>») { say 'first'; $a - $b }; say 1 < 2 < 3
17:23 camelia rakudo-moar 4a2929: OUTPUT«5===SORRY!5=== Error while compiling /tmp/9q4AFR9W6w␤Routine given to equiv does not appear to be an operator␤at /tmp/9q4AFR9W6w:1␤»
17:23 psch i mean, i won't deny that i'm trying for weird... :P
17:23 ZoffixW m: multi sub infix:«+»($a, $b) is equiv(&infix:«+») { say 'first'; $a - $b }; say 1 < 2 < 3
17:23 camelia rakudo-moar 4a2929: OUTPUT«True␤»
17:23 ZoffixW m: multi sub infix:«<»($a, $b) is equiv(&infix:«<») { say 'first'; $a - $b }; say 1 < 2 < 3
17:23 camelia rakudo-moar 4a2929: OUTPUT«5===SORRY!5=== Error while compiling /tmp/_yBrqTOJyd␤Routine given to equiv does not appear to be an operator␤at /tmp/_yBrqTOJyd:1␤»
17:23 psch m: multi sub infix:«+»($a, $b) is tigher(&infix:«+») { say 'first'; $a - $b }; say 1 + 1 + 1
17:23 camelia rakudo-moar 4a2929: OUTPUT«5===SORRY!5=== Error while compiling /tmp/S06MGyzxgz␤Can't use unknown trait 'is tigher' in a sub declaration.␤at /tmp/S06MGyzxgz:1␤    expecting any of:␤        rw raw hidden-from-backtrace hidden-from-USAGE␤        pure default DEPRECATED i…»
17:23 psch m: multi sub infix:«+»($a, $b) is tighter(&infix:«+») { say 'first'; $a - $b }; say 1 + 1 + 1
17:23 camelia rakudo-moar 4a2929: OUTPUT«3␤»
17:24 psch m: sub infix:«+»($a, $b) is tighter(&infix:«+») { say 'first'; $a - $b }; say 1 + 1 + 1
17:24 camelia rakudo-moar 4a2929: OUTPUT«first␤first␤-1␤»
17:24 geekosaur didn't we determine that the infix:mumble syntax was oddly specific sometimes?
17:24 psch oh duh
17:24 geekosaur have to dig in the source to see exactly how infix > was declared
17:24 psch yeah, the looser and tigher implementations only check for foofix:<...>
17:24 psch not with the fancy french ones
17:24 psch so yeah, of course we don't find < and >
17:24 ZoffixW So it's impossibru?
17:24 geekosaur yug
17:25 psch ZoffixW: well, it has to be fixed, actually :)
17:25 geekosaur well, someone could fix looser and tighter traits
17:25 ZoffixW pfftt... some language you got here. I was promised unbound power and riches but I can't even redefine what < does!!
17:25 psch m: say &infix:('<')
17:25 camelia rakudo-moar 4a2929: OUTPUT«5===SORRY!5=== Error while compiling /tmp/BSd8fi_bm1␤You can't adverb ␤at /tmp/BSd8fi_bm1:1␤------> 3say &infix:('<')7⏏5<EOL>␤»
17:25 * ZoffixW shakes fist
17:25 psch m: say &infix:['<']
17:25 camelia rakudo-moar 4a2929: OUTPUT«sub infix:«<» (Mu $?, Mu $?) { #`(Sub+{<anon|50686624>}|63800176) ... }␤»
17:25 psch i guess that's the safest form we have
17:25 psch m: say &postcircumfix:['[', ']']
17:25 camelia rakudo-moar 4a2929: OUTPUT«sub postcircumfix:<[ ]> (| is raw) { #`(Sub+{<anon|50686896>}+{Precedence}+{<anon|50686896>}|51738848) ... }␤»
17:26 psch buuuut
17:26 psch runtime lookup
17:26 psch so eh
17:26 psch that means we have to somehow lift the current compile time code that makes the different foofix:... thingies work into runtime
17:26 psch which is a bit harder than fixing tighter and looser :/
17:29 psch probably mostly in World.canonicalize_pair, if someone feels up for that
17:29 psch i have to get myself dinner :S
17:30 jack_rabbit joined #perl6
17:30 azawawi joined #perl6
17:30 azawawi .
17:30 jnthn I suspect the issue may be that add_categorical in the grammar bails out immediately if it finds we already have the op, whereas it perhaps should check if there's a new prec/assoc defined and still go ahead and do the grammar tweak if so.
17:30 jnthn psch: ^^
17:31 jnthn So it's hopefully "just" a fix there
17:31 azawawi Can this CPU run Perl 6 http://ark.intel.com/products/94456/Intel-Core-i7-6950X-Processor-Extreme-Edition-25M-Cache-up-to-3_50-GHz ? :)
17:31 * azawawi drooling
17:31 psch jnthn: how would that help with the runtime lookup confusion with different colonpairs for foofix declarations?
17:32 psch m: say ::(q{&infix:['==']})
17:32 camelia rakudo-moar 4a2929: OUTPUT«No such symbol '&infix:['==']'␤  in block <unit> at /tmp/msXpTZEZUa line 1␤␤Actually thrown at:␤  in block <unit> at /tmp/msXpTZEZUa line 1␤␤»
17:32 psch m: say &infix:['==']
17:32 camelia rakudo-moar 4a2929: OUTPUT«sub infix:<==> (Mu $?, Mu $?) { #`(Sub+{<anon|50686624>}+{Precedence}|43371392) ... }␤»
17:32 nowan joined #perl6
17:33 jnthn psch: Oh, that's separate. I was looking at the sub infix:«<»($a, $b) is tighter(...) case :)
17:33 jnthn Or rather, that's the one I noticed :)
17:33 ZoffixW azawawi, they have a better one: http://www.pcworld.com/article/3050466/hardware/eat-your-heart-out-quad-cores-intel-just-dropped-a-22-core-cpu-on-us-boom.html
17:34 psch jnthn: that's the same issue, actually.  the Str candidates for tighter and looser use ::() to find the op
17:34 ZoffixW azawawi, and I did run P6 on a 20-core box... minute and a half spectest is nice :)
17:34 azawawi ZoffixW: cool :)
17:34 psch jnthn: well, with the Str candidates for tighter and looser it's the same issue, at least... :)
17:35 azawawi ZoffixW: most likely im buying this though i7-6800K http://ark.intel.com/products/94189/Intel-Core-i7-6800K-Processor-15M-Cache-up-to-3_60-GHz
17:35 azawawi ZoffixW: ditching AMD FX 8150 and going for Intel :)
17:36 ZoffixW nice nice
17:37 azawawi ZoffixW: a 2nd gen i5 is faster than my AMD single thread :(
17:37 jnthn psch: We have...Str candidates for tighter and looser?!
17:37 jnthn Why? :)
17:37 ZoffixW Damn, the 10-core one is actually buyable :S http://www.tigerdirect.ca/applications/category/guidedSearch.asp?CatId=22&amp;sel=Detail%3B112_1258_125490_125490
17:37 ZoffixW Now all I need is a small loan of a million dollars.
17:38 azawawi ZoffixW: Got "Notice: Order Verification Required" :)
17:38 ZoffixW heh
17:39 psch jnthn: no idea why, but it's been about 3/4th of a year, since b670517
17:39 psch m: sub infix:<~.~> is tighter<+> { }
17:39 camelia rakudo-moar 4a2929: ( no output )
17:39 psch ^^^ that form apparently
17:39 ZoffixW They even got a 14-core one, for $3,392: http://www.tigerdirect.ca/applications/SearchTools/item-details.asp?EdpNo=9348281&amp;CatId=8732
17:40 jnthn Ugh
17:43 nine azawawi: faster at what exactly? AFAIK the AMD FX have superior integer performance and are leading in compilation benchmarks.
17:44 azawawi nine: http://cpuboss.com/cpus/Intel-Core-i7-2600K-vs-AMD-FX-8150  # single core performance
17:45 azawawi nine: same http://cpuboss.com/cpus/Intel-Core-i5-2500K-vs-AMD-FX-8150
17:46 * azawawi goes back to GTK::Scintilla
17:52 stmuk_ umm that's 2nd gen Intel .. I think we are on 6th now
17:55 zhmylove joined #perl6
18:04 nine stmuk_: it's also a 5 year old AMD CPU
18:05 inokenty joined #perl6
18:06 zhmylove joined #perl6
18:07 _nadim joined #perl6
18:07 spider-mario joined #perl6
18:10 edehont joined #perl6
18:11 spider-mario joined #perl6
18:19 * RabidGravy fixes the tests for DateTime::Timezone
18:19 Akagi201 joined #perl6
18:22 dalek doc: bd2191e | (Jan-Olof Hendig)++ | doc/Language/5to6-perlfunc.pod:
18:22 dalek doc: Fixed broken link
18:22 dalek doc: review: https://github.com/perl6/doc/commit/bd2191ebd3
18:23 nadim joined #perl6
18:25 isBEKaml joined #perl6
18:27 _nadim joined #perl6
18:29 nadim joined #perl6
18:35 _nadim joined #perl6
18:36 zakharyas joined #perl6
18:40 autarch joined #perl6
18:43 dha joined #perl6
18:44 nadim joined #perl6
18:48 _nadim joined #perl6
18:48 dalek doc: e6972f2 | (Jan-Olof Hendig)++ | doc/Type/X/DateTime/TimezoneClash.pod:
18:48 dalek doc: Added docs for X::DateTime::TimezoneClash
18:48 dalek doc: review: https://github.com/perl6/doc/commit/e6972f2708
18:53 RabidGravy there
18:54 vendethiel joined #perl6
18:55 vendethiel o/ #perl6
18:57 labster joined #perl6
18:59 RabidGravy harr!
18:59 sno joined #perl6
19:03 dalek doc: 9953a9c | (Jan-Olof Hendig)++ | doc/Type/DateTime.pod:
19:03 dalek doc: Fixed typo
19:03 dalek doc: review: https://github.com/perl6/doc/commit/9953a9c01b
19:08 gnull joined #perl6
19:10 nadim joined #perl6
19:12 lizmat_ joined #perl6
19:16 nadim joined #perl6
19:17 firstdayonthejob joined #perl6
19:18 _nadim joined #perl6
19:24 nadim joined #perl6
19:26 dalek doc/makefile: 2d1a54f | coke++ | htmlify.p6:
19:26 dalek doc/makefile: git has files in this dir, no need to mkdir
19:26 dalek doc/makefile: review: https://github.com/perl6/doc/commit/2d1a54f3fa
19:32 nadim joined #perl6
19:36 nadim joined #perl6
19:38 nadim joined #perl6
19:44 gtodd joined #perl6
19:45 _nadim joined #perl6
19:46 gtodd camelia: we should be able to vote on the best snippets of the day / week / something  can you save the snippets and then we send you ++'s
19:46 gtodd camelia: I know you are a bot ... but you're a perl6 bot so ...
19:47 ZoffixW joined #perl6
19:47 ZoffixW She's not a Perl 6 bot tho :P
19:47 gtodd maybe one camelia and yoleaux go for coffee ...  they're looking for thing to do ...
19:47 gtodd oh right I mean #perl6 :)
19:48 ZoffixW Aah :)
19:48 gtodd meant
19:48 ZoffixW huggable, hug camelia
19:48 * huggable hugs camelia
19:48 * ZoffixW sees a romance spark
19:49 gtodd maybe camelia and yoleaux should go for coffee ...  look for something to do together
19:50 ZoffixW yoleaux, source
19:50 ZoffixW yoleaux, help
19:50 gtodd yoleaux: vote ?
19:53 cdg joined #perl6
19:53 cdg joined #perl6
19:54 TEttinger joined #perl6
19:58 pierrot joined #perl6
19:59 ptolemarch joined #perl6
20:01 girafe joined #perl6
20:03 [Coke] hoelzro: the first bit to pick out for ||izing on perl6-doc is the type graphs... and that's not trivial. Guessing we'll have to make a config step to generate the dependency relationship, and then render that as makefile rules -and- as perl6 code for later use.
20:05 hoelzro eesh, I didn't think of that
20:06 mr-foobar joined #perl6
20:06 [Coke] it's doable. i was just hoping for a quick thing I could carve out. :)
20:07 [Coke] I have a "perl6 Configure.p6" step already on the makefile branch (a trivial one), will keep hacking.
20:07 hoelzro [Coke]++ # godspeed
20:13 teatime m; $two = "a\c[COMBINING ACUTE ACCENT]"; say $two.codes;
20:13 teatime m: $two = "a\c[COMBINING ACUTE ACCENT]"; say $two.codes;
20:13 camelia rakudo-moar 4a2929: OUTPUT«5===SORRY!5=== Error while compiling /tmp/QMJlPwqVC5␤Variable '$two' is not declared␤at /tmp/QMJlPwqVC5:1␤------> 3<BOL>7⏏5$two = "a\c[COMBINING ACUTE ACCENT]"; sa␤»
20:13 teatime m: my $two = "a\c[COMBINING ACUTE ACCENT]"; say $two.codes;
20:13 camelia rakudo-moar 4a2929: OUTPUT«1␤»
20:16 [Coke] teatime: you're too late. by the time the string is constructed, it's combined.
20:20 huf_ joined #perl6
20:21 jnthn m: my $two = "a\c[COMBINING ACUTE ACCENT]"; say $two.NFD.codes; # have to force NFD if you want 2
20:21 camelia rakudo-moar 4a2929: OUTPUT«2␤»
20:21 yqt joined #perl6
20:22 teatime so, do strings not remember their original byte representation
20:23 jnthn No
20:24 jnthn 'cus strings are for representing Unicode text, not a bunch of bytes :)
20:24 teatime sure
20:24 teatime I had thought TimToady told me that input would not be coerced before output unless done explicitly
20:24 teatime I must have misunderstood
20:27 teatime I would think of "a\c[COMBINING ACUTE ACCENT]" and "\c[LATIN SMALL LETTER A WITH ACUTE]" as two valid, distinct unicode strings.  and each would have its byte representation for the specific encoding, utf8 or whatever.
20:28 teatime treating them as truly equivalent is another step (NFG, I guess) after the unicode/bytes distinction
20:30 edehont joined #perl6
20:31 JackLearn2 joined #perl6
20:32 teatime I should have asked, do strings not remember their original .codes/.univalss representation
20:34 perlpilot teatime: That seems like a weird concept to me.   Do numbers remember their "original representation"?
20:36 teatime I guess I thought, that a String is a list of codepoints, ultimately.
20:37 teatime I did not realize that the conveniences of NFG were inherient to the Str type
20:37 perlpilot Sounds like too much computer-think and not enough human-think   ;)
20:38 teatime I'm not so sure
20:38 timotimo what teatime means is normalization, i'd expect
20:39 timotimo NFG comes after NFC, so all strings you get in rakudo are NFG-normalized plus a little bit extra
20:39 teatime I thought Str was ultimately a list of Unicode codepoints, not NFG codepoints/values
20:39 hoelzro I would say it's a list of graphemes
20:40 hoelzro NFG is post-codepoint
20:40 teatime and I thought that operations like .chars that make use of NFG were just implemented on-top-of a still-existing list-of-unicode-codepoints representation.
20:42 hoelzro afaik, MoarVM strings are lists of graphemes
20:42 timotimo yeah, we give O(1) access to graphemes by their index
20:42 teatime ok.  so I definitely have to use a lot more blobs/bufs now
20:42 timotimo that's what NFG is all about
20:42 timotimo you can also use Uni objects
20:43 teatime well, isn't that on-point
20:45 jimlenz joined #perl6
20:53 dolmen joined #perl6
20:57 dogbert17 the class Date contains a method daycount, which calculates the number of days since Nov. 17, 1858. What's the story behind that?
20:58 vendethiel nine: did you actually talk with the "goto label between languages" guy? :P (btw, very nice talk)
20:58 grondilu https://en.wikipedia.org/wiki/Julian_day
21:00 dogbert17 grondilu: thx, seems to be used by astronomers
21:13 cpage_ joined #perl6
21:37 cdg joined #perl6
22:14 jdv79 joined #perl6
22:15 Sgeo joined #perl6
22:19 skids joined #perl6
22:33 stevieb joined #perl6
22:33 stevieb hey all!
22:36 stevieb I finally figured out (a convoluted, perl6-inexperienced) way to capture a files line endings, and write out a file using the saved EOLs regardless of platform... http://perlmonks.org/?node_id=1164685
22:37 anomie__ joined #perl6
22:38 timotimo that's really the most complicated way i've ever seen to compare a number to two possible numbers
22:39 timotimo .unpack("H*") should be the same - at least when run on a single byte, which is the case with read(1) - as .base(16)
22:40 timotimo and using $hex eq '0d' | '0a' should give you about 10000x the performance of the regex solution
22:40 stevieb I was just messing around. I didn't really care at the end what it looked like. I've given up on it now that I know an approach, and have gone back to studying the docs
22:40 timotimo but it's even easier to not use strings at all and just compare the number to be == 0x0d | 0x0a
22:40 timotimo heh, ok
22:41 stevieb ahhh, ok, I like that == 0x0d | 0x0a... I tried variations on that, but obviously not one that worked at the time. Thanks!
22:42 timotimo :)
22:42 timotimo it'd have to be $buf[0] of course
22:42 timotimo otherwise == will numify the buffer, which is equivalent to counting how many elements it has
22:43 timotimo and you know that it only has one element on every iteration, so the comparison against any number but 1 will always fail
22:44 stevieb I haven't got to the Buf docs quite yet, but that makes sense. I've been spending the day reading the docs from the beginning, letting each doc guide me to the next, and testing/ingraining what I'm learning. There are a lot of semantics I really like. Hyper operator, feeds etc. I also am liking the class setup from what I've played with so far
22:45 timotimo yup, classes are really quite powerful in perl6
22:45 stevieb I like the true separation of private attr/methods vs public ones.
22:45 stevieb unlike Moose, where all attrs create a public accessor
22:47 timotimo i can't speak to that, as i've never done any p5 programming
22:49 stevieb gotcha. I've only ever touched Moose when providing patches/PRs. In my own projects, I've never used it (just used the built-in OO). Perl6 is a lot like Python (which is what I get paid to write in). Some things better so far, some not so much.
22:50 jack_rabbit joined #perl6
22:54 timotimo i always thought the big thing about python's OO is that you can basically assign to any name on your objects
22:54 timotimo whereas in perl6 you'll always declare your attribute up front
22:54 timotimo though you can design objects that behave like the python thing
22:59 cgfbee joined #perl6
23:04 stevieb yes, you can assign to any name on the object, and they become new attributes (but no accessor is created).
23:05 timotimo python doesn't use accessors for everything, though
23:05 stevieb nope
23:06 timotimo so that's not important, IMO
23:09 bjz joined #perl6
23:11 stevieb I like the pre-declared idea. In Python/Perl5, if someone adds a 'blah' attr to my object (breaking encapsulation), their code breaks if I decide to later add the same attr internally
23:11 timotimo you can use __slots__ in python
23:11 timotimo that gets around that problem
23:11 |2701 joined #perl6
23:11 timotimo in CPython that'll even give you a performance boost
23:11 timotimo (not on PyPy, because PyPy basically does that optimization for you for free)
23:12 timotimo did you know that pypy is absolutely fantastic and 100% amazing?
23:16 pierre_ joined #perl6
23:17 _nadim joined #perl6
23:45 arnsholt Yeah, PyPy is pretty damn cool

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

Perl 6 | Reference Documentation | Rakudo