»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
Set by moritz on 22 December 2015.
00:00 Faster-Fanboi joined 00:04 troys_ is now known as troys 00:06 wamba joined
tony-o m: (16/4).WHAT.say; 00:09
camelia (Rat)
tony-o m: say (16/4).narrow ~~ Int;
camelia True
00:14 espadrine left 00:17 dct left 00:20 Herby_ joined
Herby_ o/ 00:20
Zoffix \o 00:22
TimToady m: say <16/4>.narrow ~~ Int; 00:24
yoleaux 28 Dec 2017 20:29Z <Zoffix> TimToady: would you be able to clarify what is a ".list"? github.com/rakudo/rakudo/issues/1344
camelia True
TimToady that's the canonical way to write a Rat literal
Zoffix (same for complex: <42+42i>) 00:25
1344 was already clarified; unless you wanted to add anything
TimToady both were specifically added to avoid reliance on constant folding
rjbs . o O ( constant narrowing ) 00:42
perigrin Narrowing intensifies? 00:51
00:51 Herby_ left 00:53 cdg joined 00:58 cdg left 00:59 Herby_ joined 01:02 Cabanossi left 01:04 Cabanossi joined 01:05 cognominal joined 01:07 cog_ left 01:23 troys is now known as troys_ 01:27 wamba left
Zoffix Is there a way to apply executable stack once and have it be kept during moar's recompilation? github.com/nxadm/rakudo-pkg/blob/m..._windows10 01:33
01:51 Herby_ left 02:00 markong left 02:02 comborico1611 left
Zoffix leont: stresstesting a fix for RT#131700 Pretty sure that fixes your prove6 issue too 02:02
synopsebot RT#131700 [new]: rt.perl.org/Ticket/Display.html?id=131700 [IO] prompt not working on bash-on-ubuntu on win10
02:08 vike joined 02:17 Voldenet left, vike left 02:20 vike joined 02:22 Voldenet joined, Voldenet left, Voldenet joined 02:28 leont joined 02:47 ilbot3 left 02:50 FROGGS left 02:58 ilbot3 joined, ChanServ sets mode: +v ilbot3 03:03 FROGGS joined
Zoffix leont: untested, but probably fixed: github.com/perl6/tap-harness6/issu...-354524009 03:05
I mean, I tested the prompt() aka flushing TTY issue and I assume prove6 problem were the same 03:06
\o
03:06 Zoffix left 03:14 epony left 03:17 unicodable6 left, benchable6 left, unicodable6 joined, benchable6 joined 03:30 wamba joined 03:38 cdg joined 03:43 cdg left 03:46 cdg joined 04:11 epony joined 04:12 epony left 04:13 epony joined 04:22 troys_ is now known as troys 04:40 epony left 04:43 epony joined, vichib left 04:45 epony left, epony joined 04:53 Cabanossi left 04:56 Cabanossi joined 05:12 epony left 05:18 cdg left 05:20 cdg joined 05:24 piojo_ joined 05:26 troys is now known as troys_, vike left 05:30 vike joined 05:32 khw left 05:49 vike left 05:52 Herby_ joined
Herby_ \o 05:52
05:55 vike joined 06:07 troys_ is now known as troys, troys is now known as troys_, epony joined 06:08 troys_ is now known as troys 06:09 epony left 06:10 epony joined, piojo_ left 06:18 vike left, epony left 06:19 troys left, epony joined 06:20 epony left 06:21 epony joined 06:29 cdg left 06:33 wamba left, geospeck joined 06:34 eliasr left 06:37 cdg joined 06:38 ChoHag joined 06:40 cdg_ joined 06:42 cdg left 06:44 Voldenet left, geospeck left, cdg_ left 06:46 wamba joined 06:50 cdg joined 06:51 Voldenet joined, Voldenet left, Voldenet joined 06:55 cdg left 07:04 darutoko joined 07:07 vichib joined 07:09 cdg joined 07:14 cdg left 07:15 wamba left 07:23 geospeck joined 07:58 aindilis left, aindilis joined 08:03 sjoshi joined 08:05 Kaffe joined, Kaffe left 08:10 Aceeri joined 08:11 Aceeri is now known as Guest1076 08:13 Guest1076 is now known as Aceeri_ 08:25 sena_kun joined 08:40 titsuki_ joined 08:42 titsuki left 08:44 domidumont joined 08:46 CacoS joined 08:49 domidumont left 08:50 domidumont joined 08:55 espadrine joined 09:08 sena_kun left 09:27 sjoshi left 09:41 sjoshi joined 10:04 sjoshi left 10:05 sjoshi joined 10:33 rindolf joined 10:41 geospeck left, geospeck joined 10:42 geospeck left
moritz ZofBot: no need to use Ansible if you're not comfortable with it 10:50
yoleaux 29 Dec 2017 11:30Z <Zoffix> moritz: would be nice for perl6feed tweeter to retweet this: twitter.com/zoffix/status/946703693507907584
moritz my plans for Ansible world domination aren't that far along :-)
moritz travelling, and forgot the power supply for the laptop 10:51
so now i have ~1h of quality Internet time remaining for the next ~5 days 10:52
tadzik :( 10:53
TEttinger hooray nature time 10:54
pet cats
time to snuggle random cats
moritz no cats here, just raining cats and dogs :-) 10:55
tadzik this sounds like an adventure from which you come back with a meter-long beard and a changed man
10:56 markong joined
moritz nah, just listing to a few audio books and reading "Working with Legacy Code" :) 10:56
but I did forget my electric shaver as well :D
tadzik :D
quick, if you had to choose between batteries for laptop and the shaver? ;) 10:57
moritz laptop :-) 10:58
afk again, saving power for emergencies :-)
tyil tadzik: you make nice booze :> 11:02
tadzik thanks :) But how do you know? :) 11:08
oh, Nalewkas :)
I started doing beer recently, but it wasn't very widely distributed 11:09
11:13 sena_kun joined 11:17 lelf joined
wictory[m] Hi! If I run .Str on a Match object. Is the data copied from the .orig string of the Match object, or is the new Str pointing to the same data? 11:27
lizmat copied, afaics 11:32
wictory[m] Str:s in perl6 are immutable. So if the .orig of a Match is a Str, it should be safe to point a .Str of match to the .orig . 11:38
11:39 setty1 joined
lizmat yeah, but the .Str of a Match object is much more than just the .orig 11:40
11:43 geospeck joined 11:48 geospeck left
wictory[m] Doesn't .Str of a Match return a string the same as the one that starts at .from and ends at .to from the .orig Str? 11:59
12:02 geospeck joined
jnthn Exactly what happens depends on backend 12:05
You always get a new Str returned, but as to what's on the inside
MoarVM supports strands, and so it can represent a substring result by a start index and a reference to another string buffer 12:06
So it will point to the original buffer, generally. Not sure if it makes a "is this worth it" judgement though (sometimes it might be cheaper to just copy when the substring is smaller than the amount of space you'd need for the reference and start offset) 12:07
12:12 leont left
wictory[m] Ok! Thanks for the explanation! 12:17
12:22 dct joined 12:23 natrys joined 12:36 dct left 12:38 rindolf left 12:48 rindolf joined 13:07 Actualeyes left
tyil tadzik: I was at lizmat's place :> 13:15
tadzik tyil: ah, it all fits together now :)
I'm somewhat surprised they still have it after 1 year :D It... evaporates much faster in my place... 13:16
tyil also, general question for #perl6, I have App::Cpan6 to assist in making new modules, my main intent is that it will make me not have to touch the META6.json myself ever, it's at 0.18 now, but I was considering calling it assixt (because it has a six in the name), which name would you guys all think is more fitting? repo is here: github.com/scriptkitties/perl6-App-Cpan6 13:18
13:18 CacoS left
tyil tadzik: they have millions of bottles of booze :p 13:18
lizmat that's probably four 0's too many, but yeah :-) 13:34
geekosaur sounds like my parents. (me, I just don't bother accumulating what I'm not going to drink. but then I don't have much to do with the social aspect which iirc is how my parents ended up with so much booze despite barely drinking...) 13:36
lizmat well, generally it's the sign of an alcoholic: not having any alcohol in the house (because it will be drunk immediately) 13:37
that's why we hardly ever have any chocolate at home :-)
lelf why “zef search” ≠ modules.p.o result? 13:38
lizmat because of a bug? 13:39
geekosaur or because the metadata in something on modules is wrong, possibly 13:40
so zef skips it
13:41 leont joined
lelf …and the proceed to install it just fine? ;) 13:42
geekosaur metadata's about finding, not installing. if you point it directly at something then it doesn't need to find it. or if you list then it needs more information than just a path and dependencies (it doesn't, for example, need to care much about the author; but if you're running list, you might care) 13:44
lelf just occured to me that “zef list ” seems to do match modules.p.o 13:51
well, zef list | grep
13:57 eliasr joined 14:11 lelf left 14:18 lelf joined 14:26 Ven`` joined 14:37 user100500 joined
user100500 ;; in signatures how does it work? Can you give an example? 14:43
14:48 lelf left 14:52 Ven`` left
MasterDuke user100500: i don't know much about it, but it is used in some core Rakudo code. see github.com/rakudo/rakudo/blob/mast...r.pm#L1413 and the next couple .split multis for an example 14:53
14:59 leont left
user100500 MasterDuke: docs.perl6.org/type/Signature#inde...Long_Names here is an example, but I do not understand how it works. 15:00
geekosaur I am trying to figure out if you actually mean 'how it works', or 'what it does' 15:03
"how it works" is the dispatcher just doesn't pay attention to parameters following that one for deciding which multi candidate to use 15:04
15:04 Ven`` joined
geekosaur and what it does is basically say that the following parameters can be used to "fine tune" behavior, but not to pick which implementation / candidate to use. this is not quite the same thing as the parameter being optional, as some kinds of "fine tuning" might simply not apply in some cases, but you don't want to error out if they are present so that all the forms of some function/method are basically compatible 15:06
or because you know they might or might not be there, but they're always acceptable and there's no point slowing down dispatch to check for a bunch of optional stuff that shouldn't make a difference in which candidate is called 15:07
MasterDuke m: multi sub a(Int $a;; Int $b) { say "Int multi" }; multi sub a(Int $a;; Str $b) { say "Str multi" }; a(1, 3) 15:10
camelia Ambiguous call to 'a(Int, Int)'; these signatures all match:
:(Int $a;; Int $b)
:(Int $a;; Str $b)
in block <unit> at <tmp> line 1
MasterDuke user100500: ^^^ that's not a great example, but you can see that it's an ambiguous call, even though the `$b` parameter is an Int, not a Str 15:12
user100500 m: multi sub f(Int $i, Str $s;; :$b) { say "$i, $s, {$b.perl}" }; multi sub f(Int $i, Str $s, :$b) { say "$i, $s, {$b.perl}" }; f(10, 'answer'); f(10, 'answer', :b(100)); 15:13
camelia 10, answer, Any
10, answer, 100
15:13 manchicken joined 15:16 aindilis left 15:17 aindilis joined
manchicken Okay, I messed something up: modules.perl6.org/search/?q=fcntl 15:21
It's showing up twice. 15:22
And I screwed up the meta.
15:23 leont joined, user100500 left 15:24 natrys left
timotimo no problem, just kick it out of the perl6/ecosystem META.list 15:25
15:28 Ven`` left 15:29 cdg joined
manchicken It's OK, I also found some pretty big misses. 15:30
S_ISREG() and its kin are all missing. 15:31
Gonna have to use NativeCall for those.
15:34 cdg left 15:35 sftp left 15:36 sftp joined 15:41 statisfiable6 left, statisfiable6 joined 15:42 releasable6 left, releasable6 joined
manchicken Is there any place where we document the way NativeCall handles file handles? 15:46
timotimo file handles are just integers 15:48
well, usually
jnthn Indeed, and call .native-descriptor on a Perl 6 file handle to get the value to pass 15:51
15:58 geospeck left 16:05 nativecallable6 left, quotable6 left, nativecallable6 joined, ChanServ sets mode: +v nativecallable6, quotable6 joined, ChanServ sets mode: +v quotable6, committable6 left 16:06 committable6 joined, ChanServ sets mode: +v committable6 16:08 manchicken left 16:15 FROGGS left 16:22 espadrine left 16:24 cdg joined 16:25 cdg_ joined 16:28 cdg__ joined 16:29 cdg left, FROGGS joined 16:30 cdg_ left, troys joined 16:31 Herby_ left, stmuk_ joined 16:32 cdg__ left 16:34 stmuk left 16:35 cdg joined 16:36 cdg_ joined 16:38 cdg_ left, cdg_ joined 16:39 geospeck joined, cdg left 16:44 piojo_ joined 16:45 natrys joined 16:56 domidumont left 16:57 domidumont joined 17:01 kerframil joined 17:11 zakharyas joined 17:12 Herby_ joined, zakharyas left
Herby_ Whats a quick way to print out the keys in a hash, just to see whats in there? 17:13
jnthn dd %hash.keys
Herby_ thanks :) 17:14
17:18 zakharyas joined 17:20 khw joined 17:22 manchicken joined
Herby_ pastebin.com/6mVBgy7p 17:25
I think I'm missing a basic principle when it comes to arrays 17:26
geekosaur no, your're just missing a level 17:27
hm, no
Herby_ I keep missing whatever it is every time I deal with a json response
timotimo i bet it's the list assignment to @repo_dicts
geekosaur but in the first oine you are assigning an item of some kind containing a 30-element list
17:27 sjoshi left
timotimo needs to have a .list on the RHS, or be @($response_dict<items>) 17:28
geekosaur and in the second you are seeing exactly that one item
[] after the [0] might work too?
timotimo or using binding instead of assignment (if it's okay that both are now the exact same object) 17:29
Herby_ adding .list to the RHS did work
i've been banging my head on that for a while 17:30
that principle
geekosaur: adding [] after [0] returned 72, oddly enough 17:31
geekosaur huh 17:32
Herby_ @repo_dicts = $response_dict<items>[0][]
17:33 Ven`` joined 17:35 Perl6 joined
Perl6 Hi all 17:35
Herby_ o/ 17:36
Perl6 I have a problem where I have a loop which loops through an array, and a loop inside of that loop which further loops inside the array. I want the values from the second loop to get multipled together and taken outside all loops, but I can't get this to work? 17:37
17:40 sjoshi joined
Perl6 Sorry if that was confusing :P 17:40
17:41 sjoshi left 17:42 sjoshi joined
lizmat
.oO( Loop di Loop )
17:45
Perl6: could you gist an example ?
17:47 piojo_ left 17:48 manchicken left 17:49 sjoshi left
Perl6 lizmat: Sure, I can post the code but I'll need a bit of time to clean it up 17:49
lizmat that would allow us to help you better :-)
17:50 sjoshi joined, wamba joined 17:52 zakharyas left 17:53 troys is now known as troys_
Perl6 pastebin.com/eaXgN6eV 17:56
By the way, this is my attempt at Project Euler problem 11. I counted that, to go 4 numbers down, you go down 20 each time, so the loop does that 4 times. If this works, I will be adding more loops, to loop 21 forward to get the diagonals 17:58
lizmat well, one problem is that you do "my $somme" both inside as well as outside of the inner loop 17:59
so it won't actually add it up outside of the loop
17:59 leont left
Perl6 Oh, but I thought doing *= would multiple the existing value by the value after *= 18:02
18:04 sjoshi left
lizmat just remove the "my" in the inner loop 18:04
18:05 sjoshi joined
lizmat same for the "my @tableau_de_nombre_final.push($somme);" in the outer loop 18:05
MasterDuke Perl6: not addressing your problem here, but FYI, your first six lines could probably be shortened to `my @numéro_nouvelle = slurp("DIR").words.map(+*)` 18:06
18:08 pmurias joined
Perl6 lizmat: Ah, of course, I'm redeclaring the variables every time it runs 18:10
lizmat yup 18:11
since they are in different scopes, you don't get a warning for nit
*it
Perl6 MasterDuke: Maybe for the future. I like to at least understand my code a bit :D
Okay guys, I'll work more on this code and report back the results later. Thanks lizmat! 18:12
18:12 Perl6 left 18:13 sjoshi left 18:18 troys_ is now known as troys 18:20 Mikasi joined 18:24 sjoshi joined 18:26 manchicken joined
manchicken Well poop. I have to implement some of POSIX in order to get Fcntl done fully. 18:32
Namely, `stat`.
18:33 Ven`` left 18:37 Ven`` joined 18:55 sjoshi left, sjoshi joined 18:57 darutoko left 18:59 manchicken left 19:04 vichib left 19:06 |oLa| joined 19:12 Ven`` left 19:18 wander left 19:24 traxex joined 19:28 pmurias left 19:30 cdg_ left 19:31 cdg joined 19:35 konsolebox left 19:37 cdg left, Geth left, Geth joined, ChanServ sets mode: +v Geth 19:38 bisectable6 left, bloatable6 left, squashable6 left, bisectable6 joined, coverable6 left, bloatable6 joined, ChanServ sets mode: +v bloatable6, squashable6 joined, ChanServ sets mode: +v squashable6, coverable6 joined, greppable6 left 19:39 greppable6 joined, ChanServ sets mode: +v greppable6, reportable6 left, reportable6 joined 19:41 konsolebox joined 20:01 domidumont left 20:17 mson joined
MasterDuke .ask manchicken have you seen the nqp::stat op? github.com/perl6/nqp/blob/master/d...kdown#stat 20:28
yoleaux MasterDuke: I'll pass your message to manchicken.
20:34 s0me0ne-unkn0wn joined 20:37 s0me0n3-unkn0wn left, sena_kun left 20:47 cdg joined 20:51 leont joined 20:52 cdg left 20:54 sjoshi left 20:58 Zoffix joined, pmurias joined, evalable6 left, evalable6 joined, ChanServ sets mode: +v evalable6 20:59 vichib joined
Zoffix .tell manchicken but note that there's no user support for nqp. It can be changed without notice. And stat op in particular is aching to be changed to a more performance friendly alternative (tho that still might come out in a form of a separate op) 20:59
yoleaux Zoffix: I'll pass your message to manchicken.
21:06 Ven`` joined 21:10 stmuk joined, pmurias left 21:12 stmuk_ left, geospeck left 21:15 jstuder joined 21:17 troys is now known as troys_ 21:18 dct joined 21:19 Ven`` left 21:20 Ven`` joined 21:22 geospeck joined
jstuder hey fellow 6ers, i'm writing some tests and have a quick question 21:22
is there a not-isa-ok? 21:23
21:23 geospeck left
jstuder or should I use nok in conjunction with .isa or ~~ ? 21:23
not sure what the idiomatic way to do it is
Zoffix m: use Test; cmp-ok 42, '~~', Num 21:24
camelia not ok 1 -
# Failed test at <tmp> line 1
# expected: Num
# matcher: 'infix:<~~>'
# got: 42
Zoffix m: use Test; cmp-ok 42, '!~~', Num
camelia ok 1 -
Zoffix m: use Test; cmp-ok 42, '!~~', Int
camelia not ok 1 -
# Failed test at <tmp> line 1
# expected: Int
# matcher: 'infix:<!~~>'
# got: 42
Zoffix That's how I'd write it
(the last two, with `!~~` as matcher)
jstuder ok sounds good
thanks
there are a lot of options 21:25
Zoffix m: use Test; cmp-ok 42.WHAT, '!~~', Int
camelia not ok 1 -
# Failed test at <tmp> line 1
# expected: Int
# matcher: 'infix:<!~~>'
# got: Int
Zoffix ^ or maybe that; this way it shows you what it `got` more clearly 21:26
21:26 kerframil left
Zoffix Not ideal still, since you have to make an extra step of parsing that matcher is a negated op, but IMO better than just a `nok` test that gives you a Pass/Fail without telling you what you got 21:27
jstuder yeah that's true
much better to know why you failed
thanks 21:28
21:29 manchicken joined
manchicken So yeah, `Fcntl` that I released yesterday is just the constants. 21:29
yoleaux 20:28Z <MasterDuke> manchicken: have you seen the nqp::stat op? github.com/perl6/nqp/blob/master/d...kdown#stat
20:59Z <Zoffix> manchicken: but note that there's no user support for nqp. It can be changed without notice. And stat op in particular is aching to be changed to a more performance friendly alternative (tho that still might come out in a form of a separate op)
manchicken MasterDuke, I hadn't seen that. 21:30
Do you know if that stuff is POSIX-compliant? 21:31
MasterDuke not sure. i would guess pretty close at least 21:33
i think it uses libuv under the hood 21:34
21:34 pmurias joined 21:40 wamba left
manchicken When I see "Fcntl" and "POSIX" on the wishlist, I interpret that as meaning that we want them to be full implementations of those in an idiomatically correct manner. That _seems_ to me that we should make them compatible for the most part. 21:41
21:41 Ven`` left
Zoffix FWIW, there's already a module named POSIX, although it provides just a couple of routines 21:42
manchicken The `stat()` NQP opcode seems to require you to make multiple calls to get the full stat.
Zoffix eco: POSIX
buggable Zoffix, POSIX 'POSIX - Perl interface to IEEE Std 1003.1': github.com/cspencer/perl6-posix 2 other matching results: modules.perl6.org/s/
Zoffix manchicken: yes, that's why I mentioned it might get changed
manchicken Well poo. Why can't people update the wishlist then? 21:43
Well, do we even think that the Fcntl implementation was useful?
Zoffix manchicken: but any self-respecting module wouldn't be using nqp, because there's no support for it
manchicken Cool.
Zoffix (I'm a hypocrite in my own modules, just because I think I'm in-the-loop with respect to nqp changes :P)
greppable6: 'use nqp' 21:44
greppable6 Zoffix, No! It wasn't me! It was the one-armed man! Backtrace: gist.github.com/9ea6363da06d3f8e80...8c53e610c9
Zoffix greppable6: 'use MONKEY-GUTS'
greppable6 Zoffix, No! It wasn't me! It was the one-armed man! Backtrace: gist.github.com/6265fc43cb7211747e...025a1a69c7
AlexDaniel uhhh
manchicken So it sounds like I need to stop making my own `POSIX`, should instead extend cspencer's module, and then make the `Fcntl` module depend on it. No?
AlexDaniel ahh I see
Zoffix manchicken: sounds like a plan 21:45
manchicken Since there's no more built-in `stat()` function, it seems like the only course of action is to use the one offered by `POSIX`.
Does anybody have cause to suggest I _shouldn't_ do it that way? 21:46
These lower-level modules have a lot of reading involved.
I'm happy to do them, but if there's a better use of my time I'd love to shift focus. 21:47
21:47 Zoffix left
manchicken Either way, I'd like to get a new version of `Fcntl` out there since I screwed up the docs. 21:47
Geth perl6-most-wanted: 51883945c5 | (Michael D. Stemle, Jr)++ | most-wanted/modules.md
Adding WIP for POSIX
21:50
manchicken Added the POSIX module as WIP since it seems like it's already there.
21:54 blinker joined
manchicken Is cspencer someone who frequents here? 21:56
21:56 xcm left 21:58 xcm joined
manchicken This module is 2 years old... 21:58
21:59 dct left 22:00 pecastro joined 22:22 Aaronepower joined 22:27 mson left
MasterDuke manchicken: last seen here by that nick in 2012, irclog.perlgeek.de/perl6/search/?n...cer&q= 22:29
manchicken Oof
OK.
Well, I shot an email.
doesn't seem like this module is actually a WIP anymore.
22:29 user100500 joined
manchicken It has something, though, and something being infinitely better than nothing means I'll start adding to it rather than starting over. 22:30
user100500 Socket (UDP) - how to get a response from the server to the client? 22:32
22:32 troys_ is now known as troys 22:38 setty1 left 22:41 xcm left 22:43 xcm joined 22:46 manchicken left 22:48 espadrine joined, cdg joined 22:49 user100500 left 22:53 cdg left 22:54 natrys left 23:00 jstuder left 23:05 troys is now known as troys_ 23:15 alenasz joined
alenasz hi 23:15
where is perl 6 document in pdf ? 23:16
23:18 alenasz left 23:19 R0b0t1 left
MasterDuke .tell alenasz i thought it was already available somewhere, but don't remember where. anyway, you could download docs.perl6.org/perl6.xhtml (all docs in one page) and then use a PDF converter on in 23:21
yoleaux MasterDuke: I'll pass your message to alenasz.
23:21 R0b0t1 joined 23:29 rindolf left 23:35 xcm left 23:37 xcm joined
AlexDaniel why :S 23:37
whenever someone wants a PDF version of something I just hit “Print…” button in any browser
that just created 613 pages of stuff for the perl6.xhtml page 23:38
timotimo wow, that's a lot of stuff in total 23:56
how many pages are dead weight?