Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-01-23

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:00 ajr_ Thanks AD.
00:00 pierre-vigier joined #perl6
00:07 maslan joined #perl6
00:12 leont joined #perl6
00:16 SCHAAP137 joined #perl6
00:18 cpage_ joined #perl6
00:24 AlexDaniel haha! For years that thing made me laugh. Close your eyes and block your ears, quotes around arguments is the most secure way when using qqx!
00:24 AlexDaniel especially if those are double quotes!
00:24 AlexDaniel from https://perl6advent.wordpress.com/2014/12/06/​day-06-running-external-programs-from-perl-6/
00:24 AlexDaniel my @commit_results = qqx/git commit -am "$message"/.lines;
00:29 revhippie joined #perl6
00:33 ZoffixWin joined #perl6
00:33 ZoffixWin joined #perl6
00:34 ZoffixWin Would you say this C++ program can be done via NativeCall? https://gist.github.com/zoff​ixznet/b896db31ba3d7672edb2
00:35 ZoffixWin I see some custom "types" and objects...
00:35 gfldex btAlignedObjectArray<btCollisionShape*> collisionShapes; <-- template
00:36 ZoffixWin Maybe I'm trying to bite off way too big a piece of pie to chew
00:42 leont ZoffixWin: that C++ is the equivalent of using mid-90s perl code :-/
00:43 ZoffixWin heh
00:43 ZoffixWin It's one of the examples that came with libbullet
00:44 leont There's lots of such code out there (just like with perl5), but I would fire anyone still writing like that in 2016
00:52 skids Looks better than the code most college grads can produce, so I guess you'd be paying rather competitive wages then :-)
00:53 pierre-vigier joined #perl6
01:03 leont I never said I'd succeed at running a company! :-p
01:04 leont (also, for some reason my tolerance for this sort of thing is way lower in C++ than in other languages)
01:22 laz78 joined #perl6
01:28 orbus hey at least it has a lot of comments
01:41 rickbike joined #perl6
01:46 ELBeavers joined #perl6
02:06 xpen joined #perl6
02:32 dalek rakudo-star-daily: 56dc069 | coke++ | log/ (5 files):
02:32 dalek rakudo-star-daily: today (automated commit)
02:32 dalek rakudo-star-daily: review: https://github.com/coke/rakudo​-star-daily/commit/56dc06958f
02:32 dalek rakudo-star-daily: 4959942 | coke++ | log/ (5 files):
02:32 dalek rakudo-star-daily: today (automated commit)
02:32 dalek rakudo-star-daily: review: https://github.com/coke/rakudo​-star-daily/commit/4959942867
02:32 dalek rakudo-star-daily: 0c2eef4 | coke++ | log/ (5 files):
02:32 dalek rakudo-star-daily: today (automated commit)
02:32 dalek rakudo-star-daily: review: https://github.com/coke/rakudo​-star-daily/commit/0c2eef4bf2
02:32 dalek perl6-roast-data: 3e41392 | coke++ | / (6 files):
02:32 dalek perl6-roast-data: today (automated commit)
02:32 dalek perl6-roast-data: review: https://github.com/coke/perl6​-roast-data/commit/3e413926d4
02:45 mcmillhj joined #perl6
02:55 dalek doc: 5dbb3a1 | LLFourn++ | doc/Language/modules.pod:
02:55 dalek doc: separate EXPORT examples
02:55 dalek doc: review: https://github.com/perl6/doc/commit/5dbb3a18f7
02:58 rickbike Geetings Perl6!
03:00 colomon joined #perl6
03:00 timotimo hello there
03:00 rickbike Hash keys can be integers, yeah?
03:00 timotimo you're checking in during sleepy-time for almost most of our devs
03:00 timotimo yeah, but only if you have an "object hash". regular hashes will stringify everything for you
03:01 rickbike The issue I have is how to use an integer hash key in MAIN options
03:01 timotimo you get an object hash literal by writing :{ ... } insetad of just { ... }
03:02 timotimo oh. but args don't actually have a concept of ints
03:02 timotimo as all you get from the OS is strings
03:03 rickbike heres how Main parses options
03:03 rickbike if !$stopped && $passed-value ~~ /^ ( '--' | '-' | ':' ) ('/'?) (<-[0..9\.]> .*) $/ {
03:03 rickbike my ($switch, $negate, $arg) = (~$0, ?((~$1).chars), ~$2);
03:04 timotimo oh
03:04 rickbike So an integer hash key '--42' turns into '-42'
03:04 timotimo so it doesn't like numbered flags
03:04 ggoebel9 joined #perl6
03:04 timotimo at all
03:04 n0xff joined #perl6
03:05 rickbike I filed a bug but I'm trying to understand what the intention is
03:05 timotimo i see the bug
03:05 timotimo just someone assuming you'd never want to have numbers as flags
03:05 timotimo clearly they've never played with ipv6 in their life
03:06 rickbike I have a csv file with years as column headings
03:08 rickbike Not understanding if the fix should allow positive integers
03:08 timotimo what does your CLI design look like that you actually want the keys to correspond to csv header pieces?
03:09 llfourn .tell gfldex I don't seem to be able to subscribe to your blog :S
03:09 yoleaux llfourn: I'll pass your message to gfldex.
03:09 rickbike I want to filter by columns, some of which have integer headers
03:10 n0xff left #perl6
03:10 laz78 joined #perl6
03:10 timotimo why wouldn't it be like --no 42 --no blah --no foobar
03:10 timotimo instead of --42 --blah --foobar ?
03:11 rickbike good point!
03:11 timotimo it's still not cool that you can't have numbers as flags
03:12 rickbike yes
03:12 timotimo especially for -4 and -6
03:16 revhippie joined #perl6
03:18 llfourn .tell gfldex nvm I found it, it's a funny popup thing
03:18 yoleaux llfourn: I'll pass your message to gfldex.
03:34 ELBeavers joined #perl6
03:44 noganex_ joined #perl6
03:45 ParsonsNose joined #perl6
03:51 colomon joined #perl6
03:56 Averna joined #perl6
04:02 dj_goku joined #perl6
04:03 Averna joined #perl6
04:04 Averna joined #perl6
04:04 lsm-desktop joined #perl6
04:07 Herby_ joined #perl6
04:07 Herby_ Evening, everyone!
04:07 Herby_ o/
04:12 Herby_ \o
04:12 Herby_ o/
04:12 timotimo hey herby how are you doing
04:12 Psyche^_ joined #perl6
04:13 Herby_ Doing well, just had some pizza and am about to work on understanding Grammars.  Yourself?
04:13 timotimo my sleep schedule is messed up, so i'm awake at 5am
04:13 timotimo "still" awake
04:14 Herby_ You work nights?
04:14 timotimo no, i work flexibly
04:14 Herby_ ah ok.  Programmer by trade?
04:15 treaki_ joined #perl6
04:15 Herby_ I worked nights in a hospital for  years, threw my sleep schedule out of whack for a long time
04:15 timotimo hehe. yeah, programming is what i do
04:16 jack_rabbit joined #perl6
04:16 Herby_ I'd like to program for a living but I don't think I have the necessary base talent for it
04:16 Herby_ I can write extremely small hacks/scripts but have never completed and released a project in any language
04:17 timotimo it seems like most people who work in programming - or at least those trying to get a job - are actually super crazy useless? or something?
04:17 timotimo i don't really know
04:18 timotimo no clue how small "extremely small" is
04:18 Herby_ lol, its a perfectly legit unit of measurement :)
04:18 Herby_ I'm a nurse but I work with the electronic health records.  I've wrote a couple of small decision support modules, and auditing scripts for work
04:19 Herby_ using perl. rewrote a few in perl 6 before I left
04:19 Herby_ I read an article talking about how easy electronic medical equipment (IV pumps etc...) are to hack
04:20 timotimo ah, yeah
04:20 Herby_ that seems like it would be an interesting field of work
04:20 timotimo may be interesting, but i imagine it'd be hard to get into?
04:21 Herby_ yeah. probably be a free-lancer or consultant of some sort
04:21 Herby_ what languages do you use for your day job?
04:21 timotimo will medical hardware companies actually look for people like that? or accept them if they came knocking on their door?
04:21 timotimo currently javascript; i also expect to be working some java at that job, too
04:21 timotimo before that job i did python
04:22 Herby_ from my limited understanding, the device manufacturers are probably the big players in that. they might hire some "consultants" to poke holes in their solutions, so they can patch it
04:22 timotimo is perl your first language?
04:22 Herby_ Python was my first but I'm at a complete beginner level in it.  Perl and Perl 6 too
04:22 timotimo if you're interested in that topic, there was a talk at the recent chaos communication congress by a lady with an implanted defibrilator and another dude and they talked about how she hacked/investigated
04:23 Herby_ yeah, that stuff really interests me
04:23 timotimo https://media.ccc.de/v/32c3-7273-unpatchable - there you go
04:23 timotimo in english language, too
04:24 Herby_ thanks, got it playing now
04:28 Averna joined #perl6
04:32 ugexe is there a nice way to do bracket matching in regex (yet)?
04:32 lostinfog joined #perl6
04:33 timotimo don't think so :<
04:40 quester joined #perl6
04:55 pierre-vigier joined #perl6
05:09 cpage_ joined #perl6
05:18 timotimo Object of type Tree in QAST::WVal, but not in SC
05:18 timotimo isn't that great?
05:22 ELBeavers joined #perl6
05:29 laz78 joined #perl6
05:30 kaare_ joined #perl6
05:40 pierre-vigier joined #perl6
05:43 mr-foobar joined #perl6
05:46 Cabanossi joined #perl6
05:55 Averna joined #perl6
06:09 laz78 joined #perl6
06:33 ZoffixWin joined #perl6
06:33 ZoffixWin joined #perl6
06:43 ZoffixWin The API version warning in NativeCall is bloody annoying.
06:43 ZoffixWin Can't it just use whatever it can find?
06:44 ZoffixWin I ain't got a version for a lib I'm trying to use.
06:48 pierre-vigier joined #perl6
06:48 ZoffixWin Hm.... what possible problem can it be if I'm getting "Cannot find method 'CALL-ME'" when calling a nativecalled sub? https://gist.github.com/zoff​ixznet/11c536e6956818a694b9
06:55 ZoffixWin m: use NativeCall; sub system (Str) is native {*}; system "ls *foo*"; system q{echo 'what could possibly go wrong' > foo}; system "cat foo";
06:55 camelia rakudo-moar 775271: OUTPUT«ls: cannot access *foo*: No such file or directory␤what could possibly go wrong␤»
06:55 ZoffixWin So much for restricted setting :)
06:55 ZoffixWin m: use NativeCall; sub system (Str) is native {*}; system "rm foo"
06:55 camelia rakudo-moar 775271: ( no output )
06:55 ZoffixWin ^ moritz dunno if there's a way to make that stop working
06:58 sortiz \o #perl6
07:00 ZoffixWin \o
07:01 sortiz ZoffixWin, As far as MoarVM don't have more powers/privileges that the invoking user, I don't see any problem.
07:02 sortiz Unless you are talking about camelia ;)
07:02 ZoffixWin or installation of botnets or email spam bots.
07:02 sammers joined #perl6
07:03 ZoffixWin I can just use camelia add my public key and then ssh and I got a free, internet-connected box
07:03 sortiz That the use case of Restricted.settings, no?
07:03 ZoffixWin But even a plain old rm -fr ran by a curious idiot leads to a lot of work restoring things
07:03 ZoffixWin I guess.
07:03 ZoffixWin You can use `run` to do those things.
07:04 ZoffixWin m: run 'ls';
07:04 camelia rakudo-moar 775271: OUTPUT«run is disallowed in restricted setting␤  in sub restricted at src/RESTRICTED.setting line 1␤  in sub run at src/RESTRICTED.setting line 14␤  in block <unit> at /tmp/7ILeTngF3O line 1␤␤»
07:04 domidumont joined #perl6
07:05 sortiz I see something of that kind happen the other day, and someone has to enter rescue mode.
07:06 ZoffixWin Yeah, the chmod stuff. But at least that's easy to fix
07:06 ZoffixWin (unless something else happened)
07:09 sortiz I hope all that can be ironed in time.
07:09 pierre-vigier m: sub t( *@x) { say @x;} ; t(1..2);t(1..2,5..7);
07:09 camelia rakudo-moar 775271: OUTPUT«[1 2]␤[1 2 5 6 7]␤»
07:10 ggoebel10 joined #perl6
07:10 pierre-vigier m: sub t(@l1,@l2) { say @l1;say @l2} t( (1..3,5..7) , (1,2,4) );
07:10 camelia rakudo-moar 775271: OUTPUT«5===SORRY!5=== Error while compiling /tmp/p3o3M9Cci0␤Strange text after block (missing semicolon or comma?)␤at /tmp/p3o3M9Cci0:1␤------> 3sub t(@l1,@l2) { say @l1;say @l2}7⏏5 t( (1..3,5..7) , (1,2,4) );␤    expecting any of:␤        inf…»
07:11 pierre-vigier m: sub t(@l1,@l2) { say @l1;say @l2} ;t( (1..3,5..7) , (1,2,4) );
07:11 camelia rakudo-moar 775271: OUTPUT«(1..3 5..7)␤(1 2 4)␤»
07:11 ELBeavers joined #perl6
07:11 domidumont joined #perl6
07:11 pierre-vigier In the second case, is there any way to auto flatten? a bit like the slurpy *@ ?
07:12 ZoffixWin m: sub t(@l1,@l2 ) { say @l1.flat;say @l2.flat} ;t( (1..3,(3,4),5..7) , (1,2,4) );
07:13 camelia rakudo-moar 775271: OUTPUT«(1 2 3 3 4 5 6 7)␤(1 2 4)␤»
07:13 ZoffixWin No idea about "auto"
07:14 pierre-vigier m: sub t( Iterable $l1, Iterable $l2 ) { say $l1; say $l2 }; t(1..4,[3,5,6..8]);
07:14 camelia rakudo-moar 775271: OUTPUT«1..4␤[3 5 6..8]␤»
07:15 ZoffixWin m: sub t( Slip $l1, Slip $l2 ) { say $l1; say $l2 }; t(1..4,[3,5,6..8]);
07:15 camelia rakudo-moar 775271: OUTPUT«Type check failed in binding $l1; expected Slip but got Range␤  in sub t at /tmp/TsApXVTUje line 1␤  in block <unit> at /tmp/TsApXVTUje line 1␤␤»
07:15 pierre-vigier m: sub t( Iterable $l1, Iterable $l2 ) { say $l1.flat; say $l2.flat}; t(1..4,[3,5,6..8]);
07:15 camelia rakudo-moar 775271: OUTPUT«(1 2 3 4)␤(3 5 6..8)␤»
07:16 pierre-vigier but is it even a good idea to accept an Iterable ...
07:17 ZoffixWin Hm, here's a stacktrace for my CALL-ME issue with NativeCall.. still no idea what's wrong :( https://gist.github.com/zoffixznet/11c​536e6956818a694b9#gistcomment-1678167
07:17 rickbike joined #perl6
07:18 ZoffixWin Maybe using fancy UI libs isn't really that easy with NativeCall :/
07:20 CIAvash joined #perl6
07:22 pierre-vigier m: sub t(@l1,@l2 ) { say @l1.flat;say @l2.flat}; my @a = 1,2,3; my @b = 1..3; t(@a,@b);
07:22 camelia rakudo-moar 775271: OUTPUT«(1 2 3)␤(1 2 3)␤»
07:22 pierre-vigier m: sub t(@l1,@l2 ) { say @l1.flat;say @l2.flat}; my @a = 1,2,3; my @b = 1..3,5; t(@a,@b);
07:22 camelia rakudo-moar 775271: OUTPUT«(1 2 3)␤(1..3 5)␤»
07:22 azawawi joined #perl6
07:22 azawawi good morning #perl6
07:22 ZoffixWin \o
07:22 ZoffixWin Is it morning already? :)
07:23 ZoffixWin m: sub t(@l1,@l2 ) { say @l1.flat;say @l2.flat}; my @a = 1,2,3; my @b = 1..3,5; t(|@a,|@b);
07:23 camelia rakudo-moar 775271: OUTPUT«Too many positionals passed; expected 2 arguments but got 5␤  in sub t at /tmp/yeDMydqS00 line 1␤  in block <unit> at /tmp/yeDMydqS00 line 1␤␤»
07:23 ZoffixWin mmkay
07:25 pierre-vigier m: say (DateTime.new(now).hour <= 12)??"morning"!!"afternoon";
07:25 camelia rakudo-moar 775271: OUTPUT«morning␤»
07:26 pierre-vigier m: sub t(@l1,@l2 ) { say @l1.flat;say @l2.flat}; my @a = 1,2,3; my @b = |1..3,5; t(@a,@b);
07:26 camelia rakudo-moar 775271: OUTPUT«(1 2 3)␤(1..3 5)␤»
07:27 pierre-vigier m: sub t(@l1,@l2 ) { say @l1.values;say @l2.values}; my @a = 1,2,3; my @b = |1..3,5; t(@a,@b);
07:27 camelia rakudo-moar 775271: OUTPUT«(1 2 3)␤(1..3 5)␤»
07:27 ZoffixWin m: say DateTime.new(now).hour
07:27 camelia rakudo-moar 775271: OUTPUT«7␤»
07:27 pierre-vigier m: sub t(@l1,@l2 ) { say @l1.fmt;say @l2.fmt}; my @a = 1,2,3; my @b = |1..3,5; t(@a,@b);
07:27 camelia rakudo-moar 775271: OUTPUT«1 2 3␤1 2 3 5␤»
07:27 ggoebel10 joined #perl6
07:28 pierre-vigier hum strange, fmt for the display is flatening
07:28 pierre-vigier maybe i should check the implementation of fmt
07:30 quester Actually... could it be that you're confusing 1..3, which is a Range, with 1...3, which is a Seq?  The Seq behaves somewhat more like a List than a Range does.  Just a thought.
07:30 ZoffixWin (╯°□°)╯︵┻━┻ no idea why I'm having this issue with NativeCall
07:31 pierre-vigier oh, ... might be the solution
07:31 pierre-vigier m: say (1..2).WHAT
07:31 camelia rakudo-moar 775271: OUTPUT«(Range)␤»
07:31 pierre-vigier m: say (1..>2).WHAT
07:31 camelia rakudo-moar 775271: OUTPUT«5===SORRY!5=== Error while compiling /tmp/F7rbi26MsY␤Preceding context expects a term, but found infix > instead␤at /tmp/F7rbi26MsY:1␤------> 3say (1..>7⏏2).WHAT␤»
07:31 pierre-vigier m: say (1...2).WHAT
07:31 camelia rakudo-moar 775271: OUTPUT«(Seq)␤»
07:31 ZoffixWin I was planning to write about how Perl 6 lets you easily use C libs so you don't have to know a lot of C.... but, looks like that's wishful thinking.
07:31 ZoffixWin I've no idea what I'm doing :)
07:31 pierre-vigier thanks for telling me about ...
07:32 pierre-vigier m: sub t(@l1,@l2 ) { say @l1.fmt;say @l2.fmt}; my @a = 1,2,3; my @b = 1...3,5; t(@a,@b);
07:32 camelia rakudo-moar 775271: OUTPUT«1 2 3␤1 2 3 5␤»
07:32 pierre-vigier indeed, working
07:32 quester Glad it helped.
07:33 pierre-vigier Found a bug in http://doc.perl6.org/
07:33 pierre-vigier where to report?
07:33 ZoffixWin https://github.com/perl6/doc
07:33 pierre-vigier thank you
07:33 wtw joined #perl6
07:33 pierre-vigier try to search ... in the doc, and click on it
07:33 pierre-vigier it redirects to http://doc.perl6.org/routine/...
07:34 ZoffixWin That's a known bug: https://github.com/perl6/doc/issues/155
07:35 pierre-vigier indeed
07:36 psy__ joined #perl6
07:38 quester left #perl6
07:40 dalek doc: 7afd9be | (James ( Jeremy ) Carman)++ | doc/Type/Str.pod:
07:40 dalek doc: Fixed a typo.
07:40 dalek doc: review: https://github.com/perl6/doc/commit/7afd9bea54
07:40 dalek doc: 87d76f8 | (Zoffix Znet)++ | doc/Type/Str.pod:
07:40 dalek doc: Merge pull request #361 from peelle/patch-1
07:40 dalek doc:
07:40 dalek doc: Fixed a typo.
07:40 dalek doc: review: https://github.com/perl6/doc/commit/87d76f8295
07:41 azawawi ZoffixWin: yup it is morning and im drinking morning coffee :)
07:41 ZoffixWin It's 2:41AM here and I'm drinking my 2:41AM coffee :)
07:41 azawawi ZoffixWin: busy fixing appveyor.yml for MagickWand Windows support
07:44 MadcapJake ZoffixWin: what was the problem you had with Atom?
07:45 ZoffixWin MadcapJake, seems a regression from way back: https://github.com/atom/atom/issues/10554
07:45 ZoffixWin Unless I'm just the one unlucky one who stumbled on an old bug
07:47 MadcapJake potential workaround: https://github.com/atom/atom/is​sues/3622#issuecomment-73421592
07:48 ZoffixWin Yeah, that didn't work
07:48 MadcapJake do you use vim-mode?
07:49 ZoffixWin Probably not. It's a fresh install. All I've done is add your Perl 6 highlights and change theme from dark to light (it's broken on dark themes too)
07:49 ZoffixWin (and it's broken on C code too)
07:50 MadcapJake what OS and version of Atom?
07:50 ZoffixWin Atom 1.4.0 on Bodhi Linux 3.1.1 (fork of Ubuntu 14.04, trusty), running inside VirtualBox on Windows7
07:51 MadcapJake glad you opened a new issue! not sure on that one :S that is a real bummer!
07:59 azawawi Doing a 'rakudobrew build moar' on Travis CI Mac OSX VMs is like 3 times slower (5 min -> 15 min) to Linux VMs
08:00 ggoebel11 joined #perl6
08:01 azawawi see https://travis-ci.org/azawawi/pe​rl6-magickwand/builds/104252845
08:01 ZoffixWin But are they the same type of boxes? I heard Apple allows you run a Mac OSX VM only on Apple's hardware.
08:01 pierre-vigier joined #perl6
08:01 ZoffixWin So I figure Travis bought crappy, slow, and cheap apple boxes, but run Linux of fast hardware
08:01 azawawi i think it is the memory
08:01 ZoffixWin Ah
08:02 rindolf joined #perl6
08:03 azawawi to be honest, why am i testing building of perl6 on my perl6 module...
08:03 azawawi we should be focusing on better stuff like a debian pkg for rakudo star
08:04 azawawi and an msi/exe for windows
08:04 azawawi appveyor (windows) is slow also see build times https://ci.appveyor.com/project/aza​wawi/perl6-magickwand/build/1.0.40
08:04 azawawi Stage parse      : 166.610
08:05 ZoffixWin There was an updated on that topic on our FB page: https://www.facebook.com/groups/159544​3877388632/permalink/1690576654542020/
08:06 pierre-vigier m: my @a=0,1,2,3,4,5,6,7,8;say @a[1..3,6];
08:06 camelia rakudo-moar 775271: OUTPUT«((1 2 3) 6)␤»
08:06 ZoffixWin If it's a module, that doesn't matter, since it'll be precompiled.
08:06 pierre-vigier m: my @a=0,1,2,3,4,5,6,7,8;say @a[1...3,6];
08:06 camelia rakudo-moar 775271: OUTPUT«(1 2 3 6)␤»
08:06 pierre-vigier m: my @a=0,1,2,3,4,5,6,7,8;say @a[^3,6];
08:06 camelia rakudo-moar 775271: OUTPUT«((0 1 2) 6)␤»
08:07 pierre-vigier m: my @a=0,1,2,3,4,5,6,7,8;say @a[^3.Seq,6];
08:07 camelia rakudo-moar 775271: OUTPUT«Potential difficulties:␤    Precedence of ^ is looser than method call; please parenthesize␤    at /tmp/ZbHZ1p8tcp:1␤    ------> 3my @a=0,1,2,3,4,5,6,7,8;say @a[^37⏏5.Seq,6];␤Method 'Seq' not found for invocant of class 'Int'␤  in block <un…»
08:07 pierre-vigier m: my @a=0,1,2,3,4,5,6,7,8;say @a[(^3).Seq,6];
08:07 camelia rakudo-moar 775271: OUTPUT«Method 'Seq' not found for invocant of class 'Range'␤  in block <unit> at /tmp/lcBbVvnhBX line 1␤␤»
08:07 pierre-vigier m: my @a=0,1,2,3,4,5,6,7,8;say @a[(^3).values,6];
08:07 camelia rakudo-moar 775271: OUTPUT«((0 1 2) 6)␤»
08:07 pierre-vigier m: my @a=0,1,2,3,4,5,6,7,8;say @a[(^3).lsit,6];
08:07 camelia rakudo-moar 775271: OUTPUT«Method 'lsit' not found for invocant of class 'Range'␤  in block <unit> at /tmp/Tkxgf5qHd8 line 1␤␤»
08:08 pierre-vigier m: my @a=0,1,2,3,4,5,6,7,8;say @a[(^3).list,6];
08:08 camelia rakudo-moar 775271: OUTPUT«((0 1 2) 6)␤»
08:08 pierre-vigier m: my @a=0,1,2,3,4,5,6,7,8;say @a[(^3).List,6];
08:08 camelia rakudo-moar 775271: OUTPUT«((0 1 2) 6)␤»
08:08 ZoffixWin m: my @a=0,1,2,3,4,5,6,7,8;say @a[^3 .Slip,6];
08:08 camelia rakudo-moar 775271: OUTPUT«(0 1 2 6)␤»
08:09 ZoffixWin huggable, slip
08:09 huggable ZoffixWin, nothing found
08:09 ZoffixWin huggable, Slip
08:09 huggable ZoffixWin, class Slip [A kind of List that automatically flattens into an outer container]: http://doc.perl6.org/type/Slip
08:10 pierre-vigier i always forgot that one
08:11 azawawi ZoffixWin: also one more observation about appveyor and travis ci macosx builds, their output is buffered somehow. they need a flush :)
08:12 pierre-vigier m: my @a=0,1,2,3,4,5,6,7,8;say @a[!^3,6];
08:12 camelia rakudo-moar 775271: OUTPUT«(0 6)␤»
08:12 pierre-vigier m: my @a=0,1,2,3,4,5,6,7,8;say @a[|^3,6];
08:12 camelia rakudo-moar 775271: OUTPUT«(0 1 2 6)␤»
08:13 brrt joined #perl6
08:14 azawawi also we need to upload https://chocolatey.org/packages?q=rakudo :)
08:14 azawawi 2014.12.1 is way too old
08:14 azawawi choco install rakudostar
08:15 azawawi :)
08:15 ZoffixWin :o
08:16 azawawi 103 downloads is not bad
08:16 azawawi for windows that is
08:16 azawawi everyone dismisses windows but then again a lot of business is on windows
08:17 darutoko joined #perl6
08:17 azawawi e.g. here in the middle east region it is windows-based
08:18 ZoffixWin I dismiss it with my Perl 5 modules because there are always some weird, hard-to-reproduce, sporadic bugs
08:19 azawawi ZoffixWin: because they was no build environment for you to test
08:19 azawawi ZoffixWin: now there is
08:19 hankache joined #perl6
08:20 ZoffixWin hm? I had a Windows in a VM, but I often could not reproduce the reports I got from smokers
08:20 ZoffixWin Not to mention the coredumps when fork + unicode is involved
08:21 hankache hola #perl6
08:21 ZoffixWin \o
08:22 azawawi ZoffixWin: true, because you didnot have all the OS matrix...
08:23 azawawi ZoffixWin: s/didnot/did not/
08:23 ZoffixWin How can I get rid of the nagging NativeCall warning?
08:23 hankache what was the Parcel type?
08:23 ZoffixWin The version one
08:23 ZoffixWin huggable, Parcel
08:23 huggable ZoffixWin, nothing found
08:24 ZoffixWin If I explicitly add v1, I get "Cannot locate native library 'libcpuid.so.1'"
08:26 yeahnoob joined #perl6
08:27 azawawi ZoffixWin: find /usr/lib/ -name "*libcpuid*" ?
08:28 ZoffixWin lrwxrwxrwx 1 root root 18 Jan 23 03:15 /usr/local/lib/libcpuid.so -> libcpuid.so.11.1.2
08:28 ZoffixWin But what if the user of my module has 11.1.1?
08:28 ZoffixWin I really don't understand why this warning was added.
08:29 azawawi ZoffixWin: i hate it
08:29 cxreg ZoffixWin: wouldn't it be v11, not v1?
08:29 azawawi ZoffixWin: symbolic links were added for a reason... why should i care about the libfoo version if it works :)
08:30 cxreg well actually, those symbolic links are for compilation, not for runtime
08:30 cxreg versioned shared libraries are what separates us from the animals.  and microsoft.
08:31 abaugher joined #perl6
08:31 ZoffixWin cxreg, that works, but that makes the warning even more pointless. If I can ignore the difference between a subset of versions, I, as a programmer, should have a choice to ignore all versions.
08:31 azawawi cxreg: well, it complicates installation/detection procedures and wastes valuable development time :)
08:31 cxreg ZoffixWin: no argument on that point
08:31 cxreg you should be _allowed_ to not care
08:31 cxreg even though it may result in breakage
08:33 pierre-vigier joined #perl6
08:33 cxreg ZoffixWin: but to quibble, "the difference between a subset of versions" is what semver is all about
08:33 cxreg not pointless at all
08:34 cxreg not to say that all project maintainers actually follow the rules responsibly :P
08:34 ZoffixWin What about libs that don't use semver or don't follow the rules? What if I'm using a sub that hasn't changed?
08:34 ZoffixWin huggable, Version
08:34 huggable ZoffixWin, class Version [Module version descriptor]: http://doc.perl6.org/type/Version
08:35 ZoffixWin There's probably a way to specify "any" version
08:35 cxreg ZoffixWin: again, I agree with your basic point, but there's at least some reason behind why it's there
08:35 ZoffixWin m: say (v*).WHAT
08:35 camelia rakudo-moar 775271: OUTPUT«5===SORRY!5=== Error while compiling /tmp/KG7RQ3qUs7␤Missing required term after infix␤at /tmp/KG7RQ3qUs7:1␤------> 3say (v*7⏏5).WHAT␤    expecting any of:␤        prefix␤        term␤»
08:35 ZoffixWin m: say (v.*).WHAT
08:35 camelia rakudo-moar 775271: OUTPUT«5===SORRY!5=== Error while compiling /tmp/kzqEgGRwxr␤Malformed postfix call␤at /tmp/kzqEgGRwxr:1␤------> 3say (v.*7⏏5).WHAT␤»
08:36 cxreg maybe you could even specify version ranges or something.  lots of precedent here.
08:36 ZoffixWin Looking at the source, it wants a Version object
08:36 azawawi is native(&callable)
08:37 azawawi ZoffixWin: https://github.com/azawawi/perl6-magickwand/b​lob/master/lib/MagickWand/NativeCall.pm6#L10
08:38 ZoffixWin cxreg, I'd say the logic for that warning's existence is not sound. { say Nil eq 'foo' } generates a warning because comparing Nil with a string looks fishy and there's high likelyhood of an error in my code... Warning that it'd be better to specify an API version is attempting to shove someone's "best practice" down the programmer's throat.
08:38 hankache joined #perl6
08:38 cxreg I didn't add the warning o_O
08:38 ZoffixWin I'm just saying.
08:39 ZoffixWin It's also helpful to point out it's 3:39AM here... and I'm a bit cranky :P
08:39 cxreg this is the third time i'm telling you I agree :P  don't need to convince me
08:40 azawawi :)
08:40 azawawi i hate "best practice" :)
08:40 cxreg that MagickWand example looks useful if tedious
08:41 azawawi i know... my objective now to make it work on all platforms (windows, linux, mac osx)
08:41 cxreg maybe that could be golfed to a pointy block with concise syntax
08:42 cxreg for simple cases
08:42 firstdayonthejob joined #perl6
08:43 azawawi that's the problem with cross-platform... dont optimize until you figure out that it is working or not :)
08:47 azawawi the library revisions is like 1% of the total effort i need to work on to complete the wrapper library for all functions along with the OO interface
08:48 * azawawi is working on making "https://ci.appveyor.com/proj​ect/azawawi/perl6-magickwand" work :)
08:48 ZoffixWin Actually v11 only works because I have another simlink with libcpuid.so.11
08:51 ZoffixWin m: say so (Version.new: *).Str eq '*'
08:51 camelia rakudo-moar 775271: OUTPUT«True␤»
08:52 ZoffixWin m: say so (Version.new: *) eq '*'
08:52 camelia rakudo-moar 775271: OUTPUT«True␤»
08:59 ZoffixWin Rakudobugged https://rt.perl.org/Ticket/Display.html?id=127354 and submitted two possible PRs: removing the warning entirely: https://github.com/rakudo/rakudo/pull/691
08:59 ZoffixWin PR or use '*' version to mean 'any version': https://github.com/rakudo/rakudo/pull/692
08:59 ELBeavers joined #perl6
09:00 dalek doc: f134e9e | (Wenzel P. P. Peppmeyer)++ | doc/Language/5to6-nutshell.pod:
09:00 dalek doc: get heading level in 5to6-nutshell in line with the other 5to6-*
09:00 dalek doc: review: https://github.com/perl6/doc/commit/f134e9e892
09:11 lokien_ joined #perl6
09:16 masak antenoon, #perl6
09:17 bowtie joined #perl6
09:18 ZoffixWin \o
09:19 sortiz \o
09:30 ZoffixWin How do you use an enum?
09:30 ZoffixWin m: enum cpu_vendor_t (VENDOR_INTEL => 0, 'VENDOR_AMD', 'NUM_CPU_VENDORS', VENDOR_UNKNOWN => -1); say cpu_vendor_t<VENDOR_UNKNOWN>
09:30 camelia rakudo-moar 775271: OUTPUT«(Any)␤»
09:31 pierre-vigier joined #perl6
09:31 ZoffixWin m: enum cpu_vendor_t (VENDOR_INTEL => 0, 'VENDOR_AMD', 'NUM_CPU_VENDORS', VENDOR_UNKNOWN => -1); say VENDOR_INTEL == 0
09:31 camelia rakudo-moar 775271: OUTPUT«True␤»
09:31 Juerd m: enum foo (a => 0, <b c d>); say a; say b;
09:31 camelia rakudo-moar 775271: OUTPUT«5===SORRY!5=== Error while compiling /tmp/8n6ldnAelu␤Undeclared routine:␤    b used at line 1␤␤»
09:31 ZoffixWin m: enum cpu_vendor_t (VENDOR_INTEL => 0, 'VENDOR_AMD', 'NUM_CPU_VENDORS', VENDOR_UNKNOWN => -1); say VENDOR_UNKNOWN == -1
09:31 camelia rakudo-moar 775271: OUTPUT«True␤»
09:31 ZoffixWin I see.
09:32 Juerd m: enum foo (<a b c d>); say a; say b;
09:32 camelia rakudo-moar 775271: OUTPUT«a␤b␤»
09:32 Juerd m: enum foo (<a b c d>); say a == 0; say b == 1;
09:32 camelia rakudo-moar 775271: OUTPUT«True␤True␤»
09:32 Juerd m: enum foo (<a b c d>); say foo<2>;
09:32 camelia rakudo-moar 775271: OUTPUT«(Any)␤»
09:32 Juerd m: enum foo (<a b c d>); say foo<c>;
09:32 camelia rakudo-moar 775271: OUTPUT«(Any)␤»
09:32 Juerd Hmm.
09:32 Juerd m: enum foo (<a b c d>); say foo<x>;
09:32 camelia rakudo-moar 775271: OUTPUT«(Any)␤»
09:33 Juerd m: enum foo (<a b c d>); say foo(2);
09:33 camelia rakudo-moar 775271: OUTPUT«c␤»
09:33 Juerd Ah, that was it
09:33 Juerd I don't understand the (Any) though.
09:33 ZoffixWin m: enum foo (a => 0, 'b', 'c', 'd'); say a; say b
09:33 camelia rakudo-moar 775271: OUTPUT«a␤b␤»
09:34 ZoffixWin I kinda wonder why the a => 0, <b c d> doesn't work
09:34 Juerd ZoffixWin: Because that's two elements...
09:34 ZoffixWin m: enum foo (a => 0, |<b c d>); say a; say b
09:34 Juerd m: enum foo (a => 0, |<b c d>); say a; say b;
09:34 camelia rakudo-moar 775271: OUTPUT«5===SORRY!5=== Error while compiling /tmp/tujrELdX6v␤Undeclared routine:␤    b used at line 1␤␤»
09:34 camelia rakudo-moar 775271: OUTPUT«5===SORRY!5=== Error while compiling /tmp/LtScsnggsI␤Undeclared routine:␤    b used at line 1␤␤»
09:34 Juerd Heh.
09:34 Juerd m: enum foo (flat a => 0, <b c d>); say a; say b;
09:34 camelia rakudo-moar 775271: OUTPUT«===SORRY!===␤Unexpected named parameter 'a' passed␤»
09:34 Juerd I give up :)
09:34 ZoffixWin m: enum foo (a => 0, <b c d>.Slip); say a; say b
09:34 camelia rakudo-moar 775271: OUTPUT«5===SORRY!5=== Error while compiling /tmp/PoYwp8MbT0␤Undeclared routine:␤    b used at line 1␤␤»
09:35 ZoffixWin m: enum foo (a => 0, (<b c d>).Slip); say a; say b
09:35 camelia rakudo-moar 775271: OUTPUT«5===SORRY!5=== Error while compiling /tmp/qehDRH_qm4␤Undeclared routine:␤    b used at line 1␤␤»
09:35 ZoffixWin *shrug*
09:36 Juerd It's a declaration. You never get nice things when declaring variables :P
09:36 Juerd Although Perl <6 had a time where you'd get unofficial and unreliable state variables that were fun
09:36 Juerd (my $foo if 0;)
09:41 masak I wouldn't classify that as a "nice thing"
09:42 masak in other news, writing tests to increase coverage can be used for good -- it's making me write tests I definitely wouldn't have thought of on my own
10:03 masak m: enum Foo << :a(0) b c d >>; say a; say b; say +a; say +b
10:03 camelia rakudo-moar 775271: OUTPUT«a␤b␤0␤1␤»
10:03 masak Juerd, ZoffixWin: ^
10:03 masak (granted, your forms ought probably to work as well)
10:03 hankache how do i get rid of this warning? NativeCall: Consider adding the api version of the library you want to use,
10:04 ZoffixWin lmao
10:04 pierre-vigier joined #perl6
10:05 ZoffixWin hankache, we've just had a heated discussion on the topic: http://irclog.perlgeek.de/p​erl6/2016-01-23#i_11928779
10:05 ZoffixWin Which resulted in a rakudobug and two potential PRs: https://rt.perl.org/Ticket/Display.html?id=127354
10:05 ZoffixWin And two answer your question: at the moment, specify version.
10:05 ZoffixWin masak, thanks
10:07 bowtie joined #perl6
10:08 secwang joined #perl6
10:10 RabidGravy joined #perl6
10:13 SCHAAP137 joined #perl6
10:13 azawawi https://ci.appveyor.com/proj​ect/azawawi/perl6-magickwand  # now passing on windows 7 64-bit (AppVeyor CI) :)
10:14 azawawi initial template for testing on windows (for Perl 6 modules) https://github.com/azawawi/perl6-m​agickwand/blob/master/appveyor.yml
10:16 dalek doc: 17bcb7d | (Zoffix Znet)++ | doc/Language/nativecall.pod:
10:16 dalek doc: Grammar
10:16 dalek doc: review: https://github.com/perl6/doc/commit/17bcb7df76
10:16 ZoffixWin azawawi, how did you install Perl 6 on Windows?
10:16 azawawi https://github.com/azawawi/perl6-m​agickwand/blob/master/appveyor.yml  :)
10:17 ZoffixWin I see
10:17 azawawi you need to remove three lines and you're ready :)
10:18 azawawi that's why i said we need to update https://chocolatey.org/packages?q=rakudo
10:18 azawawi choco install rakudostar # and we're done
10:18 azawawi MadcapJake++
10:19 ZoffixWin Do I need "Microsoft SDKs"?
10:19 azawawi yup
10:19 ZoffixWin Is it free?
10:19 azawawi yup
10:19 ZoffixWin k
10:19 azawawi https://www.microsoft.com/en-us​/download/details.aspx?id=8442
10:20 azawawi VS Community 2015 is also free for open source and enterprises below 250 employees
10:22 ZoffixWin So the Standard C library is included with Rakudo, basically, right?
10:22 ZoffixWin m: use NativeCall; sub fork is native {*}; fork; say 42;
10:22 camelia rakudo-moar 775271: OUTPUT«42␤42␤»
10:22 ZoffixWin You don't need to install anything special for stuff like that ^ to work, right?
10:23 azawawi let me check
10:23 moritz ZoffixWin: it's not included with Rakudo; it's already installed on your system
10:24 ZoffixWin moritz, and on Windows and MacOS too?
10:24 ZoffixWin or OSX
10:24 moritz ZoffixWin: sure; they are just a bit different
10:24 ZoffixWin k
10:24 moritz ZoffixWin: windows doesn't support fork, for example
10:26 perl6newbee joined #perl6
10:28 * azawawi installs windows sdk 7.1 to verify
10:29 sortiz ZoffixWin, In PR#692 you want that if explicitly use Wherever (*) as apiversion, the warning was skipped, right?
10:29 ZoffixWin sortiz, no, if the version is Whatever
10:29 ZoffixWin hm
10:29 ZoffixWin m: say so * eq '42'
10:29 camelia rakudo-moar 775271: OUTPUT«WhateverCode.new␤»
10:30 ZoffixWin m: say * ~ ''
10:30 camelia rakudo-moar 775271: OUTPUT«WhateverCode.new␤»
10:31 ZoffixWin sortiz, I've no idea how to work with WhateverCode, but Version.new: *; or string "*" will work with my PR
10:31 ely-se joined #perl6
10:32 ZoffixWin I'm much in favour of getting rid of that warning entirely, since it'll cause people to specify API versions all over the place and modules will be breaking whenever the version of the lib isn't the same as what the other used.
10:32 ely-se .tell Skarsnik not a pair of instants (that would be called an "interval"). It's just a number of seconds.
10:32 yoleaux ely-se: I'll pass your message to Skarsnik.
10:32 moritz ZoffixWin: huh? the solution to that is to install the required version
10:32 * ely-se thinks anyone who wants to design a time library should look at Noda Time
10:33 sortiz I understand well the need to have a way to avoid the warning, just want to understand the proposed implementation.
10:34 ZoffixWin moritz, but why is it required? Both libfoo v1.11 and libfoo v1.12 provide a function "foosify" that behaves exactly the same. The author of the module uses a brand new and shiny OS that has libfoo v1.12, but my stable server is still on libfoo v1.11.
10:34 ZoffixWin It's a solution to a problem that doesn't need to exist.
10:34 RabidGravy there are a small number of libraries that don't install versioned .so files
10:35 moritz ZoffixWin: it exists, it just isn't everywhere
10:35 sortiz And I agree that a good way is to explicitly use a Whatever.
10:35 ZoffixWin moritz, I don't think it's a job of the Perl 6 compiler to make that decision, considering the warning's generated even with libraries the compiler has no clue about.
10:36 moritz ZoffixWin: right
10:40 lnrdo joined #perl6
10:42 sortiz I'm in the camp that if I use an explicit version the compiler enforces that, and understand the sense of the warning if don't specified, but with a way to say "I known what I'm doing, please shut"
10:42 moritz sortiz: ZoffixWin is talking about versions of native libraries, not version of a compiler
10:42 RabidGravy yeah, I think that's where I'm at
10:42 sortiz Yes
10:42 moritz (unless I totally misunderstood him)
10:43 sortiz moritz, yes.
10:45 azawawi I agree with ZoffixWin ... it is a solution to a problem that doesn't need to exist. It is a best practice and nothing else. We have more important things to focus on.
10:46 azawawi Different OS platform = Different practices
10:46 azawawi There is no fork on windows. Do not try to emulate it. Windows is windows and *nix is *nix
10:48 ZoffixWin What's the purpose of the asterisk in the subroutine body?
10:48 ZoffixWin m: use NativeCall; sub exp2(num64) returns num64 is native { * }; say exp2 42e0
10:48 camelia rakudo-moar 775271: OUTPUT«4398046511104␤»
10:48 ZoffixWin m: use NativeCall; sub exp2(num64) returns num64 is native {}; say exp2 42e0
10:48 camelia rakudo-moar 775271: OUTPUT«4398046511104␤»
10:48 ZoffixWin With and without seems to work.
10:48 azawawi when i look at this page http://www.imagemagick.org/api/magick-image.php, i realize there are more important things to finish than is native(LIB, version)
10:48 azawawi s/more/way more/
10:49 azawawi :)
10:49 RabidGravy ZoffixWin, native over-writes the CALL-ME of the sub so you can put anything in there afaik (as long as it compiles)
10:49 sortiz azawawi, Wait, even in Windows I a have a way that specify the need for specific versions of libraries.
10:49 DoverMo joined #perl6
10:50 DoverMo is there an estimate to how many synergies perl6 will leverage?
10:50 ZoffixWin "synergies"?
10:50 gfldex bingo!
10:50 yoleaux 03:09Z <llfourn> gfldex: I don't seem to be able to subscribe to your blog :S
10:50 yoleaux 03:18Z <llfourn> gfldex: nvm I found it, it's a funny popup thing
10:50 RabidGravy ??????
10:51 azawawi sortiz: and while we think of a way of doing it the right way(tm), we can can re-focus our efforts of more productive things :)
10:51 DoverMo ZoffixWin, yeah
10:51 ZoffixWin DoverMo, well, what do you mean by that?
10:52 azawawi sortiz: what's more important a working libfoo wrapper under N platforms with a test suite or the right way of doing things.
10:52 sortiz azawawi, Sure. Right now I'm battling a LTA problem in my own module (LMDB)
10:52 DoverMo ZoffixWin, the interaction or cooperation of two or more organizations, substances, or other agents to produce a combined effect greater than the sum of their separate effects.
10:53 ZoffixWin DoverMo, thanks for the copy-paste from dictionary.com. What do you mean by your question? What "organizations" and "substances" do you mean?
10:53 masak DoverMo: it will leverage (approximately) 69,105 synergies.
10:53 huf how do you measure combined and separate effects? :)
10:53 ZoffixWin :)
10:53 huf yes, masak got it right
10:53 DoverMo masak, thank you : )
10:54 DoverMo well you have to be able to see into the future
10:54 huf the single case when i knew what syngergy meant was in diablo 2 when points in skills gave fractional points in other skills
10:54 azawawi moritz: Any plans to release rakudo star msi anytime soon? what's holding us back on this one?
10:54 RabidGravy I don't think Perl 6 will in and of itself do any of that, but it does provide features that would enable designs to be made that can make the most of its strengths in combination with other things
10:54 moritz DoverMo: we have that. How else could we have solved the Haling problem?
10:54 gfldex DoverMo: we are right now in the process to find out what we can do with Perl 6. That will take us at least 20 years.
10:54 ZoffixWin azawawi, see the post on our FB group: https://www.facebook.com/groups/159544​3877388632/permalink/1690576654542020/
10:55 moritz azawawi: what's holding us back is the lack of a rakudo star to build an MSI from
10:55 DoverMo gfldex, oh O:
10:55 azawawi moritz: how can i help? :)
10:55 RabidGravy a programming language can't "leverage synergies", a developer does that
10:56 moritz azawawi: 1) do rakudo compiler release for Januar; make sure it tests fine both against the current roast status and against the one from the 2015.12 release
10:56 ZoffixWin huggable, where's christmas star :is: See the post on our FB group: https://www.facebook.com/groups/159544​3877388632/permalink/1690576654542020/
10:56 huggable ZoffixWin, Added where's christmas star as See the post on our FB group: https://www.facebook.com/groups/159544​3877388632/permalink/1690576654542020/
10:56 moritz azawawi: 2) do an R* release
10:56 secwang joined #perl6
10:56 moritz azawawi: 3) build the MSI
10:56 DoverMo if you quantify all developers using perl5 and then do an 'average' growth chart within the past few decades
10:56 kaare_ Of course Perl 6 can see into the future.
10:56 masak DoverMo: some of the leveraged synergies will leverage further synergies, et cetera
10:56 ZoffixWin DoverMo, Perl 5 is a different language :P
10:57 kaare_ Only problem is that right now Perl 6 is so slow that the future will arrive before Perl 6 finished the prediction ;-)
10:57 ZoffixWin haha
10:57 moritz DoverMo: please start by quantifying me :-)
10:57 ZoffixWin That's a feature, not a bug!
10:57 gfldex DoverMo: why do you want to know that? (read: you are likely asking the wrong question)
10:58 DoverMo moritz, it might take some time..
10:58 jast the question is maybe a little bit too vague to answer
10:59 DoverMo then we'll have to use quantum perl theology
11:00 azawawi moritz: thanks for the info
11:00 azawawi ZoffixWin: what about people who do not use facebook? :)
11:01 ZoffixWin azawawi, those people will get a lesson in why it's useful to have a Facebook account :P
11:01 jast let's break this down: are we talking about diversifying synergies or streamlining synergies?
11:02 DoverMo jast, diversifying
11:02 moritz jast: we're talking about leveraging synergies to streamline second-order synergies in diverse full-stack environments
11:03 sortiz My personal position is simple: Right now, for lack of understanding I can't optimize, for example, the sink path, but if I found a detail that I can fix, I will try to fix it.
11:03 jast okay, I can see how that would empower us to shift paradigms right outside the box
11:04 jast I've been wondering, is Perl 6 web scale?
11:05 masak DoverMo: the diversifying synergies are very unpredictable. they "frazzle" when you don't observe them.
11:05 moritz jast: it's Web 2.0 scale, even
11:05 masak jast: Perl 6 is web scale, but the scale is a bit slow right now
11:05 jast wow
11:05 jast masak: I think that doesn't matter as long it's the responsive kind of slow
11:05 DoverMo masak, oh
11:05 jast you can just scale horizontally
11:06 * moritz likes front scaling better
11:06 jast the wikipedia page "List of buzzwords" is fun. did you know "parsing" is a buzzword?
11:07 ZoffixWin heh
11:07 masak DoverMo: but don't worry! this has absolutely no bearing on how to actually use Perl 6
11:07 masak jast: I'm sure "parsing" can be used as a buzzword
11:07 jast I guess that means Perl 6 grammars are snake oil
11:07 masak jast: "parse" is originally sanskrit, methinks
11:08 ely-se Is it dangerous to run perl6 --doc on untrusted code?
11:08 masak jast: Perl 6 grammars are olive oil
11:08 moritz it's just a p-arse
11:08 moritz ely-se: yes
11:08 ely-se :( ok
11:08 DoverMo masak, i don't have to observe perl within a environmentally controlled box?
11:08 masak ely-se: there was some discussion of that many years ago
11:09 masak on p6l
11:09 ely-se I want to make a website that renders POD for the modules on modules.perl6.org, as an exercise
11:10 * ely-se likes her exercises to result in useful programs
11:10 ely-se so I guess I'll have to look up sandboxing stuff
11:11 jast there's a Pod::Parser module... marked experimental, though
11:11 masak I think the conclusion of that discussion was that --doc ought to be sandboxed by default
11:11 masak not sure how viable that is, though
11:11 ZoffixWin m: use NativeCall; sub signal (int32, &code) is native {}; signal 1, -> { say 42 }
11:11 camelia rakudo-moar 775271: OUTPUT«Type check failed in binding $sig; expected Signature but got Any␤  in sub param_list_for at /home/camelia/rakudo-m-inst-1/share/perl6/sou​rces/075EFE4B4CDAAF73190194EA876F81A1F128D1A2 line 58␤  in sub param_hash_for at /home/camelia/rakudo-m-inst-1/sha…»
11:11 ZoffixWin dat error
11:12 ely-se masak: I know the author of an online compile-and-run tool so I'll ask them how they did sandboxing for it.
11:13 sortiz Right now Perl 6 is just right for some of my clients current needs. I'm just waiting for R*.
11:15 dalek ecosystem: f2a635b | okaoka++ | META.list:
11:15 dalek ecosystem: Add p6-Algorithm-AhoCorasick
11:15 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/f2a635b626
11:15 dalek ecosystem: ac57099 | (Zoffix Znet)++ | META.list:
11:15 dalek ecosystem: Merge pull request #132 from okaoka/feature-aho-corasick
11:15 dalek ecosystem:
11:15 dalek ecosystem: Add p6-Algorithm-AhoCorasick: https://github.com/okaoka/​p6-Algorithm-AhoCorasick/
11:15 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/ac570999ec
11:17 ZoffixWin Watch a magic trick where I make camelia DISAPPEAR!
11:17 ZoffixWin m: say "still here"
11:17 * ZoffixWin taps impatiently on desk
11:17 dalek rakudo/nom: 5a04ff6 | (Tommy Stanton)++ | src/core/Exception.pm:
11:17 dalek rakudo/nom: Fix typo in X::Seq::Consumed exception
11:17 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/5a04ff6aba
11:17 dalek rakudo/nom: 217e976 | lizmat++ | src/core/Exception.pm:
11:17 dalek rakudo/nom: Merge pull request #690 from tommystanton/exception-typo
11:17 dalek rakudo/nom:
11:17 dalek rakudo/nom: Typo in X::Seq::Consumed exception
11:17 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/217e976373
11:17 ZoffixWin Dammit.. I hate when magic tricks don't work right...
11:18 dalek rakudo/nom: 89aa6c8 | (Zoffix Znet)++ | lib/NativeCall.pm6:
11:18 dalek rakudo/nom: Fix for RT#127354
11:18 dalek rakudo/nom:
11:18 dalek rakudo/nom: Proposal that removes the warning completely.
11:18 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/89aa6c84c5
11:18 dalek rakudo/nom: fb0a135 | lizmat++ | lib/NativeCall.pm6:
11:18 dalek rakudo/nom: Merge pull request #691 from zoffixznet/patch-1
11:18 dalek rakudo/nom:
11:18 dalek rakudo/nom: Fix for RT#127354
11:18 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/fb0a13523b
11:19 sortiz ZoffixWin, you do it again! :)
11:19 ZoffixWin Well, I don't know why she died.
11:19 ZoffixWin The first time I've done the trick in private, she talked afterwards
11:19 BenGoldberg joined #perl6
11:20 sammers joined #perl6
11:20 molaf joined #perl6
11:20 ZoffixWin hm
11:21 ZoffixWin :o
11:21 ZoffixWin ZoffixWin--
11:22 ZoffixWin Note to self... Playing with signals is a bad idea (this is what killed the bot:) m: use NativeCall; sub raise (int32) returns int32 is native {}; raise 19
11:23 ZoffixWin I'm guess it's waiting for the SIGCONT. I wonder why it was responsive after the first time I ran that
11:26 maslan joined #perl6
11:27 ZoffixWin Oh haha. The copy running on irc.perl.org is still active. I wonder if I can use it to restart camelia :D
11:31 pierre-vigier joined #perl6
11:35 azawawi what's the recommended "perl" in META.info?
11:35 azawawi "perl"          : "6",  ?
11:35 ZoffixWin azawawi, 6.c?
11:35 ZoffixWin Or "6.*"
11:35 ZoffixWin m: say so v6 before v6.c
11:36 ZoffixWin Ah.... right...
11:36 llfourn azawawi: 6.* imo
11:36 camelia joined #perl6
11:36 brrt joined #perl6
11:36 camelia joined #perl6
11:37 ZoffixWin Ahaha
11:37 ZoffixWin m: say so v6 before v6.c
11:37 azawawi so what's the answer? :)
11:37 ZoffixWin The answer is "False"
11:37 azawawi not 42?
11:37 azawawi :)
11:37 ZoffixWin Did I actually manage to restart camelia using the other bot or did someone have to connect to the server? :)
11:38 camelia rakudo-moar fb0a13: OUTPUT«False␤»
11:38 llfourn ZoffixWin: no according to camelia
11:39 pierre-vigier joined #perl6
11:40 azawawi ZoffixWin: confirmed, windows 7.1 SDK + strawberry perl is all you need to use rakudobrew
11:40 ZoffixWin sweet
11:40 azawawi ==> Installing MagickWand ==> Successfully installed MagickWand    # Windows 7 AMD FX-8150 gaming machine :)
11:42 * azawawi install "script"  package for atom to run the example :)
11:44 DoverMo left #perl6
11:47 ely-se can I specify CPAN modules as dependencies in META.info when I use Inline::Perl5?
11:48 llfourn ely-se: that's certainly an interesting question
11:48 llfourn but I don't have an answer :(
11:53 ZoffixWin m: use NativeCall; sub hypot (num64, num64) returns num64 is native {}; say hypot 3, 4
11:53 camelia rakudo-moar fb0a13: OUTPUT«This type cannot unbox to a native number␤  in method CALL-ME at /home/camelia/rakudo-m-inst-1/share/perl6/sou​rces/075EFE4B4CDAAF73190194EA876F81A1F128D1A2 line 283␤  in block <unit> at /tmp/A1FLWvqQzT line 1␤␤»
11:53 ZoffixWin m: use NativeCall; sub hypot (num64, num64) returns num64 is native {}; say hypot 3e0, 4e0
11:53 camelia rakudo-moar fb0a13: OUTPUT«5␤»
11:53 ZoffixWin It would be nice for that to unbox automagically.
11:53 ZoffixWin hm
11:53 ZoffixWin m: say 4.Num
11:53 camelia rakudo-moar fb0a13: OUTPUT«4␤»
11:53 kid51 joined #perl6
11:54 BenGoldberg m: use NativeCall; sub hypot (num64, num64) returns num64 is native {}; say hypot 3.0, 4.0
11:54 camelia rakudo-moar fb0a13: OUTPUT«This type cannot unbox to a native number␤  in method CALL-ME at /home/camelia/rakudo-m-inst-1/share/perl6/sou​rces/075EFE4B4CDAAF73190194EA876F81A1F128D1A2 line 283␤  in block <unit> at /tmp/pQt4f43Oej line 1␤␤»
11:54 azawawi http://pasteboard.co/10uVnma1.png   # The result of https://gist.github.com/az​awawi/cdeae2c709aee411a188  on windows :)
11:54 ZoffixWin Because, basically to make a perlish sub that interfaces with a C lib, you'd need to make an intermediate that does the coercion.
11:55 ZoffixWin azawawi++ very cool
11:55 virtualsue joined #perl6
11:57 azawawi thx
11:57 vendethiel joined #perl6
11:58 musiKk joined #perl6
11:59 ZoffixWin 0.o
11:59 ZoffixWin m: use NativeCall; sub hypot (long , long) returns long is native {}; say hypot 3, 4
11:59 camelia rakudo-moar fb0a13: OUTPUT«121480020004␤»
11:59 ZoffixWin m: use NativeCall; sub hypot (long, long) returns long is native {}; say hypot 3, 4
11:59 camelia rakudo-moar fb0a13: OUTPUT«0␤»
11:59 ZoffixWin Weird, eh? Comma position changes the return value
11:59 lnrdo joined #perl6
11:59 ZoffixWin But was I was gonna say is we got long but no double?
12:01 ZoffixWin There's more actually:
12:01 ZoffixWin m: use NativeCall; our native double is Int is ctype("double") is repr("P6int") { }; sub hypot (long, long) returns long is native {}; say hypot 3, 4
12:01 camelia rakudo-moar fb0a13: OUTPUT«133062896␤»
12:02 ZoffixWin dafuq?
12:03 pierre-vigier joined #perl6
12:04 ZoffixWin m: use NativeCall; our native double is Int is ctype("double") is repr("P6int") { }; sub hypot (long, long) returns long is native {}; say hypot 3, 4
12:04 camelia rakudo-moar fb0a13: OUTPUT«153817849␤»
12:04 ZoffixWin m: use NativeCall; our native double is Int is ctype("double") is repr("P6int") { }; ; sub hypot (long, long) returns long is native {}; say hypot 3, 4
12:04 camelia rakudo-moar fb0a13: OUTPUT«8589934595␤»
12:04 ZoffixWin m: use NativeCall; our native double is Int is ctype("double") is repr("P6int") { }; ; ; sub hypot (long, long) returns long is native {}; say hypot 3, 4
12:04 camelia rakudo-moar fb0a13: OUTPUT«17180291710␤»
12:04 * ZoffixWin giggles
12:04 ZoffixWin m: use NativeCall; our native double is Int is ctype("double") is repr("P6int") { }; ; ; ; ; ; ; sub hypot (long, long) returns long is native {}; say hypot 3, 4
12:04 camelia rakudo-moar fb0a13: OUTPUT«149815081␤»
12:05 bowtie joined #perl6
12:06 ZoffixWin Ah, the our native stuff isn't even needed:
12:06 ZoffixWin m: use NativeCall; ; ; sub hypot (int32, int32) returns int32 is native {}; say hypot 3, 4
12:06 camelia rakudo-moar fb0a13: OUTPUT«1220935716␤»
12:06 ZoffixWin m: use NativeCall; ; ; ; sub hypot (int32, int32) returns int32 is native {}; say hypot 3, 4
12:06 camelia rakudo-moar fb0a13: OUTPUT«0␤»
12:06 ZoffixWin m: use NativeCall; sub hypot (int32, int32) returns int32 is native {}; say hypot 3, 4
12:06 camelia rakudo-moar fb0a13: OUTPUT«0␤»
12:08 ZoffixWin m: use NativeCall; sub hypot (int16, int16) returns num64 is native {}; say hypot 3, 4
12:08 camelia rakudo-moar fb0a13: OUTPUT«4.87068332437578e-316␤»
12:09 BenGoldberg m: use NativeCall; sub hypot (int64, int64) returns int64 is native {}; say hypot 3, 4
12:09 camelia rakudo-moar fb0a13: OUTPUT«102417584␤»
12:09 BenGoldberg m: use NativeCall; sub hypot (int64, int64) returns num64 is native {}; say hypot 3, 4
12:09 camelia rakudo-moar fb0a13: OUTPUT«4.63856575042433e-316␤»
12:10 sammers joined #perl6
12:14 sortiz m: use NativeCall; sub hypot (num64, num64) returns num64 is native {}; say hypot num64.new(3.0), num64.new(4.0)
12:14 camelia rakudo-moar fb0a13: OUTPUT«5␤»
12:19 sortiz NativeCall can not known nor check the correctness of the types used, only if the function exists.
12:19 ZoffixWin m: use NativeCall; sub strcpy (Str, Str) returns Str is native {}; my $x = "42"; say strcpy $x, "4222222222222222222" x 42
12:20 camelia rakudo-moar fb0a13: OUTPUT«(timeout)*** Error in `/home/camelia/rakudo-m-inst-1/bin/moar': malloc(): memory corruption: 0x0000000007087b20 ***␤»
12:22 ZoffixWin m: use NativeCall; sub strcpy (Str, Str) returns Str is native {}; my @x = "42", "43"; say strcpy @x[0], @x[1]; say @x
12:22 camelia rakudo-moar fb0a13: OUTPUT«43␤[42 43]␤»
12:22 ZoffixWin :D
12:23 ZoffixWin Oh, I misread the output :(
12:23 Zero_Dogg joined #perl6
12:23 Zero_Dogg joined #perl6
12:23 sortiz And yes, we can easy shot ourselves in the foot, the head, or kill the neighbor's cat.
12:27 sortiz m: use NativeCall; sub hypotf (num32, num32) returns num32 is native {}; say hypotf 3e0, 4e0
12:27 camelia rakudo-moar fb0a13: OUTPUT«5␤»
12:29 ely-se masak: I am thinking of using Rakudo's JVM support and JVM's sandboxing facilities for perl6 --doc. Do you think that would work?
12:30 ely-se I don't have any idea of how mature the JVM back-end is though
12:34 * RabidGravy discovers there are three different installations of couchdb on his laptop, deletes two (hopefully the right two)
12:37 leont joined #perl6
12:38 Cabanossi joined #perl6
12:39 geekosaur r-j: "test".say
12:39 camelia rakudo-jvm 6c0f93: OUTPUT«test␤»
12:39 geekosaur well, that's better than it's been doing recently
12:39 geekosaur jvm backend has been pretty broken
12:42 ely-se ok :P
12:42 stmuk RabidGravy: what was that DB perl CI thing called?
12:47 sammers joined #perl6
12:48 stmuk ah smolder
12:50 pierre-vigier joined #perl6
12:56 pierre-vigier Hi #perl6
12:56 pierre-vigier m: multi sub t( Array @l ) { say "Array" }; multi sub t( List @l ) { say "List" }; my $l = ( (1,2),(3,4) ); t( $l );
12:56 camelia rakudo-moar fb0a13: OUTPUT«Cannot call t(List); none of these signatures match:␤    (Array @l)␤    (List @l)␤  in block <unit> at /tmp/w8HXaY2nmo line 1␤␤»
12:56 pierre-vigier any Idea ?
12:57 gfldex type contraint and structure are not the same thing
12:58 pierre-vigier yes, what i want is to receive an array of array
12:58 gfldex m: my Array @a; dd @a.^name; my $l = [[1],]; dd $l.^name;
12:58 camelia rakudo-moar fb0a13: OUTPUT«"Array[Array]"␤"Array"␤»
12:59 pierre-vigier or Array of list,
12:59 pierre-vigier the only solution is to use a where?
12:59 gfldex m: multi sub t( Array @l ) { say "Array" }; multi sub t( List @l ) { say "List" }; my Array @l = [[1],]; t( @l );
12:59 camelia rakudo-moar fb0a13: OUTPUT«Array␤»
13:00 pierre-vigier ah
13:00 pierre-vigier understoof
13:00 pierre-vigier understood
13:01 pierre-vigier i need to force the type of Array element to be Array,
13:06 sammers joined #perl6
13:11 RabidGravy stmuk, it was a combo of smolder & buildbot
13:11 RabidGravy both of those things are eminently doable in P6 right now
13:12 RabidGravy (IMO)
13:15 MadcapJake I completely forgot that I made the chocolatey package for rakudo xD
13:29 MadcapJake awwaiid: if you or anyone else wants to be a chocolatey maintainer for rakudo *, I can add you.  I don't currently have a windows machine.
13:30 acrussell joined #perl6
13:34 stmuk there is nothing like PPI for perl6 (or a simple API to the internal Perl 6 grammars) I suppose
13:36 lnrdo joined #perl6
13:38 stmuk maybe Rakudo::Perl6::Parsing
13:38 RabidGravy well you can get at the grammar (I just keep forgetting how)
13:41 leont But the grammar will execute BEGIN blocks
13:41 leont This was discussed a few days ago, I think
13:47 Skarsnik joined #perl6
13:47 Skarsnik Hello
13:47 yoleaux 10:32Z <ely-se> Skarsnik: not a pair of instants (that would be called an "interval"). It's just a number of seconds.
13:51 RabidGravy but you could potentially alter the actions to prevent that from happening (I guess I claim no great knowledge of the matter)
13:52 virtualsue joined #perl6
13:52 leont Probably
14:00 dalek specs: 7713048 | (Stéphane Payrard)++ | t.elm:
14:00 dalek specs: c
14:00 dalek specs: review: https://github.com/perl6/specs/commit/7713048d6e
14:00 dalek specs: 78bcffc | (Stéphane Payrard)++ | S05-regex.pod:
14:00 dalek specs: <?[]> and <![]> were undocumented
14:00 dalek specs: review: https://github.com/perl6/specs/commit/78bcffc4fa
14:00 moritz yes, but then you can't parse it anymore
14:00 moritz the BEGIN time actions are necessary for registering declared symbols, new operators and so on
14:06 virtualsue \o/ Perl 6 installation partay @London Hackspace today
14:08 cognominal arf the <![]> was documented. I only searched for <?[   Anyway now if someone searches for <![  he will find it.
14:12 leont That t.elm is confusing me
14:14 leont cognominal: Is that an accident?
14:14 cognominal arf
14:14 cognominal I am using a atomagit. Visibily I don't master it
14:15 cognominal will fix it.
14:16 dalek specs: ca0a0bc | (Stéphane Payrard)++ | t.elm:
14:16 dalek specs: delete file accidentally checked
14:16 dalek specs: review: https://github.com/perl6/specs/commit/ca0a0bc610
14:17 cognominal sorry about that
14:17 cognominal leont++ for noticing
14:24 ELBeavers joined #perl6
14:27 pi1 joined #perl6
14:28 dalek specs: cbb8978 | (Steve Mynott)++ | S22-package-format.pod:
14:28 dalek specs: remove leading v in version example
14:28 dalek specs: review: https://github.com/perl6/specs/commit/cbb8978d60
14:28 RabidGravy why do I get "Missing serialize REPR function for REPR VMException" on Travis-CI when I don't get it locally and how the hell do I diagnose ot
14:28 RabidGravy it
14:28 Skarsnik Oo
14:31 xpen joined #perl6
14:33 xpen joined #perl6
14:34 * orbus question - is there a baked in way to require an unsigned int in a signature?
14:34 orbus or do I just need to check what was passed in and throw an exception if I don't like what I got?
14:34 mephinet joined #perl6
14:35 Skarsnik unsigned type are not really working properly x)
14:35 orbus that's kind of what I thought
14:35 orbus alright, exception it is then
14:35 Skarsnik I think uint32 and uint64 are kind of fine?
14:35 orbus hrm
14:35 orbus well I can try
14:35 orbus let's see
14:35 orbus it's for a BUILD method
14:36 orbus object construction
14:37 orbus uint64 didn't seem to constrain it
14:37 orbus seems like it's just acting like an int
14:37 Skarsnik The issue all the intx are see as Int in type. that make being constraint around them kind of hard
14:38 orbus well, no worries
14:38 orbus I can just put a check in the constructor
14:38 orbus and die if I get a negative
14:38 dalek specs: db43544 | (Steve Mynott)++ | S22-package-format.pod:
14:38 dalek specs: update perl version example to use 6.c type vers
14:38 dalek specs: review: https://github.com/perl6/specs/commit/db43544188
14:43 sjoshi joined #perl6
14:44 Skarsnik I really need more ram :(
14:44 azawawi joined #perl6
14:44 azawawi hi
14:44 Skarsnik hello
14:44 azawawi Skarsnik: how much ram you have? :)
14:44 lokien_ joined #perl6
14:45 Skarsnik 8Gb, but the issue is to be able to run more than 1 vm at the time ^^
14:46 azawawi 12-16 GB is good
14:47 azawawi and an SSD
14:48 azawawi finally got MagicWand to work on all three platforms (Linux, Windows and MacOS X) https://github.com/azawawi/p​erl6-magickwand#build-status
14:50 Skarsnik I need to have a look at these windows build x)
14:50 bowtie joined #perl6
14:50 * orbus has two vms running on a machine with 8 gb
14:51 orbus I don't think I'd want to go much over that though
14:51 pierre-vigier class Foo { method !p() { say "private";}; method m() { my $m = "p"; self!$m(); }; };
14:51 pierre-vigier m: class Foo { method !p() { say "private";}; method m() { my $m = "p"; self!$m(); }; };
14:51 Skarsnik win 7 (host) is hungry for ram already x)
14:51 camelia rakudo-moar fb0a13: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Gkv843v7gR␤Cannot use this form of method call with a private method␤at /tmp/Gkv843v7gR:1␤------> 3";}; method m() { my $m = "p"; self!$m()7⏏5; }; };␤»
14:52 azawawi Skarsnik: run lightweight VMs... i use lubuntu over windows 7 :)
14:52 pierre-vigier strange, is it not possible to call a private method, from a name contained in a variable?
14:52 pierre-vigier m: class Foo { method !p() { say "private";}; method m() { self!"m"(); }; };
14:52 camelia rakudo-moar fb0a13: ( no output )
14:53 pierre-vigier a string seems ok, but a variable conaining a string does not work
14:53 azawawi Skarsnik: vmware or virtualbox?
14:53 Skarsnik virtualbox
14:53 azawawi Skarsnik: go vmware then :)
14:54 pierre-vigier vmware is way more efficient than virtualbox indeed, however, not free :(
14:54 geekosaur player is free for personal use on linux
14:55 geekosaur and unlike older versions is perfectly capable of creating vm-s
14:56 geekosaur (you dont have what they call "restricted vms" but you don't want those. by "restricted" they mean "IT decides what you're allowed to do with that VM")
14:58 pierre-vigier m: class Foo { method !p() { say "private";}; method m() { my $m = "p"; self!$m(); }; };
14:58 camelia rakudo-moar fb0a13: OUTPUT«5===SORRY!5=== Error while compiling /tmp/VFmCdjQSto␤Cannot use this form of method call with a private method␤at /tmp/VFmCdjQSto:1␤------> 3";}; method m() { my $m = "p"; self!$m()7⏏5; }; };␤»
14:58 azawawi im looking at the prices... fusion (on mac) is way cheaper than workstation on windows
14:59 pierre-vigier Someone not how to do that?
14:59 pierre-vigier VMware Workstation 12 Player Free for Personal Use
14:59 pierre-vigier from https://www.vmware.com/products/player/
14:59 geekosaur yes, fusion is scary cheap compared to all the other ones
15:00 azawawi yup
15:00 geekosaur I've mostly migrated to Linux but keep the Mac around specifically so I can run VMs with Fusion
15:00 ely-se Hmm, sandboxing MoarVM is difficult.
15:01 ely-se It crashes if the ioctl system call fails, but ioctl is dangerous.
15:02 Skarsnik My issue is more my host already take 6GB
15:02 Skarsnik so not some much ram free for vm
15:03 azawawi are there any other free CI build services (excluding travis ci & appveyor) for open source?
15:03 geekosaur S12 says that should work, btw
15:03 geekosaur $obj!"$methodname"()          # indirect call to private method name
15:03 geekosaur oh, maybe you just need the quotes
15:04 pierre-vigier m: class Foo { method !p() { say "private";}; method m() { my $m = self.^private_nethod_table<p>; self.$m(); }; };
15:04 camelia rakudo-moar fb0a13: ( no output )
15:04 geekosaur m: class Foo { method !p() { say "private";}; method m() { my $m = "p"; self!"$m"(); }; };
15:04 camelia rakudo-moar fb0a13: ( no output )
15:04 pierre-vigier oh, with quote it's working, nice
15:04 pierre-vigier other solution, get the method from the private_method_table
15:04 pierre-vigier and call it as public
15:04 geekosaur yeh
15:04 cosarara_ joined #perl6
15:05 geekosaur m: class Foo { method !p() { say "private";}; method m() { my $m = "p"; self!"$m"(); }; }; Foo.new.m
15:05 camelia rakudo-moar fb0a13: OUTPUT«private␤»
15:05 maslan joined #perl6
15:05 masak ely-se: unfortunately, I don't know enough about JVM's sandboxing facilities to sensibly answer that
15:06 Skarsnik and it could be nice if virtualbox check for free ram before try to restore a vm and fail xD
15:10 awwaiid MadcapJake: what is a chocholatey?
15:10 geekosaur windows package manager
15:11 stmuk openssl/nativecall seems broken on mac
15:11 geekosaur microsoft finally figured out that hey, maybe somehting like yum or apt-get would be nice
15:16 azawawi awwaiid: https://chocolatey.org/packages/rakudostar
15:16 azawawi geekosaur: :)
15:17 Skarsnik 2014.12.1 ?
15:17 * azawawi ducks
15:18 lnrdo joined #perl6
15:18 MadcapJake lol i did it a year ago when I had a Windows rig
15:18 azawawi vs https://chocolatey.org/packages/strawberryperl
15:20 azawawi interesting commentary about strawberry perl https://chocolatey.org/packages​/strawberryperl#versionhistory
15:21 sftf joined #perl6
15:22 BenGoldberg joined #perl6
15:26 orbus apparently StrawberryPerl 5.20.2.1 has been awaiting approval since April?
15:27 azawawi no follow up
15:27 * orbus would probably just install strawberry perl
15:27 orbus with the windows installer
15:27 TEttinger joined #perl6
15:30 ELBeavers joined #perl6
15:30 orbus but I guess this sort of thing might be good if you're managing a bunch of networked windows boxes
15:35 AlexDaniel m: say flat ‘earth’
15:35 camelia rakudo-moar fb0a13: OUTPUT«(earth)␤»
15:35 AlexDaniel m: say round ‘earth’
15:35 camelia rakudo-moar fb0a13: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5earth' (indicated by ⏏)␤  in block <unit> at /tmp/hsCnlLgZyf line 1␤␤Actually thrown at:␤  in block <unit> at /tmp/hsCnlLgZyf line 1␤␤»
15:37 molaf joined #perl6
15:40 RabidGravy timotimo, copying and pasting that "will lazy" code isn't quite as simple as all that it appears the closures don't quite work if you use it more than one :)
15:43 RabidGravy nothing that turning it anto a parameterised role can't fix however
15:46 RabidGravy yep that works a treat
15:58 [Tux] csv-ip5xs       17.656
15:58 [Tux] test            22.467
15:58 [Tux] test-t          12.165
15:58 [Tux] csv-parser      49.241
15:59 RabidGravy is that creeping back up again?
16:01 Peter- joined #perl6
16:04 awwaiid choco is like apt-get for windows?! sweet!
16:08 vendethiel ..in that every package uploaded is severely outdated, yeah :p
16:09 geekosaur heheh
16:11 ugexe if they continue on their current path it should get better. nuget is pretty cool
16:11 hankache joined #perl6
16:13 hankache is there a difference between sub foo(int32) is native('libfoo') { * }; and sub foo(int32) is native('libfoo') { ... }; ??
16:13 Skarsnik probably not
16:14 hankache thanks Skarsnik
16:14 Skarsnik maybe if you go for multi it can have an influence?
16:15 hankache no idea
16:15 hankache Skarsnik++ #GPTrixie
16:17 hankache can we specify stdout to be a file instead of te terminal?
16:17 hankache ^^ for GPTrixie
16:17 xinming joined #perl6
16:17 Skarsnik > file ?
16:17 ZoffixWin Oh, is that what Trixie is lol
16:17 ZoffixWin I never bothered to look at it and has just been wondering that it should be possible to generate NC stuff from headers :D
16:18 ZoffixWin Skarsnik++
16:18 Skarsnik well thx gccxml xD
16:19 Skarsnik I tried lot of stuff based on clang but I never managed to have something that compile on debian or just work
16:19 Skarsnik like cast does not want c99...
16:21 ZoffixWin Do you know what's happening here, when incorrect types are used? What are those return values?
16:21 ZoffixWin m: use NativeCall; sub hypot (int32, int32) returns int32 is native {}; say hypot 3, 4
16:21 camelia rakudo-moar fb0a13: OUTPUT«0␤»
16:21 ZoffixWin m: use NativeCall; ; sub hypot (int32, int32) returns int32 is native {}; say hypot 3, 4
16:21 camelia rakudo-moar fb0a13: OUTPUT«0␤»
16:21 ZoffixWin m: use NativeCall; ; ; sub hypot (int32, int32) returns int32 is native {}; say hypot 3, 4
16:21 camelia rakudo-moar fb0a13: OUTPUT«1220935716␤»
16:21 ZoffixWin (note: I'm just adding ';')
16:22 arlenik joined #perl6
16:22 Skarsnik lol
16:22 ely-se joined #perl6
16:23 Skarsnik not even sure how a native with {} work
16:23 Skarsnik m: use NativeCall; ; ; sub hypot (int32, int32) returns int32 is native { * }; say hypot 3, 4
16:23 camelia rakudo-moar fb0a13: OUTPUT«0␤»
16:23 Skarsnik m: use NativeCall; ; ; sub hypot (int32, int32) returns int32 is native { returns 42 }; say hypot 3, 4
16:23 camelia rakudo-moar fb0a13: OUTPUT«5===SORRY!5=== Error while compiling /tmp/5_PYxRnK_7␤Undeclared routine:␤    returns used at line 1. Did you mean 'return', 'return-rw'?␤␤»
16:23 Skarsnik m: use NativeCall; ; ; sub hypot (int32, int32) returns int32 is native { return 42 }; say hypot 3, 4
16:23 camelia rakudo-moar fb0a13: OUTPUT«1574504822␤»
16:23 arnsholt The body of a sub marked with is native is ignored
16:24 Skarsnik m: use NativeCall; ; ; sub hypot (int32, int32) returns int32 is native { return 42 }; say hypot 3, 4; say hypot 3, 4;
16:24 camelia rakudo-moar fb0a13: OUTPUT«0␤0␤»
16:24 ZoffixWin Oh, is that what is it?
16:24 sQuEE joined #perl6
16:24 arnsholt The Native role mixes in a CALL-ME method (or something like that, the exact name escapes me ATM) which overrides the whole call process
16:24 ZoffixWin Hm
16:25 ZoffixWin m: use NativeCall; ; ; ; ; ; sub hypot (long, long) returns long is native {*}; say hypot 3, 4
16:25 camelia rakudo-moar fb0a13: OUTPUT«5===SORRY!5=== Error while compiling /tmp/bKIVUtKIIo␤Bogus postfix␤at /tmp/bKIVUtKIIo:1␤------> 3turns long is native {*}; say hypot 3, 47⏏5␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        statem…»
16:25 Skarsnik but that buggy to have random output like that
16:25 ZoffixWin m: use NativeCall; ; ; ; ; ; sub hypot (long, long) returns long is native {*}; say hypot 3, 4
16:25 camelia rakudo-moar fb0a13: OUTPUT«0␤»
16:25 ZoffixWin m: use NativeCall; ; ; ; ; ; sub hypot (long, long) returns long is native {}; say hypot 3, 4
16:25 camelia rakudo-moar fb0a13: OUTPUT«89791560␤»
16:26 arnsholt Yeah, it's weird that adding the semicolons changes things
16:26 arnsholt Hard to say why that is
16:26 Skarsnik what hypot does?
16:27 arnsholt Why it goes wrong
16:27 ZoffixWin hypotenuse
16:27 ZoffixWin m: use NativeCall; ; ; ; ; ; sub hypot (num64, num64) returns num64 is native {}; say hypot 3e0, 4e0
16:27 camelia rakudo-moar fb0a13: OUTPUT«5␤»
16:27 ZoffixWin m: say sqrt(3**2, 4**2)
16:27 camelia rakudo-moar fb0a13: OUTPUT«5===SORRY!5=== Error while compiling /tmp/EOkdy71oGq␤Calling sqrt(Int, Int) will never work with proto signature ($)␤at /tmp/EOkdy71oGq:1␤------> 3say 7⏏5sqrt(3**2, 4**2)␤»
16:27 jnthn hypot is defined as taking num32 afaict
16:27 skids joined #perl6
16:27 ZoffixWin It takes a double
16:28 moritz ouble hypot(double x, double y);
16:28 jnthn ah, you're right
16:28 moritz float hypotf(float x, float y);
16:28 RabidGravy ooh, I'm sure I tried this before and found it not to work as expected
16:28 ZoffixWin m: say sqrt(3**2 + 4**2)
16:28 RabidGravy m: role F[Callable $f] { method f() { say "callable" }}; role F[Str $f] { method f() { say "string" }}; my $a = 1; $a does F["foo"]; $a.f; my $b = 1; $b does F[-> { }]; $b.f
16:28 camelia rakudo-moar fb0a13: OUTPUT«5␤»
16:28 camelia rakudo-moar fb0a13: OUTPUT«string␤callable␤»
16:28 arnsholt It's weird that adding semicolons between the use and the sub definition changes the return value, though
16:28 RabidGravy which is possibly the coolest thing in the workd
16:29 jnthn yeah...though calling it with long is violating the calling conventions.
16:29 arnsholt Although that was with the wrong type might invoke something undefined
16:29 arnsholt Definitely
16:29 ZoffixWin arnsholt, my wild guess would be the incorrect types are making NC read incorrect memory areas and those areas are affected by the content of the program itself or something
16:29 jnthn It'll maybe invoke the right thing, but callee-save registers might get hosed up for example.
16:30 arnsholt ZoffixWin: Yeah, that's probably it. Since the weird example defines it with two 32 bit arguments it probably reads bogus data on the stack or some such#
16:30 jnthn If it is behaving weird with the *correct* signature then it's certainly a bug :)
16:30 arnsholt Yeah
16:30 jnthn But if it's only with bogus ones, well, memory corruption is likely.
16:30 arnsholt Yeah, I agree
16:30 jnthn And the harder we optimize NativeCall, the likelier it's going to get.
16:30 sortiz ZoffixWin, I suppose that when you use the wrong types, the demarchaling  take some random values from the stack.
16:31 * ZoffixWin nods
16:31 jnthn (Since the endgame is that we're just JIT-compiling the call to the C function directly into the JITting of the Perl 6 code)
16:31 jnthn (Though we're a bit off that)
16:33 ZoffixWin BTW, any idea why I was having issues earlier? getting "Cannot find method 'CALL-ME'" when calling a nativecalled sub http://irclog.perlgeek.de/p​erl6/2016-01-23#i_11928513
16:33 araujo_ joined #perl6
16:34 hankache what is sized ints?
16:35 sortiz At the machine level reading from the stack an int64 and a double, reads the same amount of memory, nothing bad happens.
16:35 ZoffixWin hankache, ints that fit into a particular number of bytes
16:35 ZoffixWin m: my int16 $x = 2**15; say $x; $x = 2**16; say $x
16:35 camelia rakudo-moar fb0a13: OUTPUT«-32768␤0␤»
16:35 araujo_ joined #perl6
16:35 hankache ZoffixWin so int32 and int64 are called sized ints?
16:35 ZoffixWin Yeah
16:36 hankache ZoffixWin thanks mate
16:36 ZoffixWin m: my int16 $x = 2**15 - 1; say $x
16:36 camelia rakudo-moar fb0a13: OUTPUT«32767␤»
16:36 jnthn sortiz: Yes, but the calling conventions on x64 don't use the stack for various cases.
16:36 zakharyas joined #perl6
16:36 Skarsnik sized int are a nice name mainly for now x)
16:37 jnthn Skarsnik: Huh? They're pretty widely implemented, even if there's some imperfections.
16:37 jnthn m: my int8 $x = 2**9; say $x
16:37 camelia rakudo-moar fb0a13: OUTPUT«0␤»
16:38 sortiz Yes, and if the stack isn't involved, you are reading bogus registers.
16:38 jnthn sortiz: Yeah, that's what I suspect is going on here
16:38 jnthn Note how the 2**9 overflows
16:38 jnthn The most useful use of native ints, outside of native call, is in packed arrays
16:38 jnthn my int8 @a[10000] will use a lot less memory than my int64 @a[10000]
16:39 ZoffixWin m: my int8 @a[100000]
16:39 camelia rakudo-moar fb0a13: ( no output )
16:39 Skarsnik They should not match Int btw when using multi or ~~ or in given statement
16:39 Skarsnik I mean they should be usable
16:39 ZoffixWin Well, some combination of values makes camelia report a nice round number of bytes that could not be allocated and you can see the difference for different sizes
16:39 rindolf Hi all! http://paste.debian.net/367409/ - this gives me «Unexpected block in infix position (missing statement control word before the expression?)»  - why and how can I fix it?
16:39 rindolf ZoffixWin: hi, sup?
16:40 jnthn m: say int32 ~~ Int
16:40 camelia rakudo-moar fb0a13: OUTPUT«Cannot unbox a type object␤  in block <unit> at /tmp/yc7mEmub4P line 1␤␤»
16:40 jnthn wtf...
16:40 AlexDaniel :)
16:40 jnthn m: say Str ~~ Int
16:40 camelia rakudo-moar fb0a13: OUTPUT«False␤»
16:40 jnthn m: say Int ~~ Int
16:40 camelia rakudo-moar fb0a13: OUTPUT«True␤»
16:40 jnthn Oddness
16:41 jnthn But anyway, the native ints are subclasses of Int
16:41 jnthn But also, any time you're smart-matching then you're dealing in object space
16:41 Skarsnik m: my int8 $a; given $a { when int8 { say "int8"} when Int { say "Int"}};
16:41 camelia rakudo-moar fb0a13: OUTPUT«5===SORRY!5=== Error while compiling /tmp/9sLIpofWSv␤Strange text after block (missing semicolon or comma?)␤at /tmp/9sLIpofWSv:1␤------> 8 $a; given $a { when int8 { say "int8"}7⏏5 when Int { say "Int"}};␤»
16:41 jnthn So boxing is likely
16:41 pi2 joined #perl6
16:41 jnthn Skarsnik: Yes, native types don't know their type, they all box to Int
16:41 jnthn That's by design
16:41 Skarsnik That bad
16:42 AlexDaniel m: my int8 $a; given $a { when int8 { say "int8"}; when Int { say "Int"} };
16:42 camelia rakudo-moar fb0a13: OUTPUT«Int␤»
16:42 sortiz Weird things can happen, if for example, a bad declared structure with pointers are dereferenced.
16:42 Skarsnik like even using ^name on $a will not gie you int9
16:42 jnthn Correct, because that's an object operation
16:43 AlexDaniel m: say int32.^methods
16:43 camelia rakudo-moar fb0a13: OUTPUT«Method 'methods' not found for invocant of class 'Perl6::Metamodel::NativeHOW'␤  in block <unit> at /tmp/pbmwyXA52V line 1␤␤»
16:43 jnthn Meta-OBJECT protocol
16:43 jnthn We go pretty far to let you pretend most things are objects in Perl 6
16:43 araujo__ joined #perl6
16:43 jnthn But like most other languages, we do it by autoboxing natives.
16:43 rindolf anyone?
16:43 Skarsnik I don't care how that work behind the scene. it's just, you can't do stuff based on these type
16:44 ZoffixWin rindolf, what line number is that error on?
16:44 Skarsnik and it's annoying IMO
16:44 rindolf ZoffixWin: 18.
16:44 jnthn Skarsnik: Well that's your problem. If you're using native types you are expected to care a bit more.
16:45 Skarsnik ?
16:45 Skarsnik You realise that annoying when working with NC?
16:45 ZoffixWin rindolf, tossing all those parenthesis makes it go away
16:45 geekosaur rindolf, I don't think the outer set of parens is legal
16:45 geekosaur if you put the close paren before the arrow, it should work
16:45 Skarsnik since your dealing with 'extra' type that make sens in this context
16:46 rindolf geekosaur: OK, thanks.
16:46 ZoffixWin rindolf, But you have a host of other errors.
16:46 geekosaur (of course then it's redundant)
16:46 Skarsnik I know that in regular perl6 code, these native type are fine as 'internal weird stuff' but in NC context there are more meaningful
16:47 geekosaur but -> is not an operator, it's syntax, and the syntax does not expect parens
16:47 Skarsnik m: my int8 $a; say $a.nativesize;
16:47 camelia rakudo-moar fb0a13: OUTPUT«Method 'nativesize' not found for invocant of class 'Int'␤  in block <unit> at /tmp/7lsUnuHMQn line 1␤␤»
16:47 jnthn bbi10, cheese needs attention...
16:48 pi4 joined #perl6
16:48 ajr_ joined #perl6
16:49 sortiz Skarsnik, I'm empathetic, have some problems, mainly with unsigned types, that turns negative when boxed as Int.
16:52 jnthn m: my int8 $a; say $a.VAR.of.^nativesize
16:52 camelia rakudo-moar fb0a13: OUTPUT«Method 'of' not found for invocant of class 'Int'␤  in block <unit> at /tmp/ZD6kZzSO2G line 1␤␤»
16:52 jnthn That one we should make work.
16:52 ZoffixWin What's the name for "returns" in sub cpu_clock returns int32 is native('cpuid') {} ?
16:52 ZoffixWin trait?
16:52 jnthn ZoffixWin: Yes, it's a trait
16:52 ZoffixWin Thanks
16:52 jnthn is/does/of/returns are all traits
16:52 jnthn handles too
16:53 jnthn I think there's another one I forgot. They're all in le grammar.
16:53 geekosaur will?
16:53 jnthn Yup :)
16:54 jnthn In general, I agree natives need a decent bit more work, but they'll always have the "don't in isolation know what they are" issue.
16:54 jnthn 'cus the point of them is they're just the raw data, not carrying a type flag around.
16:54 jnthn So as soon as they leave their "context" that says how they're to be interpreted, they need boxing.
16:55 Skarsnik Probably need to make extra type for NC them, so they became more meaningful
16:56 Skarsnik m: my uint8 $a; say $a ~~ Unsigned;
16:56 camelia rakudo-moar fb0a13: OUTPUT«5===SORRY!5=== Error while compiling /tmp/f22FTIjYYg␤Undeclared name:␤    Unsigned used at line 1␤␤»
17:00 ely-se modules.perl6.org documentation scraper is working well :)
17:00 ZoffixWin modules.perl6.org has a documentation scraper??
17:01 revhippie joined #perl6
17:01 ely-se no, I'm writing one
17:01 ZoffixWin Sweet
17:01 ZoffixWin This reminds me tho...
17:01 ely-se https://github.com/rightfold/sixd​oc/blob/master/bin/sixdoc-scrape
17:02 ZoffixWin The code that figures out whether there's a readme is case-sensitive and SDL2::Raw, for example, names it Readme.md and detection fails.
17:03 ZoffixWin ely-se, cool :)
17:04 ely-se wish Pod::To::HTML had a "bare" option, to only generate the text that would go in the <body> element
17:04 ZoffixWin say DOM::Tiny->new($html)->at('body') :)
17:06 ZoffixWin ->descendant_nodes->map('xml') I guess, to remove the <body> itself
17:06 Skarsnik I should write something like that based on gumbo x)
17:08 ZoffixWin That would be great
17:08 ely-se ZoffixWin: is that Perl 5 or 6?
17:09 ZoffixWin ely-se, 5
17:09 ely-se nice
17:09 ZoffixWin ely-se, DOM::Tiny is a port of Mojo::DOM by one of the core Mojolicious members: https://metacpan.org/pod/DOM::Tiny
17:10 ZoffixWin Well, the goal of it was to provide a parser WITHOUT having to install a web framework :)
17:10 ely-se I'll probably store all data in a SQLite database
17:10 ely-se much easier and safer (because user input) than dealing with files
17:12 xinming joined #perl6
17:14 dalek ecosystem: 436f89c | RabidGravy++ | META.list:
17:14 dalek ecosystem: Add Attribute::Lazy
17:14 dalek ecosystem:
17:14 dalek ecosystem: See https://github.com/jonathanstowe/Attribute-Lazy
17:14 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/436f89ccad
17:14 Skarsnik nice RabidGravy x)
17:14 nchambers joined #perl6
17:15 colourspace joined #perl6
17:15 ZoffixWin weeee RabidGravy++
17:15 RabidGravy ^ is basically the code reverted from the code changed a bit to make it pass some tests ;-)
17:15 RabidGravy timotimo, there ^
17:17 colourspace hello, i have perhaps a noobish regex problem i'm trying to work through. i need to match both the strings "foo - bar" and "foo - bar - baz", so i have a regex something like / <first> <separator> <second> [ <separator> <third> ]? / where second and third are an arbitrary sequence of characters NOT matching <separator>. naively i have second and third both defined as / .+ /, but as you can imagine it will greedily match second as
17:17 colourspace any idea how to make it not so greedily match?
17:19 awwaiid colourspace: try throwing a ? after the .+, as in .+?
17:20 jnthn They're syntax for matching things between separators also
17:20 jnthn *there's
17:20 colourspace jnthn that sounds exactly what i'd need, can you point me in the right direction?
17:20 ely-se How do you in English differentiate between a module defined with the module keyword and a module as distributed with META.info, lib, t, etc files?
17:20 jnthn m: say 'foo - bar' ~~ / (\w+)**2..3 % [\s*'-'\s*] /
17:20 camelia rakudo-moar fb0a13: OUTPUT«「foo - bar」␤ 0 => 「foo」␤ 0 => 「bar」␤»
17:20 jnthn m: say 'foo - bar - baz' ~~ / (\w+)**2..3 % [\s*'-'\s*] /
17:20 camelia rakudo-moar fb0a13: OUTPUT«「foo - bar - baz」␤ 0 => 「foo」␤ 0 => 「bar」␤ 0 => 「baz」␤»
17:21 jnthn **2..3 is the "match 2 to 3 times" quantifier
17:21 jnthn % can be used with any quantifier and means "match the thing to the right between each of the matches of the quantified thing"
17:21 jnthn http://doc.perl6.org/language/re​gexes#Modified_quantifier%3A_%25
17:21 autark joined #perl6
17:22 colourspace ok thank you, i will play around with these suggestions
17:22 araujo_ joined #perl6
17:29 alpha123 joined #perl6
17:29 skids ely-se: "distribution"?
17:32 ely-se skids: yeah I went with that :P
17:36 DrPete_ joined #perl6
17:40 ZoffixWin m: use NativeCalls; sub hypot (uint32_t, uint32_t) is native {}
17:40 camelia rakudo-moar fb0a13: OUTPUT«===SORRY!===␤Could not find NativeCalls in:␤    /home/camelia/.perl6/2015.12-218-gfb0a135␤    /home/camelia/rakudo-m-inst-1/share/perl6/site␤    /home/camelia/rakudo-m-inst-1/share/perl6/vendor␤    /home/camelia/rakudo-m-inst-1/share/perl6␤    …»
17:40 ZoffixWin m: use NativeCall; sub hypot (uint32_t, uint32_t) is native {}
17:40 camelia rakudo-moar fb0a13: OUTPUT«5===SORRY!5=== Error while compiling /tmp/rIwkeuSvoL␤Invalid typename 'uint32_t' in parameter declaration. Did you mean 'uint32'?␤at /tmp/rIwkeuSvoL:1␤------> 3use NativeCall; sub hypot (uint32_t7⏏5, uint32_t) is native {}␤»
17:40 dalek doc/jgoff-regex-substitution: a606c27 | (Jeffrey Goff)++ | doc/Language/regexes.pod:
17:40 dalek doc/jgoff-regex-substitution: Basic documentation for the s/// operator.
17:40 dalek doc/jgoff-regex-substitution: review: https://github.com/perl6/doc/commit/a606c27cb5
17:40 ZoffixWin hmmmm
17:41 ZoffixWin The NativeCall's learning curve is super steep (if you don't know C, I mean)
17:41 khw joined #perl6
17:41 Skarsnik just use gptrixie xD
17:42 mollmerx joined #perl6
17:42 ZoffixWin Yup, installing it right now :)
17:43 ZoffixWin Hm, actually this plays well into my blog post... I'll show that even an idiot like me can use C libraries :P
17:44 Skarsnik Well translation C definition -> perl6 is not even half the work
17:44 Skarsnik You still need to know some C to understand how some stuff are to be handled
17:45 ZoffixWin I wonder if we can improve that actually. I see in Haskel, they can just do C.include "<stdio.h>" and go to town: https://www.fpcomplete.com/blog/2015/05/inline-c
17:47 Skarsnik how they parse the header?
17:47 ZoffixWin No idea.
17:48 Skarsnik and it's cute for stdio probably
17:48 Skarsnik but I have header that involve 150 files
17:49 ZoffixWin Later on that page they say "we use a function from C's GNU Scientific Library", so I assume it works with bigger things too.
17:50 ZoffixWin Hm "*resolve stage failed for http://modules.perl6.org/dist/App::GPTrixie: Project http://modules.perl6.org/dist/App::GPTrixie not found in the ecosystem)"
17:50 ZoffixWin Ah, right, I've used the full URL instead of module name >_<
17:52 Skarsnik xD
17:52 ggoebel12 joined #perl6
17:55 DrForr About to make a pull request for s/// documentation.
17:56 DrForr (currently waiting for the indexer to run.)
17:57 espadrine joined #perl6
17:58 ZoffixWin Skarsnik, sent you a PR to fix typos and I see I typoed myself with "thatsome" here that should be left alone as "some": https://github.com/Skarsnik/gptrixie/pull/5/f​iles#diff-04c6e90faac2675aa89e2176d2eec7d8R6
17:59 ZoffixWin I've no idea how to modify a commit with GitHub's web interface :)
18:00 Skarsnik just redo a commit?
18:00 ZoffixWin I installed the module but `gptrixie` is not available.
18:00 Skarsnik it update the pr
18:01 ZoffixWin I don't see any redo options
18:01 Skarsnik I mean do another commit
18:02 Skarsnik hm, I have no idea where/how panda install 'binary'
18:02 jme` joined #perl6
18:02 Skarsnik and I probably forget to put a #!/bin/env perl6
18:03 ZoffixWin Ah, yeah, that did it (the commit)
18:03 DrForr Wow. When the docs said it would take a while they.. weren't kidding.
18:04 colomon joined #perl6
18:04 ZoffixWin Ah, yeah, it's installed in /home/zoffix/./.rakudobrew/moar-nom/i​nstall/share/perl6/site/bin/gptrixie, but that's not in my path
18:05 ZoffixWin bummer....
18:06 xtreak joined #perl6
18:06 travis-ci joined #perl6
18:06 travis-ci Doc build passed. Jeffrey Goff 'Basic documentation for the s/// operator.'
18:06 travis-ci https://travis-ci.org/perl6/doc/builds/104314461 https://github.com/perl6/doc/commit/a606c27cb574
18:06 travis-ci left #perl6
18:06 Skarsnik panda did not warn about that?
18:06 xtreak Is there a release schedule for perl6?
18:07 ZoffixWin Skarsnik, nope
18:08 flussence xtreak: Rakudo is released the third Saturday of each month.
18:08 ZoffixWin xtreak, not at the moment. As far as I know, the Rakudo release schedule is being modified and decided on at the moment. It'll still be monthly, though. As for Perl 6 the language, I think it's yearly, with the next release being around Diwali
18:16 ggoebel13 joined #perl6
18:18 _mg_ joined #perl6
18:21 laz78 joined #perl6
18:24 dalek perl6.org: 2d93ad0 | (Zoffix Znet)++ | source/downloads/index.html:
18:24 dalek perl6.org: Include panda's module binaries dir in the PATH addition
18:24 dalek perl6.org: review: https://github.com/perl6/p​erl6.org/commit/2d93ad03c9
18:26 RabidGravy in case anyone's interested just updated that Attribute::Lazy so that you can get access to the instance in the builder
18:27 RabidGravy which makes it much more useful
18:28 hc0d3r joined #perl6
18:36 RabidGravy that's definitely not what I set out to do today
18:36 dalek doc/jgoff-regex-substitution: 28826ed | (Jeffrey Goff)++ | doc/Language/regexes.pod:
18:36 dalek doc/jgoff-regex-substitution: Reindexed =head markers
18:36 dalek doc/jgoff-regex-substitution: review: https://github.com/perl6/doc/commit/28826ed264
18:37 ZoffixWin Am I doing anything obviously wrong? I'm getting "An exception occurred while parameterizing CArray" https://gist.github.com/zoff​ixznet/bd204722f68b70bd5709
18:38 Skarsnik uint32_t does not exist x)
18:38 leont joined #perl6
18:38 RabidGravy yeah that's what I thought
18:38 ZoffixWin Oh
18:38 RabidGravy you get the funny error because of the way it gets applied at compile time or something
18:39 ZoffixWin What do I use instead of unit32_t?
18:39 RabidGravy uint32
18:39 Skarsnik I should probably replace these type since there are in c99
18:40 Skarsnik but I need th pray first to redoing my type-eq operator does not segfault moar again xD
18:42 yurivish joined #perl6
18:44 RabidGravy I wouldn't replace them
18:45 RabidGravy I'd just document that you don't need the _t in NC code :)
18:47 ZoffixWin :( "Native call expected return type with CPointer representation, but got a CStruct"
18:48 ZoffixWin This is the code https://gist.github.com/zoff​ixznet/c0421f531653043cfdb3
18:49 nchambers joined #perl6
18:52 ZoffixWin return type of what :S
18:55 ZoffixWin *sigh* time to take a break from this tuff
18:59 colomon joined #perl6
19:03 Skarsnik ZoffixWin, weird, what line?
19:03 nchambers joined #perl6
19:04 ZoffixWin Skarsnik, 43. I now added the full error in the comment: https://gist.github.com/zoffixznet/c04​21f531653043cfdb3#gistcomment-1678384
19:04 Skarsnik oh yeah make sense
19:05 Skarsnik you give it a cpu_raw_data but it expect a Pointer[cpu_raw_data]
19:05 Skarsnik but it's probably a case of just replaceing Pointer[cpu_raw_data] with cpu_raw_data is rw
19:06 ifim joined #perl6
19:06 _mg_ joined #perl6
19:06 hankache why when i run tests i see this line: "done without supply or react in block <unit> at t/00-load.t line 7" ??
19:08 Skarsnik make test on rakudo?
19:08 RabidGravy because there is a "done" without a supply or react block :)
19:08 RabidGravy you want done-testing
19:08 Skarsnik did you write done testing instead of done-testing?
19:08 RabidGravy it's been like that for months
19:08 hankache RabidGravy++ Skarsnik++ #silly done
19:09 hankache i can delete it safely right? my understanding is that i don't need "done" if i specify a plan. Am i right?
19:10 RabidGravy yes
19:10 hankache thanks you gents
19:12 ZoffixWin Skarsnik, that just results in segmenation fault :/
19:13 ZoffixWin Skarsnik, that just results in segmenation fault :/
19:13 ZoffixWin oops
19:13 dalek doc: a606c27 | (Jeffrey Goff)++ | doc/Language/regexes.pod:
19:13 dalek doc: Basic documentation for the s/// operator.
19:13 dalek doc: review: https://github.com/perl6/doc/commit/a606c27cb5
19:13 dalek doc: 28826ed | (Jeffrey Goff)++ | doc/Language/regexes.pod:
19:13 dalek doc: Reindexed =head markers
19:13 dalek doc: review: https://github.com/perl6/doc/commit/28826ed264
19:13 dalek doc: b8a03ba | RabidGravy++ | doc/Language/regexes.pod:
19:13 dalek doc: Merge pull request #363 from perl6/jgoff-regex-substitution
19:13 dalek doc:
19:13 dalek doc: Add documentation for s/// operator
19:13 dalek doc: review: https://github.com/perl6/doc/commit/b8a03ba376
19:13 ely-se http://i.imgur.com/XkUG6OJ.png :)
19:13 hahainternet so i saw https://wenderen.github.io/Ruler-Series/ on HN, but i can't seem to figure out if it's possible to zip two infinite lists
19:14 hahainternet i assume i'm doing something dumb, so i thought i'd ask for an example :D
19:14 ZoffixWin ely-se++
19:14 Skarsnik lol
19:14 RabidGravy You'd want a lazy zip I guess but I don't think there is one
19:14 hahainternet hmm actually now it works
19:14 hahainternet m: say ((1,3...*) Z (2,4...*))
19:14 camelia rakudo-moar fb0a13: OUTPUT«(...)␤»
19:14 hahainternet well
19:15 AlexDaniel what is it? Fastest merge in the west contest?
19:15 hahainternet m: say ((1,3...*) Z (2,4...*))[^10]
19:15 camelia rakudo-moar fb0a13: OUTPUT«((1 2) (3 4) (5 6) (7 8) (9 10) (11 12) (13 14) (15 16) (17 18) (19 20))␤»
19:15 lnrdo joined #perl6
19:15 hahainternet so that's nice
19:15 Skarsnik ZoffixWin, you will need to know what the lib does with the pointer. that can change how to declare the functon/use it
19:15 ZoffixWin hmmm
19:15 ZoffixWin K. I'm gonna leave NC for now :) I need to learn way more first
19:16 Skarsnik You can say it's a drawback of wanting to do 'magic' stuff in NC and don't have a malloc
19:16 Skarsnik I can't translate a c declaration directly because of that
19:17 ZoffixWin Ah
19:17 Skarsnik yes a function taking a * cstruct can be written in NC with just the cstruct
19:18 Skarsnik but sometime it's wrong
19:18 Skarsnik That why the generator in gptrixie is called dumb
19:18 RabidGravy I think the native documentation probably wants a note saying that some things are easier if you build a C wrapper for the functions yourself
19:18 Skarsnik it does not make smart choice
19:20 colomon joined #perl6
19:20 musiKk joined #perl6
19:21 hahainternet i might be being stupid, but in the above example, is there a nice way to have those two element lists flattened into one?
19:21 ely-se many modules seem to attempt to mkdir /home/rightfold/.perl6/2015.12/dist
19:21 ely-se why is that? I'm on a read-only FS
19:21 hahainternet i swear i have done this before, but i can't think
19:22 Skarsnik lol
19:23 AlexDaniel m: say (flat (1,3...*) Z (2,4...*))[^10]
19:23 camelia rakudo-moar fb0a13: OUTPUT«(1 2 3 4 5 6 7 8 9 10)␤»
19:23 AlexDaniel hahainternet: I don't think that it is what you mean. So what do you mean?
19:24 hahainternet no that's what i meant, i didn't realise you could call flat like that
19:24 hahainternet that works perfectly
19:24 AlexDaniel m: say flat ((1,3...*) Z (2,4...*))[^10]
19:24 camelia rakudo-moar fb0a13: OUTPUT«(1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20)␤»
19:25 hahainternet i assumed something like Z, might work as Z==> does, but clearly the list part happens a little 'earlier'
19:34 ajr_ joined #perl6
19:35 colomon joined #perl6
19:35 masak ely-se: I don't know why it's trying to create that directory -- but your scenario ("I am on a read-only FS") feels like it should (be made to) work
19:36 psy_ joined #perl6
19:42 dalek doc: 106a629 | (Wenzel P. P. Peppmeyer)++ | doc/Language/control.pod:
19:42 dalek doc: doc once
19:42 dalek doc: review: https://github.com/perl6/doc/commit/106a629dfe
19:42 dalek doc: 8a758ad | (Wenzel P. P. Peppmeyer)++ | doc/Language/control.pod:
19:42 dalek doc: doc quietly
19:42 dalek doc: review: https://github.com/perl6/doc/commit/8a758ad018
19:46 dalek ecosystem: 411820f | RabidGravy++ | META.list:
19:46 dalek ecosystem: Give that the prooper URL
19:46 dalek ecosystem:
19:46 dalek ecosystem: Maybe it could be made a bit smarter in this regard
19:46 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/411820f536
19:46 RabidGravy me-- # how many times do I need to do that
19:50 masak we could have Travis check against such a URL
19:56 RabidGravy it's entirely possible in that one case the module list builder thingy could have worked out the proper URL
19:59 ZoffixWin Not in the last one :)
19:59 ZoffixWin (unless you mean it should be made to be able to work it out)
19:59 RabidGravy yes that is exactly what I meant
20:00 ZoffixWin It's very easy to do with modules.perl6.org, but I'm unsure what other things use that META.list
20:01 RabidGravy sure, and iin the end I need to just not keep making that mistake
20:04 RabidGravy is the "will" trait word actually different in the grammar so it can take a block like that or is there something I'm missing i traits.pm ?
20:08 nchambers joined #perl6
20:09 jnthn RabidGravy: No, it's different in the grammar
20:09 jnthn RabidGravy: is parses one way, will another, and returns/does/of a third
20:11 ely-se I'm not sure what to do with respect to licenses of the POD /cc ZoffixWin
20:11 RabidGravy cool, I guess that ouughta be documented somewhere
20:11 dalek ecosystem: 80ac5f9 | (Zoffix Znet)++ | META.list:
20:11 dalek ecosystem: Fix modules that have build errors
20:11 dalek ecosystem:
20:11 dalek ecosystem: [META.info is now META6.json]: stmuk/p6-String-Koremutake, stmuk/p6-Text-VimColour, stmuk/p6-html-restrict, stmuk/p6-eco-readme, fayland/perl6-Cache-LRU
20:11 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/80ac5f9f1d
20:13 ZoffixWin ely-se, I'm not a lawyer, but I think a blurb on your thing stating that the copyright belongs to the original authors and you're only displaying their content yada yada would work
20:13 ifim` joined #perl6
20:14 ZoffixWin s/your thing/modules.perl6.org/; # Since I'm hoping we'll just add it into that :)
20:16 musiKk question: why is "{0} or 1" a Block but "{0} and 1" is an Int?
20:16 ely-se ZoffixWin: for now: http://6doc.rightfold.sexy/ (yes that's my domain name xD)
20:16 ZoffixWin haha
20:17 RabidGravy m: say so {0}
20:17 camelia rakudo-moar fb0a13: OUTPUT«True␤»
20:17 ZoffixWin musiKk, lazy evaluation? {0} is true, so it never gets to the "or 1" bit, but with the latter it reaches to the second part
20:18 timotimo yeah, foobar and barbaz evaluates to barbaz if foobar is true
20:18 timotimo and a code block is true
20:18 musiKk sure but why is essentially "true or 1" a block then?
20:18 ZoffixWin oh, man, you can see all that modules include in distros in that list! ely-se++
20:18 ZoffixWin musiKk, no, {0} is a block
20:19 musiKk ZoffixWin: I know. but "{0} or 1" is a block, too.
20:19 gfldex neither or nor and coerce to bool
20:19 RabidGravy it's just you're askiing to evaluate it in a boolean context
20:19 timotimo musiKk: "foo" or 1   is a Str
20:19 ely-se ZoffixWin: it's all stored as SQL so I can easily add search functionality too once I index more of META.info files than just name and source-url
20:19 timotimo musiKk: Version.new() or 1   is a Version
20:19 timotimo musiKk: for the same reason, { 0 } or 1   is a Block
20:19 musiKk oooh
20:20 ZoffixWin :)
20:20 musiKk yeah right, thanks. didn't see if for some reason.
20:21 musiKk *it
20:21 ZoffixWin ely-se, none of my modules are in that list because I keep my docs only in README.md X)
20:21 timotimo :)
20:21 ZoffixWin Which I probably shouldn't be doing... p6doc, then auto-generate README.md is the way to go
20:22 ely-se ZoffixWin: I have only indexed a few modules anyway
20:22 ely-se because it takes a lot of time to set up sandboxes which are needed because perl6 --doc can execute arbitrary code
20:24 ely-se I should parallelise it but :effort:
20:28 TEttinger joined #perl6
20:30 yqt joined #perl6
20:30 BenGoldberg joined #perl6
20:34 AlexDani` joined #perl6
20:45 ely-se All those DateTime::TimeZone modules take a long time to extract documentation from, and they are undocumented.
20:45 ely-se May want to special-case those :)
20:45 ZoffixWin :)
20:50 TimToady m: say so Version.new
20:50 camelia rakudo-moar fb0a13: OUTPUT«True␤»
20:50 TimToady I could argue that should be false, just so versions have a distinguished defined but false value
20:52 ely-se why should versions be false?
20:53 ely-se make them false if they aren't the current value :P
20:53 ZoffixWin m: say so Version.new: False
20:53 camelia rakudo-moar fb0a13: OUTPUT«True␤»
20:53 ZoffixWin m: say so Version.new: ''
20:53 camelia rakudo-moar fb0a13: OUTPUT«True␤»
20:53 ZoffixWin :S
20:53 ely-se m: say perl Version.new: False
20:53 camelia rakudo-moar fb0a13: OUTPUT«5===SORRY!5=== Error while compiling /tmp/XzLF14XGlt␤Undeclared routine:␤    perl used at line 1␤␤»
20:54 TEttinger joined #perl6
20:56 lichtkind joined #perl6
21:06 ely-se oh great
21:06 ely-se you can't extract a module's documentation without having its dependencies installed
21:11 ely-se or maybe you can
21:11 ely-se hmmm
21:11 ely-se apparently only sometimes
21:13 stmuk grrrr Mac's OpenSSL doesn't support TLSv1.2 and OpenSSL module is broken as a result
21:16 Grrrr stmuk: I did not do it;  I was not even there!
21:16 hc0d3r left #perl6
21:18 leont stmuk: what? That doesn't sound right
21:21 stmuk its 0.9.8
21:21 stmuk I think their browser uses a different SSL library
21:22 hankache joined #perl6
21:22 AlexDaniel is it part of their attempts to get rid of GPLv3?
21:23 stmuk I think its Apache Licence so its more likely NIH
21:23 stmuk they never added any GPLv3 stuff
21:23 AlexDaniel riiight…
21:24 AlexDaniel stmuk: yeah but that was the reason why they were shipping some really old stuff
21:24 AlexDaniel because some projects switched to GPLv3
21:24 leont Wow, that is old
21:27 AlexDaniel if it is Apache License, then what's their problem? NIH is not enough (because they are already using it!)
21:27 stmuk I suppose they don't care
21:31 _mg_ joined #perl6
21:31 timotimo oh hey TimToady
21:34 hankache how come for a specific module, the tests are all ok on my local machine, but some of them fail on travis ?
21:34 hankache https://github.com/hankache/perl6-Imlib2
21:35 hankache the Imlib module was dead and I am trying to revive it
21:39 ely-se joined #perl6
21:41 hankache any idea?
21:43 colomon joined #perl6
21:44 stmuk maybe travis is headless and doesn't have an X server?
21:44 RabidGravy almost certainly I would say
21:44 RabidGravy it would be skip the tests if e.g. $DISPLAY isn't set
21:45 hankache most errors are: Cannot modify an immutable Range
21:45 jdv79 what is imlib needing a x server?
21:45 jdv79 *why
21:46 stmuk https://github.com/perl6/gtk-simple/commit​/1c1a8cc8474c1d3ae9d30bff4cfaa4a991f68f02
21:46 lsm-desktop joined #perl6
21:46 stmuk its a graphocal library isn't it?
21:46 stmuk speelt rite
21:47 hankache https://travis-ci.org/hankache/perl6-Imlib2
21:47 araujo__ joined #perl6
21:47 jdv79 oh, i never used it that way.  just to gen graphics files or resize images.
21:48 jdv79 cool
21:48 hankache jdv79 yes this is what i use it for. The latest PR was from 2014, I am trying to bring it up to speed
21:49 hankache i even found "Parcel" inside ;)
21:49 RabidGravy :-\
21:49 RabidGravy ancieunte
21:49 jdv79 sweet
21:49 ely-se m: sub infix:<iff>(Bool:D $a, Bool:D $b) { $a eqv $b }; say((True, False) Xiff (True, False))
21:49 camelia rakudo-moar fb0a13: OUTPUT«(True False False True)␤»
21:49 ely-se :D :D :D
21:51 hankache stmuk the failed tests returned this error:  "Cannot modify an immutable Range" weird eh!
21:52 stmuk maybe preGLRism
21:52 hankache but how come tests are ok on my local machine?
21:52 stmuk errr
21:52 hankache i have the latest rakudo
21:53 hankache This is Rakudo version 2015.12-218-gfb0a135 built on MoarVM version 2015.12-29-g8079ca5
21:53 stmuk dunno reasons :)
21:53 stmuk maybe its something else
21:54 hankache ok
21:54 hankache :)
21:57 jdv79 maybe the tests are not of a high caliber
21:58 RabidGravy Sometimes you get those weird  "cannot modify ... " errors when something gone broke in some asynchronous code, saw a lot of it when I was fixing Net::AMQP
21:58 stmuk blame travis
21:59 hankache jdv79 I didn't write the tests, just forked the repo and made all required changes while making sure tests run
21:59 stmuk Travis Bickle
21:59 RabidGravy it's a pain if you can't reprododuce locally
21:59 dalek rakudo-star-daily: 015df23 | coke++ | log/ (5 files):
21:59 dalek rakudo-star-daily: today (automated commit)
21:59 dalek rakudo-star-daily: review: https://github.com/coke/rakudo​-star-daily/commit/015df230b3
21:59 dalek perl6-roast-data: 74ae2d6 | coke++ | / (6 files):
21:59 dalek perl6-roast-data: today (automated commit)
21:59 dalek perl6-roast-data: review: https://github.com/coke/perl6​-roast-data/commit/74ae2d650e
21:59 hankache stmuk yeah travis is drunk
22:00 colomon joined #perl6
22:00 RabidGravy you might try our theory out by running the tests with "DISPLAY= prove -e 'perl6 -Ilib' t"
22:01 Biappi joined #perl6
22:01 Biappi left #perl6
22:01 hankache RabidGravy why not. let's see what happens
22:02 stmuk https://github.com/gelstudios/gitfiti
22:02 hankache lol
22:08 ely-se I'm going to work on Inline::False (http://strlen.com/false-language) tomorrow
22:08 ZoffixWin lmao
22:08 ely-se I've always wanted to implement False.
22:08 * ZoffixWin wants to do Brainfuck
22:09 ZoffixWin That language always mystified me and its vulgarity appeals to me :)
22:10 Sgeo joined #perl6
22:10 ely-se Bra*infuck isn't particularly interesting IMO
22:10 hankache ely-se++ ZoffixWin++
22:10 ely-se hankache: what for?
22:10 hankache ely-se #Inline::False
22:11 ely-se oh :p
22:13 hankache RabidGravy "DISPLAY= prove -e 'perl6 -Ilib' t" goes in "script:" ?
22:18 mprelude joined #perl6
22:26 DrForr I was thinking Malbolge :)
22:28 araujo__ joined #perl6
22:28 musiKk question: I can't find anything in the docs about specifying the return type of a routine with the "returns" keyword and I don't remember where I read about it. Is it the same as using -->?
22:28 ZoffixWin I believe so
22:29 ZoffixWin m: sub foo returns int32 { }; say &foo.^signature
22:29 camelia rakudo-moar fb0a13: OUTPUT«Method 'signature' not found for invocant of class 'Perl6::Metamodel::ClassHOW'␤  in block <unit> at /tmp/QE_JhFCfWx line 1␤␤»
22:29 ZoffixWin m: sub foo returns int32 { }; say &foo.signature
22:29 camelia rakudo-moar fb0a13: OUTPUT«( --> int32)␤»
22:30 musiKk maybe legacy syntax?
22:30 ZoffixWin TMTOWTDI more likely
22:30 ZoffixWin Are there any tutorials for slangs?
22:30 musiKk I thought about that but still find it weird. Just doesn't feel right.
22:31 musiKk I guess it's safe to say --> is more idiomatic?
22:31 * ZoffixWin uses returns
22:33 musiKk I guess I need to read more code before making assumptions like that.
22:33 ZoffixWin Well, it's also a brand new language... Many things to become "idiomatic" are yet to be established :)
22:33 musiKk It's just the lack of (easy to find) documentation that made me think that.
22:34 musiKk Yeah. Though funnily enough many useful information I find is from 2010-2013.
22:35 RabidGravy hankache, I was proposing you ran that on your local match
22:35 RabidGravy er machine
22:35 ely-se how can I get a scalar container out of a hash?
22:35 RabidGravy to emulate how it might be on travis
22:36 ely-se m: my %h = 1 => 2; %h{1}.VAR.say
22:36 camelia rakudo-moar fb0a13: OUTPUT«2␤»
22:37 ely-se m: my %h = 1 => 2; %h{1}.VAR.perl.say
22:37 camelia rakudo-moar fb0a13: OUTPUT«Int.new␤»
22:37 ely-se m: my %h = 1 => 2; %h{1}.VAR.WHAT.say
22:37 camelia rakudo-moar fb0a13: OUTPUT«(Scalar)␤»
22:37 ely-se m: my %h = 1 => 2; %h{1}.VAR = 5; %h.say
22:37 camelia rakudo-moar fb0a13: OUTPUT«Cannot assign to a readonly variable or a value␤  in block <unit> at /tmp/ZxGDzzFG2Y line 1␤␤»
22:38 ely-se m: my %h = 1 => 2; my $x := %h{1}.VAR; $x = 5; %h.say
22:38 camelia rakudo-moar fb0a13: OUTPUT«Cannot assign to a readonly variable or a value␤  in block <unit> at /tmp/ltLUh6ktXq line 1␤␤»
22:38 RabidGravy musiKk, the --> can be used in places where the returns can't
22:38 geekosaur if you have the VAR cn't you only bind to it?
22:38 RabidGravy m: my &foo = -> $x --> Int { 1 }; say &foo.signature
22:38 camelia rakudo-moar fb0a13: OUTPUT«($x --> Int)␤»
22:38 ely-se m: my %h = 1 => 2; my $x := %h{1}.VAR; $x := 5; %h.say
22:38 camelia rakudo-moar fb0a13: OUTPUT«1 => 2␤»
22:38 ely-se m: my %h = 1 => 2; %h{1}.VAR := 5; %h.say
22:38 camelia rakudo-moar fb0a13: OUTPUT«5===SORRY!5=== Error while compiling /tmp/6PgS2Iw_zy␤Cannot use bind operator with this left-hand side␤at /tmp/6PgS2Iw_zy:1␤------> 3my %h = 1 => 2; %h{1}.VAR := 57⏏5; %h.say␤»
22:38 ely-se geekosaur: nah, binding is for lexpads, not for containers
22:39 ely-se my: ($).WHAT.say
22:39 ely-se m: ($).WHAT.say
22:39 camelia rakudo-moar fb0a13: OUTPUT«(Any)␤»
22:39 mscha joined #perl6
22:39 musiKk RabidGravy: Makes sense. Is the opposite also true?
22:40 * TimToady generally prefers -->
22:40 RabidGravy I'm not sure myself
22:40 mscha In perl 5, I use the following to “remove diacritics”: use Unicode::Normalize qw(normalize); $str = normalize('NFD', $str); $str =~ s{\p{Mn}}{}g;
22:40 mscha Any idea how to do that in perl6?
22:41 leont Is there any use-case for the return type?
22:41 leont I can imagine it being useful for optimizations, but I don't think we're there yet
22:41 leont Is there anything else that can reasonably be done with it
22:41 colomon joined #perl6
22:41 TimToady m: sub foo (--> 42) {}; say foo
22:41 camelia rakudo-moar fb0a13: OUTPUT«42␤»
22:42 TimToady m: sub foo (--> 42) { 43 }; say foo
22:42 camelia rakudo-moar fb0a13: OUTPUT«WARNINGS for /tmp/7Pzkkaj28L:␤Useless use of constant integer 43 in sink context (line 1)␤42␤»
22:42 ZoffixWin :o
22:42 araujo_ joined #perl6
22:42 aindilis joined #perl6
22:43 ZoffixWin leont, output validation?
22:43 leont I can see that point, but it doesn't feel like it'd be very useful when I know what object I just created
22:44 TimToady it's not about you :)
22:44 TimToady it's the contract with the user
22:45 ZoffixWin Why not?
22:45 ZoffixWin m: sub foo (--> Int) { { "complex code and conditionals" }; return "foo"; }; foo
22:45 camelia rakudo-moar fb0a13: OUTPUT«WARNINGS for /tmp/kf6t6fL6Lg:␤Useless use of constant string "complex code and conditionals" in sink context (line 1)␤Type check failed for return value; expected Int but got Str␤  in sub foo at /tmp/kf6t6fL6Lg line 1␤  in block <unit> at /tmp/kf6t…»
22:46 ZoffixWin m: sub kelvin (--> Int where * > 0 ) { return -42; }; kelvin
22:46 camelia rakudo-moar fb0a13: OUTPUT«5===SORRY!5=== Error while compiling /tmp/bT0HmrKe3G␤Type 'Int' is not declared. Did you mean 'int'?␤at /tmp/bT0HmrKe3G:1␤------> 3sub kelvin (--> Int7⏏5 where * > 0 ) { return -42; }; kelvin␤»
22:46 leont Fair enough, I do like that part
22:46 ZoffixWin :/
22:46 ZoffixWin weird error
22:46 RabidGravy yeah because even if your code is doing the right thing, it doesn't mean the rest is
22:47 AlexDaniel m: sub foo returns 42 {}; say foo
22:47 camelia rakudo-moar fb0a13: OUTPUT«5===SORRY!5=== Error while compiling /tmp/ua4bajlaBv␤Malformed trait␤at /tmp/ua4bajlaBv:1␤------> 3sub foo returns7⏏5 42 {}; say foo␤»
22:47 AlexDaniel this does not work though
22:47 AlexDaniel what was the third and fourth way to do it?
22:48 RabidGravy so yeah, there are places where --> is required
22:48 RabidGravy :)
22:49 RabidGravy when I was working on Tinky I was playing with dispatchers and I can foresee you might want to consider the return type as well as the types of the arguments
22:50 AlexDaniel m: sub foo of 42 {}; say foo
22:50 camelia rakudo-moar fb0a13: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Bu5bsoJLKa␤Malformed trait␤at /tmp/Bu5bsoJLKa:1␤------> 3sub foo of7⏏5 42 {}; say foo␤»
22:50 AlexDaniel ok this one does not work too :)
22:51 RabidGravy e.g. "run all the methods that say they do this trait and return this thing"
22:51 AlexDaniel and sure this doesn't work too
22:51 AlexDaniel m: my 42 sub foo {}; say foo
22:51 camelia rakudo-moar fb0a13: OUTPUT«5===SORRY!5=== Error while compiling /tmp/SPtKCEHmHk␤Malformed my␤at /tmp/SPtKCEHmHk:1␤------> 3my7⏏5 42 sub foo {}; say foo␤»
22:54 musiKk What's a "my sub" again...?
22:54 RabidGravy redundant for the most part, as subs are by default lexically scoped
22:54 AlexDaniel m: my Int sub A {}; sub B(--> Int) {}; sub C returns Int {}; sub D of Int {}; say (&A, &B, &C, &D)».returns
22:54 camelia rakudo-moar fb0a13: OUTPUT«((Int) (Int) (Int) (Int))␤»
22:54 musiKk Ok. So we have three ways of specifying the return type.
22:54 AlexDaniel musiKk: 4
22:55 musiKk What's the 4th? I know -->, returns and "my RETTYPE sub ..."
22:55 RabidGravy of
22:55 AlexDaniel musiKk: all of them listed ↑
22:56 hankache joined #perl6
22:56 musiKk Sorry. Hard to see between all the compile errors. :)
22:56 AlexDaniel huggable: return :is: my Int sub A {}; sub B(--> Int) {}; sub C returns Int {}; sub D of Int {}; say (&A, &B, &C, &D)».returns
22:56 huggable AlexDaniel, Added return as my Int sub A {}; sub B(--> Int) {}; sub C returns Int {}; sub D of Int {}; say (&A, &B, &C, &D)».returns
22:56 TimToady m: sub foo { also returns Int; 42}; say foo
22:56 camelia rakudo-moar fb0a13: OUTPUT«5===SORRY!5=== Error while compiling /tmp/27sqT2Uupj␤Method 'has_returns' not found for invocant of class 'Mu'␤at /tmp/27sqT2Uupj:1␤»
22:57 ZoffixWin :o
22:57 hankache what is the equivalent of Int in native type. int32 or int64?
22:57 ZoffixWin hankache, yeah
22:57 ZoffixWin :)
22:57 AlexDaniel hankache: just int as well, I guess
22:58 ZoffixWin m: my Int $x = 2**100; my int64 $y = 2**100; say $x, $y
22:58 camelia rakudo-moar fb0a13: OUTPUT«Cannot unbox 101 bit wide bigint into native integer␤  in block <unit> at /tmp/K3lFeiGcjR line 1␤␤»
22:58 ZoffixWin orly
22:58 AlexDaniel m: my int128 $x = 2**100; say $x
22:58 camelia rakudo-moar fb0a13: OUTPUT«5===SORRY!5===␤Type 'int128' is not declared. Did you mean any of these?␤    int16␤    int32␤␤at /tmp/WxyxQvciSK:1␤------> 3my int1287⏏5 $x = 2**100; say $x␤Malformed my␤at /tmp/WxyxQvciSK:1␤------> 3my7⏏5 int128 $x = 2**10…»
22:58 hankache AlexDaniel NC complains wheb it sees plain int
22:58 AlexDaniel hankache: ah yeah
22:59 RabidGravy m: use NativeCall;  say nativesizeof(int);
22:59 camelia rakudo-moar fb0a13: OUTPUT«8␤»
22:59 AlexDaniel though I'm not quite sure why… what if some function has “int” in its parameter?
22:59 AlexDaniel why would I hard code int32 or int64 in this case?
23:00 hankache AlexDaniel hence my question
23:00 RabidGravy or indeed int16
23:00 TimToady p6's 'int' is rarely the same as C's 'int'
23:00 hankache since NC nags about int whith what should i replace it?
23:00 ely-se m: my $f = *.say; $f(1)
23:00 camelia rakudo-moar fb0a13: OUTPUT«1␤»
23:00 ely-se m: my &f = *.say; $f(1)
23:00 camelia rakudo-moar fb0a13: OUTPUT«5===SORRY!5=== Error while compiling /tmp/j3CT0EUoMP␤Variable '$f' is not declared. Did you mean '&f'?␤at /tmp/j3CT0EUoMP:1␤------> 3my &f = *.say; 7⏏5$f(1)␤»
23:00 ely-se O:
23:00 TimToady there oughta be a Cint type or so
23:01 TimToady lunch &
23:01 ely-se m: *.say.WHAT.say
23:01 camelia rakudo-moar fb0a13: OUTPUT«(WhateverCode)␤»
23:01 ely-se m: *.say.WHAT ~~ Callable
23:01 camelia rakudo-moar fb0a13: ( no output )
23:01 ely-se m: say *.say.WHAT ~~ Callable
23:01 camelia rakudo-moar fb0a13: OUTPUT«True␤»
23:01 ely-se :(
23:02 AlexDaniel huggable: return :is: sub A(--> Int) {}; sub B returns Int {}; sub C of Int {}; my Int sub D {}; say (&A, &B, &C, &D)».returns
23:02 huggable AlexDaniel, Added return as sub A(--> Int) {}; sub B returns Int {}; sub C of Int {}; my Int sub D {}; say (&A, &B, &C, &D)».returns
23:03 AlexDaniel better order
23:03 RabidGravy m: (*.say)("foooo")
23:03 camelia rakudo-moar fb0a13: OUTPUT«foooo␤»
23:04 ely-se aha!
23:04 ely-se (* && *) and (* || *) don't WhateverCode
23:05 ely-se that's nasty
23:05 RabidGravy BUG OR DESIGN? PLACE YOUR BETS NOW!
23:05 RabidGravy :)
23:06 AlexDaniel m: say (* && *).WHAT
23:06 camelia rakudo-moar fb0a13: OUTPUT«(Whatever)␤»
23:06 leont If you're not sure if something would whatever-curry, don't use it anyway: it will confuse others
23:06 sortiz Design
23:06 AlexDaniel - WHAT?   - Whatever!
23:06 TimToady && and || are more like control code than like operators
23:07 hankache n.m.m
23:07 AlexDaniel TimToady: it was definitely more important to point that out than to enjoy your lunch :)
23:08 sortiz RabidGravy, *.say is -> { $^arg.say }
23:08 hankache mm.n.n..m,n.n.n..n..m.n..nn.n.nn.n.n..n.n.n​.n?n.n.n.n.nn,n.n.n.n.n.n.n.nn.n.n.nn.n.n.
23:08 TimToady you wouldn't expct 'if' or 'unless' to autocurry
23:08 * TimToady can type while he's chewing :)
23:08 RabidGravy sortiz, thanks but I know that
23:08 hankache sorry ;)
23:08 AlexDaniel m: say {$^a && $^b}(2, 5)
23:08 camelia rakudo-moar fb0a13: OUTPUT«5␤»
23:09 ely-se maybe it should be listed in the traps on doc.perl6.org
23:09 AlexDaniel huggable: traps :is: http://doc.perl6.org/language/traps
23:09 huggable AlexDaniel, Added traps as http://doc.perl6.org/language/traps
23:09 AlexDaniel huggable: traps :is: https://doc.perl6.org/language/traps
23:09 huggable AlexDaniel, Added traps as https://doc.perl6.org/language/traps
23:10 RabidGravy "not everything will generate a WhateverCode, if in doubt don't do it"
23:12 ely-se What class provides an in-memory IO handle?
23:12 ely-se I want to capture what is written to $*OUT
23:13 RabidGravy ZoffixWin recently made an IO::SomethingOrOther that does that
23:13 ely-se hmm https://github.com/hoelzro/p6-io-string/
23:14 Skarsnik Test::Output?
23:14 Skarsnik I think it use something he write for
23:14 ZoffixWin modules.perl6.org/repo/IO::MiddleMan
23:15 ZoffixWin ely-se, ^
23:20 mscha m: sub remove-diacritics($str) { $str.comb».NFD»[0]».chr.join; }; say remove-diacritics('Héllò, Wöřld!');
23:20 camelia rakudo-moar fb0a13: OUTPUT«Hello, World!␤»
23:20 mscha (To answer my own question from 40 minutes ago.)
23:21 revhippie neat
23:21 AlexDaniel mscha: oh I remember that
23:22 ZoffixWin mscha, thanks for mentioning :)
23:22 ZoffixWin I don't see .NFD documented on docs.perl6.org
23:22 ZoffixWin mscha, how did you figure it out?
23:23 AlexDaniel https://irclog.perlgeek.de/​perl6/2015-11-12#i_11522549
23:23 mscha Zoffixwin, Googling and trying.  :)  I found .NFD fairly early, but it is somewhat underdocumented.
23:24 mscha Cool, I came up with essentially the same thing as TimToady!
23:24 AlexDaniel huggable: unzalgo :is: https://irclog.perlgeek.de/​perl6/2015-11-12#i_11522549
23:24 huggable AlexDaniel, Added unzalgo as https://irclog.perlgeek.de/​perl6/2015-11-12#i_11522549
23:24 ZoffixWin Created issue: https://github.com/perl6/doc/issues/365
23:31 araujo__ joined #perl6
23:31 ZoffixWin m: my $code = 'das4q35wtsf5.,[<>]]'; $code.subst-mutate: /:g <-[<>]>/, ''; $code.say
23:31 camelia rakudo-moar fb0a13: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Sp0HQJu8eQ␤Unrecognized regex modifier :g␤at /tmp/Sp0HQJu8eQ:1␤------> 3q35wtsf5.,[<>]]'; $code.subst-mutate: /:7⏏5g <-[<>]>/, ''; $code.say␤    expecting any of:␤        argument list␤       …»
23:31 ZoffixWin I forget, how do I replace ALL chars?
23:31 ZoffixWin m: my $code = 'das4q35wtsf5.,[<>]]'; $code.subst-mutate: /<-[<>]>/, '', :g; $code.say
23:31 camelia rakudo-moar fb0a13: OUTPUT«<>␤»
23:31 ZoffixWin Ah
23:34 dalek doc: 6701bcf | (Zoffix Znet)++ | doc/Type/Str.pod:
23:34 dalek doc: make it more clear positionals from subst apply to subst-mutate too
23:34 dalek doc: review: https://github.com/perl6/doc/commit/6701bcfbcb
23:34 Skarsnik Feel free to improve/complete this page btw x) http://doc.perl6.org/language/modules-extra
23:35 TimToady m: my $code = 'das4q35wtsf5.,[<>]]'; $code ~~ s:g[<-[<>]>] = ''; $code.say
23:35 camelia rakudo-moar fb0a13: OUTPUT«<>␤»
23:36 ZoffixWin hm
23:37 TimToady m: my $code = 'das4q35wtsf5.,[<>]]'; say S:g[<-[<>]>] = '' given $code
23:37 camelia rakudo-moar fb0a13: OUTPUT«<>␤»
23:40 keusej joined #perl6
23:44 sufrostico joined #perl6
23:47 pierre-vigier joined #perl6
23:52 keusej joined #perl6
23:53 keusej joined #perl6
23:53 secwang joined #perl6
23:54 pierre-vigier joined #perl6

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

Perl 6 | Reference Documentation | Rakudo