Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-01-14

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:01 colomon joined #perl6
00:07 cfedde does perl6 have an idiom for line oriented file reading? kinda like while(<>){...} ?
00:07 pierre-vigier joined #perl6
00:07 RabidGravy .lines
00:08 RabidGravy m: for $*IN.lines -> $line { say ">>>", $line }
00:08 camelia rakudo-moar 3259ba: OUTPUT«>>>Céad slán ag sléibhte maorga Chontae Dhún na nGall␤>>>Agus dhá chéad slán ag an Eireagal ard ina stua os cionn caor is coll;␤>>>Nuair a ghluais mise thart le Loch Dhún Lúich’ go ciúin sa ghleann ina luí␤>>>I mo dhiaidh bhí gleanntái…»
00:10 TimToady m: for lines() { .say }
00:10 camelia rakudo-moar 3259ba: OUTPUT«Céad slán ag sléibhte maorga Chontae Dhún na nGall␤Agus dhá chéad slán ag an Eireagal ard ina stua os cionn caor is coll;␤Nuair a ghluais mise thart le Loch Dhún Lúich’ go ciúin sa ghleann ina luí␤I mo dhiaidh bhí gleanntáin ghlas’ G…»
00:11 Juerd m: say lines
00:11 camelia rakudo-moar 3259ba: OUTPUT«(Céad slán ag sléibhte maorga Chontae Dhún na nGall Agus dhá chéad slán ag an Eireagal ard ina stua os cionn caor is coll; Nuair a ghluais mise thart le Loch Dhún Lúich’ go ciúin sa ghleann ina luí I mo dhiaidh bhí gleanntáin ghlas’ Ghaoth…»
00:12 RabidGravy m: lines>>.say
00:12 camelia rakudo-moar 3259ba: OUTPUT«Céad slán ag sléibhte maorga Chontae Dhún na nGall␤Agus dhá chéad slán ag an Eireagal ard ina stua os cionn caor is coll;␤Nuair a ghluais mise thart le Loch Dhún Lúich’ go ciúin sa ghleann ina luí␤I mo dhiaidh bhí gleanntáin ghlas’ G…»
00:12 RabidGravy anymore?
00:12 Juerd If you don't mind parens:
00:12 Juerd m: lines.say
00:12 camelia rakudo-moar 3259ba: OUTPUT«(Céad slán ag sléibhte maorga Chontae Dhún na nGall Agus dhá chéad slán ag an Eireagal ard ina stua os cionn caor is coll; Nuair a ghluais mise thart le Loch Dhún Lúich’ go ciúin sa ghleann ina luí I mo dhiaidh bhí gleanntáin ghlas’ Ghaoth…»
00:13 cfedde TIE5WTDI
00:13 Juerd s/I/A/?
00:13 cfedde s/I/A/
00:13 Juerd TAPMT5WTDI
00:13 RabidGravy :)
00:14 cfedde s/M/MM/
00:20 cfedde are there idioms I should be reading about to use perl6 as a cli tool?  ansible blablabla | perl6 -e 'summarize the good bits'
00:22 sortiz joined #perl6
00:33 timotimo state variables and END phaser come to mind, particularly when you use -ne
00:35 orbus perl6: it's like perl5, only moreso
00:35 camelia rakudo-moar 3259ba: OUTPUT«5===SORRY!5=== Error while compiling /tmp/tmpfile␤Missing block (taken by some undeclared routine?)␤at /tmp/tmpfile:1␤------> 3it's like perl5, only moreso7⏏5<EOL>␤    expecting any of:␤        new name to be defined␤»
00:35 camelia ..rakudo-jvm 6c0f93: OUTPUT«5===SORRY!5=== Error while compiling /tmp/tmpfile␤Missing block␤at /tmp/tmpfile:1␤------> 3it's like perl5, only moreso7⏏5<EOL>␤    expecting any of:␤        new name to be defined␤»
00:35 orbus haha
00:35 orbus oops
00:35 orbus was afraid it might do that
00:36 timotimo m: Perl, Cool with any Version
00:36 camelia rakudo-moar 3259ba: ( no output )
00:36 timotimo ^- i loved this one
00:36 orbus haha
00:38 orbus so, when does work start on perl7?
00:39 orbus moving ever closer to the platonic ideal of perl
00:39 abaugher joined #perl6
00:40 timotimo the thing is, perl6 already allows a very big amount of making the language evolve without doing another break
00:41 orbus I am mostly joking
00:41 orbus although
00:41 Juerd orbus: 13 years from now
00:41 orbus there is a certain tendency in the technology world to view something as stagnant if numbers aren't going up
00:42 Juerd orbus: And then it'll take another 15 to complete, so expect Perl 7 in 2043.
00:42 orbus haha
00:42 keix joined #perl6
00:42 Juerd Perl 6 stuff started around 2000, when Perl 1..5 was already 13 years old. Etc. :)
00:42 orbus right right
00:44 orbus 1 2 3 4 5 6 .. Inf
00:45 Juerd m: my @p = 1, 2, 3, 4, 5, 6 ... Inf; say @p[42];
00:45 camelia rakudo-moar 3259ba: OUTPUT«43␤»
00:45 cfedde do we mark the beginning at the cup flinging event?
00:45 Juerd This sequence is kind of boring
00:45 timotimo i suppose so?
00:46 orbus so here's a question for the people familiar with perl6 guts
00:47 orbus I wrote a (really horrible) program yesterday
00:47 timotimo uh-oh
00:47 orbus well, I've been toying off and on with implementing atomic compare and swap with high level structures
00:47 orbus just as a learning exercise mostly
00:47 RabidGravy right, toodles people
00:48 orbus anyway, I have a hash right?
00:48 orbus that I need to share between threads
00:48 timotimo mhm
00:48 orbus so to control access to it
00:48 orbus I put it in a channel
00:48 orbus some worker grabs it
00:48 orbus operates on it
00:48 orbus then sticks it back in the channel for someone else to grab
00:48 timotimo mhm
00:48 orbus and I basically got that working
00:49 orbus but the program got slower and slower the longer it ran
00:49 timotimo i don't see why you don't just have a monitor from IO::Monitors control it
00:49 timotimo oh?
00:49 orbus mostly because if this ever pans out it would potentially go in core
00:49 orbus (although a vm level implementation is probably more correct)
00:49 orbus but yeah
00:50 orbus it was getting slower and slower and slower - I started doing deletes from the hash
00:50 timotimo i'm not sure why that'd be something to go into core. i don't see what the benefit is over using a simple Lock
00:50 orbus atomic compare and swap is in the spec
00:50 orbus and there's a function for it
00:50 orbus it's just not actually implemented
00:50 orbus there's a stub implementation now
00:50 orbus that doesn't actually do anything
00:50 timotimo ah
00:50 orbus I wanted to make it do something
00:51 orbus I had a working implementation with a lock
00:51 orbus but it was kind of a global lock
00:51 orbus and nine suggested I try to make it more granular
00:51 orbus which I agree with, but I've been wrestling with it off and on ever since
00:51 orbus I think I've maybe hit some concurrency bugs too
00:52 orbus some of the things I tried look like they should work but randomly fail
00:52 timotimo hmm
00:52 orbus so it's either my poor programming or there's unfound bugs
00:52 orbus maybe both
00:52 orbus anyway
00:52 orbus I'm just trying to figure out why it's getting slower
00:52 orbus when you delete from a hash, does it free any memory?
00:53 orbus or does the has reserve memory for more stuff to be put in?
00:53 orbus hash*
00:53 prammer joined #perl6
00:54 orbus oh
00:54 orbus also
00:54 orbus I'm populating the hash with promises
00:54 orbus :D
00:54 orbus potentially thousands of them
00:54 orbus that could also be the culprit I guess
00:54 Actualeyes joined #perl6
00:54 timotimo i don't very good at concurrency internals
00:55 orbus yeah, no worries
00:55 orbus I'm just curious mostly
00:55 timotimo like, do we create a mutex when we build a promise?
00:55 orbus don't know how it's implemented
00:55 timotimo why not look at it? :)
00:55 orbus I may
00:56 timotimo yeah, every Promise has a Lock in it
00:56 orbus most of my C knowledge flew out of my head years ago
00:56 orbus I could probably figure it out eventually
00:56 orbus a Promise basically feels like a one-time use lock
00:56 orbus so that's not terribly surprising
00:56 timotimo oh, i didn't mean to look into the moarvm C code
00:57 timotimo just into Promise.pm
00:57 timotimo really all it has is create a lock and lock and unlock it with nqp::lock and nqp::unlock
00:57 orbus yeah
00:57 orbus I think I did look in there
00:57 orbus most of the concurrency stuff ultimately falls back to the vm level
00:57 orbus from what I saw
00:57 timotimo of course
00:59 orbus anyway, I'm just messing around with it mostly
00:59 orbus and learning more about the concurrency features
00:59 orbus I was working on Supplies yesterday
00:59 orbus and learned quite a bit
01:00 timotimo supplies are cool, definitely
01:00 orbus probably need to talk to jnthn whenever he comes back - there's a couple questions I want to ask that he might be the best person to answer
01:00 timotimo interestingly, supplies are less about introducing concurrency, but about limiting concurrency
01:01 orbus well sure
01:01 orbus in a way that goes for all the concurrency primitives
01:01 orbus it's easy to do a bunch of stuff at the same time
01:01 orbus it's hard to make it work together and not stomp all over each other
01:01 timotimo :)
01:01 timotimo that's right
01:02 timotimo it's especially important with regards to our simple data structures, like arrays
01:02 timotimo resizing arrays concurrently makes things explode
01:02 timotimo i think the only thing that has a lock "in it" is IO stuff like file handles
01:03 orbus yeah, see that's what I kind of wanted to ask jnthn about - what operations are actually guaranteed to be atomic
01:03 orbus I *think* scalar assignment is, but maybe not if you're doing object creation in the assignment
01:04 orbus nobody seems to have done a real writeup on the topic that I can find
01:04 orbus just bits and pieces a few places
01:04 orbus I do know about the array growth thing
01:04 timotimo right, that could be very interesting
01:04 timotimo but i also don't know what our future plans are
01:04 timotimo like, i seem to recall that jnthn wanted to make some things more threadsafe
01:04 orbus would be nice to know
01:05 timotimo the thing about scalar assignment is that it depends on how the bytecode itself gets generated
01:05 orbus it gets very tricky to do some kinds of work if you don't have any guarantees on what's safe
01:06 orbus coordinator / worker type stuff should work well with what there is now
01:06 orbus but some other things get tricky
01:07 BenGoldberg joined #perl6
01:07 orbus like the compare and swap thing turned out to be a lot harder than I thought it would be - especially if I didn't want to just throw a big lock around it
01:07 orbus but even with the big lock I was hitting mysterious race conditions I didn't really understand
01:07 orbus and still don't
01:07 orbus it would *usually* work
01:08 timotimo huh.
01:08 orbus I thought it had to do with state variable initialization not being threadsafe
01:08 timotimo obviously, if things are locked, things shouldn't b0rk
01:08 orbus but now I think it's something more subtle
01:08 orbus because I've seen some other weird stuff
01:08 timotimo ah, could be, actually
01:08 orbus well
01:08 orbus I got rid of the state variable
01:08 timotimo i could very well imagine state variables could be race-y
01:09 orbus but it was still doing bad things
01:09 orbus like what was actually happening is
01:09 orbus I made the lock a global variable
01:09 orbus initialize it right at the top of the script
01:09 muraiki joined #perl6
01:09 orbus before any concurrent stuff starts
01:09 orbus but then when all the threads were running
01:09 orbus every once in a while
01:10 orbus it would crash and say I was trying to call protect on an uninitialized variable
01:10 orbus the Lock was originally a state varialbe
01:10 orbus but even when I made it global, it did the same thing
01:10 orbus usually worked, but occasionally blew up
01:11 orbus so I suspect there's some subtle internal race in there someplace
01:11 timotimo huh!
01:11 timotimo it'd be great if you could golf that
01:11 prammer joined #perl6
01:12 orbus like make it a one liner?
01:12 orbus it's not a lot of code to begin with
01:12 timotimo not a single line necessarily; just reduce the amount of different concepts involved
01:12 _Gustaf__ joined #perl6
01:13 orbus I have some examples - my hands are kind of tired now
01:13 orbus typing all day
01:13 [particle] joined #perl6
01:13 timotimo sure, don't overstress your hands, they are a vital part of your body :S
01:13 orbus especially for us computer guys
01:13 timotimo i'm quite glad i haven't had wrist pain in a few months, i think
01:13 orbus lucky - mine's been acting up
01:14 timotimo though my "mouse hand" is not quite happy for some reason; not in a way that "acts up", just not so cool in general
01:14 orbus messing with perl6 in the evening after typing all day at work is partly to blame
01:14 orbus :p
01:14 orbus I started alternating mouse hands between home and work years ago
01:14 orbus because of wrist pain
01:14 orbus helps some
01:15 timotimo ah
01:15 timotimo i have a stretching exercise i can do to make it better
01:15 timotimo it hurts like crazy while doing it, but the pain subsides extremely quickly
01:15 orbus I probably need one
01:16 muraiki I was having some bad hand pain. I ended up going to physical therapy and it turned out the problem actually was rooted in my neck and shoulders. strengthening those areas with light weight training made a huge difference
01:16 timotimo the one i do is i stand up in front of my desk, put the hand down flat on the table with the fingers pointing towards my belly and the thumb to the "outside" (as in: right hand's thumb points to the right, left hand's thumb would point to the left)
01:17 timotimo then i go through each finger and lift it up a bit
01:17 timotimo it works pretty much completely painless on my left hand, but it's hard to do on my right hand
01:17 orbus huh
01:17 orbus I'll have to give that a try
01:17 muraiki but whatever happens if you are having pain in your hands, address it sooner rather than later
01:17 timotimo interesting
01:17 orbus muraiki: I really need to go see a chiropractor or something - back's not so hot either
01:18 timotimo i need to see someone about my feet, too :\
01:18 muraiki I found that a standing desk also helped, but it wasn't enough. for me, at least, I needed to actually strengthen the muscles that were the root cause, not just stretch or stand
01:18 orbus there's a guy at work who has a standing desk
01:18 timotimo fair enough
01:18 orbus I don't think I could stand all day
01:19 muraiki well, standing all day is also bad for your body
01:19 muraiki the intent is to alternate between sitting and standing, and to move around a bit
01:19 timotimo standing gives me knee pain very quickly :(
01:19 orbus oh weird - monoprice put snacks in with my cable order
01:19 muraiki ultimately my point is that if you are having pain, you need to find someone who help you treat it properly as it's very much an individual case
01:19 timotimo potentially related to the foot thing
01:20 orbus yeah, I agree
01:20 orbus just... lazy
01:20 muraiki I already have one friend who basically cannot type or even play video games outside of work, if he wants to continue being a programmer
01:20 timotimo ;(
01:20 muraiki and he's only in his early 30s :(
01:20 timotimo that realyl sucks
01:22 orbus well, I'm going to go see if I can get this hdmi switch to play nice with ubuntu
01:22 orbus later all
01:23 timotimo i want a hdmi switch, too ...
01:23 timotimo good luck!
01:23 orbus first one I got was no good
01:23 orbus but this one is powered
01:23 orbus so I"m hoping for better results
01:23 orbus problem I'm having now is the linux desktop won't come back after switching - just found and xfce setting that may help
01:25 timotimo i mostly use the xrandr CLI tool, tbh
01:27 timotimo it has a few really cool switches. like when you're giving a talk somewhere and the projector has an aspect ratio that differs from your laptop and due to the built-in display not supporting the given resolution of the projector, you can't just "mirror displays", so i just use --scale-from and be happy
01:27 peter__ joined #perl6
01:27 orbus I used xrandr to get it back last time
01:27 orbus but I want the desktop to come back when I switch between inputs on the switch
01:27 orbus for whatever reason on this system
01:27 orbus if you unplug hdmi
01:27 orbus the desktop doesn't come back
01:27 orbus unless you ssh in and fiddle with xrandr
01:27 timotimo hum. it doesn't notice, eh?
01:28 orbus think so
01:28 timotimo oh, it won't even give you a virtual terminal on ctrl-alt-f*?
01:28 orbus I just found something where it may be an xfce problem
01:28 orbus nope
01:28 orbus display gets messed up somehow
01:28 timotimo that seems more like a video driver problem :(
01:28 orbus not sure
01:28 orbus found an article that's worth a try
01:29 orbus I have a tv with three unputs and I want to put the computer, playstation and maybe some other stuff on the switch
01:29 orbus but if I can't get the computer to play nice, I'll just have to reorganize
01:33 Juerd *** Error in `/home/juerd/.rakudobrew/moar-nom/install/bin/moar': free(): invalid size: 0x00007efde41d3bb0 ***
01:33 Juerd Is that cause for concern?
01:33 Juerd And what could I do to gather more information about the problem if I wanted to report the bug?
01:35 adu joined #perl6
01:37 prammer joined #perl6
01:38 timotimo Juerd: you can compile your moarv mwith --asan
01:39 Juerd rakudobrew build moar --asan?
01:39 prammer joined #perl6
01:41 timotimo nah
01:41 timotimo no clue how to make rakudobrew set that flag
01:41 timotimo i'd just cd into that folder and configure & compile it yourself
01:42 Juerd Where does the --asan go?
01:42 Juerd configure? make?
01:42 timotimo configure
01:43 Juerd Configure.pl doesn't like --asan
01:44 timotimo only moarvm's configure.pl
01:44 timotimo perhaps it has --moar-option=
01:44 Juerd How can I tell if it worked or was ignored?
01:44 timotimo things will become a lot slower
01:45 Juerd Should this be noticeable in 'Stage parse'?
01:45 timotimo yeah
01:45 timotimo asan isn't nearly as slow as valgrind, but it has an impact
01:45 timotimo like 3x perhaps?
01:46 Juerd I'm now using tools that I don't really understand, with an option that I've never before heard of.
01:46 Juerd Guessing the syntax...
01:46 Juerd Nope, didn't work.
01:46 timotimo you can lld the moar executable i expect
01:47 Juerd Sorry, I'm going to need more hand-holding I'm afraid
01:47 geekosaur ldd? (lld might produce surprises...)
01:47 timotimo er
01:48 Juerd I think I'll just go to bed. Maybe another time.
01:50 timotimo damn you, rakudobrew ;)
01:53 xpen joined #perl6
02:02 cognominal joined #perl6
02:04 kjk joined #perl6
02:09 mrons joined #perl6
02:09 dalek ecosystem: bea825e | (Pierre VIGIER)++ | META.list:
02:09 dalek ecosystem: Add Attrx::PrivateAccessor to ecosystem
02:09 dalek ecosystem:
02:09 dalek ecosystem: Automatic creation of private accessor for private attribute
02:09 dalek ecosystem: See: https://github.com/pierre-vigier/Perl6-AttrX-PrivateAccessor
02:09 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/bea825ec9c
02:09 dalek ecosystem: d646512 | (Zoffix Znet)++ | META.list:
02:09 dalek ecosystem: Merge pull request #122 from pierre-vigier/master
02:09 dalek ecosystem:
02:09 dalek ecosystem: Add Attrx::PrivateAccessor to ecosystem
02:09 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/d6465125af
02:12 prammer joined #perl6
02:13 peter__ joined #perl6
02:20 pierre-vigier joined #perl6
02:24 bitmap joined #perl6
02:28 adu joined #perl6
02:29 colomon joined #perl6
02:46 protium joined #perl6
02:48 ilbot3 joined #perl6
02:48 Topic for #perl6 is now »ö« Welcome to Perl 6! | https://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:,  or /msg camelia p6: ... | irclog: http://irc.perl6.org or http://colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
02:49 keix joined #perl6
02:50 noganex joined #perl6
02:51 zhi joined #perl6
02:52 Util_ joined #perl6
02:52 garu_ joined #perl6
02:52 b^_^d joined #perl6
02:52 mls_ joined #perl6
02:52 pjcj_ joined #perl6
02:52 mspo_ joined #perl6
02:52 jast joined #perl6
02:52 avar joined #perl6
02:52 literal joined #perl6
02:52 wtw joined #perl6
02:52 avar joined #perl6
02:52 wtw joined #perl6
02:53 krakan joined #perl6
02:53 daxim joined #perl6
02:53 Psyche^ joined #perl6
02:53 muraiki joined #perl6
02:53 larion joined #perl6
02:53 samb1 joined #perl6
02:53 cfloare joined #perl6
02:53 bowtie joined #perl6
02:55 molaf_ joined #perl6
02:55 sjohnson joined #perl6
02:55 MadcapJake joined #perl6
02:56 cosarara joined #perl6
02:56 dalek tablets: 73b3a7f | lichtkind++ | docs/tablet-3-variables.txt:
02:56 dalek tablets: added permutations to 3
02:56 dalek tablets: review: https://github.com/perl6/tablets/commit/73b3a7f7c6
02:56 dalek tablets: 023c70c | lichtkind++ | docs/appendix-b-grouped.txt:
02:56 dalek tablets: more links from B to G
02:56 dalek tablets: review: https://github.com/perl6/tablets/commit/023c70c9d1
02:56 dalek tablets: 950fa2c | lichtkind++ | docs/ (2 files):
02:56 dalek tablets: update list methods
02:56 dalek tablets: review: https://github.com/perl6/tablets/commit/950fa2c86f
02:59 krakan joined #perl6
03:00 _Vi joined #perl6
03:03 silug joined #perl6
03:07 colomon joined #perl6
03:23 pierre-vigier dalek, thanks for the pull request
03:23 pierre-vigier i'm trying to install Test::META
03:23 pierre-vigier however, it's failing with
03:23 pierre-vigier Could not find META6:ver<0.0.4..*>
03:23 pierre-vigier *resolve stage failed for META6:ver<0.0.4..*>: Project META6:ver<0.0.4..*> not found in the ecosystem)
03:24 pierre-vigier trying to install it through panda install Test::META
03:24 pierre-vigier ( i already have an old version so , META6:ver<0.0.2>:auth<github:jonathanstowe>:api<> already installed )
03:31 kid51 joined #perl6
03:32 timotimo is that syntax even supported?
03:32 * timotimo disappears into bed
03:37 pierre-vigier not sure, it's a complaint from panda
03:52 domino5 joined #perl6
03:55 noganex_ joined #perl6
03:56 kid51 joined #perl6
04:11 pierre-vigier joined #perl6
04:15 adu joined #perl6
04:16 yeahnoob joined #perl6
04:17 dalek ecosystem: f9b9c49 | (Zoffix Znet)++ | META.list:
04:17 dalek ecosystem: AttrX::PrivateAccessor's META.info renamed to META6.json
04:17 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/f9b9c4907e
04:36 _Vi joined #perl6
04:38 Actualeyes joined #perl6
04:40 pierre-vigier joined #perl6
04:53 rickbike joined #perl6
04:59 _Vi joined #perl6
05:11 pierre-vigier joined #perl6
05:28 peter__ joined #perl6
05:29 pierre-vigier Small question, how to Test a "BEGIN" time behavior, to check if it dies when needed?
05:29 pierre-vigier even in a dies-ok ,  it dies before arriving there
05:30 perigrin I'm not a perl6 person but I'm awake ... if I were me I'd try BEGIN dies-ok
05:30 pierre-vigier i'll try, i'm thinking to try eval-dies-ok
05:31 perigrin see if putting it in the phaser dwims.
05:31 pierre-vigier and evaluate the code in run time
05:31 llfourn pierre-vigier: that's the ticket :)
05:34 pierre-vigier inded, eval-dies-ok wokrs
05:34 pierre-vigier just needed to make sur to reimport my package in the evaluated string
05:34 pierre-vigier thanks
05:34 llfourn EVAL should inhert from the surrounding lexical scope
05:35 pierre-vigier in my case, not sure why, it does not
05:35 pierre-vigier my module export a trait
05:35 pierre-vigier and the trait is not visible inside the Eval string
05:36 llfourn that is very strange
05:36 pierre-vigier let me create a gist
05:36 pierre-vigier switching eval-dies-ok to eval-lives-ok, to see the actual dying message
05:37 llfourn m: sub trait_mod:<is>(Any, :$goof!) { "win".say }; use Test; eval-lives-ok 'class herp is goof { }';
05:37 camelia rakudo-moar 3259ba: OUTPUT«not ok 1 - ␤␤# Failed test at /tmp/0tR1_8Jjcn line 1␤# Error: 'Test::herp' cannot inherit from 'goof' because it is unknown.␤»
05:37 llfourn hmMMmm
05:38 llfourn m: sub trait_mod:<is>(Any, :$goof!) { "win".say }; use MONKEY-SEE-NO-EVAL; EVAL 'class herp is goof { }';
05:38 camelia rakudo-moar 3259ba: OUTPUT«5===SORRY!5=== Error while compiling /home/camelia/EVAL_0␤Type check failed in binding <anon>; expected Any but got herp␤at /home/camelia/EVAL_0:1␤»
05:38 llfourn m: sub trait_mod:<is>(Any:U, :$goof!) { "win".say }; use MONKEY-SEE-NO-EVAL; EVAL 'class herp is goof { }';
05:38 camelia rakudo-moar 3259ba: OUTPUT«5===SORRY!5=== Error while compiling /home/camelia/EVAL_0␤Type check failed in binding <anon>; expected Any but got herp␤at /home/camelia/EVAL_0:1␤»
05:38 llfourn confused :S
05:38 pierre-vigier https://gist.github.com/pierre-vigier/528d032218649a47266c
05:39 llfourn I can see that it doesn't work :)
05:39 pierre-vigier indeed, your example is similar
05:39 llfourn although it fails differently under vanila EVAL
05:40 llfourn well just thinking about it eval-lives-ok is gonna EVAL it in a different lexical scope
05:40 llfourn so doh my bad
05:41 pierre-vigier hum, might be, but i can test my module now, Thanks!
05:41 llfourn no worries :)
05:41 llfourn (though I don't think I did much lol)
05:42 pierre-vigier anyway to affect a value to a private attribute in custom constructor? self.bless does not handle private attribute
05:43 llfourn pierre-vigier: you can use BUILD or BUILDALL to set private attributes at construction time from args
05:43 vendethiel joined #perl6
05:43 pierre-vigier oh, indeed, i need to "study" a bit more that part
05:44 llfourn pierre-vigier: or if you are feeling adventurous: https://github.com/LLFourn/p6-AttrX-InitArg
05:44 pierre-vigier perl6 is wonderfull, but BIG
05:44 llfourn yes :)
05:44 pierre-vigier oh, actually, i was reading your module jsut before :D
05:44 llfourn ah cool
05:44 pierre-vigier was searching if there was a "simpler" way, haha
05:45 notbenh joined #perl6
05:45 llfourn I made the module because ppl keep complaining that the simple way is not simple enough!
05:45 pierre-vigier i reused the same namespace, hope you don't mind
05:45 llfourn Of course, that's great
05:45 pierre-vigier https://github.com/pierre-vigier/Perl6-AttrX-PrivateAccessor
05:46 llfourn ah did you see the PR to bring this feature into rakudo?
05:46 pierre-vigier did not find it
05:46 llfourn check out: https://github.com/rakudo/rakudo/pull/674
05:46 pierre-vigier i want to add a disclaimer that it's a "temporary module
05:47 llfourn I'm not sure the PR will ever be merged but autarch++ did the work to demonstrate how it could be done
05:47 llfourn I thought you saw that then did yours but I guess it's just a coincidence
05:47 autarch I did?
05:47 llfourn autark is not you?
05:48 llfourn (oohhh autark is not you...)
05:48 pierre-vigier nope, it's not me
05:49 keix joined #perl6
05:49 pierre-vigier misread
05:49 llfourn https://rt.perl.org/Public/Bug/Display.html?id=127172 now I see it's a different autark
05:50 pierre-vigier so, nope, i did not see the PR, i add a similar need, and wanted to play with traits
05:50 llfourn well there you go
05:53 mspo is moar threading/scheduler vulnerable to this go issue? https://github.com/golang/go/issues/1435
05:53 sortiz use Test; sub trait_mod:<is>(Mu, :$goof!) { "win".say }; lives-ok { class herp is goof { }};
05:53 llfourn pierre-vigier: btw you have added .precomp to your git repo https://github.com/pierre-vigier/Perl6-AttrX-PrivateAccessor/tree/master/lib
05:53 pierre-vigier oh, crap
05:53 sortiz m: use Test; sub trait_mod:<is>(Mu, :$goof!) { "win".say }; lives-ok { class herp is goof { }};
05:53 camelia rakudo-moar 3259ba: OUTPUT«win␤ok 1 - ␤»
05:53 pierre-vigier let me remove it, thansk
05:53 peter__ joined #perl6
05:54 llfourn sortiz: hmmm well done
05:54 llfourn it should have been Mu of course
05:55 pierre-vigier m: use Test; sub trait_mod:<is>(Mu, :$goof!) { "win".say }; eval-lives-ok q[ class herp is goof { }];
05:55 camelia rakudo-moar 3259ba: OUTPUT«not ok 1 - ␤␤# Failed test at /tmp/lNVxBcxZV_ line 1␤# Error: 'Test::herp' cannot inherit from 'goof' because it is unknown.␤»
05:56 pierre-vigier same problem
05:56 llfourn yep as you can eval-lives-ok is EVAL'd inside Test::
05:56 Cabanossi joined #perl6
05:56 llfourn not in the lexical scope in which it was called (of course) so you have to use it within the string.
05:57 sortiz m: use Test; eval-lives-ok q|sub trait_mod:<is>(Mu, :$goof!) { "win".say }; class herp is goof {};|
05:57 camelia rakudo-moar 3259ba: OUTPUT«win␤ok 1 - ␤»
05:58 sortiz llfourn, yes.
05:58 pierre-vigier any way to capture the error given by eval-dies-ok?
05:58 pierre-vigier to verify that the message is the one expected
05:58 llfourn pierre-vigier: I guess you want "eval-throws-ok" but I'm not sure it exists
05:59 llfourn you can just use normal EVAL and do a throws-ok inside it
05:59 andrewalker joined #perl6
05:59 pierre-vigier i did not find it in the doc, but yes, EVAL and throws-ok
05:59 pierre-vigier thanks again
06:00 llfourn no worries
06:03 sortiz m: use Test; say GLOBAL::Test::EXPORT::DEFAULT::.keys
06:03 camelia rakudo-moar 3259ba: OUTPUT«(&isnt &plan &pass &cmp-ok &flunk &does-ok &subtest &unlike &like &use-ok &todo &skip-rest &eval-dies-ok &is-deeply &throws-like &ok &is &diag &done-testing &is-approx &skip &dies-ok &lives-ok &eval-lives-ok &MONKEY-SEE-NO-EVAL &nok &is_approx &isa-ok &can…»
06:03 ParsonsNose joined #perl6
06:04 llfourn sortiz: do you need the GLOBAL?
06:04 sortiz Not really.
06:04 sortiz But safer ;)
06:05 llfourn I wonder why Test exports MONKEY-SEE-NO-EVAL
06:05 llfourn as a routine
06:06 sortiz I dunno, use the source llfourn.
06:08 sortiz m: need Test; say GLOBAL::Test::EXPORT::DEFAULT::.keys # Without import
06:08 camelia rakudo-moar 3259ba: OUTPUT«(&isnt &plan &pass &cmp-ok &flunk &does-ok &subtest &unlike &like &use-ok &todo &skip-rest &eval-dies-ok &is-deeply &throws-like &ok &is &diag &done-testing &is-approx &skip &dies-ok &lives-ok &eval-lives-ok &MONKEY-SEE-NO-EVAL &nok &is_approx &isa-ok &can…»
06:08 llfourn the source doesn't exmplain much
06:08 peter__ joined #perl6
06:09 llfourn I find it strange that that works tbh
06:10 sortiz llfourn, use is need + import
06:10 llfourn no I mean how you are able to see Test::EXPORT
06:10 llfourn EXPORT is meant to UNIT scoped
06:10 llfourn therefore invisible but apparently if you do is export within a 'module' you can see it
06:12 sortiz m: need Test; say Test::EXPORT.WHAT;
06:12 camelia rakudo-moar 3259ba: OUTPUT«(EXPORT)␤»
06:13 llfourn so apparently if it's done within a package it attaches it to the package as well or instead of the compunit
06:13 sortiz If I understand well EXPORT is UNIT scoped inside Test at compile time.
06:14 llfourn if it was UNIT scoped you could never see it via Test::
06:14 sortiz TO collect all is export.
06:14 llfourn if you were to re-write Test without unit module Test at the top
06:14 llfourn you couldn't do that
06:15 sortiz So you can't "use" it.
06:15 llfourn but because it's in a module it adds it to Test::EXPORT instead of UNIT::EXPORT if I understandd correctly
06:15 llfourn or maybe both?
06:18 llfourn conclusion it adds it to both
06:19 llfourn sortiz: thanks for showing me that!
06:20 sortiz m: module Foo { sub bar is export {}; };  say UNIT::Foo::.keys
06:20 camelia rakudo-moar 3259ba: OUTPUT«(EXPORT)␤»
06:21 sortiz In the same main UNIT
06:21 llfourn yeah and if you look at UNIT::EXPORT::DEFAULT bar will be there too
06:21 sortiz m: module Foo { sub bar is export {}; };  say UNIT::Foo::EXPORTS::.keys
06:21 camelia rakudo-moar 3259ba: OUTPUT«(Grepper)␤»
06:22 llfourn (no S)
06:22 sortiz m: module Foo { sub bar is export {}; };  say UNIT::Foo::EXPORT::.keys
06:22 camelia rakudo-moar 3259ba: OUTPUT«(DEFAULT ALL)␤»
06:22 llfourn m: module Foo { sub bar is export {}; }; say Foo::EXPORT::DEFAULT::.keys; say UNIT::EXPORT::DEFAULT::.keys;
06:22 camelia rakudo-moar 3259ba: OUTPUT«(&bar)␤(&bar)␤»
06:22 llfourn so it goes to both
06:23 sortiz m: module Foo { sub bar is export(:special) {}; };  say UNIT::Foo::EXPORT::.keys
06:23 camelia rakudo-moar 3259ba: OUTPUT«(special ALL)␤»
06:24 llfourn m: my module Foo { sub bar is export {}; }; say Foo::EXPORT::DEFAULT::.keys; say UNIT::EXPORT::DEFAULT::.keys;
06:24 camelia rakudo-moar 3259ba: OUTPUT«(&bar)␤(&bar)␤»
06:25 llfourn UNIT::EXPORT is what's used to decide what to import
06:25 llfourn but I guess Foo::EXPORT gets a copy so that you can do import Foo;
06:25 sortiz Yes, and is export accepts any adverbs.
06:26 llfourn yes it's quite an awesome system overall
06:26 sortiz o/ bed time, see you.
06:27 llfourn sortiz: gnight o/
06:28 dalek ecosystem: a6ba0b0 | LLFourn++ | META.list:
06:28 dalek ecosystem: Add OO::Schema
06:28 dalek ecosystem:
06:28 dalek ecosystem: https://github.com/LLFourn/p6-OO-Schema
06:28 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/a6ba0b0d24
06:53 pierre-vigier joined #perl6
07:12 FROGGS joined #perl6
07:13 dalek doc: ed2d1ce | (Wenzel P. P. Peppmeyer)++ | doc/Language/modules.pod:
07:13 dalek doc: merge redundant examples and add type capture
07:13 dalek doc: review: https://github.com/perl6/doc/commit/ed2d1ced8a
07:13 dalek doc: ebdd00a | (Wenzel P. P. Peppmeyer)++ | doc/Language/modules.pod:
07:13 dalek doc: Merge pull request #347 from gfldex/master
07:13 dalek doc:
07:13 dalek doc: merge redundant examples and add type capture
07:13 dalek doc: review: https://github.com/perl6/doc/commit/ebdd00a4f3
07:15 pierre-vigier joined #perl6
07:16 lokien_ joined #perl6
07:16 sjoshi joined #perl6
07:18 _Gustaf_ joined #perl6
07:20 domidumont joined #perl6
07:21 nine .tell pierre-vigier panda does not yet support versioned requires
07:21 yoleaux nine: I'll pass your message to pierre-vigier.
07:26 domidumont joined #perl6
07:34 lsm joined #perl6
07:35 [Tux] Oof, Inline::Perl5 + IO → Segmentation fault
07:35 firstdayonthejob joined #perl6
07:37 [Tux] moar[10776]: segfault at 7f4166e41c0f ip 00007f4166e41c0f sp 00007ffe230bf970 error 15
07:37 FROGGS [Tux]: can you rakudobug that?
07:38 [Tux] I might be able to do that
07:38 FROGGS or I::P5-bug it
07:38 [Tux] but I have to go to a third party today, so little on-line time
07:39 [Tux] csv-ip5xs            50000    18.076    12.351
07:39 [Tux] test                 50000    23.327    22.689
07:39 [Tux] test-t               50000    12.662    11.767
07:39 [Tux] csv-parser           50000    50.161     0.875
07:41 _nadim joined #perl6
07:43 hobbs would anyone like to review my Daily Programmer solution? https://www.reddit.com/r/dailyprogrammer/comments/40rs67/20160113_challenge_249_intermediate_hello_world/cyxp08d
07:43 hobbs (challenge is in the expando box at the top)
07:43 CIAvash joined #perl6
07:44 hobbs if there's anything I can do to make it thread without a lot of work, that would be nice
07:44 [Tux] FROGGS, seems to be a one-timer. I cannot reproduce :(
07:47 marmay left #perl6
07:48 sjoshi joined #perl6
07:48 FROGGS :/
07:50 marmay joined #perl6
07:51 kjs_ joined #perl6
07:51 jdrab joined #perl6
07:59 zakharyas joined #perl6
07:59 El_Che hi
08:00 marmay joined #perl6
08:08 darutoko joined #perl6
08:09 icelesstea left #perl6
08:22 c9874 joined #perl6
08:26 lnrdo joined #perl6
08:32 jdrab joined #perl6
08:32 _nadim Hi. And good morning all.
08:32 DrForr joined #perl6
08:35 marmay joined #perl6
08:37 rindolf joined #perl6
08:39 moritz \o
08:41 DrForr \m/
08:50 _Vi joined #perl6
08:50 moritz wisdom of the day: the MOP does not DWIM
08:51 moritz (re: RT#127263 which I'm minded to reject)
08:57 RabidGravy joined #perl6
08:58 FROGGS can't we make it accepts strings only?
09:08 dakkar_ joined #perl6
09:08 virtualsue joined #perl6
09:09 rhr_ joined #perl6
09:10 moritz not easily
09:11 moritz 'cause it's compiled before BOOTSTRAP.pm, so the Str type doesn't even exist yet
09:13 _nadim Why do warn and note output an extra newline?
09:15 moritz because it's convenient
09:16 _nadim except when the warnings go to a warnings log and you get extra newlines
09:17 moritz note that warnings are resumable exceptions, not just string output to STDERR
09:17 _nadim IMHO, it's better to let the user control the extra newline or extra whatnot. I noticed that but 'note' also outputs an extra NL.
09:18 _nadim $*ERR.print does the job for me but feels counterintuitive compared to warn 'somehting'
09:19 sno joined #perl6
09:19 moritz or your mechanism that logs the warnings and which stumbles upon newlines could strip them
09:21 ruoso joined #perl6
09:21 zacts joined #perl6
09:21 roguelazer joined #perl6
09:21 riatre joined #perl6
09:28 _nadim still counterintuitive IMO but I will get used. Another thing i notice is that $?FILE is a full path when callframe.file has no path.
09:30 moritz that does seem a bit inconsistent
09:31 _nadim just wrinkles to iron out ;)
09:36 RabidGravy is the only difference between "Foo.?bar" and "Foo.*bar" that the latter returns a list of results?  To me that would imply that it execute more than one candidate but I can't provole it to do so
09:37 moritz m: class Foo { multi method bar { 1 }; multi method bar { 2 } }; say Foo.*bar()
09:37 camelia rakudo-moar 3259ba: OUTPUT«Ambiguous call to 'bar'; these signatures all match:␤:(Foo $: *%_)␤:(Foo $: *%_)␤  in block <unit> at /tmp/GfPsRa76Qv line 1␤␤»
09:38 RabidGravy yeah this is what confused me
09:38 moritz m: class BaseFoo { method bar { 1 } }; class Foo is BaseFoo { method bar { 2 } }; say Foo.*bar()
09:38 camelia rakudo-moar 3259ba: OUTPUT«(2 1)␤»
09:38 moritz it doesn't work on the multi level, it seems, but rather on the proto/only level
09:38 RabidGravy ah! I hadn't tried that one
09:39 moritz I'd argue for removing .* from the core, because I haven't ever seen a use case for it, and it can be implemented in a module if it's needed eventually
09:39 ab6tract joined #perl6
09:39 moritz *and* it's surprising
09:41 RabidGravy I can see a use case for it, but it doesn't work with roles, so militates against the "composition over inheritance" dogma
09:41 pierre-vigier joined #perl6
09:44 pierre-vigier joined #perl6
09:47 nine A very strange feature, indeed.
09:47 * moritz looks if the ecosystem uses it
09:48 moritz moritz@hack:~/p6/perl6-all-modules$ git grep '\w\.\*\w+('|wc -l
09:48 moritz 0
09:49 nine I would have been surprised :)
09:49 moritz and still 0 if I remove the leading \w
09:49 nine Same result in the spec tests?
09:49 moritz nine: I'm sure it's tested
09:50 nine I think the regex is wrong
09:50 nine ack '\.\*\w+' in the spec tests gives lots of results where .* is part of a regex
09:50 nine I'm sure there must be some ecosystem module having that, too
09:51 moritz nine: hence the trailing (
09:51 moritz git grep -E  '\.\*\w+\(' is the proper invocation
09:51 moritz because with -E, it doesn't like \w
09:52 RabidGravy weird yellow light here today
09:53 moritz RabidGravy: it's the aliens
09:54 nine moritz: but ( is not mandatory for function calls :)
09:54 moritz nine: I know, it's a heuristic
09:58 pierre-vigier joined #perl6
10:07 g4 joined #perl6
10:07 g4 joined #perl6
10:11 lnrdo joined #perl6
10:14 Peter_R joined #perl6
10:15 pierre-vigier joined #perl6
10:17 [TuxCM] joined #perl6
10:22 marmay joined #perl6
10:23 pocket joined #perl6
10:26 Ulti 528 modules in the ecosystem, that's growing relatively fast
10:26 marmay left #perl6
10:27 marmay joined #perl6
10:27 marmay left #perl6
10:27 marmay joined #perl6
10:27 marmay left #perl6
10:28 virtualsue joined #perl6
10:37 espadrine joined #perl6
10:38 pocket joined #perl6
10:40 dalek doc: c482acb | RabidGravy++ | doc/Type/Promise.pod:
10:40 dalek doc: The behaviour of allof/anyof was changed pre-Christmas.
10:40 dalek doc: review: https://github.com/perl6/doc/commit/c482acbdd9
10:42 RabidGravy Ulti, if all the people who have contributed 1 module wrote another it would double :)  All good.
10:45 moritz RabidGravy: no
10:45 moritz there are several who contributed more than one module
10:46 Ulti RabidGravy not sure about that most authors have written multiple modules if we had more contributors that would be true
10:46 marmay joined #perl6
10:46 Ulti but thats what I mean I think thats what is about to happen so we could have a mini explosion that makes modules.perl6.org a little clunky to use without some changes
10:48 lnrdo joined #perl6
10:51 donaldh joined #perl6
10:52 marmay joined #perl6
10:55 AlexDaniel joined #perl6
10:55 sm0x joined #perl6
10:56 gfldex m: my @a = Buf[uint8].new('abc'.ords); my @b = Buf[uint].new('ghj'.ords); dd @a X @b;
10:56 camelia rakudo-moar 3259ba: OUTPUT«((Buf[uint8].new(97, 98, 99), Buf[uint].new(103, 104, 106)),).Seq␤»
10:57 gfldex should X know about Buf{uint8]?
10:58 bpmedley joined #perl6
10:59 jnthn gfldex: You'd have to .list them. Unless you otherwise need Bufs, maybe would be better with native arrays?
10:59 jnthn Buf is an item, like Str and Uni. A native array behaves like an array.
11:00 jojotus joined #perl6
11:01 gfldex jnthn: i will try that
11:02 leont joined #perl6
11:08 abraxxa joined #perl6
11:10 pmurias joined #perl6
11:10 pmurias how are things going on with the Perl 6 version of metacpan?
11:12 bpmedley joined #perl6
11:14 gfldex m: my uint8 @a = 'abc'.ords; my uint8 @b = 'ghj'.ords; dd @a, @b, @a +^ @b;
11:14 camelia rakudo-moar 3259ba: OUTPUT«array[uint8].new(97, 98, 99)␤array[uint8].new(103, 104, 106)␤0␤»
11:14 gfldex does that do @a.elems +^ @b.elems ?
11:14 jnthn I'd have expected so
11:14 jdrab joined #perl6
11:14 gfldex m: my uint8 @a = 'abc'.ords; my uint8 @b = 'ghj'.ords; dd @a, @b, @a +^ @b;
11:14 camelia rakudo-moar 3259ba: OUTPUT«array[uint8].new(97, 98, 99)␤array[uint8].new(103, 104, 106)␤0␤»
11:14 gfldex m: my uint8 @a = 'abc'.ords; my uint8 @b = 'ghj'.ords; dd @a, @b, @a Z+^ @b;
11:14 camelia rakudo-moar 3259ba: OUTPUT«(100, 107, 105).Seq␤»
11:15 jnthn You'd have to hyper it to distribute it
11:15 gfldex that works but returns Seq instead of array[uint8]
11:15 gfldex m: my uint8 @a = 'abc'.ords; my uint8 @b = 'ghj'.ords; dd @a, @b, @a >>+^<< @b;
11:15 camelia rakudo-moar 3259ba: OUTPUT«array[uint8].new(97, 98, 99)␤array[uint8].new(103, 104, 106)␤(6, 10, 9)␤»
11:16 gfldex m: my uint8 @a = 'abc'.ords; my uint8 @b = 'ghj'.ords; dd @a, @b, (@a >>+^<< @b).WHAT;
11:16 camelia rakudo-moar 3259ba: OUTPUT«array[uint8].new(97, 98, 99)␤array[uint8].new(103, 104, 106)␤Cannot look up attributes in a type object␤  in block <unit> at /tmp/a63BTVhhi5 line 1␤␤»
11:16 gfldex m: my uint8 @a = 'abc'.ords; my uint8 @b = 'ghj'.ords; dd @a, @b, (@a >>+^<< @b).^name;
11:16 camelia rakudo-moar 3259ba: OUTPUT«array[uint8].new(97, 98, 99)␤array[uint8].new(103, 104, 106)␤"List"␤»
11:16 jnthn Why would it return array[uint8]? Z is lazy. Hyperops otoh should retain structure...not sure they currently do.
11:16 jnthn (One thing we didn't manage to get in prior to 6.c...guess that's for 6.d now)
11:23 TheFox21 joined #perl6
11:26 RabidGravy regarding the ecosystem, right now there are 126 distinct authors for an average of 4.2 per author
11:29 RabidGravy (and the top 10 most prolific represent more than a third of those)
11:29 timotimo o/
11:34 _nadim joined #perl6
11:37 aqualung joined #perl6
11:42 pat_js joined #perl6
11:43 aqualung why do "~$_.say" and "say ~$_" behave differently in this context? http://pastebin.com/cGZ29Qfm
11:44 timotimo in ~$_.say you stringify the result of $_.say, whereas for say ~$_, you stringify $_ before saying it
11:44 timotimo try (~$_).say to see this better
11:45 _nadim can I alias a sub to another sub? I guess yes but how.
11:45 RabidGravy or $_.Str.say
11:45 RabidGravy _nadim, my &foo = &bar;
11:46 RabidGravy m:  sub foo() { say "I'm foo" }; my &bar = &foo; bar();
11:46 camelia rakudo-moar 3259ba: OUTPUT«I'm foo␤»
11:49 _nadim hmm, much nicer than mucking around with |c! Thanks
11:50 aqualung thanks, I guess I was hoping perl would just figure it out on its own with some magic
11:50 RabidGravy so much nicer than ye olde "no strict 'refs'; *{bar} = &foo" as well
11:50 timotimo do we have &foo.blahsame and &foo.nextblah and such?
11:51 timotimo aqualung: nah, prefixes are always looser than method calls
11:53 _nadim RabidGravy: yes nicer but *bar = &foo was sufficient
11:53 kid51 joined #perl6
11:53 leont Great
11:54 leont Tests fail because «expected: $("build",) got: $["build"]»…
11:54 timotimo m: say ($("build",)).WHAT; say ($["build"]).WHAT
11:54 camelia rakudo-moar 3259ba: OUTPUT«(List)␤(Array)␤»
11:54 abraxxa joined #perl6
11:54 timotimo ah, well ...
11:55 RabidGravy Actually it has to be 'perl -e 'sub foo { print "Im foo" }; no strict "refs"; *{"bar"} = \&foo; bar()''
11:56 aqualung Will installing the runtime take less time in the future? I know it warns you about taking long but it took 2 hours to install everything
11:56 leont Seems using binding instead of assignment solves my case, but it's still a bit annoying that it's that sensitive
11:56 RabidGravy which is why I guess there are 3 million Sub::* modules on CPAN
11:56 moritz aqualung: it is much faster when you have more RAM
11:56 pmurias what's koalatee?
11:57 RabidGravy "It's fine if you squint at it"
11:57 aqualung Got a reference as to how long it takes on something that is not a toaster like my machine?
11:57 moritz aqualung: five minutes maybe
11:58 aqualung when using rakudobrew?
11:58 RabidGravy It has the attributes of a good software but no guarantees are made whether it works
11:59 RabidGravy aqualung, is this on a rapberry pi by any chance?  that's about how long it takes there
11:59 pmurias RabidGravy: it's mentioned on the module ecosystem page but it's not described
11:59 aqualung it is not, just not a very powerful machine
12:00 moritz aqualung: or maybe ten
12:00 abraxxa i've installed v6.c yesterday on the macbook pro of my better half and I must say the experience was aweseom!
12:00 yoleaux 13 Jan 2016 17:38Z <jnthn> abraxxa: Sorry, had to disappear for a bit... Yes, time off was useful, thanks for asking. :)
12:00 moritz certainless less than half an hour, even on my PC from 2002 or so
12:01 timotimo aqualung: TWO HOURS?!?
12:01 aqualung i kid you not
12:01 RabidGravy pmurias, I think the criteria are approximately like, has a README, has a conforming META.info, has tests and has some POD
12:01 nine leont: is-deeply was carried over from Perl 5 without much thought to the differences with Perl 6. It's also hard, because sometimes you _do_ want it to be very strict and other times, you don't care if you get a () or a []
12:01 timotimo aqualung: last time i heard an installation time of that dimension was when somebody compiled rakudo on a raspberry pi
12:01 abraxxa git in Terminal told me that XCode has to be installed, a gui pop asked me if I want to do that, 2 minutes later it was installed and I could git clone rakudobrew and rakudobrew install!
12:01 timotimo maybe you were running out of RAM?
12:02 abraxxa jnthn: good to read! ;)
12:02 aqualung don't think I ever ran out even though it ran quite low when I checked from time to time
12:02 RabidGravy timotimo, yeah, but that's with no JIT and 512MB of ram
12:02 abraxxa and I wrote a small script to solve a brain-twister ;)
12:02 leont Also, is there any reason why when can't take an argument?
12:02 timotimo i don't think "no jit" makes such a big difference, tbh
12:02 abraxxa will post it in a gist on github
12:03 abraxxa hit a bug with hyper/race though when optimizing it
12:03 timotimo abraxxa: hyper/race and grep currently don't happy.
12:03 timotimo but i haven't actually looked closely at how much code we map into main memory when compiling the core setting
12:03 leont I currently want to do «when Callable -> &function {} when List -> @list {}», but that complains about «Too few positionals passed; expected 1 argument but got 0»
12:03 abraxxa timotimo: yes, duckduckgo reported the RT as third hit ;)
12:03 timotimo good duckie
12:04 abraxxa my rbp1 with 256mb ram needed 1gig of swapfile and using only 16mb for the gpu to being able to compile 2015.10
12:04 abraxxa would be bad to post rough numbers regarding compile mem consumption somewhere
12:04 timotimo would be .. bad?
12:05 xpen joined #perl6
12:05 abraxxa btw i'd prefer to find alle Perl 6 related infos on perl6.org and not have additional sites like getperl6.org that require additional SEO to get into the top hits on search engines
12:05 abraxxa meeting, later
12:06 aqualung I understand one no longer needs "using strict" and "using warnings "all" as they are on by default. Correct?
12:06 nine aqualung: yes
12:06 aqualung A very welcome change
12:06 nine One of the advantages of not having legacy code to deal with
12:07 pmurias joined #perl6
12:08 aqualung is HTTP::UserAgent the replacement of LWP::UserAgent?
12:08 nine yes
12:10 RabidGravy which reminds me, I was going to do something to it today
12:11 RabidGravy but can't remember what
12:11 aqualung What do seasoned p5 veterans think of p6 so far?
12:11 FROGGS aqualung: please report github issues for anything strange you encounter with HTTP::UserAgent
12:11 RabidGravy I love it :)
12:11 nine aqualung: for me it brought much fun back into programming :)
12:11 RabidGravy yeah, exactly
12:12 FROGGS aqualung: it is hard to say from the inside of the echo chamber
12:12 aqualung Yeah I figured as much
12:12 aqualung I was partial to it at first but after playing around with it it is really growing on me
12:13 FROGGS aqualung: some love it, some hate it, some just fear that that P5's opportunities get limited over time due to P6
12:13 FROGGS aqualung: what I think is more interesting is that Perl 6 attracts hackers from other languages
12:14 FROGGS aqualung: say python or js (node.js) or whatever
12:14 awwaiid aqualung: I love Perl 6 -- I think it is a great polyglot language; an amazing language adopting and inventing concepts from TONS of sources
12:14 timotimo i got pulled in from python
12:15 FROGGS so I think that Perl 6 not even has the chance to be cool, but even to stay for a long time
12:15 * FROGGS .oO( yeah, timotimo is a Slytherin )
12:16 aqualung I got into p5 because unlike many modern languages it gives you the freedom to do things the way you want
12:16 aqualung on top of that it is not as verbose as many others
12:16 timotimo i'm a montytongue
12:17 FROGGS aqualung: Perl 6 is also exactly that
12:18 kjs_ joined #perl6
12:19 aqualung FROGGS: Yeah, at first I was afraid they would take away some of the freedom I like about perl. But p6 retains that perl spirit
12:19 * awwaiid googles montytongue
12:20 sena_kun joined #perl6
12:21 DrForr These days I speak fluent parsertongue :)
12:21 dalek doc: 6f7116e | RabidGravy++ | doc/Language/concurrency.pod:
12:21 dalek doc: Altered behaviour of anyof/allof
12:21 dalek doc:
12:21 dalek doc: Add an additional example to getting the result of allof
12:21 dalek doc: review: https://github.com/perl6/doc/commit/6f7116e337
12:22 pierre-vigier joined #perl6
12:22 FROGGS DrForr: *g*
12:22 brrt joined #perl6
12:24 leont m: subset Filename of Any where { $_ ~~ Str|IO::Path }; sub file(Str(Filename) $file) { say $file }; file("foo")
12:24 camelia rakudo-moar 3259ba: OUTPUT«foo␤»
12:24 leont m: subset Filename of Any where * ~~ Str|IO::Path; sub file(Str(Filename) $file) { say $file }; file("foo")
12:24 camelia rakudo-moar 3259ba: OUTPUT«===SORRY!===␤Cannot invoke this object␤»
12:24 Skarsnik joined #perl6
12:24 leont That surprises me
12:24 leont m: subset Filename of Any where Str|IO::Path; sub file(Str(Filename) $file) { say $file }; file("foo")
12:24 camelia rakudo-moar 3259ba: OUTPUT«===SORRY!===␤Cannot invoke this object␤»
12:26 nine m: subset Filename of Any where Str|IO::Path; sub file(Filename $file) { say $file }; file("foo")
12:26 camelia rakudo-moar 3259ba: OUTPUT«foo␤»
12:26 nine leont: did you mean this? ^^
12:27 leont m: subset Filename of Any where Str|IO::Path; sub file(Filename $file) { say $file }; file("foo".IO)
12:27 camelia rakudo-moar 3259ba: OUTPUT«Constraint type check failed for parameter '$file'␤  in sub file at /tmp/oDBtYKzu66 line 1␤  in block <unit> at /tmp/oDBtYKzu66 line 1␤␤»
12:28 molaf joined #perl6
12:29 leont Not really, the coercion to Str was quite on purpose, though I could code around it
12:30 kaare_ joined #perl6
12:30 xpen_ joined #perl6
12:32 aqualung Alright I am gonna go and try to break HTTP::UserAgent, thanks for the help
12:34 Skarsnik Hello
12:42 RabidGravy erp
12:42 Skarsnik derp?
12:44 skids joined #perl6
12:45 pecastro joined #perl6
12:47 pocket joined #perl6
12:50 timotimo yarp
12:50 Actualeyes joined #perl6
12:53 gfldex hobbs: my version is 34% faster https://gist.github.com/gfldex/0e4b6577937311d38cf4/revisions
12:54 pierre-vigier joined #perl6
12:56 RabidGravy RARR!
12:58 timotimo why not 34x faster?
12:58 pierre-vigier joined #perl6
12:58 gfldex that's for when jnthn has made rakudo well fast
12:59 RabidGravy innit bruv
12:59 gfldex i will keep it, both the original and my version, to see how optimisations play out on both variants
12:59 timotimo OK
12:59 timotimo just a quick question
12:59 gfldex i hope my version will play nicer with the future optimiser
12:59 timotimo why do you use +^ and not + ?
13:00 gfldex i didn't start that bit madness!
13:00 timotimo i'd expect the latter to be a bit faster, still
13:00 timotimo and making $byte non-native-typed will give a nice speed boost with the way rakudo currently pessimizes native ints, too.
13:01 gfldex the whole thing is in response to https://www.reddit.com/r/dailyprogrammer/comments/40rs67/20160113_challenge_249_intermediate_hello_world/cyxp08d
13:02 gfldex so there is a propaganda aspect to it where i can nicely point into the future
13:02 timotimo oh, ok
13:02 gfldex i iz propagandacat! i haz a truuf!
13:02 timotimo so will you make my changes and see if it makes things faster at all?
13:02 timotimo what does a --profile look like?
13:02 marmay joined #perl6
13:03 marmay left #perl6
13:03 marmay joined #perl6
13:04 domm_ joined #perl6
13:08 brrt joined #perl6
13:11 pierre-vigier joined #perl6
13:12 El_Che what's the syntax to call methodnames as a variable: $obj.$methodname ?
13:12 El_Che (besides things like dispatch tables?)
13:13 leont $obj."$methodname"
13:13 leont $obj."$methodname"()
13:13 El_Che thanks (tried .$methodname .<<$methodname>> :) )
13:20 dalek doc: 6c6515e | (Fritz Zaucker)++ | doc/Language/modules.pod:
13:20 dalek doc: Suggest automated testing through Travis-CI
13:20 dalek doc: review: https://github.com/perl6/doc/commit/6c6515ed0f
13:20 dalek doc: 7286715 | (Zoffix Znet)++ | doc/Language/modules.pod:
13:20 dalek doc: Merge pull request #350 from zaucker/patch-2
13:20 dalek doc:
13:20 dalek doc: Suggest automated testing through Travis-CI
13:20 dalek doc: review: https://github.com/perl6/doc/commit/7286715d4d
13:32 dalek perl6-roast-data: 930a466 | coke++ | / (6 files):
13:32 dalek perl6-roast-data: today (automated commit)
13:32 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/930a466f54
13:34 dalek modules.perl6.org: 792fdd4 | (Fritz Zaucker)++ | templates/root/index.html.ep:
13:34 dalek modules.perl6.org: Link to the "official" Travis Perl6 instructions.
13:34 dalek modules.perl6.org:
13:34 dalek modules.perl6.org: See also my PR on https://github.com/perl6/doc/pull/350.
13:34 dalek modules.perl6.org: This PR makes http://modules.perl6.org and http://doc.perl6.org/language/modules consistent.
13:34 dalek modules.perl6.org: review: https://github.com/perl6/modules.perl6.org/commit/792fdd44ee
13:34 dalek modules.perl6.org: 90d1f32 | (Zoffix Znet)++ | templates/root/index.html.ep:
13:34 dalek modules.perl6.org: Merge pull request #54 from zaucker/patch-1
13:34 dalek modules.perl6.org:
13:34 dalek modules.perl6.org: Link to the "official" Travis Perl6 instructions.
13:34 dalek modules.perl6.org: review: https://github.com/perl6/modules.perl6.org/commit/90d1f32848
13:38 [Coke] me waves at [particle] whom he saw join the backscroll.
13:38 gfldex timotimo: --profile: https://gist.github.com/e6f32ca9851f1456376b
13:40 Skarsnik gah, I hate when the restauration of one of my vm crash x)
13:40 timotimo gfldex: ugh. look at routines tab with "exclusive time" sorted descending
13:41 timotimo the code is spending 29% of its time in "find_best_dispatchee"
13:43 gfldex timotimo: what's causing that?
13:44 Skarsnik someone has an idea how to have L<> in a table (in pod) that get correctly interpreted?
13:44 timotimo dunno, i'm looking for that in the call graph now
13:45 timotimo hm. HYPER seems to cause that at least in one instance
13:45 perlawhirl joined #perl6
13:45 perlawhirl hello
13:46 perlawhirl perlers
13:47 perlawhirl what is this code (from Terminal::Print) doing? : $raw ~~ s:nth(*)[\d+] = "%d";
13:47 timotimo i think it replaces the last instance of digits with "%d"
13:47 timotimo m: my $raw = "hi there 1 2 3 how are you 99 99 1024"; $raw ~~ s:nth(*)[\d+] = "%d"; say $raw
13:47 camelia rakudo-moar 3259ba: OUTPUT«hi there 1 2 3 how are you 99 99 %d␤»
13:48 perlawhirl what is s:nth ?
13:49 timotimo substitute + only the $n'th one
13:49 timotimo gfldex: could you try what happens when you replace all those »+foo« with Z+foo instead?
13:49 nine gfldex: the 8 calls to rand for one resuling byte seems excessive
13:49 timotimo nine: well, it's needed if the probability isn't 50%
13:50 nine no, it's not :)
13:50 gfldex nine: i agree but don't got a better idea
13:50 timotimo oh?
13:50 timotimo nine: at this point random-byte takes only 0.86% of the total time :)
13:50 _Vi joined #perl6
13:51 perlawhirl which page of docs can i find about substitution and nth
13:51 timotimo crossover is at 0.21%, hamming-distance is at 0.16%
13:51 timotimo http://doc.perl6.org/routine/subst - here's "nth"
13:51 nine Took me a while, but I think this could work: thinking in integers makes it easier. rand gives you essentially 32 random bits. Divide that into groups of 4 and shift them, so you get 8 nibbles. Check for each nibble if it is < $prob / 8. That's your random bits.
13:51 timotimo mutate is at 0.14% ...
13:54 [Tux] timotimo++; # Inline::Perl5 syntax simplification
13:54 Skarsnik Is that a bug that I can't put link (L<>) in a table in pod? It get litteral written like L&lt;Test::META|http://modules.perl6.org/dist/Test::META&amp;gt;
13:55 timotimo Skarsnik: yeah, that's a limitation of the current pod parser
13:55 gfldex Skarsnik: that's a bug
13:56 timotimo nine: i'm not sure i understand, though :)
13:56 Skarsnik damn, I wanted to add a list of modules tool and co in the documentation
13:56 Skarsnik does it work with list?
13:57 timotimo lists?
13:57 gfldex =item
13:57 timotimo yeah, that should work no-problem
13:58 gfldex SHODAN: that works, we got plenty of that already
13:58 timotimo SUPERNOVA
13:58 gfldex Skarsnik: ^^^^
13:58 SHODAN ok
13:58 gfldex sorry mate
13:58 SHODAN :)
13:58 SHODAN np
13:59 gfldex timotimo: i tries Z- and it's a lot slower
14:00 timotimo huh?
14:00 timotimo can you give the --profile of that, too?
14:00 timotimo and the code?
14:02 Skarsnik hm, should I replace .pm with .pm6 in the module doc?
14:02 Skarsnik I mean, what is the recommanded? personnaly I prefer .pm6 x)
14:03 Skarsnik nvm, the doc is quite clear on this x)
14:03 gfldex Skarsnik: .pm6 is less confusing on windows
14:04 Skarsnik Source files generally use the standard C<.pm> extension, and scripts or
14:04 Skarsnik executables use C<.pl>.  However, if you wish to highlight that the file is
14:04 Skarsnik written in Perl 6 you can use the C<.pm6> extension for modules, and the
14:04 Skarsnik C<.p6> extension for scripts.
14:04 Skarsnik erf
14:04 gfldex timotimo: it's still running
14:04 nemo m: say 2⁶;
14:04 camelia rakudo-moar 3259ba: OUTPUT«64␤»
14:04 nemo huh...
14:04 nemo why does that not work on my local install
14:04 nemo m: say 2¹⁰
14:04 camelia rakudo-moar 3259ba: OUTPUT«1024␤»
14:05 Skarsnik how old is your rakudo?
14:05 PerlJam nemo: how old is your local install?
14:05 nemo PerlJam: whatever the heck Ubuntu 14.04 LTS is packaging. Bah. I bet there's something in backports. God I hate ubuntu's backports mechanism
14:05 * nemo checks
14:05 nemo screws us w/ hedgewars every release
14:05 Skarsnik probably 2015.11?
14:06 PerlJam nemo: that's *got* to be too old.  :)
14:06 nemo aw. no backports
14:06 gfldex it helps alot to add --profile when you need a profile :-/
14:06 nemo PerlJam: rakudo 2013.12-1
14:06 nemo O_o
14:06 PerlJam nemo: way way waaay old
14:07 PerlJam nemo: I normally use rakudobrew to get my perl6
14:11 ramillies joined #perl6
14:12 skids joined #perl6
14:13 Ulti §/win 2
14:13 Ulti -___-
14:13 ramillies left #perl6
14:16 gfldex timotimo: https://gist.github.com/bbf09982f08dc677a674
14:18 kjs_ joined #perl6
14:21 RabidGravy what larks
14:24 perlawhirl left #perl6
14:25 kjs_ joined #perl6
14:25 cdg joined #perl6
14:32 [Coke] we should add a timebomb; if your rakudo is more than a year old, warn when running. If it's more than 2 years old, error out. :|
14:33 [Coke] (no I'm not serious, you monsters.)
14:35 hahainternet i think i agree with the warning
14:35 hahainternet in fact i'd probably configure that to a week for me
14:35 hahainternet because i don't reliably rebuild rakudo, but any time i come across a problem i find annoying in any other language i try and drop to perl6 and give it a go
14:35 Skarsnik could have been a good idea before 6.c release x)
14:39 nemo maybe I'm failing at searching, but I can't find any backport request for updating rakudo in LTS. weird
14:39 nemo esp strange since you guys just did a release
14:40 pmurias [Coke]: maybe we should try the autoupdating "evergreen" model the browser are doing ;)
14:41 [Tux] I merged the suggested changes and now Travis fails :( https://travis-ci.org/Tux/CSV/jobs/102357841
14:42 Skarsnik nemo, they probably wait for the next release (like they should do)
14:45 pierre-vigier joined #perl6
14:46 sftf joined #perl6
14:50 cognominal joined #perl6
14:50 RabidGravy yeah, haven't seen a rakudo for fedora recently
14:50 RabidGravy "This is perl6 version 2015.11 built on MoarVM version 2015.11"
14:52 leont I'm seeing «Failed to stat file: no such file or directory» in spurt (the directory is existent), I'm confused
14:53 leont I'm only seeing it when the first argument is an IO::Path, and probably only when the file has been spurted before…
14:53 Skarsnik hm make html on the doc fail for me :(
14:54 Skarsnik Writing html/js/search.js ...
14:54 Skarsnik Failed to open file /home/skarsnik/devel/doc/html/js/search.js: no such file or directory
14:55 gfldex Skarsnik: is that a local build after you changed stuff?
14:55 Skarsnik yes
14:56 Skarsnik I updated the repository before that too
14:57 gfldex Skarsnik: you could try https://github.com/gfldex/pod-to-bigpage and see how far it gets
14:58 Skarsnik gah running make html regenerate everything x)
14:59 RabidGravy I might add an "await-ok" to something as I'm getting bored of typing "ok do { await $foo }, 'blah';"
14:59 pierre-vigier joined #perl6
14:59 Skarsnik sound like a good thing to add to Test
15:00 * leont still thinks Test is growing too organically
15:00 RabidGravy or a Test::Async in the ecosystem
15:00 sno joined #perl6
15:03 RabidGravy actually the latter is probably the best because there are quite a lot of patterns emerging in what I'm testing right now
15:04 prammer joined #perl6
15:04 leont Yeah, modular solutions are good
15:04 Skarsnik Yes, but there is a balance between having script that look like; use Test; use Test::MoreStuff; use Test::ForOneThing; use Test::YANT; and use Test
15:05 leont Given a fat interface, you can be sure half of those functions won't age well
15:05 RabidGravy That doesn't worry me too much
15:05 pjscott joined #perl6
15:05 leont Being able to replace them with something better by using a different module 5 years from now is a feature
15:05 RabidGravy i.e. using lots of specific modules
15:05 RabidGravy yeah
15:06 FROGGS joined #perl6
15:06 Skarsnik The issue is when there is too much module, a new user have no idea where to get something he want
15:07 RabidGravy good search, good documentation
15:07 RabidGravy use of tags in META files
15:07 Skarsnik tags that are not 'specified'?
15:08 RabidGravy and if you want you can make a Test::Everything
15:08 RabidGravy tags are specified in S22
15:08 Skarsnik I mean the list of tags
15:09 RabidGravy why should they be specified, people are supposed to be intelligent and if they want people to find the module they should use sensible tags
15:09 leont RabidGravy: that ends with Test::Most, half of the stuff that is uses isn't recommended anymore, and at least one function is a notorious incompatibility
15:09 RabidGravy "folksonomy"
15:10 timotimo you know the tagging system python employs?
15:10 RabidGravy leont, as I said, I don't mind using loads of modules
15:11 RabidGravy timotimo, probably as shit as the npm one right?
15:11 leont META.json has keywords too, no one uses them though
15:12 ramillies joined #perl6
15:13 RabidGravy I think it's just "tags" : http://design.perl6.org/S22.html#tags
15:13 timotimo RabidGravy: i have no idea.
15:13 RabidGravy if it ain't documented it don't exist
15:13 timotimo https://pypi.python.org/pypi?%3Aaction=list_classifiers - this thing
15:15 RabidGravy that's more of a classification system or full-on taxonomy though,  must have been bike-shedded to pieces
15:15 RabidGravy so python, I don't think that kind of thing would fly around here
15:16 mspo they look like oids
15:16 RabidGravy though it would allow people to give vent to their authoritarian streak and everyone else could ignore it
15:17 RabidGravy there is a sot of classification on CPAN but it's not really kept up to date as searching has approved
15:17 RabidGravy improved
15:18 timotimo at least these classifiers are used throughout the pypi
15:18 RabidGravy sure
15:18 _nadim how can one capture output to $*ERR to check it in a test?
15:19 RabidGravy replace $*ERR with some handle like object that captures, I believe there are some in the ecosystem
15:20 timotimo yeah, IO::Capture::Simple and IO::MiddleMan
15:20 _nadim thanks
15:21 khw joined #perl6
15:23 nemo Skarsnik: well, without a bug filed requesting it to be added to backports, will never know
15:24 nemo Skarsnik: typically some maintainer would file one of those and they would evaluate it - it isn't automatically added to LTS after all
15:24 nemo you have to manually upgrade
15:24 nemo aaand have opted into backports too
15:24 nemo but I can't even find a request
15:27 ZoffixW joined #perl6
15:27 ZoffixW There's actually Test::Output http://modules.perl6.org/repo/Test::Output
15:28 ZoffixW Oh, nm, for now
15:28 ZoffixW Just use IO::MiddleMan :) I had issues with capturing output of Test.pm with Test::Output, which is why I wrote IO::MiddleMan, but I see I haven't yet had a chance to update Test::Output to use it. It may be broken atm :P
15:29 sena_kun joined #perl6
15:29 ZoffixW There's Test::IO::Capture inside IO::Capture::Simple https://github.com/sergot/IO-Capture-Simple/blob/master/lib/Test/IO/Capture.pm
15:33 sena_kun How much situation with error handling changed since https://perl6advent.wordpress.com/2011/12/15/day-15-something-exceptional/ ?
15:34 Actualeyes joined #perl6
15:35 ZoffixW There probably have been changes and new exception types and messages. Why?
15:36 El_Che I had the same use case for STDERR. I ended changing the method adding a boolean to the signature with a default. Signatures in perl 6 == love
15:36 nine m: sub rand-byte($prob) {my $thresh = $prob * 16; my int32 $rand = (2**32).rand.Int; my $byte = [+|] (^8).map({(($rand +> ($_ * 4)) +& 0x0f < $thresh) +< $_}); }; say rand-byte(0.2);
15:36 camelia rakudo-moar 3259ba: OUTPUT«72␤»
15:36 nine timotimo: ^^^^
15:36 nine gfldex: ^^^
15:37 nine Of course this is bound to be dog slow. It's just a demonstration of the idea :)
15:38 lichtkind joined #perl6
15:38 ZoffixW m: m: sub rand-byte($prob) {my $thresh = $prob * 16; my int32 $rand = (2**32).rand.Int; my $byte = [+|] (^8).map({(($rand +> ($_ * 4)) +& 0x0f < $thresh) +< $_}); }; say rand-byte(0.2) for ^4 .hyper: :1batch
15:38 camelia rakudo-moar 3259ba: OUTPUT«64␤48␤»
15:38 ZoffixW m: m: sub rand-byte($prob) {my $thresh = $prob * 16; my int32 $rand = (2**32).rand.Int; my $byte = [+|] (^8).map({(($rand +> ($_ * 4)) +& 0x0f < $thresh) +< $_}); }; say rand-byte(0.2) for ^4 .hyper: :1batch
15:38 camelia rakudo-moar 3259ba: OUTPUT«0␤114␤10␤74␤»
15:38 ZoffixW Weird, eh?
15:39 ZoffixW (varying number of results)
15:39 mspo I wrote a replacement for the call out to |fmt in p6doc using a grammar: https://gist.github.com/msporleder/29644fce49e662aa7ae4
15:40 mspo aside from using "say" in the action instead of a method to return the result, can anyone tell me all the stuff I did wrong?
15:41 stmuk_ hmm it probably shouldn't even call out to |fmt .. there was a regexp to do that anyway
15:43 mspo I was thinking a smart regex could do the whole job in one line :)
15:43 stmuk_ Pod::To::Text twrap probably does this already
15:43 FROGGS mspo: you can just do "make ~$/" instead of calling it as a method
15:43 mspo but couldn't get it just right
15:44 stmuk_ assuming you are just trying to restrict the number of columns of p6doc at the command line?
15:44 mspo FROGGS: make/made was very confusing for me; I still don't get it
15:44 mspo stmuk_: that's what p6doc does, yes
15:44 mspo stmuk_: I was trying to emulate some fmt(1) behavior like retaining leading whitspace and blank lines
15:44 stmuk_ mspo: so you want to add a third way of doing the same thing to the two already existing? :)
15:45 mspo stmuk_: I want to suggest removing the call to |fmt in p6doc and I wanted to write a replacement as an exercise
15:45 FROGGS mspo: "make foo" assigns foo to $/.made, so that you got your hands on $<submatch>.made from the outer action method
15:45 stmuk_ actually your way is probably better .. I think Larry was complaining about the formatting behaviour a couple of days back
15:45 stmuk_ I don't understand why |fmt was added
15:45 mspo indeed
15:46 stmuk_ maybe remove |fmt and extend the  Pod::To::Text twrap (which is in Rakudo core unfortunately not p6doc)
15:46 mspo FROGGS: I will read that until I grok it ;)
15:46 dalek tablets: 8552c5c | (Herbert Breunung)++ | docs/appendix-b-grouped.txt:
15:46 dalek tablets: more links from B o A and G
15:46 dalek tablets: review: https://github.com/perl6/tablets/commit/8552c5cada
15:47 FROGGS mspo: :o)
15:47 stmuk_ the formating should be more aware of the pod structure I'm sure
15:48 PerlJam mspo: make puts things in your .ast or .made and that's how you communicate information "up" the parse.   (Does that help any?)
15:49 stmuk_ mspo: see aldo http://irclog.perlgeek.de/perl6/2016-01-12#i_11871389
15:49 PerlJam mspo: I know I didn't say anything substantially different from FROGGS but sometimes different words provide different perspective  :)
15:49 stmuk_ ^ also
15:51 lnrdo joined #perl6
15:52 mspo stmuk_: ideally the pod would be parsed into some kind of DOM-ish or parse-tree-ish thing, I would think
15:52 mspo stmuk_: and each section could be fed through the correct formatting
15:52 mspo alos the "80" is arbitrary
15:52 _Vi joined #perl6
15:53 stmuk_ mspo: yes that would be excellent
15:53 mspo moar --doc is the real command
15:56 mspo oh wait, maybe not
16:02 leont Can I put a BagHash in a %!attribute?
16:03 leont Or a Set for that matter?
16:05 RabidGravy m: class Foo { has %.foo is BagHash; };  say Foo.new.foo.WHAT; # yes
16:05 camelia rakudo-moar 3259ba: OUTPUT«(BagHash)␤»
16:05 pmurias leont: re Test::Most, having a Test::Bloat for those who don't want to import each module seems at least a better solution than cramming stuff into Test
16:05 leont True
16:08 jme` joined #perl6
16:09 RabidGravy leont, in general "is" on an atribute (or variable) sets the container type
16:09 muraiki joined #perl6
16:09 muraiki can someone please help me understand what I'm doing wrong in this tiny grammar? https://gist.github.com/muraiki/e856a437ab8d60f055ff
16:10 garu_ everyone++ # super excited to learn perl 6 \o/
16:10 timotimo token doesn't have backtracking
16:11 timotimo so the .+ will eat until the end of string and not find a >, then abort
16:11 muraiki timotimo: d'oh
16:11 timotimo it should be enough to just use "regex" instead of "token"
16:11 timotimo :)
16:11 muraiki yay! thanks so much
16:11 muraiki man, I even remember reading that in the docs
16:11 muraiki it just didn't click
16:11 PerlJam or just use a non-greedy quantifier
16:12 leont RabidGravy: thanks, that seems to work
16:12 RabidGravy :)
16:15 ramillies joined #perl6
16:15 c9874 left #perl6
16:16 _nadim Hmmm! Does the test framework squirel away symboles in some way? something that works outside the test framework  get me the error "variable $author is not declared. It is, the line above the function call.
16:16 pmurias jnthn: t/moar/02-multidim.t is great, having to just implement instead of rever engineer those all those ops is awesome
16:17 PerlJam _nadim: show the code :)
16:17 wollmers joined #perl6
16:18 jnthn pmurias: :)
16:18 dalek doc: 86f452a | (Sylvain Colinet)++ | doc/Language/modules (2 files):
16:18 dalek doc: Add a page with a list of modules/tool related to module developpement
16:18 dalek doc: review: https://github.com/perl6/doc/commit/86f452aa0d
16:18 timotimo _nadim: potentially giving the test function a string to eval?
16:18 dalek doc: 4e08a04 | (David Brunton)++ | doc/Language/operators.pod:
16:18 dalek doc: Grammar-o on its
16:18 dalek doc:
16:18 dalek doc: Possessive form of it.
16:18 dalek doc: review: https://github.com/perl6/doc/commit/4e08a04d53
16:18 dalek doc: 009c4f4 | (Steve Mynott)++ | doc/Language/operators.pod:
16:18 dalek doc: Merge pull request #351 from dbrunton/patch-1
16:18 dalek doc:
16:18 dalek doc: Grammar-o on its
16:18 dalek doc: review: https://github.com/perl6/doc/commit/009c4f458c
16:19 timotimo and then it gets eval'd inside the test package?
16:19 _nadim timotimo: yes, it goe to an EVAL
16:20 timotimo right. then it won't see the symbols in your local scope
16:20 timotimo unless it takes special care to evaluate in the caller's scope
16:20 timotimo which it might do
16:21 _nadim removing those tests make the tests a bit moot.
16:21 _nadim how do I force the callers scope on?
16:21 wollmers I finished the port of the fastest P5 diff/LCS implementation to P6 LCS::BV.
16:22 _nadim PerlJam: code is not so interesting ;)
16:23 wollmers It's on Panda. 2-4 times faster than P6 Algorithm::Diff
16:23 nine wollmers: could this be a complete replacement for Algorithm::Diff?
16:23 jnthn _nadim: The typical trick is to pass a closure that does the EVAL
16:25 wollmers LCS::BV benchmark 500-1000 cases per second, P5 50000-60000 on core i5 (MacAir)
16:26 wollmers nine: not completely. It implements only the core loop. Takes two ArrayRefs, returns an array of indices.
16:27 nine wollmers: so could it be done as a patch to Algorithm::Diff? My point being, that as a user, I'd be looking for "diff" and would never find something called "LCS::BV"
16:27 wollmers nine: like Algorthm::Diff::LCSindx(), but returns n x 2 array, not 2 x n array.
16:30 _Vi joined #perl6
16:30 _nadim jnthn: that would mean changing the code that I have to test. tests changing code is a bit "bleahh". In this case it is just a normal string interpolation in t.he EVAL, maybe I should just turn a blind eye as it is part of P6
16:30 wollmers nine: Algorithm::Diff allows custom comparison function, and custom hash. Also has convenience formatting around.
16:32 wollmers nine: that's the reason I did an extra module. The API of A::Diff is one of the reasons for slowness.
16:35 ramillies Hello. I've recently encountered a weird behavior of some string comparisons and could use some explanation of it:
16:35 ramillies p6: say ("a" xx 1000).map(+("a" le *)).index(0)
16:35 camelia rakudo-moar 3259ba: OUTPUT«414␤»
16:35 wollmers Next I will try nativecall in P6 for LCS::BV. Should allow estimated speed of 5 mio cases/sec in the pure C part. Will see, how much the interface P6/C slows it down.
16:36 ramillies To me, this appears like 'a' le 'a' is true the first 414 times I ask, and then it turns to false. Is there some rational explanation, or is it a bug?
16:37 wollmers Sorry, should read 0.5 mio cases.
16:38 sena_kun joined #perl6
16:40 dalek doc: a5955cc | (Steve Mynott)++ | doc/Type/Str.pod:
16:40 dalek doc: add newline after Usage:
16:40 dalek doc: review: https://github.com/perl6/doc/commit/a5955cc2f9
16:43 nine ramillies: that's...very odd
16:43 jnthn Surely a bug, probably in dynamic optimization given it kicks in after a lot of iterations.
16:43 ramillies Good that I'm not the only one who doesn't like it.
16:44 nine JIT bug
16:44 ramillies By the way, it doesn't happen for any other characters, just for the "boundary edge".
16:44 ramillies "boundary case", I meant.
16:44 nine MVM_JIT_DISABLE=1 fixes it
16:44 ramillies True. Thank you.
16:45 mspo ramillies: what is * doing in that case?
16:45 nine ramillies: please rakudobug it
16:45 lokien_ joined #perl6
16:45 ramillies * is the parameter for map.
16:46 ramillies +("a" le *) is a lambda which gives 1 if the incoming string is ge "a", 0 if not.
16:47 ramillies nine: Lemme find out how, I still need to find my way around here.
16:47 wollmers p6: sue v6;
16:47 camelia rakudo-moar 3259ba: OUTPUT«5===SORRY!5=== Error while compiling /tmp/tmpfile␤Undeclared routine:␤    sue used at line 1. Did you mean 'sum'?␤␤»
16:47 prammer joined #perl6
16:48 mspo but the incoming string is always 'a'?
16:48 ramillies Yes.
16:48 wollmers p6: <a b c>.eSt;
16:48 camelia rakudo-moar 3259ba: OUTPUT«Method 'eSt' not found for invocant of class 'List'␤  in block <unit> at /tmp/tmpfile line 1␤␤»
16:48 mspo ramillies: shouldn't you be using $_ ?
16:48 ramillies The point is that when I compare 1000 'a's with an 'a', it's True the first 414 times and then False.
16:49 ramillies That would do the exactly same thing, I think.
16:49 * ramillies goes to file it as a bug
16:49 donaldh I think the perl6 idiom is to use the whatever *
16:49 yoleaux 12 Jan 2016 07:47Z <nine> donaldh: I know it-s perl6-debug-m. There's also perl6-debug-j, so I just replace "perl6-debug" in $*EXECUTABLE by "perl6"
16:49 yoleaux 12 Jan 2016 07:48Z <nine> donaldh: do you have any other precomp issues?
16:49 wollmers p6: amp { } <a b c>;
16:49 camelia rakudo-moar 3259ba: OUTPUT«5===SORRY!5=== Error while compiling /tmp/tmpfile␤Missing required term after infix␤at /tmp/tmpfile:1␤------> 3amp { } <a b c>7⏏5;␤    expecting any of:␤        prefix␤        term␤»
16:50 wollmers p6: asy 'a';
16:50 camelia rakudo-moar 3259ba: OUTPUT«5===SORRY!5=== Error while compiling /tmp/tmpfile␤Undeclared routine:␤    asy used at line 1. Did you mean 'say', 'any'?␤␤»
16:51 sena_kun Is self.attr much slower than $!attr?
16:51 jnthn sena_kun: At the moment, yes. In a few months time, with further optimization work that's on the way, no.
16:52 wollmers Where can I find the code of the logic 'sue ...' -> Did you mean 'sum'? This can be improved.
16:54 sena_kun jnthn, hmm, thank you. I don't like that $!some notation much, it looks a bit like bool negation. Then I'll use $!some anyway.
16:54 Hotkeys nah bool negation would be !$some :p
16:54 Hotkeys (or !$!some if you're daring)
16:55 sena_kun Hotkeys, I know it, but it's tricky and easy to do typo.
16:55 jnthn It is, though it's likely to be caught at compile time
16:55 jnthn m: class A { has $!a; method m() { say !$a } }
16:55 camelia rakudo-moar 3259ba: OUTPUT«5===SORRY!5=== Error while compiling /tmp/YQhuAXv3L_␤Variable '$a' is not declared. Did you mean '$!a'?␤at /tmp/YQhuAXv3L_:1␤------> 3class A { has $!a; method m() { say !7⏏5$a } }␤»
16:55 bioexpress joined #perl6
16:55 dwarring joined #perl6
16:56 Hotkeys I like the $! and $. notations
16:56 hobbs gfldex: thanks for going over my code :)
16:56 jnthn But yeah, if you're scanning code quickly it may take a little getting used to
16:56 sena_kun jnthn, it makes sense then.
16:56 bioexpress Hello, I've found this in the bugreport #127064:
16:56 bioexpress "And if $s happened to contain anything other than literals, so I had to us my @matching = @lines.grep(/ <$s> /);"
16:56 Hotkeys but the first time I saw $.method in code I read it like "Oh $ is sugar for self"
16:57 bioexpress Is this a bug (that I have to use the "<>" in this cases) or is the bug only the slower speed?
16:57 dalek tablets: 972f4f1 | (Herbert Breunung)++ | docs/ (2 files):
16:57 dalek tablets: added .combinations
16:57 dalek tablets: review: https://github.com/perl6/tablets/commit/972f4f1bcd
16:58 mspo fwiw my perl6 does not produce 414
16:58 mspo it says 0
16:58 sena_kun Also, is there any manual about passing arguments by values/by references in functions?
16:59 ramillies mspo: That's even weirder, it should say Nil.
16:59 ramillies Didn't you write lt instead of le?
16:59 dalek nqp: 51d350b | (Pawel Murias)++ | src/vm/js/ (2 files):
16:59 dalek nqp: [js] Start working on multidimensional ops.
16:59 dalek nqp:
16:59 dalek nqp: Make them work on 1 dimensional arrays.
16:59 dalek nqp: review: https://github.com/perl6/nqp/commit/51d350b93f
16:59 dalek nqp: aa0cd13 | (Pawel Murias)++ | src/vm/js/ (6 files):
16:59 dalek nqp: [js] Partial implementation of multi-dim arrays.
16:59 dalek nqp:
16:59 dalek nqp: Support throwing errors from internals by throw new NQPException("...") instead of always using a ctx.
16:59 dalek nqp: review: https://github.com/perl6/nqp/commit/aa0cd139e2
16:59 mspo ramillies: doesn't the (+( turn it into a number?
17:00 sena_kun By "manual" I meant "In case1 by value, in case2 by reference, etc" thing.
17:00 ramillies mspo: It does.
17:00 mspo > say ("a" xx 1000).map(+("a" le *)).index(0)
17:00 mspo 0
17:00 [Coke] mspo: what version of rakudo do you have?
17:00 psy_ joined #perl6
17:00 [Coke] Note: anyone who has a version < 2015.12, yes, your stuff is going to be different. Please upgrade to Christmas.
17:01 Hotkeys m: say ("a" xx 1000).map(+("a" le *)).index(0)
17:01 camelia rakudo-moar 3259ba: OUTPUT«414␤»
17:01 jnthn bioexpress: /$s/ means something very different from /<$s>/
17:01 jnthn bioexpress: The first means "just match literally the text in the string"
17:01 ramillies mspo: That means: Make a list of 1000 "a"s. For every thing in it, compare "a" <= (the thing). When it is True, put 1 in the list, when False, put 0. Then give index of the first 0
17:02 jnthn bioexpress: <$s> means "compile the thing in $s as if it's regex syntax" - which is naturally going to be slower
17:02 mspo [Coke]: Nov
17:02 psy_ joined #perl6
17:02 ramillies mspo: Essentially: tell me how many comparisons "a" le "a" must I do before it starts to be false.
17:02 jnthn bioexpress: Also, my Str $s = 'foo'; ... /$s/ is likely to be faster than without the type annotation.
17:03 bioexpress Thx!
17:05 rickbike joined #perl6
17:06 bioexpress Where is the best place in the documentation to read about the /<$s>/?
17:11 PerlJam bioexpress: I don't think there's much documentation about that particular construct.  (though, there's not much to it other than what jnthn just said)
17:12 bioexpress Ok, thx again.
17:12 PerlJam bioexpress: Maybe read S05 ... http://design.perl6.org/S05.html#Extensible_metasyntax_(%3C...%3E)
17:12 [Coke] http://docs.perl6.org/language/regexes is where it should be, but I don't see it yet.
17:12 [Coke] yah, until we get our doc story straight, the synopses are a good place to double check.
17:13 PerlJam bioexpress: oops, you want the section on variable interpolation (which is just before the section I linked)
17:15 bioexpress I've found it.
17:18 Hotkeys m: say 42 ≥ 17
17:18 camelia rakudo-moar 3259ba: OUTPUT«5===SORRY!5=== Error while compiling /tmp/33_NSJUerL␤Confused␤at /tmp/33_NSJUerL:1␤------> 3say 427⏏5 ≥ 17␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        statement end␤        statement modif…»
17:18 Hotkeys darn
17:18 Hotkeys I was hoping
17:19 PerlJam Hotkeys: If we have unicode set ops, surely we should have the relational ops as well
17:19 Hotkeys I'd think so
17:24 hoelzro what's the policy for roast if something is spec'd in the design docs, but there's no test for that feature yet? should it go into 6.c or 6.d? (ex. $=data)
17:25 PerlJam 6.c.1 or 6.d
17:27 hankache joined #perl6
17:28 hankache good evening #perl6
17:28 dalek ecosystem: c1d5872 | (Mathieu Gagnon)++ | META.list:
17:28 dalek ecosystem: Remove perl6-tag-helper
17:28 dalek ecosystem:
17:28 dalek ecosystem: Looks impossible to me to fix and pretty useless anyway.
17:28 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/c1d58723cb
17:29 PerlJam hankache: good morning! :)
17:29 hankache hi PerlJam :)
17:30 nemo Hotkeys: is there like some config for defining those associations?  like >=  ≥  ?
17:30 Hotkeys I mean
17:31 Hotkeys you could define it yourself
17:31 [Coke] hoelzro: "it depends". for now, put it in master
17:31 hoelzro *nod*
17:32 [Coke] we basically need to review stuff that's in master occasionally and consider cutting bits into a newer spec.
17:32 Hotkeys m: sub infix:<≥> ($a, $b) {$a >= $b}; say 42 ≥ 17
17:32 camelia rakudo-moar 3259ba: OUTPUT«True␤»
17:32 Hotkeys m: sub infix:<≥> ($a, $b) {$a >= $b}; say 42 ≥ 100
17:32 camelia rakudo-moar 3259ba: OUTPUT«False␤»
17:32 [Coke] (which right now is a branch, but based on talks elsewhere, may end up as subdirs in master.)
17:32 Hotkeys but it'd be nice to just have them
17:32 Hotkeys since we have other fancy unicode
17:34 sena_kun m: given 3 { when 2 or 3 {say "hooray"}};
17:34 camelia rakudo-moar 3259ba: ( no output )
17:34 sena_kun m: say given 3 { when 2 or 3 {say "hooray"}};
17:34 camelia rakudo-moar 3259ba: OUTPUT«5===SORRY!5=== Error while compiling /tmp/arEccVgYWT␤Unsupported use of bare "say"; in Perl 6 please use .say if you meant $_, or use an explicit invocant or argument, or use &say to refer to the function as a noun␤at /tmp/arEccVgYWT:1␤------> 3…»
17:35 sena_kun Uh.
17:35 RabidGravy m: given 3 { when 2|3 {say "hooray"}}
17:35 camelia rakudo-moar 3259ba: OUTPUT«hooray␤»
17:35 sena_kun RabidGravy, you're great.
17:35 RabidGravy you want the junction their
17:35 RabidGravy there
17:36 [Coke] m: given 3 { when any(2,3) { say "y" }}
17:36 camelia rakudo-moar 3259ba: OUTPUT«y␤»
17:36 [Coke] ... again, too slow. :)
17:36 sena_kun RabidGravy, yeah, just it.
17:36 RabidGravy :) but it's interesting with different versions
17:37 sena_kun RabidGravy, I'm targeting my cool and unique and pretty compress library only for christmas+ rakudo only, so it's okay, I think.
17:38 RabidGravy the infix '|' makes a any() junction, and infix '&' makes an all()
17:38 RabidGravy sena_kun, absolutely - unless there are bugs that you really do need fixing to work then that's that best plan
17:40 domidumont joined #perl6
17:41 Hotkeys so should 'use v6.c' be the way to go from now on
17:41 _Vi joined #perl6
17:41 * llfourn would also like to know what 'use' to use
17:42 Hotkeys 6.c would make it so you require 2015.12
17:42 Hotkeys at least
17:42 Hotkeys maybe 'use v6.c+'
17:43 llfourn is that what we should put in module META?
17:43 TimToady that will use either maint or dev languages; if you want only maint versions, v6.*.0 should work for that
17:44 TimToady m: say v6.d.MUMBLE ~~ v6.*.0
17:44 camelia rakudo-moar 3259ba: OUTPUT«False␤»
17:45 TimToady m: say v6.d ~~ v6.*.0
17:45 camelia rakudo-moar 3259ba: OUTPUT«True␤»
17:45 llfourn why would you want to exclude maint or dev languages and what are they?
17:45 dalek ecosystem: 0ce1543 | leont++ | META.list:
17:45 dalek ecosystem: Add Build::Graph and Build::Simple
17:45 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/0ce1543009
17:45 dalek ecosystem: d4a198c | (Will Coleda)++ | META.list:
17:45 dalek ecosystem: Merge pull request #123 from Leont/master
17:45 dalek ecosystem:
17:45 dalek ecosystem: Add Build::Graph and Build::Simple
17:45 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/d4a198cde2
17:46 pat_js m: say "outside: $_" for 4,(4|0),0 ==> map sub ($_)  {return $_ if $_ != 0; say "in sub: $_";$_}
17:46 camelia rakudo-moar 3259ba: OUTPUT«outside: 4␤in sub: 0␤outside: any(4, 0)␤in sub: 0␤outside: 0␤»
17:46 TimToady as we move toward 6.d we'll have two tracks, a 6.c.1+ track, and a 6.d.a+ track
17:46 [Coke] (two tracks). Please clarify this in the -release convo, also. :)
17:46 TimToady 6.c.1 will be minor tweaks for buggy or missing tests that don't really change the language (much)
17:46 pat_js is that intentional?
17:46 llfourn so .number => maint, .character => dev?
17:47 TimToady 6.d.a will be the first step towards whatever language we release as 6.d.0
17:47 llfourn okay cool
17:47 TimToady use v6.d.* will pick up any 6.d including previews
17:47 pat_js m: say "outside: $_" for (4|0) ==> map sub ($_)  {return $_ if $_ != 0; say "in sub: $_";$_}
17:47 camelia rakudo-moar 3259ba: OUTPUT«in sub: 0␤outside: any(4, 0)␤»
17:48 TimToady you can say: use v6.d.PREVIEW or anything uppercase too
17:48 TimToady since Z lt a
17:48 [Coke] m: use v6.d.BARFYKITTENS;
17:48 camelia rakudo-moar 3259ba: OUTPUT«5===SORRY!5=== Error while compiling /tmp/FuNa2VpuIX␤No compiler available for Perl v6.d.BARFYKITTENS␤at /tmp/FuNa2VpuIX:1␤------> 3use v6.d.BARFYKITTENS7⏏5;␤»
17:48 Hotkeys is there a difference between using .list or .List on a sequence?
17:48 Hotkeys they seem to do the same thing
17:48 pat_js is this a way to find out which of the junctions variables are true or is this a bug?
17:49 llfourn Hotkeys: probably not, the captialised version is there for type coercion I think
17:49 [Coke] list and List are not the same, no
17:49 pat_js returning from a sub, that is.
17:50 TimToady pat_js: generally that means you should be using a set instead of a junction
17:50 [Coke] pat_js: I'm not sure using $_ as a anon sub parameter is a good idea.
17:50 flussence http://www.openssh.com/txt/release-7.1p2 # hooray, another thing to panic about
17:51 TimToady [Coke]: what's the matter with it?
17:51 * llfourn uses $_ all the time as method/sub param
17:51 molaf joined #perl6
17:52 llfourn well *all* the time is an overstatement
17:52 llfourn but it's handy sometimes
17:52 TimToady [Coke]: when I say "two tracks" I am not committing to any particular representation of those; that's what -release is there to figure out :)
17:52 llfourn though in the case above it should just be a block I guess, though I'm not sure if I understand what's going on
17:53 TimToady I'm just repeating the API that's already been thrashed out for versions from the user point of view
17:53 llfourn though yeah it actually doesn't make much sense to use $_ as an *anon* sub param
17:53 pat_js I had read the documentation, but this also seems to work. I just want to know if it is intentional or if it should print "any (4, 0)" in both cases
17:54 SCHAAP137 joined #perl6
17:55 _Vi joined #perl6
17:56 Hotkeys I like that type smileys are actually called that in code
17:56 llfourn m: (4|0).map: .say
17:56 camelia rakudo-moar 3259ba: OUTPUT«(Any)␤Cannot call map(Int: Bool); none of these signatures match:␤    ($: Hash \h, *%_)␤    (\SELF: &block;; :$label, :$item, *%_)␤    (HyperIterable:D $: &block;; :$label, *%_)␤  in any  at gen/moar/m-Metamodel.nqp line 3124␤  in block <unit> …»
17:56 TimToady what's going on there is it's autothreading the map
17:56 Hotkeys m: sub $foo (Int:d $bar) {}
17:56 camelia rakudo-moar 3259ba: OUTPUT«5===SORRY!5=== Error while compiling /tmp/kLEEyP7hlK␤Missing block␤at /tmp/kLEEyP7hlK:1␤------> 3sub7⏏5 $foo (Int:d $bar) {}␤    expecting any of:␤        new name to be defined␤»
17:56 llfourn m: (4|0).map: *.say
17:56 Hotkeys m: sub $foo (Int:d $bar) {say $bar;}
17:56 camelia rakudo-moar 3259ba: OUTPUT«4␤0␤»
17:56 camelia rakudo-moar 3259ba: OUTPUT«5===SORRY!5=== Error while compiling /tmp/8SJA7oL9RC␤Missing block␤at /tmp/8SJA7oL9RC:1␤------> 3sub7⏏5 $foo (Int:d $bar) {say $bar;}␤    expecting any of:␤        new name to be defined␤»
17:56 Hotkeys wow where's the err I was getting
17:57 TimToady so the inside of the map never sees the junctoin
17:57 Hotkeys that mentioned smileys
17:57 Hotkeys oh
17:57 Hotkeys m: sub foo (Int:d $bar) {say $bar;}
17:57 camelia rakudo-moar 3259ba: OUTPUT«5===SORRY!5=== Error while compiling /tmp/cP0_3BOtOh␤Invalid type smiley 'd' used in type name␤at /tmp/cP0_3BOtOh:1␤------> 3sub foo (Int:d7⏏5 $bar) {say $bar;}␤»
17:57 Hotkeys :D
17:57 llfourn m: say (4|0).map: * + 1
17:57 camelia rakudo-moar 3259ba: OUTPUT«any((5), (1))␤»
17:57 dalek perl6.org: ad65336 | (Stefan Seifert)++ | / (3 files):
17:58 dalek perl6.org: Revert "Revert "Give Zef some more prominence.""
17:58 dalek perl6.org:
17:58 dalek perl6.org: Now that zef can install modules with native components correctly, it's
17:58 dalek perl6.org: really time for giving it more prominence!
17:58 dalek perl6.org: review: https://github.com/perl6/perl6.org/commit/ad653361d3
17:58 pat_js m: (sub ($_)  {return $_ if $_ != 0; say "in sub: $_";$_})(4|0).say
17:58 camelia rakudo-moar 3259ba: OUTPUT«in sub: 0␤any(4, 0)␤»
17:58 TimToady same thing
18:00 llfourn m: { $_ if $_ != 0; say "in sub: $_";$_ }.(4|0).say
18:00 camelia rakudo-moar 3259ba: OUTPUT«WARNINGS for /tmp/h5gBFC94CD:␤Useless use of $_ in sink context (line 1)␤in sub: any(4, 0)␤any(4, 0)␤»
18:00 TimToady and this actually points at why we can't just use junctions for sets, since the code that deals with a single value has no idea whether it's inside of any or all or one or none
18:01 llfourn m: { say "in sub: $_";$_ }.(4|0).say
18:01 camelia rakudo-moar 3259ba: OUTPUT«in sub: any(4, 0)␤any(4, 0)␤»
18:01 pat_js m: my @a; (sub ($_)  {return $_ if $_ != 0;@a.push($_); $_})(4|0); @a.say
18:01 camelia rakudo-moar 3259ba: OUTPUT«[0]␤»
18:02 TimToady parameters to blocks defualt to Mu rather than Any
18:02 masak nine: you know that a revert of a revert is morally equal to a cherry-pick, right? :P
18:02 masak (hi, #perl6)
18:03 llfourn m: say -> { }
18:03 camelia rakudo-moar 3259ba: OUTPUT«->  { #`(Block|61200592) ... }␤»
18:03 llfourn m: say -> $a { }
18:03 camelia rakudo-moar 3259ba: OUTPUT«-> $a { #`(Block|59584368) ... }␤»
18:03 TimToady we thought autothreading your if/while/given/... blocks would be terribly confusing
18:03 llfourn m: say ({ }).params[0].gist
18:03 camelia rakudo-moar 3259ba: OUTPUT«Method 'params' not found for invocant of class 'Hash'␤  in block <unit> at /tmp/k8t9j1ssgt line 1␤␤»
18:04 TimToady m: say ({;}).params[0].gist
18:04 camelia rakudo-moar 3259ba: OUTPUT«Method 'params' not found for invocant of class 'Block'␤  in block <unit> at /tmp/2MGiQZXsvJ line 1␤␤»
18:04 pat_js but is it okay to use this sort of strange return statement to find out only the right values?
18:04 nine masak: I actually think it's factually equal but morally different ;)
18:05 llfourn m: say ({;}).signature.params[0].gist
18:05 camelia rakudo-moar 3259ba: OUTPUT«Mu $_? is raw␤»
18:05 firstdayonthejob joined #perl6
18:05 ely-se joined #perl6
18:06 TimToady pat_js: it's probably a design smell that junctions are being used that way in the first place
18:07 ely-se Are static type checks still present? How predictable are they?
18:07 Peter__R joined #perl6
18:07 ely-se IIRC months ago you couldn't tell beforehand whether the type checker would croak or not.
18:07 dfcarpenterak joined #perl6
18:07 masak nine: I would settle for factually *equivalent* but morally equal :)
18:07 ely-se m: sub f(Int $x) { }; f("blah".IO)
18:07 camelia rakudo-moar 3259ba: OUTPUT«Type check failed in binding $x; expected Int but got IO::Path␤  in sub f at /tmp/lU27X0dyEg line 1␤  in block <unit> at /tmp/lU27X0dyEg line 1␤␤»
18:08 nine masak: I think I can't split that hair any further. I bow to the master :)
18:08 * masak bows back, but splits into 69,104 small hairs
18:09 TimToady ely-se: at this point, we do not attempt to intuit that a .IO method returns an IO object
18:09 masak 69,105! ergh!
18:09 ely-se oh ok :P
18:09 ely-se m: sub f(Int $x) { }; f("ばか")
18:09 camelia rakudo-moar 3259ba: OUTPUT«5===SORRY!5=== Error while compiling /tmp/t22v2MJFYk␤Calling f(Str) will never work with declared signature (Int $x)␤at /tmp/t22v2MJFYk:1␤------> 3sub f(Int $x) { }; 7⏏5f("ばか")␤»
18:09 ely-se ah nice
18:10 TimToady we might add a bit more type inference as we go along, but the problem with type inferencers is that they tend to force the programmer to be as smart as the inferencer, and that tends to drop mere mortals into the ditch alongside the road
18:11 ely-se I'm fine as long as it is well-specified what the type checker accepts and what it rejects, instead of something unpredictable.
18:12 TimToady in general, we don't want to intuit methods anyway since they're late bound, but we do know at compile time that we will interpret .IO as a coercion, so that's a possible inference that wouldn't hurt much
18:13 TimToady well, the whole point of having a language that can evolve into the future is that it will be unpredictable what will be considered "adaptive" in 20 years
18:13 perl6newbee joined #perl6
18:13 lnrdo joined #perl6
18:13 ely-se Type checkers always reject some correct programs, and it'd be real bad if existing correct code will fail to compile in a future version because the compiler detects a type error.
18:14 masak ely-se: rejecting at compile time that which would fail at runtime anyway seems safe though
18:14 TimToady "will never work"
18:15 TimToady the only argument against that approach is that time bombs should be left undisturbed to explode later :)
18:15 ely-se masak: maybe the code will never be executed (e.g. guarded by if (False)), released into the public, used all over the place, and then the next version rejects it
18:15 TimToady and you're going to do a release without even compiling the code? :P
18:15 ely-se I mean Perl 6 implementation release
18:16 sena_kun left #perl6
18:16 masak TimToady: to be honest, I'd prefer if such a time bomb went off at compile time
18:16 ely-se example: https://gist.github.com/rightfold/07aa357ca1e721d10d89
18:17 TimToady well, they're not really time bombs; they're proximity bombs...
18:17 masak I don't care much about whether something is guarded by `if False`. wrong code is wrong code.
18:18 ely-se the point is that you have to be extremely conservative with fatal static analysis if you don't well-specify things and aim for backwards compatibility
18:18 masak ely-se: ...but if the code would have failed at runtime anyway...?
18:18 ely-se the code in question would not have failed at runtime.
18:18 masak then you're not accepting my premise
18:19 masak why then would type inference flag it as a type error? I don't understand
18:19 TimToady it's not all that either/or anyway, since there are intermediate approaches
18:19 Hotkeys TimToady: any plans on adding unicode ops like ≥ and ≤
18:19 ely-se In version 1 of Perl 6, the code works (passes compilation and works at runtime). In version 2 of Perl 6, the code would still work, except does not pass compilation.
18:19 Hotkeys since we have other fancy ones
18:19 TimToady deprecations, warnings, etc
18:19 Hotkeys like the set ops
18:19 llfourn masak: because it becomes wrong but it is done a path that is never reached at runtime I think it the point.
18:19 llfourn in a path*
18:20 llfourn this is pretty close to the least of my concerns :P
18:20 masak llfourn: I don't care if the path is reached or not. I'd like code that will never work to blow up at compile time if it can
18:20 ely-se TimToady: it is hard to find out when to emit such warnings when you don't know what the type checker will do (because it's not specified anywhere)
18:20 llfourn masak: me too I guess.
18:21 ely-se right now it seems to be completely random.
18:21 jojotus joined #perl6
18:21 TimToady no, it's somewhat specified
18:21 masak but either way, ely-se is against arguing a case (making previously working code fail at compile time) that I agree is worth being very careful with
18:21 ely-se oh, I couldn't find it
18:22 masak m: sub foo($x is rw) { $x = "OH HAI" }; my @a = foo(my $y), $y; say @a[1] # is this guaranteed to always output "OH HAI\n" because *mumble mumble* sequence points?
18:22 camelia rakudo-moar 3259ba: OUTPUT«OH HAI␤»
18:24 ely-se I'm gonna play with P6 again. Writing wiki software
18:24 masak \o/
18:25 ely-se I wanted to wait till GLR so now's the time :P
18:35 TimToady the notion occurs in several spots, but is explicitly stated at S03:3242 "The compiler is allowed to complain about anything it knows cannot succeed at run time."
18:37 dfcarpenterak joined #perl6
18:40 ely-se ok
18:41 [Coke] our main problem there is "did we test for a certain way"
18:41 pat_js is the chain assoc for custom operators working?
18:41 TimToady not yet
18:41 TimToady on my todo list
18:42 TimToady the simple fix didn't work :)
18:42 pat_js Ah okay, I thought I do something wrong.
18:43 TimToady the fundamental problem is that chain operators need to be parsed kind of like a list infix, but rakudo's EXPR actually parses them as left associative, so you don't really have all the information you'd like when you'd like it, so the code handling chained ops is too special-purpose and brittle to see the user-defined op correctly
18:44 TimToady *list-associative infix
18:44 pat_js ah, okay.
18:45 TimToady I did try once. :)
18:46 PerlJam masak: Even if that behavior is guaranteed, it gives me the heebie jeebies to see it used  :)
18:48 masak PerlJam: I actually had a fairly cute use case for it, where it felt right and desirable :)
18:48 masak PerlJam: (it's a DSL for describing abstract board games)
18:49 AndyDee joined #perl6
18:50 vendethiel joined #perl6
19:00 ely-se If I put scripts in bin/ should I also list them somewhere in META.info?
19:00 RabidGravy no, it will install the scripts from bin
19:01 ely-se ok!
19:03 RabidGravy I just found myself wanting multi method dispatch based on an attribute of the invocant, I probably need to step away from the keyboard
19:04 nine What could possibly go wrong?
19:09 tadzik joined #perl6
19:10 zacts joined #perl6
19:13 kjs_ joined #perl6
19:15 mspo fixed my grammar so that it works for p6doc URI|fmt.pl6
19:15 mspo but it doesn't format actual pod at all :)
19:16 DrForr Just noticed that 'constant' doesn't appear to be searchable.
19:19 PerlJam probably because of the bias towards variable declarators
19:20 Skarsnik RabidGravy and other, feel free to add stuff in http://doc.perl6.org/language/modules-extra
19:21 DrForr Same for 'enum'.
19:24 lastAck99 joined #perl6
19:25 DrPete_ joined #perl6
19:29 pat_js is this a viable solution for http://rosettacode.org/wiki/Amb ? : https://gist.github.com/P-Seebauer/c755eeb9170cc1ca7f6f
19:29 pat_js it needed attention. but this solution "abuses" junctions as a constraint solving engine.
19:30 pat_js and there is still no inherent amb operator
19:30 pat_js but Junctions sort of fill that role in perl6
19:31 jeek pat_js: any?
19:33 cdg joined #perl6
19:33 pat_js no, it works
19:34 pat_js the problem is, that I'm using the (sub(){ return unless test; do-something})(|@junctions) to get around the fact that you shouldn't inspect Junctions
19:35 mempko joined #perl6
19:39 spider-mario joined #perl6
19:44 RabidGravy is there a single thing that can split a list of objects into sub-lists based on an attribute of the object?
19:45 leont classify?
19:45 jeek Did the eigenstates function make it into perl 6?
19:46 b2gills pat_js: I think the only way to get it to work the way it really wants to work is to use macros
19:47 pat_js is there a way to write a custom container? like scalar, but different. or even like a junction, but differen?
19:48 Skarsnik RabidGravy, what kind og weird stuff are you doing? xD
19:48 llfourn pat_js: do you mean with a different sigil?
19:48 RabidGravy Hmm classify, yeah I think that's the puppy, cheers leont++
19:48 pat_js no with other semantics
19:48 pat_js similar to tie in perl5
19:48 * leont still wants a boolean classify
19:49 llfourn pat_js: check out: http://doc.perl6.org/type/Proxy
19:49 Skarsnik pat_js, maybe you want to play with Proxy?
19:49 RabidGravy Skarsnik, https://github.com/jonathanstowe/Tinky
19:50 Skarsnik Oh wow, have fun :)
19:51 RabidGravy It was nearly done-ish then I thought of a cute-ness while I was making the synopsis example
19:52 RabidGravy i.e. if transactions have the same name then it will make a method that selects based on the current state of the object
19:53 pat_js thanks, Skarsnik and llfourn, but I think I might need something closer to a Junction, now that I look at it. Junctions have this incredible feature of "eating" the operations and subs applied to it.
19:53 wollmers p6: sprintf("%b",     -9);
19:53 camelia rakudo-moar 3259ba: ( no output )
19:53 pat_js m: say (3|4) + 7
19:53 camelia rakudo-moar 3259ba: OUTPUT«any(10, 11)␤»
19:53 pat_js that's amazing.
19:54 wollmers p6: sprintf("%x",     -9);
19:54 camelia rakudo-moar 3259ba: ( no output )
19:54 wollmers m: sprintf("%x",     -9);
19:54 camelia rakudo-moar 3259ba: ( no output )
19:54 wollmers m: say sprintf("%x",     -9);
19:54 camelia rakudo-moar 3259ba: OUTPUT«-9␤»
19:54 Skarsnik RabidGravy, you don't declare the states in the class?
19:54 b2gills m: sub amb ( &code, +@values ) { grep -> @_ { code |@_ }, [X] @values }; say amb ->\x,\y{ x * y == 8}, (1,2,3), (7,6,4,5);
19:54 camelia rakudo-moar 3259ba: OUTPUT«((2 4))␤»
19:54 wollmers m: say sprintf("%b",     -9);
19:54 camelia rakudo-moar 3259ba: OUTPUT«-1001␤»
19:55 wollmers m: say sprintf("%b",  1 +< 63);
19:55 camelia rakudo-moar 3259ba: OUTPUT«1000000000000000000000000000000000000000000000000000000000000000␤»
19:55 wollmers m: say sprintf("%b",  1 +< 64);
19:55 camelia rakudo-moar 3259ba: OUTPUT«10000000000000000000000000000000000000000000000000000000000000000␤»
19:55 b2gills m: say sprintf("%b",  1 +< 128);
19:55 camelia rakudo-moar 3259ba: OUTPUT«100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000␤»
19:56 wollmers m: say sprintf("%b",  +^0);
19:56 camelia rakudo-moar 3259ba: OUTPUT«-1␤»
19:56 b2gills m: say sprintf("%b",  2**128 -1);
19:56 camelia rakudo-moar 3259ba: OUTPUT«11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111␤»
19:56 wollmers m: say sprintf("%b",  -9);
19:56 camelia rakudo-moar 3259ba: OUTPUT«-1001␤»
19:57 b2gills An Int is theoretically unbounded
19:57 wollmers m: say sprintf("%064b",  +^0);
19:57 camelia rakudo-moar 3259ba: OUTPUT«00000000000000000000000000000000000000000000000000000000000000-1␤»
19:58 b2gills Int isn't 2's complement
19:59 wollmers When was it specced, that bits have a sign? That sprintf("%b",  +^0) outputs -1?
19:59 TimToady Int is 2's complement, +^ isn't
20:00 TimToady a negative Int merely has an infinite number of 1 bits instead of 0 bits
20:01 SCHAAP137 joined #perl6
20:01 jeek m: my $firstword  = ("the"|"that"|"a"); my $secondword = ("frog"|"elephant"|"thing"); my $thirdword  = ("walked"|"treaded"|"grows"); my $fourthword = ("slowly"|"quickly"); my $sentence = $firstword ~ " " ~ $secondword ~ " " ~ $thirdword ~ " " ~ $fourthword; if $sentence == "that thing grows slowly" { say $sentence; }
20:01 camelia rakudo-moar 3259ba: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5any(\"the\", \"that\", \"a\") any(\"frog\", \"elephant\", \"thing\") any(\"walked\", \"treaded\", \"grows\") any(\"slowly\", \"quickly\")' (indicated by ⏏)␤…»
20:01 jeek :(
20:01 TimToady (notionally; I'm sure libtommath stores a sign bit somewhere :)
20:01 colomon jeek: you want eq, not ==
20:02 jeek So I do.
20:02 pat_js m: my @a =(all «the that a»),(all «frog elephant thing»),(all «walked treaded grows»),(all «slowly quickly»);sub lf (Str $l, Str $r) {$l.ends-with($r.substr(0,1))};(sub ($w1, $w2, $w3, $w4){return unless [and] lf($w1, $w2), lf($w2, $w3),lf($w3, $w4);say "$w1 $w2 $w3 $w4"})(|@a);
20:02 camelia rakudo-moar 3259ba: OUTPUT«that thing grows slowly␤»
20:02 pdcawley joined #perl6
20:04 firstdayonthejob joined #perl6
20:07 rickbike joined #perl6
20:09 dalek star: 22c44f3 | hankache++ | docs/perl6intro.pdf:
20:09 dalek star: update perl6intro.pdf
20:09 dalek star: review: https://github.com/rakudo/star/commit/22c44f302f
20:09 dalek star: c6f059b | (Steve Mynott)++ | docs/perl6intro.pdf:
20:09 dalek star: Merge pull request #63 from hankache/master
20:09 dalek star:
20:09 dalek star: update perl6intro.pdf
20:09 dalek star: review: https://github.com/rakudo/star/commit/c6f059bc41
20:12 pat_js ah, okay.
20:14 zakharyas joined #perl6
20:16 yqt joined #perl6
20:20 ely-se joined #perl6
20:27 dalek Heuristic branch merge: pushed 137 commits to rakudo/2016.01-preparation by niner
20:27 Skarsnik wow
20:29 nine It's a branch based on 2015.12 with cherry-picked commits that don't break backwards compatibility but a lot of fixes and performance improvements and cleanup
20:30 ely-se the error message you get when you mistake is for does is quite cryptic
20:30 ely-se m: role A { }; class C is A { }
20:30 camelia rakudo-moar 3259ba: ( no output )
20:30 ely-se m: role A { method f() { ... } }; class C is A { }
20:30 camelia rakudo-moar 3259ba: OUTPUT«5===SORRY!5=== Error while compiling /tmp/mq_CmFBQm9␤Method 'f' must be implemented by A because it is required by a role␤at /tmp/mq_CmFBQm9:1␤»
20:31 Skarsnik ?
20:31 Skarsnik it's clear
20:31 RabidGravy Skarsnik, it's dynamic innit ;-) but I could see some "workflow Foo { state Open { } ; state Close {} .. transition OpenClose { has State $.from = Open.new; .... } }"
20:34 [Coke] nine: thank you for taking the lead on that!
20:35 stmuk_ nine++ # stable branch
20:36 TimToady .oO(less unstable)
20:36 TimToady nine++ # courage :)
20:38 nine I really just want to get it over with :)
20:39 alpha123 joined #perl6
20:41 pmurias joined #perl6
20:42 pmurias masak: I can imagine situations where we should abort the program because of code that's invalid but never executed
20:42 pmurias * shouldn't
20:43 pmurias my $foo = Foo.new; if $foo !~ Foo {do-something-that-invalid-on-Foo($foo)}
20:43 riatre joined #perl6
20:43 roguelazer joined #perl6
20:44 Skarsnik there is no routine/method type checking (it's kind of annoyingx)
20:44 pmurias ely-se: it's possible to make a type-checker that only rejects invalid programs
20:45 Skarsnik I mean before running
20:45 ely-se pmurias: yes, but assuming Turing-completeness, not all invalid programs, and it's also difficult to make it useful if it only rejects invalid programs
20:46 ely-se because it can reject only very few programs
20:46 pmurias I think dialyzer for Erlang is an example of rejecting only invalid programs
20:46 ely-se if it rejects a program because a dead part of it is ill-typed, it rejects a valid program
20:47 ely-se and it has to, because of the halting problem
20:47 _Vi joined #perl6
20:48 pmurias it's a tradeoff between only accepting some valid ones and rejecting all invalid ones or rejecting some invalid ones and accepting all valid ones
20:48 pmurias ely-se: dialyzer assumes that dead code is bad and should be detected
20:48 jnthn Skarsnik: The big point of OO is late binding (or at least, was meant to be). :) If you want early binding and more static checking, consider a more functional design rather than an OO one.
20:49 ely-se pmurias: so it rejects some valid programs!
20:49 pmurias not sure if it rejects or just warns ;)
20:49 rurban joined #perl6
20:50 hahainternet hey rurban
20:50 hahainternet saw your post on HN yesterday but didn't want to fight :D
20:50 pmurias pmurias: re only very few programs in my experience loads of type error bugs in dynamic languages are simple ones
20:51 Skarsnik jnthn, Perl 6 is still loosy on sub that are not method for type checking. and I am pretty sure in lot of case you want so
20:51 Skarsnik erf
20:51 dalek doc: 16af427 | (Steve Mynott)++ | bin/p6doc:
20:51 dalek doc: Remove use of |fmt since this breaks code samples like
20:51 dalek doc:
20:51 dalek doc:     chomp($string);
20:51 dalek doc:     $string.chomp;
20:51 dalek doc:
20:51 dalek doc: by putting them on one line when p6doc is used.
20:51 dalek doc:
20:51 dalek doc: In any case we should be extending code in Pod::To::Text
20:51 dalek doc: to format pod (and there is a text wrap sub there).
20:51 dalek doc: review: https://github.com/perl6/doc/commit/16af427a45
20:51 Skarsnik I would not mind something to let Perl 6 tell me that I am passing the wrong type to a method at compile time
20:53 jnthn Skarsnik: I'm sure somebody will do that in a module. :) But in terms of what we do by default, it'll mostly be about more static checking of lexically scoped things.
20:53 mspo isn't that the point of types?
20:53 mspo a point
20:54 jnthn There's many points :)
20:54 pmurias ely-se: in regards to stuff breaking due to newly discovered crap dead code, just not aborting  legacy production code solves that issue
20:54 ely-se What do you mean by that?
20:54 ely-se It may be legacy code in an old library that you have to use.
20:55 jnthn I don't know why people are getting so worked up over the "more compile time checking in later language versions" thing. It's all rather easily solved by having the "use v6.d" or whatever switch on spitting out errors on more things.
20:55 PerlJam People like to get worked up.
20:55 jnthn Then code that declared its language version will keep on working.
20:55 PerlJam especially about things they understand poorly ;)
20:56 Skarsnik I would like a pragma x)
20:56 jnthn PerlJam: Tell me about it. Thankfully I decided not to backlog here any more, so I can see less of it. :P
20:56 TimToady it will also be our fault that they forgot to declare the version :)
20:56 jnthn Of course. :)
20:56 TimToady and used a repo that doesn't enforce versions...
20:56 ely-se Everything is your fault!
20:57 PerlJam .oO( "Perl 6 sucks!  I always have to declare which version of the language I'm using!" )
20:57 TimToady well, not everything
20:57 ely-se I like version numbers at the top of files.
20:57 TimToady if I ever get to thinking everything is my fault, it's time to shoot me
20:57 ely-se I didn't know you got more granularity than just "Perl 6".
20:57 Skarsnik I don't like them
20:57 ely-se XML is my favourite language because of <?xml version="1.0" ?>
20:58 hahainternet one thing i think is a smart idea fwiw
20:58 TimToady XML is not my fault!
20:58 hahainternet is date specifism
20:58 PerlJam heh
20:58 hahainternet ie, perl5 allows me to use Modern::Perl '2015';
20:58 ely-se TimToady: if XML didn't allow specifying version numbers then XML-related incompatibilities would be your fault.
20:58 hahainternet i like the fact that it's done by date, it feels a bit more accessible
20:58 b2gills TimToady: but TAP is your fault
20:59 TimToady well, "ok 1" is my fault
20:59 PerlJam hahainternet: but doesn't make enough sense (IMHO) for *language* versioning.
20:59 hahainternet PerlJam: i'm ambivalent on that
20:59 PerlJam hahainternet: For compiler versions, I can see it being used, but not for languages.
20:59 hahainternet i just wanted to raise the issue
20:59 TimToady TAP is only partly my fault, for writing a TEST script to analyze "ok 1"
20:59 pmurias hahainternet: until you find code that's written 20 years ago
20:59 hahainternet pmurias: hey as long as it says '1995' on it (jesus christ that was 20 years ago!)
20:59 RabidGravy tum ti tum
20:59 Skarsnik C standard name are a date!
21:00 ely-se jnthn: is any d for use v6.d; already supported?
21:00 ely-se v6.0 is croaked upon
21:00 Skarsnik I thing the real issue is what is the default?
21:00 Skarsnik If I put nothing it assume what?
21:00 ely-se it assumes PHP by default
21:01 PerlJam Skarsnik: the highest standard the compiler understands
21:01 jnthn Skarsnik: If you put nothing it assumes latest.
21:01 jnthn Well, latest standard, yes.
21:01 TimToady that'd be v6.*.0
21:01 Skarsnik That I will never put the version probably xD
21:01 TimToady v6.*.0+ rather
21:02 TimToady then you can't test against any dev versions
21:02 RabidGravy Well it should be the version you tested with
21:02 PerlJam Skarsnik: that will probably only bite you when we deprecate things.
21:02 pmurias .oO(use php:from<1995>)
21:03 TimToady well, there may be subtle differences that don't fall into the category of deprecations
21:03 TimToady the whole point of going from 6.c to 6.d someday is to mutate the language
21:03 PerlJam that's why I said "probably"  :)
21:03 [Coke] TimToady: a doc page on how spec versions work would be a good thing.
21:04 [Coke] someone enterprising could scrape the logs for timtoady today and write it up!
21:04 TimToady you (or someone like you) should mostly likely probably kinda sorta said (or indicate) something more along the lines of "probably"
21:04 PerlJam [Coke]: heh ... I was thinking you should do exactly that!  :)
21:04 [Coke] You can't spell timtoady with mit out today!
21:04 ely-se oh, it's actually literally "v6.d"
21:04 ely-se on my machine it says v6.c
21:04 ely-se what do those letters mean?
21:04 [Coke] yes. there has only ever been v6.c so far.
21:05 [Coke] version 6 - christmas
21:05 ely-se oh ok :)
21:05 ely-se I'll use that then.
21:05 TimToady instead of using years or numbers, we decided we like letters for language standards
21:06 TimToady especially since they can be associated with names like 'christmas', 'diwali', etc
21:06 jnthn I can also try and draft something up on versioning in the coming days.
21:06 TimToady which cuts a bit of the marketing headwind
21:06 ely-se v6.e for elyse
21:06 TimToady are you a religious festival?
21:06 DrForr multi++ # though I'm probably borderline abusing it.
21:07 hahainternet TimToady: i think you could argue .f for 'Friday' would count as that ;)
21:07 hahainternet and it makes the release window for that version very easy too :D
21:07 TimToady hah
21:07 ely-se what if you went all the way to Z?
21:07 TimToady we've already said we no longer have to hit the day in question
21:07 PerlJam ely-se: we will.
21:07 TimToady Christmas was a fluke
21:07 TimToady pure coincidence :)
21:07 PerlJam ely-se: Are you asking what comes after 6.z ?
21:07 ely-se yes
21:08 TimToady well, there's always 6.zz
21:08 Skarsnik the end of the world probably
21:08 ely-se Perl 7
21:08 PerlJam m: my $s = "z"; $s++; say $s;
21:08 camelia rakudo-moar 3259ba: OUTPUT«aa␤»
21:08 TimToady m: say v6.z cmp v6.0
21:08 camelia rakudo-moar 3259ba: OUTPUT«Less␤»
21:08 PerlJam :-)
21:08 TimToady there's always 6.0
21:08 Ven joined #perl6
21:08 PerlJam that would really confuse people
21:08 skids Restart the alphabet with umlauts
21:09 ely-se Having fun with Perl 6 already.
21:09 geekosaur m: say so 'z < '{'
21:09 camelia rakudo-moar 3259ba: OUTPUT«5===SORRY!5=== Error while compiling /tmp/S7QeOVXnTD␤Unable to parse expression in single quotes; couldn't find final "'" ␤at /tmp/S7QeOVXnTD:1␤------> 3say so 'z < '{'7⏏5<EOL>␤    expecting any of:␤        list composer␤        singl…»
21:09 TimToady given some of us hope to be dead by the time we reach .z, it's someone else's problem :)
21:09 ugexe m: say "z".succ
21:09 camelia rakudo-moar 3259ba: OUTPUT«aa␤»
21:09 geekosaur woo[s
21:09 ely-se https://gist.github.com/rightfold/c250865ca780d62d2596
21:09 * geekosaur sighs. typing not working so hot today
21:09 geekosaur m: say so 'z' < '{'
21:09 camelia rakudo-moar 3259ba: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5z' (indicated by ⏏)␤  in block <unit> at /tmp/8BLa9qTm5P line 1␤␤Actually thrown at:␤  in block <unit> at /tmp/8BLa9qTm5P line 1␤␤»
21:09 geekosaur derr
21:09 geekosaur m: say so 'z' lt '{'
21:09 camelia rakudo-moar 3259ba: OUTPUT«True␤»
21:09 TimToady If we do switch to 6.0 someday, I hope to be dead before we hit v6.6.6...
21:10 ely-se and reincarnate on the day of lucky v7.7.7
21:10 stmuk_ . o O ( are there any religious festivals starting with F? )
21:10 hahainternet Friday!
21:10 hahainternet followed by more people than any other religion
21:10 hahainternet prayed for by more people than any saint
21:10 TimToady m: say v6.z cmp v6.ä
21:11 camelia rakudo-moar 3259ba: OUTPUT«Less␤»
21:11 hahainternet celebrated more than any festival you can name :D
21:11 TimToady I guess that works
21:11 PerlJam .oO( I thought Friday was followed by Saturday )
21:11 TimToady not sure how many religious holidays start with umlauts though...
21:11 hahainternet where's the rimshot bot ;)
21:11 ely-se stmuk_: Feast of the Sacred Heart
21:11 stmuk_ floralia
21:12 mspo festivus
21:12 ugexe festivus has no ties to religion
21:12 TimToady fiesta, if we wanna get the hispanics to feel included
21:12 TimToady doesn't really have to be religious
21:12 jnthn PerlJam: That moment when you're not sure if pun or Rebecca Black reference... :)
21:12 PerlJam heh
21:12 TimToady I don't think my birthday is particularly religious...yet...
21:12 nine Why is ä after z?
21:13 DrForr Bummer, 'is rw' only works on scalars.
21:13 TimToady maybe you want 'is raw'
21:14 DrForr Ah, that works but I'm not sure where I'd dig up docs on that.
21:14 TimToady nine: because we decided versions go in unicodical order
21:14 jnthn rest &
21:15 ely-se just continue with the next code point after z
21:15 TimToady wants to be alpha to be considered before .0
21:15 TimToady and we do have to parse the silly things
21:15 ely-se so at one point you'll end up with v6.🕴
21:15 TimToady as it is, we disallow a method call after a version number
21:16 ely-se fonts that lack 🕴 suck
21:16 masak m: say (v1.0).Str
21:16 camelia rakudo-moar 3259ba: OUTPUT«1.0␤»
21:16 TimToady m: say v6.c.1.Str
21:16 camelia rakudo-moar 3259ba: OUTPUT«v6.c.1.Str␤»
21:16 ely-se m: say (v1.🕴).Str
21:16 camelia rakudo-moar 3259ba: OUTPUT«5===SORRY!5=== Error while compiling /tmp/WPMhquVWnR␤Malformed postfix call␤at /tmp/WPMhquVWnR:1␤------> 3say (v1.7⏏5🕴).Str␤»
21:16 mspo so is there interest in me trying to patch the line wrapper stuff into p6doc and removing the | fmt -m 80, or should that logic get built into a Pod:: module
21:17 TimToady what happens if you want ) for a version character?
21:17 stmuk_ mspo: I just removed the |fmt since it broke other things
21:17 cdg joined #perl6
21:17 yqt joined #perl6
21:17 mspo stmuk_: oh cool
21:17 TimToady |fmt is just wrong for non-flowed text
21:17 mspo TimToady: I made a grammar to chop lines that works a little better
21:17 ely-se TimToady: escape it with a backslash
21:18 stmuk_ mspo: I think line wrapping logic should be in "Pod::To::Text"
21:18 TimToady okay, what if you want a backslash in your version?
21:18 ely-se escape it with a backslash
21:18 [Coke] (religious) I would be grateful it it were just "holidays".
21:19 _nadim What's the rule for which symboles string EVAL can an can not see? I had a script with a sub that does string EVAL, no problems seing scoped symbols. in tests it doesn't work and when I move the sub to it's own package, the symboles are not seen either.
21:19 TimToady really, it's anything that is a named celebration
21:19 TimToady that isn't too non-family-friendly, I should add :)
21:19 skids What, no Ron Jeremey Day?
21:19 ely-se programmer's day
21:20 stmuk_ holiday is holyday!
21:20 TimToady _nadim: EVAL only sees things in its outer lexical scope
21:20 TimToady which means (or is supposed to mean) the spot where the EVAL is called
21:20 RabidGravy so, when we get to Yule we're ready to start again
21:21 [Coke] note that EVAL has a magical undocumented parameter.
21:21 _nadim please do tell
21:21 stmuk_ X-Day (Church of the SubGenius)
21:21 TimToady EVAL is specially recognized by the compiler, one of the reasons it's uppercased
21:22 pat_js where can I find documentation about the CALL-ME documentation?
21:22 TimToady we are specifically NOT restricting it to one culture's religious holidays
21:22 stmuk_ Integrity Day --
21:22 stmuk_ A day of contemplation of Hubbard's 1965 study on Scientology Ethics.
21:23 stmuk_ maybe not
21:24 Hotkeys Are we going to get 6.pi-day
21:25 Hotkeys Or will that wait til 6.π
21:25 _nadim TimToady: outer scope is the compilation unit then, right? this works for example http://nopaste.linux-dev.org/?931825
21:25 TimToady m: say v6.π cmp v6.τ
21:25 camelia rakudo-moar 3259ba: OUTPUT«Less␤»
21:26 Hotkeys Of course we can have tau day too
21:26 Hotkeys m: say v6.π cmp v6.c
21:26 camelia rakudo-moar 3259ba: OUTPUT«More␤»
21:26 Hotkeys Good we haven't missed it
21:27 TimToady _nadim: yes, that should work
21:28 ely-se Is it already possible to "use M <&f>;" to import just the f sub from M?
21:28 ely-se the compiler says no EXPORT sub is defined
21:29 dalek rakudo/2016.01-preparation: 1cb4034 | coke++ | docs/announce/2016.01.md:
21:29 dalek rakudo/2016.01-preparation: Placeholder release announcement
21:29 dalek rakudo/2016.01-preparation: review: https://github.com/rakudo/rakudo/commit/1cb4034396
21:29 TimToady m: say v6.c cmp v6.𒁖
21:29 camelia rakudo-moar 3259ba: OUTPUT«Less␤»
21:29 TimToady .u 𒁖
21:29 yoleaux U+12056 CUNEIFORM SIGN DAG [Lo] (𒁖)
21:30 TimToady and I think it is one!
21:30 roguelazer joined #perl6
21:30 rodarmor joined #perl6
21:30 riatre joined #perl6
21:33 wollmers Int has unlimited bits. Thus my bitvector LCS::BV has half the code now, is the shortest and fastest (written in P6;-). And O(n). A::Diff crashed in second benchmark.
21:34 rindolf joined #perl6
21:42 friedo_ joined #perl6
21:42 ruoso joined #perl6
21:43 friedo_ hi folks
21:43 friedo_ what am I doing wrong with named positional parameters here? http://pastebin.com/xxmeP8gj
21:44 timotimo friedo_: you have declared the sub takes 3 positional arguments and 0 named arguments
21:44 timotimo if you want it to take named arguments, you'll haev to put a : in front of the $
21:44 timotimo if you want the sub to work with positionals as well as nameds, you'll have to build two candidates and make the sub into a multi sub
21:45 friedo_ what I've read elsewhere seems to imply that the :name(val) form works for both positional and named params though :/
21:46 friedo_ e.g. this post, unless it's obsolete? https://perl6advent.wordpress.com/2009/12/09/day-9-having-beautiful-arguments-and-parameters/
21:51 dalek rakudo-star-daily: 9bf888c | coke++ | log/ (6 files):
21:51 dalek rakudo-star-daily: today (automated commit)
21:51 dalek rakudo-star-daily: review: https://github.com/coke/rakudo-star-daily/commit/9bf888cbb5
21:52 TimToady it's only about 6 years out of date... :)
21:53 TimToady we decided trying to support that would lead to insanity
21:53 TimToady for some definition of "we", and "insanity"
21:53 ELBeavers joined #perl6
21:54 friedo_ @TimToady thanks for the clarification
21:59 [Coke] dd
22:00 nine I'm off to bed now. Good night all!
22:00 lokien_ joined #perl6
22:01 PerlJam nine: sleep well!
22:05 timotimo nite nine
22:07 mspo finding all of the Pod moduls is fun :)
22:15 ely-se v6.http://i.imgur.com/XWOuu8G.gif
22:16 timotimo wow, i've only ever seen a very, very short version of that gif before
22:17 kjs_ joined #perl6
22:17 ely-se I feel sorry for you.
22:17 ely-se It's the most awesome gif of all time.
22:17 sjn v6.🎆
22:18 flussence .oO( a codepoint is worth a thousand frames )
22:19 ely-se m: say v6 * 1i
22:19 camelia rakudo-moar 3259ba: OUTPUT«Cannot call Numeric(Version: ); none of these signatures match:␤    (Mu:U \v: *%_)␤  in block <unit> at /tmp/5sgFteWnia line 1␤␤»
22:19 ely-se no imaginary versions
22:20 sjn heh
22:20 sjn .u 🎆
22:20 yoleaux U+1F386 FIREWORKS [So] (🎆)
22:20 * sjn needs a font that shows that grapheme
22:21 M___ joined #perl6
22:21 dalek doc: a41aee8 | (Steve Mynott)++ | bin/p6doc:
22:21 dalek doc: Look under Language and Type so that 'p6doc Str' and 'p6doc faq' now
22:21 dalek doc: work.
22:21 dalek doc: review: https://github.com/perl6/doc/commit/a41aee8400
22:24 * flussence wonders why fontconfig has half a dozen commands that do almost identical things, and none of them are "show me which fonts have this character in them"
22:26 mempko joined #perl6
22:30 ely-se Well, time to sleep. Bye!
22:30 ely-se flussence: because incompetence
22:36 mspo timotimo: https://www.youtube.com/watch?v=9CS7j5I6aOc for the sound
22:36 mspo and https://www.youtube.com/watch?v=NFTaiWInZ44
22:43 andrewalker joined #perl6
22:46 zengargoyle hrm... is there now no easy way to use rakudobrew and share a Perl 6 install with multiple users?
22:47 zengargoyle it's doing odd things, like panda shows installed modules to one user but not another.
22:50 Praise joined #perl6
22:51 bjz joined #perl6
22:53 tadzik ugh
22:53 tadzik rakudobrew is not meant to be used as a system-wide installation
22:53 tadzik please don't go there, it's a very bad idea :)
22:55 b2gills It should probably fail with that message if ran as root
22:55 dalek doc: 47fcaf0 | (Steve Mynott)++ | bin/p6doc:
22:55 dalek doc: 'p6doc -l' now lists some documents
22:55 dalek doc: review: https://github.com/perl6/doc/commit/47fcaf0c1c
22:56 tadzik that's not a bad idea
22:58 timotimo http://utf8everywhere.org/ - haven't read it yet, but might be interesting?
22:58 zengargoyle tadzik: why?  what's wrong with /opt/rakudobrew being rwxrwsr-x user:group and having user in group?
23:00 TEttinger joined #perl6
23:00 zengargoyle directories/files are rwx for everybody in group.  stuff should install and work that way (it did at one point...)
23:01 tadzik should. We already had someone here who did some mumbo-jumbo with a system-wide rakudo and ended up with his /usr/bin wiped
23:01 tadzik I don't doubt that it can be done correctly, but I want no part of that, I won't advertise it and in any case I won't support such usage
23:01 tadzik s/rakudo/rakudobrew/
23:02 sno joined #perl6
23:02 zengargoyle fwiw, seem more like a rakudo/panda issue than rakudobrew...
23:03 tadzik nah
23:03 dalek doc: 4839d10 | (Steve Mynott)++ | bin/p6doc:
23:03 dalek doc: file is already an .IO
23:03 dalek doc: review: https://github.com/perl6/doc/commit/4839d100f4
23:03 tadzik well, the erratic behaviour in question came up because of either putting rakudobrew in /usr/bin or symlinking rakudobrew's bin there, or something
23:04 tadzik rakudobrew treats its bin like its own thing, temporary by all means, and will not hesitate to wipe it
23:04 tadzik it was without a doubt the user's fault
23:04 tadzik but still :)
23:05 tadzik it wasn't developed with multiuser-usage in mind, it wasn't tested for it... it might Just Work, but I won't claim responsibility for any of this
23:05 stmuk_ it's like rakudobrew has become a monster independent of its creator and the standard way of installing perl6 :)
23:05 zengargoyle ah, not a problem here.  i started with /opt/rakudobrew and just changed permissions to be a group thing.  but for some reason panda works for owner but not group.
23:05 tadzik (not that I will in other cases :P)
23:07 zengargoyle like i can still *use* installed modules, but panda list doesn't show them.
23:09 tadzik hm, peculiar
23:09 tadzik well, if panda is unable to write to the rakudo's site/, it falls back to ~/.perl6/site
23:10 tadzik that could explain it
23:10 tadzik it also picks up the first location that works, ignoring others
23:10 zengargoyle that's probably broken.  i'm sure i can write to /opt/rakudobrew yet still end up with stuff in .perl6
23:11 zengargoyle i've gone as far as chown/chmod -R the whole thing just to be sure, remove .perl6 and it shows up again.  which is patently silly.
23:14 zengargoyle if i chown -R to another user, that user works.  so looks like somewhere it's checking acutal owner permissions vs group/actual permissions.
23:23 _Vi joined #perl6
23:26 tadzik interesting
23:26 tadzik all panda does (that I know of) is checking the writability of file/directory
23:30 zengargoyle might try a start-from-scratch and test thing this weekend or something.  since something like «perl6 -e 'use LibraryCheck; say "woot";'» works no matter which user owns install, but «panda --installed list» only works for actual owner... it might only be in the part that tries to enumerate available modules vs the part that tries to load a specific module.  so it seems so far.
23:31 zengargoyle not sure if panda is using a compunitrepo to get the list of installed or relying on it's own list somewhere.
23:32 _Vi joined #perl6
23:33 kid51 joined #perl6
23:33 tadzik no, it has its own list
23:33 tadzik to keep track of what was installed as a dependency and what was not
23:34 zengargoyle seems like that should be in compunit or something so other package managers have the same info.
23:34 yurivish joined #perl6
23:34 tadzik that'd be nice
23:41 jabus joined #perl6
23:41 RabidGravy coo a 103 line synopsis, I'd skip the rest of the documentation if that was half of it
23:42 jabus how to connect to MS sql server using perl6? looks like DBIish is for sqlite, postgres and mysql only?
23:43 skids joined #perl6
23:43 RabidGravy right now, I'd guess that you can't TBH, though I'm sure you could bind to an ODBC library
23:46 RabidGravy there is an Oracle driver in hand for DBIish and I guess someone could make a FreeTDS driver or whatever the new fashion is
23:46 jabus huh. I don't know a good way to bind to an ODBC lib (or really any bind to anything.)
23:48 RabidGravy well it's look at the DBIish code and http://doc.perl6.org/language/nativecall and then hack something together with your favourite ODBC library :)
23:49 RabidGravy lots of code but probably not horribly difficult
23:52 RabidGravy I'm sure someone will be sufficiently motivated at some point to make this
23:53 RabidGravy after all no-one's made an email sending library yet
23:55 cpage_ joined #perl6
23:57 jabus ok thx RbdGrvy.
23:58 RabidGravy right time to crash, toodles peeps

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

Perl 6 | Reference Documentation | Rakudo