Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-01-16

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:02 RabidGravy release the goats
00:07 RabidGravy toodles people!
00:20 kid51 joined #perl6
00:25 average joined #perl6
00:26 average I was looking at New Zealand's TZ
00:26 average it's GMT+12:45
00:26 zwu joined #perl6
00:26 average that kinda throws off some of my calculations
00:27 average does it make sense if I consider .nz to be on GMT-11:15 ?
00:28 average or is it unsound ?
00:28 average btw, TZs never cease to amaze me https://en.wikipedia.org/wiki/List_of_UTC_time_offsets
00:28 leont That would be a day off
00:28 average turns out, they span from GMT-12 to GMT+14
00:29 average that means they cover 26 hours, that's very weird
00:29 leont Kiribati has +14 because a country being split by the day separator is suboptimal
00:29 average I would expect the distance between the earliest and the latest timezone to be at most 24h
00:30 average that's how much time it takes for Earth to revolve around its axis
00:30 average leont: is it suboptimal ?
00:30 average leont: or are they just pampered and wanted to be different ?
00:30 leont Euphemisms, I like using them ;-)
00:30 average if someone asked me I would just tell them Kiribati is full of hipsters
00:31 average "Oh we're on this timezone called GMT+14, you've never heard of it"
00:31 leont Try -2:00, that's the one no one ever heard of
00:32 average leont: because it's in the ocean ?
00:33 leont Population estimate of Fernando de Noronha and South Georgia and the South Sandwich Islands combined: 51
00:33 rurban1 joined #perl6
00:34 average leont: but they made sure they got their own timezone
00:34 average those 51 people must be super-important
00:35 rurban joined #perl6
00:37 AlexDaniel m: say DateTime.new(‘2015-12-24T12:23:00+69:42’)
00:37 camelia rakudo-moar 3259ba: OUTPUT«2015-12-24T12:23:00+69:42␤»
00:37 AlexDaniel m: say DateTime.new(‘2015-12-24T12:23:00+69:42’).timezone
00:37 camelia rakudo-moar 3259ba: OUTPUT«250920␤»
00:38 AlexDaniel what's that
00:38 AlexDaniel m: say DateTime.new(‘2015-12-24T12:23:00+02:00’).timezone
00:38 camelia rakudo-moar 3259ba: OUTPUT«7200␤»
00:38 AlexDaniel ah right
00:39 leont timezone is the wrong word for that, really :-/
00:39 AlexDaniel average: what kind of calculations are you doing? :)
00:39 AlexDaniel leont: yeah, it is clock offset
00:39 AlexDaniel leont: why do we even have this crap
00:40 joydo joined #perl6
00:42 kjs_ joined #perl6
00:43 AlexDaniel the whole assumption that the sun should be shining with some specific brightness at some specific hours is just not relevant anymore. We don't use sundials, right?
00:45 pierre-vigier joined #perl6
00:45 AlexDaniel though these are separate issues
00:46 leont Humans and habits…
00:49 AlexDaniel what completely escapes me is how humans strive to improve all aspects of life except calendars and clocks
00:50 AlexDaniel every time I look at monthly stats I wonder “was it adjusted according to the number of days in the month or not?”
00:50 AlexDaniel come on people, we can do better
00:53 joydo Can somebody help me explain the dynamic variable "$*REPO" ? or some documents I can refer to!!!
00:54 AlexDaniel m: say $*REPO
00:54 camelia rakudo-moar 3259ba: OUTPUT«inst#/home/camelia/.perl6/2015.12-212-g3259ba3␤»
00:55 BenGoldberg joined #perl6
01:01 AlexDaniel m: say ‘????’.uniname
01:01 camelia rakudo-moar 3259ba: OUTPUT«REVERSED HAND WITH MIDDLE FINGER EXTENDED␤»
01:05 average does Perl6 have a monotonic clock ?
01:05 average you need a monotonic clock guys..
01:10 pierre-vigier joined #perl6
01:17 molaf joined #perl6
01:18 leont Not sure that has to be part of the language, but they're sure darn useful
01:20 autarch and a pentatonic scale - need that too
01:22 * TimToady wonders what "monotonic" means there
01:22 skids Well, the definition is solid in non-parallel applications, at least.
01:23 leont Steadily increasing
01:23 leont As opposed to wallclock which follows human time, and can move around at will
01:23 TimToady our instants are certainly monotonic in that sense
01:23 leont monotonic is what you'd use for a benchmark, wallclock is for end-users
01:23 leont That doesn't mean the clock that generates them is
01:24 skids Oh, well that wasn't the definition I thought then.
01:24 TimToady that's a problem with the computer, not the language
01:24 leont Time is difficult :-/
01:24 leont It's neither, or both, but probably neither. It's time.
01:24 TimToady Instants are supposed to be sync'd to TAI to the extent possible to determine on the computer
01:25 leont You're missing the point
01:25 leont Unless your computer is/has an atomic clock, it doesn't have a monotonic timesource that's relatable to human time (and even one could argue TAI is an average)
01:26 leont A typical monotonic clock is based on seconds since boottime, since that won't skip when the user decides their clock is wrong.
01:29 TimToady a user is not supposed to be able to change Instants at their whim
01:30 TimToady but I see that backtranslating from the system clock can be a problem
01:33 TimToady we could peg Instants to a monotonic clock at the beginning of a process, but then we could have concurrent processes that disagree on the current Instant by a significant degree
01:33 TimToady there's no easy answer that solves every problem
01:35 average http://linux.die.net/man/3/clock_gettime
01:35 average see the part about CLOCK_MONOTONIC
01:37 skids Well, that resets on reboot.
01:39 average "continuity is more important than having actual time" (I think he means monotonicity is more important than actual time) https://www.youtube.com/watch?v=-5wpm-gesOY#t=9m13s
01:39 average he mentions Google has a clock that smears leap seconds all throughout the day
01:40 average I suppose they are doing that in the attempt of having an actual monotonic clock that is not affected by leap seconds
01:40 average "A leap second is a one-second adjustment that is occasionally applied to Coordinated Universal Time (UTC) in order to keep its time of day close to the mean solar time, or UT1."
01:40 average ^^ and that's a leap second
01:41 TimToady we'd rather have another second in our monotonic time than to have seconds vary in length
01:41 mspo that assumes monotonic means monotonic in your OS
01:41 yoleaux 15 Jan 2016 22:11Z <sortiz> mspo: I'm working in a p6-LMBD
01:41 mspo sortiz: nice
01:41 TEttinger they do though, if you're working at a different speed
01:42 TEttinger approaching the speed of light, seconds do vary in length
01:42 TimToady we aren't worried about that for Perl 6
01:42 TEttinger haha
01:42 TEttinger 100 years not 100,000
01:42 TimToady TAI is good enough for earthbound earthlings :)
01:43 TimToady and if it's not, you're gonna have your own clock already :)
01:43 TEttinger ha yes
01:46 skids Eh, if reality is only partially ordered in the first place a Lamport timestamp should do just fine.
01:49 average skids: lamport is that distributed systems guy ?
01:49 average skids: he made that clock for distributed systems right ?
01:50 skids Yeah.  One of the distributed partially ordered causality schemes.
01:54 Dee22 joined #perl6
01:56 leont If you want monotonic time, you probably don't need to map it to human time. Instants don't need to have a meaningful value, you'd only use them to create Durations
01:57 TimToady that's pretty much how they're defined; epoch-less atomic seconds
01:58 TimToady people keep wanting to confuse them, however :)
01:58 leont They do!
02:17 pierre-vigier joined #perl6
02:21 xpen joined #perl6
02:29 xpen joined #perl6
02:32 pierre-vigier joined #perl6
02:41 xpen_ joined #perl6
02:58 molaf_ joined #perl6
03:01 Herby_ joined #perl6
03:01 Herby_ Good evening, everyone!
03:02 Actualeyes joined #perl6
03:02 Herby_ m: comb(<[a..z]>, "h.e.l.l.o.").say
03:02 camelia rakudo-moar 3259ba: OUTPUT«()␤»
03:02 Herby_ m: comb(/./, "h.e.l.l.o.").say
03:02 camelia rakudo-moar 3259ba: OUTPUT«(h . e . l . l . o .)␤»
03:02 Herby_ how would I go about stripping punctuation out of a string?
03:03 Herby_ m: comb(/<[a..z]>/, "h.e.l.l.o.").say
03:03 camelia rakudo-moar 3259ba: OUTPUT«(h e l l o)␤»
03:03 Herby_ :)
03:03 autarch I could use some help debugging a confusing warning in https://github.com/autarch/perl6-Test-Stream
03:04 Herby_ m: comb(/<[a..z]>/, "h.e.l.l.o.").join.say
03:04 camelia rakudo-moar 3259ba: OUTPUT«hello␤»
03:04 Herby_ m: comb(/<[a..z]>/, "hello. this is a test string. \n and another line!").join.say
03:04 camelia rakudo-moar 3259ba: OUTPUT«hellothisisateststringandanotherline␤»
03:05 Herby_ wish I could help, autarch, but I'm still fumbling my way through the basics
03:05 autarch hmm, now maybe the warning went away ...
03:06 autarch alright, that's odd
03:07 Herby_ m: $string = "Was it a car or a cat I saw?"; if $string.lc.comb(/<[a..z]>/) eq $string.lc.comb(/<[a..z]>/).reverse { say "Its a palindrome" };
03:07 camelia rakudo-moar 3259ba: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Ce35O6S5QM␤Variable '$string' is not declared. Did you mean 'Stringy'?␤at /tmp/Ce35O6S5QM:1␤------> 3<BOL>7⏏5$string = "Was it a car or a cat I saw?"␤»
03:08 Herby_ m: my $string = "Was it a car or a cat I saw?"; if $string.lc.comb(/<[a..z]>/) eq $string.lc.comb(/<[a..z]>/).reverse { say "Its a palindrome" };
03:08 camelia rakudo-moar 3259ba: OUTPUT«Its a palindrome␤»
03:08 kid51_ joined #perl6
03:10 autarch ok, here's the warning - check out the repo, then run ...  perl6 -Ilib -e 'use Test::Predicates'
03:10 autarch and the warning I get is - "Use of uninitialized value of type Mu in string context
03:10 autarch Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed.  in code  at /home/autarch/projects/perl6/Test-Stream/lib/Test/Predicator.pm6 line 66"
03:10 autarch but what's so confusing is that this happens at compilation time and this code is not being run
03:11 autarch the warning used to be repeatable, but now it seems to only happen sometimes, if I run that command repeatedly it doesn't always show up
03:13 nadim joined #perl6
03:20 autarch I've got to stop waiting to ask questions til after the europeans have all gone to sleep
03:21 skids try --ll-exception
03:23 autarch skids: it's just a warning - will that still help?
03:23 skids maybe not.
03:23 autarch on another topic, how do I fork?
03:27 skids autarch: as it so happens, I braindumped what I do to send PRs last night at https://github.com/perl6/user-experience (the two "Rakudo" links in the README.md)
03:28 autarch skids: I really think travis should be doing this - the point is to make it easier for core devs to accept/reject PRs
03:28 autarch I mean, it's good to get people to run the tests themselves too, but the CI system if the protection against lazy people like me who always forget
03:29 skids Yeah, I havent had the time to stat to learn travis yet, not being a actual "developer" really.
03:29 lnrdo joined #perl6
03:30 skids But It's good to tell people what travis would be testing anyway so they can dig into what is failing.
03:32 skids I can't seem to get that warning to happen here.
03:35 autarch skids: I just pushed a commit that may have made it go away
03:35 autarch the last commit that I know produced the warning is e0083d5c31a3b28d070fbdb506eee5a30a5542ad
03:36 skids Yeah that made the difference.
03:36 pierre-vigier joined #perl6
03:38 autarch but what did I change? that's what's so confusing - I basically copied that code from Test.pm6 and that one never warns
03:38 autarch I wonder if it's some very odd compiler bug
03:39 skids It seems to happen when some other file under lib/ has been recently touched and needs to be recompiled, other than Predicates.pm
03:40 linuxuser9000 joined #perl6
03:40 skids Predicator.pm6 actually
03:45 autarch I just don't understand the warning
03:48 skids m: Mu.Str
03:48 camelia rakudo-moar 3259ba: OUTPUT«Use of uninitialized value of type Mu in string context␤Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed.  in block <unit> at /tmp/WbOEF2_20y line 1␤»
03:51 noganex_ joined #perl6
03:52 Zero_Dogg joined #perl6
03:52 Zero_Dogg joined #perl6
03:53 dalek rakudo-star-daily: e4d2e7d | coke++ | log/ (6 files):
03:53 dalek rakudo-star-daily: today (automated commit)
03:53 dalek rakudo-star-daily: review: https://github.com/coke/rakudo-star-daily/commit/e4d2e7db8d
03:56 cpage__ joined #perl6
03:59 rurban1 joined #perl6
04:00 skids m: sub f ($op) { qq{&infix:«$op»}; }
04:00 camelia rakudo-moar 3259ba: OUTPUT«Use of uninitialized value of type Mu in string context␤Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed.  in code  at /tmp/WdRUE5CITk line 1␤»
04:00 skids golfed so far.
04:00 skids only happens on precomp.
04:00 skids erm, when precomping
04:01 autarch yeah, that's just really odd, unless & is interpolated somehow?
04:01 autarch ah, maybe that's the issue?
04:01 autarch yeah, I think it is
04:01 autarch m: say qq{&infix<==>}
04:01 camelia rakudo-moar 3259ba: OUTPUT«5===SORRY!5=== Error while compiling /tmp/OMUWEf_M2p␤Undeclared routine:␤    infix used at line 1. Did you mean 'indir', 'index'?␤␤»
04:01 autarch m: say qq{\&infix<==>}
04:01 camelia rakudo-moar 3259ba: OUTPUT«&infix<==>␤»
04:02 skids missing colon
04:02 autarch m: say qq{&infix:<==>}
04:02 camelia rakudo-moar 3259ba: OUTPUT«&infix:<==>␤»
04:02 autarch hmm, no clue then
04:02 autarch m: say qq{\&infix:<==>}
04:02 camelia rakudo-moar 3259ba: OUTPUT«&infix:<==>␤»
04:03 autarch m: sub foo { 42 }; say "&foo"
04:03 camelia rakudo-moar 3259ba: OUTPUT«&foo␤»
04:03 autarch m: sub foo { 42 }; say "&foo()"
04:03 camelia rakudo-moar 3259ba: OUTPUT«42␤»
04:03 autarch yeah, definitely interpolated
04:03 skids m: sub f ($op) { qq{&infix:($op)}; }; f(">").perl.say
04:03 camelia rakudo-moar 3259ba: OUTPUT«"\&infix:(>)"␤»
04:03 skids m: sub f ($op) { qq{&infix:«$op»}; }; f(">").perl.say
04:03 camelia rakudo-moar 3259ba: OUTPUT«Use of uninitialized value of type Mu in string context␤Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed.  in code  at /tmp/TzD4Y9bjWs line 1␤"\&infix:«>»"␤»
04:04 skids m: sub f ($op) { qq{&infix:<$op>}; }; f(">").perl.say
04:04 camelia rakudo-moar 3259ba: OUTPUT«"\&infix:<>>"␤»
04:08 autarch m: say &infix:<>>.perl
04:08 camelia rakudo-moar 3259ba: OUTPUT«Use of Nil in string context  in any canonicalize_pair at src/Perl6/World.nqp line 4039␤Use of Nil in string context  in any canonicalize_pair at src/Perl6/World.nqp line 4045␤5===SORRY!5===␤Undeclared routine:␤    infix:<> used at line 1. Did …»
04:08 autarch you need to use «>»
04:08 rurban joined #perl6
04:13 rurban joined #perl6
04:21 TimToady infix references evaluate the name as a constant at compile time, so you can't parameterize it like that
04:22 skids Right but why is it interpolated?
04:22 skids (the actual code this was golfed from used EVAL on it after makin the string)
04:23 average hey kids, did you eat your vegetables today ?
04:26 Herby_ o/
04:28 average \o
04:28 Herby_ \o/
04:29 pierre-vigier joined #perl6
04:29 skids joined #perl6
04:30 skids m: "&abs(1)".perl.say; # it's hitting the "looks like a &-qualified function call"
04:30 camelia rakudo-moar 3259ba: OUTPUT«"1"␤»
04:30 skids ...but it isn't
04:30 lnrdo joined #perl6
04:36 autarch skids: I think it's interpolated because you can do this ...
04:36 autarch m: sub foo { 42 }; say "&foo()"
04:36 camelia rakudo-moar 3259ba: OUTPUT«42␤»
04:37 skids Right that's what I eant with the "&abs(1)" line.
04:37 skids I think (?) its a bug
04:37 autarch no idea
04:37 autarch m: sub foo { 42 }; say "foo()"
04:37 camelia rakudo-moar 3259ba: OUTPUT«foo()␤»
04:37 autarch it seems like it might be intentional, since it's not that likely to be typed by accident
04:38 skids It's intentional that "&foo()" works but probably not that "&infix:«" without a following () tries to do the same thing
04:39 skids m: "&infix:<+>(1,2)".say
04:39 camelia rakudo-moar 3259ba: OUTPUT«3␤»
04:39 skids m: "&infix:«+»(1,2)".say
04:39 camelia rakudo-moar 3259ba: OUTPUT«3␤»
04:39 skids m: "&infix:«+»".say
04:39 camelia rakudo-moar 3259ba: OUTPUT«&infix:«+»␤»
04:40 autarch skids: http://design.perl6.org/S02.html#Sub_calls
04:40 autarch yeah, that lack of parens means it shouldn't interpolate according to that synopsis
04:40 * skids files a rakudobug
04:52 rurban1 joined #perl6
04:53 skids RT#127284
04:54 average m: say "Eat your veggies kids, very important"
04:54 camelia rakudo-moar 3259ba: OUTPUT«Eat your veggies kids, very important␤»
04:56 rurban joined #perl6
04:58 autarch skids++
04:59 revhippie left #perl6
05:03 rurban1 joined #perl6
05:06 jme` joined #perl6
05:07 rurban joined #perl6
05:11 cpage_ joined #perl6
05:30 raiph joined #perl6
05:48 zmisc joined #perl6
05:54 Cabanossi joined #perl6
05:55 sno joined #perl6
05:57 aenaxi joined #perl6
05:59 xpen joined #perl6
05:59 jme` joined #perl6
06:01 pat_js joined #perl6
06:04 nadim joined #perl6
06:22 AlexDaniel I have to admit that this one is pretty clever: http://tinyurl.com/juynybx
06:23 AlexDaniel though I'm not sure if it is still a butterfly
06:28 Psyche^ joined #perl6
06:30 pierre-vigier joined #perl6
06:33 nadim joined #perl6
06:40 _nadim joined #perl6
06:53 dalek ecosystem: eaedef1 | azawawi++ | META.list:
06:53 dalek ecosystem: Add OpenCV to ecosystem
06:53 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/eaedef1b42
06:55 pierre-vigier joined #perl6
07:08 rurban joined #perl6
07:10 CIAvash joined #perl6
07:13 pierre-vigier joined #perl6
07:21 linuxuser9000 joined #perl6
07:22 st_iron joined #perl6
07:22 st_iron good morning
07:55 _nadim joined #perl6
08:23 azawawi joined #perl6
08:24 pierre-vigier joined #perl6
08:26 darutoko joined #perl6
08:26 azawawi hi
08:26 azawawi how does one force panda install XYZ ? --force does not seem to do it
08:34 azawawi nevermind, 'zef install XYZ' works perfectly and skips installed modules :)
08:41 CIAvash joined #perl6
08:46 rurban1 joined #perl6
08:48 firstdayonthejob joined #perl6
08:53 rurban joined #perl6
08:57 RabidGravy joined #perl6
08:58 rurban joined #perl6
09:06 pierre-vigier joined #perl6
09:09 Actualeyes joined #perl6
09:09 Zero_Dogg Is there any way to have run wait until the command exits, like system() did in perl5?
09:13 rindolf joined #perl6
09:14 nine Zero_Dogg: which command?
09:15 Zero_Dogg nine: whatever is being executed with run()
09:15 azawawi Zero_Dogg: http://design.perl6.org/S29.html#shell ?
09:16 nine Unless you use any options run() does wait for the command to exit
09:17 Zero_Dogg ah, ok, the docs (http://doc.perl6.org/type/IO#sub_run) was not clear on that, and Proc was described as «running process», so I assumed it referred to the process still running
09:17 _Gustaf_ joined #perl6
09:20 domidumont joined #perl6
09:22 azawawi Zero_Dogg: Proc::Async is the one that does not run if i remember correctly
09:22 RabidGravy Proc::Async runs things and returns before they complete, straight Proc (i.e run() ) doesn't
09:22 azawawi Zero_Dogg: i.e. async
09:22 Zero_Dogg thanks
09:22 RabidGravy :)
09:22 azawawi RabidGravy: :)
09:26 domidumont joined #perl6
09:41 SCHAAP137 joined #perl6
09:49 pierre-vigier joined #perl6
09:52 pmurias joined #perl6
09:52 azawawi retupmoca: ping
10:01 [Tux] csv-ip5xs            50000    17.653    12.150
10:01 [Tux] test                 50000    22.528    21.830
10:01 [Tux] test-t               50000    12.284    11.400
10:01 [Tux] csv-parser           50000    50.566    -0.131
10:05 rurban1 joined #perl6
10:09 rurban joined #perl6
10:13 pierre-vigier joined #perl6
10:18 timotimo o/
10:23 azawawi timotimo: hi there
10:24 azawawi http://modules.perl6.org/#q=Opencv   # is finally working :)
10:24 azawawi https://github.com/azawawi/perl6-opencv/blob/master/examples/01-hello-world.p6   # hello world
10:25 timotimo neat  :)
10:27 azawawi now it is time to do OO wrappers :)
10:27 azawawi and more API wrapped
10:27 timotimo bubble wrap!
10:27 azawawi https://github.com/abidrahmank/OpenCV2-Python-Tutorials/blob/master/source/py_tutorials/py_core/py_basic_ops/py_basic_ops.rst
10:28 azawawi timotimo: any progress on your ipython p6 kernel?
10:28 RabidGravy cool, azawawi++
10:29 timotimo no :(
10:29 timotimo i haven't even started looking at arnsholts work in that repo much :(
10:30 kjs_ joined #perl6
10:33 azawawi timotimo: https://metacpan.org/release/Devel-IPerl   # Perl 5 ipython kernel
10:37 lucs In Synopsis 26 mentions 「=head86 A "Missed it by I<that> much!" heading
10:37 lucs
10:37 lucs And it makes me smile :)
10:38 DrForr s/head/agent/
10:38 lucs Yeah, I grew up with that :)
10:39 timotimo i don't know what that means :<
10:40 lucs Old running gag in an old TV show: https://youtu.be/oPwrodxghrw
10:40 DrForr /Get Smart!/ ref.
10:41 timotimo ah
10:41 timotimo i saw the movie they put out recently-ish
10:41 lucs He was Agent 86.
10:42 timotimo it was amazing
10:43 masak good antenoon, #perl6
10:43 azawawi do we have something like python's  "import something as st" ?
10:43 azawawi masak: hi
10:44 RabidGravy marning masak
10:45 RabidGravy azawawi, you could do it with an EXPORT sub
10:45 azawawi RabidGravy: do you have an example?
10:46 FROGGS joined #perl6
10:47 RabidGravy not in my code, but basically the EXPORT sub returns a Map with symbol => thing pairs
10:48 timotimo um, i don't think that's what he's asking for?
10:48 timotimo isn't what he wants to have something used and installed under a different name than it itself wants?
10:48 RabidGravy well, it can do that
10:48 RabidGravy it doesn't have to be just subroutine, it can be types too
10:49 timotimo we're not going to go around telling people "you have to write an EXPORT subroutine so that others can use your module nicely"
10:51 nine S11 speculates about more possibilities, but I don't think we're even close to that.
10:53 RabidGravy well no, but it was a short-cut for "no there is no built in mechanism as yet, but you could emulate it with an EXPORT" :) I'm sure azawawi's clever enough to read between the lines ;-)
10:55 RabidGravy anyway, off to the seasidde before the impending snowpocalypse
10:55 timotimo i didn't realize we don't do that at all yet :|
11:09 azawawi im clever enough? :)
11:09 * azawawi eats tea + cake :)
11:10 azawawi i was asking for a nice way to namespace (prefix) a module exports
11:10 DrForr BUT THE CAKE... never mind.
11:13 abaugher joined #perl6
11:15 spider-mario joined #perl6
11:16 pierre-vigier joined #perl6
11:25 rurban1 joined #perl6
11:28 rurban joined #perl6
11:31 yoleaux joined #perl6
11:31 dpk joined #perl6
11:32 rurban1 joined #perl6
11:38 psy joined #perl6
11:38 azawawi https://github.com/azawawi/perl6-opencv/blob/master/examples/01-hello-world.p6   # a bit of OpenCV::Mat Perl 6 OO
11:39 leont joined #perl6
11:40 kjs_ joined #perl6
11:42 zhmylove masak: Hi! my $c = 1; for @*ARGS {qqx"curl -o $c++.fmt('%02d').htm $_.subst("'","\\'",:g)"}  # tested on the recently built rakudo 2015.12, so actually I _can_ do c++ without { }
11:43 pierre-vigier joined #perl6
11:46 zhmylove azawawi: great! What is $img.clone ?
11:46 azawawi zhmylove: get a new copy of the image matrix so you can manipulate it
11:47 azawawi zhmylove: e.g. you want to make it grayscale and then put them side by side
11:48 zhmylove azawawi: actually I can't get the difference with `my OpenCV::Mat $denoised_img = $img;`... Could you please describe or just give a link where I can read about it?
11:50 azawawi zhmylove: they point to the same C++ object reference. It is an OpenCV library thing.
11:50 azawawi let me simplify the example
11:51 azawawi zhmylove: http://docs.opencv.org/2.4.11/modules/core/doc/basic_structures.html?highlight=clone#Mat Mat::clone() const
11:53 zhmylove azawawi: got it! Thank you a lot! Actually `method clone() returns OpenCV::Mat ` helped too.
12:02 Guest76102 joined #perl6
12:03 azawawi zhmylove: np, added an example of how to load in grayscale if you're interested
12:04 * azawawi starts working on wrapping drawing api
12:04 Guest76102 left #perl6
12:08 FROGGS_ joined #perl6
12:10 _Vi joined #perl6
12:12 perl6newbee joined #perl6
12:19 rurban joined #perl6
12:23 rurban1 joined #perl6
12:25 firstdayonthejob joined #perl6
12:27 Skarsnik joined #perl6
12:30 rurban joined #perl6
12:31 vendethiel- joined #perl6
12:35 rurban joined #perl6
12:40 M_ joined #perl6
12:42 rurban1 joined #perl6
12:42 rurban1 left #perl6
12:52 lucs How do I do the equivalent of 「$k ~~ %h」 to check for a value instead of a key?
12:56 telex joined #perl6
13:05 gfldex joined #perl6
13:05 rindolf joined #perl6
13:13 kid51 joined #perl6
13:16 geekosaur match against %h.values?
13:16 firstdayonthejob joined #perl6
13:17 lucs Fails, %h.values is a Seq, not sure how to handle that.
13:27 brrt joined #perl6
13:30 rindolf joined #perl6
13:34 timotimo it'll have to be something like "defined %h.values.index($needle)" or so
13:35 timotimo alternatively, $needle ~~ any(%h.values)
13:35 kid51 At http://rakudo.org/how-to-get-rakudo/, I read:  "NOTE: the Rakudo Star with 6.c Christmas Perl 6 release is not yet available. Check back soon or try one of the older versions."
13:35 kid51 When will "soon" happen?
13:36 lucs timotimo: Thanks.
13:36 kid51 I ask because I'm about to start a Perl6 study group in NYC and, for the people likely to participate in this group, I've been advised that Rakudo Star will be a better bet.
13:36 DrForr A study group? Nice.
13:37 brrt .seen konobi
13:37 yoleaux I saw konobi 4 Jan 2016 17:55Z in #perl6: <konobi> pmurias: just how things on the JS backend are going... has beena while since i had a chance to look
13:37 brrt darn, that's some time ago
13:37 timotimo kid51: sorry about that. FROGGS_ has been putting in time to bring the latest rakudo star release to fruition
13:39 FROGGS__ joined #perl6
13:39 brrt we could say we're a bit understaffed in the polishing-and-releasing department
13:40 timotimo mhm
13:42 kid51_ joined #perl6
13:43 SCHAAP137 joined #perl6
13:44 FROGGS_ joined #perl6
13:47 pierre-vigier joined #perl6
13:49 lucasb joined #perl6
13:52 lucasb sorry, I'm one week without reading the logs. just wanted to know if a release will happen today, or if you decided to delay it?
13:54 sena_kun joined #perl6
13:54 timotimo hm. looks like [Coke] signed up for this month's release
13:58 sena_kun Hi, #perl6.
13:59 timotimo hello sena_kun
14:03 espadrine joined #perl6
14:05 sena_kun I was thinking this morning about bindings to C libs. In some way we just need to read bunch of signatures(and structures/variables) and convert it into perl6 expressions. Maybe it can be done my perl6 program? Something like c2hs library in haskell, which can generate bindings automatically. I searched a bit and found nothing like this. Is this a bad idea or just nobody has enough time to try to do it?
14:06 Skarsnik huggable not here :(
14:06 Skarsnik Did you have a look at https://github.com/Skarsnik/gptrixie ?
14:06 DrForr sena_kun: You need a full C parser and c preprocessor to do it that way.
14:07 DrForr Not saying it's a bad idea, I've thought about it myself.
14:08 timotimo DrForr: did you have a look at gptrixie?
14:08 DrForr Didn't know of its existence.
14:08 brrt senia_kun; if you have a compiler ready, you can do something like gcc -E to do macro evaluation
14:08 kjs_ joined #perl6
14:29 rurban joined #perl6
14:30 ely-se joined #perl6
14:34 sena_kun joined #perl6
14:38 RabidGravy joined #perl6
14:38 _Vi joined #perl6
14:39 sena_kun DrForr, also, to just do bindings we don't need a full C parser. We need to parse only .h files, which is not so complex as .c, aren't we?
14:41 mspo hat if you used nm and objdump instead?
14:41 DrForr Try 'cpp -E /usr/include/stdio.h' and have a look at the output.
14:42 sena_kun DrForr, ah, sorry, you're right.
14:42 DrForr Not trying to dissuade, it's just quite a bit of work.
14:42 RabidGravy well for the most part, but there are libraries that are entirely composed of .h files (hey i2c_dev I'm looking at you) so it is entirely possibly that you need to parse C completely
14:43 RabidGravy Skarsnik's gptrixie makes a decent fist of making the binding code from a .h fie though
14:44 RabidGravy you have seen the https://github.com/Skarsnik/gptrixie ?
14:45 sena_kun RabidGravy, oh, I was sure it exist. Thank you. Skarsnik posted it already, but I missed the message.
14:46 lokien_ joined #perl6
14:47 RabidGravy I stuck it at the PortMidi.h and it made a reasonable go at it for a weird interface, would need some tweeking but a good start
14:49 brrt joined #perl6
14:49 _nadim joined #perl6
14:56 pierre-vigier joined #perl6
14:59 Skarsnik Feel free to fill issue on what is wrong x)
15:00 sena_kun https://gist.github.com/Altai-man/ea83a55ffa51ec88089a - here is a gist, which can produce "Unhandled kind 1" error. If you use native perl6 Bool code will be correct. It will be good to replace this message with something more readable.
15:01 FROGGS joined #perl6
15:09 dalek doc: f614b01 | (David Brunton)++ | doc/Language/operators.pod:
15:09 dalek doc: Cross meta operator
15:09 dalek doc:
15:09 dalek doc: Some of the meta operator documentation is repeated in the infix operator sections. This makes the cross section match the other meta operators, though.
15:09 dalek doc: review: https://github.com/perl6/doc/commit/f614b01e0b
15:09 dalek doc: ef9708a | sylvarant++ | doc/Language/operators.pod:
15:09 dalek doc: Merge pull request #356 from dbrunton/patch-3
15:09 dalek doc:
15:09 dalek doc: Cross meta operator
15:09 dalek doc: review: https://github.com/perl6/doc/commit/ef9708a3ad
15:14 Skarsnik sena_kun, well you are not supposed to use bool outside a native x)
15:15 Skarsnik but I think it's like an Int for perl 6
15:15 Skarsnik m: use NativeCall; say bool.WHAT; say bool.var.WHAT
15:15 camelia rakudo-moar 3259ba: OUTPUT«(bool)␤Method 'var' not found for invocant of class 'NativeCall::Types::bool'␤  in block <unit> at /tmp/oJ74kfCAEf line 1␤␤»
15:15 Skarsnik m: use NativeCall; say bool.WHAT; say bool.VAR.WHAT
15:15 camelia rakudo-moar 3259ba: OUTPUT«(bool)␤(bool)␤»
15:15 Skarsnik m: use NativeCall; say bool.repr
15:15 camelia rakudo-moar 3259ba: OUTPUT«Method 'repr' not found for invocant of class 'NativeCall::Types::bool'␤  in block <unit> at /tmp/adYqFESKhp line 1␤␤»
15:15 Skarsnik m: use NativeCall; say bool.REPR
15:15 camelia rakudo-moar 3259ba: OUTPUT«P6int␤»
15:18 khw joined #perl6
15:19 sena_kun Skarsnik, I know, but 1)emacs perl6-mode didn't highlight Bool properly(fixed); 2)someone can just do a typo and we need pretty error messages anyway. If it's NativeCall "error", I can try to fix it and send a PR. But greping zavolaj with "unhandled" or "kind" gives me nothing.
15:20 Skarsnik zavolaj is "dead"
15:20 Skarsnik everything is in rakudo
15:20 masak is that clearly signaled in the zavolaj github repo?
15:20 Skarsnik and it's probably not possible to catch the missuse of those type :(
15:21 Skarsnik I know I should not have called it bool xD
15:21 Skarsnik but like c_bool or something
15:23 jme` joined #perl6
15:23 ely-se If I want to export a multi sub, do I have to add is export to each definition or only to the proto?
15:24 DarthGandalf joined #perl6
15:24 ely-se apparently only on the proto
15:24 RabidGravy I would expect that the proto would be anough
15:32 xpen joined #perl6
15:33 average left #perl6
15:36 ely-se m: [+] (1,)
15:36 camelia rakudo-moar 3259ba: ( no output )
15:36 ely-se m: say [+] ("1",)
15:36 camelia rakudo-moar 3259ba: OUTPUT«1␤»
15:37 ely-se m: ([+] ("1",)).perl.say
15:37 camelia rakudo-moar 3259ba: OUTPUT«1␤»
15:37 ely-se nice, it converts
15:43 zakharyas joined #perl6
15:44 _Vi joined #perl6
15:54 b2gills m: say 0.6931471805599453 == log 2; say log 2; say log(2) == ~log 2
15:54 camelia rakudo-moar 3259ba: OUTPUT«True␤0.693147180559945␤False␤»
15:55 lucasb one digit of difference?
15:56 b2gills The same bug showed up in Perl 5: https://rt.perl.org/Public/Bug/Display.html?id=127182
15:56 masak interesting.
15:57 masak I mean, not surprises me with floating-point rounding errors, but I don't think I'd've been able to predict that one.
15:57 masak not much*
15:58 b2gills I was reading the P5P mailing list summary http://blogs.perl.org/users/sawyer_x/2016/01/perl-5-porters-mailing-list-summary-january-4th-10th.html
15:58 masak nice.
15:58 masak sawyer_x++ b2gills++
15:58 ely-se Is there a function to get the full path to a program given its name, looking up in the PATH environment variable?
16:00 lucasb ely-se: I'm not aware of any builtin that does this. so you'll probably have to traverse the dirs in PATH yourself
16:00 domm__ joined #perl6
16:00 ely-se ok!
16:01 RabidGravy I think File::Which does that
16:01 b2gills It was already tested with Rakudo if you read the summary. (I don't know if a bug was reported yet) The fix doesn't seem to work though
16:01 b2gills m: printf "%.18g\n", log 2
16:01 camelia rakudo-moar 3259ba: OUTPUT«0.693147180559945␤»
16:01 ely-se brb
16:01 domm__ joined #perl6
16:03 domm_plix joined #perl6
16:09 pierre-vigier joined #perl6
16:10 azawawi RabidGravy: im back :)
16:10 RabidGravy RARR!
16:11 Skarsnik azawawi, go finish pg array in dbiish support!
16:11 azawawi RabidGravy: tested the ethernet shield one one of the 2 Arduino unos i got yesterday :)
16:11 azawawi RabidGravy: the pins were twisted so i had to fix them lol
16:11 RabidGravy oopsie
16:13 Skarsnik I use my arduino to capture my snes controller input  x)
16:13 azawawi RabidGravy: they didnt have the camera shield/addon though... i wanted to use it to transmit images via a cheap 433 MHz transmitter/receiver back to my PC for Serial to OpenCV/Perl6 program :)
16:15 lsm joined #perl6
16:15 azawawi RabidGravy: the local electronics store did not have also an RPi2 box too...
16:15 azawawi RabidGravy: my luck :(
16:16 RabidGravy :-\ you can get an ov7670 based camera thing from nearly anywhere for a few quid
16:17 ely-se joined #perl6
16:17 azawawi anywhere but here... lol
16:19 b2gills m: say $_ = log(2).base(10,17); say $_ == log 2
16:19 camelia rakudo-moar 3259ba: OUTPUT«0.69314718055994531␤True␤»
16:25 azawawi https://github.com/azawawi/perl6-opencv/blob/master/examples/01-hello-world.p6   # Loading image, grayscale, denoise and writing image and moving image preview windows :)
16:27 _Vi joined #perl6
16:33 ely-se Why does dir pass Strs to test and not IO::Paths?
16:34 balazs joined #perl6
16:35 Skarsnik I think it's because you can Str.IO
16:37 TimToady joined #perl6
16:40 pmurias joined #perl6
16:41 dalek nqp: 481d81a | (Pawel Murias)++ | src/vm/js/nqp-runtime/ (3 files):
16:41 dalek nqp: [js] Use the same exception class for both types of exceptions thrown.
16:41 dalek nqp: review: https://github.com/perl6/nqp/commit/481d81adbc
16:41 dalek nqp: e71a1bd | (Pawel Murias)++ | src/vm/js/nqp-runtime/ (2 files):
16:41 dalek nqp: [js] nqp::{push,pop,unshift,shift,splice} throw apropriate exceptions on fixed arrays.
16:41 dalek nqp: review: https://github.com/perl6/nqp/commit/e71a1bd5a4
16:51 ely-se lucasb: I think this will do: https://gist.github.com/rightfold/0869cee15c3735b43417
16:52 skids joined #perl6
16:54 lucasb ely-se: pretty cool :) just repeating that RabidGravy also mentioned File::Which.
16:54 ely-se oh hmm didn't notice that
16:59 scz joined #perl6
17:06 DarthGandalf joined #perl6
17:10 _nadim joined #perl6
17:12 gfldex m: class C {}; class W {}; sub outer(::T $c){ sub (T){ &?ROUTINE.signature.say } }; my $inner = outer(C); $inner(C.new); $inner(W.new);
17:12 camelia rakudo-moar 3259ba: OUTPUT«(T)␤Type check failed in binding <anon>; expected C but got W␤  in sub  at /tmp/RkOzlgeovb line 1␤  in block <unit> at /tmp/RkOzlgeovb line 1␤␤»
17:12 gfldex the type check is correct but stringy on the type capture in the inner function does not resolve the type
17:13 sjoshi joined #perl6
17:14 gfldex m: class C {}; class W {}; sub outer(::T $c){ sub (T){ &?ROUTINE.signature.params[0].say } }; my $inner = outer(C); $inner(C.new);
17:14 camelia rakudo-moar 3259ba: OUTPUT«T $␤»
17:15 gfldex m: class C {}; class W {}; sub outer(::T $c){ sub (T){ dd &?ROUTINE.signature.params[0], T === C } }; my $inner = outer(C); $inner(C.new);
17:15 camelia rakudo-moar 3259ba: OUTPUT«T $␤Bool::True␤»
17:16 gfldex m: class C {}; class W {}; sub outer(::T $c){ sub (T){ dd &?ROUTINE.signature.params[0], T === C, T.new } }; my $inner = outer(C); $inner(C.new);
17:16 camelia rakudo-moar 3259ba: OUTPUT«T $␤Bool::True␤C.new␤»
17:16 * gfldex grabs his rakudobug form
17:18 dalek nqp: d2f4787 | (Pawel Murias)++ | src/vm/js/nqp-runtime/ (2 files):
17:18 dalek nqp: [js] Type checking on fixed arrays.
17:18 dalek nqp: review: https://github.com/perl6/nqp/commit/d2f4787f65
17:21 cognominal perl6 verbose for one liner. Can I do better ?
17:21 cognominal $ a h
17:21 cognominal alias h='history'
17:21 cognominal $ a 6e
17:21 cognominal alias 6e='perl6 -MMONKEY-SEE-NO-EVAL -e'
17:21 cognominal $ h | 6e 'my $rx = EVAL "rx/@*ARGS[0]/";  $*IN.lines.grep($rx).tail(5).eager.join("\n").say' git
17:27 nine cognominal: just lines.grep is enough. The lines() sub uses $*IN by default
17:28 nine Also the .eager seems superfluous as the join needs to read all lines anyway
17:32 cognominal nope, lines uses $*IN if no arguments
17:32 cognominal thx anyway
17:34 cognominal I mean if @*ARGS == 0
17:36 gfldex do i have access to named arguments inside EXPORT ?
17:48 azawawi m: sub c( &a (Int) ) {}; sub b($) {};  c( &b )
17:48 camelia rakudo-moar 3259ba: OUTPUT«Too few positionals passed; expected 1 argument but got 0 in sub-signature of parameter &a␤  in sub c at /tmp/1w2aE5v0OB line 1␤  in block <unit> at /tmp/1w2aE5v0OB line 1␤␤»
17:49 azawawi what's wrong with the above code?
17:50 xinming_ joined #perl6
17:50 timotimo i think it has to be &a:(Int)
17:50 timotimo otherwise it tries to unpack &a into one positional argument that has to be an Int
17:52 azawawi so what's the correct syntax for doing it?
17:52 azawawi im trying to use callbacks via nativecall for value sliders
17:52 gfldex m: sub c( &a:(Int) ) {}; sub b($) {};  c( &b )
17:52 camelia rakudo-moar 3259ba: OUTPUT«Constraint type check failed for parameter '&a'␤  in sub c at /tmp/RN1HIQHyKL line 1␤  in block <unit> at /tmp/RN1HIQHyKL line 1␤␤»
17:53 gfldex m: sub c( &a:(Int) ) {}; sub b(Int $) {};  c( &b )
17:53 camelia rakudo-moar 3259ba: ( no output )
17:55 _Vi joined #perl6
17:55 azawawi gfldex: thanks
17:57 azawawi so basically the documentation here is wrong, right?
17:57 azawawi http://doc.perl6.org/language/nativecall#Function_arguments
17:57 cognominal If I don't want to go pure Perl6 I can do :
17:57 cognominal $ a t5
17:57 cognominal alias t5='tail -5'
17:57 cognominal $ h | 6ne '.say if /git/' | t5
17:58 cognominal with
17:58 cognominal $ a 6ne
17:58 cognominal alias 6ne='perl6 -MMONKEY-SEE-NO-EVAL -ne'
18:04 olinkl joined #perl6
18:15 yurivish joined #perl6
18:16 azawawi https://github.com/azawawi/perl6-opencv/blob/master/examples/01-hello-world.p6  # slider callbacks are now working. Enjoy :)
18:17 timotimo azawawi: i wrote the correct syntax right before i told you what's wrong :S
18:17 timotimo then i went AFK
18:17 abaugher joined #perl6
18:18 azawawi timotimo: fixed :)
18:18 ely-se can a promise return a promise?
18:18 timotimo sure
18:19 ely-se nice
18:22 ely-se After the ECMAScript 6 Promise fiasco you can never be sure
18:22 azawawi http://pasteboard.co/QggG9WB.png    # OpenCV fun with Perl 6 :)
18:22 timotimo i don't know anything about that, ely-se
18:23 ely-se timotimo: in ECMAScript 6, the then method automatically flattens. Thus you can't write any generic code that uses promises
18:23 ely-se basically then checks if the callback returns a Promise, and if it does, recurs
18:24 timotimo oh
18:30 RabidGravy m: (await Promise.in(1).then({ Promise.in(1))).then({say "baa"});
18:30 camelia rakudo-moar 3259ba: OUTPUT«5===SORRY!5=== Error while compiling /tmp/5Z2kpkRBdF␤Missing block␤at /tmp/5Z2kpkRBdF:1␤------> 3await Promise.in(1).then({ Promise.in(1)7⏏5)).then({say "baa"});␤    expecting any of:␤        statement end␤        statement modifier…»
18:30 RabidGravy m: (await Promise.in(1).then({ Promise.in(1)})).then({say "baa"});
18:30 camelia rakudo-moar 3259ba: ( no output )
18:30 pnu should panda read the extra_statefiles from _all_ Installable repos in the repo-chain? -> https://github.com/tadzik/panda/pull/289
18:30 RabidGravy m: await (await Promise.in(1).then({ Promise.in(1)})).then({say "baa"});
18:30 camelia rakudo-moar 3259ba: OUTPUT«baa␤»
18:41 abaugher joined #perl6
18:47 MadcapJake Translated a presentation on first-class commands into Perl 6 yesterday: https://github.com/MadcapJake/Command6
18:48 lostinfog joined #perl6
18:51 grondilu ~/perl6/rakudo $ git pull
18:51 grondilu Already up-to-date.
18:51 grondilu ^what's going on??
18:53 Peter__R joined #perl6
18:54 MadcapJake grondilu: git status; git branch
18:55 TimToady or just don't pull so often :)
18:55 grondilu :P
18:57 TimToady nobody's pushed to nom in the last 24 hours
18:57 TimToady must be some kind of a record :)
19:00 RabidGravy must be finished then
19:00 _nadim joined #perl6
19:11 kjs_ joined #perl6
19:13 kjs_ joined #perl6
19:15 kjs_ joined #perl6
19:16 MadcapJake is there a module for parsing Perl 6
19:16 Skarsnik Perl 6 ?
19:16 MadcapJake lol
19:17 DrForr It's written in Perl 6 grammars.
19:17 MadcapJake So no module then?  I need something that I could plug into a program.
19:18 DrForr Look at the Rakudo:: modules on modules.perl.org.
19:18 MadcapJake sweet
19:20 vendethiel joined #perl6
19:20 MadcapJake I'm gonna try and write a command line tool for generating autocompletes (also will have a linter but I think I'll write my own parser for that)
19:21 yurivish_ joined #perl6
19:22 MadcapJake I realized that writing a linter directly in JavaScript (for my linter-perl6 package) was not very modular, so I'm gonna write it in perl6 and then create easily parsed output for various linters/editors
19:23 RabidGravy MadcapJake, the perl6 parser that it uses to parse the programs is available at runtime
19:23 RabidGravy this may however be overkill
19:24 MadcapJake well the problem is, that parser is setup to run the program.  I think I'll need to create a custom parser for both features of this tool because I need to make sure it doesn't stop when there are errors, it just skips over whatever it doesn't understand
19:26 RabidGravy well the actions are setup to run the program, you can just supply your own actions
19:28 MadcapJake i could try that for sure but really i don't need to know everything. The autocomplete parser could just look for my/has/our/class/sub/[sub]method declarations and add the name to an array.
19:28 MadcapJake The linter parser I think I would actually have a pluggable grammar that you select which rules you want to check for in the META.info file.  Something along the lines of eslint http://eslint.org/docs/user-guide/configuring.html but perhaps with some saner defaults
19:34 pmurias MadcapJake: why skip errors in a linter?
19:34 MadcapJake pmurias: what do you mean?
19:35 pmurias MadcapJake: "I'll need to create a custom parser..."
19:35 MadcapJake because `perl6 -c` stops at the first error, I want a linter to capture everything it can find in a file, not just the first error in the first stage that it hits.
19:36 gfldex can i overload EXPORTALL?
19:37 pmurias MadcapJake: keep in mind that it's literally imposible to parse Perl 6 with anything that's not Perl 6
19:38 MadcapJake pmurias: well I'm not trying to parse an executable program, I'm just looking for errors.  So each rule will be setup to find a given kind of error.
19:38 MadcapJake but yes this program will be written in perl6 :)
19:39 pmurias MadcapJake: what sort of error do you want to find?
19:39 pmurias * errors
19:39 cognominal pmurias, MadcapJake is the great author of atom p6fe syntax hiliter and knows very well the limit of adhoc perl6 parsing
19:40 cognominal MadcapJake,  what is needed is an alternative dumper for --target=parse
19:41 cognominal also the current dumper does not descend into EXPRs
19:41 MadcapJake that'd be one way to do it, but i still feel like you're limited by the fact that the parser is designed for creating an executable program.  whereas an error parser could just have each rule be specifically designed for a given error.
19:41 cognominal apparently need a rewrite of the EXPR parser to do that
19:42 cognominal MadcapJake++ for P6FE
19:42 MadcapJake pmurias: Good question! Anything that could be discovered via parsing the text of a file.
19:42 MadcapJake cognominal: thanks! Glad you like it!
19:44 _nadim joined #perl6
19:45 cognominal MadcapJake, also a good higlighter should be dynamic so that when cliking a operator it shows the relative precedences by higlighting the operator (say in backgournd red) and its operands (in background blue). I don't know any that does that.
19:45 vendethiel joined #perl6
19:46 MadcapJake cognominal: yeah that would be really awesome! Actually I think that could be done in atom.  A plugin could get the text of the file, the cursor location, and then just create some rules for what the surrounding text is, then apply some CSS!
19:46 cognominal Really need a really iterate editing environment. The state of the art stopped at smalltalk which did not evolve  :(
19:47 cognominal Anyway, in the meantime P6FE is good stopgap
19:47 jnthn P6FE++
19:47 pmurias for a lot of perlers the state of the art stopped at vim :/
19:48 AndyDee joined #perl6
19:48 MadcapJake I hope to add other cool packages to Atom, but I want to do the brunt of the computation in perl6 and then just have the atom packages be wrappers around shell commands
19:48 cognominal MadcapJake, when learning a new language, very often someone is stalled because he can't visually parse the code. Dynamic highliting would fix that.
19:48 cognominal P6FE++ indeed
19:49 ChoHag joined #perl6
19:49 cognominal I am happy to see that jhntn is moving to atom
19:50 jnthn Yeah, I need to get working (or patch) a multi-line editing module though...
19:51 jnthn The one I tried didn't seem to work, and I kinda can't live without it.
19:51 MadcapJake multi-line editing module?
19:51 ely-se joined #perl6
19:52 MadcapJake I use ctrl-click all the time to create multiple cursors. it even works with ctrl-double-click
19:53 cognominal MadcapJake,  is there any way in atom to  compile nqp/rakudo and click on the error message to open the relevant file?. Especially difficult in nqp because the compilation units are concatenated files.
19:54 jnthn MadcapJake: ooh
19:54 ely-se > ‘rule’ causes whitespace in the regex to match literal whitespace in the matched text
19:54 ely-se Is this still true?
19:54 jnthn MadcapJake: So is there a keyboard shortcut for that?
19:54 ely-se I am so confused.
19:55 jnthn ely-se: Yes, inserts calls to <.ws> where there is whitespace between atoms
19:55 ely-se oh ok
19:55 ely-se does the default <.ws> match optional whitespace or required whitespace?
19:55 jnthn rule foo { bar baz } = token foo { bar <.ws> baz <.ws> } iirc
19:56 jnthn ely-se: required between alphanumeric, optional otherwise
19:56 ely-se ok, that explains
19:56 jnthn But you can override ws to do whatever you want
19:56 MadcapJake you could compile via https://atombuild.github.io - it supports GNU Make.  I've never used it with make so I don't know if it matches error paths to files or not, but I know that atom-build *does* support that
19:56 MadcapJake cognominal: ^
19:57 jnthn MadcapJake: The one that's wired into my fingers is Alt + Shift + Up/Down arrow keys, which is what I'd really love to have work
19:57 MadcapJake jnthn: those should work in atom
19:58 MadcapJake jnthn: it works on my end
19:58 cognominal MadCapJake, multiple cursors are great in atom. I have yet to understand all the subtleties, though
19:58 Skarsnik multi cursors? x)
19:58 jnthn MadcapJake: Odd...it doesn't here...
19:58 jnthn MadcapJake: Version 1.2.3 fwiw
19:59 cognominal also, I use an emacs compatibility module so I can use my finger memory in atom.
19:59 cognominal thx MadcapJake, i will check it
19:59 MadcapJake jnthn: try `ctrl-shift-p` and type `add selection` and you should see two options for add above below, and there key shortcut next to it
20:00 jnthn MadcapJake: Aha, Ctrl + Alt + Up/Down
20:00 jnthn Thanks a lot! :)
20:01 MadcapJake jnthn: no prob! curious why your shortcut is different.
20:01 ely-se are there any tools for grammar debugging?
20:01 jnthn ely-se: Grammar::Tracer is one of the most useful...has a bug I should really patch, but tends to help quite a bit anyways
20:02 jnthn MadcapJake: Dunno. I'm on Windows...though Notepad++ has Alt + Shift + Up/Down...
20:02 MadcapJake jnthn: ahh, yeah i'm on linux, mine is alt-shift-up/down
20:02 * jnthn guesses he can find where to tweak this... :)
20:03 ely-se jnthn: thanks
20:03 azawawi https://github.com/azawawi/perl6-opencv/blob/master/examples/02-drawing.p6   # random rectangle fun with OpenCV/Perl6 :)
20:05 MadcapJake jnthn: i think i know why it's different for me: ctrl-alt-up/down is for linux desktop switching
20:05 cognominal jnthn++ for the not guts serie. jnthn got the guts to not gut.
20:06 jnthn MadcapJake: Ah, OK. :)
20:06 jnthn MadcapJake: Just found out how to make it what I want it to be in my custom keymap :)
20:07 azawawi http://pasteboard.co/Qn7mN5C.png  # Camelia randomness :)
20:07 jnthn So, don't even have to re-muscle \o/
20:07 yurivis__ joined #perl6
20:08 MadcapJake jnthn: nice!
20:09 kjs_ joined #perl6
20:10 domidumont joined #perl6
20:11 pierre-vigier joined #perl6
20:15 leont joined #perl6
20:16 ely-se jnthn: can you print the remaining text with the debugger?
20:19 protium joined #perl6
20:21 jnthn ely-se: um...I can't remember...if you type help or so it'll tell you all the things it knows how to do.
20:22 ely-se printing text isn't in there, hence :p
20:23 pmqs_ joined #perl6
20:24 ely-se something like {say $/.postmatch} in the regex maybe
20:25 ely-se ah, adding <ws> to the begin of TOP already helps
20:26 jnthn ely-se: Feel free to make a github issue requesting what you missed
20:26 jnthn I'd like to fix the LTM bug that folks sometimes hit in the next couple of weeks, so can probably put it what you're after also. :)
20:27 Zero_Dogg joined #perl6
20:27 Zero_Dogg joined #perl6
20:28 ely-se yay my parser finally works \o/
20:28 marmay_ joined #perl6
20:30 jnthn \o/
20:31 ely-se I forgot to implement some actions so it croaked.
20:34 kjs_ joined #perl6
20:34 bowtie joined #perl6
20:37 rurban1 joined #perl6
20:41 shmibs joined #perl6
20:45 BenGoldberg joined #perl6
20:47 azawawi Good night #perl6
20:50 rindolf azawawi: night.
20:56 revhippie joined #perl6
21:02 autarch is there any way to make "CALLER::MY::<$foo> = ..." work if $foo hasn't been declared at all yet?
21:03 autarch m: sub foo { CALLER::MY::<$foo> = 42 }; foo(); dd MY::'
21:03 camelia rakudo-moar 3259ba: OUTPUT«5===SORRY!5=== Error while compiling /tmp/uF1K5NyCrq␤Two terms in a row␤at /tmp/uF1K5NyCrq:1␤------> 3ALLER::MY::<$foo> = 42 }; foo(); dd MY::7⏏5'␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        s…»
21:03 autarch m: sub foo { CALLER::MY::<$foo> = 42 }; foo(); dd MY::
21:03 camelia rakudo-moar 3259ba: OUTPUT«Cannot modify an immutable Nil␤  in sub foo at /tmp/Z2gC93ZO2M line 1␤  in block <unit> at /tmp/Z2gC93ZO2M line 1␤␤»
21:03 autarch m: sub foo { CALLER::MY::<$foo> = 42 }; my $foo is dynamic; foo(); dd MY::
21:03 camelia rakudo-moar 3259ba: OUTPUT«PseudoStash.new(("!UNIT_MARKER" => !UNIT_MARKER,"\$!" => Nil,"\$/" => Nil,"\$=finish" => Mu,"\$=pod" => [],"\$?PACKAGE" => GLOBAL,"\$_" => Any,"\$foo" => 42,"\$¢" => Nil,"\&foo" => sub foo () { #`(Sub|54728688) ... },"::?PACKAGE" => GLOBAL,:EXPORT(EXPORT)…»
21:05 masak m: sub foo { CALLER::MY::<$foo> = 42 }; my $foo; foo(); say "alive"
21:05 camelia rakudo-moar 3259ba: OUTPUT«alive␤»
21:05 masak autarch: not sure what more beyond that you want.
21:05 autarch masak: I want to not have to declare $foo at all
21:06 jnthn Lexpads are immutable at runtime.
21:06 autarch basically, I want a way of putting some sort of marker in the caller's scope so I can later find it by looking at the packages in a trace
21:06 jnthn (A large amount of Perl 6's optimizability and error checking derives from that.)
21:06 jnthn So it'd need to be something that happens at compile time, like an import or use statement.
21:07 Ulti Skarsnik have you seen https://github.com/andydude/p6-c-parser
21:07 masak or a macro.
21:07 autarch jnthn: that makes sense
21:08 jnthn masak: I was going with things that work today
21:08 jnthn autarch: Do you need to make the thing statically or dynamically?
21:08 autarch jnthn: dynamically
21:08 autarch I'm trying to track the caller of a sub, but from elsewhere in the code
21:09 autarch but I'm probably making this harder than it needs to be and I can just capture the caller immediately and save it somewhere
21:09 jnthn Wait, maybe that wasn't clear. Do you need to mark the block, or do you need to mark a particular invocation record?
21:09 jnthn callframe(1).code does role { method marker() { True } } # may work if you can cope with marking the block itself
21:10 autarch yeah, that wouldn't work, the markers needs to go away once the called sub exitrs
21:10 ely-se is it bad to override clone?
21:11 jnthn ely-se: No, it's fine
21:11 ely-se ok :)
21:12 jnthn autarch: Yeah, then we meant the same thing by dynamic...
21:12 autarch yep
21:13 Skarsnik Ulti, yes, but it's quite useless in its actual form x) And it's probably unreasonnable to use something else that a gcc/clang output x)
21:14 Skarsnik anyway, good night here
21:18 Ulti g'night
21:22 dalek nqp: 7c7ea34 | (Pawel Murias)++ | src/vm/js/nqp-runtime/reprs.js:
21:22 dalek nqp: [js] Serialize MultiDimArray.
21:22 dalek nqp: review: https://github.com/perl6/nqp/commit/7c7ea34b46
21:22 ely-se can you assign a private property of another object of the same class?
21:25 pmurias autarch: what are you trying to accomplish?
21:25 autarch pmurias: I want to be able to find the caller of a particular sub (or subs) several layers further down the callstack
21:25 autarch and I don't know what sub is being called in advance, so the subs themselves need a way to say "my caller is the one you're looking for"
21:26 pmurias why do you need to that?
21:26 cognominal jnthn, "lexpads are immutable at run time", assuming no EVAL in inner lexical scopes?
21:26 masak cognominal: that's not an exception to the rule.
21:26 ely-se hmm, it seems temp borks when used with a hash with non-string keys
21:26 masak cognominal: the variable declarations stay within the inner scopes. EVAL has its own compile time.
21:26 autarch pmurias: in order to provide useful error messages, basically
21:27 cognominal anyway it needs  MONKEY-SEE-NO-EVAL
21:27 autarch in other words, if I call foo() which then calls 5 other things and one of those things generates an error, ideally that error says "called at line X" which is the line where foo() was called
21:27 ely-se m: my %h{Pair}; %h{a => 1} = 42; temp %h = %h.clone;
21:27 camelia rakudo-moar 3259ba: OUTPUT«Type check failed in binding key; expected Pair but got Str␤  in block <unit> at /tmp/7YVkdzDeCu line 1␤␤»
21:28 ely-se m: my %h{Pair}; %h{a => 1} = 42; temp %h{Pair} = %h.clone;
21:28 camelia rakudo-moar 3259ba: ( no output )
21:28 ely-se interesting
21:28 cognominal ok, EVAL means a new lexical scope so it can't mess with outer scopes
21:28 jnthn ely-se: Feel free to file that one
21:28 ely-se oh right, that assigns the Pair property
21:28 ely-se jnthn: ok
21:29 jnthn cognominal: Correct.
21:29 ely-se where should I report it? Rakudo?
21:29 pmurias autarch: something like Carp?
21:29 cognominal so the REPL implies more nesting at each line?
21:29 timotimo yo
21:29 timotimo yeah, that's how it's implemented right now :(
21:29 autarch pmurias: yes, but to an arbitrary depth that isn't known in advance ;)
21:30 cognominal so the REPL implies one more lexical nesting at each newline line? # reformulated
21:30 timotimo cognominal: yes
21:30 jnthn ely-se: Mail rakudobug@perl.org
21:31 robfin joined #perl6
21:33 ely-se jnthn: done
21:33 robfin how to call method with method-name contained in scaler string, like calling $obj.{$ChosenMethod}
21:33 jnthn $obj."$ChosenMethod"()
21:34 robfin perfect thanks!
21:35 _nadim joined #perl6
21:35 masak robfin: note you need the parens at the end -- otherwise Perl 6 will assume you're confused and maybe trying to do Perl 5 style string concatenation
21:35 masak m: my $obj; my $ChosenMethod; $obj."$ChosenMethod"
21:35 camelia rakudo-moar 3259ba: OUTPUT«5===SORRY!5=== Error while compiling /tmp/eTPxYKs946␤Quoted method name requires parenthesized arguments. If you meant to concatenate two strings, use '~'.␤at /tmp/eTPxYKs946:1␤------> 3; my $ChosenMethod; $obj."$ChosenMethod"7⏏5<EOL>␤»
21:36 ely-se I'll use LEAVE for now then
21:38 robfin got it. thanks to you all
21:41 uruwi joined #perl6
21:42 uruwi Hi
21:43 jnthn sleep &
21:44 uruwi m: multi sub trait_mod:<is> (Attribute:D $attr, :$transient!) { }; class A { has $!a; has $!b is transient }; say trait_mod:<is>(A.^attributes[1], :transient)
21:44 camelia rakudo-moar 3259ba: OUTPUT«Nil␤»
21:44 uruwi m: multi sub trait_mod:<is> (Attribute:D $attr, :$transient!) { True }; class A { has $!a; has $!b is transient }; say trait_mod:<is>(A.^attributes[1], :transient)
21:44 camelia rakudo-moar 3259ba: OUTPUT«True␤»
21:45 uruwi m: multi sub trait_mod:<is> (Attribute:D $attr, :$transient!) { True }; class A { has $!a; has $!b is transient }; say trait_mod:<is>(A.^attributes[1], :transient); my $a = A.new(a => 1, b => 2)
21:45 camelia rakudo-moar 3259ba: OUTPUT«True␤»
21:45 uruwi m: multi sub trait_mod:<is> (Attribute:D $attr, :$transient!) { True }; class A { has $!a; has $!b is transient }; say trait_mod:<is>(A.^attributes[1], :transient); my $a = A.new(a => 1, b => 2); say $a;
21:45 camelia rakudo-moar 3259ba: OUTPUT«True␤A.new␤»
21:45 uruwi m: multi sub trait_mod:<is> (Attribute:D $attr, :$transient!) { True }; class A { has $.a; has $.b is transient }; say trait_mod:<is>(A.^attributes[1], :transient); my $a = A.new(a => 1, b => 2); say $a;
21:45 camelia rakudo-moar 3259ba: OUTPUT«True␤A.new(a => 1, b => 2)␤»
21:45 ChoHag joined #perl6
21:46 uruwi m: multi sub trait_mod:<is> (Attribute:D $attr, :$transient!) { True }; class A { has $.a; has $.b is transient }; say trait_mod:<is>(A.^attributes[$_], :transient) for ^2; my $a = A.new(a => 1, b => 2); say $a;
21:46 camelia rakudo-moar 3259ba: OUTPUT«True␤True␤A.new(a => 1, b => 2)␤»
21:46 uruwi m: multi sub trait_mod:<is> (Attribute:D $attr, :$transient!) { False }; class A { has $.a; has $.b is transient }; say trait_mod:<is>(A.^attributes[$_], :transient) for ^2; my $a = A.new(a => 1, b => 2); say $a;
21:46 camelia rakudo-moar 3259ba: OUTPUT«False␤False␤A.new(a => 1, b => 2)␤»
21:46 uruwi m: multi sub trait_mod:<is> (Attribute:D $attr, :$transient!) { True }; class A { has $.a; has $.b is transient }; say trait_mod:<is>(A.^attributes[$_], :transient) for ^2; my $a = A.new(a => 1, b => 2); say $a;
21:46 camelia rakudo-moar 3259ba: OUTPUT«True␤True␤A.new(a => 1, b => 2)␤»
21:46 masak uruwi: there's also /msg camelia ...
21:46 uruwi I was going to ask for help.
21:46 masak uruwi: if you feel like you're spamming #perl6 or something
21:47 masak uruwi: I'm not sure what you want to do above. mostly I'm just hypnotized by a dozen similar-looking one-liners
21:48 uruwi Trying to add an `is transient` trait so I can introspect objects for serialization.
21:48 masak why are you trying to add it both with an explicit `is transient` and then also with a run-time call?
21:49 masak why don't you actually do something useful in the `trait_mod:<is>` sub?
21:49 masak have you considered that `True` isn't enough? :)
21:49 uruwi I'm adding the `is transient` in the class definition, then trying to see which fields have it during runtime.
21:49 masak I think you're overestimating the magic that goes on with trait mods
21:50 masak you need to actually do something in the sub
21:50 masak typically, use `does` and mix in a role of some kind
21:50 masak which you can then introspect on the attribute using ~~
21:51 uruwi Ah, thanks!
21:52 ely-se I have a real hard time understanding the behaviour of clone
21:52 masak ely-se: .clone is similar to .new
21:53 masak ely-se: except it inherits attributes from the old object, which can then be overridden
21:54 masak ely-se: so `my $obj = C.new(:foo(1), :bar("mwhahaha")); my $obj2 = $obj.clone(:bar(2));` would create a C object with :foo(1) and :bar(2)
21:54 masak ely-se: but I bet you know this, and are confused by something else ;)
21:55 ely-se masak: https://gist.github.com/rightfold/bd6447b6f03f6b539a80
21:56 ely-se the last line I expected to print only "(a => 1) => 2"
21:56 ely-se but it seems that $c.clone.n affects %!h of the original C
21:59 geekosaur isn't clone shallow?
21:59 masak ely-se: I'm confused by line 19. which seems to override the %!h in the *original* object.
21:59 masak ely-se: recall that .clone is called on the original object, not on the clone
21:59 ely-se masak: it swaps them, effectively
22:00 masak ok, I suspected that's what you were doing
22:00 ely-se I'd use temp but temp is broken for hashes with non-string keys
22:00 masak maybe that doesn't work, for whatever reason?
22:00 masak ely-se: you can use .WHICH to see if you actually have two distinct hashes in the two objects
22:00 ely-se callsame uses the original %!h, then the original %!h is overwritten with a clone
22:00 ely-se masak: let's see
22:00 kjs_ joined #perl6
22:01 masak ely-se: it's a cute pattern, cloning the original object's hash. don't believe I've seen that before. ely-se++
22:01 ely-se they are the same hash
22:01 ely-se WHICH returns the same value for both
22:03 ely-se Hash' clone method works though. It returns a new hash
22:04 ely-se m: my %h{Pair}; my %i{Pair} = %h.clone; %h.WHICH.say; %i.WHICH.say;
22:04 camelia rakudo-moar 3259ba: OUTPUT«Hash[Any,Pair]|78748640␤Hash[Any,Pair]|78748752␤»
22:07 masak m: class C { has %.h; method clone { C.new(:h( %!h.clone )) } }; my $c = C.new; say $c.h.WHICH; say $c.clone.h.WHICH
22:07 camelia rakudo-moar 3259ba: OUTPUT«Hash|66908304␤Hash|66908352␤»
22:07 masak that works too
22:07 ely-se I don't want it public though
22:07 masak I just wanted to be able to test it easily here
22:07 ely-se I have mutators.
22:08 ely-se maybe I'll just call new and then loop over the original hash and call the mutators
22:08 ely-se though I do want to know why this doesn't work
22:08 masak m: class C { has %.h; method clone { my $result = callsame(); %!h .= clone; $result } }; my $c = C.new; say $c.h.WHICH; say $c.clone.h.WHICH
22:08 camelia rakudo-moar 3259ba: OUTPUT«Hash|52028064␤Hash|52028064␤»
22:08 masak that... doesn't work.
22:08 ely-se very strange
22:09 ely-se it should shouldn't it
22:09 masak and we can see that the way it doesn't work is that it doesn't replace the %!h in the original object
22:10 masak m: class C { has %.h; method clone { my $result = callsame(); $result } }; my $c = C.new; say $c.h.WHICH; say $c.clone.h.WHICH
22:10 camelia rakudo-moar 3259ba: OUTPUT«Hash|48279952␤Hash|48279952␤»
22:10 masak i.e. the `%!h .= clone;` statement has no measurable effect
22:10 ely-se maybe clone can't mutate the original
22:11 masak well, it's not throwing any error
22:11 ely-se what about non-hash attributes?
22:11 masak and I don't see why it shouldn't be able to. it's just a normal method
22:12 pierre-vigier joined #perl6
22:12 ely-se m: class C { has $.x; method clone { my $result = callsame; $!x = 1 => 2; $result } }; my $c = C.new; say $c.x.WHICH; $c.x = 5 => 6; say $c.clone.x.WHICH
22:12 camelia rakudo-moar 3259ba: OUTPUT«Any␤Cannot modify an immutable Any␤  in block <unit> at /tmp/fe3D2wrhse line 1␤␤»
22:13 ely-se m: class C { has $.x is rw; method clone { my $result = callsame; $!x = 1 => 2; $result } }; my $c = C.new; $c.x = 5 => 6; say $c.x.WHICH; say $c.clone.x.WHICH
22:13 camelia rakudo-moar 3259ba: OUTPUT«Pair|Int|5|Int|6␤Pair|Int|5|Int|6␤»
22:13 ely-se oh lol
22:13 ely-se pairs are immutable
22:13 ely-se Ahh wait, don't hashes assign in list context?
22:13 ely-se it stays the original hash
22:13 ely-se it slurps instead of reassigning reference
22:15 masak ely-se: aaaaaah
22:15 ely-se that's nasty
22:15 masak ely-se: maybe binding would work, then
22:15 ely-se nope, lol
22:15 ely-se Type check failed in binding; expected Associative[Any,Pair] but got Hash[Any,Pair]
22:15 masak m: class C { has %.h; method clone { my $result = callsame(); %!h := %!h.clone; $result } }; my $c = C.new; say $c.h.WHICH; say $c.clone.h.WHICH
22:15 camelia rakudo-moar 3259ba: OUTPUT«Hash|73343744␤Hash|73343744␤»
22:15 masak um, uh?
22:15 ely-se which is stupid considering http://doc.perl6.org/images/type-graph-Hash.png
22:16 masak agreed
22:16 * ely-se has no idea what is going on
22:17 masak ely-se: I think you have enough to submit a rakudobug, if you haven't already ;)
22:17 ely-se yummy, shrimps
22:18 ely-se m: my %h; %h := %h.clone;
22:18 Ulti ~/win 5
22:18 camelia rakudo-moar 3259ba: ( no output )
22:19 ely-se m: class C { my %!h; method m { %!h := %!h.clone } }; C.new.m
22:19 camelia rakudo-moar 3259ba: OUTPUT«Use of uninitialized value of type Any in string context␤Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed.  in any throw at src/Perl6/World.nqp line 3740␤5===SORRY!5=== Error while compiling /tmp/15XJNu7GCs␤Cannot us…»
22:19 ely-se wtf
22:20 masak seems you got an error during the throwing of an error :/
22:20 ely-se we can conclude that hashes are broken :P
22:21 ely-se time to submit my second bug today
22:21 masak aye
22:22 ely-se HUH
22:22 ely-se now it works
22:23 ely-se ah, it works only if the key type isn't set
22:35 AlexDaniel joined #perl6
22:47 ely-se hmm, it seems IO::Pipe.new isn't useful
22:47 ely-se oh, need to call IO::Pipe.pair
22:47 yqt joined #perl6
22:48 ely-se which is not implemented xD
22:56 zacts joined #perl6
23:06 ely-se can I create an IO::Handle from an Int file descriptor?
23:06 geekosaur @index fdToHandle
23:07 geekosaur hm, did i break it?
23:07 geekosaur http://hackage.haskell.org/package/unix/docs/System-Posix-IO-ByteString.html#v:fdToHandle
23:08 geekosaur also System.Posix.IO
23:08 ely-se geekosaur: Perl 6, not Haskell
23:08 geekosaur whoops, I am doing poorly today
23:08 xenu :D
23:08 geekosaur I onlu realized thechannel error when I tried to figure out the bot
23:08 ely-se :P
23:09 geekosaur I think... fd to handle has issues? because libuv wants to hide it
23:09 * geekosaur got less sleep than intended last night and is still having coughing fits so naps are out :/
23:14 ely-se guess I'll open from /proc/seld/fd/*
23:14 ely-se if that works
23:16 geekosaur there's some internal thing iirc that can get the fd, for some things. (sockets were a problem iirc)
23:16 ely-se I don't want to get the fd. I have the fd and want to get an IO::Handle object
23:17 geekosaur yeh, but if you can't go one way easily you usually can't go theother way easily either
23:18 geekosaur like, if you have an fd for a socket, you are already nonportable and libuv really wants to be portable. (windows sockets aren't fds)
23:21 ely-se eww https://gist.github.com/rightfold/eab266b8157c40ba1037#file-pm6-L12-L13
23:21 ely-se but at least it works :p
23:30 kjs_ joined #perl6
23:30 lichtkind joined #perl6
23:35 zostay m: for cross(0..2, 0..2) -> ($x, $y) { say ++$ }
23:35 camelia rakudo-moar 3259ba: OUTPUT«1␤2␤3␤4␤5␤6␤7␤8␤9␤»
23:35 yoleaux 7 Jan 2016 13:53Z <hoelzro> zostay: could you ping me when you have a chance? I have ideas about your abort() woes
23:35 zostay m: my $a = 0..2; my $b = 0..2; for cross($a, $b) -> ($x, $y) { say ++$ }
23:35 camelia rakudo-moar 3259ba: OUTPUT«1␤»
23:35 zostay why are those two lines different?
23:36 zostay or better question: how do i make the second behave like the first?
23:37 abaugher I've used rakudobrew to build moar 2015.12 and panda. Now when I try to install modules with panda it says "Please remove leading 'v' from perl version in Text::CSV's meta info. Text::CSV requires Perl version 6.0.0. Cannot continue."
23:37 abaugher Is there a way I can get panda to ignore that, or otherwise make it work?  --force and --notests don't get past it.
23:39 skids I had to remove 6.0.0 and just put 6 in all my modules.
23:42 zostay m: my $a = 0..2; my $b = 0..2; for cross($a.list, $b.list) -> ($x, $y) { say ++$ } # the best i can come up with
23:42 camelia rakudo-moar 3259ba: OUTPUT«1␤2␤3␤4␤5␤6␤7␤8␤9␤»
23:42 skids m: my @a = 0..2; my @b = 0..2; for cross(@a, @b) -> ($x, $y) { say ++$ }
23:42 camelia rakudo-moar 3259ba: OUTPUT«1␤2␤3␤4␤5␤6␤7␤8␤9␤»
23:43 AlexDaniel zostay: why do you expect $a to work like array?
23:44 AlexDaniel m: my $a = 0..2; my $b = 0..2; for cross(@$a, @$b) -> ($x, $y) { say ++$ }
23:44 camelia rakudo-moar 3259ba: OUTPUT«1␤2␤3␤4␤5␤6␤7␤8␤9␤»
23:55 jvcakg joined #perl6
23:57 jvcakg Greetings
23:59 zostay AlexDaniel: because i've been messing with perl 6 for months and what i expect from things is still catching up from all the changes in the last few months

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

Perl 6 | Reference Documentation | Rakudo