»ö« 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:08
nadim left
00:21
BenGoldberg joined
00:27
Cabanossi left
00:28
Cabanossi joined
00:29
committable6 left,
committable6 joined
00:30
releasable6 left,
nativecallable6 left,
bisectable6 left,
bloatable6 left,
coverable6 left,
coverable6 joined,
bloatable6 joined,
releasable6 joined,
bisectable6 joined,
nativecallable6 joined
00:35
cdg joined
00:39
luis left,
cdg left
00:43
luis joined
00:56
raiph joined
01:10
bisectable6 left,
unicodable6 left,
squashable6 left,
benchable6 left,
committable6 left,
bloatable6 left,
coverable6 left,
releasable6 left,
evalable6 left,
quotable6 left,
statisfiable6 left,
greppable6 left,
nativecallable6 left,
bloatable6 joined,
unicodable6 joined,
quotable6 joined,
evalable6 joined,
committable6 joined,
benchable6 joined,
bisectable6 joined,
releasable6 joined,
greppable6 joined,
nativecallable6 joined,
squashable6 joined,
ChanServ sets mode: +v squashable6,
statisfiable6 joined,
Cabanossi left
01:11
coverable6 joined,
ChanServ sets mode: +v coverable6
01:13
Cabanossi joined
01:17
rouking joined,
raiph left
|
|||
rouking | How do I pass each element in an array as a separate argument to a subroutine? e.g. `my @args = 'arg1', 'arg2'; my-sub(???)` | 01:19 | |
(the arity of the subroutine is unknown at compile time) | 01:20 | ||
ugexe | my-sub(|@args) | ||
rouking | Aha | 01:21 | |
I knew I had seen some easy way somewhere | |||
thanks | |||
01:26
rouking left
01:30
ttkp6 left
01:36
zakame joined
01:38
er2 joined
01:40
cdg joined
01:42
kaare_ left
01:43
llfourn joined
01:44
cdg left
01:45
ilbot3 left
01:46
kaare_ joined
01:50
snarkyboojum joined
01:55
ilbot3 joined,
ChanServ sets mode: +v ilbot3
01:56
Cabanossi left
01:57
Cabanossi joined
02:12
noganex_ joined
02:15
noganex left
02:19
rouking joined
02:20
huajie-hu joined
02:22
nexi joined
02:25
nexi left
|
|||
Geth | doc: 5282c57cfb | (Will "Coke" Coleda)++ | xt/code.pws learn new code |
02:26 | |
02:26
Cabanossi left
02:27
Cabanossi joined
02:28
jeek joined
02:34
cdg joined
02:35
raschipi left
02:37
rouking left
02:38
cdg left
02:52
huajie-hu left
02:55
Cabanossi left
02:57
Cabanossi joined
03:02
huajie-hu joined
03:05
skids left
03:09
huajie-hu left
03:20
huajie-hu joined
03:24
Cabanossi left
03:26
huajie-hu left,
AlexDaniel left
03:27
AlexDaniel joined,
Cabanossi joined
03:40
Cabanossi left
03:41
Cabanossi joined
03:49
dogbert17 left
04:08
Khisanth left
04:15
er2 left
04:21
Khisanth joined
04:24
Cabanossi left
04:26
Cabanossi joined
04:47
BenGoldberg left
04:56
Cabanossi left,
Cabanossi joined
05:01
khw left,
pilne left
05:03
xtreak joined
05:08
eroux left
05:15
Kyo91 joined
05:19
Kyo91 left
05:39
domidumont joined
05:42
kyan left
05:45
domidumont left
05:46
domidumont joined
05:52
nohuhu left
05:54
Cabanossi left
05:56
Cabanossi joined
06:07
cuonglm joined
06:11
espadrine joined
06:20
xtreak left
06:21
domidumont left
06:23
cuonglm left,
llfourn left
06:24
Cabanossi left
06:26
Cabanossi joined
06:33
wamba joined
06:37
piojo joined,
domidumont joined
|
|||
piojo | Did the way the REPL interacts with the terminal change recently? Some time in the past month, the REPL stopped working in cygwin and msys | 06:38 | |
it's still fine in cmd.exe, and cygwin/msys can still run "perl6 -e ..." | |||
And using rlwrap doesn't help. | 06:39 | ||
06:41
tinita left,
tinita joined
06:56
espadrine left,
Cabanossi left,
Cabanossi joined
07:00
jonas1 joined
07:01
HTTP_____GK1wmSU joined
07:04
HTTP_____GK1wmSU left
07:09
pyrimidi_ left,
pyrimidine joined
07:10
piojo left
07:12
pecastro left
07:16
darutoko joined,
piojo joined
07:17
HTTP_____GK1wmSU joined
07:18
zakharyas joined
07:20
HTTP_____GK1wmSU left
07:25
Cabanossi left
07:26
Cabanossi joined
07:29
perlpilot_ left
07:30
pecastro joined,
perlpilot_ joined,
jeek left
|
|||
lizmat clickbaits p6weekly.wordpress.com/2017/09/11/...ng-sorted/ | 07:31 | ||
jast | nice title | ||
07:35
jeek joined
07:41
dakkar joined
07:52
ChoHag joined
07:53
leont joined
07:55
Cabanossi left,
wamba left
07:57
Cabanossi joined
07:59
zakharyas left,
zakharyas joined
08:00
xtreak joined
08:03
_28_ria left
08:04
xtreak left
08:05
margeas joined
08:07
_28_ria joined
08:12
pyrimidine left,
pyrimidi_ joined
08:20
Hor|zon left,
zakharyas1 joined
08:22
zakharyas left
|
|||
piojo | When compiling rakudo, is there any automatic way to choose a correct revision of NQP to build against? | 08:23 | |
08:24
xtreak joined
08:25
xtreak_ joined,
xtreak left
08:26
_28_ria left,
zakharyas1 left
08:27
_28_ria joined
08:28
zakharyas joined
08:30
xtreak_ left
08:40
pmurias joined
08:41
wamba joined,
llfourn joined
|
|||
pmurias | samcv: I think I'll just implement how I want to nqp::unipropcode to work on the js backend and once stuff works there we can think how that stuff should work on MoarVM | 08:42 | |
yoleaux | 11 Sep 2017 13:40Z <samcv> 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 | ||
08:47
robertle left
08:49
DrParis is now known as parisba
08:50
cdg joined
08:51
nowan left
08:55
nowan joined,
cdg left,
Cabanossi left
08:56
cdg joined,
domidumont left,
aborazmeh joined,
aborazmeh left,
aborazmeh joined,
Cabanossi joined,
domidumont joined
09:00
cdg left
09:07
zakharyas left
09:10
leont left
09:12
xtreak joined,
xtreak left,
xtreak joined
09:13
zakharyas joined
|
|||
daxim | I am sad that I got ignored and my hopes were disappointed irclog.perlgeek.de/perl6/2017-04-04#i_14372592 | 09:13 | |
09:23
zakharyas left
09:42
HTTP_____GK1wmSU joined
09:45
HTTP_____GK1wmSU left
09:49
mr-foobar joined
09:58
TEttinger left,
eliasr joined
10:05
second_ joined
10:07
second_ left
10:19
timotimo left
|
|||
samcv | ok pmurias. so is it going to work for Property names themselves + General Category + Script values? | 10:21 | |
plus unions like Letter for Ll and Lo and Lu | 10:22 | ||
10:22
zakharyas joined
|
|||
samcv | that is what I think it should do at least | 10:22 | |
10:26
ShalokShalom_ joined
10:29
ShalokShalom left
10:30
ShalokShalom_ is now known as ShalokShalom
|
|||
pmurias | samcv: nope, we need one for property names only | 10:45 | |
Even for unimatch do we want to allow unimatch('A', 'Latin', 'English') as a way to match Latin? | 10:46 | ||
10:47
Ptolemarch left
10:48
Ptolemarch joined
|
|||
samcv | that wouldn't match since there is no english property | 10:48 | |
10:48
piojo left
10:49
nadim joined
|
|||
samcv | pmurias, but that is fine by me if you do that. :) totally fine with there being an op which specifically only does properties | 10:49 | |
lizmat | daxim: would you care to elaborate ? | 10:55 | |
daxim | I hoped to be able to do <paste.debian.net/925841/> after the grant in perl6 | 10:58 | |
11:04
aborazmeh left
|
|||
lizmat | isn't that more what :ignoremark is supposed to do ? | 11:06 | |
11:08
timotimo joined
|
|||
timotimo | #moarvm | 11:08 | |
er | |||
daxim | not quite | 11:10 | |
p6: 'Ə' ~~ m:ignoremark/E/ | |||
camelia | ( no output ) | ||
daxim | the magic is in the amended table | 11:11 | |
11:12
Skarsnik joined
11:25
Cabanossi left
|
|||
samcv | it's not an E though | 11:26 | |
it's classified as a different distinct letter than E is | |||
in unicode collation algorithm | |||
11:26
Cabanossi joined
|
|||
Skarsnik let watch my vps die as I update 2 version of debian stable | 11:26 | ||
samcv | m: for <PRIMARY SECONDARY TERTIARY> { for <E Ə> -> $e { say $e, ' ', $e.uniprop("MVM_COLLATION_$_") } | 11:27 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Missing block at <tmp>:1 ------> 3e, ' ', $e.uniprop("MVM_COLLATION_$_") }7⏏5<EOL> |
||
lizmat | blogs.perl.org/users/lichtkind/2017...erl-6.html | ||
samcv | m: for <PRIMARY SECONDARY TERTIARY> { for <E Ə> -> $e { say $e, ' ', $e.uniprop("MVM_COLLATION_$_")} } | ||
camelia | E 7441 Ə 7460 E 33 Ə 33 E 9 Ə 9 |
||
Skarsnik | what is collation btw? x) | 11:28 | |
samcv | string sorting | 11:29 | |
with the unicode collation algorithm you can sort things in a basically codepoint number agnostic way | |||
Skarsnik | fun ^^ | 11:30 | |
I am curious what kind of people use the unicode stuff x) | |||
samcv | m: use experimental :collation; dd <æ a ae af fi fi fe fn ff>.collate | ||
camelia | ("a", "ae", "æ", "af", "fe", "ff", "fi", "fi", "fn").Seq | ||
samcv | m: use experimental :collation; dd <æ a ae af fi fi fe fn ff>.sort | ||
camelia | ("a", "ae", "af", "fe", "fi", "fn", "æ", "ff", "fi").Seq | ||
samcv | compare | ||
m: use experimental :collation; dd <æ a á ā A Á Z r t u v>.collate | 11:31 | ||
camelia | ("a", "A", "á", "Á", "ā", "æ", "r", "t", "u", "v", "Z").Seq | ||
samcv | diacritics sort properly too | ||
and it can also assinn multiple collation values to single codepoints, or assign single collation values to multiple codeponits | |||
so æ sorts right after 'ae' | 11:32 | ||
because it has two collation array elements | |||
and ff has two as well, so sorts with ff | |||
① will sort after 1 as well. and punctuation will sort together. so instead of sorting by codepoint it sorts in human ways | 11:33 | ||
and i also allow you to configure each level | |||
Skarsnik, read docs.perl6.org/language/experiment...ion_Levels the last section #Collation Levels | 11:34 | ||
11:35
scovit joined
|
|||
scovit | please correct me if I am wrong: it is a well known fact that multi-dispatch don't work with native types? | 11:36 | |
samcv | which native types? | ||
but it should work | 11:37 | ||
i've used separate ones for int and Int before | |||
though i haven't tried every one. str and int work at least | |||
lizmat | m: multi sub a(int $a) { "int" }; multi sub a(Int $a) { say "Int" }; say a 42 # counter-intuitive maybe ? | 11:38 | |
camelia | int | ||
lizmat | hmmm... I seem to recall that would call the Int candidate | ||
timotimo | right, we had a change for that a month or three ago | ||
the case you have there is where the optimizer is able to figure it out | 11:39 | ||
and the optimizer knows the difference between a literal and "just" a value | |||
samcv | releasable6, status | ||
releasable6 | samcv, Next release in 4 days and ≈7 hours. 1 blocker. Changelog for this release was not started yet | ||
samcv, Details: gist.github.com/206158483d98fc98be...c3390364d5 | |||
scovit | m: multi a(int \m, int \n) { say m }; multi a(Str $uno) { say $uno }; say a 3, 1; # is it expected? | ||
camelia | Cannot resolve caller a(Int, Int); none of these signatures match: (int \m, int \n) (Str $uno) in block <unit> at <tmp> line 1 |
||
scovit | m: multi a(Int \m, Int \n) { say m }; multi a(Str $uno) { say $uno }; say a 3, 1; # is it expected? | ||
camelia | 3 True |
||
samcv | cool will be able to get the collation stuff, and get in fixing case changes and ignoremark when there's prepend characters to the release | ||
jnthn | scovit: Yes | 11:40 | |
samcv | plus all the huge string speed improvements :) | ||
jnthn | scovit: A native multi can only be reliably called when the operands are stored in natively typed variables | 11:41 | |
scovit | jnthn good, thanks | ||
jnthn | scovit: As a convenience, for multi subs only (because that's the only case we can analyze statically), when one argument is a literal and the other is declared as natively typed, we'll turn the literal into a native also | 11:42 | |
Otherwise you'd not be able to write $native-int + 1 | |||
So we allow the literal to be allomorphic, but only if there's a known native | |||
lunch & | 11:43 | ||
11:45
timotimo left,
S007 left
11:46
timotimo joined
11:49
pmurias left
11:51
pmurias joined,
S007 joined
11:54
Cabanossi left
11:56
Cabanossi joined
11:57
xtreak left
11:58
xtreak joined
12:00
xtreak left
12:01
xtreak joined
|
|||
samcv | oh wow rakudo has no ordbaseat op. we need an op that does the same thing | 12:02 | |
to find the base codepoint or character in a certain string. or converts the whole string to base characters | |||
both maybe hm | |||
like substr but with returning the base codepoint | 12:03 | ||
timotimo | you can turn "the whole string" that you get from substr($foo, $n, 1) into base characters and grab the first one | ||
12:07
MrWhistler joined
|
|||
[Coke] | .tell piojo - if you use rakudo's Configure.pl --gen-nqp it will automatically insure you have the appropriate version of nqp available. (it won't update if it finds a version that is new enough) | 12:10 | |
yoleaux | [Coke]: I'll pass your message to piojo. | ||
12:11
MrWhistler left
12:19
xtreak left
12:25
Cabanossi left
12:26
Cabanossi joined
|
|||
scovit | trait 'is pure' is for compile-time execution. What would be the opposite, e.g. enforcing runtime execution at least in module compilations? | 12:35 | |
where runtime execution is delayed execution | |||
problem is with a nativecall which get executed at compiletime, but whish I do not wish that it does so because of the untrackable side effects | 12:36 | ||
jnthn | How are you ending up with it called at BEGIN time anyway? | 12:38 | |
It'd have to appear in a constant or BEGIN or trait argument or similar for that to happen | |||
So the answer would be "don't do that" | 12:39 | ||
scovit | ok, it is in a constant.. right | ||
basically I was forcing it to do so | 12:40 | ||
jnthn | constant means "at BEGIN time" | ||
If you don't want something to happen then, don't use constant. | |||
Skarsnik | hm constant are compile time for module? | ||
jnthn | Yes | 12:41 | |
So once it's precompiled, that compuation doesn't have to happen again | |||
Skarsnik | but BEGIN in a module is run evertime you load the module? | ||
jnthn | No | ||
It's ran when the module is compiled | |||
b2gills | If you want something that seems like it is a constant textually, you could use `sub term:<foo> () { (42,'bar').pick }` | ||
jnthn | INIT is run every time you load the module | ||
12:51
llfourn left
|
|||
scovit | jnthn it is a defect of the module I uploaded last week (NativeHelpers::CBuffer). If you assign it to a constant in a module is gonna be SEGFAULT. Is there a way to detect this condition? | 12:53 | |
in order to bailout | |||
jnthn | Hmm | ||
What that really means I guess is "check if the compiler is in dynamic scope" | 12:54 | ||
I can't off-hand thing of a standard way to do that | 12:55 | ||
A total cheat way is probably | |||
scovit | the module is a cheat already | ||
12:55
mcmillhj joined
|
|||
jnthn | m: say defined $*W; | 12:55 | |
camelia | False | ||
jnthn | m: BEGIN say defined $*W; | ||
camelia | 1 | ||
jnthn | So you can use truth of defined($*W) to know the compiler is running. It's Rakudo specific, but at least if someting changes it'd degrade into the same situation as without it | 12:56 | |
scovit | I think it is ok for now | ||
Geth | doc: 592c43b7ff | MasterDuke17++ (committed using GitHub Web editor) | doc/Language/performance.pod6 Add column name to SQL profile example |
12:57 | |
[Coke] | jnthn: should I be annoyed that it's False and 1? :) | ||
jnthn | No | 12:59 | |
sub defined delegates to .defined and $*W is an NQP object, not a Perl 6 one | |||
And NQP doesn't have real booleans | |||
13:06
pyrimidi_ left,
pyrimidine joined
|
|||
pmurias | what font should I use in my terminal that can display weird unicode charaters | 13:15 | |
13:16
brimonk_ left,
brimonk_ joined,
brimonk_ is now known as brimonk
|
|||
pmurias | ? | 13:17 | |
ilmari[m] | Install Symbola, and it should fall back to that for characters not in your main font | 13:19 | |
13:20
cdg joined
|
|||
MasterDuke | i think Noto has a lot of the unicode symbols | 13:23 | |
13:24
Cabanossi left
13:26
Cabanossi joined
13:28
virtualsue joined
13:34
John joined,
John is now known as Guest64290,
nightfro- joined
13:36
ntinos left
13:37
nightfro- is now known as nightfrog
13:46
xtreak joined
13:53
bdmatatu joined
13:54
kubrat_ left
14:00
pyrimidine left
14:01
pyrimidine joined
14:06
rindolf joined
14:07
margeas left
14:09
Cabanossi left
14:11
Cabanossi joined
14:15
wamba left
14:19
rindolf left
14:20
stmuk joined
|
|||
scovit | jnthn $*W seems to be always there during module loading | 14:20 | |
m: class ore { method new(Int $a) { if ($*W) { my $block := { self.new($a + 1); }; $*W.add_object($block); $*W.add_phaser(Mu, "INIT", $block, class :: { method cuid { (^2**128).pick }}); } else { say $a; return $a; }; } }; constant b = ore.new(1); | |||
camelia | 2 | ||
scovit | would be possible to bind the output of the INIT phaser to b? | 14:21 | |
m: class ore { method new(Int $a) { if ($*W) { my $block := { self.new($a + 1); }; $*W.add_object($block); $*W.add_phaser(Mu, "INIT", $block, class :: { method cuid { (^2**128).pick }}); } else { say $a; return $a; }; } }; constant b = ore.new(1); say b | |||
camelia | 2 No such method 'gist' for invocant of type 'QAST::Op'. Did you mean any of these? isa list in block <unit> at <tmp> line 1 |
||
14:21
stmuk_ left
|
|||
jnthn | scovit: Yeah, it will be | 14:24 | |
14:24
mr-foobar left
|
|||
jnthn | Since the compiler is loading the module as a result of compiling the script that uses it | 14:25 | |
scovit | yea, I was guessing so | ||
14:26
mr-foobar joined
14:27
rindolf joined
14:29
cdg left
14:35
piojo joined
14:38
Kyo91 joined
14:48
skids joined
|
|||
ruoso___ | So, in my quest to write a fortran parser, I need to be able to parse statement labels... gist.github.com/anonymous/45bc0452...572968e895 is what I have come up with, but I wonder if there's a less terrible way of writing it... | 14:53 | |
14:55
Cabanossi left,
mr-foobar left
|
|||
ruoso___ | oh, shoot... that's actually wrong... statement labels can also have spaces in the middle of the number... | 14:56 | |
14:56
mr-foobar joined,
Cabanossi joined
|
|||
ruoso___ | so, that means the rule can actually be simpler... | 14:57 | |
moritz | ruoso___: if it weren't for the rule change, you could have implemented that as .**6 & [' '* \d+ ' '*] | 14:58 | |
so a sequence of spaces, digits, spaces that is also 6 characters long | |||
ruoso___ | oh, neato | ||
Didn't know about that feature | 14:59 | ||
moritz | or of course use an assertion, <?{ $<somecapture>.chars == 6 }> | ||
& is very useful on some cases | |||
another use case is "a quoted string that doesn't contain an x" | |||
<quoted_string> & <-[x]>* | 15:00 | ||
ruoso___ | nice | ||
scovit | m: use nqp; class ore { method new(Int $a) { if ($*W) { my $block := { nqp::bindkey(CALLER::, "b", self.new($a + 1)); }; $*W.add_object($block); $*W.add_phaser($/, "INIT", $block, class :: { method cuid { (^2**128).pick }}); } else { say $a; return $a; }; }; }; constant b = ore.new(1); say ::<b> # Might be just utterly broken code, dont know enough of this language | 15:05 | |
camelia | 2 2 |
||
scovit | # but what is missing is a way to invalidate the lexical cache and to retireve the symbol "b" from $*W, any help? | ||
15:05
pyrimidine left
15:06
pyrimidine joined
15:07
someuser joined
|
|||
moritz | scovit: werm, what do you want to achieve? | 15:08 | |
scovit | moritz it's an hack. I want to achieve to postpone the assignment of the constant b to after compilation | 15:10 | |
there are two problems: 1. how does ore know about the symbol "b" (e.g. the name of the constant) | 15:11 | ||
2. m: use nqp; class ore { method new(Int $a) { if ($*W) { my $block := { nqp::bindkey(CALLER::, "b", self.new($a + 1)); }; $*W.add_object($block); $*W.add_phaser($/, "INIT", $block, class :: { method cuid { (^2**128).pick }}); } else { say $a; return $a; }; }; }; constant b = ore.new(1); say b # this, b for some reason is not the same as ::<b> I suspect a chaching issue | 15:12 | ||
m: use nqp; class ore { method new(Int $a) { if ($*W) { my $block := { nqp::bindkey(CALLER::, "b", self.new($a + 1)); }; $*W.add_object($block); $*W.add_phaser($/, "INIT", $block, class :: { method cuid { (^2**128).pick }}); } else { say $a; return $a; }; }; }; constant b = ore.new(1); say b # | |||
camelia | 2 No such method 'gist' for invocant of type 'QAST::Op'. Did you mean any of these? isa list in block <unit> at <tmp> line 1 |
||
15:13
pyrimidine left,
pyrimidine joined
|
|||
moritz | scovit: re 1, it doesn't. That's what encapsulation and separation of concerns etc. is all about | 15:13 | |
jnthn | 12:40 < jnthn> constant means "at BEGIN time" | 15:14 | |
12:40 < jnthn> If you don't want something to happen then, don't use constant. | |||
Further, every time the constant is mentioned in code, it will be resolved to the constant value it was set to at BEGIN time | |||
As part of the compilation | |||
scovit | ok, was just crazy for 1/2 an hour, sorry | 15:16 | |
15:17
cdg joined,
kyan joined
|
|||
scovit | I realize the practical impossibility jnthn | 15:17 | |
15:18
jonas1 left
|
|||
jnthn | Yeah, to be fair sometimes "don't do X" means "IMO it's a really bad idea", but in this case it was really one of the "it's actually impossible" cases :-) | 15:19 | |
15:23
xtreak left
|
|||
scovit | .oO(installing a random number in b, and using NativeCall to find and scan the bytecode and substitute all references to this number to the actual object created later at INIT time :) .. let the idea flow and goes back to more productive works) |
15:26 | |
lizmat | dinner& | 15:34 | |
geekosaur | something horrid like BEGIN my $b = 0; INIT $b := whatever; ? | ||
although that likely does not accomplish whatever optimization hack you were after. really, just don't do that, it sounds like a trainwreck looking for any possible chance to happen | 15:35 | ||
15:36
domidumont left,
smls joined
|
|||
scovit | geekosaur there was a practical problem which I wanted to address | 15:37 | |
geekosaur my module segfaults if used in a certain way | |||
even worst: while it can be used in a correct way it feels totally natural to use it in the wrong one | 15:38 | ||
15:39
raschipi joined
|
|||
scovit | constant ERROR_MSG_BAD = CBuffer.new("File not found"); # Segmentation fault | 15:39 | |
15:40
troys joined,
Skarsnik_ joined
|
|||
scovit | our $ERROR_MSG_BAD is export = CBuffer.new("File not found"); # Totally fine | 15:40 | |
geekosaur | if CBuffer is via NativeCall then your expectations are violated by expecting your dynamic FFI context to exist at compile time | 15:41 | |
15:43
Skarsnik left
15:47
ntinos joined
15:54
Cabanossi left
15:56
mr-foobar left
15:57
Cabanossi joined
15:58
khw joined,
mr-foobar joined,
mcmillhj left
15:59
Kyo91_ joined
16:00
piojo left,
dogbert17 joined
16:01
Kyo91 left
16:02
zakame left
16:07
mcmillhj joined
16:08
wamba joined
|
|||
Zoffix | . | 16:09 | |
yoleaux | 7 Sep 2017 18:42Z <lizmat> Zoffix: I feel that tests 3/4 of S24-testing/8-die_on_fail.t are bogus | ||
11 Sep 2017 03:29Z <AlexDaniel> Zoffix: toaster plz | |||
16:09
xtreak joined
|
|||
smls | .. | 16:09 | |
yoleaux | 11 Sep 2017 22:11Z <TimToady> smls: no, that wasn't intended | ||
Zoffix | .tell AlexDaniel no toaster from me this month. I'm away on vacation. | 16:10 | |
yoleaux | Zoffix: I'll pass your message to AlexDaniel. | ||
16:12
mcmillhj left
16:13
buggable joined,
ChanServ sets mode: +v buggable,
huggable joined,
ChanServ sets mode: +v huggable,
Geth_ left,
Geth_ joined,
ChanServ sets mode: +v Geth_,
ZofBot left,
NeuralAnomaly joined,
ChanServ sets mode: +v NeuralAnomaly,
ZofBot joined,
ChanServ sets mode: +v ZofBot
16:14
SourceBaby joined,
ChanServ sets mode: +v SourceBaby
16:23
cdg left
16:24
mcmillhj joined
16:29
mcmillhj left
16:32
setty1 joined
16:40
Skarsnik_ is now known as Skarsnik,
mcmillhj joined
|
|||
scovit | geekosaur: FFI is working fine, the segfault is at runtime since the Buffers were allocated once at compilation and are not there anymore | 16:41 | |
geekosaur | well, same point really. it may be "natural" to you to confuse runtime and compile time. not natural to me | ||
raschipi | scovit: Perl6 isn't C++ | 16:43 | |
scovit | it is expectable from the user point of view to see CBuffer.new("File not found") as something opaque | ||
ok, I feel that we are turning the direction of the conversation of "what is the use of a CBuffer" object. right? | 16:44 | ||
raschipi | Nope. | ||
16:45
dakkar left
|
|||
raschipi | "Doctor, it hurts when I do this." | 16:45 | |
16:45
mcmillhj left
|
|||
Xliff | {...} # DunDoDat | 16:46 | |
Sorry. I couldn't resist. | |||
raschipi | scovit: Just don't try to use C++ idioms in Perl6. | 16:51 | |
scovit | raschipi what do you mean? Which idiom struck you? | ||
raschipi | "constant ERROR_MSG_BAD = CBuffer.new("File not found");" | 16:52 | |
Even the underlines are there. | |||
scovit | it is because this is a C++ api, right. At some point I need a C buffer with that string inside. And using Str in nativecall does not work since sometime the Buffer are used for writing and should be caller allocated | 16:55 | |
it is a strange C api | |||
Xliff | So why does it need to be a constant? | ||
geekosaur | ... right, so when you said FFI was fdine you missed my point entirely | 16:56 | |
do you also think a file opened at compile time is still open at runtime? | |||
scovit | geekosaur I get your point | ||
constant in Perl means compile time | |||
there is no need for it to be constant. | 16:57 | ||
it is in fact an error.. such a pity that you get "only" data corruption and segfault | |||
16:58
mcmillhj joined
|
|||
raschipi | It's like jumping to the void pointer in C, it will segfault. | 16:59 | |
smls | scovit: I think `constant` in Perl 6 is not meant for the compiler to give you any guarantees that the object will remain constant, but rather as a way for *you* to tell the *compiler* that it may assume it remains constant. | 17:00 | |
geekosaur | that was kinda what I was getting at with the variant using :=, it is closer to how the const modifier works in C/C++ | ||
scovit | it was a #define in C/C++ eheh | ||
geekosaur | oh, that's even worse | 17:01 | |
because it's not a "constant" at all. it's a textual substitution during compilation | |||
Xliff | scovit: Is this for NativeHelpers::CBuffer? | ||
geekosaur | in fact, use it the wrong way and you are allocating and throwing away a bunch of things you might otherwise think are shared | 17:02 | |
scovit | Xliff yes | ||
Xliff | Ahh | 17:03 | |
17:05
nohuhu joined
17:06
Xliff left
17:11
pmurias left
17:13
troys is now known as troys_,
scovit left
17:19
xtreak left
17:21
leont joined
17:23
troys_ is now known as troys
17:24
HoboWithAShotgun joined
17:25
zakharyas left
|
|||
HoboWithAShotgun | good localtime() you lovely people. is it possible to access a subs named arguments in form of a hash? | 17:25 | |
17:25
pyrimidine left
|
|||
HoboWithAShotgun | with in the sub | 17:25 | |
17:26
leont left,
pyrimidine joined
|
|||
smls | m: sub hi (*%args) { say %args}; hi :foo, :bar(42); | 17:27 | |
camelia | {bar => 42, foo => True} | ||
smls | HoboWithAShotgun: ^^ | ||
you can use any name you want in place of `args`. | |||
The *% makes it slurp up all named arguments into a Hash. | 17:28 | ||
All *remaining* named arguments, more precisely. You can have normal named parameters before it. | 17:29 | ||
ugexe | m: sub foo(*%args [:$name1!, :$name2]) { say %args<name1>; say $name1; }; foo(:name1<xxx>) | ||
camelia | xxx xxx |
||
17:30
pyrimidine left
|
|||
HoboWithAShotgun | ah, ok. i was hoping for something like "sub foo( :$a, :$b ) { say %_{a}; } | 17:30 | |
17:30
pyrimidine joined
|
|||
ugexe | m: sub foo(*%_ [:$a, :$b, *%rest]) { say %_<a> }; foo(:a<xxx>) | 17:32 | |
camelia | xxx | ||
HoboWithAShotgun | amazinh | ||
ty | |||
17:37
xtreak joined,
andrzejku joined
17:39
andrzejku left
17:40
Cabanossi left
17:41
Cabanossi joined
17:42
andrzejku joined
|
|||
HoboWithAShotgun | m: sub foo(*%_[:$a, :$b, *%rest]) { say %_<a> }; foo(:a<xxx>) | 17:43 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Variable '$a' is not declared at <tmp>:1 ------> 3sub foo(*%_[:7⏏5$a, :$b, *%rest]) { say %_<a> }; foo(:a< |
||
HoboWithAShotgun | significant whitespace? | ||
smls | Yes, subsignatures have to be separated from the parent parameter with whitespace. | 17:45 | |
17:45
cdg joined
17:50
cdg left
17:55
xtreak left
17:57
rje joined
|
|||
HoboWithAShotgun | is there a more idiomatic way to express " my $sides = ['a', 'b', 'c'].grep({ $_ ~~ %_ }).elems; " | 17:58 | |
17:58
scovit joined
|
|||
scovit | geekosaur: you wouldn't believe, macro a is export { quasi { CBuffer.new("Ciao"); } }; works perfectly for the purpouse | 17:59 | |
going to advise people to use that; is the only sane way | |||
to keep the C semantics | 18:00 | ||
geekosaur | actually I would believe, if the C macro works. just be advised macros in p6 are still experimental and pieces are missing (but what you are doing is likely fine) | ||
18:02
|oLa| left
18:04
Xliff joined
18:05
Kyo91_ left
18:06
|oLa| joined
18:10
raschipi left
|
|||
smls | HoboWithAShotgun: What do you mean for the `.grep({ $_ ~~ %_ })` to do? | 18:10 | |
18:11
cdg joined
|
|||
smls | m: sub foo { say <a b c>.grep(%_).elems }; foo :c, :d, :e; | 18:13 | |
camelia | 1 | ||
smls | HoboWithAShotgun: This ^^ ? | ||
18:14
scovit left
18:16
cdg_ joined
18:19
cdg left
18:22
dogbert17 left
18:25
Cabanossi left
18:26
ChoHag left,
Cabanossi joined
18:27
perlpilot_ is now known as perlpilot,
eliasr left
18:30
HoboWithAShotgun left
18:33
Kyo91_ joined
18:38
Kyo91_ left
18:40
domidumont joined
18:44
rje left
|
|||
gfldex | .tell HoboWithAShotgun you can get hold of named params at runtime: gist.github.com/gfldex/44eeaceb7d0...214d0cccfc | 18:47 | |
yoleaux | gfldex: I'll pass your message to HoboWithAShotgun. | ||
18:50
domidumont left
18:51
domidumont joined
18:53
domidumont left
18:54
Kyo91_ joined
|
|||
gfldex | do we got a module for unix domain sockets? | 18:54 | |
18:56
Cabanossi left,
Cabanossi joined
19:04
dogbert17 joined
19:06
pecastro left
|
|||
jnthn | gfldex: Not that I know of, but there's a PR in MoarVM that, with a little tweaking, will provide that built-in once merged (well, plus merging some NQP/Rakudo patches) | 19:12 | |
19:12
pecastro joined
19:22
bdmatatu left
|
|||
Zoffix | m: 「/o\ /o\ /o\ D: D: D:」.flip.say | 19:22 | |
camelia | :D :D :D \o/ \o/ \o/ | ||
teatime | what, lol | 19:27 | |
m: 'test'.flip.say | 19:28 | ||
camelia | tset | ||
19:33
espadrine joined
|
|||
rindolf | Zoffix: heh, nice | 19:35 | |
19:36
darutoko left
19:38
Skarsnik_ joined
19:42
Skarsnik left
|
|||
Zoffix | :) | 19:42 | |
19:48
Averna joined
20:01
smls left,
dwarring joined
20:05
Ptolemarch left
20:06
imcsk8 left
20:07
imcsk8 joined
20:16
andrzejku left
20:19
domidumont joined
20:23
domidumont left,
Cabanossi left
20:26
Cabanossi joined
20:28
troys is now known as troys_
20:33
cpage__ left,
cpage_ joined
20:40
kyan left
21:03
TEttinger joined
21:06
skids left
21:08
pyrimidine left
21:09
pyrimidine joined
21:11
pyrimidine left,
pyrimidi_ joined
21:15
pyrimidi_ left
21:16
pyrimidine joined
21:21
pyrimidine left,
zakharyas joined
21:22
Skarsnik_ left
21:23
pyrimidine joined
21:25
zakharyas left
21:27
pyrimidine left
21:28
mr-foobar left
21:29
dogbert17 left
21:32
mr-foobar joined
21:35
pyrimidine joined
21:36
Kyo91_ left,
mcmillhj left
21:38
Sgeo_ left
21:40
pyrimidine left
21:41
setty1 left
21:42
pyrimidine joined
21:45
pyrimidine left,
pyrimidi_ joined
21:48
dogbert17 joined
21:50
spider-mario left,
pyrimidi_ left,
spider-mario joined
21:54
pyrimidine joined
21:55
Cabanossi left
21:56
Cabanossi joined
21:58
pyrimidine left,
mr-foobar left
21:59
pyrimidine joined
22:00
mr-foobar joined
22:03
pyrimidine left
22:04
pyrimidine joined,
Averna left
22:09
pyrimidine left,
mcmillhj joined
22:10
pyrimidine joined
22:15
pyrimidine left
22:16
pyrimidine joined
22:19
pyrimidi_ joined
22:20
pyrimidine left
22:22
pyrimidi_ left,
pyrimidine joined
22:26
Cabanossi left,
pyrimidine left,
pyrimidi_ joined,
Cabanossi joined
22:28
mr-foobar left
22:30
mr-foobar joined,
pyrimidi_ left
22:34
cdg joined,
cdg left,
pyrimidine joined
22:35
cdg joined,
wamba left
22:37
skids joined,
pyrimidine left
22:38
pyrimidine joined,
cdg_ left
22:39
rindolf left,
cdg left,
Sgeo joined
22:41
pyrimidi_ joined
22:42
pyrimidine left
22:43
mcmillhj left
22:45
pyrimidi_ left
22:46
pyrimidine joined
22:47
troys_ is now known as troys
22:49
kyan joined
22:50
pyrimidine left
22:55
Cabanossi left
22:56
pyrimidine joined
22:57
Cabanossi joined
22:58
mr-foobar left
23:00
pyrimidine left
23:01
mr-foobar joined,
bisectable6 left
23:03
bisectable6 joined,
ChanServ sets mode: +v bisectable6
23:11
pyrimidine joined
23:15
pyrimidine left
23:20
pyrimidine joined
23:25
pyrimidine left
23:26
Cabanossi left
23:27
Cabanossi joined
23:28
mr-foobar left
23:29
pyrimidine joined
23:30
espadrine left
23:32
mr-foobar joined,
pyrimidine left,
pyrimidi_ joined,
MasterDuke left
23:35
pyrimidi_ left
23:36
pyrimidine joined
23:37
MasterDuke joined
23:39
SCHAPiE left
23:40
pyrimidine left
23:41
pyrimidine joined
23:45
pyrimidine left
23:46
bhm_ joined
23:47
pyrimidine joined,
SCHAPiE joined
23:48
bhm left,
shadoxx left,
levex left,
obra left
23:49
Xal left,
incredible left,
imcsk8 left,
imcsk8_ joined,
incredible joined,
shadoxx joined
23:50
Xal joined
23:51
charsbar left,
charsbar joined
|
|||
timotimo | ack has a --nosql option | 23:51 | |
23:52
pyrimidine left
23:53
obra joined
23:54
pyrimidine joined
23:55
Levex joined,
Levex is now known as Guest7824,
BenGoldberg joined
23:57
snarkyboojum left
23:58
timotimo left
23:59
mr-foobar left
|