Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-05-15

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:08 cdg joined #perl6
00:10 TEttinger .u SELFIE
00:10 yoleaux No characters found
00:21 geekosaur not till the next unicode update :p
00:22 BenGoldberg joined #perl6
00:23 Zoffix joined #perl6
00:24 BenGoldberg joined #perl6
00:30 BenGoldberg joined #perl6
00:33 BenGoldberg joined #perl6
00:40 BenGoldberg joined #perl6
00:43 BenGoldberg joined #perl6
00:45 BenGoldberg joined #perl6
00:53 skink Is there an official way to make arbitrary syscalls yet?
00:57 BenGoldberg joined #perl6
01:03 BenGoldberg skink, You can call arbitrary library functions using NativeCall.
01:04 skink BenGoldberg, It's not in a library file :)
01:05 Zoffix__ joined #perl6
01:06 BenGoldberg joined #perl6
01:09 skink BenGoldberg, It's not in a library file :)
01:10 Zoffix joined #perl6
01:10 BenGoldberg How would you perform this syscall from a C program?
01:11 skink http://man7.org/linux/man-pages/man2/getrandom.2.html
01:11 kurahaupo joined #perl6
01:12 geekosaur syscalls can't really be invoked portably
01:12 Ben_Goldberg joined #perl6
01:16 kurahaupo_ joined #perl6
01:16 kurahaupo` joined #perl6
01:19 BenGoldberg joined #perl6
01:19 skink geekosaur, I already separated OS-specific functionality into separate modules
01:25 geekosaur http://man7.org/linux/man-pages/man2/syscall.2.html
01:28 skink Disgusting :)
01:28 huggable joined #perl6
01:32 _4d47 left #perl6
01:35 Zoffix joined #perl6
01:35 jdv79 joined #perl6
01:36 ggoebel115 joined #perl6
01:36 BenGoldberg joined #perl6
01:37 pierrot_ joined #perl6
01:39 BenGoldberg joined #perl6
01:39 Praise joined #perl6
01:39 Praise joined #perl6
01:40 TimToady joined #perl6
01:41 BenGoldberg joined #perl6
01:41 Celelibi joined #perl6
01:41 tbrowder joined #perl6
01:42 tbrowder back again, ref pod and docs
01:46 BenGoldberg 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:48 tbrowder bye all
01:48 kurahaupo joined #perl6
01:48 BenGoldberg joined #perl6
01:50 BenGoldberg joined #perl6
01:55 Zoffix Any response to this FB thread? https://www.facebook.com/groups/1595443877388632/permalink/1735619356704416/?comment_id=1736849196581432&comment_tracking=%7B%22tn%22%3A%22R%22%7D
01:55 Zoffix "Looks like C++ is not supported yet. Is that correct?" "Yep, thats what I was referring to. It did not work for me. May be it is work in progress?"
01:57 BenGoldberg joined #perl6
02:04 molaf joined #perl6
02:05 jack_rabbit joined #perl6
02:05 noganex joined #perl6
02:12 tailgate are there examples of how to make a class/static method in a perl6 class?
02:12 dimon__ joined #perl6
02:13 dimon__ hey, what's the difference between "unit module Aaa;" and "unit package Aaa;" ?
02:13 geekosaur tailgate, our method foo(...) { ... }
02:20 BenGoldberg joined #perl6
02:21 dimon__ joined #perl6
02:21 dimon__ hey, what's the difference between "unit module Aaa;" and "unit package Aaa;" ?
02:22 BenGoldberg joined #perl6
02:23 pierre_ joined #perl6
02:25 Zoffix Goood question.
02:26 Zoffix The speculation on the subject seems a bit outdated: "package Foo; ... This form is illegal in a Perl 6 file. If you wish to have a file-scoped package, either use the brace form or declare it with the module keyword instead."
02:26 Zoffix (and we now have `unit` keywords)
02:29 dimon__ Zoffix: I see.
02:29 dimon__ And if I have file1.pm6 and file2.pm6 in my library MyComp::MyLib, what should be the 1st on those file?
02:29 dimon__ unit module MyComp::MyLib;
02:29 dimon__ or
02:29 dimon__ unit module MyComp::File1Class;
02:29 dimon__ assuming that
02:30 dimon__ I define those classes as
02:30 dimon__ classMyComp::MyLib::File1Class
02:30 dimon__ within those 2 modules
02:30 dimon__ correction: class MyComp::MyLib::File1Class { .... }
02:30 dimon__ or
02:30 dimon__ class MyComp::MyLib::File2Class { .... }
02:31 dimon__ sorry for the typos
02:31 BenGoldberg joined #perl6
02:36 BenGoldberg joined #perl6
02:48 BenGoldberg joined #perl6
02:53 Ben_Goldberg joined #perl6
02:58 BenGoldberg joined #perl6
03:00 BenGoldberg joined #perl6
03:08 cdg joined #perl6
03:16 BenGoldberg joined #perl6
03:18 BenGoldberg joined #perl6
03:21 BenGoldberg joined #perl6
03:22 ssotka joined #perl6
03:27 dimon_ joined #perl6
03:28 dimon_ when I'm using a file-class declaration "unit class MyModule::Class1", how can I write "does RoleX" for Class1?
03:28 BenGoldberg joined #perl6
03:29 timotimo m: unit class FooBar; also does Positional;
03:29 camelia rakudo-moar ad8265: ( no output )
03:31 dimon_ timotimo: and if I need to export the module where "Positional" is defined? say, it's defined in MyModule
03:32 dimon_ then this won't compile also does Positional;
03:32 timotimo export? you mean import?
03:32 timotimo you can put "use MyModule" in front
03:32 dimon_ neither this also does MyModule2::Positional;
03:32 dimon_ I mean, MyModule2, not Module for Positional
03:32 timotimo i'm not sure how you mean that
03:33 dimon_ I mean, this won't compile "; also does MyModule2::Positional;"
03:33 timotimo so why not put "use MyModule2" in between?
03:33 timotimo oh, you mean you want Positional to be available as a member of the unit class' package?
03:33 dimon_ tnx
03:34 timotimo you'd have to do something like "my \Positional is export = Positional"
03:34 timotimo or something like that
03:34 dimon_ nope, I meant how to "use" MyModule2::Positional
03:34 dimon_ before "also does MyModule2::Positional"
03:34 timotimo the thing after "use" is the file you want rakudo to look for in the filesystem
03:35 timotimo so if you want to get MyModule2::Positional, you'd usually "use MyModule2"
03:37 BenGoldberg joined #perl6
03:38 dimon_ tnx
03:40 BenGoldberg joined #perl6
03:40 dimon_ joined #perl6
03:40 pierre_ joined #perl6
03:41 dimon_ by the way, if my library is available in "panda", and if I update its source code at github, will it be updated in panda automatically?
03:41 dimon_ does panda use code from github of a package?
03:41 timotimo panda always pulls the code directly from github, yeah
03:41 dimon_ ok
03:41 timotimo we will have something different in the future that's more similar to cpan and PAUSE
03:42 BenGoldberg joined #perl6
03:45 BenGoldberg joined #perl6
03:50 BenGoldberg joined #perl6
03:52 BenGoldberg joined #perl6
03:55 BenGoldberg joined #perl6
03:57 BenGoldberg joined #perl6
04:06 BenGoldberg joined #perl6
04:08 BenGoldberg joined #perl6
04:11 BenGoldberg joined #perl6
04:14 mtj_ joined #perl6
04:15 BenGoldberg joined #perl6
04:18 BenGoldberg joined #perl6
04:32 BenGoldberg joined #perl6
04:51 Cabanossi joined #perl6
04:53 espadrine joined #perl6
04:54 BenGoldberg joined #perl6
04:54 pierre_ joined #perl6
05:02 dalek Inline-Perl5: 0dbc189 | (Zoffix Znet)++ | README.md:
05:02 dalek Inline-Perl5: Newer version of P5 available now
05:02 dalek Inline-Perl5: review: https://github.com/niner/Inline-Perl5/commit/0dbc189a47
05:02 dalek Inline-Perl5: 9d70afd | lizmat++ | README.md:
05:02 dalek Inline-Perl5: Merge pull request #62 from zoffixznet/patch-1
05:02 dalek Inline-Perl5:
05:02 dalek Inline-Perl5: Newer version of P5 available now
05:02 dalek Inline-Perl5: review: https://github.com/niner/Inline-Perl5/commit/9d70afdc64
05:03 wamba joined #perl6
05:03 BenGoldberg joined #perl6
05:05 dmc00 joined #perl6
05:10 BenGoldberg joined #perl6
05:14 dmc00 joined #perl6
05:14 CIAvash joined #perl6
05:22 BenGoldberg joined #perl6
05:28 huggable joined #perl6
05:29 BenGoldberg joined #perl6
05:36 BenGoldberg joined #perl6
05:44 BenGoldberg joined #perl6
05:47 kaare_ joined #perl6
06:01 domidumont joined #perl6
06:07 domidumont joined #perl6
06:21 spider-mario joined #perl6
06:23 grondilu joined #perl6
06:26 lizmat joined #perl6
06:44 telex joined #perl6
06:59 jack_rabbit joined #perl6
07:18 CIAvash joined #perl6
07:57 firstdayonthejob joined #perl6
08:10 RabidGravy joined #perl6
08:15 darutoko joined #perl6
08:16 kaare_ joined #perl6
08:20 Ven joined #perl6
08:36 rindolf joined #perl6
08:38 grassass joined #perl6
08:41 pierre_ joined #perl6
08:44 Emeric joined #perl6
09:03 pierre__ joined #perl6
09:06 cpage_ joined #perl6
09:21 masak good almost-noon, #perl6
09:22 espadrine joined #perl6
09:22 buharin joined #perl6
09:22 RabidGravy our cat decided it was time for us to get up an hour and a half ago
09:22 buharin hiho
09:27 lue joined #perl6
09:28 huggable joined #perl6
09:33 grondilu just adding a 'BEGIN say "hi";' in one of my modules make it fail.  Go figure.
09:34 grondilu can't reproduce it with a one liner though.
09:34 grondilu m: module A { our @a is export = rand xx * }; import A; say "ok";
09:34 camelia rakudo-moar ad8265: OUTPUT«ok␤»
09:34 grondilu m: module A { our @a is export = rand xx * }; BEGIN say "hi"; import A; say "ok";
09:34 camelia rakudo-moar ad8265: OUTPUT«hi␤ok␤»
09:34 grondilu something like that
09:36 grondilu it's for my clifford module (https://github.com/grondilu/clifford).  I was trying to do some precomputation with a BEGIN block but even the simplest BEGIN generates: ==SORRY==Variable '@e' is not declared
09:39 grondilu also after this error removing the BEGIN say "hi"; is not enough.   I have to manually remove the .precomp directory.
09:39 grondilu very LTA
09:39 RabidGravy grondilu, iirc doing IO in a module that may be precompiled causes badness
09:40 grondilu aren't all module susceptible to be precompiled?
09:40 grondilu *modules
09:40 RabidGravy that is if the IO will happen at compile time
09:40 RabidGravy yes
09:40 grondilu oh
09:40 grondilu hang on
09:41 * grondilu tries with 'BEGIN sleep 1;'
09:42 grondilu nope, BEGIN sleep 1 causes the same error and requires manual remove of .precomp just the same.
09:43 * grondilu wonders if BEGIN {} would just be ignored.
09:44 grondilu no, it's not ignored and it causes the error as well.
09:49 CIAvash joined #perl6
09:50 zakharyas joined #perl6
09:50 grondilu :q
09:54 grondilu but seriously I have hard times figuring why adding 'BEGIN {}' in a module could make any difference whatsoever.
09:54 skingsbu joined #perl6
09:56 dalek perl6-most-wanted: b49b9f9 | titsuki++ | most-wanted/modules.md:
09:56 dalek perl6-most-wanted: Fix a Text-Tabs-Wrap link
09:56 dalek perl6-most-wanted: review: https://github.com/perl6/perl6-most-wanted/commit/b49b9f9808
09:56 dalek perl6-most-wanted: 53ac1e0 | titsuki++ | most-wanted/modules.md:
09:56 dalek perl6-most-wanted: Merge pull request #31 from titsuki/fix-not-working-link
09:56 dalek perl6-most-wanted:
09:56 dalek perl6-most-wanted: Fix a Text-Tabs-Wrap link
09:56 dalek perl6-most-wanted: review: https://github.com/perl6/perl6-most-wanted/commit/53ac1e0c4d
09:56 masak grondilu: I'd be quite interested to see a golf of what you're observing.
09:56 RabidGravy yeah I deeply suspect there is something else going on
09:57 llfourn writing to stdout during compile time used to be a problem but I thought it was more or less fixed now
09:58 llfourn I always use BEGIN note "recompiling"; for that reason
10:01 grondilu masak: so would I.  I've tried to make one but I failed.
10:01 grondilu I could try harder I guess.
10:02 pierre_ joined #perl6
10:02 grondilu last time I tried I gave up when I realized the code I was executing was not the code I had typed because of the .precomp issue.
10:08 grondilu m: BEGIN say "compiled on " + now
10:08 camelia rakudo-moar ad8265: OUTPUT«5===SORRY!5=== Error while compiling /tmp/GRX4YX4MEy␤An exception occurred while evaluating a BEGIN␤at /tmp/GRX4YX4MEy:1␤Exception details:␤  Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5compile…»
10:08 pmurias joined #perl6
10:08 grondilu silly me
10:08 grondilu m: BEGIN say "compiled on " ~ now
10:08 camelia rakudo-moar ad8265: OUTPUT«compiled on Instant:1463306963.554297␤»
10:09 grondilu ^I guess I could use somethink like that to check that my code is up-to-date or something.
10:10 dogbert17 good day #perl6
10:10 pmurias dogbert17: hi
10:11 dogbert17 pmurias: hi
10:11 dogbert17 noob question of the day, what does this syntax mean: my class X::Seq::Consumed { ... }     # from src/core/Seq.pm
10:12 grondilu it's the standard way of making an exception IIRC
10:12 cpage_ joined #perl6
10:13 dogbert17 shouldn't ther be an 'is Exception' in there somewhere?
10:14 grondilu I think it was not considered necessary
10:15 grondilu there is no Exception class in Perl 6
10:15 grondilu m: say Exception
10:15 camelia rakudo-moar ad8265: OUTPUT«(Exception)␤»
10:15 grondilu oh there is
10:15 grondilu my bad
10:16 grondilu I don't know then.
10:18 RabidGravy dogbert17, that is a "forward declaration"
10:19 bartolin dogbert17: I think that is a stub definition for that class, which get fully defined in src/core/Exception (and there you get 'is Exception' as you expected)
10:19 RabidGravy it's actually defined in src/core/Exception.pm
10:19 dogbert17 RabidGravy++ bartolin++ many thanks
10:20 dogbert17 grondilu++ as well
10:20 RabidGravy it can do it like that (in separate files) because of the way that the CORE setting is compiled
10:21 dogbert17 aha, the reason for asking is that I want to try to fix https://github.com/perl6/doc/issues/515
10:22 dogbert17 hadn't seen the syntax before and thought, for some reason it meant 'not yet implemented'
10:22 RabidGravy yeah I was going to respond to that,  I think the time is very soon that the exceptions should have their own section in the docs, on the grounds that if they are *all* documented it will swamp all the other types
10:23 RabidGravy dogbert17, it means "not implemented here" :)
10:23 RabidGravy or "yet"
10:24 dogbert17 RabidGravy: :)
10:25 dogbert17 and I'm guilty as charged :), have added several 'missing' exceptions to the docs in the last few days
10:25 RabidGravy that is to say that if by the time the whole thing is finished compiling there isn't a complete definition a "he following packages were stubbed but not defined" will be thrown
10:25 arnsholt In user code, you'd end up using that syntax if you have two types that depend on each other
10:26 araujo joined #perl6
10:26 arnsholt Like "class B {...}; class A { has B $.b; }; class B { has A $.a }"
10:26 bartolin dogbert17: you can read more about stub declarations in the speculations: https://design.perl6.org/S06.html#Stub_declarations
10:26 arnsholt (And no, that can't be split into two separate files)
10:27 dogbert17 thx all, very interesting discussion
10:28 aries_liuxueyang joined #perl6
10:30 RabidGravy the thing with "document all the exceptions" is that there are greater than 250 defined in src/core/Exception.pm which is roughly more than the rest of the types
10:31 RabidGravy so a) the types page becomes rather large and b) they are mostly not all that interesting except in the context of *where* they are thrown
10:33 RabidGravy so having them in a separate section would prevent a) and allow the linking from the documentation for the things that throw them
10:34 dogbert17 RabidGravy: maybe I should hold off then until we have a solution ?
10:35 RabidGravy I'd carry on to be honest
10:36 dogbert17 RabidGravy: ok will do :)
10:36 RabidGravy I'd say that people agreeing will take forever or until someone just does it and it's better that things are documented, it can be re-arranged later
10:39 dogbert17 RabidGravy: how about =SUBTITLE 'Error due to trying to reuse a consumed sequence'   is that intelligible or just bad english?
10:44 buharin joined #perl6
10:45 Actualeyes joined #perl6
10:47 kaare_ joined #perl6
10:55 gfldex the optimisations of the last 2 weeks have shaved off 13% execution time of my pod renderer
10:55 gfldex you totally improved my productivity!
11:02 fildon joined #perl6
11:10 RabidGravy yay!
11:11 dalek doc: 9728090 | (Jan-Olof Hendig)++ | / (2 files):
11:11 dalek doc: Added docs for X::Seq::Consumed
11:11 dalek doc: review: https://github.com/perl6/doc/commit/9728090607
11:11 RabidGravy yay!
11:11 dogbert17 :)
11:15 dogbert17 yesterday an odd thing happened when writing some docs, after having run htmlify.p6 my changes weren't there, i.e. in the generated html files. Had to nuke the 'precompiled' directory in order to make it work!
11:15 * teatime waves g'morning.
11:16 dogbert17 o/ teatime
11:17 kid51 joined #perl6
11:19 [TuxCM] joined #perl6
11:32 mr-foobar joined #perl6
11:46 llfourn hmm I have to keep deleting .precomp because I get "Missing or wrong version of dependency" often. Seems to have only started today.
11:47 llfourn I will see if I can bisect it
11:50 kurahaupo joined #perl6
11:56 llfourn seems to happen on 2016.03 as well o.o
11:57 RabidGravy :-\
11:57 llfourn not using git so hard to know what I did to trigger it.
12:00 snarkyboojum joined #perl6
12:06 Zoffix I was getting that when I installed a module and stuff depending on it and then got a local copy of the module to hack on. So basically the installed, precompiled modules were precompiled against the "old" installed module, not my local copy.
12:07 llfourn hmmm that interesting because a few of the compunits in what I'm working on do have the same name as some that are installed
12:07 Zoffix And I reported it: https://rt.perl.org/Ticket/Display.html?id=128088
12:08 snarkyboojum joined #perl6
12:12 pierre_ joined #perl6
12:12 tailgate if I have ((a -1) (e -5) (d -4) (c -3) (b -2)) how do I make it a hash of the form a => -1 e => -5 etc?
12:13 mr-foobar joined #perl6
12:13 llfourn tailgate: I'm not sure what you have there but try .hash
12:13 llfourn if it's a list of lists which is what it looks like you may have to flatten them first
12:13 _4d47 joined #perl6
12:14 llfourn m: ( <a,b>,<c d> ).perl.say
12:14 camelia rakudo-moar ad8265: OUTPUT«("a,b", ("c", "d"))␤»
12:14 llfourn ...
12:14 llfourn m: ( <a b>,<c d> ).perl.say
12:14 camelia rakudo-moar ad8265: OUTPUT«(("a", "b"), ("c", "d"))␤»
12:14 llfourn m: ( <a b>,<c d> ).hash.say
12:14 camelia rakudo-moar ad8265: OUTPUT«{a b => (c d)}␤»
12:15 llfourn m: ( <a b>,<c d> ).map(|*).hash.say
12:15 camelia rakudo-moar ad8265: OUTPUT«{a => b, c => d}␤»
12:15 llfourn ^ seems to do the trick
12:16 llfourn m: hash( (<a b>,<c d>) ).say
12:16 camelia rakudo-moar ad8265: OUTPUT«{a => b, c => d}␤»
12:16 llfourn ^ better
12:17 tailgate ah, I was using .Hash
12:17 llfourn m: %( (<a b>,<c d>) ).say # also works I think
12:17 camelia rakudo-moar ad8265: OUTPUT«{a b => (c d)}␤»
12:17 llfourn m: %( |(<a b>,<c d>) ).say # or this perhaps?
12:17 camelia rakudo-moar ad8265: OUTPUT«{a b => (c d)}␤»
12:18 llfourn ..nevermind
12:18 llfourn .Hash should work too I think
12:18 llfourn m: ( <a b>,<c d> ).map(|*).Hash.say
12:18 camelia rakudo-moar ad8265: OUTPUT«{a => b, c => d}␤»
12:18 llfourn at least there it does
12:20 [Tux] joined #perl6
12:21 tailgate what do | and |* mean?
12:21 llfourn | means turn the thing after it into a Slip ( an auto-flattening list )
12:21 llfourn * in this case means $_, which means each item in the map
12:22 llfourn so .map(|*) is short for .map({ |$_ })
12:23 llfourn the problem is without it the .Hash gets two Lists as arguments where as what you want it four elements which will then pair up as key-values.
12:23 llfourn s/want it/want is/
12:47 tailgate thanks llfourn
12:47 llfourn np :)
12:47 mr-foobar joined #perl6
12:52 pierre_ joined #perl6
12:56 kanishka joined #perl6
13:00 Ven joined #perl6
13:06 Zoffix (╯°□°)╯︵ ┻━┻
13:07 Zoffix zef fails to install Inline::Perl5 with a non-descript error... tried with panda and it fails while trying to install prereqs because they're already installed -_-
13:07 timotimo hey zoffzoff
13:07 Zoffix hey
13:11 kaare_ joined #perl6
13:13 Zoffix Oh, pffftt... I forgot to perlbrew switch to proper perl, that's why Inline::Perl5 is failing. panda++ (actually showing the error)
13:14 CIAvash joined #perl6
13:15 teatime I am curious about how exactly Inline::Perl5 works / is implemented.
13:15 Zoffix I think it uses NativeCall to call into Perl5's C lib that handles XS.
13:18 RabidGravy yeah, it's something like that
13:21 teatime cool.
13:21 timotimo it might be easier to understand how Inline::Python works. i bet the python API is simpler than XS is :P
13:22 RabidGravy well the P5 "embedding" API is quite well documented http://perldoc.perl.org/perlembed.html
13:28 huggable joined #perl6
13:30 Zoffix joined #perl6
13:30 Zoffix What's a good monospace font that has good unicode support and doesn't look like shit?
13:30 RabidGravy just in case anyone is on a "search and document" mission for exceptions I've created https://github.com/perl6/doc/issues/517 to cover off the rest of them as there are loads
13:31 teatime Zoffix: PragmataPro, but it's not free, and actually is kindof expensive IMO.
13:31 Zoffix :(
13:31 Zoffix I like free
13:31 teatime Zoffix: Are you more interested in various scripts, or in Latin (and maybe Greek, Cryllic) + *symbols* ?
13:31 timotimo and emoji!
13:32 Zoffix Well, I'm interested in not seeing boxes with numbers in them: ¯\_(ツ)_/¯(╯°□°)╯︵ ┻━┻
13:32 nine I think the basic parts of Inline::Perl5 and Inline::Python are equally easy to read
13:33 teatime Zoffix: Is this (primarily) for use in a terminal emulator (like xterm or rxvt-unicode)?
13:33 Zoffix This is what I see with the above: http://i.imgur.com/0G0HF0l.png
13:33 timotimo Zoffix: so no support for those boxed numbers emoji?
13:34 Zoffix I have 'Monospace' font that seems to have better support than Deja Vu, but it looks atrocious.
13:35 timotimo as a kid i loved "fixedsys"
13:35 timotimo but unicode wasn't so much a thing back then :P
13:36 teatime if you were on Linux, "monospace" would be a, like, "virtual" font, and inside the (terribly over-complicated) fontconfig config files (which you can customize via iirc ~/.fonts.conf), there would be defined a primary font and then a series of fallback fonts used to implement it.  but I have nfc how that works on windows.
13:37 teatime (it wouldn't surprise me if, for once, the Windows way to accomplish the same thing was actually more sane than the Linux way)
13:38 mst oh gods fonts
13:40 timotimo fonts are a Mighty Sucky Thing, aren't they, mst? :)
13:40 geekosaur I would suspect windows does much the same but through the registry and using uuids
13:42 Su-Shee joined #perl6
13:42 Su-Shee good afternoon. who's the person to talk to about the buildscript of rakudo-star?
13:43 Zoffix \o
13:43 Su-Shee Zoffix: is that a "it's me"? :)
13:43 Zoffix That's a hello :)
13:44 Su-Shee Zoffix: :)
13:44 Zoffix I dunno if there's one person. Just ask the question, I guess.
13:44 Zoffix There's also #perl6-release, I believe.
13:44 Su-Shee Zoffix: too long, I just wanted to prepare said person(s) for a well not quite bug report, but for some buildscript cleanup thing mr shee is on the way of submitting to github...
13:45 CIAvash Zoffix: In my editor, it's falling back to DroidSansFallback to show those characters
13:45 Su-Shee Zoffix: or, rather not too long "something with DESTDIR support is broken" - but what exactly is too long :))
13:45 jameslenz joined #perl6
13:45 Zoffix :)
13:46 mst Su-Shee: heh, DESTDIR fixes are what got my first patch in
13:46 Su-Shee he tried to fix stuff, but after one fix the next problem came up so he stopped ;)
13:46 mst also didn't somebody create a perl6-dev channel for rakudo hacking?
13:46 timotimo we have #p6dev
13:46 mst oh for fuck's sake that's why I couldn't find it
13:47 mst can people please try and get the naming right?
13:47 * mst sobs
13:47 timotimo right, it deviates from the ... :D
13:47 timotimo oh my
13:47 geekosaur iirc the release script was on a "this quick hack worked for me, if it breaks for you then you get to keep the pieces" basis
13:47 Zoffix +1 I too couldn't find it the first time for the same reason
13:47 RabidGravy there there, have a ponie
13:47 Su-Shee mst: I'm not quite up2date, I essentially just politely wanted to warn $person or if it is somebody I know, directly point person A to person B. ;)
13:48 mst Su-Shee: oh, yeah, totally
13:48 Su-Shee geekosaur: well it DOES build things, but it has quirks making it hard to make proper packages with the use of DESTDIR. that's all.
13:48 Zoffix joined #perl6
13:49 Su-Shee I only know because I just made mr shee shorten the 5km long report. ;)
13:49 mst lol
13:49 timotimo Zoffix: perl6.party runs on rakudo? it seems surprisingly snappy compared to last we spoke
13:49 mst I don't think it does anymore
13:49 mst there was a memory leak, so he rewrote everything
13:49 Su-Shee mst: yeah well he was in the middle of explaining what pkgsrc is/does and putting in footnotes and that's never a good sign ;)
13:50 timotimo dang.
13:50 mst Su-Shee: probably not strictly necessary, we do actually know what DESTDIR is, it just doesn't always get exercised as often as it should
13:51 Zoffix timotimo, yeah huge memory leaks (http://irclog.perlgeek.de/perl6/2016-05-08#i_12449184), I saved the P6 version in a separate branch and rewrote the whole thing with Mojolicious.
13:51 Su-Shee mst: I'll just let him submit his stuff, what do I care if netbsd has a proper rakudo package build process :))
13:52 Zoffix Well, that and the fact that you can't have async stuff with Bailador. The in-browser code samples could take up to 20 seconds to run
13:52 timotimo Zoffix: were you still evaling the templates every time a page was requested?
13:53 Zoffix CIAvash, the one download I found tells me "Doesn't look like a valid font file" when I try to install it on Windows :(
13:53 mst Su-Shee: do tell me once the PR's in, I'm something of a netbsd/pkgsrc fan and I'd quite like to keep an eye on it
13:54 Zoffix timotimo, yeah. Though first I had is cached trait on sub that gave me rendered templates. But it's not just that app that leaks. huggable leaks. Its restarter script leaks
13:54 timotimo mhm
13:54 Zoffix At least leaked at that time. I've not re-tried after the fixes you pushed to MoarVM
13:54 mst I'd've rewritten the restarter script in p5
13:55 timotimo the fixes i made were almost exclusively to fix --full-cleanup to give better results, fwiw
13:55 [Tux] left #perl6
13:55 Zoffix Ah
13:55 timotimo not for regular running
13:55 _mg_ joined #perl6
13:55 timotimo so you could use valgrind more helpfully
13:55 timotimo but i do agree we're not doing extremely well with memory usage at the moment
13:57 timotimo i guess i'll check out huggable and look if i find something obvious in the heap explorer
13:57 CIAvash Zoffix: I'm using this package for Arch Linux, https://www.archlinux.org/packages/community/any/ttf-droid/
13:57 Zoffix It seems the leakage happens when she's addressed and generates a response
13:58 timotimo oh lord
13:58 timotimo cloned huggable, "panda installdeps ."
13:58 timotimo SSSPPPPAAAAAAAMMMMMmmmmmmm
13:58 CIAvash Zoffix: Not sure it helps, https://www.archlinux.org/packages/community/any/ttf-droid/download/
13:58 mst SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM
13:58 timotimo ==> huggable depends on IRC::Client, IRC::Client, huggable, IRC::Client::Plugin::Factoid, IRC::Client
13:58 timotimo who sees the problem here ..
13:59 JustinHitla joined #perl6
13:59 Su-Shee mst: oh, it seems the problem is already reported at least twice.
13:59 tadzik I do :)
13:59 timotimo huggable depends on ...Plugin::Hug, which is provided by huggable
13:59 Zoffix huh
13:59 tadzik it's fixed in a branch, fwiw
13:59 tadzik wait what
13:59 kurahaupo joined #perl6
13:59 Su-Shee mst: https://github.com/rakudo/star/issues/65 and the link to the "Open" thing "Rakudo Star: Installation of modules doesn't respect DESTDIR"
13:59 timotimo IRC::Client::Plugin::Hug is in its depends section
13:59 Zoffix Oh, I confused provides with depends :)
13:59 timotimo hah
13:59 RabidGravy doh
14:00 mst Zoffix: you always were a little backwards
14:00 Zoffix Fixed...
14:00 timotimo xiffoz
14:00 timotimo fixfoz
14:00 timotimo fixzof
14:01 JustinHitla I have some text, and I want to get all words from it that contains only specific lettes, "a b c d e f g h i j k l m n" so words that fit are "leaf, leen" but not "leave, noun"
14:01 Zoffix JustinHitla, .words.grep: /<[tehletters]>/
14:01 timotimo so you'll write a regex like / << <[a b c d e f g h i j k l m n]> >> /
14:01 timotimo or that
14:01 kurahaupo "leave" would appear to contain both a and e.
14:01 JustinHitla so I don't even need perl ? I can use grep tool ?
14:02 Zoffix heh
14:02 Zoffix JustinHitla, I guess... but .grep is a method in Perl 6
14:02 JustinHitla kurahaupo: yes, a and e are allowed
14:02 kurahaupo JustinHitla: do you mean "starts with"?
14:02 JustinHitla no, contains any of "allowed" letters
14:02 Zoffix m: say 'The stuff with words'.words.grep: /<[wu]>/
14:02 camelia rakudo-moar ad8265: OUTPUT«(stuff with words)␤»
14:02 JustinHitla I mean "consist" of
14:03 kurahaupo JustinHitla: so explain your "not" example
14:03 timotimo i forgot to put in a + after the <[ ... ]> in my regex
14:03 JustinHitla kurahaupo: other way around, if a word contains at least one letter not in the allowed list it doesn't fit
14:03 Zoffix for "consists of" just negate the match to exclude words that have letters you don't own
14:03 timotimo kurahaupo: leave contains v, which is not in the list of allowed letters
14:03 * teatime pokes Zoffix
14:03 kurahaupo oh, comprises only those letters. just search for anything else and exclude the word
14:04 kurahaupo like ! <[^a-n>]
14:04 kurahaupo >
14:04 timotimo no, we spell that <-[a-n]>
14:05 timotimo Zoffix: what's with the "use lib" in bin/huggable.p6?
14:06 kurahaupo grep -v '[o-z]' on the command line
14:06 timotimo oh
14:06 Zoffix timotimo, I was hacking on IRC::Client
14:07 timotimo won't "use lib 'lib'" in a bin/foo.p6 actually point to bin/lib?
14:07 JustinHitla kurahaupo: but first I need to split the text word by word then
14:07 Zoffix timotimo, I start it with perl6 bin/foo.p6
14:07 pierre_ joined #perl6
14:08 Zoffix timotimo, actually IRC::Client has a bug that might prevent you joining: https://github.com/zoffixznet/perl6-IRC-Client/blob/master/lib/IRC/Client.pm6#L31
14:08 Zoffix Sometiems messages get split onto multiple lines and that MOTD end message never gets reporter
14:08 Zoffix *ed
14:08 Zoffix This new keyboard is starting to get on my nerves :(
14:09 Zoffix I don't know why there are such giant gaps between the keys
14:09 Su-Shee left #perl6
14:09 Zoffix (and keys themselves tiny)
14:09 timotimo hmm
14:09 JustinHitla Zoffix: you can always look at keyboard when typing
14:10 * Zoffix watches timotimo descend into piles of half-arsed Zoffix-ware :)
14:10 timotimo the heap dump profile segfaults because it's stumbling over a somehow-invalid object
14:10 Zoffix JustinHitla, no thanks :)
14:11 RabidGravy over-rated
14:11 timotimo wonder how long it'll take my huggable to join my channel when run under valgrind
14:12 timotimo aha!
14:12 _4d47 left #perl6
14:12 timotimo i now see it sloooowly process each individual message :D
14:15 Zoffix :)
14:15 timotimo it's about 1/2 into the initial welcome stuff
14:16 Zoffix How are you gonna kill it?
14:16 timotimo ctrl-c should be enough
14:16 timotimo i actually forgot --full-cleanup
14:16 timotimo that's not smart
14:16 Zoffix Won't doing that make valgrind show everything as leaked?
14:16 Zoffix ¯\_(ツ)_/¯
14:17 * Zoffix loves the new single-key emoticons :D
14:17 timotimo i was hoping it'd show what or how the object got b0rked. but maybe i'll actually perl6-valgrind-m --profile=heap to get the crash reproduced guaranteed
14:17 kurahaupo JustinHitla: If you already have your words in a Perl (version 6) data structure, then this is the channel to ask. If they're in a file somewhere, ask #bash. If you don't know which version of Perl you're using, you're probably in the wrong place
14:17 timotimo the thing is, it's probably not the kind of leak valgrind would show that happens in the huggable case
14:18 timotimo it's probably objects being kept alive by something we've not thought about clearing out properly
14:18 timotimo for example, when spesh analyzes a piece of code, it'll log a bunch of values. if that piece of code doesn't run often enough to be fully specialized, that record will stick around until the program exits, keeping alive all those intermediate values that are otherwise uninteresting
14:20 timotimo i didn't have to kill huggable
14:20 |2701 joined #perl6
14:20 timotimo it took too long to respond to a PING and the connection was closed
14:20 Zoffix heh
14:21 Zoffix CIAvash, thanks. Got the files, but they still don't install on Windows.
14:27 Zoffix teatime, heh, PragmataPro only costs 200 euros. That's not expensive for a font :)
14:28 Zoffix At $work, I'm using Galaxy Polaris, costs $300 and we used to use Helios, which costs like $500 for all styles :)
14:28 timotimo so crashy :\
14:30 hotel_california joined #perl6
14:30 Zoffix Crashy :S
14:31 timotimo we shouldn't be encountering b0rked objects in the heap profiler. something must have a pointer that's invalid and wouldn't be used normally but the heap analyzer is stumbling over it for some reason .. or something like that?
14:31 timotimo like, if the heap collector crashes, the regular GC should be crashing at the same point in a very similar way
14:32 Zoffix joined #perl6
14:43 cdg joined #perl6
14:44 crucialr_ joined #perl6
14:44 khw joined #perl6
14:45 Zoffix joined #perl6
14:45 crucialr_ joined #perl6
14:47 timotimo ooooh
14:47 timotimo could it be the heap profiler doesn't know about "reframe" yet?
14:47 timotimo that could totally be a thing
14:47 JustinHitla left #perl6
14:48 timotimo hm, but it mostly re-uses what the gc uses, too ...
14:48 timotimo in any case, it crashes reliably :P
14:49 Zoffix :)
14:52 RabidGravy Oooh, I've found the original code to interface with http://www.velleman.eu/products/view/?country=be&amp;lang=en&amp;id=351346 - so it might be able to knock something up without needing to bind all of libusb
14:54 Zoffix Heh: "You may write custom Windows (98SE, 2000, Me, XP) applications in Delphi"
14:58 RabidGravy I made some code years ago in P5 that used Device::USB but it never quite worked right and I was never sufficiently motivated to work out why
15:13 wamba joined #perl6
15:29 sortiz joined #perl6
15:30 kurahaupo joined #perl6
15:31 sortiz \o #perl6
15:37 RabidGravy harr!
15:40 itcharlie joined #perl6
15:40 RabidGravy https://github.com/jonathanstowe/Device-Velleman-K8055-Native - but I think it would be easier just compile a little helper
15:48 dmc00 joined #perl6
15:50 MadcapJake I wonder how difficult it would be to implement this for Perl 6: http://blog.skylight.io/introducing-helix/
15:51 sena_kun joined #perl6
15:51 sena_kun left #perl6
15:52 * mst was planning to do that for perl5 at some point
15:52 mst glad somebody made me some prior art
15:53 teatime Zoffix: fair enough; I'm not a designer (but I am quite interested in design and typography, just not well educated about them), nor do I ever buy fonts.  But since most people only really want it for use in their own personal development environment (and not for use in print layouts, or as a webfont, or for embedding in an application they distribute), $200 seems kinda steep.  However, it does have a very
15:53 teatime accomodating (for a non-free font) license which allows all of the things I mentioned.
15:54 MadcapJake heh, yeah I have no experience with Rust but the author makes a great point that if you're going to provide a module that has some native extensions, shouldn't it be something that you can guarantee will not segfault?
15:54 teatime Zoffix: fwiw, I do beleive it's worth the price, like, intrinsically.  just maybe not worth it for all of the people who would like to use it, if it were free.
15:57 RabidGravy MadcapJake, where would the fun in that be
15:58 MadcapJake haha
16:01 teatime Zoffix: also, I know you said it was OBE, but I sent you an add'l privmsg a while back.
16:08 cognominal joined #perl6
16:09 buharin joined #perl6
16:22 Zoffix joined #perl6
16:44 itaipu joined #perl6
16:46 mspo how can you guarantee it won't segfault if the c code accesses memory it should not?
16:46 mspo crashing is good
16:46 mst mspo: eh?
16:47 mst mspo: this is a thin C layer that binds to rust, where the compiler prevents 'accesses memory it should not'
16:47 mspo mst: okay
16:47 mspo mst: what does it do when libfoo attempts to read outside?
16:48 mst what
16:48 mspo nevermind :)
16:48 mst helix is ruby -> (small C shim) -> rust
16:48 mst there is no libfoo involved
16:49 mspo k
16:51 mst the whole point here is to have what would otherwise have been implemented in C, instead implemented in rust, so the compiler can slap you if you mess up your memory management
16:52 itcharlie left #perl6
16:54 |2701 I like ruby, but ruby and rust are so sjw now
16:56 mst fortunately, if you stay focused on the code, the politics of the people are basically irrelevant no matter where on the spectrum they fall
16:57 MadcapJake mspo: Rust is designed to be very safe and yes as mst states, this is about implementing something in *your* project in Rust for performance (and safety versus implementing it in C)
16:57 |2701 also, rakudo is already on top of llvm, would a helix-esque product actually make p6 any faster?
16:57 * mst tends to regard ruby as a shinier, prettier perl5 except with terribly limited OO
16:57 mst |2701: um. you use the approach to optimise CPU bound stuff
16:57 MadcapJake rakudo is not on top of llvm
16:58 |2701 oh
16:58 |2701 I thought it was
16:58 mst perl6 is built for expressiveness, obviously a language like rust is going to perform better for the tight spots
16:58 |2701 well shit we should fix that
16:58 mst so even if it was using llvm, your question makes no sense
16:59 MadcapJake |2701: http://moarvm.org
16:59 mst rakudo uses moarvm, which is written in C, I'm not sure why you think 'on llvm' is a thing?
17:04 llfourn I've never heard of 'on llvm' either but this post sorta implies it's a thing wrt rakudo: http://brrt-to-the-future.blogspot.com.au/2015/11/moar-jit-news.html
17:07 RabidGravy oh llvm can be an abstract JIT layer for compilers?  cool
17:08 MadcapJake |2701: yes a helix-esque product used when some Perl 6 code bottlenecks would definitely improve your application's performance. The nice things about Rust vs NativeCall would be: [a] Rust is very safe, [b] Rust's compiler allows "zero-cost abstractions", and [c] Rust is modern and around the same performance of C.
17:09 |2701 rust is soaked in sjw nonsense though. it's possible to leverage llvm without resorting to Rust
17:09 itaipu joined #perl6
17:09 llfourn I think that the point is to use Rust not LLVM?
17:09 MadcapJake |2701: seriously that's the most ridiculous argument to not use a technology
17:10 |2701 ok
17:10 RabidGravy I'm not quite sure what the sjw thing has to do with any software
17:10 mst |2701: there are a couple of rust contribs who are visibly oriented in that direction ... and lots who aren't
17:10 mst put the tinfoil hat down and back away slowly
17:10 RabidGravy (I had to goofle mind)
17:11 mst it doesn't
17:12 mst there are apparently people out there who will refuse to use a piece of software because it doesn't have a code of conduct that aligns with their politics
17:12 |2701 absolutely
17:12 MadcapJake I'm not well-versed in LLVM but I don't think you can just "use" it, you have to create your project entirely around it and its tools.
17:12 mst |2701 is merely demonstrating that reversed stupidity is not intelligence by doing the exact same thing from the other direction
17:13 |2701 to call someone stupid because they disagree with you is itself stupid
17:13 |2701 but thanks
17:13 CIAvash joined #perl6
17:13 |2701 I never called you stupid nor insinuated anything of the sort
17:13 mst I didn't call you stupid
17:14 mst I called 'refusing to use a piece of software because it has an insufficiently $politics code of conduct' stupidity
17:14 mst I don't regard boycotting a piece of software for being "too SJW" as making sense any more than boycotting it for being "insufficiently SJW"
17:15 mst it's software, for flying fornication's sake
17:16 |2701 all the more reason politics should be kept out of it, imo
17:16 mst which is why your position is silly, yes :)
17:16 MadcapJake On top of that, to take a few people's outside-of-work perspective on life/liberty and equate it with an *entire* language project is also silly
17:17 |2701 mst, we can talk or you can call me names, but not both
17:17 |2701 i dont *particularly* care which
17:17 mst I'm not calling you names. if you want to be a professional offence taker by twisting words, go join feminist tumblr
17:17 |2701 its childish
17:17 |2701 you are though
17:17 llfourn he called "your position" silly....
17:17 mst precisely
17:17 MadcapJake How about we just leave this discussion completely off the table, it has *nothing* to do with Perl 6 and basically *nothing* to do with programming in general.
17:18 |2701 except that people are catching lawsuits and losing their jobs for not going along with this nonsense
17:18 mst ok, we're done here. this is not remotely on-topic.
17:18 |2701 so you *don't* want to sit around and call me names?
17:19 |2701 just want to be clear here
17:19 mst we're done here. this is not remotely on-topic.
17:19 MadcapJake |2701: no clarity needed, the discussion is over.
17:19 notbenh joined #perl6
17:20 RabidGravy but while we are being totally off-topic does someone want to bring me about ten grey doepfer patch cables (50cm) as I'm all out
17:20 MadcapJake In Wisconsin, this is about the time someone would say "How bout them Packers, eh?"
17:20 RabidGravy "weather's turned out nice again"
17:20 MadcapJake lol
17:20 * psch .oO( did you see that ludicrous display last night? )
17:20 damnlie joined #perl6
17:21 arnsholt I got to show an American friend epic sax guy for the first time last time
17:21 arnsholt Lulz were had!
17:21 MadcapJake arnsholt: what's epic sax guy?
17:21 * MadcapJake googles
17:22 arnsholt https://www.youtube.com/watch?v=apav8vgfxMQ
17:22 mst MadcapJake: I hear they go well with binders
17:23 RabidGravy I hate to to think, puts me in mind of one of those Kenny G on ketamine with a delay pedal that always seem to pitch up at trance events
17:24 RabidGravy (see also crazy bongo guy at house clubs)
17:24 mst I believe the trick is to be on similar amounts of ketamine yourself
17:25 firstdayonthejob joined #perl6
17:25 RabidGravy :-O
17:25 MadcapJake lol arnsholt that is hilarious
17:26 grondilu damn eurovision is so silly
17:26 MadcapJake speaking of ketamine, apparently it's now going to be an anti-depressant :P
17:30 grondilu how do I enumerate the elements of an enum?
17:30 RabidGravy .enums
17:30 grondilu m: my enum abc <a b c>; say abc.enums
17:30 camelia rakudo-moar ad8265: OUTPUT«Map.new((:a(0),:b(1),:c(2)))␤»
17:30 grondilu ok
17:31 llfourn m: my enum abc <a b c>; .say for abc::.keys # this too
17:31 camelia rakudo-moar ad8265: OUTPUT«a␤c␤b␤»
17:31 grondilu interesting syntax
17:32 grondilu m: my enum abc <a b c>; say abc::.WHAT
17:32 camelia rakudo-moar ad8265: OUTPUT«(Stash)␤»
17:32 grondilu never seen a (Stash) before
17:32 llfourn :: is just like .WHO
17:32 llfourn m: my enum abc <a b c>; .say for abc.WHO.keys # this too
17:32 camelia rakudo-moar ad8265: OUTPUT«a␤c␤b␤»
17:32 * grondilu actually never quite tried to understand what WHO does
17:32 llfourn m: my enum abc <a b c>; say abc::c # this too
17:32 camelia rakudo-moar ad8265: OUTPUT«c␤»
17:33 llfourn gives you all child symbols of a package
17:33 grondilu k
17:33 llfourn m: .say for CompUnit::.keys
17:33 camelia rakudo-moar ad8265: OUTPUT«Handle␤PrecompilationDependency␤Loader␤DependencySpecification␤RepositoryRegistry␤PrecompilationUnit␤Repository␤PrecompilationStore␤PrecompilationId␤PrecompilationRepository␤»
17:36 grondilu not related at all, but I find it slightly confusing that the correct syntax for a multi-arg pointy block is -> $a, $b {...} while the syntax for a for loop with two parameters is for @a X @b -> ($x, $y) {...}
17:37 llfourn you don't need the ( ) do you?
17:37 grondilu I think you do
17:37 RabidGravy it unpacks differently
17:37 llfourn m: for ^10 -> $a,$b { }
17:37 camelia rakudo-moar ad8265: ( no output )
17:37 llfourn ah
17:38 llfourn m: for flat 5 X ^ 5 -> $a,$b { say $a,$b }  # then do this?
17:38 camelia rakudo-moar ad8265: OUTPUT«50␤51␤52␤53␤54␤»
17:38 RabidGravy they are different things
17:39 RabidGravy so yeah, all good, not confusing at all
17:40 psch m: my @a = ^2 X ^2; for @a -> $a, $b { say "$a $b"; }; for @a -> ($a, $b) { say "$a $b" }
17:40 llfourn yeah it's kinda cool that you can unpack like that :)
17:40 camelia rakudo-moar ad8265: OUTPUT«0 0 0 1␤1 0 1 1␤0 0␤0 1␤1 0␤1 1␤»
17:41 psch m: my %h = :1a, :2b; for %h -> (:$key, :$value) { say "$key => $value" } # my fav example for unpacking
17:41 camelia rakudo-moar ad8265: OUTPUT«a => 1␤b => 2␤»
17:41 grondilu oh ok the syntax without the parens is ok but with a different semantics then?  I'm fine with that.
17:42 grondilu it's easy to make mistake though
17:42 llfourn psch: oh you can unpack pairs :)
17:42 llfourn it's impossible not to learn new things about p6 every day. It's kinda scary >.<.
17:43 _mg_ joined #perl6
17:43 ugexe everytime i learn something new in perl6 though it forces me to forget some other perl6 thing
17:43 llfourn lol
17:43 llfourn it depends how strangely consistent the new thing is I think
17:45 RabidGravy until yesterday I hadn't realised that there were zippy meta-ops
17:45 RabidGravy i.e.
17:46 RabidGravy m:  say <1 2 3 4> Z+ <5 6 7 8>
17:46 camelia rakudo-moar ad8265: OUTPUT«(6 8 10 12)␤»
17:46 RabidGravy which is cool
17:47 grondilu not related either : say I have cached function like sub f($n) { state $ //= do-stuff($n) };  does it make sense to evaluate it in void context in a BEGIN block to store precomputed values in the compiled file?   Like BEGIN { f($_) for ^10 }   ?
17:47 llfourn Z+ was one of the first bits of magic I ever saw
17:47 grondilu I mean the optimizer is not going to ignore the void context, is it?
17:47 llfourn m: say eager [1], -> @prev { [0, |@prev Z+ |@prev, 0] } ... 10; # pascals triangle
17:47 camelia rakudo-moar ad8265: OUTPUT«([1] [1 1] [1 2 1] [1 3 3 1] [1 4 6 4 1] [1 5 10 10 5 1] [1 6 15 20 15 6 1] [1 7 21 35 35 21 7 1] [1 8 28 56 70 56 28 8 1] [1 9 36 84 126 126 84 36 9 1])␤»
17:47 * grondilu guesses not
17:48 llfourn grondilu: yeah sure why not? But that's what constant $x = ... is for
17:49 psch grondilu: note that this specific example will only assign $ for f(0) (unless that returns Any)
17:49 psch grondilu: i'm assuming that's because it's a minimized example :)
17:49 llfourn oh right. nvm me I didn't get you.
17:50 grondilu well yeah I badly edited that example.  More (state @)[$n] = ...
17:50 grondilu well doing precomp was much easier than I thought in the end.
17:53 llfourn grondilu: I was going to suggest using a lazy list but then I remembered RT #127858 :(
17:53 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=127858
17:55 llfourn o/ #night
17:56 grondilu m: my enum abc <a b c>; say $_ ~~ abc for abc::.enums
17:56 camelia rakudo-moar ad8265: OUTPUT«Method 'enums' not found for invocant of class 'Stash'␤  in block <unit> at /tmp/zVMqMbrbxs line 1␤␤»
17:56 grondilu m: my enum abc <a b c>; say $_ ~~ abc for abc.enums
17:56 camelia rakudo-moar ad8265: OUTPUT«False␤False␤False␤»
17:56 grondilu ^how do I get the list of elements of type abc?
17:59 psch m: my enum abc <a b c>; say ::($_.key) ~~ abc for abc.enums
17:59 camelia rakudo-moar ad8265: OUTPUT«True␤True␤True␤»
17:59 psch i don't know if that does what's asked - i don't really understand the question
17:59 psch i also think it looks a bit horrible :S
18:00 grondilu m: my enum abc <a b c>; say ::(.key) for abc.enums
18:00 camelia rakudo-moar ad8265: OUTPUT«a␤c␤b␤»
18:00 grondilu that looks fine to me.  Thanks.
18:01 * grondilu is a bit surprised by the different order though.
18:01 psch grondilu: it's a Map, which is an immutable Hash, which are unordered
18:01 grondilu yeah
18:02 psch ...well, conceptually it's an immutable Hash, not in the isa sense
18:02 grondilu still it's a bit unexpected for an "enumeration"
18:03 mst m: my enum abc <a b c>; say ::(.key) for abc.enums.sort
18:03 camelia rakudo-moar ad8265: OUTPUT«a␤b␤c␤»
18:15 sortiz m: my enum abc <a b c>; .perl.say for abc::.values; # grondilu, may be what you are looking for?
18:15 camelia rakudo-moar ad8265: OUTPUT«abc::a␤abc::c␤abc::b␤»
18:16 domidumont joined #perl6
18:17 sortiz m: my enum abc <a b c>; say $_ ~~ abc for abc::.values;
18:17 camelia rakudo-moar ad8265: OUTPUT«True␤True␤True␤»
18:18 pmurias joined #perl6
18:19 BenGoldberg joined #perl6
18:20 grondilu m: my enum abc <a b c>; .say for abc.values
18:20 camelia rakudo-moar ad8265: ( no output )
18:20 grondilu m: my enum abc <a b c>; .say for abc::.values
18:20 camelia rakudo-moar ad8265: OUTPUT«a␤c␤b␤»
18:21 grondilu yep that's good too
18:21 sortiz m: my enum abc <a b c>; .perl.say for abc.^enum_value_list; # Or this?
18:21 camelia rakudo-moar ad8265: OUTPUT«abc::a␤abc::b␤abc::c␤»
18:23 a3r0 joined #perl6
18:23 sortiz grondilu, that last is ordered ^^
18:27 dwarring joined #perl6
18:28 pmurias |2701: a helix like project wouldn't make Perl 6 itself any faster. It would allow using fast Rust code
18:29 |2701 I was making the point that LLVM is desired but Rust is not, due to sjw influence. it was already discussed, mst threw a temper tantrum and stomped off.
18:30 |2701 but yes, you are right
18:31 sortiz m: my enum abc <a b c>; say "$_ is { +$_ }" for abc.^enum_value_list; # Shows both numeric value and symbol name.
18:31 camelia rakudo-moar ad8265: OUTPUT«a is 0␤b is 1␤c is 2␤»
18:32 BenGoldberg m: my enum abc <a b c>; a.WHAT.say;
18:32 camelia rakudo-moar ad8265: OUTPUT«(abc)␤»
18:37 pmurias |2701: he was right in that bringing up sjw stuff has no place in the Perl 6 community
18:38 |2701 I disagree
18:38 |2701 but w/e
18:38 |2701 I actually can't use perl6 anyways since it's on github
18:39 grondilu (wth)
18:39 grondilu ^scrap that, sorry
18:42 mst |2701: we already said the SJW stuff was done with. please do not attempt to restart the conversation again.
18:42 |2701 pmurias asked about it, I responded with a summary
18:43 mst you could have summarised the on-topic parts and skipped the politics
18:43 mst in future, please do so
18:44 |2701 the conversation was ABOUT the politics, can you elaborate how I would've done that?
18:44 |2701 what would your phrasing have been>
18:44 mst "my objections to rust are non-technical and the channel has already decided that means they're off topic, so please let's not go there"
18:44 mst not difficult
18:45 * pmurias feels guilty for bringing up that subject again :/
18:45 |2701 no need to feel guilty, mst is the only one making a fuss over a conversation that was finished hours ago
18:45 BenGoldberg joined #perl6
18:45 |2701 you specifically brought it up again to whine about it and ask me not talk about it after I wasn't anyways
18:46 mst the only thing more annoying than irrational crusading feminists is irrational crusading anti-feminists
18:52 mspo github is political?
18:52 RabidGravy who knows? I'm completely confused
18:52 mst I've no idea what his problem with github was - should you care, you're welcome to /msg him to find out
18:53 mspo maybe that HR slideshow thing
18:53 mspo could also be extreme GNU
18:53 mst I don't care
18:53 mspo whatevs ;)
18:53 mst I'm a great believer in there being more than one way to do it when it comes to personal politics too, and I'm not interested in anybody who wants to get absolutism all over the technology for whatever reason
18:56 grondilu amen
18:57 firstdayonthejob joined #perl6
19:02 MasterDuke joined #perl6
19:02 Actualeyes left #perl6
19:04 MasterDuke are there any heuristics for what makes faster nqp code?
19:05 timotimo that's difficult to say without knowing more about what you're looking at
19:05 pmurias MasterDuke: native types: 'my int $foo'
19:05 MasterDuke e.g., in Perl 6 (at least right now), getting rid of curlies by making things postfix if possible
19:06 grondilu MasterDuke: are you talking about pure nqp or nqp-doped Perl 6?
19:06 MasterDuke pure nqp
19:07 timotimo in pure nqp, our optimizer is better about removing curlies, for example
19:07 MasterDuke yeah, i've tried postifixing things and converting to ternaries where possible, no difference
19:08 timotimo are you looking at the output of --target=optimize to guide your experiments?
19:09 MasterDuke i'm timing 'perl6 --profile -e'
19:09 timotimo in that case you're not writing pure nqp code
19:09 timotimo you're still writing perl6 code, just using nqp ops directly
19:10 MasterDuke i'm trying to make the writing of the profile data to file faster
19:10 timotimo the optimization strategy for that is quite different
19:10 timotimo oh, that
19:10 timotimo OK
19:10 timotimo a c-level profile may also be interesting here. like with "perf record -g"
19:10 timotimo to see if it's doing something silly
19:10 timotimo sometimes we have profiles that end up spending 50% or more of the total time in just a single C function implemented in moarvm
19:10 damnlie joined #perl6
19:10 * psch .oO( perl6 --profile -e'exec "$*PERL $program"' )
19:11 psch oh wait
19:11 psch needs another --profile in the Str :P
19:11 timotimo that was the case when we were very sub-optimal about files with extremely long lines, for example
19:11 MasterDuke turtles all the way down
19:12 timotimo the profiler output was also quite a bit slower when it was concatenating the gigantic json string in place, whereas now it prints pieces to the output file and keeps bits in an array
19:12 timotimo that made a big difference, if i recall correctly
19:13 timotimo BTW, if you're okay with writing C instead of NQP, you could try picking up my (very old by now) moarvm branch "finite_callgraph_depth" and making that work
19:13 MasterDuke i tried concatenating a string and printing it occasionally, couple percent slower
19:13 timotimo i could never get it to output sensible values :(
19:14 pmurias MadcapJake: it seems rust allows making functions callable from C code (so NativeCall should work on them)
19:14 MasterDuke that's unlikely to work out well for either the code or me, i'm not a huge fan of c (nor very good at writing it)
19:14 timotimo OK
19:14 timotimo i've gotta go AFK for a bit
19:15 MasterDuke but thanks, it's at least something to investigate
19:15 timotimo it's about summing up data in the callgraph when nodes reach a certain depth
19:16 timotimo in theory, that calculation could be done in the nqp code that pre-processes the call graph
19:16 mr-foobar joined #perl6
19:17 timotimo it takes longer to recompile nqp, though, to get that code into action .. and on top of that you also have to recompile rakudo after nqp
19:17 timotimo when you change moarvm, you don't need to recompile nqp or rakudo
19:26 pecastro joined #perl6
19:33 ssotka joined #perl6
19:39 pecastro joined #perl6
19:40 MadcapJake pmurias: that's interesting! I'll have to give it a try.
19:42 pmurias MadcapJake: the interesting/hard part would be automatic things so it's not necessary to manually write the wrapper (like with c libs)
19:45 dalek joined #perl6
19:45 timotimo o_O
19:46 dalek joined #perl6
19:46 timotimo *seriously*
19:47 dalek joined #perl6
19:48 dalek joined #perl6
19:48 * timotimo removed a few auto-join channels
19:49 timotimo we're potentially using a very old version of this botnix thing, but ... damn, that's *stupid*
19:50 mst insufficient throttling
19:50 mst and, yes, yes it is
19:52 timotimo mst: what's a sensible value for its throttlebps value? currently it was set to 8768, i reduced it to 4096, but the comment says the default value is 256
19:53 mst I'd maybe try setting it to 3600 or so, for 'safely below 4096' and see where you get
19:53 mst it varies between networks, and of course getting reconnected to a closer server can suddenly make a previous throttle insufficient
19:54 ilbot3 joined #perl6
19:54 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!
19:56 hotel joined #perl6
19:58 timotimo hm. dalek probably doesn't pick up configuration changes just because it gets kicked for excess flood
19:58 aries_liuxueyang joined #perl6
19:58 timotimo i'd have to reconnect, re-root, and reboot dalek ... and also add back these other channels to see if it still gets kicked
20:07 arnsholt timotimo++ # looking into fixing dalek
20:07 timotimo arnsholt: i'm not going to touch the bot's code with a very long stick, though :)
20:08 arnsholt Even config changes count! =)
20:09 BenGoldberg joined #perl6
20:10 moritz I know that when I moved dalek from feather to hack, I tried a clean setup first
20:10 moritz failed
20:10 moritz and then simply rsync'ed the directory over
20:10 moritz a nasty mix of git and svn repos with lots of local modifications and untracked files
20:10 moritz grepped for some paths, adjusted them to the new directory, and it worked
20:15 xfix joined #perl6
20:20 timotimo yeah, urgh ;(
20:38 cognominal joined #perl6
20:39 rindolf joined #perl6
20:44 _nadim joined #perl6
20:56 yqt joined #perl6
21:20 hotel_california joined #perl6
21:33 TEttinger joined #perl6
21:41 gobol joined #perl6
21:42 RabidGravy better actually find the K8055 board in the morning to actually test that this code works
21:44 _dolmen_ joined #perl6
21:48 itcharlie joined #perl6
21:50 ssotka joined #perl6
22:07 hotel joined #perl6
22:17 skink joined #perl6
22:46 hotel_california joined #perl6
22:47 dalek doc: 6e28573 | (Jan-Olof Hendig)++ | doc/Language/classtut.pod:
22:47 dalek doc: More broken links fixed
22:47 dalek doc: review: https://github.com/perl6/doc/commit/6e285735cf
22:48 grondilu m: my $x; say $x.WHERE; say -> $y { $y }($x).WHERE;
22:48 camelia rakudo-moar ad8265: OUTPUT«43465288␤43465288␤»
22:49 grondilu m: my $x; ; my $p = -> $y { -> { $y } }($x); my $x = pi; say $p($x)();
22:49 camelia rakudo-moar ad8265: OUTPUT«Potential difficulties:␤    Redeclaration of symbol $x␤    at /tmp/NRiDHZJGvc:1␤    ------> 3; my $p = -> $y { -> { $y } }($x); my $x7⏏5 = pi; say $p($x)();␤Too many positionals passed; expected 0 arguments but got 1␤  in block <unit> at /t…»
22:49 grondilu m: my $x; ; my $p = -> $y { -> { $y } }($x); $x = pi; say $p($x)();
22:49 camelia rakudo-moar ad8265: OUTPUT«Too many positionals passed; expected 0 arguments but got 1␤  in block <unit> at /tmp/Pw89P_KaJI line 1␤␤»
22:50 grondilu m: my $x; my $p = -> $y { -> { $y } }($x); $x = pi; say $p();
22:50 camelia rakudo-moar ad8265: OUTPUT«(Any)␤»
22:50 * grondilu was expecting pi here somehow
22:51 skink Odd. I'm passing a C function a CStruct and its contents seem to get written all out of order, without a consistent pattern
22:52 Zoffix grondilu, you're closing over it before it has any value
22:52 Zoffix well, not over *it* by over the $y with value of $x from when $x isn't yet a pie
22:52 Zoffix m: my $x; $x = pi; my $p = -> $y { -> { $y } }($x); say $p();
22:52 camelia rakudo-moar ad8265: OUTPUT«3.14159265358979␤»
22:53 Zoffix m: my $x; $x = π; my $p = -> $y { -> { $y } }($x); $x = τ; say $p();
22:53 camelia rakudo-moar ad8265: OUTPUT«3.14159265358979␤»
22:53 grondilu yeah but precisely I want to build a closure over an undefined value.
22:53 Zoffix Mission accomplished then :) You do get an undefined value back :D
22:54 grondilu m:  my $x; $x = π; my $p = -> $y { -> { $y } }($x); $x = τ; say $p(); $x = sqrt(2); say $p();
22:54 camelia rakudo-moar ad8265: OUTPUT«3.14159265358979␤3.14159265358979␤»
22:54 Zoffix m: my $x; my $p = -> { $x }; $x = π;  say $p();
22:54 camelia rakudo-moar ad8265: OUTPUT«3.14159265358979␤»
22:54 Zoffix Did you mean this instead?
22:54 grondilu in my last example I was expecting pi and then sqrt'(2)
22:55 grondilu well I was not expecting it with that code but that illustrats my goal.
22:55 Zoffix That expectation is incorrect. You're passing undefined $x as $y parameter to a block that closes over *that $y*, which is undefined, and that block will always return that value. It's no longer linked to $x
22:56 Zoffix My last example is how to close over $x and still keep getting new values when it changes. Your version is a construct made precisely to break that link.
22:56 grondilu hang on
22:57 grondilu that looks a lot like what I was trying to do in my first example.
22:57 Sgeo_ joined #perl6
22:57 caymanboy joined #perl6
22:57 grondilu m: my $x; my $p = -> $y { -> { $y } }($x); $x = pi; say $p();
22:57 camelia rakudo-moar ad8265: OUTPUT«(Any)␤»
22:58 grondilu because I want the closure to be returned by a function.
22:58 Zoffix Interesting. Apparently my fancy keyboard doesn't support 𝑒 :/
22:58 Zoffix .u 𝑒
22:58 yoleaux U+1D452 MATHEMATICAL ITALIC SMALL E [Ll] (𝑒)
22:59 Zoffix Nothing happens when I assign it to a key :/ (and it's not rendering in my font)
22:59 grondilu that is I was expecting -> { $x } to behave exactly like -> $y { -> { $y } }($x)
23:00 Zoffix grondilu, the first closes over $x, the second closes over $y. The first will return different results when $x changes. The second won't, because $y doesn't change.,
23:00 geekosaur is that your keyboard or some other part of the system not handling it?
23:00 Zoffix m: my $x; $x = pi; my $p = -> $y is rw { -> { $y } }($x); $x = τ; say $p();
23:00 camelia rakudo-moar ad8265: OUTPUT«6.28318530717959␤»
23:00 Zoffix grondilu, now this ^ works because $y is directly tied to $x due to is rw
23:01 Zoffix geekosaur, well, I assigned it to the key the same way as I assigned π and τ and nothing happens when I press the key :)
23:01 grondilu oh yeah I had thought of using is rw at some point but forgot about it somehow
23:01 grondilu Zoffix++ thanks
23:02 geekosaur right, my point is if it also doesn't render when displayed, it may be generated fine by the keyboard and something else in the OS chokes on it
23:02 |2701 joined #perl6
23:02 geekosaur (or thinks it's something else, like a multimedia keycode or something silly like that)
23:03 caymanboy joined #perl6
23:04 Zoffix grondilu, err... the `is rw` was just an example for explanation -> $y is rw { -> { $y } }($x);  is just a convoluted way to write  -> { $x }
23:05 grondilu it's not uselessly convoluted.
23:05 Zoffix grondilu, what's the use then?
23:05 grondilu my initial intent was to write multi candidate algebraic operators for undefined numeric values.
23:06 grondilu basically a idea for a polynomials module.
23:07 grondilu something like:  use Polynomials; my Real $x; my $P = 1 + $x*$x; say $P($_) for rand xx *;
23:07 Zoffix k
23:08 Zoffix 𝑒𝑒𝑒𝑒
23:08 Zoffix geekosaur++ changing from "Typing" to "Copy/pasting" mode fixed it. I guess it doesn't know how to "type" a char it doesn't recognize
23:09 grondilu I get an ambiguous call when I try to define multi infix:<*>(Real:U $a, Real:U $b) though.
23:09 geekosaur well, or can type it but the OS won't read it (or something else won't; this comes up a lot with vnc or other remote desktop things, when the remote OS can't figure out what it was just sent_
23:10 geekosaur copy/paste hacks around those os shortcomings
23:10 Zoffix I now have all of these set up as single-key typings: :D πτ𝑒×÷−…∞≅»””’‘¯\_(ツ)_/¯(╯°□°)╯︵ ┻━┻
23:10 Zoffix grondilu, yeah, it'll conflict with the core ones, unfortunately
23:10 geekosaur it's even more fun when you type one key and the OS reads it as something else, which also happens a lot with vnc and non-Western keys :/
23:10 Zoffix You can either use a different char or shadow the core ones by avoiding the multi
23:11 grondilu it works with prefix:<+>(Real:U $) though.  Why the difference?
23:12 Zoffix m: &prefix:<+>.^candidates.say
23:12 camelia rakudo-moar ad8265: OUTPUT«Method 'candidates' not found for invocant of class 'Perl6::Metamodel::ClassHOW'␤  in block <unit> at /tmp/LQoLF8h6nF line 1␤␤»
23:12 Zoffix m: &prefix:<+>.candidates.say
23:12 camelia rakudo-moar ad8265: OUTPUT«(sub prefix:<+> (\a) { #`(Sub|55734360) ... })␤»
23:12 Zoffix m: &prefix:<*>.candidates.say
23:12 camelia rakudo-moar ad8265: OUTPUT«5===SORRY!5=== Error while compiling /tmp/PPrDBD5Uhe␤Undeclared routine:␤    prefix:<*> used at line 1. Did you mean 'prefix:<~>', 'prefix:<->', 'prefix:<+>', 'prefix:<!>', 'prefix:<|>'?␤␤»
23:12 Zoffix m: &infix:<*>.candidates.say
23:12 camelia rakudo-moar ad8265: OUTPUT«(sub infix:<*> ($x = 1) { #`(Sub|59403080) ... } sub infix:<*> (\a, \b) { #`(Sub|59405208) ... } sub infix:<*> (Real \a, Real \b) { #`(Sub|59404752) ... } sub infix:<*> (Int:D \a, Int:D \b --> Int) { #`(Sub+{Callable[Int]}|59403536) ... } sub infix:<*> (in…»
23:13 Zoffix grondilu, ^ there's no ambiguity with prefix +
23:13 grondilu oh ok
23:13 Zoffix It would be handy to have a way to explicitly resolve ambiguities in multies.. Like "if something's ambiguous, use this one"
23:13 Zoffix So you could shadow a specific multi without shadowing all of the multies
23:13 grondilu I don't want to shadow anything.
23:14 grondilu actually I thought I understood but I don't.  There is no double undefined candidate for infix:<*> in the core, is there?
23:16 Zoffix sub infix:<*> (Real \a, Real \b) { #`(Sub|59404752) ... }
23:16 grondilu m: multi f(Real $) { rand }; multi f(Real:U $) { pi }; say f(my Real $);'
23:16 camelia rakudo-moar ad8265: OUTPUT«5===SORRY!5=== Error while compiling /tmp/QlZZMM1vNP␤Unable to parse expression in single quotes; couldn't find final "'" ␤at /tmp/QlZZMM1vNP:1␤------> 3i f(Real:U $) { pi }; say f(my Real $);'7⏏5<EOL>␤    expecting any of:␤        sing…»
23:16 grondilu m: multi f(Real $) { rand }; multi f(Real:U $) { pi }; say f(my Real $);
23:16 camelia rakudo-moar ad8265: OUTPUT«Ambiguous call to 'f'; these signatures all match:␤:(Real $)␤:(Real:U $)␤  in block <unit> at /tmp/0p3_nkR8Qh line 1␤␤»
23:16 grondilu oh I see now
23:17 grondilu I thought Real:U is narrower than Real
23:17 Zoffix I think resolution by smiley is NIY
23:18 grondilu m: multi f(Real $) { rand }; multi f($ where !*.defined) { pi }; say f(my Real $);
23:18 camelia rakudo-moar ad8265: OUTPUT«0.154839716764005␤»
23:18 grondilu ^I guess I could do that.
23:18 Zoffix neat
23:18 grondilu well except it did not work
23:18 Zoffix m: multi f(Real $) { rand }; multi f(Real $ where !*.defined) { pi }; say f(my Real $);
23:18 camelia rakudo-moar ad8265: OUTPUT«3.14159265358979␤»
23:18 Zoffix m: multi f(Real $) { rand }; multi f(Real $ where !*.defined) { pi }; say f(my Real $); say f(my Real $ = 42.0)
23:18 camelia rakudo-moar ad8265: OUTPUT«3.14159265358979␤0.782998108723283␤»
23:18 grondilu oh yeah forgot the Real
23:19 Zoffix Seems to work fine
23:19 grondilu cool
23:19 grondilu basically I can do: subset Monome of Real where !*.defined
23:20 grondilu (though it's "Monomial" in proper English)
23:32 cpage_ joined #perl6
23:52 sufrostico joined #perl6

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

Perl 6 | Reference Documentation | Rakudo