»ö« 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.
Zoffix zoll: you could look through an archive: www.nntp.perl.org/group/perl.perl6.users/ 00:04
Zoffix Prolly not many under-the-hood discussions, 'cause I was never compelled to join it :) 00:04
zoll thanks; will do.
andreoss Zoffix: github.com/andreoss/nqp/commit/2ef...0f65579bc3 00:05
skids RT#130634 and RT#124749 can be combined, if someone has RT perms to do that. 00:14
synopsebot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=130634
Link: rt.perl.org/rt3/Public/Bug/Display...?id=124749
Zoffix andreoss: looks good, though the check for `stdin().t()` can probably be moved into `elsif !@a`, so we only do it once, something like `elsif !@a { $result := stdin().t() ?? self.interactive(|%adverbs) !! self.evalfiles('-', |%adverbs) }` 00:21
andreoss++
skids: what's your RT email? I'll give yuo perms
grondilu sub (--> 0|1) { 0 }() # I was expecting this to work for some reason 00:27
can't we use Junctions as return types? 00:28
Zoffix skids: I think you already have perms
Zoffix grondilu: not as literals, no 00:28
skids Yeah RT's interface has it in for me... others have tried to fix my perms up for other stuff to no avail. 00:29
Zoffix m: subset Binary of Int where * === 0|1; sub (--> 0|1) { 0 }().say
camelia 5===SORRY!5=== Error while compiling <tmp>
Malformed return value
at <tmp>:1
------> 3inary of Int where * === 0|1; sub (--> 07⏏5|1) { 0 }().say
skids Though... maybe it's just hiding somewhere in the UI.
Zoffix m: subset Binary of Int where * === 0|1; sub (--> Binary) { 0 }().say
camelia 0
Zoffix m: subset Binary of Int where * === 0|1; sub (--> Binary) { 42 }().say
camelia Type check failed for return value; expected Binary but got Int (42)
in sub at <tmp> line 1
in block <unit> at <tmp> line 1
Zoffix skids: what happens if you go to this page rt.perl.org/Ticket/ModifyLinks.html?id=124749 and paste 130634 into "Merge into" and click "Save changes"? 00:30
skids I get redirected to SelfService 00:31
grondilu m: suset Bin of Int where { $_ ~~ 1|0 }; sub (--> Bin) { "foo" }()
camelia 5===SORRY!5=== Error while compiling <tmp>
Two terms in a row
at <tmp>:1
------> 3suset Bin of Int7⏏5 where { $_ ~~ 1|0 }; sub (--> Bin) { "f
expecting any of:
infix
infix stopper
postfix
stat…
grondilu m: subset Bin of Int where { $_ ~~ 1|0 }; sub (--> Bin) { "foo" }()
camelia Type check failed for return value; expected Bin but got Str ("foo")
in sub at <tmp> line 1
in block <unit> at <tmp> line 1
Zoffix skids: no idea. I see the email you gave me listed in the BugAdmin group. Try talking with [Coke], perhaps he would know more 00:33
skids I think [Coke] has tried to fix that before.
Zoffix :(
skids Maybe due to my bitcard id not being my email? 00:34
Zoffix I merged the tickets.
skids Thanks :-)
Zoffix skids: maybe. I'm totally unfamiliar with how this hole thing works, unfortunately :)
skids
.oO(RT needs github OAUTH, it's all the rage :-)
00:35
raschipi Does anyone have an opinion on OAUTH 2? 00:38
skids I've been avoiding all web sso responsibilities by being the one willing to wrangle FreeRADIUS, to be honest. 00:39
andreoss github.com/perl6/nqp/compare/maste...ss:non-tty 00:58
Zoffix: for some reason i have commit-bit for nqp 00:59
so I could merge it myself 01:00
Xliff_ Zoffy: Your "hole" is missing the 'w' 02:08
<- speling nazi 02:09
(pun intended)
AlexDaniel buggable: bugs 02:22
buggable AlexDaniel, Total: 1681; BUG: 1093; UNTAGGED: 398; LTA: 177; NYI: 94; REGEX: 65; RFC: 59; JVM: 58; CONC: 53; TESTNEEDED: 44; REGRESSION: 32; PERF: 28; UNI: 28; SEGV: 26; IO: 22; NATIVECALL: 22; @LARRY: 21; POD: 21; TODO: 18; PRECOMP: 14; OO: 12; BUILD: 11; TESTCOMMITTED: 11; OPTIMIZER: 10; STAR: 7; BOOTSTRAP: 5; PARSER: 5; REPL: 5; GLR: 4; MATH: 4; OSX: 4; WEIRD: 3; WINDOWS: 3; RT: 2; SPES
AlexDaniel hm, how often does it update? We should have >10 bugs less now 02:23
AlexDaniel buggable: bugs 02:29
buggable AlexDaniel, Total: 1681; BUG: 1093; UNTAGGED: 398; LTA: 177; NYI: 94; REGEX: 65; RFC: 59; JVM: 58; CONC: 53; TESTNEEDED: 44; REGRESSION: 32; PERF: 28; UNI: 28; SEGV: 26; IO: 22; NATIVECALL: 22; @LARRY: 21; POD: 21; TODO: 18; PRECOMP: 14; OO: 12; BUILD: 11; TESTCOMMITTED: 11; OPTIMIZER: 10; STAR: 7; BOOTSTRAP: 5; PARSER: 5; REPL: 5; GLR: 4; MATH: 4; OSX: 4; WEIRD: 3; WINDOWS: 3; RT: 2; SPES
samcv andreoss, does that PR for tty, have you run roast tests against it? 02:55
i would think it would break our tests which test the response from the REPL
AlexDaniel I think these tests were already removed in github.com/perl6/roast/commit/4170...ce501f0ffe
actually, they were moved to github.com/rakudo/rakudo/commit/ff...b6b29ab951 02:56
firefish5000 p6: say( 'apple'.match(/[ap||a] | [apples||apple]/) ); say( 'apple'.match(/[ap|a] | [apples|apple]/) ); 05:20
camelia 「ap」
「apple」
firefish5000 I expected apple to be printed both times. What am I missing?
From my current understanding, The first one should match 'ap' successfully. And then check ['apples' which fails, then 'apple' which should succeed]. Then 'ap' | 'apple' should be compared and the longest match 'apple' should be returned no? 05:23
firefish5000 probably bug #116893 05:35
synopsebot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=116893
firefish5000 Nope, not literal string specific. 05:38
p6: say( 'apple'.match(/ [..||.] | [......||.....]/) ); 05:39
camelia 「ap」
firefish5000 The condition to trigger this seems to be First side succeeds. And First option of second side fails. 05:45
p6: say( 'succeed'.match(/ suc | [fail||succeed]/) ); 05:48
camelia 「suc」
firefish5000 nqp: say( 'succeed' ~~ / suc | [fail||succeed]/); 06:02
camelia suc
piojo m: say "abcd5" ~~ / . | . | .. | ..\d / 06:10
camelia 「ab」
piojo firefish5000: the original bug report is just wrong. I think it's the same bug, but it doesn't just apply to literal strings 06:11
firefish5000 Thanks piojo. Good to know, though unfortunate since it restricts the usefulness of the longest matching alternation. 06:14
firefish5000 I think these still may be separate issues. Seems to me that the longest alternation, in your case, is preferring ones with the earliest match in the sting. This may be intended, depending on how you interpret #5 on design.perl6.org/S05.html#Overview 06:22
firefish5000 That is, since 'a', the first letter matched, it seems it is ignoring all matches after it that don't also match the first letter. Even if it is longer 06:23
piojo firefish5000: I don't think #5 should have any effect, since that list is based on tie breaking--it should stop at #2 based on longest matched text 06:26
firefish5000 True, but then again, when looking at a regex. I normally expect it to start at the first match. Consider the same regex with a quantifier (as it is in the bug). If it actually preferred the longest match over earliest matching char, then quantified regexes would have a lot more backtracking to do. 06:30
piojo, I think that that this is just a case of insufficient documentation, or perhaps we skipped something in the docs. But it conforms to my limited understanding of regexes 06:32
piojo firefish5000: how are you reading it? To me, it looks like the way you sort a list of tuples: 06:35
$a[0] ne $b[0] ?? $a[0] <=> $b[0] !! $a[1] ne $b[1] ?? $a[1] <=> $b[1] !! ... 06:36
pardon my mix of perl5 and 6 syntax
tie breaking logic will stop at the first obvious non-tie.
AlexDaniel ⚠ Community Bug SQUASHathon blogs.perl.org/users/zoffix_znet/20...athon.html 09:35
piojo AlexDaniel: Nice! I've been wanting to file a couple perl doc bugs 09:42
piojo Oh, is that project separate from where perl6 documentation bugs would be filed? 09:44
AlexDaniel piojo: no, it's the same repo 09:45
piojo I wanted to request that the doc maintainers mention what :my and :our do inside regexes. And the matching order for proto regexes would be nice--that's specified in the S05 design doc, but it would be helpful in the official documentation as well 09:46
AlexDaniel piojo: feel free to file some bug reports. And also come this Saturday, we have virtual pizza :)
piojo AlexDaniel: thanks. would that be filed with rakudobug or github?
AlexDaniel piojo: here: github.com/perl6/doc/issues 09:47
piojo thanks
Skarsnik helllo 09:48
virtual pizza? x) 09:49
piojo I am down for virtual pizza! 09:50
lizmat clickbaits p6weekly.wordpress.com/2017/08/28/...rving-cro/ 09:50
Skarsnik damn I clicked 09:50
timotimo ha-ha! we got you now! 10:00
AlexDaniel
.oO( mmmm 🍕 )
10:01
sena_kun just as planned!
AlexDaniel .tell Zoffix I'll make a bot for the event 10:01
yoleaux AlexDaniel: I'll pass your message to Zoffix.
timotimo a bot that celebrates each closed bug on channel? 10:06
APic 10:08
Zoffix . 10:15
yoleaux 10:01Z <AlexDaniel> Zoffix: I'll make a bot for the event
Zoffix AlexDaniel: great :) Can it have a .pizza (or similar) command that gives a random slice of pizza? The flyer promised free virtual pizza 10:16
.ask risou \o is there any way you could disable your change-nick-on-away feature? It leaves quite a footprint in the channel: i.imgur.com/PXZtZF4.png 10:19
yoleaux Zoffix: I'll pass your message to risou.
Zoffix Xliff_: which hole? 10:21
Zoffix Xliff_: oh *phew* the one on IRC :) Glad I don't need to change anything 10:26
[Coke] comes back to scroll filled with risou changing their name. 10:48
Ulti just got this working locally github.com/bduggan/p6-jupyter-kernel
[Coke] risou: why do you keep renaming?
[Coke] sees that the very last part of scroll deals with this. *sigh*. :)
Geth doc: 46516eb2d8 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Programs/00-running.pod6
Remove `bare` RAKUDO_LINE_EDITOR

It ended up being removed in favour of a better solution in:
  github.com/perl6/nqp/commit/5bec212105
10:51
risou sorry, it seem that my tiarra's config something wrong... 11:00
yoleaux 10:19Z <Zoffix> risou: \o is there any way you could disable your change-nick-on-away feature? It leaves quite a footprint in the channel: i.imgur.com/PXZtZF4.png
Zoffix Thanks :) 11:01
andreoss m: module Foo {module Bar is export {sub foo($) is export {1}}}; import Foo; say foo(1); 11:03
camelia 1
risou I leave channels and check my config. I'm sorry for disturbing you.
andreoss m: module Foo {module Bar is export {sub foo($) is export {1}}}; import Foo::Bar; say foo(1); 11:06
camelia 1
lizmat news.ycombinator.com/item?id=15123054 # mi.cro.services on HN
andreoss m: module Foo {module Bar {sub foo($) is export {1}}}; import Foo; say foo(1); 11:07
camelia 1
andreoss should nested modules be imported like this?
pmurias AlexDaniel: unicode operators being annoying to type is a valid argument for not using them 11:19
timotimo yup, { } being annoying to type is also a valid argument for trigraphs :) 11:21
pmurias s/is/was/ {} is easily typable nowdays 11:23
Skarsnik easier on qwerty thou 11:24
pmurias timotimo: EBCDIC seemed to be the reason for trigraphs, hopefully nobody is writing Perl 6 in that 11:33
AlexDaniel pmurias: that's not the point people are making. They say that if *they* can't type it, then we shouldn't even add unicode ops. www.reddit.com/r/programming/comme...omic_with/ 11:36
and here too: www.reddit.com/r/perl6/comments/6v...nd_perl_6/ 11:37
(maybe even more prominently)
pmurias AlexDaniel: I guess most people assume that if they don't want to use something we shouldn't add it 11:43
El_Che pmurias: I don't think that's the point at all
andreoss m: module Foo {module Bar {my package EXPORT::DEFAULT { our sub foo($) {}}}}}; import Foo; import Bar; say foo(1); 11:49
camelia 5===SORRY!5=== Error while compiling <tmp>
Unexpected closing bracket
at <tmp>:1
------> 3e EXPORT::DEFAULT { our sub foo($) {}}}}7⏏5}; import Foo; import Bar; say foo(1);
pmurias El_Che: giving the choice to the users if they want to use texas or unicode variants is a very perlish decision that I'm sure plenty of people find ridiclous
El_Che I think that the point some people make is that even if they decide not to use the asterisk (which renders unclearly on my Linux terminal and as an emoji on my mac terminal), people in their team will and they will have to deal with them anyways.
pmurias * ridiculous
andreoss m: module Foo {module Bar {my package EXPORT::DEFAULT { our sub foo($) { }}}}; import Foo; import Bar; say foo(1);
camelia 5===SORRY!5=== Error while compiling <tmp>
Could not find module Bar to import symbols from
at <tmp>:1
------> 3ub foo($) { }}}}; import Foo; import Bar7⏏5; say foo(1);
El_Che in this case the ascii word around is very wordy
El_Che pmurias: I agree on that. The other side of the coin is exactly that gave Perl 5 a bad rep 11:50
andreoss `is export` seems to be applied to the upper module also 11:51
can modules be nested?
El_Che Slightly related, I am under the impression that discussions about Perl 6 tend to drift to utf8 coolness and less about the features many people care about (concurrency, sane OO, builtin kitchensink)
I have convinced some people to try rakudo because of the features above. 11:52
People I have convinced by utf8 operators: 0
(let me be clear that utf8 is not the same as the state-of-the-art utf8 handling in perl6) 11:53
lots of people like that a lot
El_Che illustrating my point is that zero comments in the discussion where about the cool stuff the atom-thingie does 11:55
Zoffix andreoss: maybe not; I think sub EXPORT can only be on the other scope which is what `is export` is basically doing, innit? So there's only one point of export that exports everything 12:02
Zoffix El_Che: I think it's just the easiest thing to talk about as well as the most visibile (you don't even need to understand the code and you can comment). I know when I just started with Rakudo, custom Unicode ops is basically the only thing I talked about. 12:04
AlexDaniel El_Che: people naturally don't want to spend time on learning something. It is much easier to nitpick a feature that makes no sense to you and reject the whole language instead of looking deeper. Most reddit commentors are not Evan Miller. The weekly itself discussed the feature in more detail (even provided an example on how this feature can be used), it's the commentors who tunnel-visioned on the non-ascii symbol 12:05
Zoffix And perhaps a lot of the commenters on those threads simply aren't familiar with atomicity or Rakudo to comment on anything else other than give opinion on these crazy new emoji operators
Skarsnik why are still trying to argue/understand this? :) 12:06
Zoffix Slow day? :)
Good point
andreoss so it means no nested modules
AlexDaniel Skarsnik: I brought it up, it's my mistake
Zoffix goes to finish a new article
MasterDuke actually, i was wondering why the atomics were sponsored? if it was for some specific/concrete use case, it might be nice to get a blog post or something explaining how the need is now met 12:08
Skarsnik good point 12:10
Skarsnik I am curious at how Perl 6 is used in the 'real world' 12:11
Zoffix 's common real-world use is one-liners 12:12
and IRC bots ^_^
Geth marketing: abbd912005 | (Zoffix Znet)++ | 10 files
Add SQUASHathon InDesign source files
12:15
raschipi jnthn: Does Cro support Http/2 over non-tls connections? 12:16
lizmat raschipi: afaik, jnthn is enjoying some days of R&R on the way back from SPW, so it may be a while before he answers 12:17
raschipi .tell jnthn Does Cro support Http/2 over non-tls connections?
yoleaux raschipi: I'll pass your message to jnthn.
lizmat raschipi: doesn't the documentation not tell you that ?
sena_kun raschipi, no, it doesn't. 12:18
raschipi I'm reading the slides, but i'm not getting it. It just says it's activated by default in connections with TLS.
sena_kun ALPN.
But since it's TLSy thing. 12:19
It is possible that other ways to negotiate will be added in the future though.
raschipi Right, the only way to activate it is by ALPN. Does the presence of HTTP/2 change the pipeline?
sena_kun raschipi, sure.
sena_kun we decode/encode binary frames. 12:20
El_Che raschipi: maybe jnthn is from the second school of thought: b-netwerk
El_Che oops 12:20
http2.github.io/faq/#does-http2-re...e-encrypti
oh crap
http2.github.io/faq/#does-http2-re...encryption
"However, some implementations have stated that they will only support HTTP/2 when it is used over an encrypted connection, and currently no browser supports HTTP/2 unencrypted." 12:21
raschipi So what the pipeline will look like is only know after negotiating it, right? The documentation didn't make that clear to me, didn't read anywhere that it's a dynamic pipeline, that changes according to circunstances. 12:21
sena_kun The pipeline is not dynamic, to be precise. let me explain this thing a bit... 12:22
raschipi I'm familiar with how the http/2 over TLS situation looks like.
sena_kun basically, if https is present, VersionSelector github.com/croservices/cro-http/bl...lector.pm6 is used. It checks for alpn and if we're here: we emit to one supply, otherwise - to another. So there is basically a graph of supplies. 12:23
sumdoc I want to read html source from the web in perl 6. How can I do it? 12:24
www.nytimes.com/2017/08/28/us/hous...abc-region
Zoffix buggable: eco DOM::Tiny
buggable Zoffix, DOM::Tiny 'Very small, self-sufficient DOM parser manipulator': github.com/zostay/p6-DOM-Tiny
Zoffix sumdoc: ^ you can use that module to parse stuff
sumdoc Zoffix I want to read whole of the source 12:25
raschipi sena_kun: thanks for you help, I will keep studying it and if I have more questions I will ask you.
Zoffix sumdoc: what do you mean when you say "read"? 12:26
census Zoffix if I may please ask, when you helped so generously with the code for the website yesterday, you took advatnage of the API feature I'm guessing?
Zoffix sumdoc: this one liner prints the body of the article, for example: perl6 -MWWW -MDOM::Tiny -e 'DOM::Tiny.parse(get "www.nytimes.com/2017/08/28/us/hous...-text.say' 12:27
census because i'm guessing that's where 'meta[name="ncbi_resultcount"]' comes from 12:27
sena_kun raschipi, no problem. I will be glad to provide explanations for almost everything, except for future project's decisions(tehse things up to jnthn) and some rare pieces I didn't touch.
*these
Zoffix sumdoc: get() from WWW.pm6 module fetches the HTML code (is that what you mean by "read"?) and then DOM::Tiny parses it and using CSS selector, I tell it to print all text from a specific element
census: if you look at the page's source there's <meta name="ncbi_resultcount" value="53"> or something like that, in <head>. `meta[name="ncbi_resultcount"]` is a CSS selector for that element and DOM::Tiny uses CSS selector to retrieve content of specific elements 12:28
sumdoc This gives me the desired output. I was wondering if I can do it from within core P6 Zoffix
use LWP::Simple; my $html = LWP::Simple.new.get("www.nytimes.com/2017/08/28/us/hous...-region"); say $html;
Zoffix sumdoc: by core, do you mean Rakudo Star? 12:29
sumdoc Zoffix Yes
Zoffix Yeah, you could use LWP::Simple
census Zoffix okay i see. i'll see if i can find something like that for the google search i want to do
sumdoc Zoffix I mean without using external modules!!
Zoffix sumdoc: yeah, you could, but that involves a lot of code to implement SSL and HTTP. That's why we have modules, so you don't have to re-invent the wheel 12:30
sumdoc Zoffix OK
census Zoffix i tried the page source for a link like patents.google.com/?q=Babesiosis&a...r=20011231 and i don't see the outcome. i did test it just now for the other website and i do see the 53 there 12:31
is that becaus the other website had an API but google doesn't ? 12:33
Zoffix Nope. Just differently-made website 12:34
Skarsnik Zoffix, I wonder if I could/should make a way for dom::tiny to use like another html parser
census Zoffix will i need to do some sort of regex then? 12:35
Skarsnik you basicly need to write new code for each new site 12:35
census to indicate find the word About or results and get the number in between ?
Skarsnik yes i understand that
Zoffix census: regex just extracts text. If there's nothing to extract with HTML parser, what will you extract with a regex? 12:36
census do you have any suggestion then on how to get the number?
Zoffix census: look around the site to see a way to get the data you weant 12:37
*want
census Zoffix thank yoyu for your continued help. when i used to do this in perl5, i never had the fortunate of having something so straight forward like you found through the page source. i always did a regex type trick 12:39
AlexDaniel FWIW, I'm using perl6 for everything nowadays. One of the relatively big things I have here is web scraping, all of which is currently shelved because Gumbo segfaults with current rakudo 12:41
Zoffix census: think outside the box. There's a "download CSV" link. Look at the link: patents.google.com/xhr/query?url=q...nload=true It got your quiery in it. So that means you likely can directly construct links to CSV files. Download one of them, look at its structure: it got result-per-row + 2 rows for headings. That means to get 12:42
AlexDaniel one of projects is using python-gumbo through Inline::Python, which I don't like but at least it can parse 100 pages without segfaulting
Zoffix your results all you need to do is make a URL to csv to fetch the CSV data then parse CSV and subtract 2 from total row count to get number of results
census: perl6 -MWWW -MText::CSV -MURI::Encode -e 'my $term = uri_encode "Babesiosis"; "temp".IO.spurt: get "patents.google.com/xhr/query?url=q...oad=true"; say csv(:in<temp>).elems - 2'
172
AlexDaniel it does segfault anyway after a couple of thousands, but in these cases I just rerun it and hope for best
Zoffix slightly dissapointed Text::CSV doesn't have documented way of giving CSV to parse from a Str variable 12:43
sena_kun >with %?RESOURCES{('web', 'js', |@path).join('/')} 12:44
it works then the resource is here.
but when it isn't. It should be any. Right?
Instead I'm getting "Use of uninitialized value % of type Any in string context.". :S
s/works then/works when/ 12:45
Zoffix Some cases where I choose, say Perl over Rakudo, is mostly due to lack of Rakudo libraries that I like, something polished like Mojo::Pg or Mojolicious. I originally thought to yakshave those, but the amount of work to make stuff and then maintain it is beyond something I'd be able to comfortably handle
m: dd %?RESOURCES{('web', 'js', |@path).join('/')} 12:46
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '@path' is not declared
at <tmp>:1
------> 3dd %?RESOURCES{('web', 'js', |7⏏5@path).join('/')}
Zoffix m: my @path = 42; dd %?RESOURCES{('web', 'js', |@path).join('/')}
camelia Nil
sena_kun hmmmm. 12:47
Zoffix & 12:50
perlpilot Zoffix: in those cases where you choose Perl over Rakudo, why not use Inline::Perl5 instead? 12:54
Zoffix perlpilot: most of the time it doesn't work 12:56
pmurias 0z 13:00
pmurias sorry 13:00
Zoffix: did you consider reporting the stuff that doesn't work in Inline::Perl5? ;) 13:01
Zoffix perlpilot: or more specifically, the three times I tried to use it it didn't work. Awhile back I tried to use Mojolicious and struggled figuring out how to access data in templates. When I tried to use WWW::Mechanize, I saw no obvious way to give its methods Perl regex objects. When I tried to use Spreadsheet::XLSX, I could access its attributes, because it provides them by directly offering the blessed hash, 13:03
rather than via methods.
perlpilot: so I don't know... either I'm very unlucky or people overhype the usefulness of Inline::Perl5 13:04
Ulti so the jupyter integration of Rakudo is really nice 13:05
Zoffix pmurias: nope
*couldn't access its attributes 13:06
perlpilot Zoffix: fair enough. though, one of the first modules I used with Inline::Perl5 was Spreadsheet::XLSX and I don't remember having any problems. But I just looked for the code and can't find it so ... recent experience trumps vague memories of code that may no longer exist :) 13:07
perlpilot oh! I used Spreadsheet::ParseExcel and Excel::Writer::XLSX 13:10
irclog.perlgeek.de/perl6/2015-08-20#i_11087671 13:11
Zoffix But in the grand scheme of things, I don't *want* to use Inline::Perl5. I want to use modules designed for Rakudo. If I'm forced to build a frankenstein, I may as well just use Perl, instead of spending time, trying to figure out how to stitch the pieces together 13:12
perlpilot: I actually made a wrapper module that I loaded with Inline::Perl5, but the compile time was like 5s on each change (I think Inline::Perl5 disables precompilation or something?), so I just went straight to Perl 13:14
a warpper for the Excel module
Zoffix Man, IRC sure is a time sink :) 13:15
Zoffix goes to be productive
census Do I have to initiate the package MText::CSV ? 13:16
like do something in the cmd?
Skarsnik huggable, modules 13:17
huggable Skarsnik, 100 Most Popular (by github stars and recently updated) Modules: perl6 -MWWW -e 'jget("modules.perl6.org/.json")<dists&...dated>) after Date.new: "2017-01-01"}).head(100)»<name>.grep(none |<p6doc panda v5>, /^ "Inline::"/).put'
Zoffix Oh wait, now I remember better: it's likely was 5s slow to parse the exel file I was loading, not precompilation
Skarsnik was ther a bot that link the help?
Zoffix Skarsnik: the help for what? 13:18
Ah, no bot
census Skarsnik yes do I need to initiate the module in cmd?
Zoffix census: zef --/test install Text::CSV
You need to install most modules.
Skarsnik like help: Str and link the Str section in doc.p6.o
Zoffix zef is module installer
huggable: Str
huggable Zoffix, String of characters: docs.perl6.org/type/Str
Zoffix But only types are entered.
Zoffix I think when docs system is changed to be SQL-driven, then we can offer a docs API the bot could use 13:19
Zoffix &
census Zoffix helped me with the following code but i didn't quite follow it: pastebin.com/Su4vaMTk 13:40
What is the difference between MText::CSV and use Text::CSV; ? 13:41
Ven`` census: `-M` is a command line flag that "use"s a module.
census Ven`` so in the program i implemented it correctly?
also what does -e mean or is that also something for the command line in cmd? 13:42
raschipi -e in the commandline is for exacuting a script given as an argument
census raschipi so when i took that to write as a script in pastebin.com/Su4vaMTk , it was correct that i dropped it ? 13:43
cschwenz (or any code in quotes after the given -e parameter)
Ven`` census: I believe so, yes :) 13:44
moritz oh hai 13:49
perltricks.com/article/plotting-with-perl-6/ # a chapter from my book re-printed on perltricks.com 13:50
perlpilot Isn't that more like "plotting with Python and Perl 6"? :-)
census in my code pastebin.com/bc91yydY in the line "temp".IO.spurt: get .... how can i use the variable $year in the website address rather than the actual year. i want to do it that way because ultimately i want to write a loop 13:51
Ven`` o/ moritz
perlpilot census: you either want to use {$year} inside your double quoted string or use string concatenation like so: "foo bar " ~ $year ~ " baz blat" 13:54
moritz perlpilot: yes
perlpilot census: for comparison, the first way would be like: "foo bar {$year} baz blat"
census thanks perlpilot ! That worked 13:55
El_Che AlexDaniel: I agree with what you say, but there is an aspect of marketing as well to the story. 13:57
Ven`` moritz++ 13:59
census in perl6, is there a way to change the agent in the code? 14:01
moritz census: who or what is "the agent"?
perlpilot moritz: I think he's asking about the "user agent" as in a browser request.
s/browser/HTTP/ 14:02
census yes perlpilot. i didn't know how to explain it well. it's something in perl5 i've used with the $mech
Skarsnik__ look at the doc of the module you are using? 14:04
perlpilot census: that would be a function of the WWW module that you are using. you'd have to check the docs for that module
census perlpilot on docs.perl6.org/language/modules ? 14:06
or modules.perl6.org ? 14:07
it says "module will use User-Agent header to set Rakudo WWW, unless you specify that header" Is that the same thing? 14:08
perlpilot census: looks like it 14:09
census perlpilot github.com/sergot/http-useragent and i'm not seeing a way to change it 14:11
Skarsnik github.com/sergot/http-useragent/b...t.pm6#L468 14:12
census thanks Skarsnik ! 14:14
i don't follow the syntax, however
i should be looking at : =head2 method new method new(HTTP::UserAgent:U: :$!useragent, Bool :$!throw-exceptions, :$!max-redirects = 5, :$!debug) returns HTTP::UserAgent ?
perlpilot census: you should be able to do get $url, User-Agent => "Whatever"'; 14:15
er, but without the syntax error
census perlpilot like $url, User-Agent => "Mozilla/4.0"; ? 14:16
perlpilot yep
perlpilot with a little more context from the code you posted: "temp".IO.spurt: get "...", User-Agent => 'Mozilla/4.0'; 14:18
census thanks perlpilot ! that seems to work . i hope so at least. the program is compiling at least 14:21
census what is the command for random number generator? in perl5 it's rand(9) for example to do random from 0-8 14:25
Skarsnik m: say ^9.pick 14:26
camelia Potential difficulties:
Precedence of ^ is looser than method call; please parenthesize
at <tmp>:1
------> 3say ^97⏏5.pick
^9
perlpilot census: did you want integers?
Skarsnik m: say (^9).pick
camelia 3
perlpilot m: say 9.rand; # does the same as perl5's rand(9); 14:26
camelia 3.65081666642663
perlpilot census: use what Skarsnik said if you want integers
census perlpilot i actually don't care if it's integeres 14:27
i just wanted random numbers but nothing too large
thanks Skarsnik and perlpilot ! 14:29
Ulti are there any icon sized optimisations of Camelia? 32 and 64 pixels? 14:34
census also i don't know if this would be feasible or a pain in the but, but i like to run my code in TOR. i've done it before in perl5 but i don't quite recall which lines in my old code did so. i have a line that's like my $proxy = "socks://localhost:9150" and another that's like $ENV{'HTTP_PROXY'} = `64.71.156.216:8181'; 14:35
timotimo pmurias: we can support dup and dup2 on rakudo-js, right? 14:36
moritz .seen [ptc] 14:37
yoleaux I saw [ptc] 14 Jun 2017 10:50Z in #perl6: <[ptc]> zengargoyle: cheers. Must be something at my end. I keep getting 502s
Ven`` timotimo: did you dup dup? :P 14:38
timotimo yeah, we'll have to dedup the dup2 14:39
sena_kun m: my @int = (foo => 1, bar => 2); say @int.map({ {first => .key, second => .value} })[0].WHAT 14:43
camelia (List)
sena_kun is there a way to return Hash from map, instead of list? 14:44
m: my @int = (foo => 1, bar => 2); say @int.map({ %{first => .key, second => .value} })[0].WHAT
camelia Odd number of elements found where hash initializer expected:
Only saw: -> ;; $_? is raw { #`(Block|74895184) ... }
in block <unit> at <tmp> line 1
sena_kun Boom.
moritz add .hash at the end?
sena_kun m: my @int = (foo => 1, bar => 2); say @int.map({ (first => .key, second => .value).Hash })[0] 14:45
camelia {first => foo, second => 1}
sena_kun it's better. thanks!
sumdoc I want to substitute one word with another word. How to do that? Should I open in :append mode? Example: my $fh = open("file.txt",:a); Now how to substitute? 14:48
When working with a file.
timotimo that will only work if both words have the same length 14:49
like, in general
i haven't actually tried to do this at all for the longest time, but i think all you need to do is use append mode so it doesn't truncate the file, seek to the position you want, then make sure to write exactly the same amount of bytes everywhere 14:51
i.e. it'd be a good idea to only do this in :bin mode
census Zoffix you'd be proud of me i hope. with 1 slight hint i took your suggestions and made them into working code 14:52
pastebin.com/65ipCYPE 14:53
Geth marketing: 9ce3c2bf2f | (Zoffix Znet)++ | 2 files
Add renders of 32px and 64px Camelia logos
sumdoc Zoffix wordpress.com/post/suman20blog.wordpress.com/21 14:53
Zoffix Util: I exported 32px and 64px rasters from Illustrator and added them to github.com/perl6/marketing/tree/ma...Os/Camelia But if you meant specifically massaged SVGs to make smaller versions render better... I'm not aware of us having those 14:54
Zoffix Ulti: ^ I meant that for you :) 14:55
sumdoc: that tells me to log in to wordpress
census how may i run my code in a proxy like with TOR? in perl 5 i did it but i don't quite remember which line in my old code set that up.i have a line that's my $proxy = "socks://localhost:9150" and another that's $ENV{'HTTP_PROXY'} = `64.71.156.216:8181'; 14:56
Zoffix census: awesome! You should change "list.txt".IO.lines to "list.txt".IO.lines.map: &uri_encode though, so it escapes all special terms in the URL
Ven`` wow, Cro::Router looks so nice. 14:57
amazing job :-)
perlpilot yeah, Cro looks pretty nice in general. 14:58
census thanks Zoffix ! that works
Ven`` wanted to write a WS discord lib, maybe I should use that 14:59
perlpilot I may stop playing with Bailador since Cro seems to fit more how I think things should work.
sumdoc Zoffix suman20blog.wordpress.com/2017/08/...in-perl-6/
Ven`` Yeah, I'm not too fond of Bailador either, Cro looks more fitting to my taste (I've always liked express/sinatra/...) 15:00
The website is unreadable on mobile though :P. 15:01
Ven`` I should PR it to fix the highlighting maybe 15:01
El_Che Ven``: isn't Bailador a kind of port of Dancer, which on its turn is inspired by Sinatra?
mst ARGH 15:03
Zoffix .hug mst
huggable hugs mst
mst I start reading the cro website, it autoscrolls to a different slide when I'm halfway through
Zoffix :D
Ven`` yup. try on mobile too :P.
mst hahahaha and using the left arrow button to go back doesn't stop the carousel 15:04
perlpilot mst: yeah, that was most annoying.
Ven`` El_Che: I know nothing about how Dancer compares to Sinatra. I just know Bailador doesn't seem to do middlewares like I expect it to, and has hacks like `noprefix` 15:05
El_Che Bailador had some nasty locking issues after a X number of concurrent sessions (although high: 200?)
Does cro has a similar issue?
sena_kun it is yet to be tested under such load, I guess. 15:06
and as for now things are unoptimized performance-wise. 15:07
El_Che That was actually not a bailador issue, but the underlaying plack implementation iirc
ufobat Ven``, what is `noprefix` ? 15:08
raschipi sumdoc: why "$string.comb(/ \w /);" and not just "$string.comb;" ?
Ven`` ufobat: github.com/Bailador/Bailador/commi...9e6a3a4446 15:08
raschipi why ".say for" instead of ".join("\n").say ?
ufobat Ven``, and bailador can "return" a p6w app, which is psgi, so you can wrap middlewares around it 15:09
Ulti mattoates.co.uk/files/perl6/jupyter...t_test.png \o/ looks like ZeroMQ needs to see something special in the Kernel protocol to actually render the SVG as an image :(
ufobat if you call my $psgi-app = baile('p6w'), it returns an app instead of running it on a server like http::tiny 15:09
perlpilot sumdoc: also, I wouldn't mention split("") in that last example unless you also explain why there's an extra element at the front.
sumdoc raschipi Points noted
raschipi sumdoc: "$string.comb(/ \w /);" and "$string.comb;" do different things on strings with whitespace. I'm not making any points, I'm just asking. 15:10
But I do think ".say for" is more difficult to understand than ".join('\n').say" 15:12
Ulti $string.words however does the same
Ven`` ufobat: that's not how middlewares are done on express, where you can mount apps on apps, middlewares around single routes or prefixes, etc
ufobat you can't mount apps inside of bailador, right, but you can mount a bailador app somewhere 15:14
it's psgi'ish
Ven`` it just comes down to what i'm used to do with express 15:15
being able to mount app just inside a middleware doesn't interest me
Ulti Zoffix: thanks sorry I missed it ;_;
ufobat in psgi you mount apps in an app of its own, and you can wrap middlewars around that 15:18
metacpan.org/pod/Plack::Builder <- thats perl5 more or less the "same idea" 15:19
but it seems that express, which i dont know, is more flexible
mst Ven``: I'm not sure what you mean by that or what you'd want instead 15:21
Ven`` mst: ?
context please
mst Ven``: express seemed ridiculously verbose to me and I can't write ruby because it has crippled scoping and worse-than-perl5 OO
Ven``: context? your last sentence
Ven`` ok, not the last time I mentioned you 15:22
raschipi Ven``: do you have a link to express? 15:22
Ven`` i'm not defending ruby (neither sinatra which apparently uses globals everywhere etc), I'm just saying I'm used to express. I don't think it's too verbose, you just use a few middlewares in pretty much any web app that deals with e.g. json 15:23
raschipi: expressjs.com/
Zoffix .ask RabidGravy does HTTP::UserAgent support socks5 proxy? I see some mention of HTTP proxy in source and nothing in docs and nothing about socks proxies 15:24
yoleaux Zoffix: I'll pass your message to RabidGravy.
census Zoffix yes that's my question too, right? 15:25
mst Ven``: ugh 15:26
Ven``: I'm not asking you to defend anything, I'm just trying to understand what you even want
Ven`` mst: i don't understand what you're trying to do 15:27
Zoffix perlpilot: on the theme of Inline::Perl5: right now I'm trying to use LWP::Simple's proxy method, which is used as $ua->proxy(['http', 'ftp'] => 'proxy.sn.no:8001/'); but while it works in Perl, in Rakudo the same style (2 positonals: Array and Str) dies with "Proxy must be specified as absolute URI". And I've no idea what I'm doign wrong
census perlpilot are you trying to do something similar to what i was saying before? 15:28
mst Ven``: ah, it looks like currently both Cro and Bailador are in the "reinvent ALL the wheels" phase so there's no concept of middlewares or other such reusable building blocks yet 15:29
Ven``: I assumed somebody would've attempted to at least vaguely follow one of the perl5 ecosystem examples, but alas no 15:30
well, not yet
Ven`` mst: the talk about Cro shows pretty nice examples of middlewares, but again, since it depends on signature introspection, I think you can't wrap any function and return a new one
mst Ven``: hm?
kannan hello all. i finally received the perl6 fundamentals book by moritz ! working on it :)
mst Ven``: I don't see anything involving middleware on the Cro site
Ven`` mst: I did say talk. Here: jnthn.net/papers/2017-spw-sockets-services.pdf 15:31
ruoso__ Is it a known issue that Grammar::Tracer dies when you use proto rules?
perlpilot Ven: is the talk video available somewhere?
Ven`` perlpilot: I don't know.
perlpilot census: no.
Zoffix perlpilot: and even if I just shove the Perl version into Inline::Perl5.new.run(), it dies with "error while setting up ssl connection (SSL connect attempt failed error:1408F119:SSL routines:SSL3_GET_RECORD:decryption failed or bad record mac)"
perlpilot Zoffix: yeah, that does happen sometimes to me too (where I have no idea what went wrong) 15:32
Zoffix I must be the unluckiest Inline::Perl5 user, eh? :)
census perlpilot what are you trying to do exactly? i'm looking to run my code through a proxy, specifically TOR
sena_kun perlpilot, mi.cro.services/docs/reference/cro-http-server - see `Middleware` section.
perlpilot census: nothing. :-)
go|dfish perlpilot: talk video: www.youtube.com/watch?v=6CsBDnTUJ3A 15:33
perlpilot go|dfish++ sena_kun++
sena_kun oh, the video is here, great.
Zoffix \o/
census oh ok perpilot I saw Zoffix talking to you about what semed to be proxy and perl5 so I'm curious because I want to do something like that. Do you know anything about how to do so?
perlpilot census: nope. 15:34
kannan i wanted to ask : using IO::Tailfile and a react{ block} i am creating another file with shared access lock which is read-written by another .pl6 script. In case i am able to make a duplicate log file which will also be written to continously, can we skip the access share bit and OPEn the file in perl6 instead and delete / edit lines? to be specific, asterisk pbx generates a security log. I... 15:35
...can create two similar files in its configurations. If one file thats being written into by logger.c with syslog in asterisk is opened in perl6 does that also pose similar access sharing problems.
Zoffix census: run in cmd: cpanm LWP::UserAgent::socks
perlpilot kannan: you're writing to a single file from two processes? 15:36
kannan perlpilot : yes 15:37
census thanks Zoffix. it updated the cpan and p6c mirrors, but it also says "no candidates found matching identity" 15:38
Zoffix census: then this is a code you can use to make a get request to a URL: my $url = 「www.expressvpn.com/what-is-my-ip」; say (run :out, "perl", "-e", 「use LWP::UserAgent; my $ua = LWP::UserAgent->new(timeout => 25); $ua->proxy([qw/http https/] => "socks://127.0.0.1:2225"); $ua->cookie_jar({}); print $ua->get(」 ~ $url.perl ~ 「)->content」).out.slurp: :close
census: you ran it with zef, but you need to just run cpanm LWP::UserAgent::socks
cpanm is Perl's module installer and that installs a Perl module
And the code runs perl executable to make a request.
Zoffix Normally you'd be able to use it via Inline::Perl5 (but that doesn't work) or just use natively some module via Rakudo (but I don't know which ones support socks proxy) 15:39
timotimo sena_kun: there's a typo in the middlewares section in the http server section: it says ScriptTransportSecurity instead of StrictTransportSecurtiy
(and i just typo'd on top of that)
mst Ven``: yes, I *can* read. but, logically, since you're refusing to explain what you want, I went to try and find the source code to understand more :P
census Zoffix. What am I doing incorrectly? C:\Users\owner\Desktop>cpanm LWP::UserAgent::socks 'cpanm' is not recognized as an internal or external command, operable program or batch file.
Zoffix census: did you install Strawberry perl?
sumdoc: says "the author has deleted this site" 15:40
census Zoffix not on this machine. i will now
Zoffix Yeah, you need it
sumdoc Zoffix I change the name of my site. Now it lives here sumdoc.wordpress.com/2017/08/26/te...in-perl-6/ 15:41
sumdoc I am yet to edit 15:41
Zoffix sumdoc: if it's a Perl 6 blog, be sure to add it to github.com/stmuk/pl6anet.org/blob/...rc#L83-L85 so it shows up on perl6.org "recent blogs" box 15:42
perlpilot kannan: sounds scary :-) I would think that adding new lines could be fine as long as you're careful about your writes though 15:43
Geth perl6.org: 298e5e3301 | (Zoffix Znet)++ (committed using GitHub Web editor) | source/index.html
Fix incorrect use of alt="" attribute
sena_kun timotimo, that's no good! Thanks for the reporting~
sumdoc Zoffix It will be a combination of R(www.r-project.org/) , Perl 6 and Python.
kannan perlpilot : i am brand new to perl6 and to programming itself. just trying it academically. the problem is already solved by good programmer, with a source code patch in asterisk :) . i can do the needful inside the IO::Tailfile react{block itself, but i thought it was better this was so the tail emulation does not miss any security events... in other words i do not know how fast it will... 15:47
...execute . i do not know any way to test that also , i guess write anoither program to generate logs at super speeds..
census Zoffix I just downloaded and installed strawberry Perl and am having the same error message. should i run it from the cmd still or from the Strawberry Perl client?
raschipi census: did you close and reopen cmd? 15:48
kannan basically i need a way to react to security events when some conditions are met, and not miss a single line from the security log. 15:49
the above is just my try at doing that.
census yes raschipi just now and i didn't work. different error though 15:50
C:\Users\owner\Desktop>cpanm LWP::UserAgent::socks ! Finding LWP::UserAgent::socks on cpanmetadb failed. ! Finding LWP::UserAgent::socks () on mirror www.cpan.org failed. ! Couldn't find module or a distribution LWP::UserAgent::socks
Zoffix sumdoc++ great tutorial! Note .match('is') could be written as .contains('is') which is likely faster too. Also, .split('') and .comb(/\w/) are different things (split will add empty strings at start and end, unless :skip-empty named param is given as well as include non \w chars, while .comb would give only \w; to split string on characters, you can use .comb without any args. P.S.: 15:52
$string.words.lc.unique.elems doesn't work because .lc combines the words back into a string, you can use hyper operator » to call it on each element: $string.words».lc.unique.elems
sumdoc: I actually learned something: .tc doesn't touch other letters in the string and I thought it did :) Now I remember we have .wordcase for that :)
census: my bad, I gave you wrong module name. It should be LWP::Protocol::socks 15:53
so run cpanm LWP::Protocol::socks
sumdoc: mention your post to lizmat++ to see if she'd be able to include it in the next Weekly installment
census thanks Zoffix! okay it just installed 15:54
i wouldn't have known to have tried that without you
raschipi sumdoc: "dd $a is basically short for note $a.perl plus some extra features" -> this sentence doesn't connect to anything in the post, I think. It's just lost there. I spent time looking for some code using dd in your post. 15:56
kannan i am not able to install Inline::Perl5 . Pl see for output -> paste.debian.net/983557/ 16:02
Zoffix kannan: what system is that on? 16:04
kannan debian stretch 16:05
64 bit
Zoffix kannan: sudo apt-get install libperl-dev
Then try again
kannan Zoffix : gr8! worked. 16:07
Zoffix \o/ 16:08
kannan about the moritz book - i suppose i was expecting a 'teach yourself php in 24 hours' style ... it is hard to get past a few lines at a time. 16:10
but i love it!
Geth doc/molecules-patch-3: a2fb0bf7c1 | (Christopher Bottoms)++ (committed using GitHub Web editor) | doc/Language/syntax.pod6
Implied separator rule: focus on ending blocks

I've modified the explanation to focus more on the ending blocks than on the ending semicolon. This is to make improvements toward resolving (or at least mitigating) concerns with issue #1471. Also included an example of implied separator rule with a colon method call.
16:11
Zoffix \o/
Zoffix moritz++ 16:11
Geth doc: molecules++ created pull request #1476:
Implied separator rule: focus on ending blocks (instead of the curly brace itself)
16:13
census Zoffix there's one thing i used to do in perl5 i'm not sure how to do in perl6
i want to clear whatever is in the current output .txt file. in perl5 i did so through the command open(my $file1, '>', 'output.txt') or die "Can't open output file : $!" 16:14
Geth doc: 7bb1fec099 | (Christopher Bottoms)++ (committed by Zoffix Znet) | doc/Language/syntax.pod6
Implied separator rule: focus on ending blocks (#1476)

I've modified the explanation to focus more on the ending blocks than on the ending semicolon. This is to make improvements toward resolving (or at least mitigating) concerns with issue #1471. Also included an example of implied separator rule with a colon method call.
16:16
Zoffix census: outside your loops, open the file: my $fh = open 'output.txt'; then inside (where you currently use the .spurt thing) change OUT_FILE.spurt: .... to $fh.spurt: ... 16:18
timotimo census: just opening the text file with :w and writing to it will truncate the file contents 16:18
actually
Zoffix The old way uses IO::Path.spurt to open the file and append to each on each loop iteration. The new way opens the file (clearing it) and gives you IO::Handle and you .spurt :append into the handle 16:19
timotimo just opening it for :w truncates the file contents
Zoffix census: oh right, I forgot the :w adverb timotimo++ mentioned
my $fh = open :w, 'output.txt';
census oh so just add that line after constant OUT_FILE = 'results.txt'.IO; ?
Zoffix census: yeah, somewhere there. my $fh = open :w, OUT_FILE 16:20
census oh it seems this other line first ?
Zoffix reaches for "The Definitive IO Guide" and realizes it was never finished
oops
census my $fh = open :w, 'output.txt'; constant OUT_FILE = 'results.txt'.IO;
Zoffix census: what's OUT_FILE? 16:21
kannan "my-file.txt".IO.spurt: ""; from docs.perl6.org/language/io-guide#W...into_files - will this also work? just asking as i remember reading it.
census ultimately it writes the data there: OUT_FILE.spurt: :append, "$term,$year,$results-num\n";
Zoffix census: right, and you want to open that file to get a file handle for it. But right now you're opening a different file. OUT_FILE contains the path to the file you wanna open 16:22
Zoffix kannan: yeah 16:22
kannan yes, worked alright. 16:23
Zoffix census: constant OUT_FILE = 'results.txt'.IO; just creates an OUT_FILE constant, so you keep the actual filename written down once and can refer to that constant when you want to refer to the file. The .IO method returns an IO::Path object 16:25
huggable: IO::Path
huggable Zoffix, File or directory path: docs.perl6.org/type/IO::Path
census yea i realize that now .i spoke too quickly 16:26
i'm still getting used to all the perl6 stuff
Zoffix census: after you create that constant, you want to open that IO::Path for writing, so you use open routine that takes that IO::Path and opens it and gives you back an IO::Handle object 16:26
Zoffix huggable: IO::Handle 16:26
huggable Zoffix, Opened file or stream: docs.perl6.org/type/IO::Handle
census Zoffix however, i feel like i'm doing something wrong because nothing is saving now 16:27
raschipi show us the code
census pastebin.com/WJASWPHN
Zoffix census: and now the OUT_FILE.spurt: :append, "$term,$year,$results-num\n"; line needs to become $fh.spurt: :append, "$term,$year,$results-num\n"; so you write to the filehandle instead of the OUT_FILE (functionally, it won't make much difference really, but at least you're not opening the file on each iteration) 16:28
census: also, stick $fh.close; after the loop
To close the handle and write everything that's in a buffer (that I don't think we use yet by default) out
census yes that makes sense because in perl5 i had to close it too 16:29
Zoffix Do you? I thought .close would .flush for you and .close is done on scope leave
In Perl, I mean. In Rakudo it doesn't
census: if you look on your filesystem, you'll now find two files: results.txt and output.txt 16:30
census yea in perl5 i had to close the file name
Zoffix One has output the other doesn't
Zoffix You open the $fh filehandle, but not only you open it to the wrong file, but you also never make use of it. 16:31
census haha true 16:31
thanks for noticing that
Zoffix I hope all the lines I wrote above can answer what's happening and you can figure out how to fix that.
Zoffix leaves to work &
census yes thanks Zoffix it is all good there ! 16:32
vytautas Installing GTK::Simpler fails, "Cannot locate native library 'libgtk-3.so':..." 16:38
dpkg -S libgtk-3.so returns /usr/lib/x86_64-linux-gnu/libgtk-3.so.0 and ...libgtk-3.so.0.2200.18 16:40
andrzejku hey
Skarsnik_ nneed to install the dev package
and make an issue to gtk::simpler to give the abi version x) 16:41
vytautas installed dev package, ran "zef install GTK::Simpler" again, now it fails when i close the popup window 16:51
kannan perlpilot : should it be safe to open a syslog file in read-only mode and then go on till End of File lazily (in small chunks)? 17:15
raschipi If someone is writing to it, you might get it in a half-written state at the end. 17:18
firefish5000 m: say( 'succeed'.match(/ suc | [ fail || succeed ]/) ); 17:25
camelia 「suc」
kannan raschipi , ty.
firefish5000 Can anyone explain why longest alternation 'succeed' isn't used here? 17:26
firefish5000 I am assuming its a bug, but I haven't thoroughly read the docs/spec in a couple of years. 17:29
Zoffix m: say( 'succeed'.match(/ suc | [ succeed || fail ]/) ); 17:30
camelia 「succeed」
Zoffix firefish5000: dunno, IIRC I seen some ticket on something related to this
Oh, nm, it was this one: rt.perl.org/Ticket/Display.html?id...et-history 17:31
Zoffix firefish5000: worth reporting it, I think 17:31
huggable: rakudobug
huggable Zoffix, Report bugs by emailing to [email@hidden.address] See also: github.com/rakudo/rakudo/wiki/rt-introduction
census Zoffix I didn't mean to get sidetracked before with the $fh business. You were suggesting I install the LWP::Protocol::socks module next. Do you have any suggestions where to go from there? 17:32
firefish5000 Zoffix, Thanks, ill report it then
Zoffix census: around the same time I gave you a piece of code that performs the HTTP request using socks proxy
census: irclog.perlgeek.de/perl6/2017-08-29#i_15085964 17:33
Ulti SVG Plot in Jupyter Notebook mattoates.co.uk/files/perl6/jupyter...t_html.png
Zoffix bah, Unicode is busted in logs :(
I say anti-Unicode crowd gets a point. My code got ruined and I have no super-easy to recreate it 17:34
census thanks for teching me about log! 17:35
oh i just found it on my own but now i see the link
Zoffix census: my $url = 「www.expressvpn.com/what-is-my-ip」; say (run :out, "perl", "-e", 「use LWP::UserAgent; my $ua = LWP::UserAgent->new(timeout => 25); $ua->proxy([qw/http https/] => "socks://localhost:2225"); print $ua->get(」 ~ $url.perl ~ 「)->content」).out.slurp: :close
Zoffix Ulti: looks pretty \o/ 17:36
Zoffix Ulti: you should graph (sqrt(cos(x))*cos(400*x)+sqrt (abs(x))-0.4)*(4-x*x)^0.1 next :) 17:38
(sqrt(cos(x))*cos(400*x)+sqrt(abs(x))-0.4)*(4-x*x)^0.1 # no space after second sqrt, I think 17:39
Ulti is that the bat sin? 17:47
I'll save that one for when I've made a proper patch to handle mime types rather than just hack it 17:48
the quick hack I've done completely breaks the CLI version sadly, I think you have to do quite a bit of work to make the messages work nice for the online notebook and the cli 17:50
Zoffix Nah, it's a heart.
mst Zoffix: paste.scsys.co.uk/564997 17:51
(copy-paste from irssi into a unicode Bot;:PasteBot ftw)
Zoffix mst: :D nice
mst sometimes, my insistance on using the stupidest tools possible pays off because nothing has a chance to break anything 17:52
Zoffix :)
gfldex I found I can break pretty much anything even with very simple tools. :-> 17:54
TimToady Ulti: there are 16 and 32-sized Camelias in github.com/perl6/mu/tree/master/misc 18:14
Geth marketing: 51891c79e5 | (Zoffix Znet)++ | 3 files
Add a couple more camelia logo variants
18:18
lizmat Zoffix sumdoc noted for next P6W 18:32
Zoffix lizmat++ thanks 18:36
kannan ok, specific to my needs, instead of trying to emulate tail -f and reacting to a log file entry, i should write a listener to a socket where Asterisk core writes all the security events. Probably like this -> asterisk -> security event -> perl6-listener -> spawn a separate child script to do the reaction. 18:40
this looks like a correct solution, better than patching asterisk logger source code even. 18:41
kannan i am seeing metacpan.org/pod/AnyEvent and metacpan.org/pod/Asterisk::AMI (which used metacpan.org/pod/EV ) . So my project will restart from scratch , with trying to use inline perl5 and then maybe make new module myself. 18:48
lizmat kannan: perhaps mi.cro.services could be of help ? 18:49
(as in mi.cro.services )
timotimo if you have a IO::Socket::Async you can already get something good (if asterisk can send you log lines via tcp) 18:50
kannan lizmat : i will see what that is, thanks for link! 18:50
El_Che (on the other hand, you really don't want to overengineer simple things: lots of places where stuff can break) 18:51
kannan the events are logged by syslog and also written by core to port 4038
timotimo then you can start tasks (with "start") to do stuff on the thread pool
kannan timotimo : i will read up, thanks. 18:54
kannan timotimo : docs.perl6.org/type/IO::Socket::Async looks good at first glance. i have to try and understand it all. 18:56
census Zoffix I must have done something wrong 18:59
kannan its TCP/IP port 5038 where the events are written by asterisk. prev was wrong 18:59
census pastebin.com/VPTE8T8e 19:00
Zoffix m: await IO::Socket::Async.connect('irc.freenode.net', 6667 ).then({given .result {.print("NICK Camelia_\nUSER NotCamelia localhost irc.freenode.net :notCamelia\nJOIN #perl6\nPRIVMSG #perl6 :Sounds like a plan, kannan ^_^\n"); react {whenever .Supply {}}}})
Camelia_ Sounds like a plan, kannan ^_^ 19:00
Zoffix giggles
camelia (timeout)
census am i supposed to fill this part in ? print $ua->get(? ~ $url.perl ~ ?)->content?) 19:01
kannan let me log this view, last time i forgot to turn on loggin in the irc
Zoffix thanks, ! !
Zoffix kannan: we also have channel logs: irclog.perlgeek.de/perl6/2017-08-29#i_15086708 (though Unicode in them is currently bustified a bit) 19:02
census: what do you see here, question marks or square brackets: 「...」
kannan Zoffix , nice :)
Zoffix census: my $url = 「www.expressvpn.com/what-is-my-ip」; say (run :out, "perl", "-e", 「use LWP::UserAgent; my $ua = LWP::UserAgent->new(timeout => 25); $ua->proxy([qw/http https/] => "socks://localhost:2225"); print $ua->get(」 ~ $url.perl ~ 「)->content」).out.slurp: :close 19:03
census: ^ there are square brackets in the code where you have question marks. You probably copy-pasted off broken logs
Zoffix square brackets are "string with no interpolation inside". You can write them with ASCII-only symbols like Q/.../ too (just need a symbol that doesn't appear inside the string 19:04
kannan Zoffix : Oh thats so very short and sweet , it looks incredible how we can do like it. i have yet to comprehend it fully and adapt it to my need, but still i can see this is where i will go towards. 19:06
Zoffix kannan: .connect returns a Promise that's kept when it connects, .then executes its block when that Promise is completed (so connected) and the first argument to the block is the promise (in that case, it gets assigned to the topical variable $_) and its .result is the sock. So inside that block, I take the sock (with `given .result` assigning it to $_ topical variable) and inside tell it to send stuff to the 19:10
sock (with .print). After I do that, I start a dummy react { whenever {}} block that listens on the .Supply from the sock (so the bot doesn't disconnect right away)
Zoffix kannan: we have a concurrency tutorial with some of that stuff: docs.perl6.org/language/concurrency There's also a mutli-server usage example in IRC::Client (not sure how helpful the code is: github.com/zoffixznet/perl6-IRC-Cl...#L173-L225 ) 19:11
There's also a blog post for IRC::Client: rakudo.party/post/IRC-Client-Perl-...IRC-Module
</shameless-selfpromotion> :)
kannan Zoffix : very good ! my only problem now is i am still struggling with basic concepts, but i think i may be able to get there. i am going thru the perl6 resoruces, rosetta code , thinkperl6 (free ed), and mortiz's perl6 fundamentals. 19:13
Zoffix And here's a filled out react block that reads the stuff: github.com/zoffixznet/perl6-IRC-Cl...#L203-L214
kannan: yeah, I know the feeling :) Well, good luck. You can always ask for help in this channel, if you're stuck with anything. 19:14
kannan Zoffix : thanks. no emoticons can express my appreciation (and i don't have any anyhow) 19:16
Zoffix :D
kannan i nearly signed up for an online java course... heh. 19:20
firefish5000 Replying to perl6-bugs-followup doesn't seem to add anything to the ticket, nor am I getting any email confirmation. do I need to send it to rakudobug with subject [perl #TICKETNUM] instead? 19:21
Zoffix firefish5000: sometimes there's quite a delay while the email percolates through the spam filter (though there have been cases where the emails were totally blocked) 19:24
Zoffix opens email, gets shocked at number of bug emails, and closes the email client :) 19:28
AlexDani`++ # handling tickets 19:29
firefish5000: I can add your reply to the ticket, if you want. Which ticket and what's the reply?
firefish5000 Zoffix, Thanks, message is pastebin.com/Bp8YuD6t , Bug #131991 . Just corrected the scope, added another example and added platform/version information 19:32
synopsebot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=131991
Zoffix firefish5000: done: rt.perl.org/Ticket/Display.html?id...xn-1485740 19:34
andreoss Data::Dump cannot handle lazy list 19:35
firefish5000 Zoffix, Thanks! I had been checking to see if it applied every 10 minutes for about an hour :P
Zoffix :D 19:36
andreoss: dd can 19:37
m: dd ^Inf .List
camelia (0, 1, 2, 3, 4, 5, 6, 7, 8, 9... lazy list)
Zoffix m: ^Inf .is-lazy.say; ^5 .is-lazy.say
camelia True
False
andreoss dd's output is misleding
m: my @d = lazy 1,2,3; say dd(@d); 19:38
camelia Array @d = (1, 2, 3, Any, Any, Any, Any, Any, Any, Any... lazy list)
Nil
Zoffix hah
I don't think it can do better than that, 'cause you can't find out .elems of a lazy list 19:39
Zoffix Oh wait, it can. Just pull and check if you got IteratioNEnd 19:40
s: &dd
SourceBaby Zoffix, Sauce is at github.com/rakudo/rakudo/blob/94fe...ny.pm#L598
Zoffix m: my @d = lazy 1,2,3; say @d[lazy ^10] 19:40
camelia (1 2 3)
andreoss it seems you can dig into internal strtructure and check if the $!iterator value is just an Array
Zoffix Or do that
andreoss m: my @d = lazy 1,2,3; say @d[^10]; 19:42
camelia (1 2 3 (Any) (Any) (Any) (Any) (Any) (Any) (Any))
Zoffix Just need to stick `lazy ` before `^10` over here github.com/rakudo/rakudo/blob/94fe...ny.pm#L606 or do something smarter and fetch ^11 elems and if you got 10 or fewer in the result, report them as entire (lazy) array without the ... after the elems
(&dd is not starndard feature, so we can change it much more freely than the rest of stuff) 19:43
andreoss m: my @d = lazy 1,2, fail; say @d[^2]; 19:45
camelia Failed
in block <unit> at <tmp> line 1
andreoss is there any point of defining a lazy list of finite length like that? 19:46
andreoss all values will be evaluated before lazy anyway 19:46
moritz a lazy list of only literals makes little sense 19:47
andreoss m: my @d := lazy 1,2,fail, fail, die; say @d[^2]; 19:48
camelia Failed
in block <unit> at <tmp> line 1
Zoffix fail returns (or throws if it's in top space)
m: my @d = lazy gather { take 1; take 2; fail }; say @d[^2]; 19:49
camelia (1 2)
Zoffix m: my @d = lazy gather { take 1; take 2; fail }; say @d[^5];
camelia Failed
in block <unit> at <tmp> line 1
andreoss m: sub foo() {fail}; my @d := lazy 1,2, foo(); say @d[^2];
camelia Type check failed in binding; expected Positional but got Seq (?)
in block <unit> at <tmp> line 1
andreoss m: sub foo() {fail}; my @d = lazy 1,2, foo(); say @d[^2];
camelia (1 2)
andreoss nevertheless foo() is being called before lazy 19:50
Zoffix Yeah, it needs to be inside gather to be a continuation. 19:52
Zoffix relocates
andreoss may be a warning should occur? 'Useless use of lazy in eager context' 19:54
Zoffix andreoss: nah, it gets evaluated before a lazy Seq is made. lazy is a sub and you're giving it args 19:59
andreoss why `lazy` doesnt act as a macro? i.e doesn't evaluate its arguments
Zoffix Dunno 20:00
andreoss s: &lazy 20:02
SourceBaby andreoss, Something's wrong: ␤ERR: ===SORRY!=== Error while compiling -e␤Undeclared routine:␤ lazy used at line 6␤␤
Zoffix Maybe I'm misremembering about it being just a sub =) 20:03
Zoffix Yeah, it's a statement prefix actually 20:06
Zoffix but close enough: it's a statement prefix that just calls method lazy 20:07
Zoffix code: github.com/rakudo/rakudo/blob/nom/....nqp#L2317 20:09
andreoss m: use experimental :macros; macro lazy(*@a) { quasi { Seq.new: class :: does Iterator { state @b = @a; method pull-one { @b.shift || IterationEnd } }.new } }; my @x = lazy(1,2,fail(),die()); say @x[^2]; 20:10
camelia (AST.new AST.new)
Zoffix (with similarly named token in src/Perl6/Grammar.nqp to parse it)
andreoss how do i evaluate @b.shift? 20:11
Zoffix andreoss: we have a mechanism called thunking where we can delay code execution (like in `42.say and 70.say or 100.say`) dunno if it's exposed to be freely used in userspace tho 20:12
andreoss: in normal code it would be evaluated. dunno what those asts are
Zoffix calls it a day 20:13
\o
raschipi o/ 20:18
TimToady firefish5000: see S05:2895 20:20
synopsebot6 Link: design.perl6.org/S05.html#line_2895
nadim Hi, getting a character from the keyboard, not echoing characters, catching signals, examples somewhere? I want to make a terminal application with Terminal::Print to replace NCurses. 20:20
all pointers welcome
raschipi nadim, start at the REPL code, also look at the line disciplines for it 20:22
raschipi For catching signals, look here: docs.perl6.org/type/Supply#sub_signal 20:23
geekosaur Terminal::Print actually got that functionality recently, in a branch (raw_input) 20:25
rightfold m: SIGINT.WHAT.perl.say 20:36
camelia Signal
moritz m: say SIGINT.^name 20:37
camelia Signal
nadim thank you both 20:46
[Coke] AlexDaniel: I would clarify on #122004 not that we "don't care" but that it's an experimental feature. (I assume that was the intent?) 20:47
synopsebot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=122004
firefish5000 TimToady, Thanks, just read it. Yep its a dup and that explains the behavior. Could you close #131991 for me. 20:50
synopsebot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=131991
nadim geekosaur: I am already on branch no-more-auto-create of Terminal::Print. I'll have to wait for it to be merged to be able to use the other one but I will check it and the docs of it 20:54
AlexDaniel [Coke]: IIRC we had it as a non-experimental feature, then it was put behind experimental pragma because before 2015.12 some serious issues were discovered. Now it does not look like a high priority feature because we at least have Memoize module in the ecosystem 21:22
[Coke]: so in almost two years nothing was done about it, and I don't see discussions about it very often… maybe I was wrong to say that “we don't care”, but realistically there's some truth to it
[Coke] printed the squashathon and camelia came out squashed. 21:27
AlexDaniel laughs
Skarsnik hm, triaging/stating on old bug could be for the next squashathon x) 21:28
[Coke] AlexDaniel: just trying to use precise language. we're all busy folks, no one working on something only means it's not near the top of the list. 21:29
AlexDaniel [Coke]: OK, left a comment in an attempt to redo my frivolous use of language :) 21:33
that said, expect more stupid comments from me as I'm trying to push around some of the older tickets
Skarsnik good luck! 21:34
[Coke] Sure. I had some notes on queue maintenance back in the day, should dig those up for the SA.
[Coke] hurls gist.github.com/coke/ac078396e8f216b83e9a 21:35
[Coke] please feel free to clean that up and use it or just link to it or ignore it or whatever. 21:36
I am no longer the only bugadmin who can make other rt bugadmins, but I forgot who it was. zoffix, mebbe?
AlexDaniel [Coke]: nice list. We can use some of that for another bug squashathon when perl6/roast or perl6/nqp repo will be involved 21:39
AlexDaniel [Coke]: maybe you have some ideas regarding the doc repo for this Saturday? 21:39
BooK sub MAIN ( :$arg! ) {} does not seem to accept --arg klonk, but only --a=klonk 22:05
BooK oh, come on: my $split := nqp::split("=",$arg); 22:08
(and in my above example, I obviously meant --arg=klonk) 22:09
I actually don't understand the code around that, so maybe I should work on that first :-) 22:11
but, if I try to work my way to a patch to support --arg klonk in addition to --arg=klonk, would someone review it? 22:12
or is there already a good reason not to support that?
Skarsnik hm 22:12
how to tell not to take a args? 22:13
AlexDaniel BooK: yes, that would be great 22:14
Skarsnik like : cmd --args=foo file.txt and cmd --args foo file.txt
AlexDaniel BooK: not sure if I'll be able to review it, but I'm definitely interested
BooK Skarsnik: for that I need to read the code more :-) 22:15
Skarsnik I think it should you to type your param probably?
BooK AlexDaniel: sure thing
Skarsnik +force
to distinc Bool vs no Bool
AlexDaniel BooK: note that there are many things about arg handling that are less than awesome. It's simply that we had no MAIN hero yet. 22:16
Skarsnik maybe it written in the spec why?
Skarsnik anyway time to sleep :) 22:16
BooK wow, MAIN hero is an awesome title to earn ;-)
AlexDaniel now that I think about it, what software supports “--foo 42” style? 22:19
BooK Skarsnik was talking about the spec. Where can I read about that?
AlexDaniel: Getopt::Long
AlexDaniel perl6 --target parse -e 'say 42' 22:20
BooK metacpan.org/pod/Getopt::Long#Comm...troduction
AlexDaniel okay, even perl6 executable itself supports it
BooK heh
BooK I tried with: perl6 -e 'sub MAIN(:$arg!) { say $arg }' --arg foo 22:21
BooK so perl6's MAIN is not your usual MAIN? 22:21
maybe that's a place to look for inspiration 22:22
BooK sub MAIN(@ARGS) # am I reading that right? 22:23
AlexDaniel BooK: I don't understand the question :) How do you read that? 22:25
BooK AlexDaniel: I read this as: perl6 does its own argument handling 22:34
because it's flattening everying in @ARGS
BooK but I haven't read or written much Perl 6 yet 22:34
BooK the fact that I find myself reading docs/compiler_overview.pod probably means I went too far 22:41
ipatrol So now I can abuse my customizable Japanese IME to insert Unicode operators,「ufufufu」 22:44
[Coke] AlexDaniel: (doc repo) I'll give it some thought. 22:47
BooK where should I report bugs? I've been looking on perl6.org and it didn't pop out 22:58
ipatrol BooK: rakudo.org/tickets/ 22:58
BooK (I found the perl6 queue on rt.perl.org, but not the link to it from perl6.org)
BooK ipatrol: thanks 22:59
ipatrol BooK: keep in mind that "Perl6" is itself a language, not a program, and therefore, strictly speaking, cannot have bugs. Rakudo, which is a Perl6 interpreter, on the other hand, can have bugs.
TEttinger languages can have bugs. they could have conflicts in the specification, for example 23:01
BooK what TEttinger said :-)
ipatrol TEttinger: I'd call those "flaws" or "defects" as opposed to bugs
BooK so the "perl6" queue in rt is for rakudo?
BooK I think if we start nitpicking we will end up picking nits :-) 23:02
TEttinger ipatrol: I'd strictly speaking only call a member of hemiptera a true bug
Geth doc: 0cdd8a22cd | (Will "Coke" Coleda)++ | doc/Language/syntax.pod6
remove duplicate word (xt/duplicates.t)
23:03
ipatrol BooK: A bug is a behavior of a computer program which is contrary to what is expected. Since the Perl6 language defines what "expected" means for Rakudo, the only bugs are behaviors of Rakudo that do not match the Perl6 design documents. 23:04
[Coke] BooK: yes, rt perl6 queue is rakudo
BooK anyways, I was just trying to figure out how to move forward with my disappointement about MAIN's handling of options
BooK I first looked at the code hoping I'd be able to produce a patch, but then wondered if my expecations were in line with the spec, so I thought what about a bug report 23:05
BooK I also eyed the roast test suite looking for tests for MAIN, but didn't find many of them (some of them pointed to the RT queue, this is actually how I found/remembered it) 23:06
I'm basically a confused newbie :-)
[Coke] so, roast is really the spec - the SYN is a historical document (and I think there was a lot of spec ulative stuff that went in there about options processing which didn't end up getting adopted.) 23:07
BooK and since that spec is a program, it can have bugs ;-) 23:08
[Coke]: more seriously, does that mean any untested behaviour is underspeced?
BooK underspecified, sorry 23:08
ipatrol BooK: in theory, yes 23:09
m: my $patt = /spam|camel|butterfly/; 'camelfly spam' ~~ /$patt/ and say ~$/;
camelia camel
BooK but there is some text somewhere too? I mean code is great, and certainly less ambiguous that prose, but prose has its benefits too 23:11
AlexDaniel BooK: there are some historical documents on design.perl6.org/, but most of them are becoming outdated 23:14
BooK right, but that's not the right kind of prose :-)
AlexDaniel well, there's some prose on docs.perl6.org/ :)
still not the right one :P 23:15
BooK heh
ipatrol Besides those two, there really isn't anything. If they're outdated or incomplete, that's something that needs to be fixed, but that requires manpower.
AlexDaniel and we'd much rather have this manpower writing tests or fixing bugs :) 23:16
AlexDaniel it's less than awesome, but that's how it is 23:16
BooK I knew I should read the headers more closely:
src/core/Main.pm has this in its TODO section at the top:
BooK Allow both = and space before argument of double-dash args 23:17
which is definitely what I wanted
so at least now I know a patch in this direction would get some attention
I just need to learn enough Perl6 to produce it :-)
ipatrol AlexDaniel: however, I would warn not to neglect the documentation either 23:19
ipatrol We'll never get any traction if no one can figure out how to use the blasted thing :-) 23:19
BooK a reasonable next step for me, I guess, would be to install roast and write a test for the thing I (and the TODO) want 23:21
AlexDaniel BooK: there's already a test for it: github.com/perl6/roast/blob/fca87f...#L110-L116 23:25
BooK: and notice that it links to this ticket: RT #124664 23:26
synopsebot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=124664
BooK AlexDaniel: ah thanks 23:37
I got lost looking for the defintion of is_run
ipatrol m: my $name = 'exclaim'; sub $name ($phrase) { say "$phrase !!!";} exclaim('hello'); 23:43
camelia 5===SORRY!5=== Error while compiling <tmp>
Missing block
at <tmp>:1
------> 3my $name = 'exclaim'; sub7⏏5 $name ($phrase) { say "$phrase !!!";} e
expecting any of:
new name to be defined
ipatrol m: my $name = 'exclaim'; sub $name ($phrase) { say "$phrase !!!";} $name('hello'); 23:44
camelia 5===SORRY!5=== Error while compiling <tmp>
Missing block
at <tmp>:1
------> 3my $name = 'exclaim'; sub7⏏5 $name ($phrase) { say "$phrase !!!";} $
expecting any of:
new name to be defined
BooK sub $name ?
ah ok, trying to do a symbolic reference? 23:45
ipatrol BooK: yes
m: my $name = 'exclaim'; sub $name ($phrase) { say "$phrase !!!";} ${$name}('hello');
camelia 5===SORRY!5=== Error while compiling <tmp>
Missing block
at <tmp>:1
------> 3my $name = 'exclaim'; sub7⏏5 $name ($phrase) { say "$phrase !!!";} $
expecting any of:
new name to be defined
firefish5000 Wow, the IRC conversation linked in that ticket took a surprising twist. Seems like some familiar developers were against adding the standard --arg val(s?) syntax, for a variety of reasons. I personalty have been parsing ARGS myself for more complex programs anyways (I don't like dashes, and only include them for --help -h) 23:46
ipatrol m: my $name = 'exclaim'; sub $name ($phrase) { say "$phrase !!!";} $($name)('hello'); 23:47
camelia 5===SORRY!5=== Error while compiling <tmp>
Missing block
at <tmp>:1
------> 3my $name = 'exclaim'; sub7⏏5 $name ($phrase) { say "$phrase !!!";} $
expecting any of:
new name to be defined
BooK firefish5000: it feels like some of the conversation there is about how it's too hard to implement 23:51
ipatrol BooK: it should be implemented since it's part of the POSIX standard 23:52
Either in-language, or as a stdlib
firefish5000 BooK, rather, hard to implement without adding ambiguity they believe doesn't currently exist. 23:53
teatime are long options even in posix 23:54
ipatrol teatime: come to think of it, they might not be. could be a GNU extension 23:55
teatime it is.
geekosaur long options are not in posix 23:56
ipatrol geekosaur: then they should be implemented as a stdlib like Python does, if the developers feel there is no good way to implement them using regular MAIN signatures 23:57
BooK irclog.perlgeek.de/perl6/2011-10-17#i_4578793 # many many programs have different CLI behaviour, so users have had to learn how their tools work for a long time
I think VMS did option parsing with the same lib for every program, but that's definitely not the case with unix 23:58
just think about tar, dd (whose options are in fact a reference to some other older program with crazy options)...
ipatrol BooK: I heard dd's syntax was originally meant as a joke 23:59
BooK ipatrol: yeah I read that too
ipatrol why no one has ever implemented at the very least an alternative syntax is beyond me