»ö« 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:04
mempko left
00:06
AlexDani` is now known as AlexDaniel
00:11
adu left
00:16
ennio left
00:18
lookatme joined
00:32
mempko joined
00:40
leah2 left
00:43
eliasr left
00:49
silug joined
00:58
Aaronepower joined
01:06
comborico1611 joined
|
|||
comborico1611 | I just got this used book. I noticed that it had a strong scent of Febreze. Now I can smell the undertone of cigarettes. | 01:08 | |
Really strange. The book is like in perfect new condition. Yet it reeks. | |||
01:09
lizmat joined
|
|||
geekosaur | sounds/smells very undergrad dorm >.> | 01:14 | |
tusooa | lol | ||
comborico1611 | Heh | ||
Every turn of the page is like a squirt of the cologne bottle. | 01:15 | ||
Good thing this book doesn't look very promising. | |||
01:16
entonian joined,
nativecallable6 joined,
ChanServ sets mode: +v nativecallable6
01:17
unicodable6 joined,
adu joined,
quotable6 joined,
ChanServ sets mode: +v quotable6
01:18
entonian left
01:24
adu left
01:27
astj joined
|
|||
b2gills | I've gone into an apartment that was so caked with smoke that the walls were yellow where pictures were, and a light brown everywhere else | 01:32 | |
01:32
cdg joined
01:33
Zoffix joined
|
|||
Zoffix | If several tokens of a single proto regex can match the text, what are the rules for which one gets chosen? | 01:34 | |
For example, both of these can match `- QAST::Var(lexical $limit :decl(var))` github.com/zoffixznet/q/blob/maste...m6#L13-L14 | 01:36 | ||
And :sym<qast> wins now, but if I change that to <name=ident> then :sym<misc> is used. What causes the switch? | |||
01:36
cdg left
|
|||
Zoffix | Looks like "If a subrule is a protoregex, it is treated just as alternation with | is" (from speculations)... | 01:38 | |
comborico1611 | B2gills, that's sad. | ||
Zoffix | My next question is: if two alernations match the same length, which one is used | ||
"However, if two alternatives match at the same length, the tie is broken first by specificity. The alternative that starts with the longest fixed string wins; that is, an exact match counts as closer than a match made using character classes. If that doesn't work, the tie is broken by one of two methods. If the alternatives are in different grammars, standard MRO (method resolution order) determines which one | 01:39 | ||
to try first. If the alternatives are in the same grammar file, the textually earlier alternative takes precedence. (If a grammar's rules are defined in more than one file, the order is undefined, and an explicit assertion must be used to force failure if the wrong one is tried first.)" | |||
So what does that mean to mere mortals? I'd figure "'- QAST::'" is a "fixed string" and would win over \N+ | 01:41 | ||
`'- QAST::' $<name>=[a..zA..Z]+ $<rest>=\N+` seems to lose to \N+ | 01:42 | ||
TimToady | not if \N+ is longer | 01:43 | |
generally if you're gonna write a \N+ kind of rule, you should stop LTM before it | |||
Zoffix | They should match the same length here: github.com/zoffixznet/q/blob/maste...m6#L13-L14 | ||
And there :sym<qast> wins, but if I change $<name>=\S+ to [a..zA..Z]+ then it loses | 01:44 | ||
01:45
ck joined,
ck is now known as Guest25431
01:47
ckraniak left
|
|||
TimToady | I have a faint recollection of enumerated character classes being allowed to be treated as literal so that you could write [Aa]bc and such | 01:47 | |
maybe that's what's going on here | |||
01:48
ckraniak joined
|
|||
TimToady | except that seems backwards to what you're seeing | 01:48 | |
Zoffix | Oh, it needs to be $<name>=<[a..zA..Z]>+ | 01:49 | |
01:49
Guest25431 left
|
|||
Zoffix | But, the <name=ident> version still doesn't match like I want | 01:50 | |
m: grammar { token TOP { <z>+ }; proto token z {*}; token z:sym<qast> { 'QAST' <name=ident> $<rest>=\N+ }; token z:sym<misc> { \N+ } }.parse: 'QASTmeow♥', :actions(class { method z:sym<qast>($/) { say "qast"}; method z:sym<misc>($/) { say "misc"}; }) | |||
camelia | misc | ||
TimToady | but in any case, treating the entire line as a token is generally suboptimal | ||
01:50
jcallen joined
|
|||
TimToady | m: grammar { token TOP { <z>+ }; proto token z {*}; token z:sym<qast> { 'QAST' <name=ident> $<rest>=\N+ }; token z:sym<misc> { {} \N+ } }.parse: 'QASTmeow♥', :actions(class { method z:sym<qast>($/) { say $/}; method z:sym<misc>($/) { say "misc"}; }) | 01:56 | |
camelia | 「QASTmeow♥」 name => 「meow」 ident => 「meow」 rest => 「♥」 |
||
Zoffix | Ah. Thanks | 01:57 | |
01:57
ckraniak left
|
|||
TimToady | at a guess, the ident rule is terminating LTM somehow | 01:57 | |
at a guess, the ident rule is terminating LTM somehow | 01:58 | ||
m: grammar { token TOP { <z>+ }; proto token z {*}; token z:sym<qast> { 'QAST' <name=ident> $<rest>=\N+ }; token z:sym<misc> { {} \N+ } }.parse: 'QASTmeow ♥', :actions(class { method z:sym<qast>($/) { say $/}; method z:sym<misc>($/) { say "misc"}; }) | |||
camelia | 「QASTmeow ♥」 name => 「meow」 ident => 「meow」 rest => 「 ♥」 |
||
TimToady | hmm, it's not eating ws anyway... | ||
the other \N+ probably wants the same treatment too, otherwise you're just wasting NFA cycles | 02:01 | ||
Zoffix | OK. Thanks | ||
02:02
wamba left
|
|||
comborico1611 | Off to bed. | 02:03 | |
Zoffix | \o | ||
comborico1611 | o/ | ||
02:03
comborico1611 left
02:07
FROGGS left
02:15
Zoffix left
02:19
troys is now known as troys_,
GregDonald joined,
FROGGS joined
02:27
Kaiepi left,
Kaiepi joined
02:33
ckraniak joined
02:40
nekomune joined
02:47
cdg joined
02:51
cdg left
02:54
edenc joined
02:56
cdg joined
03:01
mempko left
03:03
ilbot3 joined,
ChanServ sets mode: +v ilbot3
03:05
jstuder joined
03:07
ponbiki joined
03:10
jstuder left
03:20
astj left,
astj joined
03:21
astj left,
astj joined
03:27
mempko joined
03:49
troys_ is now known as troys
03:57
bloatable6 joined,
ChanServ sets mode: +v bloatable6
|
|||
Geth | perl6-examples: ryn1x++ created pull request #52: Add Windows clear screen example |
04:25 | |
04:34
troys is now known as troys_
04:46
Cabanossi joined
05:01
epony joined
05:02
epony left
05:03
epony joined
|
|||
Geth | perl6-examples: d29719a785 | ryn1x++ | 2 files added windows example |
05:08 | |
perl6-examples: 86b49e8a85 | ryn1x++ (committed using GitHub Web editor) | categories/cookbook/15interactivity/15-03-clear-screen.pl~ Delete 15-03-clear-screen.pl~ |
|||
perl6-examples: 1b0d45ae7a | (Zoffix Znet)++ (committed using GitHub Web editor) | categories/cookbook/15interactivity/15-03-clear-screen.pl Merge pull request #52 from ryn1x/master Add Windows clear screen example |
|||
05:39
khw left
05:48
troys_ is now known as troys
05:53
konsolebox joined
06:25
FROGGS left
06:31
troys is now known as troys_
06:32
lowbro joined,
lowbro left,
lowbro joined
06:41
domidumont joined
06:42
parv joined
06:48
domidumont left
06:49
domidumont joined
06:54
troys_ is now known as troys
07:03
ggoebel left
07:06
aindilis left
07:07
aindilis joined
07:11
DarthGandalf joined
07:15
rindolf joined
07:16
ggoebel joined
07:23
domidumont left
07:31
domidumont joined
07:33
AlexDaniel left
07:37
troys left
07:41
espadrine left
07:50
domidumont left
07:51
domidumont joined
07:52
cdg left
07:57
cdg joined
08:02
cdg left
08:06
ckraniak left
08:17
domidumont left
08:20
cdg joined
08:21
ckraniak joined
08:24
cdg left
08:25
wamba joined
08:30
domidumont joined
|
|||
lizmat | Zoffix: errata applied | 08:32 | |
lizmat clickbaits p6weekly.wordpress.com/2018/01/08/...m-nearing/ | 08:33 | ||
08:34
abraxxa joined
08:38
leah2 joined
08:43
astj_ joined,
astj left
08:45
lowin joined
08:46
zakharyas joined
09:02
zakharyas left
09:04
zakharyas joined,
dakkar joined
|
|||
lowin | I've got an idea for a new hobby project and thought it would be a nice opportunity to learn a new language at the same time. So here I am, without the intention of stirring up any flame wars. Would perl6 be a good choice for me? I plan to do lots of raw binary file I/O, socket networking and hopefully never having to go back to old projects to fix future language version incompatibilities. | 09:05 | |
09:05
zakharyas left,
zakharyas joined
|
|||
lowin | perl6 caught my eye before, but I didn't have much time to really read up on it. So far the only reason I have for choosing perl6 is that I like the logo | 09:06 | |
lizmat | lowin: you might want to check mi.cro.services | 09:07 | |
DrForr | Well, for binary files you'l want to look at the Pack module (I forget the name), for socket networking you'll want to look at Cro, and otherwise I'd go for it. | ||
lizmat | PackUnpack you mean ? | ||
DrForr | Thank you, yes. | 09:08 | |
lizmat | which reminds me, I need to push that to CPAN | ||
lowin | Well I'm not really looking for modules right now, because I haven't even started yet. I was just asking if it's a good idea at all. especially the forward compatibility part | 09:09 | |
I come with C background, and things like raw I/O comes naturally. I'm hoping the language won't block me to do things like that | 09:10 | ||
DrForr | Well, no language is perfect, libraries change, interfaces change, to everyting there is a season etc. | ||
lizmat | lowin: re forward compatibility is well on our radar | ||
the "use" statement allows you to specify a version of a module to load | |||
and multiple versions of the same module can be installed simultaneously | 09:11 | ||
lowin | lizmat, I'm glad to hear it. I understand sometimes change is inevitable. But the frequency of change is what matters. I'll read up on use statement | ||
09:12
lookatme left
09:14
scimon joined
09:25
darutoko joined
09:30
[particle] joined
09:31
MilkmanDan joined
09:32
luiz_lha joined
09:34
Ven joined
09:35
Ven is now known as Guest9068,
Guest9068 is now known as Ven``,
[particle] left
09:36
[particle] joined
09:38
wamba left
|
|||
El_Che | lowin: if you don't want change use C89 :) | 09:50 | |
lowin: otherwise, most of what you mention is part of the core of rakudo | 09:51 | ||
lowin | El_Che, already am. Using C for hobby projects gets boring when you are dealing with it every day at work | ||
El_Che | lowin: I agree, my point is that a compiled languages has advantages in the "do-not-change" department | 09:52 | |
lowin: however, perl6 has many backward compatible features (like the "use version" lizmat mentioned) | 09:53 | ||
lowin | Yes ofcourse. I'm just hoping a python3 situation won't happen with perl6, I know perl6 broke compatibility with perl5, but atleast they didn't deprecate perl 5 right away like python. | 09:54 | |
scimon | Oh no, they are two different streams. | ||
Perl5 isn't going anywhere. And there's a lot of people who do both. | 09:55 | ||
El_Che | python2 and 3 is a total different story (not better, not worse, just different) | ||
lowin | That's why I didn't turn away from perl6 like I did from python3. It was mostly that and the lack of curly braces | 09:56 | |
El_Che | perl6 is not depreciating 5 (althoug the name is confusing as hell, granted), they are different languages released by different people | ||
jast | hey, let's fork Perl 6 and call the result Python 4, for improved clarity | 09:57 | |
09:57
lichtkind joined
|
|||
lichtkind | cheers | 09:58 | |
how do i include a module in a category on modules.perl6.org? thanks | |||
El_Che | jast: perl6 foresees multiple implementations :) | ||
09:59
jam__ joined
|
|||
jam__ | I'm reading about grammars right now. I came across "method TOP ($/) { make $<definition>>>.made; }" What's going on with the >> and .made? | 10:00 | |
jast | jam__: foo>>.bar means, apply the bar method to all members of foo | 10:01 | |
jam__ | nice jast ty | ||
jast | >> is an operator on an operator, a hyper operator | ||
docs.perl6.org/language/operators#..._Operators | 10:02 | ||
lichtkind | yes but ops on ops are called meta ops, << is a special meta op called hyper | ||
jam__ | there's an operator for everything :] | ||
thanks for the link | |||
jast | there are multiple hyper operators | 10:03 | |
10:03
jam__ left
|
|||
lichtkind | perl was always an operator oriented language :) | 10:03 | |
jast | syntax-oriented, in fact | ||
lichtkind | or in short oo :) | ||
jast | I love me some syntax | ||
10:04
silug left
10:13
zakharyas left,
cdg joined
|
|||
scimon | lichtkind: I'm guessing the tags list in META6.json is used for the tags in modules.perl6.org (that's a total guess but I think it makes sense) | 10:17 | |
10:18
cdg left
10:19
lichtkind left
|
|||
scimon | (Now I have to tag my modules...) | 10:20 | |
jnthn | Yes, that's where the tags show up | 10:21 | |
DrForr | scimon: Look around for a t/meta.t test file as well, that helps keep things organized. | 10:22 | |
jnthn | But if writing one, please put it in xt, not in t | 10:24 | |
scimon | Any doc's on meta.t ? (First I've heard of it) | 10:26 | |
DrForr | Not especially, it just runs Test::META that checks your META6.json file for formatting and potential infelicities. | 10:27 | |
scimon | Ah. | ||
I'm mostly using mi6 for module building and testing so much of the time it's managing the file (and it explodes hilariously if you have poorly formatted JSON in it). | 10:28 | ||
I've got a couple of plans for stuff to write, first up is a Test module that wraps HTTP::Server::Async to make running Mock HTTP servers nice and easy. | 10:29 | ||
10:30
luiz_lha left
|
|||
scimon | As I need something like that for the bigger plan which is to start work on WWW::Mechanize. | 10:31 | |
El_Che | lizmat, AlexDaniel`: I am getting a idea why buggable test passed and the ones on the released tar aren't | 10:37 | |
10:40
zakharyas joined
10:46
vichib joined
|
|||
AlexDaniel` | El_Che: what is it? | 10:53 | |
10:55
vichib left
10:58
vichib joined,
wamba joined
11:01
[particle] left
11:03
domidumont left
11:06
ExtraCrispy joined
11:08
ExtraCrispy left,
ExtraCrispy_ joined
11:10
reu joined
11:13
ExtraCrispy_ left,
ExtraCrispy_ joined,
ExtraCrispy_ left
|
|||
El_Che | AlexDaniel`: I think buggable and dev use --gen-moar and --gen-nqp, while I build from the released tars from nqp, moarvm and rakudo. Testing this as we speak | 11:13 | |
11:14
ExtraCrispy joined
11:15
zakharyas left
11:22
zakharyas joined
11:23
Zoffix joined
|
|||
Zoffix | El_Che: FWIW, I use ZScript that keeps MoarVM/nqp/rakudo in separate dirs and builds them each separately and doesn't use --gen thing: github.com/zoffixznet/z/blob/maste...#L204-L222 | 11:24 | |
11:25
parv left
|
|||
Zoffix | RE: github.com/zoffixznet/q yeah I'll write docs eventually; I think it'll end up as an ecosystem module CoreHackers::Q after I tune it up a bit. And I think the current QAST::Node.dump is fairly decent. My tool just adds a dynamic browser-based explorer to QAST::Node.dump where you can collapse tree nodes and it colorcodes things like sunk layers or calls that weren't made static | 11:27 | |
11:31
luiz_lha joined,
solarbunny joined,
vichib left
|
|||
El_Che | Zoffix: do you use the release tars of git commits? | 11:34 | |
Zoffix | El_Che: git commits. | 11:44 | |
and looks like release tarballs would just contains a tar of git ls-files: github.com/rakudo/rakudo/blob/mast...#L312-L325 | 11:46 | ||
so I'm dubious the problems you're seeing is due to that | |||
11:48
Zoffix left
11:53
cdg joined
11:57
cdg left
12:03
lichtkind joined
12:04
vichib joined
12:06
wamba left
|
|||
El_Che | ok, it is as I suspected | 12:12 | |
12:12
[particle] joined
|
|||
El_Che | I'll update the bug | 12:12 | |
12:12
konsolebox left
12:13
konsolebox joined
12:14
markong joined
12:15
domidumont joined
12:19
hoka joined
12:22
hoka left
12:27
cdg joined,
pilne left
12:31
cdg left
12:32
someuser joined
12:33
konsolebox left
12:34
konsolebox joined
12:48
vichib left
12:50
[particle] left
|
|||
Geth | doc: 3796780fb8 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Type/Signature.pod6 Clarify interaction between :D and optional params - Include examples and clarify typecheck explosion - Remove "passed", since that implies[^1] typecheck does not apply to optional params - Reword "undefined", since there's a difference between .defined and .DEFINITE [1] stackoverflow.com/questions/481663...it-a-requi |
13:08 | |
synopsebot | Link: doc.perl6.org/type/Signature | ||
doc: b794a73e66 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Type/Signature.pod6 Fix default default for optional params Blocks actually default to Mu not Any |
13:11 | ||
13:17
lichtkind left
13:22
pmurias joined
13:30
ckraniak left
13:32
lichtkind joined
13:33
torbjorn joined
|
|||
torbjorn | should I include \n when writing grammars to mark the end of line? | 13:34 | |
Im trying to parse this: paste.fedoraproject.org/paste/UU01...88sRDigHyQ | |||
jnthn | You'll need something that eats the newline char, yes | 13:35 | |
\n will do it | |||
moritz | torbjorn: yes | ||
masak | hi torbjorn. it looks like a line-based format, so I'd say yes | 13:36 | |
moritz | though you can use $$ to match a line end without consuming it from the input | ||
masak | $$ and \n are two fairly different things, though :) | ||
(like moritz said) | |||
torbjorn | I see the distinction | ||
which explained why my use of ^ does not work , I need ^^ further down, thanks | |||
masak | torbjorn: I would *warmly* recommend evolving a grammar alongside a test suite | 13:37 | |
torbjorn | how does one do that? | 13:38 | |
like any other perl6 module test suite i suppose | |||
jast | yes :) | ||
masak | yes, one with exercises the grammar's .parse method | ||
and negative tests ("this shouldn't parse") are just as important as positive ones ("this parses") | 13:39 | ||
13:39
Aaronepower left
|
|||
moritz | may I warmly recommend smile.amazon.com/Parsing-Perl-Rege...B0785L6WR6 ? | 13:39 | |
I'm biased, but the reviews are very positive so far as well :-) | |||
masak | moritz++ # I should've thought of suggesting that :) | ||
moritz | (and yes, that also talks about testing grammars, and has worked examples) | ||
13:40
vichib joined
|
|||
moritz | and about dealing with significant whitespace | 13:40 | |
13:40
vichib left
|
|||
moritz | and even indentation-based languages, like python or yaml | 13:40 | |
torbjorn | well the temperature of the recomendation is yours to adjust, the temperature of my receiption matches that of yours though, so yes! | ||
13:40
vichib joined
|
|||
moritz | </ad> | 13:40 | |
lichtkind | is the modules index hand crafted? | 13:41 | |
moritz | it's even organic! | ||
lichtkind: the software behind it is | |||
13:41
[particle] joined
|
|||
lichtkind | so what i have to do to include math:matrix into math section | 13:42 | |
moritz | lichtkind: you can put tags into the meta file | ||
or your module | |||
13:42
ckraniak joined
|
|||
moritz | lichtkind: perl6.party/post/Tag-Your-Dists | 13:43 | |
13:43
dakkar left
13:44
dakkar joined
|
|||
lichtkind | thanks | 13:50 | |
13:51
dakkar left
13:52
dakkar joined
13:53
vichib left,
vichib joined
13:59
travis-ci joined
|
|||
travis-ci | Doc build errored. Zoffix Znet 'Clarify interaction between :D and optional params | 13:59 | |
travis-ci.org/perl6/doc/builds/326805393 github.com/perl6/doc/compare/64cbf...96780fb883 | |||
13:59
travis-ci left
|
|||
buggable | [travis build above] ✓ All failures are due to: timeout (1 failure). | 13:59 | |
14:03
cdg joined
14:04
ggoebel left
14:07
domidumont left
14:08
domidumont joined,
cdg left
14:14
cdg joined
14:15
cdg left,
cdg joined
14:16
cdc joined
|
|||
torbjorn | regarding my xrandr output grammar - I used token TOP { <screen><monitor>* } to parse for the screen definition and any monitor definitions under it. which is nice and all. however would it be perhaps better to use <monitors> and let a rule/token define <monitor>* , that way I could easily have monitors make only connected monitors, which is what Im really after | 14:17 | |
or I could make that in TOP I suppose | |||
cdc | Hello #perl6, about FOSDEM2018, this presentation doesn't make any sense: fosdem.org/2018/schedule/event/per...ra_crypto/ | 14:18 | |
it seems to be written by a troll/bot | 14:19 | ||
14:19
committable6 left,
ggoebel joined,
committable6 joined
|
|||
lizmat | oops | 14:19 | |
jast | looks like scigen | 14:20 | |
lizmat | El_Che: ^^^ | 14:22 | |
14:23
Thrush joined
|
|||
jast | no, it's too cohesive for scigen | 14:24 | |
Thrush | I'm trying to figure out how to do Perl 5's "my @textFiles = <*.txt>;" in Perl 6. I googled, but I couldn't find a way to do filename globbing in Perl 6. | ||
timotimo | you'll probably want to use the dir sub | ||
docs.perl6.org/routine/dir | |||
jast | seems to promise something that I don't think exists outside of quantum links, though | 14:25 | |
so any practical relevance is doubtful :) | 14:26 | ||
timotimo | i wonder how the exploding japanese nuclear reactor factors in | 14:27 | |
jast | it does seem a little too jargon-babble-y, too | 14:28 | |
timotimo | does "disco-era" refer to "the time when disco music & dancing was popular"? | ||
jast | possibly refers to stuff like libdisco | 14:29 | |
14:32
silug joined
14:36
Aaronepower joined
|
|||
pmurias | cdc: I sometimes feel the same way reading through the jargon filed unicode documents | 14:36 | |
Thrush | Is there a way to do Perl 5's "my @textFiles = <*.txt>;" in Perl 6? | 14:38 | |
perlpilot | Thrush: IO::Glob probably (it's not built-in) | 14:40 | |
modules.perl6.org/search/?q=glob | 14:41 | ||
14:42
lichtkind left
|
|||
jast | there's also anything like: dir(test => /\.txt$/) | 14:43 | |
perlpilot can't tell if Thrush rejected timotimo's suggestion to use dir or just didn't see it. | |||
jast | I didn't see it, either, too busy picking apart the strange FOSDEM abstract :) | 14:44 | |
Thrush | Perlpilot: Oh, I thought what timotimo wrote about dir() was part of another conversation. | 14:45 | |
perlpilot | Thrush: ah, no. dir() is built-in that can *kinda* act like glob, but with regex and other stuff instead of the normal shell globbing syntax. | 14:46 | |
Thrush | Still, can dir() use wildcards as directories, like "<*/*.txt>" in Perl 5 can? | ||
perlpilot | Thrush: See jast's example | ||
Thrush: oh, and that's where glob is "better" in some sense. | 14:47 | ||
jast | */* isn't gonna work like that, though, because dir() only returns direct children | ||
Thrush | Makes sense. | 14:48 | |
timotimo | instead of just glob strings like in the shell, you can test with regex or with your own code | 14:49 | |
El_Che | cdc: the speaker made travel arrangements already. I asked him to clarify the abstract. | ||
timotimo | for glob-compatible globbing, see IO::Glob | ||
14:49
epony left
|
|||
Thrush | Here's a different question: If I create a function that operates on, say, a string, and call it like this: my $ersult = blah($string); Is there any way to make it so that I can also call it like this: my $result = $string.blah(); ? | 14:50 | |
14:50
epony joined
|
|||
Thrush | I'm unable to install IO::Glob with "zef fetch IO::Glob", unfortunately. | 14:50 | |
perlpilot | Thrush: there's always a way; it's just about how much you want to "pay" to make what you want work. | 14:51 | |
Thrush | (I'm using Windows.) | ||
timotimo | well, you can just $string.&blah() anyway | 14:53 | |
jast | one way to do it is with <docs.perl6.org/syntax/augment>. not sure I'd *recommend* that, but it's *possible*. :) | ||
14:54
epony left
|
|||
perlpilot | Thrush: the short of it is that the method version could be tricky. | 14:54 | |
scimon | (Late for the party but I'd recommend Moritz's new book to anyone doing things with Grammars) | 14:56 | |
14:58
Zoffix joined
|
|||
Zoffix | Thrush: that's probably because you don't have git installed. You can either install it ( git-scm.com/download/win ) or go to modules.perl6.org/repo/IO::Blob and manually get a URL to ZIP of the repo and do zef install github.com/moznion/p6-IO-Blob/arch...master.zip | 14:59 | |
Thrush: and along with the options others mentioned, there are `does` and `but` infix operators you can use to mixin into objects roles that provide methods that call your sub: | 15:01 | ||
m: sub blah { $^v.uc.flip }; my $string = "string" but role { method blah { blah self } }; $string.blah.say | |||
camelia | GNIRTS | ||
Zoffix | Thrush: oops, I meant IO::Glob, not IO::Blob... zef install github.com/zostay/perl6-IO-Glob/ar...master.zip | 15:02 | |
Altreus | Given that that URL is consistent and predictable, couldn't zef use it by default? | 15:03 | |
or as a fallback | |||
perlpilot | your given isn't given | ||
Altreus | alas | ||
well that's what given means | |||
:) | |||
also now the word is weird | 15:04 | ||
It sounds like a fey creature | |||
15:04
zakharyas left
|
|||
Zoffix | Altreus: I think it's a job for the p6c ecosystem generator... Some zoffix promised to add alternate URLs like a year ago but never did it.. | 15:05 | |
15:05
zakharyas joined
|
|||
Altreus | can you chase him up on it :p | 15:05 | |
Thrush | Running "zef install github.com/zostay/perl6-IO-Glob/ar...aster.zip" resulted in: No such method 'IO' for invocant of type 'Any' (and many more lines of errors). | ||
Zoffix | The code would go somewhere here: github.com/perl6/ecosystem/blob/ma...pl#L70-L79 | 15:06 | |
Thrush: what perl6 version are you using? | |||
Altreus | this is perl 5 :o | ||
Zoffix | Altreus: yeah :) | ||
Altreus | how odd | 15:07 | |
isn't that dead xD | |||
Ven`` | of course not | ||
it's a different language from Perl 6, contrarily to what may be obvious | |||
Altreus | I am aware | ||
but you are not aware of that :) | |||
Zoffix | Thrush: perl6 -v | 15:08 | |
Thrush | perl -v says: This is Rakudo version 2017.07 built on MoarVM version 2017.07 | ||
Zoffix tries installing | |||
Altreus | Ven``: it is a common joke in the perl5 community to keep repeating that it's dead ;) | ||
Zoffix | Thrush: can you pastebin the full output, along with the errors? | 15:09 | |
Ven`` | Altreus: TIL :) | ||
15:09
zakharyas left
|
|||
Altreus | Ven``: if you can't beat 'em join 'em | 15:09 | |
Thrush | Zoffix: pastebin? What's that? | ||
Ven`` came to Perl 6 from Ruby, and only learned Perl 5 afterwards. | |||
Zoffix | Thrush: copy-paste into a pastebin. Like gist.github.com/ copy the ouput, paste into the box on that page, click "Create secret gist" and when the new page loads gives us the URL of that page | 15:10 | |
jast | a pastebin is a site to share pasted text, like an image upload site but for text | ||
I run a tiny pastebin site that automatically clears submissions after ~1h | 15:11 | ||
perlpilot | Altreus: A few years ago, I told someone "Perl 5 is so dead is only has a conference somewhere in the world once a *month*" (this was a year when it actually did have conferences or workshops or whatever for every month :) | ||
15:11
lichtkind joined
|
|||
Zoffix | Thrush: I don't get your errors, but IO::Glob fails nearly all its tests on Windows :( | 15:12 | |
Thrush | Like this? : gist.github.com/anonymous/665c5c23...f57085de2c | ||
I don't have github; is it a requirement for zef? | 15:13 | ||
Zoffix | Thrush: no, but many modules provide source URLs as git URLs and zef needs git to fetch those. | ||
tadzik | not at all :) | ||
Zoffix | Thrush: oh "github".. No, you don't need github, but having "git" is beneficial | ||
cdc | El_Che: ok, thanks. | 15:14 | |
Zoffix | Thrush: "git" is a version control system; "github" is a popular site with "git" repositories | ||
Thrush | Could my problem be that I don't have "git"? | ||
Zoffix | Thrush: no, it's something else | 15:15 | |
[Coke] wonders if a zef update is needed? | 15:16 | ||
Zoffix | Yeah, likely.. Wonder what's a good way, considering git isn't available | ||
Thrush: or you could just install git: git-scm.com/download/win | |||
Thrush: and then run: cd \temp && git clone github.com/ugexe/zef.git && cd zef && perl6 -Ilib bin/zef --force install . | 15:17 | ||
Thrush: you could also try zef update zef and see what it says | |||
Thrush: but even with that solved, IO::Blob will likely fail. I filed an Issue with the author: github.com/zostay/perl6-IO-Glob/issues/7 | 15:19 | ||
Man, Perl 6's Test::META6 is becoming Perl 5's Pod::Coverage. Users sticking it into user tests instead of author tests :( | 15:22 | ||
15:22
lowbro left
|
|||
Zoffix | Thrush: you might make use of File::Find instead: github.com/tadzik/File-Find | 15:23 | |
15:23
natrys joined
|
|||
Thrush | zef update zef" results in: An unknown plugin name used | 15:24 | |
15:25
cdc left
|
|||
Thrush | "zef fetch github.com/tadzik/File-Find" gave me: Failed to resolve any candidates. No reason to proceed | 15:25 | |
Zoffix | Thrush: zef install File::Find | 15:26 | |
tadzik | yay, my stuff :) | ||
Zoffix | or use ZIP URL github.com/tadzik/File-Find/archive/master.zip | ||
Thrush | Well, I gotta go now. Thanks to all for all your help. | 15:27 | |
Zoffix | Thrush: if all you need is `glob <*/*.txt>` you can use this monstrocity: my @glob = gather for ".", |dir.grep: *.d { .IO.dir.grep({.f and .extension eq "txt"})».take }; .say for @glob | 15:28 | |
well, that'd be `glob <*.txt,*/*.txt>` toss `"."` to make it `<*/*.txt>` | 15:29 | ||
Thrush | Thanks, Zoffix. I've done a lot of magic things with Perl 5 using <*/*/*/*.zip>, and I wouldn't mind having the same in Perl 6. | ||
Anyway, I gotta go. Thanks again. | 15:30 | ||
15:30
Thrush left
|
|||
Zoffix | or this: my @glob = dir.grep(*.d)».dir.flat.grep: {.f and .extension eq "txt"}; .say for @glob | 15:30 | |
Yeah, I guess that's what IO::Glob does. It just needs to be fixed for Windows | |||
(and you often need `use IO::Glob qw/bsd_glob/` for many usecases in perl 5 too; so that's just as much module loading) | 15:31 | ||
15:34
Zoffix left
15:40
ctilmes joined,
ctilmes left
|
|||
Altreus | perlpilot: how often now? :P | 15:52 | |
15:54
natrys left
15:57
eliasr joined
|
|||
perlpilot | Altreus: dunno. It fluctuates with time and I'm not sure where to look anymore for the "official" calendar. But we're still more than 4 or 5 conference-like events per year without even trying. (I bet lizmat or woolfy could tell you precisely how many ;) | 16:04 | |
perlpilot just wrote some perl 5 where the code was like: if ($some->{long}{drawn}{out}{thing}) { do_something_with($some->{long}{drawn}{out}{thing}) } | 16:08 | ||
Ven`` | perlpilot: is `if (my $x = ...)` problematic? | ||
ugh I hate the freenode webchat | 16:09 | ||
perlpilot | just slightly annoying, not problematic. | ||
It's the little things where I wish Perl 5 was more like Perl 6 | |||
especially when I'm in the middle of it. | 16:11 | ||
16:11
squashable6 left,
squashable6 joined,
ChanServ sets mode: +v squashable6
|
|||
perlpilot | I didn't realize up front that I would need the long thing twice, but once I wrote it, the realization hit me, which means I had to stop and assign the result of the conditional to a var at some point. That kind of thing interrupts the flow | 16:12 | |
(once I wrote it once, I realized I'd need it again) | 16:13 | ||
16:14
cdg left
|
|||
b2gills | lowin: One person here has stated that they use Perl 6 for testing their C code (using NativeCall) | 16:19 | |
16:21
zakharyas joined
16:25
Phlogistique joined
16:31
khw joined
16:37
cdg joined
16:38
cdg left
|
|||
lowin | b2gills, sounds doable (and not fun, because testing is never fun), Perhaps one day I'll be proficient in perl6 to do it myself too. | 16:49 | |
16:54
cdg joined,
zakharyas left
16:56
wamba joined
16:57
abraxxa left
16:58
domidumont left
|
|||
Altreus | perlpilot: I was trying to shorten basically exactly that recently | 17:01 | |
17:08
AlexDaniel joined
17:12
ck joined,
ck is now known as Guest10954
17:13
ckraniak left
17:15
lichtkind left
17:16
Guest10954 left
17:19
scimon left
17:22
coverable6 left,
benchable6 left
17:23
coverable6 joined,
benchable6 joined
17:25
ExtraCrispy left
17:26
natrys joined
17:37
Ven`` left
17:39
bisectable6 left,
bisectable6 joined
17:43
zakharyas joined
17:45
markong left
17:48
|oLa| joined
17:49
margeas joined,
Aaronepower left
17:50
dakkar left
17:51
zakharyas left
17:52
darutoko left
|
|||
El_Che | AlexDaniel: I commented on the closed ticket giving it a thumbs up (in case close tickets don't send notifications) | 17:57 | |
AlexDaniel | they do! Just received it :) | ||
El_Che | hehe | ||
I forgot my keys, and now I am in the only sushi bar in my village: ) | 17:58 | ||
17:59
markong joined
18:00
margeas left
18:04
luiz_lha left
18:08
dwarring joined
18:09
epony joined
18:11
epony left,
epony joined
18:17
wamba left,
Aaronepower joined
18:19
zakharyas joined
18:24
Aaronepower left
|
|||
tony-o | digging the new modules.perl6.org | 18:24 | |
18:25
Aaronepower joined
|
|||
[Coke] | Zoffix++ | 18:27 | |
(think it was mostly zoffix) | |||
18:27
natrys left
18:28
Aaronepower left
18:32
natrys joined
18:40
zakharyas left
18:48
Aaronepower joined
19:09
cdg left,
cdg joined
19:10
Aaronepower left
19:14
cdg left
19:17
|oLa| left,
Possum joined
19:21
Aaronepower joined
19:25
Aaronepower left
19:26
setty1 joined
19:29
kerframil joined
19:37
Aaronepower joined
19:38
TreyHarris joined
19:39
greppable6 left,
greppable6 joined,
ChanServ sets mode: +v greppable6,
Zoffix joined
|
|||
Zoffix | m: use nqp; my $eval_ctx := nqp::getattr(CALLER::, PseudoStash, '$!ctx'); my $compiled := nqp::getcomp('perl6').compile('*+*', :outer_ctx($eval_ctx), :mast_frames(nqp::hash), :target('optimize')); nqp::forceouterctx(nqp::getattr($compiled, ForeignCode, '$!do'), $eval_ctx); say $compiled() | 19:39 | |
camelia | WARNINGS for <tmp>: Useless use of "+" in expression "*+*" in sink context (line 1) ===SORRY!=== compunitmainline requires an MVMCompUnit |
||
Zoffix | Any idea how to make it happy? It's `:target('optimize')` that causes the crash... I wanna take a peek at the ASTs of the code somehow | 19:40 | |
19:40
Aaronepower left
|
|||
Zoffix | (mostly curious why the wantedness doesn't propagate to WhateverCode, despite propagating to other evaled things) | 19:40 | |
19:43
Aaronepower joined
19:45
Aaronepower left
19:47
lowin left
19:53
Aaronepower joined
|
|||
Zoffix | m: use nqp; my $eval_ctx := nqp::getattr(CALLER::, PseudoStash, '$!ctx'); my $compiled := nqp::getcomp('perl6').compile( '*+*', :compunit_ok, :outer_ctx($eval_ctx), :mast_frames(nqp::hash), :target('optimize')); say $compiled.dump; | 19:53 | |
camelia | WARNINGS for <tmp>: - QAST::CompUnit :W<?> :UNIT<?> [post_deserialize] - QAST::Stmts - QAST::Op(bind) - QAST::Var(attribute $!do) - QAST::WVal(WhateverCode) - QAST::WVal(Code) - QAS… |
||
Zoffix | `:compunit_ok` is the trick | 19:54 | |
Makes it bail out instead of doing things: github.com/perl6/nqp/blob/master/s...#L503-L509 | |||
19:54
Zoffix left
19:55
Aaronepower left
|
|||
DrForr | Flight & Hotel booked for FOSDEM. | 20:02 | |
I'll be there Thursday evening, probably at Delirium around 8pm if anyone's going to be there. | |||
20:05
Aaronepower joined
20:08
Aaronepower left
20:12
Aaronepower joined,
Aaronepower left
20:32
jam__ joined
|
|||
jam__ | I'm trying to write a declarative language interpreted with grammars. I know I can write a grammar (with an associative actions class) for specific things like parsing a variable definition or parsing a function call. But how would I merge all these grammars together so that I end up with a collective AST from my matches? Would anyone know were to point me documentation-wise? | 20:35 | |
20:36
wamba joined,
ckraniak joined
|
|||
buggable | New CPAN upload: PDF-Class-0.0.5.tar.gz by WARRINGD cpan.metacpan.org/authors/id/W/WA/...0.5.tar.gz | 20:38 | |
timotimo | crystal-lang.org/2015/04/01/auto.html - junior project: implement this feature in rakudo :D | 20:41 | |
20:43
jam__ left
|
|||
perlpilot | cute | 20:46 | |
20:46
TEttinger joined
20:47
ck joined,
ck is now known as Guest98450,
ckraniak left
20:48
brrt joined
20:49
jam__ joined,
jam__ left
20:51
Guest98450 left
20:52
jam__ joined
|
|||
jam__ | just asked this question and closed the browser. Pasting it one more time: I'm trying to write a declarative language interpreted with grammars. I know I can write a grammar (with an associative actions class) for specific things like parsing a variable definition or parsing a function call. But how would I merge all these grammars together so that I end up with a collective AST from my matches? Would anyone know were to point me documenta | 20:52 | |
20:53
pilne joined,
Voldenet joined,
Voldenet left,
Voldenet joined
|
|||
perlpilot | jam__: glad you're back :-) | 20:53 | |
timotimo | jam__: personally, i'd probably compose one grammar and one action class together using multiple roles if i want the grammar to be split up into sections | ||
DrForr | Well, I can't advise you specifically, but theperlfisher.blogspot.ro has several grammar tutorials that might help. (full disclosure: they're my articles.) | ||
And yes, roles do help quite a bit. | 20:54 | ||
jam__ | I know, my presence was missed :'( ah thank you guys, this helps | 20:55 | |
perlpilot | jam__: and then there's moritz++'s book on grammars smile.amazon.com/Parsing-Perl-Rege...B0785L6WR6 that might help you doo | ||
jam__ | I'll check out all of those. Just exploring different ways of parsing the language first. Usually a python guy, but it just doesn't compare to perl6 for this sort of thing | ||
timotimo | i think if you call into another grammar's regexes there's no way to say "and use this other action class with those" | ||
jam__ | cool cool | 20:56 | |
perlpilot | timotimo: saying that there's "no way" to do something in Perl is inviting someone to prove you wrong :-) | 20:57 | |
moritz | you could call .subparse on the other grammar, and supply a custom actions object | ||
though subparse has no :pos argument :( | |||
might be a worthy addition | 20:58 | ||
timotimo | yeah, could be | ||
and you'd have to do a bit of fiddling when the subparse returns to give a correctly placed cursor back to continue work | |||
and i can imagine cross-grammar backtracking to be really slow with that kind of setup :D | |||
20:59
evalable6 left
|
|||
DrForr | drforr/perl6-Pod-To-HTMLBody now has a tree creation module and a reasonably small subclassable shim generating HTML. | 20:59 | |
20:59
evalable6 joined
|
|||
moritz | jam__: another option is to use roles for the separate sublanguages, and compose them into a single grammar | 21:00 | |
that way, you can avoid crossing grammar boundaries, which is not really well documented | |||
DrForr | jam__: Also if yu do the conference thing c'mon down to FOSDEM, the last talk is on a similar subject. | ||
jam__ | @moritz I'm checking roles out now actually, let's see if I can get this :) yeah definitely, it's coming up here pretty soon | 21:03 | |
DrForr | Yep. I just booked my flight/hotel. | 21:04 | |
(further disclaimer - I'm the last speaker :) ) | 21:05 | ||
jam__ | oh snap, well good luck man. be sure to live stream it on 7 different social media platforms | 21:07 | |
best way to go viral :) | 21:08 | ||
21:12
cdg joined
21:14
cdg left,
cdg joined
|
|||
brrt | ooh, is the schedule published already? | 21:16 | |
21:16
troys joined,
jam__ left
|
|||
brrt | i like how it is called perl programming languages with a plural s | 21:17 | |
21:17
brrt left
21:20
Ven`` joined
|
|||
perlpilot | well, you know that there are many perls now | 21:24 | |
someone could a really nice lightning talk on just that. | 21:26 | ||
or perhaps a longer talk that "positions" the perls so that people who would encounter them know if they are useful or relavant to their problems. | 21:27 | ||
21:37
natrys left
21:46
tomaw joined
21:50
grumble joined
21:55
cdg_ joined
21:58
cdg left
22:06
troys is now known as troys_
22:14
dct joined
22:23
brrt joined
22:27
riceandb1ans joined,
perlpilot left
22:28
troys_ is now known as troys
22:29
Grauwolf joined,
Grauwolf left,
Grauwolf joined,
TimToady joined
22:31
Ven`` left
22:32
statisfiable6 left,
releasable6 left,
releasable6 joined,
statisfiable6 joined,
ChanServ sets mode: +v statisfiable6,
reportable6 left,
reportable6 joined,
ChanServ sets mode: +v reportable6
23:03
espadrine joined
23:14
Manifest0 joined,
pmurias left
23:21
setty1 left
23:22
markong left
23:23
margeas joined
23:26
markong joined
23:27
rindolf left,
margeas left
23:29
comborico1611 joined
23:33
comborico1611 left
23:36
lelf joined
23:45
margeas joined,
markong left
|
|||
lelf | Hey. I need to know if a dynamic library contains certain symbol (say, function). Any sane way to know this without calling the said function? | 23:50 | |
23:52
perigrin joined
|
|||
mspo | nm? | 23:54 | |
23:59
troys is now known as troys_
|