Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-09-19

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:01 AlexDaniel m: sub foo(@array ($first, @rest)) { say @rest }; foo <1 2 3>
00:01 camelia rakudo-moar 641ee1: OUTPUT«cannot stringify this␤  in sub foo at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
00:01 AlexDaniel yes, I know that it is *@rest
00:02 * AlexDaniel rakudobugs it
00:07 AlexDaniel j: sub foo(@array ($first, @rest)) { say @rest }; foo <1 2 3>
00:07 camelia rakudo-jvm cd19db: OUTPUT«__P6opaque__75@437a1841 in sub-signature of parameter @array␤  in sub foo at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
00:07 AlexDaniel /o\
00:25 perlawhirl joined #perl6
00:47 tushar joined #perl6
00:54 pierre_ joined #perl6
00:59 _slade_ joined #perl6
01:02 itaipu joined #perl6
01:04 japhb I see there was a big argument earlier about database categories, in which "what Google does" came up a few times.  Unless they've actually worked for Google, it's likely that what any given person thinks Google does on the inside is probably at least missing some nuance, if not just plain wrong.  There's a LOT more complexity than simple assumptions would indicate.  I'd be willing to bet the same is true at the other top-tier tech companies.
01:06 petercommand joined #perl6
01:20 [1]ringer1 joined #perl6
01:23 theRegularPreten joined #perl6
01:24 theRegularPreten Good evening
01:24 theRegularPreten It has been asked a million times already, I feel, but there I go:
01:24 theRegularPreten Is there a CodeCademy-like site that teaches Perl?
01:31 nbrown joined #perl6
01:31 itaipu joined #perl6
01:32 MasterDuke joined #perl6
01:46 dalek whateverable: 3cf1e29 | (Aleks-Daniel Jakimenko-Aleksejev)++ | build.p6:
01:46 dalek whateverable: Build all tagged commits
01:46 dalek whateverable:
01:46 dalek whateverable: This way it will be possible to dig as far as you'd like, in the expense
01:46 dalek whateverable: of building less than a hundred commits.
01:46 dalek whateverable:
01:46 dalek whateverable: Fixes issue #30
01:46 dalek whateverable: review: https://github.com/perl6/wha​teverable/commit/3cf1e29c5f
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:49 pierre_ joined #perl6
01:53 FROGGS__ joined #perl6
02:10 MasterDuke joined #perl6
02:17 noganex_ joined #perl6
02:21 SmokeMachine____ Hi! I am writing a constraint programming problem solver in perl6... if anyone get a time have any hint/comment, please? https://github.com/FCO/ProblemSolver
02:40 bob777 joined #perl6
02:50 cyphase joined #perl6
02:58 MasterDuke joined #perl6
03:13 pierre_ joined #perl6
03:21 itaipu joined #perl6
04:09 pierre_ joined #perl6
04:30 skids joined #perl6
04:34 wamba joined #perl6
04:36 perlawhirl joined #perl6
04:37 perlawhirl so...
04:37 perlawhirl is irclog.perlgeek.de down for anybody else?
04:38 tadzik seems like it: http://isup.me/http://irclog.perlgeek.de/
04:39 dalek whateverable: 4d18cb4 | (Aleks-Daniel Jakimenko-Aleksejev)++ | / (2 files):
04:39 dalek whateverable: Add special checks for exit code 125
04:39 dalek whateverable:
04:39 dalek whateverable: Normally this should not happen, but a user may decide to skip some
04:39 dalek whateverable: commits manually by exiting with exit code 125. That's totally OK, but
04:40 AlexDaniel perlawhirl: it's not completely down
04:40 AlexDaniel just a bit unstable
04:40 AlexDaniel at least that's how it was a few hours ago
04:40 dalek joined #perl6
04:42 mephinet joined #perl6
04:52 pierre_ joined #perl6
04:56 Cabanossi joined #perl6
05:03 aries_liuxueyang joined #perl6
05:22 Actualeyes joined #perl6
05:38 pierre_ joined #perl6
05:47 pierre_ joined #perl6
05:47 cyphase joined #perl6
05:52 pierre_ joined #perl6
05:59 Guest83809 joined #perl6
06:04 _sfiguser joined #perl6
06:04 cyphase joined #perl6
06:13 domidumont joined #perl6
06:15 ponbiki joined #perl6
06:16 domidumont joined #perl6
06:19 domidumont joined #perl6
06:20 cyphase joined #perl6
06:22 domidumont joined #perl6
06:22 firstdayonthejob joined #perl6
06:27 dalek Inline-Perl5: c630c25 | niner++ | / (2 files):
06:27 dalek Inline-Perl5: Pass Map as pure Perl 5 hashes
06:27 dalek Inline-Perl5:
06:27 dalek Inline-Perl5: Maps are immutable, i.e. we don't expect any writes to make it back to the Perl 6
06:27 dalek Inline-Perl5: object. So they are the perfect candidate for signalling that it can be safely
06:27 dalek Inline-Perl5: copied to a Perl 5 hash with no ties to the original.
06:27 dalek Inline-Perl5: review: https://github.com/niner/Inl​ine-Perl5/commit/c630c25242
06:30 perlawhirl I need to upgrade my Inline::Perl5... nine++ seems to have made a spree of optimisations in the past 24 hours
06:33 perlawhirl can panda update modules... or do i just... 'install --force' it
06:33 perlawhirl <trailing question mark>
06:36 cyphase joined #perl6
06:36 rindolf joined #perl6
06:41 aries_liuxueyang joined #perl6
06:44 wamba joined #perl6
06:47 CIAvash joined #perl6
06:52 nadim joined #perl6
06:59 ufobat joined #perl6
07:00 cyphase joined #perl6
07:01 moritz perlawhirl: panda --force install The::Module
07:01 moritz (note that the --force must come before the 'install')
07:12 nine perlawhirl: panda install The::Module will install a new version. You need --force only if the version number is the same as the installed one's.
07:13 dalek Inline-Perl5: ebba898 | niner++ | META.info:
07:13 dalek Inline-Perl5: Version 0.12
07:13 dalek Inline-Perl5: review: https://github.com/niner/Inl​ine-Perl5/commit/ebba898453
07:13 perlawhirl cool
07:14 nine perlawhirl: while you're at it. Could you please try the following line with the old and new version?
07:14 nine git clone https://github.com/Tux/CSV.git && cd CSV && for i in $(seq 1 10000); do echo 'hello,","," ",world,"!"'; done > /tmp/hello.csv && time perl6 csv-ip5xs.pl < /tmp/hello.csv && time perl6 csv-ip5xs.pl < /tmp/hello.csv
07:14 aries_liuxueyang joined #perl6
07:14 zakharyas joined #perl6
07:16 jsimonet joined #perl6
07:20 pierre_ joined #perl6
07:21 darutoko joined #perl6
07:21 perlawhirl I already updated, but I can reinstall an old commit and test... though i warn you my 32-bit laptop ain't the fastest
07:23 nine Just the number for the new version can help, too.
07:23 nine Trying to find out, why the 40 % improvement I see here does not show um on Tux++'s daily benchmark.
07:25 cyphase joined #perl6
07:27 pierrot joined #perl6
07:30 perlawhirl So... I installed version 0.10 ran the test, then version 0.12, but it was more or less the same... ~8.85s. maybe I did it wrong, or maybe my 32-bit machine hit it's speed limit :D I will try on another box later.
07:34 nine perlpilot: thanks
07:35 nine Oops...wrong tab completion
07:37 labster joined #perl6
07:37 AndyBotwin joined #perl6
07:39 pdcawley joined #perl6
07:40 cyphase joined #perl6
07:47 bjz joined #perl6
07:55 dakkar joined #perl6
07:57 nine .tell perlawhirl note that just installing an older version when a newer one was already installed, won't make rakudo use that old version. If no :ver is specified in the use statement, we pick the newest version.
07:57 yoleaux nine: I'll pass your message to perlawhirl.
07:57 cyphase joined #perl6
08:03 Actualeyes1 joined #perl6
08:06 bjz joined #perl6
08:06 El_Che joined #perl6
08:08 giraffe joined #perl6
08:18 ilbot3 joined #perl6
08:18 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!
08:18 japhb joined #perl6
08:21 pierre_ joined #perl6
08:25 canopus joined #perl6
08:31 eliasr joined #perl6
08:37 RabidGravy joined #perl6
08:44 gfldex joined #perl6
08:44 wamba joined #perl6
08:45 masak good antenoon, #perl6
08:45 arnsholt o/ masak
08:46 DrForr wow, almost afternoon here. I guess I'd better get something accomplished.
08:46 * arnsholt has ordered more stuff for his new keyboard
08:47 arnsholt And read about SOAP
08:48 DrForr As keyboards normally *are* accessories, I assume this is of the all-keys-in-a-row variety? :)
08:48 masak arnsholt: my heartfelt sympathy
08:48 arnsholt DrForr: Dampener rings to put under the keycaps
08:49 arnsholt It's a mechanical keyboard, and recent feedback from colleagues have indicated that a bit of soundproofing may be in order =)
08:49 DrForr Ah.
08:50 masak been there, done that :)
08:50 arnsholt And a few custom keycaps while I'm at it: a red escape key and a pair of Portal keycaps to put on the Windows keys
08:52 arnsholt masak: I've only read a tiny bit, so I'm not scarred for life just yet
08:52 arnsholt And other people have implemented most of the SOAP stuff. Apparently, I'm supposed to implement MTOM (sending binary stuff in binary next to the XML, basically) in existing code
08:53 * jnthn so far today fixed 2 bugs and ate a plum
08:53 jnthn I liked the plum more than the bugs.
08:53 DrForr I guess I'm one of the last people to not look at my keyboard when typing :)
08:53 arnsholt Yeah, I need to learn to touch type properly, really
08:54 arnsholt But the custom keycaps are mostly just bling =)
08:56 * jnthn was lucky enough to get typing lessons when he was young
08:56 DrForr Same here.
08:56 arnsholt We were supposed to learn it at school when I Was about 16, but at that point it was too late for me
08:57 jast it's never too late!
08:58 jnthn Though I started on a typewriter. After a while of using the home computer's keyboard in a similar manner, I got told off for being too loud and busting the space bar. :P
08:58 DrForr Drape a tea towel over your hands and start making errors. You'll learn very quickly where the backspace key is :)
08:58 arnsholt Yeah, it's mostly a question of time and being reluctant to go through the effort of breaking two decades of muscle memory of faking it
08:58 jast in my experience, muscle memory isn't that hard to change if you don't make a big deal out of it
08:58 arnsholt jnthn: I typed on a Model M clone for many years. I have been told similar things =)
08:59 DrForr On occasion I switch to Dvorak just for the hell of it. And pissing off anyone who tries to type on my laptops.
08:59 jast it does take time, though, no argument there
08:59 andrewalker joined #perl6
08:59 jast DrForr: I think colemak will confuse people much more because it's somewhat closer to QWERTY
09:06 pierre_ joined #perl6
09:11 El_Che full disk. Arrg. Linux VM + zillion docker images takes space. Who would have thought it (I need to get rid of this $work Windows installation)
09:17 brrt joined #perl6
09:28 wamba joined #perl6
09:37 Unavowed joined #perl6
10:04 ilbot3 joined #perl6
10:04 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!
10:04 diakopter___ joined #perl6
10:04 domidumont joined #perl6
10:07 domidumont joined #perl6
10:13 lambd0x joined #perl6
10:13 lambd0x Hi everyone!
10:14 lambd0x m: say 3//2;
10:14 camelia rakudo-moar 7e3506: OUTPUT«3␤»
10:14 lambd0x m: say 1//2;
10:14 camelia rakudo-moar 7e3506: OUTPUT«1␤»
10:14 lambd0x m: say -1//2;
10:14 camelia rakudo-moar 7e3506: OUTPUT«-1␤»
10:16 lambd0x how does the // operator work?
10:17 brrt i think it is integer division
10:17 DrForr https://docs.perl6.org/language/operators#infix_//
10:17 lizmat it returns the left side if it is defined, otherwise the right side
10:17 brrt oh…
10:17 lizmat nothing to do with division
10:17 brrt it's the same as perl
10:17 brrt hehe
10:17 * brrt was confused with python
10:17 DrForr You're maybe thinking of 'div'?
10:17 brrt m: -1 div 2
10:17 camelia rakudo-moar 7e3506: OUTPUT«WARNINGS for <tmp>:␤Useless use of "div" in expression "-1 div 2" in sink context (line 1)␤»
10:17 DrForr (and I'm probably thinking of TT perl5)
10:17 brrt m: say -1 div 2;
10:17 camelia rakudo-moar 7e3506: OUTPUT«-1␤»
10:19 lambd0x lizmat: hm... when won't it for example be defined?
10:19 lizmat m: my $a; say $a / 42
10:19 camelia rakudo-moar 7e3506: OUTPUT«Use of uninitialized value of type Any in numeric context␤  in block <unit> at <tmp> line 1␤0␤»
10:20 kaare__ joined #perl6
10:20 lizmat m: my $a; say $a // 42
10:20 camelia rakudo-moar 7e3506: OUTPUT«42␤»
10:20 DrForr When the left side is a variable that you haven't defined?
10:21 lizmat DrForr: s/defined/initialized/ ?
10:21 lizmat m: no strict; say $a // 42
10:21 camelia rakudo-moar 7e3506: OUTPUT«42␤»
10:21 lambd0x DrForr: ahahah, I was just wondering if therefore u have a Int defined variable, by default it has a 0. So it's always defined.
10:21 lizmat :-)
10:22 DrForr 'declared' was probably a better word to use there :/
10:22 lizmat m: my Int $a; say $a    # still undefined
10:22 camelia rakudo-moar 7e3506: OUTPUT«(Int)␤»
10:22 lizmat m: my $a; say 42 + $a;   # acts as 0 with warnings
10:22 camelia rakudo-moar 7e3506: OUTPUT«Use of uninitialized value of type Any in numeric context␤  in block <unit> at <tmp> line 1␤42␤»
10:23 lambd0x lizmat: ok, that's nice :)
10:23 lambd0x DrForr: yeah, sorry...just woke up haha.
10:25 DrForr Talking to myself, not you.
10:29 iH2O joined #perl6
10:30 pierre_ joined #perl6
10:38 user9 joined #perl6
10:42 Woodi hi #perl6 :)
10:43 dayangkun joined #perl6
10:43 Woodi I keep getting  ===SORRY!===\nMissing block  for:  if $kh<milk> {  line... any ideas ?
10:44 Woodi "This is perl6 version 2012.10 built on parrot 4.6.0 revision 0"
10:45 moritz Woodi: try using a perl 6 that' isn't nearly 4 yars old
10:47 Woodi moritz: I can't. I'm on my way back in time and this prevents progress...
10:49 moritz Woodi: then seing the code around it might or might not help
10:49 pmurias joined #perl6
10:51 bjz joined #perl6
10:52 Woodi here:  https://github.com/slunski/caffeeExam​ple/blob/master/caffeExample.pl6#L203
10:52 pmurias arnsholt: vim in my experience is very good for learning to touch type, as it makes you keep your hands in proper position ;)
10:52 Woodi except that %kh is $kh to reach that point in time :)
10:52 moritz Woodi: we didn't have adverbs back than, I believe
10:53 moritz Woodi: so %kh.exists('milk')
10:53 moritz or check with .defined, if that's acceptable
10:54 iH2O left #perl6
10:55 Woodi moritz: nothing changes. maybe just line numbersare off...
10:56 flexibeast joined #perl6
10:57 moritz Woodi: then I don't know
10:59 Woodi moritz++ thanx anyway :)
11:06 itaipu joined #perl6
11:08 Woodi ok, problem was in 'next;' few lines above... btw. 'unless' still don't allows 'else' ?
11:10 masak Woodi: doesn't allow it by spec.
11:10 masak Woodi: it's not like it's hard to implement so that it allows it.
11:11 masak S04: "The C<unless> statement does not allow an C<elsif> or C<else> in Perl 6."
11:14 Woodi masak: I wonder why ? natural language betterness ?
11:16 * moritz finds unless + else confusing
11:16 masak Woodi: yes, you could call it that.
11:18 Woodi masak: oki :)
11:18 masak Woodi: Perl 6 is pretty good at staying out of your preferences and letting you choose.
11:19 masak Woodi: but in this case, the language makes the call that if you do `unless` followed by `else`... you're confused, and you should be told you're confused
11:20 masak Woodi: maybe Perl 6 is a little bit better than Perl 5 at detecting and preventing "useless double negations". `unless` + `else` is one. `!!expr` is another -- Perl 6 has `?expr`
11:21 masak (but in that latter case, doesn't enforce)
11:21 masak m: say !!"OH HAI"
11:21 camelia rakudo-moar 4b1864: OUTPUT«True␤»
11:21 Woodi masak: realy I do not wanted unless-else, just mechanical try to replace 'next' discovered that :)
11:21 bjz joined #perl6
11:21 masak I still think you got the nudge for the right reasons :)
11:22 matt_ joined #perl6
11:25 Woodi ok, so I will do half city walk :)  later
11:25 Ven` joined #perl6
11:25 Ven` o/
11:27 masak Ven! \o/
11:28 sammers joined #perl6
11:38 ShimmerFairy OK, how do I get a C++ style namespace thing going, where I can use abbreviated names inside and not outside? That is,  module A { class B { ... }; class C { my B $.d; } }, and then anyone who 'use's the module has to use A::B etc.?
11:39 itaipu joined #perl6
11:40 lizmat ShimmerFairy: -use- is compunit level, so the only thing you can use is the module A
11:40 domidumont joined #perl6
11:41 lizmat if you really want to support A::B, you would have to make that a separate compunit (file) which brings the problem of not being able to refer to B from C without prefixing A::
11:41 lizmat hope I made sense ?
11:42 ShimmerFairy lizmat: huh, I could swear an our-scoped thing in a module got exported so that you could skip the A::, but apparently not? 'class B' apparently forces A::B, where I thought I need to do stuff like 'my class B is export' or such
11:43 lizmat you were asking about forcing people to have to say "use A::B"
11:44 lizmat you can only -use- a compilation unit (compunit)
11:44 lizmat class B inside module A is part of the compunit in which it lives, you cannot -use- it by itself
11:44 ShimmerFairy lizmat: no I wasn't, I was asking about forcing people not to do things like 'use A; say B'. I was having that issue when I thought 'my class Foo is export' would do what I wanted.
11:45 lizmat aaaahhhhh
11:45 lizmat use ne -use-  :-)
11:46 ShimmerFairy I don't know why, but I really hate and find it hard to wrap my head around how Perl 6 handles names and "namespaces" and such. C++'s 'namespace' approach is so much easier for me.
11:47 masak I tend to not nest things in blocks so much nowadays.
11:47 masak I do things in separate compunits, like lizmat++ suggested. that seems to work for me.
11:48 ShimmerFairy masak: the problem is that I don't like typing out long names a bunch (e.g.  class Really::Long::Name::B { has Really::Long::Name::A $.foo }  ), and I'm not always a fan of a Java-esque "one class per file" approach.
11:49 lizmat putting this in Foo.pm:  module Foo { class A is export { } }
11:49 ShimmerFairy If it's a big class, sure, but if I'm just writing up a bunch of AST node classes, one per file would be more annoying than helpful.
11:49 lizmat and then use Foo; makes Foo::A appear in scope
11:50 lizmat ShimmerFairy: so adding "is export" to the class seems to do the trick, if I understand what you want
11:50 ShimmerFairy lizmat: except I (somehow) don't need the 'is export' even. I don't even know why.
11:53 lizmat ah, indeed...
11:53 lizmat I guess that's because classes are by default "our" rather than "my"
11:54 lizmat if I change it to "my class A { }", it doesn't work, not even with "is export" added...
11:54 lizmat which feels like a bug to me
11:55 ShimmerFairy lizmat: I could swear that before I discovered our-scoped things in a module would export as its short name, hence why I was trying something like "my class Foo is export"
11:59 lizmat ShimmerFairy: not sure what to make of the current state, hope for some feedback from TimToady jnthn masak moritz
12:01 ShimmerFairy lizmat: because I really, really dislike how names are handled at the moment. Like I said, C++'s ways are much easier and sensible for me. (I also like how 'namespace Foo { }' just means "put these things in a bucket called 'Foo'")
12:01 lizmat well, that's 'package' for you in Perl
12:02 ShimmerFairy really, you're allowed to write 'package Foo' multiple times? I thought that was just as impossible as doing the same with 'module' and such.
12:03 moritz our-scoped and "is export" are orthogonal
12:04 Ven` joined #perl6
12:07 moritz and several times "package" works because a package is the stub for more specialized packages, like classes, modules, roles, grammars
12:08 ShimmerFairy I was wondering if I'd have to end up making a NamespaceHOW to have things done like I want :)
12:15 Ven` p6: package a { sub f { 5 } }; package a { sub g { f - 2 } }; a::g
12:15 camelia rakudo-moar 4b1864: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Undeclared routine:␤    f used at line 1␤␤»
12:16 dalek Inline-Perl5: a46e341 | niner++ | lib/Inline/Perl5.pm6:
12:16 dalek Inline-Perl5: Add missing Hash and Map methods to Perl5Hash
12:16 dalek Inline-Perl5: review: https://github.com/niner/Inl​ine-Perl5/commit/a46e34194d
12:16 ShimmerFairy Ven`: ah boo, looks like I would need to create a NamespaceHOW type thing then :P
12:21 pmurias what's the difference between nqp::fc and nqp::lc?
12:22 masak pmurias: fc is for comparing case-insensitive
12:23 lizmat nine: feels like those changes could do with a loop and some mop magic :-)
12:23 pmurias masak: when do they behave differently?
12:24 avar pmurias: p5 docs, but relevant: http://perldoc.perl.org/functions/fc.html
12:24 masak avar++
12:24 masak I know the differences are minor, and maybe nonexistent for English
12:26 nine lizmat: better would be to give them real implementations. Right now each of those methods just create a Perl 6 hash to delegate to. method elems() for example could call hv_scalar to get the number of items.
12:27 lizmat nine: ah, yes  :-)
12:27 pierre_ joined #perl6
12:27 nine But that's or after my talk at the Dancer conference ;)
12:28 huf how does casefolding deal with the turkish i problem?
12:28 ShimmerFairy huf: the UCD has a couple of special cases for the turkish i, but in general I believe the CLDR is for region-specific stuff.
12:28 moritz m: say lc 'İ'
12:28 camelia rakudo-moar 4b1864: OUTPUT«i̇␤»
12:28 lizmat nine: confirm spectest now clean
12:28 moritz m: say fc 'İ'
12:28 camelia rakudo-moar 4b1864: OUTPUT«i̇␤»
12:29 lizmat afk&
12:30 huf moritz: well that's broken :)
12:30 masak m: say fc("Iİ")
12:30 camelia rakudo-moar 4b1864: OUTPUT«ii̇␤»
12:30 masak hm.
12:30 moritz huf: what do you think it should case-fold to?
12:31 nine lizmat: \o/
12:31 moritz huf: it's not like folding to lower-case i without dot would be a better answer :-)
12:31 huf moritz: i dont think a good solution exists
12:31 huf but an i + a combining dot seems double wrong
12:31 moritz huf: I find the current answer quite satisfactory
12:31 moritz it just doesn't round-trip, but I'm used to that from the ß -> SS case
12:32 huf yeah, it's never going to roundtrip
12:32 ShimmerFairy http://www.unicode.org/Public/​UCD/latest/ucd/CaseFolding.txt  <-- grep for    T;
12:32 huf humans have messed up writing far too much for that :)
12:32 moritz so, what's the problem then?
12:33 ShimmerFairy Perl 6 doesn't handle anything locale-specific such as those Turkish special cases AFAIK.
12:33 huf the combining dot looks wrong, but maybe that's just me
12:33 huf i guess it makes casefolded dotted-capital-i distinct so it's cool
12:34 ShimmerFairy m: say "Unicode sez: \x0130 -> \x0069 and \x0049 -> \x0131 for turkish langs"
12:34 camelia rakudo-moar 4b1864: OUTPUT«Unicode sez: İ -> i and I -> ı for turkish langs␤»
12:35 huf yeah, it's easy when you know the locale, but by that point you've already lost :)
12:35 smls joined #perl6
12:36 masak not sure "knowing the locale" ought to qualify as losing
12:36 ShimmerFairy m: say "Unicode sez: \x0130 -> \x[0069,0307] and \x0049 -> \x0069 for others"
12:36 camelia rakudo-moar 4b1864: OUTPUT«Unicode sez: İ -> i̇ and I -> i for others␤»
12:36 ShimmerFairy really what we want are things like a CLDR module :)
12:36 huf masak: it means you cant treat strings uniformly and you get into messes like mixed-locale text
12:37 huf how to casefold/capitalize a turkish sentence containing a foreign name or phrase, etc :)
12:37 ShimmerFairy Programs rendering mixed bidi text seem to manage that sort of thing decently enough :P
12:37 huf do they?
12:37 ShimmerFairy well, the good ones
12:37 huf i've always had lots of trouble with them :)
12:38 moritz translations face the same problem, mostly when words have different meanings in both languages
12:38 xiaomiao The pressure takes place in Germany.
12:38 xiaomiao (direct translation of "Der Druck findet in Deutschland statt" - printing, not pressure, same word in german)
12:38 timotimo :D
12:39 huf yeah, translation is
12:39 xiaomiao seen in a contract for a multimillion-$ project
12:39 huf much worse
12:39 timotimo fortunately perl6 don't promises a vm-builtin for translating human language ...
12:39 huf :)))
12:39 huf praise the lord
12:39 timotimo will we be offering nqp::turkishfc() ?
12:39 ShimmerFairy .oO("Oder wie wär's mit chicken ?" "Ich will nichts schicken! Ich will was essen!")
12:39 moritz xiaomiao: I mostly meant mixing in words from other languages that also have a meaning in your own
12:40 timotimo what's wrong, DHL? schicken? - nobody calls me schicken!
12:40 masak yes, it's a pity that the world is too messy to fit in the neat little labeled boxes we've designed for it :P
12:40 timotimo the world needs a stern talking to by a group of comp sci nerds
12:41 ShimmerFairy How to be more like FORTRAN: A world that isn't so compli
12:42 xiaomiao https://www.youtube.com/watch?v=yR0lWICH3rY
12:43 rindolf joined #perl6
12:43 masak even translating from Chinese (simp) to Chinese (trad) is a hard problem
12:45 xiaomiao even translating german to german can be difficult ;)
12:47 smls masak: Doesn't Wikipedia do that automatically though?
12:49 masak perhaps they do. doesn't mean it's not hard, or that when they do it they don't make lots of mistakes.
12:50 masak I mean, Google Translate is at the same time fantastic and incredibly naïve when it translates
12:51 moritz I remember using it once to translate some poetry, and it translated a weird word order into a weird word order in the other language. Bug or feature? How to tell, even? :-)
12:51 darutoko joined #perl6
12:52 bjz joined #perl6
12:52 xiaomiao masak: google translate is roughly good enough to figure out the topic and intent of a foreign-language text
12:53 xiaomiao it's like, say, reading dutch as a native english speaker
12:53 huf only if the language is close to english
12:53 huf or has received a lot of attention from someone
12:53 huf i've never found the *<>hu translations any good
12:53 tony-o *<>hu ?
12:54 huf anything to hungarian
12:54 tony-o ah
12:54 timotimo translate anything to huf
12:54 huf and i think gtranslate does generic a->b translations through english
12:54 huf which introduces interesting artifacts
12:55 timotimo like "translation party" :)
12:57 huf oh well, it's slave labor, we shouldnt expect good quality
12:57 moritz the French <-> German <-> English triangle seems to work rather well
12:58 huf the "3 big ones" work better than the rest? shock!
12:58 Ven` yeah, gtranslate uses english as a middleman
13:00 ShimmerFairy which is fair, considering 2n is usually much less than n! :)
13:02 SmokeMachine____ Hi there! I am writing a constraint programming problem solver in perl6... does anyone get a time to give me any hint/comment, please? https://github.com/FCO/ProblemSolver
13:03 SmokeMachine____ There's a EVAL on that project that I'd like to remove... but I can't find how...
13:04 tony-o SmokeMachine____: what is the eval doing?
13:04 SmokeMachine____ tony-o: creating a sub
13:04 itaipu joined #perl6
13:04 SmokeMachine____ No, a block
13:05 mcmillhj joined #perl6
13:05 SmokeMachine____ With a variable number of input parameters...
13:07 SmokeMachine____ Here's the EVAL: https://github.com/FCO/ProblemSo​lver/blob/master/Problem.pm6#L67
13:08 timotimo well, if it's not important that the arity of the sub is correct, you can just build the block with a *@a parameter
13:08 cdg joined #perl6
13:09 SmokeMachine____ timotimo: the problem is that it's important on that case...
13:09 tony-o m: my $r = { say $_; }; $r(123);
13:09 camelia rakudo-moar 4b1864: OUTPUT«123␤»
13:09 timotimo hehe.
13:09 timotimo in that case, here's a trick for you
13:10 SmokeMachine____ I put that on a array and grep by the signature...
13:10 timotimo m: sub test(*@a) { say @a.elems } but role { method arity { 5 }; method count { 5 } }; (1..100).map(&test)
13:10 camelia rakudo-moar 4b1864: OUTPUT«1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1​␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1​␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤…»
13:10 timotimo er, oops?
13:10 timotimo oh, by the signature
13:10 masak m: my &foo = { say "OH HAI" }; foo
13:10 camelia rakudo-moar 4b1864: OUTPUT«OH HAI␤»
13:10 timotimo m: sub test(*@a) { say @a.elems } but role { method arity { 5 }; method count { 5 } }; &test.signature does role { method arity { 5 }; method count { 5 } }; (1..100).map(&test)
13:10 camelia rakudo-moar 4b1864: OUTPUT«1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1​␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1​␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤…»
13:10 timotimo :(
13:10 SmokeMachine____ Yes, by the signature...
13:10 SmokeMachine____ :(
13:12 SmokeMachine____ And if some one have any comment about the code... I'd love to hear!
13:13 SmokeMachine____ Not only about the code...
13:15 SmokeMachine____ timotimo: I do: @funcs.grep: {%values ~~ .signature}
13:15 prammer joined #perl6
13:16 timotimo i see, ok
13:16 timotimo well, you can still create the signature declaratively
13:17 timotimo installing it is possible to by mixing in a role that overrides the signature method
13:17 timotimo here be dragons :)
13:17 mcmillhj joined #perl6
13:17 SmokeMachine____ timotimo: interesting!
13:18 itaipu joined #perl6
13:21 SmokeMachine____ m: my $a = {say "ok"}; say {:bla} ~~ $a.signature; $a.signature = :(:$bla!); say {:bla} ~~ $a.signature
13:21 camelia rakudo-moar 4b1864: OUTPUT«False␤Cannot modify an immutable Signature␤  in block <unit> at <tmp> line 1␤␤»
13:21 SmokeMachine____ say {:bla} ~~ $a.signature
13:21 SmokeMachine____ Sorry
13:21 mst timotimo: NuSQL?
13:21 timotimo yup
13:21 timotimo like Nu Metal
13:22 mst timotimo: o/ since you never did a join in the first place / maybe it's time to have the tables turned / in the interests of all involved, we've got the scaling solved / and the verdict is postgres o/
13:22 timotimo i don't recognize those lyrics
13:22 SmokeMachine____ m: my $a = {say "ok"}; say {:bla} ~~ $a.signature; $a.signature does role {method signature{ :($bla!)}; say {:bla} ~~ $a.signature
13:22 camelia rakudo-moar 4b1864: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Missing block␤at <tmp>:1␤------> 3e{ :($bla!)}; say {:bla} ~~ $a.signature7⏏5<EOL>␤    expecting any of:␤        postfix␤        statement end␤        statement modifier␤        statement…»
13:22 timotimo oh, no, not like that
13:23 timotimo now you're installing a signature method on the signature you get from .signature on the block
13:23 mst timotimo: then you don't know nu metal worth shit, that's from Spit It Out by Slipknot :D
13:23 timotimo so you'd get that from $a.signature.signature
13:23 timotimo ah, sorry. i didn't slipknot at all during that time
13:24 mst slipknot, deftones, korn, systemofadown were basically -the- bands associated with the nu metal term first
13:24 lichtkind joined #perl6
13:24 timotimo i was an ignorant little kid back then :)
13:25 timotimo of those i only latched on to SoaD
13:26 mst google the spit it out lyrics and you'll find my filk fits pretty well
13:26 * mst can rap out that entire song from memory in time to the track still
13:27 mst I can sort of do the same for a few SoaD bits but they generally have tunes so I don't do it as often for the safety of other people's ears
13:28 * nine didn't know there was "nu metal" when listening to those bands
13:30 timotimo hehehe
13:32 dalek joined #perl6
13:33 RabidGravy things I didn't expect to be doing on a Monday morning: upgrading a "live" MySQL installation :-\
13:33 timotimo oh wow
13:44 mullagainn joined #perl6
13:45 mullagainn is there plans for a p6 equivalent to pythons asyncore
13:46 timotimo i don't remember what asyncore is about
13:46 timotimo we do have asynchronous I/O, though
13:48 mcmillhj joined #perl6
13:48 araujo_ joined #perl6
13:48 tushar joined #perl6
13:50 jnthn That looks much like that the built-in IO::Socket::Async is for
13:50 jnthn (if the first google hit is anything to go by... :))
13:50 araujo_ joined #perl6
13:51 timotimo "Network servers are rarely processor bound, however." - unless your business logic is written in a slow language :P
13:53 timotimo in principle a module could be written that gives you the same API as asyncore
13:53 timotimo except we can't "handle_expt" because moarvm doesn't support OOB data for TCP sockets
13:54 mullagainn yeah, that is what I am seeing. Also looking at the doc I cant see anything related to raw sockets.
13:54 timotimo correct, we don't have raw socket support at the moment
13:54 timotimo of course, if you really need it, you can NativeCall into libc for that
13:54 mullagainn at all or just within the Async module?
13:54 timotimo actually ... i don't know
13:55 mst surely you'd be better NCing into libuv
13:55 timotimo we currently use libuv for sockets of all kinds (even synchronous) so maybe all it needs is to set a flag to some value and we'd get a raw socket instead of a tcp socket?
13:55 mst ... which I'm now sorely tempted to try at some point to see if I can get at unix sockets
13:56 mcmillhj joined #perl6
13:56 timotimo :)
13:56 jnthn ...alternatively, just patch IO::Socket::Async given it's based on libuv anyway :)
13:56 timotimo right
13:56 timotimo i'm not sure what parts are needed to support unix domain sockets or raw sockets
13:56 jnthn The only reason it doesn't expose those things is nobody got around to it yet.
13:56 timotimo maybe it's super easy and doesn't even require code in moarvm
13:56 jnthn timotimo: Probably needs a bit
13:57 timotimo it'd likely require someone to write some failing tests first :)
13:57 mst jnthn: well, yes, that's why I was suggesting NCing into libuv
13:57 mst since hopefully I can manage to re-use at least -some- of the existing stuff that way
13:57 timotimo mst: do note that moarvm will not give you access to its _uv structs
13:57 timotimo you also don't get access to MVMThreadContext structs from user code
13:58 timotimo unless, you know, you dig through process memory for something that looks like it could be a TC
13:58 timotimo like, if you read out the stack pointer you can surely find the TC
13:58 mst and then NativeCall into MoarVM
13:58 mst it'll be fine
13:58 jnthn Is this your way to make me drop other stuff to do it properly? :P
13:58 jnthn .oO( It worked for Devel::Declare... :P )
13:59 jnthn Well, not on me, but :P
13:59 * mst GRINS
13:59 mst the parallels were not lost on me
14:01 brrt mst: if you make sure it is JITted, you can access the threadcontext pointer from r14
14:03 zoosha joined #perl6
14:05 brrt libuv is kind of aggressive about 'owning' sockets though
14:05 timotimo a bit, yeah
14:06 timotimo you'll probably want to create your own uv_loop struct and create the sockets on your own ;)
14:07 pmurias NativeCalling into MoarVM dependencies seems like inventing a more evil way to do XS ;)
14:07 timotimo we can have "use VISHNUS-MULTI-ARMED-FORM;" and then "nqp::becomedeathdestroyerofworlds()" to get the current MVMThreadContext
14:09 brrt that seems like it'd satisfy mst just fine
14:09 * pmurias refuses to implement getting the current MVMThreadContext on the js backend ;)
14:09 zacts joined #perl6
14:11 timotimo :D
14:12 DrForr Oh, package names in kebab-case work? I thought I had a problme with doing that.
14:12 timotimo i think package names are CamelCase
14:13 DrForr (need to rewrite some things tonight then.)
14:13 jisnmm1 joined #perl6
14:13 mullagainn left #perl6
14:14 * pmurias could look into adding unix sockets support to the MoarVM if it means stopping people from poking into VM internals
14:15 mst argh, you're not in #perl6-dev
14:15 timotimo cool :)
14:15 mst which I just moved the conversation to as more appropriate
14:15 timotimo right
14:15 timotimo without really announcing it, though?
14:16 mst I *thought* everybody that was likely to care was already in there
14:16 mst had not noticed the lack of pmurias
14:16 timotimo :)
14:16 wamba joined #perl6
14:19 mullagain joined #perl6
14:20 cbk_ joined #perl6
14:24 _slade_ joined #perl6
14:24 Ven` joined #perl6
14:26 rgrinberg joined #perl6
14:27 pmurias mst: joined #perl6-dev
14:28 mst \o/
14:36 RabidGravy mst, I'd love you even more than I do now if you could do unix domain sockets :)
14:39 mohae joined #perl6
14:39 _sfiguser joined #perl6
14:46 mcmillhj joined #perl6
14:47 * masak .oO( roses are seven, violets are twelve, my love is isomorphic to a subset of itself )
14:48 timotimo :D
14:48 Ven` .oO( Wherefore art thou Russel ? )
14:48 mst masak++
14:59 rgrinberg joined #perl6
15:00 ptolemarch joined #perl6
15:06 Jolust joined #perl6
15:07 Jolust Is it correct to say that when @a».bar will be made auto-threaded that the compiler will figure out the best number of threads to use for the operation?
15:07 Jolust Or will it always use a specific number of threads
15:08 timotimo there's no guarantees about this :)
15:08 perlpilot Jolust: it's correct to say  "*magic happens*"  :)
15:09 khw joined #perl6
15:09 Jolust perlpilot: but what does it mean? What does it mean to "auto-thread"? Why is it useful?
15:10 Jolust what sort of magic
15:10 jnthn It'll use whatever logic .hyper and .race use by default. At the moment that's a fixed default value, but it'll likely move to be based on the number of cores in the shorter term, and to do some kind of hill-climbing algo or similar in the longer term
15:10 brrt it means that the compiler has the liberty to schedule it to run on multiple threads
15:10 timotimo rakudo may change how it decides how to automatically allocate threads for your task
15:10 jnthn Quite possibly with some per-callsite stats
15:10 brrt doesn't mean that it does, but it can, and it makes sense depending on how much individual time each of the operations take
15:11 jnthn So I'd expect it'll, on average, get smarter with thime. :)
15:11 jnthn *time
15:11 Jolust Alright. Thanks.
15:11 timotimo thime makes you smarter? damn
15:11 * timotimo raids kitchen drawers
15:11 perlpilot jnthn: but will it be manually tunable for those rare cases where you want to force a certain number of threads?
15:11 brrt i don't expect so perlpilot
15:12 Jolust perlpilot: you'd use a hyper/race for those cases, I'd think
15:12 timotimo you can use .race and .hyper instead of .>>
15:12 brrt (question wasn't directed at me, i know)
15:12 timotimo yeah, those take two arguments that let you tune exactly how things go down
15:12 jnthn perlpilot: I think the >>.foo syntax will just pick the defaults, and what others have said for configuring it.
15:12 timotimo well, not *exactly*, it's really just two knobs, but it lets you decide enough, IMO
15:13 timotimo you can potentially override the HYPER_* subs in your program scope?
15:13 timotimo though probably not
15:13 timotimo we might enable that, though
15:14 perlpilot Jolust, timotimo: I was thinking more along the lines of forcing some number of threads for all >>. operations.
15:15 perlpilot in any case, my imaginary scenario is sated  ;)
15:15 jnthn perlpilot: @a>>.foo is jsut short for @a.hyper.map(*.foo)
15:15 jnthn uh, .hypermap I guess
15:16 jnthn But anyway, it desugars, and you'd just call the thing it desugars to with options.
15:16 lichtkind_ joined #perl6
15:17 perlpilot jnthn: right ... in my imagination I'd already have a bunch of @a>>.foo and didn't want to rewrite them as .hypermap
15:17 timotimo someone might introduce a slang that gives us >>o(10, 10)o>> syntax, or something :P
15:17 perlpilot But ... whatever, it wasn't a *real* problem (yet)  :-)
15:17 mcsnolte joined #perl6
15:29 mr-foobar joined #perl6
15:35 AlexDaniel joined #perl6
15:37 domidumont joined #perl6
15:40 skids joined #perl6
15:45 harmil_wk Damn, I keep trying to write "say for blah". It's my Perl 5 muscle memory...
15:45 timotimo sorry about that :(
15:46 harmil_wk It's good. I'll get used to it eventually. But I just need to learn to double-check my code before sending out advice.
15:47 timotimo oh, it was you on that mailing list
15:47 timotimo o/
15:56 Jolust m: put for "blah"
15:56 camelia rakudo-moar 4b1864: OUTPUT«␤»
15:57 timotimo oh, we probably want to add put to the list of things that will warn
15:58 Jolust m: print for "blahg"
15:58 camelia rakudo-moar 4b1864: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unsupported use of bare "print"; in Perl 6 please use .print if you meant $_, or use an explicit invocant or argument, or use &print to refer to the function as a noun␤at <tmp>:1␤------> 3print7⏏5 f…»
15:58 Jolust aye
15:58 timotimo if you want to, you can send that as rakudobug@perl.org or what the address is
15:59 Jolust I may just fix it :)
15:59 timotimo that'd be cool, too
16:01 wildnerd joined #perl6
16:04 * [Coke] ignores backscroll. Hallo, everyone.
16:04 moritz \o [Coke]
16:04 timotimo o/
16:09 Xliff_ joined #perl6
16:10 dalek ecosystem: 31eee22 | (Lee Johnson)++ | META.list:
16:10 dalek ecosystem: Add Geo::IP2Location::Lite to ecosystem
16:10 dalek ecosystem:
16:10 dalek ecosystem: see https://github.com/leejo/geo-ip2location-lite-p6
16:10 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/31eee2233f
16:14 moritz leejo++
16:15 timotimo cool
16:15 timotimo but the reverse, you know, only works if you write a visual basic gui to trace an ip.
16:18 Xliff joined #perl6
16:19 wamba joined #perl6
16:24 * Jolust is having second thoughts about `put for "blah"`
16:25 Jolust It's not Perl 5, so throwing X::Obsolete is a bit iffy, and it also disables put; with X::Comp::Group throwing
16:25 timotimo oh, we have a list of things that you could just add it to
16:25 timotimo it'll do the error throwing properly for you
16:26 timotimo it's inside either the Grammar.nqp or Actions.nqp
16:26 Jolust Yeah, that's what I'm talking about.
16:26 timotimo i don't know if put; is supposed to work, though?
16:26 Jolust This one: https://github.com/rakudo/rakudo/bl​ob/nom/src/Perl6/Grammar.nqp#L3224
16:26 Jolust Yeah, prints nl
16:27 timotimo oh, you mean because it's not "from perl5", it's fine to not explode?
16:27 Jolust s: &put, \()
16:27 SourceBaby Jolust, Sauce is at https://github.com/rakudo/rakudo/blob​/4b1864b/src/core/io_operators.pm#L41
16:27 timotimo OK
16:27 Jolust timotimo: more like it's not "obsolete" so throwing X::Obsolete doesn't make sense entirely.
16:27 timotimo yeah
16:28 Jolust And there's an option to treat it as perl6-ism, but then the error message doesn't include the "use .put to mean $_"
16:28 Jolust m: bag for 1
16:28 camelia rakudo-moar 4b1864: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Function "bag" may not be called without arguments (please use () or whitespace to denote arguments, or &bag to refer to the function as a noun)␤at <tmp>:1␤------> 3bag7⏏5 for 1␤»
16:28 Jolust ^ you get that
16:28 timotimo oh
16:28 Jolust I'll just leave it as is. :)
16:31 TimToady we could add .bag to the message
16:32 timotimo .bag it and .ship it
16:32 prammer joined #perl6
16:33 Jolust m: "blah".tclc
16:33 camelia rakudo-moar 4b1864: ( no output )
16:33 Jolust m: "blah".wordcase
16:33 camelia rakudo-moar 4b1864: ( no output )
16:33 Jolust OK, I'll do that then
16:39 nowan_ joined #perl6
17:14 [Coke] anyone want to try to help the user who asked about pack on Jul 29 on perl6-users?
17:20 Jolust m: CATCH {default {}};             Perl ~~ Cool… take note;
17:20 camelia rakudo-moar 77a7a4: OUTPUT«Noted␤»
17:20 Jolust ^_^
17:21 timotimo m)
17:26 Xliff_ joined #perl6
17:29 xinming joined #perl6
17:32 Jolust m: say WHICH new Perl: is => Cool:
17:32 camelia rakudo-moar 77a7a4: OUTPUT«Perl|58183408␤»
17:32 * Jolust downloads it
17:38 poohman joined #perl6
17:40 poohman hello all, i have one question in Grammars, what will happen if I have multiple "makes" in a action method for a token??
17:40 poohman will token.made have the last make value??
17:41 domidumont joined #perl6
17:43 firstdayonthejob joined #perl6
17:44 smls poohman: As far as I know, yes.
17:44 harmil_wk poohman: say grammar { rule TOP {.} }.parse("a", :actions(class { method TOP($/) {make "first"; make "second";} } )).made.perl
17:44 harmil_wk m: say grammar { rule TOP {.} }.parse("a", :actions(class { method TOP($/) {make "first"; make "second";} } )).made.perl
17:44 camelia rakudo-moar 77a7a4: OUTPUT«"second"␤»
17:44 harmil_wk There you go
17:45 poohman thanks
18:02 prammer joined #perl6
18:06 dalek Inline-Perl5: cb1f745 | niner++ | / (2 files):
18:06 dalek Inline-Perl5: Fix possible segfault when returning a single coderef from P5
18:06 dalek Inline-Perl5:
18:06 dalek Inline-Perl5: retval was uninitialized and used as a pointer for some random corruption
18:06 dalek Inline-Perl5: Version 0.13
18:06 dalek Inline-Perl5: review: https://github.com/niner/Inl​ine-Perl5/commit/cb1f745722
18:20 lizmat gfldex tbrowder are there things to mention for the P6W regarding documentation ?
18:22 lizmat m: my %h; sub a($a) { %h{$a}++ }; a(1|2|3|4|5); dd %h   # how will this fail when autothreading becomes really multi-threaded?
18:22 camelia rakudo-moar 77a7a4: OUTPUT«Hash %h = {"1" => 1, "2" => 1, "3" => 1, "4" => 1, "5" => 1}␤»
18:32 domidumont joined #perl6
18:33 sjoshi joined #perl6
18:35 firstdayonthejob joined #perl6
18:43 sjoshi joined #perl6
18:46 dha joined #perl6
18:48 tushar I asked question yesterday about "grep-index" method for searching an index for a specific element of an array. Does that method exist?
18:49 timotimo m: say <a b c d e f g>.grep({ Bool.pick }, :k).say
18:49 camelia rakudo-moar 77a7a4: OUTPUT«(3 6)␤True␤»
18:50 timotimo oops, one .say too many
18:50 timotimo but this is what you want
18:50 smls m: say <a b c d e>.first("c", :k);  # Or this
18:50 camelia rakudo-moar 77a7a4: OUTPUT«2␤»
18:50 timotimo well, .grep isn't the same as .first
18:51 timotimo and grep-index is more like grep with :k than first with :k
18:51 smls timotimo: But they said "index for a specific element"
18:51 timotimo oh
18:51 timotimo i skipped everything after "grep-index" ;)
18:52 timotimo or maybe i read up to "searching an index"
18:52 tushar timotimo and smls, thanks for your input.
18:52 masak tushar: .grep-index used to exist, but got folded into .grep via the :k option
18:53 masak it's nicely consistent with :k also working on .[] and .{}
18:53 tushar I am in love with chain operations of Perl 6.. You can many stuff in one code line.. At the same time it's very readable..
18:53 tushar do*
18:54 timotimo masak: and also :kv and such :)
18:54 masak m: my @a = "A".."Z"; say @a[14, 7, 0, 8]; say @a[14, 6, 0, 8] :k
18:54 camelia rakudo-moar 77a7a4: OUTPUT«(O H A I)␤(14 6 0 8)␤»
18:55 masak tushar: it's only readable because you're weird, like we are :P
18:55 masak *and now it's too late to turn back*
18:55 masak mwhahaha
18:55 optikalmouse joined #perl6
18:55 * TimToady thinks everyone is weird
18:55 optikalmouse ^ 1000x
18:55 masak weird is already here, it's just unevenly distributed
18:56 tushar masak: hahaha.. may be.. That's why I never lost my faith from Perl.. And never moved to Python.. ;)
18:56 masak tushar: the Python people are far too normal, agree
18:56 masak pathologically normal
18:56 TimToady yeah, it's really weird
18:56 tushar masak: hahha..
18:56 timotimo i was never a perl person. i came straight from python to perl6
18:57 masak timotimo: it's because we're weird but classy
18:57 tushar timotimo: great to hear that
18:57 tushar masak: true..
18:57 timotimo masak: that, we are *adjusts monocle*
18:57 * masak adjusts the sea lion on his shoulder
18:57 prammer joined #perl6
18:58 timotimo :D
18:58 * raydiak wonders what the dress code is in this sort of establishment...
18:58 optikalmouse my only issue with perl6 so far is that there seems to be a lag in the startup time?
18:58 optikalmouse I should time it but is that something usually happens or is it a problem specific to my crappy laptop?
18:58 timotimo raydiak: only dress in a way that makes you comfortable and doesn't make others uncomfortable on purpose? :)
18:58 masak optikalmouse: it probably gets exacerbated with a crappy laptop
18:58 timotimo optikalmouse: it starts in 0.1s
18:58 masak optikalmouse: but yes, it's there. it's not nearly as fast as Perl 5
18:59 optikalmouse k will time when I get home
18:59 Xliff_ \o #perl6
18:59 Xliff_ Still having issues with https://gist.github.com/Xliff/0​f537c12b415fa0800a55f9484a25b1a
18:59 timotimo starting it multiple times in a row to make sure caches are warm is important
18:59 Xliff_ At this point, I do not know what to do about that. I don't even know what that error message means.
19:07 itaipu joined #perl6
19:10 newbie1 joined #perl6
19:14 acrussell joined #perl6
19:17 _sfiguser joined #perl6
19:20 brrt joined #perl6
19:27 diakopter___ joined #perl6
19:30 lizmat and another Perl 6 Weekly hits the Net: https://p6weekly.wordpress.com/201​6/09/19/2016-38-we-are-the-robots/
19:37 woolfy left #perl6
19:38 ptolemarch joined #perl6
19:39 harmil_wk Saw the note about unicode radixes and so immediately tried:
19:39 ugexe link for Algorithm::LBFGS is missing the username in the url
19:39 harmil_wk m: say :⒗<a>
19:39 camelia rakudo-moar 77a7a4: OUTPUT«5===SORRY!5===␤Argument to "say" seems to be malformed␤at <tmp>:1␤------> 3say7⏏5 :⒗<a>␤Confused␤at <tmp>:1␤------> 3say :7⏏5⒗<a>␤    expecting any of:␤        colon pair␤Other potential difficulties:␤    Unsupported…»
19:39 woolfy joined #perl6
19:41 harmil_wk So, only Unicode characters that represent decimal digits in radixes?
19:43 robertle joined #perl6
19:44 optikalmouse this looks like a cool project to attempt in perl6: https://github.com/semantic-re​lease/release-notes-generator
19:45 optikalmouse lizmat: awesome :o
19:45 Ivanushka joined #perl6
19:46 Ivanushka harmil_wk: I see no reason why that shouldn't work. Would you please rakudobug it and maybe ping MasterDuke about it, since they might be more familiar with that code path
19:46 lizmat ugexe: fixed and thanks!
19:47 Ivanushka lizmat++ good weekly
19:48 ptolemarch joined #perl6
19:49 Ivanushka optikalmouse: yup. You should try to make it :)
19:50 optikalmouse welcome to javascript -_- https://github.com/conventional-changelog that one tool imports this one but that one imports other deps :/
19:50 optikalmouse bet I can use perl6 to whip something that's smaller + better.
19:50 Ivanushka Do it. Then add it to modules.perl6.org
19:50 Ivanushka optikalmouse++
19:56 sufrostico joined #perl6
19:56 robertle hi folks, I am trying to understand how perl6 finds stuff that i "use". is my undertsanding correct that a .pm6 that gets properly installed (CompUnit::Repository::Installation), all contents are inspected and indexed, so it could contain two classes with different names and I could "use" them and they would be found. whereas if the .pm6 is "only" in a CompUnit::Repository::FileSystem, then the path and
19:56 robertle filename are used to look up what I get? so if the contents of the file do not match the filename, then I can't "use" it? seems at odds...
19:59 cdg joined #perl6
20:06 zacts joined #perl6
20:10 labster joined #perl6
20:11 girafe joined #perl6
20:15 setty1 joined #perl6
20:19 Ven_ joined #perl6
20:25 timotimo robertle: installed modules require a meta.json that has a "provides" section
20:25 timotimo the CU::R::FileSystem stuff is for when you use something like -Ilib or "use lib './foo/'"
20:26 timotimo (usually you'd just spell that "use lib 'foo'", but i thought i added path markers for clarity)
20:26 ZoffixMobile joined #perl6
20:27 canopus joined #perl6
20:28 robertle timotimo: right, I got that. what I thought was surprising that a .pm6 that gets put into ::Installation has "provides" for anything in the file. e.g.
20:28 robertle "provides" : { ... "SVG::Plot::AxisPosition" : { "lib/SVG/Plot.pm" : { ...} }, ... "SVG::Plot" : { "lib/SVG/Plot.pm" : { ...} ...
20:29 timotimo oh?
20:29 timotimo that's weird?
20:29 robertle so the file "lib/SVG/Plot.pm" provides both SVG::Plot::AxisPosition and SVG::Plot
20:29 robertle I tried, I can "use" both
20:29 eliasr joined #perl6
20:30 robertle if I put a similar .pm6, with two types in it, into a "lib" irectory, then I can only "use" the filename, not what's inside
20:30 ZoffixMobile Yeah, I noticed that with IRC::Client too
20:30 timotimo well, what you "use" refers to a Compilation Unit, which can be a class (you'd usually spell that "unit class") or a module or a grammar or whatever
20:30 robertle so as long as each .pm6 only contains a single type, and that type matches the filename/path the stwo behave the same
20:30 timotimo yeah, using stuff isn't supposed to be about types in files, it's about the compunit you want that has what you need in it
20:30 timotimo that's how i understand it anyway
20:30 robertle I am trying to do some sort of "pluggable" thing...
20:30 timotimo but this is absolutely not my area of expertise
20:31 timotimo ah
20:31 robertle yeah, compunit would make sense...
20:31 timotimo https://github.com/tony-o/perl6-pluggable - like this
20:32 cpage_ joined #perl6
20:32 robertle timotimo: I am working of just that, but it doesn't work (uses @INC and does not deal with CompUnit::Repository::Installation
20:32 robertle trying to improve it
20:32 timotimo oh, damn
20:32 timotimo that's very good! :)
20:32 robertle I totally need Pluggable, I abuse it in perl5 so bad it's not funny anymore
20:33 tadzik :)
20:33 ZoffixMobile I think CURI lets you query installed stuff
20:34 robertle what's CURI? never heard of it...
20:34 timotimo yup
20:34 timotimo that's short for CompUnit::Repository::Installation
20:34 robertle ah, *that*!
20:35 robertle ok, I did see the .installed() method, but can't get it to work and can't understand it from looking at the code either
20:36 poohman joined #perl6
20:36 timotimo i think you pass it a matcher or something?
20:36 nine no arguments
20:39 timotimo ah
20:39 nine oh, it's b0rked
20:39 robertle I tried that, but never get anything back. either Nil or "Method 'basename' not found for invocant of class 'Any'"
20:40 nine Classic Perl bug, too: method distribution($id) { InstalledDistribution.new(s​elf!read-dist($_.basename), :prefix(self.prefix)) }
20:40 nine There's no $_ there
20:40 timotimo aaaah
20:41 robertle with that fixed Pluggable would et much shorter, and I would not have to do my own json file parsing, which is nice because I am only second-guessing the format of that file
20:41 robertle but still need to search filesystem repo's, they don't have a "installed"
20:41 nine robertle: filesystem repos are also much simpler
20:42 robertle yeah, I do File::Find and that's it...
20:44 nine robertle: fix pushed
20:44 robertle awesome
20:45 robertle I need to switch to a HEAD perl6...
20:45 timotimo https://github.com/timo/cellular-automata-tests  -  anybody want to look into the performance of this script?
20:49 nine Yeah, too bad it just missed a release :/
20:50 timotimo i think i could turn the inner arrays into native int arrays actually
20:51 timotimo hm, but the check for the values isn't a simple min any more
20:51 timotimo hm, probably all(@neighbours) == any(...|...)
20:52 lizmat timotimo: in a hot loop, I wouldn't use given/when
20:52 lizmat at least not at this point in time
20:53 timotimo oh? i didn't realize
20:53 lizmat well, for one you're invoking smart matching
20:53 timotimo and given without when?
20:53 lizmat that I'm not so sure about
20:53 robertle I also have a syntax question, one that is kinda hard to google for: what's "$.method()" mean? I am confused about the "naked" dollar sigil... is it another way to say "self" ?
20:53 timotimo the only when i have is for SDL event, which ought to be very rare
20:53 timotimo unless you wiggle your mouse about a whole lot
20:54 lizmat robertle: yes
20:54 timotimo yes, it's a way to spell "self"
20:54 timotimo it's mostly used for accessors
20:54 lizmat $.foo is the same as  self.foo
20:54 timotimo because you write "has $.foo", so you can access $.foo, too
20:54 timotimo (because perl6 generates an accessor method with the name of the attribute)
20:54 robertle great! looks more magic than it is
20:54 timotimo right
20:57 timotimo a profile of that script i posted shows, that enqueue is the most expensive routine
20:57 timotimo 23.28% with the second place being the inner of the two dimensional loops with 12.93%
20:57 espadrine joined #perl6
21:07 doc_ joined #perl6
21:08 Ven_ joined #perl6
21:21 Yeeb joined #perl6
21:23 rgrinberg joined #perl6
21:24 _sfiguser joined #perl6
21:25 timotimo i might get away with running the enqueue thing on a separate thread
21:25 cibs joined #perl6
21:49 timotimo wow, holy hell, this is a biiiig bunch slower
21:50 TEttinger joined #perl6
21:51 timotimo it now calculates frames 2x faster than it renders 'em :\
21:51 sunnavy joined #perl6
21:51 sjn joined #perl6
21:51 rmmm joined #perl6
21:51 grondilu joined #perl6
21:51 dylanwh joined #perl6
21:51 Unavowed joined #perl6
21:51 Glitchy joined #perl6
21:51 espadrine joined #perl6
21:51 baest joined #perl6
21:51 ugexe joined #perl6
21:51 salva joined #perl6
21:51 lizmat joined #perl6
21:53 mephinet joined #perl6
21:53 timotimo whoa. removing the whenever to just for-loop over the channel made it much, much, much faster
21:55 Actualeyes joined #perl6
21:57 timotimo very interesting. when the calculation thread finishes (after frame 500), the render thread becomes a *lot* faster
21:59 AndroUser2 joined #perl6
21:59 timotimo huh, it can apparently deadlock?!
22:04 timotimo ugh, 14.5% time in run_gc
22:07 cpage_ joined #perl6
22:14 Sgeo joined #perl6
22:20 cyphase joined #perl6
22:24 newbie1 joined #perl6
22:24 _slade_ joined #perl6
22:31 poohman joined #perl6
22:35 Xliff_ m: my @foo := CArray[int].new; @foo = Bool.roll(100_000)
22:35 camelia rakudo-moar 8be36b: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Undeclared name:␤    CArray used at line 1. Did you mean 'Array', 'array'?␤␤»
22:36 Xliff_ m: use NativeCall; my @foo := CArray[int].new; @foo = Bool.roll(100,000)
22:36 camelia rakudo-moar 8be36b: OUTPUT«Potential difficulties:␤    Leading 0 does not indicate octal in Perl 6. Please use 0o00 if you mean that.␤    at <tmp>:1␤    ------> 3Array[int].new; @foo = Bool.roll(100,0007⏏5)␤Cannot resolve caller roll(Bool: Int, Int); none of these sign…»
22:36 Xliff_ m: use NativeCall; my @foo := CArray[int].new; @foo = Bool.roll(100000)
22:36 camelia rakudo-moar 8be36b: OUTPUT«Cannot modify an immutable NativeCall::Types::CArray[int]␤  in block <unit> at <tmp> line 1␤␤»
22:36 Xliff_ s: use NativeCall; my @foo := CArray[int].new; @foo = Bool.roll(100000)
22:36 SourceBaby Xliff_, Ehhh... I'm too scared to run that code.
22:36 Xliff_ :P
22:38 timotimo Xliff_: apparently STORE isn't implemented for CArray yet?
22:38 timotimo i think i suggested to someone to implement that some time ago
22:41 timotimo m: use NativeCall; my @foo := CArray[int].new but role { method STORE(|) { say "hi!" } }; @foo = 1, 2, 3, 4
22:41 camelia rakudo-moar 8be36b: OUTPUT«CArray representation requires a typed array␤  in any compose_repr at gen/moar/m-Metamodel.nqp line 1572␤  in any compose at gen/moar/m-Metamodel.nqp line 3104␤  in any generate_mixin at gen/moar/m-Metamodel.nqp line 1346␤  in any  at gen/moar/m-Me…»
22:41 timotimo er, oops?
22:42 timotimo m: use NativeCall; class StorableCIntArray is CArray[int] { method STORE(|) { say "hi!" } }; my @foo := StorableCIntArray.new; @foo = 1, 2, 3, 4
22:42 camelia rakudo-moar 8be36b: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Cannot resolve caller trait_mod:<is>(StorableCIntArray, NativeCall::Types::CArray, Array); none of these signatures match:␤    (Mu:U $child, Mu:U $parent)␤    (Mu:U $child, :$DEPRECATED!)␤    (Mu:U $ty…»
22:42 timotimo m: use NativeCall; class StorableCIntArray does CArray[int] { method STORE(|) { say "hi!" } }; my @foo := StorableCIntArray.new; @foo = 1, 2, 3, 4
22:42 camelia rakudo-moar 8be36b: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤NativeCall::Types::CArray[int] is not composable, so StorableCIntArray cannot compose it␤at <tmp>:1␤»
22:42 timotimo nope.
22:44 timotimo the way that is done makes it a bit interesting
22:45 Xliff_ timotimo: Yes. Me. And I've been looking into it, but I am still a bit sketchy on what I've implemented it.
22:45 Xliff_ Was reading blog and thought I could get SourceBaby to tell me if I was in the right place. :P
22:45 timotimo ah :)
22:46 Xliff_ Of course, I've also been more busy with trying to figure out https://gist.github.com/Xliff/0​f537c12b415fa0800a55f9484a25b1a
22:46 Xliff_ However I haven't been able to get much help.
22:46 timotimo yeah, i have no idea what's wrong there :(
22:46 Xliff_ I'm at wits end over that.
22:46 timotimo have you already written a bit of code for CArray's STORE?
22:47 Xliff_ Yes. Nothing for public consumption.
22:47 Xliff_ Not even close.
22:47 timotimo oh
22:47 timotimo any questions i can help with?
22:48 Xliff_ Mainly because I am not sure if I should be linking into the typed roles, or into the class itself.
22:49 Xliff_ After several false starts with a role implementation (I used IntTypedCArray for starters) I think I might need to be doing it in the class.
22:49 Xliff_ I haven't had near enough time recently to give it the attention it deserves.
22:50 timotimo it's good enough to put it into the main, but putting special methods into the roles might be an optimization for the future
22:50 mcmillhj joined #perl6
22:50 Xliff_ timotimo: I will get there. Just need a bit of patience.
22:50 timotimo OK
22:50 Xliff_ (and I need a can of Wooo Saaaaa)
22:50 Xliff_ timotimo: Ah! Well then that confirms I've been barking up the wrong codepath.
22:51 Xliff_ Alright. Have to check on dinner. Have a good night.
22:51 Xliff_ o7
22:51 timotimo not necessarily the wrong one
23:08 * timotimo off to bed
23:15 skids anyone got any experience as to typical causes behind "zeroed thread in work pass" problems?
23:23 BenGoldberg joined #perl6
23:24 timotimo memory corruption, i think?
23:24 timotimo valgrind may help
23:29 bob778 joined #perl6
23:36 a3r0 joined #perl6
23:42 Sgeo_ joined #perl6
23:42 user10 joined #perl6
23:44 eyck joined #perl6
23:45 Khisanth joined #perl6
23:46 protium joined #perl6
23:46 wtw joined #perl6
23:47 _sfiguser joined #perl6
23:59 poohman joined #perl6

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

Perl 6 | Reference Documentation | Rakudo