»ö« 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:22 MistyMonumentMai left 00:25 rindolf left 00:36 Actualeyes joined 00:39 cog_ left 00:42 snarkyboojum joined 00:49 aborazmeh joined, aborazmeh left, aborazmeh joined 00:59 astj joined 01:00 wamba left 01:01 dalek left 01:02 dalek joined 01:04 ecocode_ left, ecocode joined 01:06 ChanServ sets mode: +v dalek 01:08 cognominal joined 01:16 todd joined
todd Hi All. from linux.die.net/man/3/termios, how do I use `tcflush`? 01:16
tcflush() discards data written to the object referred to by fd but not transmitted, or data received but not read, depending on the value of queue_selector:
01:16 audiatorix left
todd int tcflush(int fd, int queue_selector); 01:17
AlexDaniel nativecallable6: int tcflush(int fd, int queue_selector); 01:18
nativecallable6 AlexDaniel, sub tcflush(int32 $fd # int␤ ,int32 $queue_selector # int␤ ) is native(LIB) returns int32 is export { * }
AlexDaniel todd: ↑ but use newlines instead of ␤
wait, maybe I'm too quick to treat this as a nativecall question… 01:19
todd: what problem are you trying to solve?
todd 1) What I want to do is to flush anything written to the terminal, but not hang if nothing is there. 01:20
2) then wait for any key on the keyboard to be press, including weird keys
press->pressed
AlexDaniel do we even have any buffering for stdin/stdout when it's in a terminal? 01:21
todd I have been erading github.com/krunen/term-termios, but have no clue what he is doing. Also his example required two keystrokes to exit and wonb't exit on a return 01:22
oh ya, yo press things and they stack up. Sometimes they show up after perl exits 01:23
01:27 Cabanossi left 01:28 Cabanossi joined
AlexDaniel todd: hm, I've tried this and it kinda works, almost 01:28
use Term::termios; my $termios := Term::termios.new(fd => 1).getattr; $termios.unset_lflags(<ECHO ICANON IEXTEN>);; $termios.setattr(:DRAIN); loop { my $x = getc; say $x x 5 }' 01:29
todd testing!
AlexDaniel todd: termios is needed there because otherwise your terminal will wait for you to type the whole line and press enter
se if we really want to process it character by character, we have to tell the terminal that we want to do so 01:30
geekosaur todd, the 2 keypresses thing was explained. you need to set the terminal to either hbinary or atin-1, so rakudo isn't looking for combining characters following the read character 01:33
todd which do I want to use? 01:34
geekosaur because perl 6 considers something like a̋ to be one "character", but it's actually two at unicode level
if you are turning off terminal processing, you probably want binary so you have full control 01:35
skids if you are going to use terminal sequences, then binary.
todd Okay. But how do I do that? I am confused
I thought $termios.makeraw; did that 01:36
geekosaur nom that changes the kernel terminal driver, not perl 6
todd How do I tell perl6? 01:37
geekosaur currently you have to reopen it in binary mode
skids "it" being $*IN
geekosaur $*IN = open('/dev/tty', :bin); 01:38
01:38 snarkyboojum left
todd my $c = $*IN.getc; is what I am using. Should I put the open commend in front of it? 01:38
$*IN = open('/dev/tty', :bin); my $c = $*IN.getc; 01:40
Cannot do 'getc' on a handle in binary mode
what is the binary mode read commnd? 01:41
01:42 Guest23973 joined 01:45 ilbot3 left
Geth doc/master: 5 commits pushed by (Wenzel P. P. Peppmeyer)++, (Rafael Schipiura)++ 01:47
todd Got to go. I will bang my head some more. 01:50
01:54 ilbot3 joined, ChanServ sets mode: +v ilbot3
japhb .tell todd Please take a look at Terminal::Print (in particular, Terminal::Print::RawInput and Terminal::Print::DecodedInput). 02:10
yoleaux japhb: I'll pass your message to todd.
02:13 noganex joined 02:16 noganex_ left
Xliff .tell FROGGS I have a few questions about XML::LibXML if you have some time. Particularly about t/02parse.t 02:28
yoleaux Xliff: I'll pass your message to FROGGS.
02:28 piojo_ left 02:41 Cabanossi left 02:43 Cabanossi joined 02:46 aborazmeh left 02:53 kyan joined 03:04 dogbert2 left 03:11 zakame joined, Cabanossi left 03:13 Cabanossi joined
Geth doc: 83e4e30318 | (Rafael Schipiura)++ (committed using GitHub Web editor) | doc/Type/Failure.pod6
Update Failure.pod6
03:14
03:17 TimToady left 03:18 TimToady joined
Geth doc: 5fb8ee8fc5 | (Rafael Schipiura)++ (committed using GitHub Web editor) | doc/Type/Failure.pod6
Update Failure.pod6
03:34
03:40 Cabanossi left 03:41 pilne left 03:42 Cabanossi joined
Xliff m: class A { method foo(Int $i where 1 | 0) { say ‘hello’ }; }; say A.new.foo(0) ; 03:58
camelia hello
True
Xliff m: class A { method hyphen-name(Int $i where 1 | 0) { say ‘hello’ }; }; say A.new.hyphen-name(0) ; 03:59
camelia hello
True
Xliff m: class A { multi method hyphen-name(Bool $b) { }; multi method hyphen-name(Int $i where 1 | 0) { say ‘hello’ }; }; say A.new.hyphen-name(0) ; 04:00
camelia hello
True
Xliff m: class A { multi method hyphen-name(Bool $b) { }; multi method hyphen-name(Int $i where 1 | 0) { say ‘hello’ }; }; say A.new.hyphen-name(2) ;
camelia Cannot resolve caller hyphen-name(A.new: 2); none of these signatures match:
(A $: Bool $b, *%_)
(A $: Int $i where { ... }, *%_)
in block <unit> at <tmp> line 1
04:08 armin left 04:09 armin joined
todd ".tell todd Please take a look" copied it down. [email@hidden.address] 04:09
yoleaux 02:10Z <japhb> todd: Please take a look at Terminal::Print (in particular, Terminal::Print::RawInput and Terminal::Print::DecodedInput).
geekosaur that's the one I pointed you at a couple days go; guess it got merged :) 04:18
todd github.com/ab5tract/Terminal-Print...w-input.p6 04:19
04:19 raschipi joined 04:22 kybr left 04:23 eliasr left 04:29 raschipi left 04:35 piojo joined 04:36 kyan left
japhb todd: Do you have questions? RawInput and DecodedInput are my code. 04:37
(As well as the associated examples, including tris.p6) 04:38
04:46 araraloren_fake joined, BenGoldberg left
araraloren_fake good noon 04:46
04:58 wamba joined
todd Yes, I want to dump the buffer. Then wait for any key on the keyboard to be pressed (even the weird ones). The example would be great, but after the buffer was dumped. I can not figure out how to dump the buffer. 05:03
where is tris.pl6?
Found tris.pl6: github.com/ab5tract/Terminal-Print...es/tris.p6 05:10
nt seeing how to dump the keyboard buffer in tris.pl6. :'( 05:11
05:17 skids left 05:22 domidumont joined, Exodist left 05:23 Exodist joined 05:26 domidumont left 05:27 xtreak joined, domidumont joined
japhb Dump the buffer? You mean empty it of pending keystrokes? 05:36
todd Yes. But .......... if there are no keystrokes, do not hang/ 05:37
Maybe a better way of saying it would be to "clear strin" 05:38
"clear stdin" (Stinking typos) 05:39
In "C", it looks like : int c; while((c = getchar()) != '\n' && c != EOF); 05:41
japhb I don't think that's necessary. I think all that's needed is to change :DRAIN to :FLUSH in github.com/ab5tract/Terminal-Print...ut.pm6#L17 05:43
I could just support that as an option to raw-input-supply.
todd line 17?: Term::termios.new(:$fd).getattr.makeraw.setattr(:FLUSH); ?? 05:44
japhb Yeah. If that works for you, I can just add it as an optional arg to the whole function.
todd testing 05:45
YIPPEE! Thnak you! Perfect! 05:49
japhb OK, cool, I'll add that option.
todd Kaisen (constant improvement) in action! 05:50
05:55 xtreak left, xtreak joined 05:56 xtreak left 05:57 xtreak joined 06:01 silug left
japhb todd: 0.93 now available. 06:03
06:05 andrzejku joined 06:06 domidumont left
japhb OK, about time to call it for the night. 06:08
todd: If you have any other questions/requests, please .tell me since I only skim this channel and might miss it otherwise. 06:09
06:12 silug joined 06:20 nadim joined 06:21 domidumont joined 06:25 domidumont left 06:26 Cabanossi left 06:27 Cabanossi joined 06:29 domidumont joined 07:06 Lasse joined 07:07 darutoko joined 07:21 andrzejku left, jonas1 joined 07:25 Cabanossi left, eliasr joined
todd no new questions. I am cleaning ujp my example so that it makes sense to me 07:27
Thank you!
07:27 xtreak left, Cabanossi joined 07:28 xtreak joined, xtreak left, xtreak joined 07:33 zakharyas joined 07:42 xtreak left 08:06 shmibs left, tony-o left 08:08 shmibs joined, dogbert2 joined, tony-o joined 08:09 dogbert2 left 08:10 nightfrog left 08:11 Cabanossi left 08:12 Cabanossi joined 08:14 xtreak joined 08:21 llfourn left, wamba left 08:26 cgfbee left 08:32 cgfbee joined 08:33 leont joined 08:41 mr-foobar joined, mr-foobar left 08:42 todd left 08:56 ggoebel left 09:04 Skarsnik joined
samcv m: my $value = True; $value++; say $value 09:09
camelia True
09:09 ggoebel joined
samcv m: my $value = False; $value++; say $value 09:10
camelia True
lizmat m: my $value = True; $value--; say $value
camelia False
lizmat basically a consequence of:
m: say +True; say +False 09:11
camelia 1
0
lizmat with some magic added :-)
09:11 margeas joined 09:15 sproctor joined 09:23 wamba joined 09:26 Cabanossi left 09:28 Cabanossi joined 09:39 integral left 09:40 integral joined, integral left, integral joined 09:45 wamba left 09:56 Cabanossi left 09:58 Cabanossi joined 10:06 xtreak left 10:08 raydiak__ joined, zakharyas left 10:10 rindolf joined 10:11 xtreak joined 10:22 jonathon joined
jonathon hi! getting an error compiling moarvm=2017.08.1, "'MP_GEN_RANDOM_MAX' undeclared (first use in this function)" -> bpaste.net/show/bf22dff0e266 10:23
doing a grep the only reference to MP_GEN_RANDOM_MAX is the comparison on line 950 of math/bigintops.c 10:24
Skarsnik hm weird
10:24 Cabanossi left
Skarsnik What os ? 10:25
ilmari jonathon: did you do 'git submodule init'?
that's provided by 3rdparty/libtommath/tommath.h
jonathon ah 10:26
cool :)
10:26 ShalokShalom_ joined
jonathon let me try again 10:26
ilmari Configure.pl should do that for you, though
are you using a git checkout, or did you get the moarvm source some other way? 10:27
10:27 Cabanossi joined
jonathon i'm building a Debian/Ubuntu package, so libtommath would explain it 10:27
10:29 ShalokShalom left
ilmari if you want to to use the system versions of the bundled libraries, you need to use the various --has-foo options to configure 10:29
Skarsnik was there a perl6-toolchain channel for these question? 10:31
10:33 breinbaas left 10:34 breinbaas joined
jonathon there is indeed a #perl6-toolchain, i didn't know about that one :) 10:35
but i think the pointer to libtommath was all i needed
yup, i didn't have a new-enough libtommath1 in by chroot, moarvm has built correctly this time 10:36
so thank you! :)
10:38 TEttinger left 10:48 Ptolemarch left 10:49 Ptolemarch joined 10:53 llfourn joined 10:54 nadim left 11:08 nadim joined 11:09 wamba joined 11:28 piojo left
daxim <p6steve.wordpress.com/2017/08/18/p...eally/> when he writes: "demand for p6 is pent up", what is the intended meaning? "demand cannot be expressed"? "there is demand"? "there is no demand"? 11:36
yoleaux 4 Sep 2017 12:02Z <Zoffix> daxim: what browser is that on do you have any user styles enabled? I can't repro your issue
4 Sep 2017 12:11Z <Zoffix> daxim: nevermind, your browser just has custom font size set. I reverted the commit
11:36 rindolf left 11:37 scovit joined
jonathon if you read it as "pent up demand" it makes a little more sense 11:38
(as in, "pent up frustration")
11:44 skids joined 11:46 rindolf joined
scovit Hello, let's say you are making a module named A::B, if you put a symbol C "is export" in A::B, then you 'use A::B', and you can either directly type C, or the long version A::B::C. Correct? 11:46
what if I would like that A::B export the symbol in A, so that it can be accessed only by either A::C or A::B::C ? 11:47
11:47 awwaiid joined
timotimo A::B::C will only work if C is declared "our", i think 11:47
scovit timotimo, I am wondering if it is possible to create something akin to C++ namespaces 11:48
Skarsnik why would you want annoying c++ namespace? x)
scovit Skarsnik because otherwise people will have to type A::B::C 11:49
timotimo stuff that gets merged from anywhere and you can open and close them inside your files?
scovit while B is just a silly name
timotimo oh, so more the "using namespace" thing
Skarsnik What I would have wanted if more java package. where you can have stuff accessible to a whole package but not other code
scovit Skarsnik sorry don 11:50
't know that language
11:51 xtreak left
Skarsnik well you can have stuff that are private to a whole package. Like if you have a package Foo. you can have class/variable available for everything in Foo but not outside the package. 11:52
scovit Skarsnik I can imagine that can be useful, too.. 11:53
Skarsnik That why I don't like much C++ namespace, they don't provide much aside anti name collision 11:54
leont Yeah I miss «using namespace», or «using» in general 11:55
11:56 Cabanossi left
scovit but a using namespace in perl6 you already have antiname collision, namespaces would provide syntesis of names and regrouping 11:56
11:57 SHODAN left
scovit protection from external access is orthogonal to that 11:57
11:57 Cabanossi joined
Skarsnik I hope name collision get better warning. I remember defining a class map; and somewhere was a using namespace std; the warning was rather bad xD 11:57
well error
But I stopped doing C++ outside along with Qt 11:58
11:58 AlexDaniel left 11:59 AlexDaniel joined, sproctor left
scovit I'm a fan of C++. I am here asking because I have the impression that with Perl6 I need to choose between the C way of things: long variables names namespace-object-action or some silly namespace1-namespace2-namespace3-action. But I suspect there is also a more perlish way of doing... 12:05
namespace1::namespace2::namespace3::action I mean 12:06
Skarsnik It's more about what you want to expose 12:08
scovit let's suppose that namespace1 is "Qt" and namespace2 is "NativeCall". (no namespace3). I would be tempted to rename "namespace2" as "NC" just so that I dont have to retype the whole "NativeCall" everytime 12:09
or make everyting Qt-object-action by exporting everything in Qt::NativeCall 12:10
for sure I cannot keep Qt::NativeCall. It totally misses the important information (Qt)
while I would be happy to keep it in just Qt::
Skarsnik hm. Not sure how you can import symbol from a sub module 12:12
12:12 ignis joined
scovit Skarsnik that whole file -> symbol thing seems superunflexible to me 12:12
12:12 ignis left
Skarsnik maybe if you have access to the EXPORT array like in Perl 5 12:12
MasterDuke scovit: i think you can do something like 'my constant QtNC = Qt::NativeCall', which would at least reduce the number of characters to type
12:13 someuser joined
scovit MasterDuke interesting 12:13
MasterDuke i'm not sure exactly how to do it, but i'm pretty sure jnthn++ has showed examples before 12:15
Skarsnik scovit, docs.perl6.org/language/modules#UNIT::EXPORT::*
12:16 skids left, ChoHag joined 12:17 xtreak joined
samcv this isn't working for me: 12:19
use JSON::Fast:ver<0.4..*>;
even though i have a newer version than that. use JSON::Fast works fine
i have JSON::Fast:ver('0.9.2') 12:20
that is maybe the wrong notation? but it's used in JSON::Marshal and JSON::Class and i can't install anything for whatever reason 12:21
ugh
MasterDuke samcv: is your zef up to date? i thought there were some recent updates to it about version comparisons 12:23
samcv i just updated it
it's perl6 that is doing it thuogh
use JSON::Fast:ver<0.4..*>
doesn't work
and that's used in the module
12:26 araraloren_fake left
samcv MasterDuke, does that work on your machine? 12:26
MasterDuke samcv: yep 12:28
samcv huh
where do you install your perl6 12:29
MasterDuke in my home
samcv in ~/.perl6 or somewhere else
MasterDuke ~/Source/perl6/install/... 12:30
samcv i'm gonna flush my perl6 install directory and try reinstalling
i have no clue what's going on
if that doesn't work 'ill dump zef's
12:30 SHODAN joined
samcv or maybe i should try thta first 12:30
MasterDuke samcv: JSON::Fast isn't installed with zef on the machine i just tested with 12:31
i just used -I and pointed to a git checkout
samcv oh
well any other versioned module i guess. it's not working on me for any of them
at least using that syntax 12:32
12:32 ShalokShalom_ is now known as ShalokShalom
samcv well. ok dumping perl6 install folder and losing my insteled modules. then gonna retry 12:32
12:35 xtreak left, zakharyas joined 12:40 ChoHag left 12:51 mcmillhj joined 12:53 araraloren_fake joined 12:54 jeromelanteri joined 12:55 Cabanossi left, Skarsnik_ joined 12:57 Cabanossi joined 12:58 Skarsnik left 13:04 sproctor joined
jonathon where's the best place/channel to ask about zef behaviour? 13:04
13:05 census left, ChoHag joined
jonathon (it's picking up the flags moarvm was compiled with, need to know if it should be doing that, so i need to add some dependencies to its package, or if it shouldn't be) 13:05
lizmat #perl6-toolchain probably 13:07
jonathon ta
13:13 cdg joined 13:16 pmurias joined
pmurias samcv: is ucd2c.pl something that will be replaced by Perl 6 or should I change it? 13:16
scovit Almost there, now I get this error 'P6M Merging GLOBAL symbols failed: duplicate definition of symbol sajsadh', does it says anything to you?
I make a package, then use a package that uses that package 13:17
samcv pmurias, well eventually i am replacing it with perl 6
depends what you're trying to change/edit
13:17 llfourn left
pmurias samcv: I want to remove the property values aliases out of the list of property names 13:18
the ucd2c.pl script seems to also parse comments from the property aliases file :/
samcv well do you mean it doesn't parse and puts it into the data cause i know that issue 13:19
but it parses things after the # so it can make L/Letter = L*
for example
pmurias what is that used for? 13:20
samcv m: say "hi" ~~ /<:L>/
camelia 「h」
samcv m: say "h".uniprop
camelia Ll
samcv so anything L will match that
you're trying to change unicode_property_keypairs? 13:21
pmurias yes
samcv To remove property aliases? well you can't remove some of them. like for Script or for general categories aliases. why are you trying to remove them? 13:22
pmurias I want to remove the property value aliases 13:23
samcv so it doesn't resolve with unipropcode ?
i wouldn't do that. it'll break unimatch 13:24
pmurias I can fix unimatch once the nqp::unipropcode is no longer crap 13:25
samcv how are you going to fix it?
create some new data structure to hold property values?
i mean i'd like to have some opcode that returns an array of propcodes associated with a property value 13:26
though i guess you could solve it from rakudo but. that's going to be a lot slower 13:27
pmurias I can look it up in all properties
samcv what do you mean by that?
check every single property? 13:28
that's pretty wasteful?
pmurias, what's your end goal, what are you trying to achieve? you're trying to get certain things working on the JVM right? that is your goal? 13:30
13:31 AlexDaniel left 13:32 Skarsnik_ is now known as Skarsnik 13:33 pmurias left
samcv and if you want code to make something nqp level for jvm or something or want to play around, i wouldn't use ucd2c.pl i would use this: github.com/samcv/Unicode-Grant/tree/master/t 13:34
13:35 nadim left, nadim joined 13:36 jeromelanteri left
samcv i am going to be using those libs for my rewrite of the moarvm unicode database when that happens. i mean i think you should implement it using java, and not mess with moarvm until we figure out how we want to change the opcodes.we'll get the best performance if we have java code that does it on the jvm and c code on moarvm. though i'm all for sharing the code to generate some of it between VM's 13:39
13:39 pyrimidine left, pyrimidi_ joined 13:40 maettu left
samcv .tell pmurias i am going to sleep now. i'll talk with you more about this tomorrow. looks like you got disconnected, but check the log for my full response 13:40
yoleaux samcv: I'll pass your message to pmurias.
13:42 pyrimidi_ is now known as pyrimidine, maettu_ left
scovit Cannot import symbol A from B::A, because it already exists in this lexical scope. Is there a way to merge packages and check for conflicts inside? 13:44
13:50 skids joined, pmurias joined 13:55 nic20 joined
nic20 Hello \o 13:56
13:56 Cabanossi left 13:57 Cabanossi joined 13:59 araujo joined, araujo left, araujo joined 14:01 astj left, astj joined 14:06 astj left
nic20 Anyone know of a way to get the IP address of a request in Bailador? 14:07
14:08 maettu joined 14:10 maettu_ joined, astj joined 14:11 Skarsnik_ joined 14:13 Skarsnik__ joined 14:14 Skarsnik left 14:15 Kyo91_ joined 14:17 Skarsnik_ left 14:29 maettu_ left, maettu left 14:30 wamba left, Kyo91 joined 14:31 domidumont left, maettu_ joined 14:33 Kyo91_ left, sena_kun joined 14:38 skids left 14:39 tphblu joined 14:40 domidumont joined 14:43 wamba joined 14:45 maettu joined 14:49 rindolf left 14:50 rindolf joined, domidumont left 14:52 domidumont joined, jonathon left
tyil moritz, timotimo: my Bailador issue was due to an old code sample I copied, baile() doesnt accept arguments, it should be set in config.port 14:53
timotimo oh, huh! 14:55
that's a very bad failure mode :)
14:55 Cabanossi left 14:57 bdmatatu joined, Cabanossi joined 15:00 ruoso___ joined 15:03 khw joined 15:07 araraloren_fake left 15:26 Cabanossi left 15:27 Cabanossi joined 15:28 sproctor left 15:36 kerframil joined 15:41 troys joined 15:43 smls joined
smls m: my &a = (++$ + *).say; a 0; a 0; a 0; 15:44
camelia 1
2
3
smls This is intended, right?
i.e. that the ++$ operation becomes part of the WhateverCode, and isn't evaluated only once.
15:45 nic20 left 15:46 domidumont left
jnthn Yeah, if the + is being whatever-curried then the LHS is going to be pulled into the thunk as a whole 15:49
It's a compile-time transform
smls Ok, that means I can close another RT... :P
15:50 piojo joined
ruoso___ Hey jnthn... is there a known issues with proto rules and Grammar::Debugger? 15:51
I couldn't quite reduce it to a small-enough test case yet, but in complex grammars, it seems it ends up trying to invoke a null moar object 15:53
jsimonet m: my %data; dd %data{'foo'}:exists; 15:55
camelia Bool::False
jsimonet m: my %data; if True && %data{'foo'}:exists { } 15:56
camelia 5===SORRY!5=== Error while compiling <tmp>
You can't adverb &infix:<&&>
at <tmp>:1
------> 3my %data; if True && %data{'foo'}:exists7⏏5 { }
expecting any of:
pair value
ugexe precedence
jsimonet ok, so it is normal ?
ugexe m: my %data; if True && (%data{'foo'}:exists) { }
camelia ( no output )
ruoso___ Cannot invoke this object (REPR: Null; VMNull) on github.com/jnthn/grammar-debugger/...r.pm6#L116
ugexe yes
jsimonet It's weird :)
ugexe : is really loose 15:57
i never really use :exists that much because of that
dzove855 (2 15:58
jnthn ruoso___: Not aware of a specific issue in that area, no. Though I haven't touched it since the Cursor/Match unification, so it's possible that (or something else) has thrown it off
ruoso___ Ok... whenever I try to write a reduced version it doesn't show up 15:59
perlpilot ugexe: maybe you should be using `and` instead of `&&` ;-) 16:00
jsimonet ugexe: ok. Is it usefull to add something in the doc ? (docs.perl6.org/type/Hash#:exists) 16:01
ugexe jsimonet: its all adverbs 16:02
16:02 Ven`` joined, vendethiel- left
ugexe perlpilot: thats probably better than what I usually do (.EXISTS-KEY) 16:03
perlpilot ugexe: indeed. 16:04
jsimonet: I think it should be documented somewhere if it's not already. Though I'd expect it in docs.perl6.org/language/traps
oh, and it's there ... docs.perl6.org/language/traps#Adve...Precedence but maybe that could use a few more examples or some more words about the problem. 16:05
ugexe m: my @data; if True && @data[0]:exists { }; # not just hashes
camelia 5===SORRY!5=== Error while compiling <tmp>
You can't adverb &infix:<&&>
at <tmp>:1
------> 3my @data; if True && @data[0]:exists7⏏5 { }; # not just hashes
expecting any of:
pair value
perlpilot jsimonet: a link from everywhere that mentions specific adverbs back to that section on traps would be nice too. 16:07
jsimonet perlpilot: maybe :)
perlpilot: yep, it would be nice ! 16:08
16:10 skids joined 16:11 mcmillhj left 16:18 cdg left 16:21 cdg joined 16:23 piojo_ joined, zakharyas left 16:24 mcmillhj joined 16:25 dogbert17 joined 16:26 Cabanossi left, Lasse left, cdg left, piojo left 16:27 Cabanossi joined 16:28 hobbs left, hobbs joined, hobbs left, hobbs joined 16:29 mcmillhj left 16:33 nicq20 joined 16:35 scovit left, mcmillhj joined, maettu left, grondilu joined
maettu_ q 16:36
16:36 domidumont joined 16:37 maettu_ left 16:40 piojo_ left, piojo joined, mcmillhj left, shadoxx left 16:44 pyrimidine left, shadoxx joined 16:45 pyrimidine joined 16:48 pyrimidine left, pyrimidi_ joined 16:50 mcmillhj joined, pyrimidi_ left, pyrimidine joined 16:51 pmurias left, grondilu left, troys is now known as troys_ 16:52 piojo left, pmurias joined 16:53 piojo joined, eroux joined 16:54 mcmillhj left 16:56 Cabanossi left 16:58 robertle joined, Cabanossi joined, mcmillhj joined 17:00 riatre joined 17:07 piojo left 17:21 cdg joined 17:25 ggoebel left, Kyo91 left 17:28 troys_ is now known as troys 17:33 Kyo91 joined 17:34 kc0tjtn joined 17:38 ggoebel joined 17:39 wamba left 17:44 zakharyas joined 17:45 mcmillhj left 17:46 mcmillhj joined 17:49 cdg left
skids RT#124486 can be closed, if someone has the time/access to do so. 17:50
synopsebot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=124486
perlpilot skids: can you put a comment on the ticket with the appropriate test output that shows why it may be closed? 17:53
17:53 sena_kun left 17:55 Skarsnik__ is now known as Skarsnik
skids perlpilot: I cannot. It's one of those tickets that won;t let me do anything to it. 17:56
17:56 Lac123 joined
skids c73ee308 is the roast commit. 17:57
Lac123 I'm teaching myself Perl6 grammar. I can't find a way to do the following: allow a cmd to take several different optional parameters in any order but only once per parameter. e.g. allow "CMD A B C" and "CMD B A" but not "CMD A B A". What am I missing? (Obviously I could code every combination, but that seems longwinded). 18:00
Skarsnik probably not the job of the grammar 18:01
but what come after?
Lac123 do you mean termination character? or do you mean code-wise?
Skarsnik I don't know enought about grammar and language. but it's probably the part that came after to see that your 3 parameter are not valid? 18:02
18:03 zakharyas left
Lac123 well I was just hoping for a parse fail. Thinking about it, maybe I could have action methods that set and check a boolean flag per parameter and then force a fail (somehow). I just thought I was missing a way of capturing it in the grammar alone. I've not got on to the action stuff yet. 18:05
skids Lac123: I have not found a good way to do that in-grammar. 18:06
I wrote gist.github.com/skids/d1552470ba7c4ca6d318 two years ago, but maybe things have improved since then. 18:07
perlpilot Lac123: "flag per parameter" sounds wrong unless you mean in the sense that you have a hash-like thing. 18:09
(or set)
18:10 Cabanossi left
Lac123 skids: thank you, looks relevant, I'll read it thru 18:12
18:13 Cabanossi joined
skids ISTR someone also made a pretty good suggestion about adding a phaser that can trigger when an in-regex closure block gets backtracked over. 18:13
Lac123 i did trip over something that might be relevant if I fully understood it ("The Perl 5 ?...? syntax (succeed once) was rarely used and can be now emulated more cleanly with a state variable: $result = do { state $x ||= m/ pattern /; } # only matches first time" 18:15
18:18 Kyo91 left 18:21 Lac123_ joined, lancew joined 18:24 Kyo91 joined, Lac123 left 18:27 cdg joined 18:28 setty1 joined 18:32 wamba joined 18:35 andrzejku joined 18:41 pyrimidine left, ggoebel left 18:42 pyrimidine joined 18:46 pyrimidine left 18:47 tphblu left, pyrimidine joined 18:50 pyrimidine left 18:51 pyrimidine joined 18:53 pyrimidine left 18:54 pyrimidine joined, pecastro left 18:56 ggoebel joined, Cabanossi left 18:57 Cabanossi joined 18:58 pyrimidine left 19:00 pyrimidine joined 19:01 Lac123_ left 19:05 pyrimidine left, troys is now known as troys_ 19:07 AlexDaniel joined 19:08 pyrimidine joined 19:11 perlpilot left, cdg left, cdg joined 19:12 domidumont left 19:16 cdg left, darutoko left 19:17 Kyo91 left 19:18 espadrine joined 19:19 lancew left 19:20 cdg joined, hoelzro joined, robertle left 19:21 robertle joined 19:23 hankache joined
hoelzro o/ #perl6 19:23
long time no see!
19:24 kyan joined
timotimo yo ro 19:24
lizmat hoelzro o/
hoelzro I see you have all been very busy =)
o/ timotimo, lizmat 19:25
19:26 Kyo91 joined
tyil anyone knows how to get the request headers in bailador? 19:26
hoelzro so I have a quick question about a secret project (actually I have many questions) - does IO::Handle.getc implement a sort of "look ahead" buffer that would cause unbuffered results to lag a character behind what is typed?
19:26 Cabanossi left
lizmat hoelzro: if it's in utf-8 encoding, yes I believe 19:27
hoelzro ahhh
that explains what I'm seeing, then
19:27 Cabanossi joined
hoelzro thanks lizmat! 19:27
lizmat yw, just passing on what I learned from I believe timotimo earlier today 19:28
hoelzro transitive thanks to timotimo, then =)
jnthn hoelzro: Yes, it's for the sake of NFG; we can't spit out a grapheme until we know the next codepoint doesn't join with the current ones we've seen
hoelzro ahhhhhhh
well, that will make what I'm trying to do a lot more interesting 19:29
jnthn It's not specific to the UTF-8 decoder, though yes, that is where you're most likely to encounter the behavior, as latin-1 and ascii know that the only combining thing they have is \r\n
hoelzro thanks to you as well, jnthn! 19:32
19:32 pecastro joined
hoelzro so my next question is about creating NativeCall equivalents to static buffers in C structs - ex. struct termios { ... uint8_t c_cc[32]; } 19:34
skids commit: releases :a(Bool).perl 19:35
committable6 skids, ¦releases (22 commits): «»
hoelzro using CArray[uint8] doesn't work because that's heap allocated - is there a way to do this other than has uint8 $.c_cc0; has uint8 $.c_cc1; etc?
jnthn hoelzro: I kept meaning to get to github.com/MoarVM/MoarVM/pull/577 which I believe aims to do that... So many things and so little time :S 19:36
skids commit: releases :a(Bool).perl.say
committable6 skids, ¦2015.12,2016.01.1,2016.02,2016.03,2016.04,2016.05,2016.06,2016.07.1,2016.08.1,2016.09,2016.10,2016.11,2016.12,2017.01,2017.02,2017.03,2017.04.3,2017.05: «:!a» ¦2017.06,2017.07,2017.08,HEAD(760530a): «:a(Bool)»
jnthn Oh wait
That's the wrong way around for what you want
that's flat structs in an array 19:37
You want flat array in structs
hoelzro yup!
I'm currently just unrolling by hand and providing a method to proxy the array's contents - it's ugly but it works
Xliff I had to do that as well
\o hoelzro 19:38
19:38 cdg left, hankache left
timotimo if you're doing stuff with termios, have you looked at Terminal::Print? 19:39
hoelzro o/ Xliff
hoelzro looks
19:42 TEttinger joined 19:43 jonas1 left 19:44 ggoebel left 19:45 kyan left 19:55 Cabanossi left, kyan joined 19:57 Cabanossi joined, troys_ is now known as troys 20:05 rindolf left 20:06 sftp left 20:07 perlpilot joined 20:08 sftp joined 20:09 andrzejku left 20:10 troys left 20:12 Kyo91 left 20:13 nohuhu joined 20:16 DrParis_ joined 20:17 Caelum left, timeless_ joined 20:18 lumimies_ joined, PotatoGim_ joined 20:19 freeze_ joined, Brock joined, brimonk_ joined, kubrat_ joined, plicease_ joined, mithaldu__ joined 20:22 ccakes_ joined, charsbar_ joined, sftp_ joined 20:23 cdg joined 20:24 sftp left, awwaiid left, silug left, ilmari[m] left, committable6 left, wictory[m] left, pm51 left, charsbar left, kubrat left, brimonk left, timeless left, lumimies left, gdonald left, freeze left, DrParis left, ccakes left, plicease left, JimmyZ left, leedo left, ggherdov left, NeuralAnomaly left, dg left, sftp_ is now known as sftp, lumimies_ is now known as lumimies, charsbar_ is now known as charsbar, DrParis_ is now known as DrParis, mithaldu__ is now known as mithaldu_, timeless_ is now known as timeless, PotatoGim_ is now known as PotatoGim, nativecallable6 left, releasable6 left 20:26 dg joined 20:27 lancew joined 20:28 zakame left, kc0tjtn left
hoelzro is there a simple way to make a byte-for-byte copy of a CStruct? 20:28
timotimo define a memset native sub that takes that struct :P 20:29
and use nativesizeof to get the right number of bytes
Skarsnik hm $var = $var2 should do a copy? x)
hoelzro that's kinda what I figured - thanks timotimo!
timotimo Skarsnik: not for CStruct; this is perl6, not C 20:30
hm. does assignment copy structs in C?
maybe only in the newer C versions?
Skarsnik yes
20:30 pm51 joined 20:31 JimmyZ joined
timotimo i mean, we totally could support assignment from struct to struct, but our structs are usually in scalar containers which means you'll get the store functionality of the scalar rather than what the cstruct could do 20:31
Skarsnik haha
static void copy_to(MVMThreadContext *tc, MVMSTable *st, void *src, MVMObject *dest_root, void *dest) {
MVM_exception_throw_adhoc(tc, "cloning a CStruct is NYI");
timotimo that seems like too much magic
oh, right, .clone
that makes a whole lot more sense
20:31 leedo joined
Skarsnik should be possible to have a cline actually 20:32
maybe it's not good for the GC?
timotimo why would the gc complain?
20:32 gdonald joined
Skarsnik Dunno. I have no idea how it work 20:32
20:33 wictory[m] joined
Skarsnik I feel it should not be hard to implement clone 20:33
timotimo yeah
20:33 ilmari[m] joined
hoelzro timotimo: I think it *does*, but I don't know if that's C89 behavior 20:34
Skarsnik since like the code in nativecall_refresh manage to go through each field addr
timotimo we still need something to track ownership, though, right?
hoelzro I think part of it might be that parts of the struct might be referring to things that shouldn't have duplicate reference 20:35
Skarsnik There is probably a managed attribute like for CArray
20:35 Kyo91 joined
hoelzro since it's the wild wild west in there 20:35
Skarsnik Well ptr value are copied
teatime afaik struct assignment is fine in C
obv. it is not a deep clone
timotimo hoelzro: all cloning we do is shallow
hoelzro right 20:36
timotimo Skarsnik: oh, do we actually have a managed attribute for those. neat
that decides whether it'll grow the underlying storage blob with realloc if we access something "out of bounds"? 20:37
hoelzro I would just guess that instead of assuming that cloning works fine for *all* the structs, just report it as an error and have the user figure out the proper way to clone them
timotimo i wouldn't say that
Skarsnik github.com/MoarVM/MoarVM/blob/mast.../CStruct.h hm does not seems CStruct has this
timotimo it's quite a useful thing to have, and the user shouldn't be expecting anything different from how other things clone
i recently got a mean double-free from casting from a pointer to a carray and then casting the carray to a carray of different type or something like that 20:38
Skarsnik hu 20:39
20:39 leah2 left, silug joined
hoelzro every time I see "carray" I think "harry caray" =P 20:40
Skarsnik I had issue when trying to use typed pointer in gumbo and doing .unref instead of calling nativecast directly (was a long time ago) maybe ncast is not that safe? 20:41
20:41 Kyo91 left
tbrowder .tell timotimo using perl6-debug did the trick--i had stopped wrking on some old code in a hurry and left an incomplete statement with an open '<' at the end of a line which caused the problem. thanks! 20:42
yoleaux tbrowder: I'll pass your message to timotimo.
20:42 leah2 joined
timotimo interesting. good to know! 20:44
yoleaux 20:42Z <tbrowder> timotimo: using perl6-debug did the trick--i had stopped wrking on some old code in a hurry and left an incomplete statement with an open '<' at the end of a line which caused the problem. thanks!
20:44 mcmillhj left 20:45 eliasr left 20:46 cdg left, mcmillhj joined
skids hoelzro: image.slidesharecdn.com/evolutiono...47-638.jpg <-- probably why. 20:50
20:50 Caelum joined 20:51 zacts left
Skarsnik C is a good portable assembler x) 20:54
20:54 zacts joined 20:56 Cabanossi left
Skarsnik skids, do you have the link to this presentation? 20:56
20:56 cdg joined 20:57 Cabanossi joined 20:58 skids left 20:59 bdmatatu left 21:01 cdg left
smls .seen TimToady 21:10
yoleaux I saw TimToady 17:55Z in #perl6-dev: <TimToady> of course, we could always just say it's a DIHWIDT if 'native' comes too early too
smls .tell TimToady Is it intended that LTM prefers \d and <[0..9]> over <digit> and <:Number>, as a tie-breaker? (re. RT #130612)
synopsebot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=130612
yoleaux smls: I'll pass your message to TimToady.
21:10 u-ou joined 21:13 smls left 21:14 smls_ joined, smls_ is now known as smls 21:16 Skarsnik left
lizmat and another Perl 6 Weekly hits the Net: p6weekly.wordpress.com/2017/09/11/...ng-sorted/ 21:18
21:18 ugexe joined 21:26 espadrine left 21:27 mcmillhj left 21:28 setty1 left, perlpilot_ joined 21:29 perlpilot left 21:31 nativecallable6 joined, releasable6 joined, zakharyas joined 21:39 Aaronepower left
Geth ecosystem: Tyil++ created pull request #365:
Add IRC::Client::Plugin::Github
21:41
21:48 zakharyas left 21:49 kyan left
Geth ecosystem: d0be49be1e | (Patrick Spek)++ | META.list
Add IRC::Client::Plugin::Github
21:52
ecosystem: 9b58955aaf | lizmat++ (committed using GitHub Web editor) | META.list
Merge pull request #365 from Tyil/add-IRC-Client-Plugin-Github

Add IRC::Client::Plugin::Github
21:55 Cabanossi left
hoelzro lizmat++ # title 21:56
21:57 Cabanossi joined, wamba left 21:59 pmurias left 22:05 lancew left 22:08 kerframil left
TimToady .tell smls no, that wasn't intended 22:11
yoleaux 21:10Z <smls> TimToady: Is it intended that LTM prefers \d and <[0..9]> over <digit> and <:Number>, as a tie-breaker? (re. RT #130612)
synopsebot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=130612
yoleaux TimToady: I'll pass your message to smls.
22:13 smls left 22:14 Kyo91 joined
jnthn m: say '1' ~~ / \d | <digit> { say 'digit' }/ 22:15
camelia 「1」
jnthn m: say '1' ~~ / <digit> { say 'digit' } | \d /
camelia 「1」
jnthn Interesting
Though I can guess why
m: say '1' ~~ / \d | <:N> { say 'digit' }/
camelia 「1」
jnthn m: say '1' ~~ /<:N> { say 'digit' } | \d/
camelia 「1」
22:15 ggherdov joined
jnthn That one I don't understand 22:16
22:17 committable6 joined, lancew joined 22:18 kyan joined 22:19 Kyo91 left 22:21 pyrimidine left 22:22 pyrimidine joined 22:23 lancew left, lancew joined 22:24 pyrimidine left, pyrimidi_ joined 22:28 pyrimidi_ left 22:29 pyrimidine joined 22:31 _28_ria left 22:32 lancew left, pyrimidi_ joined 22:33 pyrimidine left 22:34 someuser left 22:36 pyrimidine joined, pyrimidi_ left 22:40 pyrimidine left 22:41 pyrimidine joined 22:45 pyrimidine left 22:46 pyrimidine joined, _28_ria joined 22:49 pyrimidine left, pyrimidine joined 22:52 leont left 22:53 pyrimidine left 22:57 pyrimidine joined 22:58 skids joined 23:02 pyrimidine left 23:10 Cabanossi left 23:12 Cabanossi joined 23:14 pyrimidine joined, MasterDuke left 23:17 pyrimidi_ joined 23:18 pyrimidine left 23:44 pilne joined 23:45 cdg joined 23:51 cdg left 23:54 raschipi joined 23:56 Cabanossi left, ChoHag left 23:58 Cabanossi joined, margeas left 23:59 MasterDuke joined