»ö« 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:07 redhands left 00:23 aborazmeh joined, aborazmeh left, aborazmeh joined 00:29 wamba left 00:31 Cabanossi left 00:32 Cabanossi joined 00:35 Xliff left 00:41 kybr joined 00:53 eliasr left 01:00 Cabanossi left 01:01 BenGoldberg left 01:02 cdg joined, Cabanossi joined 01:03 darkmorph joined, cdg left 01:04 margeas left 01:29 Cabanossi left 01:32 Cabanossi joined 01:40 redhands joined 01:55 raschipi left 02:04 wander left 02:10 colomon left 02:12 poohman joined 02:13 wander joined 02:15 apallatto left 02:18 ch3ck3r joined 02:19 colomon joined 02:21 apallatto joined 02:22 napo1eon left 02:32 cdg joined, bitrauser_ joined 02:36 bitrauser left 02:37 cdg left 02:41 Herby_ joined
Herby_ o/ 02:42
02:46 ilbot3 left 02:49 cdg joined 02:55 ilbot3 joined, ChanServ sets mode: +v ilbot3, darkmorph left 03:00 piojo joined
Herby_ I'm trying a Python OO exercise, using Perl 6. I'm stuck. 03:03
gist.github.com/anonymous/2f2221c3...73dd552aaa 03:04
How do I create the "last_id" attribute in p6? For each note created, it should get the next id available
ugexe ++$ 03:09
Herby_ ?
ugexe or `state $last_id += 1`
Herby_ do I declare $last_id outside of the class too? 03:10
ugexe not with `state`
oh i see 03:11
m: class Foo { my $last_id = 0; method add { $last_id++ }; method last_id { $last_id } }; Foo.new.add; Foo.new.last_id 03:12
camelia ( no output )
ugexe m: class Foo { my $last_id = 0; method add { $last_id++ }; method last_id { $last_id } }; Foo.new.add; Foo.new.last_id.say
camelia 1
ugexe m: class Foo { my $last_id = 0; method new { $last_id++; self.bless() }; method last_id { $last_id } }; Foo.new; Foo.new.last_id.say 03:13
camelia 2
Herby_ awesome 03:14
thanks
03:15 cdg left
wander C<\n> matches a single, logical newline character. C<\n> is supposed to also 03:19
match a Windows CR LF codepoint pair; though it's unclear whether the magic
happens at the time that external data is read, or at regex match time.
unclear?
is it?
03:27 dominix joined
dominix hi guys 03:27
ugexe i dont think its unclear, i think its just not what you might expect coming from other languages
dominix do someone knows about the project V5 ? that is perl5 implemented in rakudo. Is it dead ? stalled ? of no interest ? 03:28
03:32 noganex joined 03:33 ryn1x left 03:35 noganex_ left
geekosaur wander, I think which happens is not part of the spec, but part of the implementation? 03:39
03:44 poohman left
wander agree, spec says "\n matches logical newline" 03:44
I think the implementation is, that it happens when external data is read 03:45
ugexe depends, what if you read it in binary and decode it using a decoder that does not do newline translation? 03:46
geekosaur yes, current rakudo-moar at least rewrites text mode newlines to a general newline grapheme
on read 03:47
03:53 Herby_ left 03:55 khw left, drissel left 04:04 wander left
piojo Zoffix: Thank you. moritz already corrected me once about the %hash<$val> incorrect syntax. I really need to break that habit! 04:17
04:24 evalable6 left, evalable6 joined, ChanServ sets mode: +v evalable6 04:42 mson left 04:45 Cabanossi left 04:46 Cabanossi joined 04:53 K_ joined
samcv is there a way for modules to know what version they are? 04:53
like some dynamic variable that stores the version number of that installed module? 04:54
K_ Whatsnext?
samcv ugexe, do you know?
K_ 32
?: 04:55
samcv K_, do you have a question?
K_ How do i win? And get to walk away without spreading this diseez? 04:56
ugexe samcv: github.com/rakudo/rakudo/pull/1132 needs this to do it in a reasonable way, after which point we can possibly add it to .^ver
04:56 aborazmeh left
samcv ugexe, can we add a --version option to zef now? i always want to know what version i'm running but there's no way 04:57
and i'm guessing a lot of people may expect that to work
ugexe no, that example is shown in the PR
samcv oh you mean it adds it as an option by itself 04:58
ok thanks for link to PR 04:59
ugexe it makes it possible for zef to do it
05:03 K_ left 05:16 cdg joined 05:20 cdg left 05:27 raiph left 05:29 Cabanossi left 05:31 Cabanossi joined
sacomo hi all 05:35
05:49 wamba joined 05:58 Cabanossi left 06:00 finanalyst joined, Cabanossi joined
finanalyst can anyone tell me whether the specification for the META.json file in S22 has been updated? 06:01
mostly I am interested in the depends: field
06:08 Mrofnet joined 06:10 Morfent joined 06:11 Merfont left 06:12 Mrofnet left 06:13 darutoko joined
sacomo finanalyst, now sure if the ver, author adverbs work in depends. I haven't seen any modules using them. 06:14
finanalyst sacomo: so far I have seen some ver/author in modules, eg. Bailador. However, I remove these adverbs. My question is about the structure of depends 06:16
According to S22, there are two / three structures: a) array of string, b) array of string | hash (which contains hints), c) hash of hash of array of string 06:17
Recently, App::Cpan6 started using the hash structure, which broke my analysis program. 06:18
Since I originally only took into account array of string, I now want to make more generic. Just checking to see if S22 has full spec 06:19
sacomo yeah, I have only seen the array of strings, App::Cpan6 is the first I have seen use that structure. I think now that the cpan6 effort is underway that will become more common. 06:23
06:23 sena_kun joined 06:29 skqvheallf joined, skqvheallf left 06:30 Cabanossi left 06:31 Cabanossi joined 06:34 dominix left 06:39 Piotr_ joined 06:41 mempko joined 06:49 parv joined 06:56 wander joined
wander m: uniname("一").parse-names() 07:02
camelia Unrecognized character name [<CJK Ideograph-4E00>]
in block <unit> at <tmp> line 1
wander m: say uniname("一")
camelia <CJK Ideograph-4E00>
wander why does `uniname("一").parse-names()` not work? 07:03
I have seen rakudo #1031 but still don't know how parse-names work. especially where the dict is 07:05
07:16 evalable6 left, evalable6 joined
Geth doc: b24a42baee | (Alex Chen)++ (committed using GitHub Web editor) | doc/Language/regexes.pod6
Update regexes.pod6
07:17
synopsebot Link: doc.perl6.org/language/regexes
apallatto ~/2 07:22
07:23 abraxxa joined 07:24 domidumont joined 07:28 domidumont left 07:30 domidumont joined
Geth doc/master: 4 commits pushed by (Jeremy Studer)++, (Jarkko Haapalainen)++ 07:34
wander m: say 'abcdefg' ~~ /\w ** {-Inf}/; # OUTPUT: «「」␤»
camelia 5===SORRY!5=== Error while compiling <tmp>
Bogus statement
at <tmp>:2
------> 3<BOL>7⏏5»
expecting any of:
prefix
term
wander m: say 'abcdefg' ~~ /\w ** {-42}/; # OUTPUT: «「」␤» 07:36
camelia 5===SORRY!5=== Error while compiling <tmp>
Bogus statement
at <tmp>:2
------> 3<BOL>7⏏5»
expecting any of:
prefix
term
wander m: say 'abcdefg' ~~ /\w ** {-10..-42}/;
camelia 「」
wander m: say 'abcdefg' ~~ /\w ** {-10..-42}/; # OUTPUT: «「」␤»
camelia 5===SORRY!5=== Error while compiling <tmp>
Bogus statement
at <tmp>:2
------> 3<BOL>7⏏5»
expecting any of:
prefix
term
wander m: say 'abcdefg' ~~ /\w ** {-Inf}/;
camelia 「」
wander it complain "This type (Failure) does not support positional operations in block <unit> at <unknown file> line 1" on my REPL 07:37
This is Rakudo version 2017.07 built on MoarVM version 2017.07 implementing Perl 6.c.
and 07:38
m: say 'abcdefg' ~~ /\w ** {-10..-42}/;
camelia 「」
wander output 「abcdefg」
m: say 'abcdefg' ~~ /\w ** 1..*/;
camelia 「abcdefg」
geekosaur yes, that was a change within the past few months 07:39
(bug fix) 07:40
wander ok, i'm going to get a recent release 07:41
07:41 redhands left 07:49 sena_kun left 07:57 rindolf joined 07:58 Cabanossi left 08:01 Cabanossi joined
wander m: (try say 'abcdefg' ~~ /\w ** {42..10}/ ) orelse say ($!.^name, $!.empty-range); 08:06
camelia (X::Syntax::Regex::QuantifierValue True)
08:07 TEttinger left
wander m: (try say 'abcdefg' ~~ /\w ** {42..10}/ ); say ($!.^name, $!.empty-range); 08:07
camelia (X::Syntax::Regex::QuantifierValue True)
wander m: (try say 'abcdefg' ~~ /\w ** {42..10}/ ) // ($!.^name, $!.empty-range);
camelia ( no output )
wander m: (try say 'abcdefg' ~~ /\w ** {42..10}/ ) // say ($!.^name, $!.empty-range);
camelia (X::Syntax::Regex::QuantifierValue True)
08:08 jonas1 joined
wander m: (try say 'abcdefg' ~~ /\w ** {NaN..42}/ ) // say $!; 08:08
camelia Cannot use Range with non-Numeric or NaN end points as quantifier
in block <unit> at <tmp> line 1
wander m: (try say 'abcdefg' ~~ /\w ** {NaN..42}/ ) // say $!.resume; 08:11
camelia This exception is not resumable
in block <unit> at <tmp> line 1
wander m: (try say 'abcdefg' ~~ /\w ** {NaN..42}/ ) // say $!.Str 08:12
camelia Cannot use Range with non-Numeric or NaN end points as quantifier
08:16 cdg joined 08:17 rindolf left 08:19 zakharyas joined 08:20 cdg left 08:21 salva joined 08:26 rindolf joined 08:30 Cabanossi left 08:31 Cabanossi joined 08:36 Ven joined 08:37 Ven is now known as Guest36397 08:39 robertle left
wander Note that you cannot easily obtain the same behavior(regex conjunction) with a look-ahead, because a look-ahead doesn't stop looking when the quoted string stops matching. 08:43
^^ what is a look-ahead? 08:44
moritz it's a regex doens't consume characters 08:45
for example / \w+ <?before '='> / matches a word only if it is followed by a '='
but the regex matches only the word, not the '=' 08:46
explained in more detail in www.amazon.com/Parsing-Perl-Regexe...1484232275 </ad type="blatant">
08:49 Mrofnet joined, rindolf left
wander m: say "42=" ~~/ \w+ [<?before '='> && <.ws>]/ 08:50
camelia 「42」
wander emmmm...what is the note means? && works well on look-ahead it seems 08:51
btw, indeed looking forward to your new book 08:52
08:52 Morfent left 08:59 araujo left, rindolf joined 09:02 dj_goku_ joined 09:04 scovit joined 09:05 dj_goku left
moritz yes, but only because <.ws> is also a zero-width match 09:05
09:07 mempko left 09:09 eliasr joined
moritz m: say so 'abc' ~~ / <?before a> && . / 09:09
camelia False
moritz m: say so 'abc' ~~ / <?before a> . /
camelia True
moritz m: say 'abc' ~~ / <?before a> .. /
camelia 「ab」
09:11 wander left 09:12 Guest36397 left 09:23 lizmat left, lizmat joined 09:43 evalable6 left 09:44 evalable6 joined, Cabanossi left 09:46 Cabanossi joined 10:01 robertle joined 10:12 rurban joined 10:14 Cabanossi left, wamba left 10:16 Cabanossi joined 10:22 wander joined, parv left
wander .tell moritz thanks for your patient explanation, and sorry for I'm leaving for a while 10:23
yoleaux wander: I'll pass your message to moritz.
moritz you're welcome, and no problem 10:25
yoleaux 10:23Z <wander> moritz: thanks for your patient explanation, and sorry for I'm leaving for a while
El_Che morning 10:26
10:27 knight__ left
AlexDaniel squashable6: next 10:33
squashable6 AlexDaniel, ⚠🍕 Next SQUASHathon in 3 days and ≈23 hours (2017-11-04 UTC-12⌁UTC+14). See github.com/rakudo/rakudo/wiki/Mont...Squash-Day
jnthn m: use nqp; say nqp::eqaddr(Int.new(5), Int.new(5)) # :) 10:37
camelia 0
jnthn oops 10:38
geekosaur reallyUnsafePtrEq# :p
10:47 evalable6 left, evalable6 joined, ChanServ sets mode: +v evalable6 10:55 nadim_ joined
Geth doc: dbff958f5d | (Alex Chen)++ (committed using GitHub Web editor) | doc/Language/regexes.pod6
Add and modify examples

on zero or one quantifiers `?` and conjunction `&&` And rewrite example on greedy versus frugal quantifiers
10:58
synopsebot Link: doc.perl6.org/language/regexes
10:59 wamba joined 11:00 Cabanossi left 11:01 Cabanossi joined 11:02 cdg joined 11:03 sena_kun joined
Geth mu: 912a0d9d5b | (Tom Browder)++ (committed using GitHub Web editor) | misc/perl6advent-2017/schedule
take a shot
11:13
11:17 nadim_ left 11:20 margeas joined, cdg left 11:21 domidumont left 11:33 zakharyas left, knight__ joined
knight__ Hello, I am creating a module, but what is the real purpose of 'use lib 'lib''? Load all modules symbols from path lib ? 11:34
timotimo not all, but it'll put the lib folder first in the list of locations to look in 11:36
11:40 zakharyas joined, domidumont joined 11:47 cgfbee joined
knight__ timotimo: Is there any option like python globals()/locals() it returns symbols which have been defined in scope? 11:50
timotimo m: say ::.keys
camelia ($=pod $_ $/ !UNIT_MARKER $=finish EXPORT $! ::?PACKAGE GLOBALish $¢ $?PACKAGE)
timotimo that's how you get at the lexical scope's contents
m: say OUR::.keys
camelia ()
timotimo those are the package-scoped variables, i.e. everything declared "our" instead of "my" 11:51
lizmat m: my $foo; dd ::.keys<$foo>
camelia Failure.new(exception => X::AdHoc.new(payload => "Type Seq does not support associative indexing."), backtrace => Backtrace.new)
lizmat hmmm
m: my $foo; dd ::<$foo>
camelia Any $foo = Any
lizmat m: my $foo = 42; dd ::<$foo>
camelia Int $foo = 42
timotimo imma be AFK for a bit 11:52
11:53 finanalyst left
knight__ timotimo: Also, is there any doc about environment bindings? I mean how interpreter makes some "execution" plan? 11:53
timotimo i don't know what that means?
knight__ I will show, wait 11:54
timotimo someone else will surely be able to answer while i'm gone
seeya
knight__ ok
:-)
bye, thank you
12:04 nadim_ joined 12:10 rurban left 12:14 Cabanossi left 12:16 Cabanossi joined, araraloren joined 12:19 zakharyas left
araraloren Is there any convenient way update value of Hash, just like `%h<x> = %h<x> // 'foo';` 12:21
lizmat %h<x> = "foo" ? 12:22
araraloren: not sure what you mean
araraloren sorry
If there key exists, I want update it 12:23
this
oh I'm a foolish.. :P 12:24
moritz %h<x> = 'foo' if %h<x>:exists; 12:28
lizmat araraloren: if they are always defined values in there, you can use 'with' 12:29
m: my %h = a => 42; $_ = 666 with %h<a>; dd %h
camelia Hash %h = {:a(666)}
araraloren oh, nice 12:30
12:30 domidumont left
araraloren thanks 12:30
My friend not describe the question correctly. sorry
[Coke] .
12:32 mson joined 12:33 rurban joined, aborazmeh joined, aborazmeh left, aborazmeh joined 12:34 rurban left
knight__ apropo my previous questions about execution plan. I am interested in some execution plan how interpreter interpretes data. For example when I have multiple inheritance, I would like to know how interpreter works, which method it will choose, which table of symbols will use. etc :-) I do not know how to say it english. 12:36
Some rules, how it works. 12:37
moritz knight__: classes have "Method Resolution Order", short MRO
knight__: it tells which order the classes are searched for when looking for methods
m: say Int.^mro 12:38
camelia ((Int) (Cool) (Any) (Mu))
moritz m: say IntStr.^mro
camelia ((IntStr) (Int) (Str) (Cool) (Any) (Mu))
moritz Perl 6 uses C3: en.wikipedia.org/wiki/C3_linearization
knight__ Thank you! 12:39
12:40 khw joined 12:44 Cabanossi left 12:45 bdmatatu joined 12:46 Cabanossi joined, COMBORICO joined, domidumont joined 12:52 perlpilot joined, domidumont left 12:54 darkmorph joined, domidumont joined 12:55 MasterDuke joined 12:58 COMBORICO left 12:59 cdg joined 13:00 cgfbee left 13:03 cdg left 13:12 mcmillhj joined, cdg joined 13:13 Cabanossi left 13:16 lowin left, Cabanossi joined 13:20 aborazmeh left, darkmorph left 13:21 aborazmeh joined, aborazmeh left, aborazmeh joined 13:26 ch3ck3r left 13:32 COMBORICO joined 13:43 napo1eon joined
wander m: say "11" ~~ /(\d) {} :my $c = $0; ($c)/; 13:46
camelia 「11」
0 => 「1」
1 => 「1」
COMBORICO Question: What does the perl method do: "say '2'.perl;". I know it returns "2", but I don't understand what is going on.
wander where can I see how code like `{} :my $c = $0;` works? 13:47
13:47 ChoHag left
wander COMBORICO, docs.perl6.org/routine/perl 13:48
COMBORICO Ty
geekosaur COMBORICO, it produces the perl source code needed to reproduce the expression. for a number or a string, it's just the number
or string
wander briefly, returns a Perlish representation of the object
COMBORICO Ty
13:49 domidumont left, zakharyas joined 13:50 domidumont joined 13:51 Guest38 joined, Guest38 left
geekosaur mhhh. think embedded code is only documented in the speculations :/ 13:51
the real docs are steering people to action objects 13:52
COMBORICO geekosaur, i read the link, but your explanation is clearer. Thank you.
13:52 cognominal joined
cognominal Mon histoire d´A avec les Rita Mitsouko finit mal. RIP Fred. www.youtube.com/watch?v=tPSyz7xweVc 13:54
oops
wrong channel
lizmat ah, l'erreur :-) 13:55
geekosaur wander, so closures in regexes are apparently only documented at design.perl6.org/S05.html#Bracket_r...nalization 13:58
and ':my' is documented in the middle of design.perl6.org/S05.html#Variable_...erpolation 14:00
I am wondering if those are going to be deprecated, since the docs point you to action objects instead 14:01
moritz no 14:03
14:09 Guest49 joined
wander geekosaur, thank you 14:09
14:10 Guest49 left, abraxxa left
wander so, for `"11" ~~ /(\d) {} :my $c = $0; ($c)/`, first I match "1", then run a block, which updates $/ 14:11
following `:my $c = 0;` which is how we declare inside a regex/token/rule
14:12 bwisti joined, aborazmeh left
wander interesting, for we never(?) declare a variable in this form anywhere else 14:13
14:14 Cabanossi left
geekosaur er? it's a normal declaration preceded by a colon 14:14
14:14 lowin joined
wander aha :P 14:15
m: :my $x = 42;
camelia 5===SORRY!5=== Error while compiling <tmp>
Two terms in a row
at <tmp>:1
------> 3:my7⏏5 $x = 42;
expecting any of:
infix
infix stopper
statement end
statement modifier
statement …
14:16 Cabanossi joined
geekosaur it may help to note that, in a regex, : normally stops backtracking (and both closures and :my also have that effect) 14:17
(closures, because it's kinda hard to run arbitrary code "in reverse" if you backtrack through it) 14:18
wander so such form is only used inside regex, is it? 14:19
geekosaur yes 14:20
rgeex is a separate language from perl 6 proper, although it allows limited embedding of perl 6 via closures
likewise strings are a separate language
perl 6 cleverly uses its own grammar facilities to allow switching languages on the fly 14:21
14:21 ChoHag joined
perlpilot
.oO( "my god, it's full of languages" )
14:21
geekosaur hypothetically, someone could implement python as a perl 6 grammar and you could then put a block of python code in the middle of your program
(I think there was actually an effort to run perl 5 that way, but it stalled out back when rakudo was still using parrot?)
14:22 lowin left 14:23 troys joined, lowin joined
wander moritz, do we have other method to do the same thing like `/(\d) {} :my $c = $0; ($c)/`? ( We should have :-) ) 14:24
14:25 ChoHag left 14:26 nadim joined 14:27 nadim_ left
moritz wander: you mean /\d $0 / ? 14:29
m: say '1223' ~~ /(\d) $0 / 14:30
camelia 「22」
0 => 「2」
moritz m: say '1223' ~~ /$<alias>=(\d) ($<alias>) /
camelia Nil
moritz :(
wander yes 14:31
14:32 darkmorph joined
wander m: say '1223' ~~ /$<alias>=(\d) $<alias> /; say $0; 14:32
camelia 「22」
alias => 「2」
Nil
14:32 esh_ joined 14:33 bartolin joined, esh left
moritz how often do you actually need to capture the second bit, when you already know that it matches the same text as the first? 14:33
wander you're right. what i care about is the match, not the capture XD 14:35
14:35 ChoHag joined
jdv79 can a Pair's value be Nil? 14:35
moritz m: say (a => Nil).perl 14:36
camelia :a(Nil)
moritz jdv79: ^^ that was easy to answer :-)
jdv79 i asked the wrong question. why can't a hash's value be Nil? 14:37
Geth marketing: 305da3af38 | (Zoffix Znet)++ | 47 files
Add some decent open fonts to repo

To save time setting up when designing on new boxes...
lizmat m: my %h is default(Nil) = a => Nil; dd %h 14:38
camelia Hash %h = {:a(Nil)}
lizmat jdv79: ^^^
jdv79 oh, that makes sense
thanks
14:40 knight__ left
geekosaur the core issue is that, in an assignment, Nil usually means use the default value for the type. so you need the default to also be Nil 14:40
14:44 abraxxa joined 14:45 Cabanossi left
jdv79 i thought of that just before lizmat showed it 14:45
14:45 kyan joined
Geth doc: a30596e843 | (Alex Chen)++ (committed using GitHub Web editor) | doc/Language/regexes.pod6
Add example on Capture markers
14:46
synopsebot Link: doc.perl6.org/language/regexes
jdv79 for an args hash being slipped into a constructor a default of Nil is useful
14:46 Cabanossi joined
wander maybe test defined? 14:48
m: say defined Nil; say defined Any;
camelia False
False
14:49 cdg left 14:50 Piotr_ left
jdv79 i'm talking about - "{..., k => $v ?? $v...whatever !! Nil,... } 14:51
15:00 mempko joined 15:04 Guest78 joined 15:06 callyalater joined 15:12 Guest78 left 15:13 Cabanossi left 15:16 Cabanossi joined
ugexe m: sub foo(*%_) { %_ }; my %hash = %( :a([1,2,3]), :b(1) ); say foo(%hash).perl # wonder if this error message can be improved 15:16
camelia Too many positionals passed; expected 0 arguments but got 1
in sub foo at <tmp> line 1
in block <unit> at <tmp> line 1
ugexe ah n/m, too early 15:17
15:18 araraloren left 15:19 Ven joined, AlexDaniel left, Ven is now known as Guest42207
callyalater m: say ""; sub postfix:<!>(Int $n) { [*] 2..$n }; say "{6!}"; 15:23
yoleaux 28 Oct 2017 04:35Z <Zoffix> callyalater: the quote braid bug is now fixed: c: HEAD $ = ""; sub postfix:<!> { [*] ^$^f+1}; say "{ 5! }"; Sorry it took longer to fix than original promised :)
camelia
720
callyalater Zoffix: Thank you! 15:24
15:32 kyan left 15:52 evalable6 left, evalable6 joined 15:58 Cabanossi left 15:59 mcmillhj left 16:01 Cabanossi joined 16:05 zakharyas left 16:06 mcmillhj joined 16:11 mcmillhj left 16:21 mcmillhj joined 16:23 cdg joined 16:28 mempko left 16:34 araujo joined, araujo left, araujo joined
AlexDaniel` squashable6: next 16:35
squashable6 AlexDaniel`, ⚠🍕 Next SQUASHathon in 3 days and ≈17 hours (2017-11-04 UTC-12⌁UTC+14). See github.com/rakudo/rakudo/wiki/Mont...Squash-Day
16:37 cognominal left, cognominal joined 16:39 cdg_ joined 16:42 cdg left 16:44 Cabanossi left 16:45 MasterDuke left 16:46 Piotr_ joined, Cabanossi joined 16:48 Guest42207 left 16:52 Coleoid joined 16:53 abraxxa left 16:54 Ven joined, Ven is now known as Guest45092 16:56 Guest45092 is now known as Ven``
lizmat nice objective for this Saturday's Squashathon: stackoverflow.com/questions/470171...umentation 16:58
timotimo hm, do we have a Pod::To::Markdown? :) 17:00
17:02 cdg_ left 17:03 zakharyas joined
Coleoid Hi, #perl6! I'm wrestling with NativeCalling a funky library. 17:03
The NativeCall docs specify that lib functions which return structs, must return them by reference, and I'm faced with a lib which does not. Do I have options beyond "rewrite those functions"?
17:04 cdg joined
timotimo if i remember correctly, returning structs is not properly standardised between ABIs or compilers or something? 17:04
hm, though of course we should support anything libffi and dyncall can. let's see if they support that 17:05
geekosaur Coleoid, or write a wrapper function 17:07
Coleoid That may be. The C folks on StackOverflow seem to believe it's defined, safe, and proper to return structs by value, and then they start listing caveats...
geekosaur passing structs and returning structs both have weirdness; C knows how to do it, but making an FFI do it is hard enough that many don't bother
timotimo looks like dyncall doesn't support it
hm, does libffi support it? 17:09
1.03 Oct-10-96
Passing struct args, and returning struct values works for
all architectures/calling conventions.
now how do we handle this ... a run time exception when trying to use a function with struct return type if moarvm is compiled with dyncall? 17:10
(that would probably also immediately trigger when precompiling a module with that in it 17:11
Coleoid geekosaur, I was thinking wrapper functions, too, if I can't avoid writing C with this project. 17:12
timotimo, I run up to the native call, and exit immediately without any message thereafter. So it gave me much better visibility than a precompile exception. 17:14
17:15 Cabanossi left
timotimo well, a precompile exception would not half-run the program if it's doomed 17:15
17:16 Cabanossi joined
Coleoid ...or, now I think you meant NativeCall doing its first-time precompile, and it's given helpful messages when I haven't built the signature. 17:16
timotimo m: use NativeCall; class Foo is repr<CStruct> { has int32 $.foo }; sub foo() returns Foo is native(Str) {*} 17:17
camelia ( no output )
timotimo m: use NativeCall; class Foo is repr<CStruct> { has int32 $.foo }; sub foo() returns Foo is native(Str) {*}; foo()
camelia Cannot locate symbol 'foo' in native library ''
in method setup at /home/camelia/rakudo-m-inst-1/share/perl6/sources/24DD121B5B4774C04A7084827BFAD92199756E03 (NativeCall) line 289
in method CALL-ME at /home/camelia/rakudo-m-inst-1/share/perl6/…
17:17 pmurias joined
timotimo huh, it allows a CStruct for "returns"? 17:17
m: use NativeCall; class Foo is repr<CStruct> { has int32 $.foo }; sub foo(--> Foo) is native(Str) {*}; foo()
camelia Cannot locate symbol 'foo' in native library ''
in method setup at /home/camelia/rakudo-m-inst-1/share/perl6/sources/24DD121B5B4774C04A7084827BFAD92199756E03 (NativeCall) line 289
in method CALL-ME at /home/camelia/rakudo-m-inst-1/share/perl6/…
Coleoid Yes, they just must be returned by reference. 17:18
timotimo ah crap, of course 17:19
Coleoid Another sad thing is this struct is three uint8s, so it would even fit into an int32 return value. Redefining the nativecall binding to do that didn't fool the runtime, though. :D
timotimo in that case i also don't know how to signal that ... "is structure-return" or similar
yeah, depending on your architecture returning an integer or a struct with a sufficiently small size can still be vastly different 17:20
17:22 setty1 joined
geekosaur has vs. HAS? 17:23
timotimo you can't put has or HAS in a sub signature
Coleoid Sounds right. Well, foo. Looks like wrapper functions, then.
geekosaur I meant in the CStruct
timotimo it'd also be possible to signal it like returns FlatStruct[Foo] (name up for debate)
that won't help 17:24
17:24 COMBORICO left, domidumont left 17:26 COMBORICO joined
COMBORICO Question: sub plus_three 17:28
El_Che the travis schrodinger build: it only builds when you're not looking
COMBORICO Nevermind. 17:30
Coleoid Hm, this library has Python and Lua bindings, so we know return-structs-by-value is solvable. I can just write my wrappers for now, though. Thanks, timotimo++ and geekasaur++. 17:31
geekosaur python makes you write C code to bind native libs anyway 17:32
(as does perl 5)
and for that matter lua
Geth doc: acea6c5f1b | (Alex Chen)++ (committed using GitHub Web editor) | doc/Language/regexes.pod6
Put section "Look-around assertions" to proper pos

Seems its author directly appends this doc with it.
17:33
synopsebot Link: doc.perl6.org/language/regexes
17:33 robertle left 17:40 eugene_barsky joined
eugene_barsky hi 17:41
17:42 eugene_barsky left 17:44 Cabanossi left 17:46 Cabanossi joined
[Coke] tries to decipher that commit message. 17:51
17:52 troys is now known as troys_
[Coke] is very excited to see a skip test -> preamble change, though. :) 17:52
oh, I get it. moved the doc (but also did a lot of other stuff)
pmurias blogs.perl.org/users/pawel_murias/2...ittle.html # rakudo.js update 17:53
geekosaur yes, and accuses the doc's author of adding all new content near the end before the 'postamble' sections
ilmari or, allowing for imperfect grammar, just this section 17:55
appends -> appended 17:56
wander how do I report a bug on RT?
I've reached rt.perl.org, but got lost 17:57
[Coke] email [email@hidden.address] 17:58
github.com/rakudo/rakudo/wiki/rt-introduction
github.com/rakudo/rakudo/issues is also open (recently) 17:59
17:59 ChoHag left
wander got it 17:59
18:14 Coleoid left, cdg left 18:16 cdg joined, cdg left, cdg joined 18:17 lowin left 18:18 troys_ is now known as troys, TEttinger joined 18:26 mempko joined 18:29 Cabanossi left 18:31 Cabanossi joined 18:43 lowin joined, darutoko left
lizmat pmurias++ 18:48
18:50 ChoHag joined 18:51 COMBORICO left
ugexe m: Grammar.new 18:57
camelia P6opaque: no such attribute '@!list' in type Capture when trying to bind a value
in block <unit> at <tmp> line 1
18:58 Cabanossi left 19:01 Cabanossi joined 19:03 mcmillhj left 19:05 mcmillhj joined 19:06 Ven`` left 19:07 zakharyas left 19:08 bdmatatu left 19:10 cpage_ left, mcmillhj left, Thrush joined 19:12 Thrush left 19:13 mcmillhj joined 19:14 Thrush joined
Thrush I'm a little confused about the difference(s) between the '..' and '...' operators. 19:14
m: 'a87' ... 'b09' 19:15
camelia Potential difficulties:
Useless use of ... in sink context
at <tmp>:1
------> 3'a87' ...7⏏5 'b09'
Thrush m: ('a87' ... 'b09').say
camelia (a87 a88 a89 a77 a78 a79 a67 a68 a69 a57 a58 a59 a47 a48 a49 a37 a38 a39 a27 a28 a29 a17 a18 a19 a07 a08 a09 b87 b88 b89 b77 b78 b79 b67 b68 b69 b57 b58 b59 b47 b48 b49 b37 b38 b39 b27 b28 b29 b17 b18 b19 b07 b08 b09)
Thrush In the command "('a87' ... 'b09').say", why is "a77" and "a78" included? 19:16
19:17 MasterDuke joined
geekosaur it counts forward from a to b and backward from 8 to 0 and forward from 7 to 9 19:18
19:18 troys is now known as troys_ 19:19 espadrine joined
Thrush geekosaur, this is different than the behavior I'd expect, coming from a Perl5 background. Is there any way to emulate Perl5's behavior? 19:26
[Coke] Inline::Perl5 19:27
Not built in, as far as I know, no 19:28
geekosaur I thought there was amodule
the problem with the perl 5 one is it doesn;t generalize
it's a bundle of special cases for specific patterns and failure for anything that doesn;t fit those patterns 19:29
19:38 ChoHag left 19:40 cdg left 19:41 cdg joined 19:45 jonas1 left 19:46 cdg left 19:47 knight__ joined 19:48 wamba left, wamba joined 19:49 troys_ is now known as troys 19:50 ChoHag joined 19:51 Morfent joined
Thrush m: my @a = ['a98'] ; @a.push( @a[*-1].succ ) until @a[*-1] eq 'b09' 19:52
camelia ( no output )
Thrush m: my @a = ['a98'] ; @a.push( @a[*-1].succ ) until @a[*-1] eq 'b09'; @a.say
camelia [a98 a99 b00 b01 b02 b03 b04 b05 b06 b07 b08 b09]
Thrush It looks like " @a.push( @a[*-1].succ ) until @a[*-1] eq 'b09' " is one way to do it. 19:53
19:54 Mrofnet left 19:57 mr-foobar left 20:01 mr-foobar joined 20:03 Thrush left
timotimo that'd be much easier written as: 20:03
m: say "a98", *.succ ... "b09"
camelia (a98 a99 b00 b01 b02 b03 b04 b05 b06 b07 b08 b09)
timotimo dang, they had already left 20:06
El_Che timotimo: it looks like travis is hammered with evening 20:07
timotimo ?
El_Che build take a lot of time to start 20:08
and in my project it runs 1 subbuild at the time instead of the 4 or 5 it normally dies
timotimo i'm confused, why are you writing me this?
El_Che I am confused as well 20:09
wasn't meant to be specificaaly to you
to much tab magic, I guess
sorry