»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_log/perl6 | UTF-8 is our friend! 🦋 Set by Zoffix on 25 July 2018. |
|||
00:06
ferreira joined
00:07
p6bannerbot sets mode: +v ferreira
00:12
w_richard_w joined
00:13
p6bannerbot sets mode: +v w_richard_w,
Cabanossi left,
w_richard_w left,
w_richard_w joined,
Cabanossi joined
00:14
p6bannerbot sets mode: +v w_richard_w,
p6bannerbot sets mode: +v Cabanossi
|
|||
zachk | can I just leave a block empty {} for a no op? | 00:34 | |
El_Che | for a sub of method? yes | 00:35 | |
you can document it as "not implemented" by using {...} | 00:36 | ||
Xliff | Can roles compose submethods? | ||
El_Che | good question | ||
what's the point of defining submethods in a role, | 00:38 | ||
? | |||
submethods is an inheritance thing | |||
Xliff | I want all role subscribers to call a single method when destroyed. | 00:39 | |
This method can then be overriden or inherited on a per class basis. | |||
Ideally, I think I may just do something with arrays and have DESTROY call that as cleanup. | 00:40 | ||
El_Che | the idea of submethod is that it's not inherited, not that it can (or not) be overriden | ||
Xliff | That was an idea that was percolating.... | ||
Right, but there is common cleanup, uncommon cleanup and specific cleanup that can stop both common and uncommon cleanup. | |||
I've tried doing that with regular methods, but it is getting convoluted. | 00:41 | ||
I think I will circle back to my array method and have DESTROY just call @!cleanup. | |||
El_Che | you're going into the rabbit hole, aren't you Dorothy? :) | ||
Xliff | Was this bottle that said DRINK ME a glaringly obvious clue? | 00:42 | |
(It actually says "Miller High Life", but allow me my foibles) | |||
El_Che | :) | ||
00:47
Actualeyes left,
jme` joined
00:48
p6bannerbot sets mode: +v jme`
|
|||
zachk | made a simple chat server using cro, under 50 lines of code | 00:55 | |
El_Che | impressive | ||
zachk | whats a good perl6 pastebin? | 00:56 | |
El_Che | I don't know if there are | ||
sena_kun uses gist.github | |||
El_Che | sadly github killed anonymous gists | ||
zachk | pastebin.com/jRVNaaBr | 00:57 | |
color scheme is iffy but eh, there is my chat server | 00:58 | ||
took me a bit to wrap my head around supplies, supply blocks and whenever | |||
smallest I had a chatserver before was like under 100 lines in Oz/Mozart | |||
El_Che | pretty cool | 00:59 | |
00:59
undersightable6 left
|
|||
zachk | thank you :) | 00:59 | |
00:59
undersightable6 joined,
benchable6 left,
reportable6 left,
coverable6 left,
reportable6 joined,
benchable6 joined
01:00
p6bannerbot sets mode: +v undersightable6,
p6bannerbot sets mode: +v reportable6,
p6bannerbot sets mode: +v benchable6
01:16
dct left
01:23
zachk left
01:25
bph^ joined
01:26
p6bannerbot sets mode: +v bph^
|
|||
timotimo | glot.io and tio.run let you not only paste, but also immediately execute | 01:29 | |
Xliff | timotimo: o/ | 01:32 | |
Can you glance at github.com/rakudo/rakudo/issues/2589 and comment? | 01:34 | ||
01:37
sena_kun left
|
|||
timotimo | oh, huh | 01:41 | |
that is probably part of the compiled buildplan? | |||
Xliff | I am just starting with nqp, so I am not sure about that. | 01:44 | |
But it's not just strings. CStructs also suffer from the same thing. | |||
timotimo | at gen/moar/BOOTSTRAP.nqp:4149 (/home/timo/perl6/install/share/nqp/lib/Perl6/BOOTSTRAP.moarvm:assign-fallback) | ||
from -e:1 (<ephemeral file>:BUILDALL) | |||
oh, with the same solution, even? | 01:45 | ||
Xliff | Unless it's a numeric "primative" you have to drop to nqp::bindattr to fix it. | ||
Yes. | |||
Except with bindattr_o, of course. | 01:46 | ||
Scratch that.... | |||
timotimo | i thought it'd be a bindattr_* that is compiled into that ... | ||
Xliff | unbox_o as opposed to unbox_s | ||
Fingers typing faster than brain | 01:47 | ||
timotimo | i don't think unbox_o is a thing | ||
Xliff | No. It was just an nqp::decont | 01:50 | |
Sorry. | |||
timotimo: So it sounds like this is not something that is easy to fix? | 01:53 | ||
02:01
coverable6 joined,
ChanServ sets mode: +v coverable6
|
|||
timotimo | well, check out generate_buildplan_executor | 02:01 | |
02:02
p6bannerbot sets mode: +v coverable6
|
|||
timotimo | i'd assume it's just using assign instead of bindattr | 02:02 | |
so it could be we want special-casing for CStructs | |||
Xliff | And Strs | 02:09 | |
timotimo | well, i mean when the class itself is a CStruct | 02:10 | |
and then for both str and cstruct parts | |||
Xliff | Do you mean generate_accessor or generate_buildplan_executor? | 02:14 | |
So: 1) test if class is CStruct, 2) test attribute is Str or CStruct, 3) if rw then build bindattr-based accessor? | 02:15 | ||
02:15
AlexDani` joined
|
|||
Xliff | AlexDaniel? | 02:15 | |
o/ | |||
02:16
p6bannerbot sets mode: +v AlexDani`
02:17
reach_satori_ joined
02:18
p6bannerbot sets mode: +v reach_satori_
|
|||
timotimo | i'm not sure if it should be decided in generate_buildplan_executor or when we generate_buildplan or what it's called | 02:18 | |
02:19
AlexDaniel left,
Manifest0 left,
isomorphismes left
02:20
Circlepuller left,
reach_satori left,
Manifest0 joined,
isomorphismes joined
02:21
p6bannerbot sets mode: +v Manifest0,
p6bannerbot sets mode: +v isomorphismes,
success joined
02:22
success is now known as Guest35162,
TeamBlast joined,
p6bannerbot sets mode: +v Guest35162
02:23
p6bannerbot sets mode: +v TeamBlast
|
|||
Xliff | timotimo: Well, thanks for looking! | 02:27 | |
02:27
AlexDani` is now known as AlexDaniel
|
|||
AlexDaniel | Xliff: yes? | 02:27 | |
Xliff | No, was just curious as to whether that was really you. | ||
Was discussing github.com/rakudo/rakudo/issues/2589 with timotimo | 02:28 | ||
AlexDaniel | not me unless you see my signature :) | 02:30 | |
Kaiepi | how can i keep state in a grammar that persists between parses? | ||
timotimo | should be enough to just have an attribute and then use the Grammar.new object for multiple .parse runs | 02:31 | |
alternatively, have the state in the actions class and use an instance for that | |||
02:34
satori__ joined
02:35
p6bannerbot sets mode: +v satori__,
reach_satori_ left,
Kaiepi left,
squashable6 left
02:36
pmichaud_ joined,
Kaiepi joined,
p6bannerbot sets mode: +v pmichaud_
02:37
p6bannerbot sets mode: +v Kaiepi
|
|||
Kaiepi | m: grammar Foo { has Int $.a = 0; token TOP { <.b> a }; method b { $!a++; self } }; my Foo $foo .= new; $foo = $foo.parse('a'); $foo = $foo.parse('a'); say $foo.a | 02:37 | |
camelia | 1 | ||
Kaiepi | m: grammar Foo { has Int $.a = 0; token TOP { <.b> a }; method b { $!a++; self } }; my Foo $foo .= new; $foo = $foo.parse('a'); $foo = $foo.parse('a').parse('a'); say $foo.a | 02:38 | |
camelia | 1 | ||
02:38
Praise- joined,
Praise- left,
Praise- joined,
p6bannerbot sets mode: +v Praise-
02:39
p6bannerbot sets mode: +v Praise-,
orevdiabl joined
|
|||
Kaiepi | ok here's what i'm trying to do | 02:40 | |
02:40
p6bannerbot sets mode: +v orevdiabl
|
|||
Kaiepi | i have this grammar hastebin.com/ebexeceduz.xml | 02:40 | |
02:40
AlexDani` joined,
shadowpaste joined
|
|||
Kaiepi | but when it tries to parse "{IAC}{DO}{TRANSMIT_BINARY}" it locks up | 02:40 | |
02:40
giraffe_ joined,
p6bannerbot sets mode: +v giraffe_
02:41
Shozan joined,
p6bannerbot sets mode: +v Shozan,
p6bannerbot sets mode: +v AlexDani`,
p6bannerbot sets mode: +v shadowpaste,
Guest35162 left
|
|||
Kaiepi | i want the grammar to know when it's parsing binary data | 02:41 | |
02:41
kyzn_ joined
02:42
p6bannerbot sets mode: +v kyzn_,
masak_ joined
02:43
kst` joined,
p6bannerbot sets mode: +v masak_,
cibs_ joined
02:44
xxpor_ joined,
p6bannerbot sets mode: +v kst`,
tyilanmenyn joined,
p6bannerbot sets mode: +v tyilanmenyn,
samcv_ joined,
p6bannerbot sets mode: +v samcv_,
p6bannerbot sets mode: +v cibs_,
[Sno] joined,
molaf left,
p6bannerbot sets mode: +v xxpor_,
krkini joined,
p6bannerbot sets mode: +v krkini
02:45
dogbert11 joined,
p6bannerbot sets mode: +v [Sno],
mantovani_ joined
02:46
p6bannerbot sets mode: +v dogbert11,
AlexDaniel left,
reportable6 left,
benchable6 left,
undersightable6 left,
sno left,
xinming_ left,
kst left,
w17t left,
SHODAN left,
bisectable6 left,
revdiablo left,
evalable6 left,
dogbert17 left,
quotable6 left,
committable6 left,
Praise left,
giraffe left,
kyzn left,
xxpor left,
afresh1 left,
tyil left,
p6bannerbot sets mode: +v mantovani_,
afresh1 joined
02:47
p6bannerbot sets mode: +v afresh1,
w17t joined,
p6bannerbot sets mode: +v w17t
|
|||
tyilanmenyn | stupid netsplit >:( | 02:48 | |
02:49
xinming_ joined,
success joined,
MasterDuke joined,
p6bannerbot sets mode: +v MasterDuke,
p6bannerbot sets mode: +v xinming_,
success is now known as Guest9550,
MasterDuke left,
MasterDuke joined,
herbert.freenode.net sets mode: +v MasterDuke,
p6bannerbot sets mode: +v MasterDuke
02:50
p6bannerbot sets mode: +v Guest9550
02:51
broquaint joined
02:52
p6bannerbot sets mode: +v broquaint
02:53
breinbaas joined,
timotimo joined
02:54
p6bannerbot sets mode: +v timotimo
|
|||
Kaiepi | did everyone see the messages i sent? | 02:54 | |
02:54
p6bannerbot sets mode: +v breinbaas
|
|||
timotimo | about keeping state in grammars? | 02:54 | |
i had sent an answer to that: | |||
should be enough to just have an attribute and then use the Grammar.new object for multiple .parse runs | |||
alternatively, have the state in the actions class and use an instance for that | |||
Kaiepi | no the ones afterwards | ||
<Kaiepi> ok here's what i'm trying to do | 02:55 | ||
timotimo | you had your connection reset, and right after that i got disconnected as well | ||
Kaiepi | <Kaiepi> i have this grammar hastebin.com/ebexeceduz.xml | ||
<Kaiepi> but when it tries to parse "{IAC}{DO}{TRANSMIT_BINARY}" it locks up | |||
<Kaiepi> i want the grammar to know when it's parsing binary data | |||
timotimo | you've got to be careful with setting values inside tokens like that; if a token is being matched partially (i.e. there can be backtracking at a higher level), the value could be wrong on the way back after reversing | 02:56 | |
could be better to use the call stack along with dynamic variables | 02:57 | ||
02:57
molaf joined
|
|||
timotimo | since they get popped off at the same time the backtracking happens | 02:57 | |
02:58
p6bannerbot sets mode: +v molaf
|
|||
Xliff | Kaiepi: hastebin.com/ovudoyijal.pl | 03:01 | |
But timotimo's point is well taken. Better to use dynamics. | |||
Kaiepi | how would i keep the state of dynamics between multiple parses? | 03:07 | |
timotimo | have a dynamic variable on the outside, too ... but you'd have to manually carry the latest ("innermost") value to the outside at the end | ||
Kaiepi | i don't get what you mean | 03:11 | |
03:11
evalable6 joined
|
|||
timotimo | well, you want the value of the dynamic variable at the end of parsing, right? | 03:11 | |
03:11
p6bannerbot sets mode: +v evalable6
|
|||
Kaiepi | yeah | 03:11 | |
timotimo | the trick with using dynamics is that every part of the call stack gets its own value (by looking upwards for the nearest one) | 03:12 | |
but when parsing finishes, all these frames will return | |||
and the innermost value, which was the interesting one, will be gone | |||
Kaiepi | can you show me an example of what you mean? | 03:14 | |
timotimo | well, it depends on your grammar being structured to recurse after every change to the dynamic variable | ||
i mean if you're just careful with backtracking, maybe you can ignore all i've said | 03:15 | ||
03:16
evalable6 left,
evalable6 joined
03:17
p6bannerbot sets mode: +v evalable6
|
|||
Kaiepi | i don't understand <timotimo> the trick with using dynamics is that every part of the call stack gets its own value (by looking upwards for the nearest one) | 03:19 | |
timotimo | can't come up with a good example off the top of my head :( | ||
i'll go to bed very soon | 03:20 | ||
03:24
Guest9550 left
03:25
breinbaas left
03:27
satori__ left
03:28
failure joined,
satori__ joined
|
|||
timotimo | o/ | 03:28 | |
Xliff | Kaiepi: This might help -- docs.perl6.org/language/grammars#D...n_grammars | ||
Night, timotimo! | |||
03:29
failure is now known as Guest93956
|
|||
Kaiepi | ...i wrote that | 03:29 | |
Xliff | :-O | ||
LOL! | |||
OK. My bad. | |||
03:29
p6bannerbot sets mode: +v Guest93956,
p6bannerbot sets mode: +v satori__
|
|||
timotimo | the joys of being a small community ;) | 03:29 | |
Xliff | I know, rite! | 03:30 | |
timotimo | well, and having a big part of the community helping out in all kinds of places | ||
Xliff | You want to keep that between invocations. I forgot. | ||
timotimo | okbye | ||
03:32
breinbaas joined
03:33
p6bannerbot sets mode: +v breinbaas
03:36
bisectable6 joined,
ChanServ sets mode: +v bisectable6
03:37
p6bannerbot sets mode: +v bisectable6
|
|||
Xliff | Kaiepi: glot.io/snippets/f8m1uygwes | 03:38 | |
03:39
benchable6 joined
03:40
squashable6 joined,
p6bannerbot sets mode: +v benchable6,
committable6 joined
03:41
p6bannerbot sets mode: +v squashable6,
p6bannerbot sets mode: +v committable6
03:42
quotable6 joined,
ChanServ sets mode: +v quotable6,
reportable6 joined
03:43
p6bannerbot sets mode: +v quotable6,
p6bannerbot sets mode: +v reportable6
03:46
undersightable6 joined,
ChanServ sets mode: +v undersightable6
03:47
p6bannerbot sets mode: +v undersightable6
03:53
Guest93956 left
03:55
success joined
03:56
success is now known as Guest71334,
lizmat left,
p6bannerbot sets mode: +v Guest71334
04:01
_isomorphismes joined
04:02
p6bannerbot sets mode: +v _isomorphismes
|
|||
_isomorphismes | is there a want / need for (1) something like a data.frame (panda) (2) matrix factorisation ? | 04:04 | |
looks like new perl has literate programming (it says à la haskell but could also à la .Rmd or à la jupyter). Anyone in here used it Perl6::Literate? | |||
MasterDuke | _isomorphismes: i can recall people mentioning something like panda being a good thing. don't know anything about the other stuff you mentioned | 04:14 | |
Kaiepi | finally got it to work! | 04:15 | |
thanks Xliff | |||
Xliff | :) | 04:17 | |
_isomorphismes | MasterDuke: the best 3-4-5 parts of #R are (1) plotting (2) vectorised multiplication (dot-product or convolved) (3) Rmd's (literate code) (4) matrix factorisation & linear model built in | 04:20 | |
04:21
bph^ left
|
|||
_isomorphismes | MasterDuke: panda / data.frames are 2-D arrays with one data type per column and a header/label for each column. (Also optionally labels for rows, and a few other things). It's a useful data structure, and less wrong than time series (which was implemented several times and none really stuck) | 04:21 | |
MasterDuke: github.com/wch/r-source/tree/trunk...y/graphics + stats have copyable ideas | 04:26 | ||
04:42
sauvin joined,
p6bannerbot sets mode: +v sauvin
04:56
Cabanoss- joined,
p6bannerbot sets mode: +v Cabanoss-,
w_richard_w left
04:57
Cabanossi left
05:08
molaf left
05:25
zacts joined,
p6bannerbot sets mode: +v zacts
05:26
kurahaupo left
05:27
_isomorphismes left
05:30
Guest71334 left
05:32
success joined
05:33
zacts left,
success is now known as Guest64488,
p6bannerbot sets mode: +v Guest64488
05:39
robertle joined
05:40
p6bannerbot sets mode: +v robertle,
_isomorphismes joined
05:41
p6bannerbot sets mode: +v _isomorphismes
05:49
curan joined,
p6bannerbot sets mode: +v curan
05:54
ncb^ joined
05:55
p6bannerbot sets mode: +v ncb^
06:09
Actualeyes joined
06:10
p6bannerbot sets mode: +v Actualeyes
06:11
jmerelo joined
06:12
p6bannerbot sets mode: +v jmerelo
06:30
domidumont joined
06:31
p6bannerbot sets mode: +v domidumont
|
|||
Geth | doc: 683b7f178b | (JJ Merelo)++ | doc/Type/Any.pod6 Inverts sentence to correct *All* methods in Any are in list, because List subclasses Any. The inverse is not true. |
06:34 | |
doc: eb1d5d2377 | (JJ Merelo)++ | doc/Type/Any.pod6 Removes experimentality from toggle, refs #2550 |
|||
doc: 0df69d11a6 | (JJ Merelo)++ | doc/Type/Routine.pod6 is cached, still experimental. Closes #2550 |
|||
06:39
domidumont left,
[Sno] left
06:43
abraxxa joined,
p6bannerbot sets mode: +v abraxxa
06:47
abraxxa left
06:53
random_yanek left
|
|||
jmerelo | squashable6: status | 06:58 | |
squashable6 | jmerelo, Next SQUASHathon in 15 days and ≈3 hours (2019-02-02 UTC-12⌁UTC+14). See github.com/rakudo/rakudo/wiki/Mont...Squash-Day | ||
07:02
domidumont joined
07:03
abraxxa joined,
p6bannerbot sets mode: +v domidumont,
p6bannerbot sets mode: +v abraxxa
07:06
random_yanek joined
07:07
p6bannerbot sets mode: +v random_yanek
07:10
[Sno] joined
07:11
p6bannerbot sets mode: +v [Sno]
07:23
w17t left
07:30
Shozan is now known as SHODAN
07:58
w_richard_w joined
07:59
p6bannerbot sets mode: +v w_richard_w
08:00
_isomorphismes left
08:01
w_richard_w left
08:08
samcv_ is now known as samcv
08:16
w17t joined,
p6bannerbot sets mode: +v w17t
08:32
ufobat joined
08:33
p6bannerbot sets mode: +v ufobat
08:38
w17t left,
wi15ht joined,
p6bannerbot sets mode: +v wi15ht
|
|||
ufobat | good morning :D | 08:39 | |
lookatme_q | ufobat, o/ | ||
08:39
rindolf joined,
Guest64488 left,
success joined
08:40
success is now known as Guest740,
p6bannerbot sets mode: +v rindolf,
p6bannerbot sets mode: +v Guest740
|
|||
lookatme_q | m: my $str = Buf.new([137, 80, 78, 71, 13, 10, 26, 10, 0]).decode("latin1"); say $str.chars, " ", $str.codes; say $str ~~ /. ** 8/; say $str ~~ m:P5/.{8}/;/ | 08:41 | |
camelia | 5===SORRY!5=== Regex not terminated. at <tmp>:1 ------> 3tr ~~ /. ** 8/; say $str ~~ m:P5/.{8}/;/7⏏5<EOL> Regex not terminated. at <tmp>:1 ------> 3tr ~~ /. ** 8/; say $str ~~ m:P5/.{8}/;/7⏏5<EOL> Unable to parse regex; c… |
||
lookatme_q | m: my $str = Buf.new([137, 80, 78, 71, 13, 10, 26, 10, 0]).decode("latin1"); say $str.chars, " ", $str.codes; say $str ~~ /. ** 8/; say $str ~~ m:P5/.{8}/; | 08:42 | |
camelia | 8 9 「PN |
||
lookatme_q | m: my $str = Buf.new([137, 80, 78, 71, 13, 10, 26, 10, 0]).decode("latin1"); say $str.chars, " ", $str.codes; say so $str ~~ /. ** 8/; say so $str ~~ m:P5/.{8}/; | ||
camelia | 8 9 True False |
||
lookatme_q | what's the difference of Perl 5 and Perl 6 regex ? | ||
The dot | |||
08:45
wi15ht left,
w17t joined,
p6bannerbot sets mode: +v w17t,
dakkar joined
08:46
p6bannerbot sets mode: +v dakkar
08:49
abraxxa left
08:50
abraxxa joined,
Guest740 left
|
|||
ufobat | in perl5 the . does not match on the newline | 08:50 | |
08:51
p6bannerbot sets mode: +v abraxxa
|
|||
ufobat | my $str = Buf.new([137, 80, 78, 71, 13, 10+40, 26, 10+40, 0]).decode("latin1"); say $str.chars, " ", $str.codes; say so $str ~~ /. ** 8/; say so $str ~~ m:P5/.{8}/; | 08:51 | |
evalable6 | 9 9 True False |
||
ufobat | any maybe not on the CR | ||
08:51
failure joined
|
|||
ufobat | my $str = Buf.new([137, 80, 78, 71, 13+40, 10+40, 26, 10+40, 0]).decode("latin1"); say $str.chars, " ", $str.codes; say so $str ~~ /. ** 8/; say so $str ~~ m:P5/.{8}/; | 08:51 | |
evalable6 | 9 9 True True |
||
ufobat | yeah | ||
08:52
failure is now known as Guest19311
|
|||
lookatme_q | ufobat, that's right | 08:52 | |
thanks :) | |||
ufobat | my $str = Buf.new([137, 80, 78, 71, 13, 10, 26, 10, 0]).decode("latin1"); say $str.chars, " ", $str.codes; say so $str ~~ /. ** 8/; say so $str ~~ m:P5m/.{8}/; | ||
08:52
p6bannerbot sets mode: +v Guest19311
|
|||
lookatme_q | Actually I read this article blogs.perl.org/users/sylvain_coline...3-gfx.html | 08:52 | |
ufobat | m: my $str = Buf.new([137, 80, 78, 71, 13, 10, 26, 10, 0]).decode("latin1"); say $str.chars, " ", $str.codes; say so $str ~~ /. ** 8/; say so $str ~~ m:P5m/.{8}/; | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Unsupported use of {N,M} as general quantifier; in Perl 6 please use ** N..M (or ** N..*) at <tmp>:1 ------> 3r ~~ /. ** 8/; say so $str ~~ m:P5m/.{8}7⏏5/; |
||
lookatme_q | from the weekly report | ||
ufobat | m: my $str = Buf.new([137, 80, 78, 71, 13, 10, 26, 10, 0]).decode("latin1"); say $str.chars, " ", $str.codes; say so $str ~~ /. ** 8/; say so $str ~~ m:P5/.{8}/m; | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Unsupported use of /m; in Perl 6 please use ^^ and $$ anchors at <tmp>:1 ------> 3 ~~ /. ** 8/; say so $str ~~ m:P5/.{8}/m7⏏5; |
||
ufobat | m: my $str = Buf.new([137, 80, 78, 71, 13, 10, 26, 10, 0]).decode("latin1"); say $str.chars, " ", $str.codes; say so $str ~~ /. ** 8/; say so $str ~~ m:P5/.{8}/s; | 08:53 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Unsupported use of /s; in Perl 6 please use . or \N at <tmp>:1 ------> 3 ~~ /. ** 8/; say so $str ~~ m:P5/.{8}/s7⏏5; |
||
ufobat | *shrug* | ||
lookatme_q | Interesting how using the grammar to parsing binary data | ||
ufobat | in perl5 there was a /m or /s modifier for regex to do so. but i cant remember which one | ||
yeah i loved this article as well | |||
lookatme_q | But you see | ||
We have 9 uint8 data, the chars is said only 8 | 08:54 | ||
08:55
satori__ left
|
|||
ufobat | i dont know it, but i assume that you have 8 chars (which you really have) the \0 terminates the string, it is not a character but it is a byte thats used for it | 08:55 | |
lookatme_q | gist.github.com/araraloren/f4164cd...163438f072 | 08:56 | |
ufobat, I write a simple script try to parse the header of PNG file | |||
I faced this problem in the beginning :) | |||
08:57
rindolf left
|
|||
lookatme_q | Don't know how to continue :/ | 08:58 | |
08:58
lizmat joined,
p6bannerbot sets mode: +v lizmat
|
|||
ufobat | for me it feels that there is to less native support for binary stuff in grammars :( | 08:59 | |
lookatme_q | yeah, I think it is | ||
ufobat | lookatme_q, what do you want to achive? | ||
woudn't it be cool if you could state bit patterns in binary or hex in regular expressions? | 09:01 | ||
lookatme_q | hmm, I think if I can get correct number data from the file , the script will be fine | ||
ufobat | what do you mean? | 09:02 | |
lookatme_q | I mean you write . ** 8 in the header | 09:03 | |
but they give you 9 uint8 | |||
this is what I wanted: Buf.new([137, 80, 78, 71, 13, 10, 26, 10]) | |||
the string matched in $/: Buf.new([137, 80, 78, 71, 13, 10, 26, 10, 0]) | 09:04 | ||
Is that clear ? sorry my I am not native English user | 09:05 | ||
ufobat | let me find a png image :D | 09:07 | |
lookatme_q | ufobat, okay :) | ||
ufobat, I am off work, I'll back when I am at home :) thanks | 09:12 | ||
ufobat | is it a bug? | 09:18 | |
moritz, you know everything about regexes, is it a bug? | |||
09:20
satori__ joined,
p6bannerbot sets mode: +v satori__
|
|||
moritz | I never tried parsing binary with p6 regexes :/ | 09:21 | |
but it feels a bit buggy, yes | |||
09:26
kensanata joined,
p6bannerbot sets mode: +v kensanata
|
|||
ufobat | i am wondering what makes the 9th byte with 0 to appear | 09:27 | |
HA!° | 09:31 | ||
i know why | |||
moritz | graphemes? | 09:32 | |
token header { . ** 8 <?{ say $/.Str.chars }> } | 09:33 | ||
ufobat | exactly | ||
moritz | says 8 | ||
ufobat | github.com/croservices/cro-http/pull/65 | ||
there jnthn explained to me that in regexes \r\n is a single grapheme | 09:34 | ||
and the 0d 0a is \r\n | |||
moritz | not just in regexes, in strings in general | ||
ufobat | yeah | ||
moritz | m: say "\r\n".chars | ||
camelia | 1 | ||
ufobat | this means that . ** 8 is just by accident 8 bytes | ||
you shoudn't parse binary with regexes :-( | 09:35 | ||
09:41
kensanata left
|
|||
jkramer | ^H^H | 09:41 | |
ups | 09:42 | ||
09:47
tyilanmenyn is now known as tyil
09:48
zakharyas joined
09:49
p6bannerbot sets mode: +v zakharyas
09:50
kensanata joined,
p6bannerbot sets mode: +v kensanata
|
|||
moritz | there's a point to be made for a codepoint-mode for grammars | 09:50 | |
when parsing json, I had to special-case parsing quoted strings, because '"' <string_contents> '"' wouldn't match if the first thing inside the quote was a combining character | 09:52 | ||
09:52
scimon joined
|
|||
moritz | github.com/moritz/json/blob/master...mar.pm#L25 | 09:52 | |
09:53
p6bannerbot sets mode: +v scimon
|
|||
moritz | and github.com/moritz/json/blob/master...ons.pm#L37 | 09:53 | |
ufobat | what was NFC again? | 09:56 | |
lizmat | Normalization Form Composite | ||
moritz | I guess NFD (decomposite) would've been more appropriate, but since there are no pre-composed chars based on ", it doesn't make a difference really | 09:57 | |
kensanata | NFC: ä; NFD: ̈ + a | ||
Too slow. | 09:58 | ||
Hah | |||
moritz | kensanata: nearly, the base char comes first | ||
so a + + a | |||
eeks | |||
kensanata | moritz: indeed, and now it displays correctly within Emacs, too. | 09:59 | |
moritz | a + \c[COMBINING DIAERESIS] | 10:00 | |
10:01
Kaiepi left,
Kaiepi joined
|
|||
ufobat | but NFD does not help for parsing binary, does it? | 10:02 | |
moritz | not really | ||
m: say 'ä'.NFD.perl | |||
camelia | Uni.new(0x0061, 0x0308).NFD | ||
10:02
p6bannerbot sets mode: +v Kaiepi
|
|||
moritz | it would, if grammars worked on NFD, but grammars *only* work on Str | 10:02 | |
10:03
satori__ left
|
|||
ufobat | :-( | 10:04 | |
10:06
Manifest0 left
10:07
Manifest0 joined
10:08
p6bannerbot sets mode: +v Manifest0
10:09
ncb^ left
10:32
Actualeyes left
10:34
rindolf joined,
p6bannerbot sets mode: +v rindolf
10:35
sena_kun joined
10:36
p6bannerbot sets mode: +v sena_kun
10:40
niceplace left
10:41
niceplace joined
10:42
p6bannerbot sets mode: +v niceplace
10:56
domidumont left
11:00
satori__ joined
11:01
p6bannerbot sets mode: +v satori__
11:12
satori__ left
11:18
ChoHag left
|
|||
andrzejku | have anyone report already Perl6 company? | 11:20 | |
11:21
ChoHag joined
11:22
araraloren joined,
p6bannerbot sets mode: +v ChoHag
11:23
p6bannerbot sets mode: +v araraloren
|
|||
moritz | andrzejku: I can't parse your question | 11:23 | |
araraloren | hi | ||
ufobat, thanks for trying, so that article is just special case, I think | 11:28 | ||
ufobat | i am afraid, yeah :( | 11:29 | |
11:36
molaf joined,
molaf left
11:48
pmurias joined,
p6bannerbot sets mode: +v pmurias
|
|||
pmurias | do we have a way to grep *just* Perl 6 modules? | 11:48 | |
lizmat | I mentioned one a few weeklies ago :-) | 11:49 | |
11:49
w17t left
|
|||
timotimo | we have greppable6 :) | 11:49 | |
pmurias | lizmat: I just looked up the link in the weekly, it seems to be searching for both Perl 5 and Perl 6 modules | ||
lizmat | there's a radio button | 11:50 | |
timotimo | greppable: blurb | ||
greppable6 | timotimo, 12 lines, 2 modules: gist.github.com/bb7039ec5510b52dfa...06980588f6 | ||
pmurias | greppable: lib | ||
lizmat | ah, that only includes Perl 6, not exclude Perl 5 :-( | 11:51 | |
11:52
w17t joined,
p6bannerbot sets mode: +v w17t
|
|||
lizmat | github.com/charsbar/CPAN-Groonga/issues/1 | 11:52 | |
greppable6 | pmurias, 25032 lines, 1035 modules: gist.github.com/c25f28c312eee40124...c9439ebe5c | ||
lizmat | jjmerelo++ # twitter.com/jjmerelo/status/1085858117164781570 | 11:53 | |
pmurias | greppable: use lib | ||
greppable6 | pmurias, 2437 lines, 475 modules: gist.github.com/31fb368f88d66f05ff...bd4c914876 | ||
11:54
andrewalker joined
|
|||
pmurias | I have been thinking about 'use lib' recently as it's causing problems in running stuff in precompiled mode (roast tests in particular) | 11:54 | |
11:54
p6bannerbot sets mode: +v andrewalker
|
|||
lizmat | use lib has more issues, e.g. when specifying a dir that has a lot of files in it :-) | 11:55 | |
araraloren | yeah, I faced that problem long time ago | 11:56 | |
too slow | |||
jnthn | I thought `use lib` was simply not allowed in precompilation mode, because it's too late to have any effect at that point? | ||
pmurias | jnthn: yes, by causing problems I mean not running at all ;) | 11:57 | |
but the whole concept of the pragma itself seems to suck, it takes a patch that's resolved relative to the current directory the program is run from | 12:00 | ||
when people actually use it as if it was relative to the directory the file that contains it is in | 12:01 | ||
12:02
pmurias left
12:03
pmurias joined,
p6bannerbot sets mode: +v pmurias
|
|||
pmurias | maybe we could allow 'use lib' in precompilation mode when the topmost repositiory in the chain is the same as the one 'use lib' wants to add? | 12:06 | |
so that 'use lib "foo"' would work in precompilation mode with perl6 -Ifoo | |||
? | 12:07 | ||
jmerelo | jnthn: If I remember correctly, it fails in precompilation mode. | ||
jmerelo tries to remember if he asked it in SO or raised an issue in rakudo | 12:08 | ||
jnthn | pmurias: You'll have to ask somebody like nine++ who knows the details of that | ||
Though certainly as I understand it, it's not really possible in general to make it work, but there might just be some wiggle room if we allow precompiling scripts | 12:09 | ||
pmurias | jnthn: I'm not sure how to test roast tests that use 'use lib' in precomp mode | 12:12 | |
jmerelo | jnthn: do we allow precompilation of scripts? I didn't think we could. | 12:13 | |
12:13
pmurias left
|
|||
jmerelo | pmurias: you can try and call the precomp methods explicitly. | 12:13 | |
12:13
pmurias joined,
p6bannerbot sets mode: +v pmurias
|
|||
pmurias | jmerelo: I'm precompiling stuff manually | 12:14 | |
jnthn | pmurias: I don't think it's possible. | ||
pmurias | to run script | ||
12:15
cpan-p6 left,
cpan-p6 joined
|
|||
cpan-p6 | 03cpan-p6 reporting for duty! [Perl 6] 02git.tyil.nl/perl6/app-cpan-uploadnotifierbot | 12:15 | |
New module released to CPAN! JSON-Name (0.0.3) by 03JSTOWE | |||
New module released to CPAN! JSON-Marshal (0.0.16) by 03JSTOWE | |||
12:16
p6bannerbot sets mode: +v cpan-p6
|
|||
pmurias | jnthn: I could textually mangled them (they way we fudge stuff), but that feels wrong | 12:16 | |
jmerelo | pmurias: I mean that whatever you do using statements like "use lib" and so so you should be able to do it using CompUnits explicitly. Tat "use lib" should be moved to the precomp unit. | ||
jmerelo understands it's difficult to make this understandable and is not sure he actually understands it. | |||
pmurias | or we could remove 'use lib' from roast scripts and run the roast scripts with a perl6 -I... | 12:17 | |
lizmat | pmurias: what's the functional difference between -Ilib and 'use lib "lib"' ? | 12:18 | |
pmurias | -Ilib can work with precompilation | ||
12:23
molaf joined
12:24
p6bannerbot sets mode: +v molaf
|
|||
pmurias | lizmat: but they do the same thing just at different points in time | 12:33 | |
lizmat | I guess I hadn't realized that "use lib" prevents precompilation | 12:34 | |
12:41
rindolf left,
reach_satori joined
12:42
p6bannerbot sets mode: +v reach_satori
12:46
reach_satori left
12:52
andrzejku left,
andrzejku joined
12:53
p6bannerbot sets mode: +v andrzejku
12:56
domidumont joined,
p6bannerbot sets mode: +v domidumont
13:00
breinbaas left
13:11
reach_satori joined,
p6bannerbot sets mode: +v reach_satori
|
|||
SmokeMachine | Os it possible to populate a CStruct class with a Buf? | 13:14 | |
s/Os/Is/ | |||
moritz | possibly with a nativecast, dunno | 13:22 | |
SmokeMachine | Wouldn’t that be a good way to “parse” binary data? | 13:29 | |
13:30
sena_kun left
|
|||
SmokeMachine | m: use NativeCall; class C is repr<CStruct> { has int8 $.a }; my $c = C.new: Buf.new: 42; say $c; say $c.a | 13:30 | |
camelia | Default constructor for 'C' only takes named arguments in block <unit> at <tmp> line 1 |
||
jnthn | Only if you know it's endainness matches the machine you're on... :) | 13:31 | |
SmokeMachine | jnthn: yes... | 13:32 | |
pmurias | jnthn: could the endiannes of the place the CStruct is taken from be supplied? | 13:33 | |
13:33
molaf left
13:37
pmurias left
13:38
pmurias joined,
p6bannerbot sets mode: +v pmurias
13:44
pmurias left
13:45
pmurias joined,
p6bannerbot sets mode: +v pmurias,
lucasb joined,
p6bannerbot sets mode: +v lucasb
13:47
masak_ is now known as masak,
sena_kun joined
13:48
p6bannerbot sets mode: +v sena_kun
13:52
scimon left
13:57
reach_satori left
|
|||
SmokeMachine | m: use NativeCall; class C is repr<CStruct> { has int8 $.a }; my $c = nativecast(C, Buf.new: 42); say $c; say $c.a # moritz you were right | 14:08 | |
camelia | C.new(a => 42) 42 |
||
SmokeMachine | m: use NativeCall; class C is repr<CStruct> { has int8 $.a; has int16 $.b }; my $c = nativecast(C, Buf.new: 42, 0, 13); say $c; say $c.a, $c.b | 14:10 | |
camelia | C.new(a => 42, b => 13) 4213 |
||
14:11
jmerelo left
14:14
scimon joined
14:15
p6bannerbot sets mode: +v scimon
14:19
scimon left,
oftl_ is now known as oftl,
AlexDani` is now known as AlexDaniel
14:34
scimon joined
14:35
p6bannerbot sets mode: +v scimon
14:41
scimon left,
breinbaas joined
|
|||
breinbaas | mutt | 14:41 | |
El_Che | butt | 14:42 | |
14:42
p6bannerbot sets mode: +v breinbaas
|
|||
breinbaas | sorry, wrong screen | 14:42 | |
14:45
scimon joined
14:46
lizmat left,
p6bannerbot sets mode: +v scimon
14:51
eno joined,
p6bannerbot sets mode: +v eno
|
|||
eno | is there anyone here who is familiar with the nqp repl? | 14:52 | |
I'm trying to test out regular expressions with nqp but I keep getting the same error "Too many positionals passed; expected 1 argument but got 2" | 14:54 | ||
when I do something like this: "hi" ~~ / "hi" / | 14:55 | ||
sena_kun | nqp: my $a := "hi" ~~ /"hi"/; say($a); | 14:57 | |
camelia | hi | ||
sena_kun | eno, I am not a nqp user though, but ^ may help. | 14:58 | |
eno | im getting the same error | 14:59 | |
sena_kun | and just in case, nqp is not intended for end user to write code in, unless you want to help with Rakudo or some other compiler development. :) | ||
eno | I know, I'm writing a parser for the vm | 15:00 | |
sena_kun | eno, what is your moarvm/nqp/rakudo version? | ||
the code above runs ok on 2018.12. | 15:01 | ||
eno | nqp --version : This is nqp version 2018.03 built on MoarVM version 2018.03 | ||
default on ubuntu | |||
sena_kun | hmm, this is a bit old side, but I still don't think it shouldn't work because of that. | 15:02 | |
have you seen examples at nqp repo? | |||
eno | yeah, it's not very robust | 15:03 | |
moritz | so, what code did you run, exactly? | 15:04 | |
Perl 6 is more programmer-friendly than NQP :) | |||
araraloren | Is NQP has grammar ? | 15:05 | |
moritz | sure | ||
Rakudo's Perl 6 grammar is written in NQP | |||
eno | 1 ~~ /1/ for example | ||
throws Too many positionals passed; expected 1 argument but got 2 | |||
araraloren | oh, well, maybe it is cause by the token name, if you are using grammar | ||
moritz | github.com/rakudo/rakudo/blob/mast...rammar.nqp | ||
eno | also how do you make a token or rule outside a grammar? | 15:06 | |
pmurias | eno: 'the vm' - what are you creating? | ||
araraloren | nap: say(123); | 15:07 | |
eno | pmurias: just a custom language | ||
araraloren | nqp: say(123); | ||
camelia | 123 | ||
moritz | nqp: 1 | 15:08 | |
camelia | ( no output ) | ||
moritz | nqp: 1 ~~ /1/ | ||
camelia | ( no output ) | ||
moritz | works here | ||
araraloren | nqp: say(1 ~~ /1/); | ||
camelia | 1 | ||
15:09
brrt joined
|
|||
eno | "Too many positionals passed; expected 1 argument but got 2" does anyone know what this error is referring to? | 15:09 | |
15:09
skids joined
|
|||
moritz | no | 15:10 | |
15:10
p6bannerbot sets mode: +v brrt
|
|||
moritz | do you get a backtrace as well? | 15:10 | |
araraloren | m: sub f($a) { }; f(1, 2); | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Calling f(Int, Int) will never work with declared signature ($a) at <tmp>:1 ------> 3sub f($a) { }; 7⏏5f(1, 2); |
||
15:10
w17t left
|
|||
moritz | nqp: sub f($a) { }; f(1, 2); | 15:10 | |
camelia | Too many positionals passed; expected 1 argument but got 2 at <tmp>:1 (<ephemeral file>:f) from <tmp>:1 (<ephemeral file>:<mainline>) from gen/moar/stage2/NQPHLL.nqp:1685 (/home/camelia/rakudo-m-inst-1/share/nqp/lib/NQPHLL.moarvm:eval) from gen/… |
||
15:10
p6bannerbot sets mode: +v skids
|
|||
araraloren | hmm, nice | 15:10 | |
so it maybe cause by many problem like this | 15:11 | ||
eno | the weird thing is the error doesn't occur the first time > "hi" ~~ /"hi"/> 1 ~~ /1/Too many positionals passed; expected 1 argument but got 2> "hi" ~~ /"hi"/Too many positionals passed; expected 1 argument but got 2 | 15:12 | |
moritz | oh, so it's a REPL weirdness | ||
eno | i should probably upgrade and see if it works | 15:13 | |
araraloren | I got same problem in REPL | 15:14 | |
I think 2018.12 is last release | 15:15 | ||
eno | this is a totally different problem but I can't get nqp (or perl6 to compile) Configuring native build environment ................... trying to compile a simple C program ............... ERROR Can't link simple C program. Failing command: gcc -o try try.o 2>&1 Error: /usr/bin/ld: cannot find crt1.o: No such file or directory/usr/bin/ | 15:16 | |
ld: cannot find crti.o: No such file or directorycollect2: error: ld returned 1 exit status | |||
I definately have gcc and ld installed | |||
15:16
cfa joined,
p6bannerbot sets mode: +v cfa
|
|||
araraloren | night o/ | 15:16 | |
15:17
araraloren left
|
|||
moritz | eno: crt1.o comes from libc6-dev on my Ubuntu box | 15:17 | |
eno | libc6-dev is installed | 15:18 | |
moritz | do you have a /usr/lib/x86_64-linux-gnu/crt1.o ? | ||
eno | yep | 15:19 | |
I even linked it to /usr/lib | 15:20 | ||
is moarvm 32bit? | 15:22 | ||
ah, export LIBRARY_PATH=/usr/lib/x86_64-linux-gnu:$LIBRARY_PATH seemed to do the trick | 15:25 | ||
15:30
curan left
15:32
AlexDaniel` left,
ofperfection[m] left
15:33
Matthew[m] left,
lance_w[m] left,
tyil[m] left,
MitarashiDango[m left,
Garland_g[m] left,
Demos[m] left,
AlexDaniel-old[m left,
wictory[m] left,
tyil[m]1 left,
Garland_g[m] joined,
p6bannerbot sets mode: +v Garland_g[m]
15:35
Matthew[m] joined,
p6bannerbot sets mode: +v Matthew[m]
15:36
tyil[m] joined,
p6bannerbot sets mode: +v tyil[m],
rindolf joined
15:37
tyil[m]1 joined,
p6bannerbot sets mode: +v tyil[m]1,
AlexDaniel-old[m joined,
p6bannerbot sets mode: +v AlexDaniel-old[m,
p6bannerbot sets mode: +v rindolf,
wictory[m] joined,
p6bannerbot sets mode: +v wictory[m],
irdr left
15:38
Demos[m] joined,
p6bannerbot sets mode: +v Demos[m],
irdr joined
15:39
p6bannerbot sets mode: +v irdr
15:40
MitarashiDango[m joined,
p6bannerbot sets mode: +v MitarashiDango[m
15:41
AlexDaniel` joined,
p6bannerbot sets mode: +v AlexDaniel`,
lance_w[m] joined,
p6bannerbot sets mode: +v lance_w[m]
15:42
ofperfection[m] joined,
p6bannerbot sets mode: +v ofperfection[m]
|
|||
daxim | is the parser that is called by the rx quotelike user accessible? for example, can I call some code that takes Str('a+') as input and returns a parse-tree [Token => 'a', Kleene-Plus => True] or similar? | 15:48 | |
timotimo | you can ask EVAL to give you the results of stage "ast" or "optimize", which will be a QAST tree containing, among other things, the regex you've defined there | 15:49 | |
15:50
MilkmanDan left
|
|||
daxim | do you have a runnable example? | 15:50 | |
15:50
MilkmanDan joined,
p6bannerbot sets mode: +v MilkmanDan
|
|||
timotimo | m: use MONKEY; say EVAL('rx/a+/', :stage<optimize>).^name | 15:51 | |
camelia | Regex | ||
timotimo | m: use MONKEY; say EVAL('rx/a+/', :target<optimize>).^name | ||
camelia | Regex | ||
timotimo | hm, which is it | ||
ah, EVAL doesn't take it | 15:52 | ||
m: use Perl6::Compiler:from<NQP> | |||
camelia | ( no output ) | ||
15:52
dct joined,
p6bannerbot sets mode: +v dct
|
|||
timotimo | m: use Perl6::Compiler:from<NQP>; Perl6::Compiler.eval('rx/a+/', :target<optimize>).^name.say | 15:53 | |
camelia | ===SORRY!=== Cannot look up attributes in a Perl6::Compiler type object |
||
timotimo | m: use Perl6::Compiler:from<NQP>; Perl6::Compiler.new.eval('rx/a+/', :target<optimize>).^name.say | ||
camelia | ===SORRY!=== Unknown compilation target 'optimize' |
||
timotimo | m: use Perl6::Compiler:from<NQP>; Perl6::Compiler.new.eval('rx/a+/', :target<ast>).^name.say | ||
camelia | ===SORRY!=== Cannot find method 'parse' on object of type NQPMu |
||
15:53
jme` left
|
|||
timotimo | m: use Perl6::Compiler:from<NQP>; Perl6::Compiler.new.stages.say | 15:55 | |
camelia | (start parse ast mast mbc moar) | ||
15:56
ExtraCrispy joined,
p6bannerbot sets mode: +v ExtraCrispy
|
|||
cfa | m: my $x = rx/a/; my $y = /$x/; say $y; | 15:58 | |
camelia | /$x/ | ||
cfa | hmm, in the repl this is fine as a one liner, but if i input `my $y = /$x/;` on its own i get: "Regex object coerced to string (please use .gist or .perl to do that)" | 15:59 | |
(even though $y is set to /$x/, not /a/) | |||
16:00
molaf joined
16:01
p6bannerbot sets mode: +v molaf
|
|||
cfa | is this intended? | 16:01 | |
timotimo | m: use Perl6::Compiler:from<NQP>; use Perl6::Grammar:from<NQP>; use Perl6::Actions:from<NQP>; my Mu $comp := Perl6::Compiler.new; $comp.parsegrammar(Perl6::Grammar.new); $comp.parseactions(Perl6::Actions.new); $comp.eval("rx/a+/", :target<ast>).^name.say | ||
camelia | QAST::CompUnit | ||
timotimo | cfa: probably the difference between how "say $a-regex" does it and what the repl printer does | 16:02 | |
yes, indeed | 16:03 | ||
interactive_result is implemented as nqp::say(~$value) | |||
daxim: it's rather wordy, but this is how you would do what i meant | |||
m: use Perl6::Compiler:from<NQP>; use Perl6::Grammar:from<NQP>; use Perl6::Actions:from<NQP>; my Mu $comp := Perl6::Compiler.new; $comp.parsegrammar(Perl6::Grammar.new); $comp.parseactions(Perl6::Actions.new); $comp.eval("rx/a+/", :target<ast>).dump.say | 16:04 | ||
camelia | - QAST::CompUnit :W<?> :UNIT<?> :CAN_LOWER_TOPIC<?> [pre_deserialize] - QAST::Stmt - QAST::Stmt - QAST::Op(loadbytecode) - QAST::VM [moar] - QAST::SVal(ModuleLoader.moarvm) … |
||
cfa | timotimo: hmm | 16:07 | |
to be clear, here's what i'm seeing: | 16:08 | ||
> my $x = rx/a/; my $y = /$x/;/$x/> my $z = /$x/;Regex object coerced to string (please use .gist or .perl to do that) | |||
i'm not sure i understand why the $y and $z cases there are output differently | |||
16:09
[Sno] left
|
|||
timotimo | i almost never use the repl, because it has lots of strange behaviour all over the place | 16:11 | |
oh | |||
i'm sorry, i didn't look closely enough | |||
cfa | np | 16:12 | |
timotimo | yeah, it is weird that it doesn't complain in the first case | ||
cfa | timotimo: but it's not being coerced, is it? | 16:14 | |
the warning strikes me as incorrect | |||
i.e., | 16:15 | ||
m: my $x = rx/abc/; my $y = /$x/; say 'abc' ~~ $y | |||
camelia | 「abc」 | ||
timotimo | ah, i didn't realize we implement that | ||
16:15
dct left
|
|||
cfa | and from above, | 16:15 | |
m: my $x = rx/abc/; my $y = /$x/; say $y; | |||
camelia | /$x/ | ||
cfa | maybe the warning assumes i want $y to be /abc/ | ||
the context here is really: | 16:16 | ||
m: my $x = /abc/; { if /$x/ { say 'yes' } } given 'def' | |||
camelia | ( no output ) | ||
cfa | m: my $x = /abc/; { if /$x/ { say 'yes' } } given 'abc' | ||
camelia | yes | ||
16:21
zacts joined,
p6bannerbot sets mode: +v zacts
|
|||
daxim | these undocumented structures do not look user serviceable, thanks in any case, timotimo++ | 16:23 | |
16:24
domidumont left
16:26
Possum joined,
nightfrog left
16:27
p6bannerbot sets mode: +v Possum
16:30
nightfrog joined
16:31
p6bannerbot sets mode: +v nightfrog
|
|||
Geth | URI-Encode: cfa++ created pull request #11: use v6.c, bump version number. |
16:35 | |
16:37
w17t joined,
p6bannerbot sets mode: +v w17t,
nightfrog left
16:39
kensanata left
16:40
nightfrog joined
16:41
p6bannerbot sets mode: +v nightfrog
16:47
nightfrog left,
brrt left
16:49
loops left,
eno left
16:50
nightfrog joined
16:51
loops joined,
p6bannerbot sets mode: +v nightfrog,
p6bannerbot sets mode: +v loops
16:53
ExtraCrispy left
16:57
nightfrog left
17:00
zacts left,
nightfrog joined
17:01
p6bannerbot sets mode: +v nightfrog,
reach_satori joined
17:02
p6bannerbot sets mode: +v reach_satori
17:05
scimon left
17:08
nightfrog left
17:10
nightfrog joined
17:11
p6bannerbot sets mode: +v nightfrog
17:17
nightfrog left
17:20
nightfrog joined,
cfa left
17:21
p6bannerbot sets mode: +v nightfrog,
marmor joined
17:22
p6bannerbot sets mode: +v marmor
17:24
zacts joined,
p6bannerbot sets mode: +v zacts
17:27
nightfrog left
17:32
isomorphismes left
17:34
eno joined,
p6bannerbot sets mode: +v eno
17:41
dakkar left
17:58
zakharyas left
18:02
abraxxa left
18:04
abraxxa joined,
p6bannerbot sets mode: +v abraxxa
18:07
abraxxa left
18:19
domidumont joined
18:20
p6bannerbot sets mode: +v domidumont
18:26
sauvin left
18:34
pmurias left
18:35
pmurias joined,
p6bannerbot sets mode: +v pmurias
18:54
Khisanth left
18:55
pecastro joined,
p6bannerbot sets mode: +v pecastro
19:08
jmerelo joined
19:09
p6bannerbot sets mode: +v jmerelo
19:10
zacts left
19:13
someuser joined
19:14
p6bannerbot sets mode: +v someuser
19:15
Khisanth joined
19:16
jmerelo left,
p6bannerbot sets mode: +v Khisanth
19:21
zachk joined
19:22
p6bannerbot sets mode: +v zachk
19:26
reach_satori left
19:32
domidumont left
19:54
jmerelo joined
19:55
p6bannerbot sets mode: +v jmerelo,
nightfrog joined
19:56
p6bannerbot sets mode: +v nightfrog
|
|||
Xliff | When I require a module perl6 is reporting "WARNING: unhandled Failure detected in DESTROY.", but when I use that same module, I get no errors. Has this been reported? | 19:56 | |
This is currently NOT golfable, at this time./ | 19:57 | ||
So I am not sure if this is something related to my code or rakudo. | |||
moritz | DESTROY behavior depends on GC, and is thus not deterministic | ||
19:58
zachk left,
zachk joined,
orwell.freenode.net sets mode: +v zachk,
p6bannerbot sets mode: +v zachk
|
|||
mst | right, you can run into similar problems with perl5 during global destruction | 19:58 | |
so basically that indicates that the destructor throws an error ... sometimes | 19:59 | ||
20:01
zacts joined,
p6bannerbot sets mode: +v zacts
|
|||
timotimo | daxim: as part of the macro work that masak is prototyping in 007, i'd expect QTrees to be a user-facing version that should be much easier to work with, and surely also language-specified rather than implementation-specific | 20:07 | |
daxim | ok, good to know | 20:08 | |
timotimo | do you have anything in particular in mind? just curious | 20:09 | |
20:11
marmor left
|
|||
daxim | info embargoed until march | 20:11 | |
timotimo | sounds like a conference :) | 20:12 | |
daxim | in any case a parser for regex would be useful to have, in p5 land it powers a linter, an optimiser and an explanation tool/translator into english prose | ||
timotimo | "parser for regex" in perl6 unfortunately includes "parser for the entire perl6 language braid" :) | 20:13 | |
daxim | if I need it urgently, I'll make an 80% solution from scratch, can't be too difficult | ||
20:13
jmerelo left
|
|||
timotimo | you can steal rigurously from the perl6 grammar itself of course :) | 20:14 | |
20:14
MasterDuke left
20:15
ferreira left
|
|||
jnthn | I did github.com/edumentab/p6-ecma262regex fwiw | 20:21 | |
Which has a grammar in it | |||
20:22
dct joined,
p6bannerbot sets mode: +v dct,
zacts left
20:31
melezhik joined,
p6bannerbot sets mode: +v melezhik
|
|||
melezhik | going to rewrite Sparrow to 100% Perl6 he-he , last year I tried but was not ready, but now I am ... I'd like to bring all the Sparrow* ecosystem to pure Perl6 ... challenging goal ... but the more I write on Perl6 the more I like it (( | 20:32 | |
El_Che | melezhik: great news | 20:33 | |
what other languages does it use? | 20:34 | ||
melezhik | current Sparrow written on Perl5 ( I mean Sparrow/Outthentic/Outtentic::DSL CPAN modules ) | 20:35 | |
El_Che | I see, it's been a while since I have used it | ||
(mostly working with containers) | 20:36 | ||
melezhik | I am going to get rid of useless features and rewrite these parts to Perl6 ... because other parts of eco system (Sparky, Tomtit, Sparrowodo) are already in Perl6 | ||
El_Che | A good sign of the maturity of Perl 6 if you succeed | 20:37 | |
be sure to keep a list of problems | |||
and also the good stuff :) | |||
melezhik | sure ... will probably start blogs about that or something ... indeed the idea's been keeping bugging me for the last 2 years , finally I decided to start the journey ... ((: | 20:39 | |
20:44
lucasb left
20:51
Manifest0 left
20:52
Manifest0 joined
20:53
p6bannerbot sets mode: +v Manifest0
21:01
isomorphismes joined,
p6bannerbot sets mode: +v isomorphismes
|
|||
cpan-p6 | New module released to CPAN! META6 (0.0.21) by 03JSTOWE | 21:03 | |
21:05
zacts joined,
p6bannerbot sets mode: +v zacts
21:12
zacts left
21:13
zacts joined,
p6bannerbot sets mode: +v zacts
21:14
ferreira joined
21:15
p6bannerbot sets mode: +v ferreira
21:19
dct left
21:54
skids left
|
|||
Xliff | melezhik: Outtentic::DSL? :) | 21:56 | |
22:03
Praise- is now known as Praise
22:04
reach_satori joined
22:05
p6bannerbot sets mode: +v reach_satori
|
|||
cpan-p6 | New module released to CPAN! JSON-Class (0.0.11) by 03JSTOWE | 22:07 | |
zachk | are hashes thread-safe in perl6? | ||
melezhik | Xliff: Outthentic::DSL I meant | 22:13 | |
El_Che | zachk: no | ||
melezhik | but I am not going to keep it in Perl6 port | ||
only Outthentic itself, which is gonna be a part of Sparrow6 | 22:14 | ||
zachk | so i would need to use a lock to safely access one from multiple threads? | ||
El_Che | I suspect reading is ok | ||
writing is mostly problematic in most languages I know | |||
zachk: docs.perl6.org/language/concurrenc...y_concerns | 22:17 | ||
zachk | oh ty | ||
El_Che | Concurrency safe collections I have seen in other languages bring the programs to a halt almost and hence not that useful | 22:18 | |
22:18
kensanata joined,
p6bannerbot sets mode: +v kensanata
|
|||
El_Che | better lock what you need or rethink your datastructures | 22:18 | |
e.g. Channels may be handy in some cases | 22:19 | ||
22:26
[Sno] joined
22:27
p6bannerbot sets mode: +v [Sno]
22:36
pmurias left
23:06
hph^ joined
23:07
p6bannerbot sets mode: +v hph^
23:08
rindolf left
23:13
melezhik left
23:14
lizmat joined,
p6bannerbot sets mode: +v lizmat
23:34
aborazmeh joined,
aborazmeh left,
aborazmeh joined,
p6bannerbot sets mode: +v aborazmeh
23:40
kensanata left
23:44
pecastro left
23:53
Kaypie joined
|
|||
Kaypie | bit of a dumb question, but if you use Supply.act do you still need to make sure state is threadsafe with locks or semaphores? | 23:53 | |
23:54
Kaiepi left,
Kaypie left
23:55
Kaiepi joined
23:56
p6bannerbot sets mode: +v Kaiepi
23:57
zacts left
|
|||
Kaiepi | bit of a dumb question, but if i use Supply.act do i still need to make sure my code is threadsafe? | 23:57 | |
since it's only running on one thread at a time | |||
i ran into a deadlock in my telnet library i can't do anything about | 23:58 | ||
jnthn | Kaiepi: Actually supplies are always one message at a time these days, so unless you somehow create a non-serial Supply (which you really have to go out of your way to do) then .act is just like .tap. But yeah, it's one message at a time | ||
Kaiepi | oh ok | 23:59 | |
thanks |