»ö« 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.
Geth_ whateverable: 8c3b7e5777 | (Aleks-Daniel Jakimenko-Aleksejev)++ | 2 files
sanify method reworked

Resolves issue #182. Tests needed.
00:01
00:01 unicodable6 left, unicodable6 joined, ChanServ sets mode: +v unicodable6
AlexDaniel /o\ wrong issue number /o\ 00:02
MasterDuke i haven't pulled, you could fix the comment and force push 00:04
AlexDaniel MasterDuke: but I did pull on the server already… I can reset HEAD^ maybe but uhhhh… 00:05
MasterDuke up to you
Geth_ whateverable: a08f2e0065 | (Aleks-Daniel Jakimenko-Aleksejev)++ | 2 files
sanify method reworked

Resolves issue #167. Tests needed.
See this discussion: irclog.perlgeek.de/perl6-dev/2017-...i_14890127
00:06
AlexDaniel well, done
MasterDuke cool 00:07
AlexDaniel well, it's better than hating myself for the rest of my life :) 00:08
00:08 Cabanossi left 00:09 Cabanossi joined 00:10 cdg joined 00:15 lizmat left, wamba left, cdg left 00:26 lookatme joined
lookatme morning 00:26
00:29 lizmat joined 00:30 dalek left, Actualeyes left 00:32 nadim left 00:36 BenGoldberg joined 00:39 ufobat left 00:40 unicodable6 left, statisfiable6 left, evalable6 left 00:41 bisectable6 left, committable6 left 00:42 benchable6 left, coverable6 left, quotable6 left, greppable6 left, bloatable6 left 00:45 alphah joined
alphah hello, What would be a good way to parse big files 10 GB by Grammar? 00:46
in terms of memory and speed 00:47
00:48 skids left
timotimo if you can, try to match it line-by-line or in chunks 00:49
00:50 skids joined
alphah timotimo how does Grammar parse file? does it read the whole file or line by line? 00:50
timotimo the whole file 00:51
and texts tend to become 4x the size because we do fancy unicode stuff
00:51 gdonald left
alphah so if I have 10 GB file and 8 GB memory the program will not run right? 00:51
00:52 Cabanossi left
timotimo correct 00:52
well, i don't think it forces all of it to be in memory at the same time, though it might fail to allocate anyway? 00:53
you can just try to slurp the file and see if the program explodes
(might want to save all open documents before you do this)
00:54 Cabanossi joined
alphah I will do this test later and see, but assuming memory allocation will fail, so what i need to do is to read the file by chunks and let Grammar parse each chunk alone,, or there is a way parse all chunks and produce one match data structure at the end? 00:56
timotimo you can create a match object manually and put the sub-matches in by hand 00:57
alphah ok, will look into that as well 00:58
Thanks timotimo 01:00
01:00 greppable6 joined, quotable6 joined, ChanServ sets mode: +v greppable6, ChanServ sets mode: +v quotable6, unicodable6 joined, bisectable6 joined, benchable6 joined, coverable6 joined, committable6 joined, evalable6 joined, bloatable6 joined, ChanServ sets mode: +v unicodable6, ChanServ sets mode: +v bisectable6, ChanServ sets mode: +v benchable6, ChanServ sets mode: +v coverable6, ChanServ sets mode: +v committable6, ChanServ sets mode: +v evalable6, ChanServ sets mode: +v bloatable6, statisfiable6 joined, ChanServ sets mode: +v statisfiable6 01:03 gdonald joined 01:06 stmuk_ joined, stmuk left 01:14 TEttinger left 01:18 cognominal joined 01:20 moei joined 01:21 statisfiable6 left, greppable6 left, quotable6 left, unicodable6 left, bisectable6 left, benchable6 left, coverable6 left, committable6 left, bloatable6 left, evalable6 left 01:23 Actualeyes joined 01:46 lizmat left 01:47 ilbot3 left 01:48 ilbot3 joined, ChanServ sets mode: +v ilbot3 01:52 Cabanossi left 01:54 Cabanossi joined 01:59 zoll left 02:00 lizmat joined 02:04 itaylor57 left 02:14 cdg joined 02:18 mr-fooba_ left 02:20 pilne left 02:27 cdg left 02:31 noganex_ joined
Geth ecosystem/japhb-Text-MiscUtils: 4ece62af66 | japhb++ (committed using GitHub Web editor) | META.list
Add japhb/Text-MiscUtils to ecosystem
02:31
ecosystem: japhb++ created pull request #351:
Add japhb/Text-MiscUtils to ecosystem
02:33 noganex left 02:37 mr-foobar joined 02:38 semigloss joined 02:42 moei left 02:52 Cabanossi left 02:54 Cabanossi joined, alphah left 03:05 cpage_ left 03:08 alphah joined 03:13 zoll joined, alphah left, Ben_Goldberg joined, BenGoldberg left, Ben_Goldberg is now known as BenGoldberg
Geth ecosystem: albastev++ created pull request #352:
Add Grammar::Modelica to ecosystem
03:24
03:32 alphah joined 03:36 shadowpaste left 03:41 Cabanossi left 03:42 shadowpaste joined 03:44 Cabanossi joined 03:50 Actualeyes left
Geth ecosystem: 4277fe5175 | albastev++ (committed using GitHub Web editor) | META.list
Add Grammar::Modelica to ecosystem

See github.com/albastev/Grammar-Modelica
03:53
ecosystem: eb49dc8c48 | Altai-man++ (committed using GitHub Web editor) | META.list
Merge pull request #352 from albastev/master

Add Grammar::Modelica to ecosystem
ecosystem/japhb-Text-MiscUtils: 4277fe5175 | albastev++ (committed using GitHub Web editor) | META.list
Add Grammar::Modelica to ecosystem

See github.com/albastev/Grammar-Modelica
ecosystem/japhb-Text-MiscUtils: eb49dc8c48 | Altai-man++ (committed using GitHub Web editor) | META.list
Merge pull request #352 from albastev/master

Add Grammar::Modelica to ecosystem
ecosystem/japhb-Text-MiscUtils: 245dddcb6b | Altai-man++ (committed using GitHub Web editor) | META.list
Merge branch 'master' into japhb-Text-MiscUtils
ecosystem: 4ece62af66 | japhb++ (committed using GitHub Web editor) | META.list
Add japhb/Text-MiscUtils to ecosystem
ecosystem: 245dddcb6b | Altai-man++ (committed using GitHub Web editor) | META.list
Merge branch 'master' into japhb-Text-MiscUtils
ecosystem: dac3c56c44 | Altai-man++ (committed using GitHub Web editor) | META.list
Merge pull request #351 from perl6/japhb-Text-MiscUtils

Add japhb/Text-MiscUtils to ecosystem
04:05 leah2 left 04:12 cpage_ joined 04:13 Cabanossi left 04:14 Cabanossi joined 04:21 khw left 04:27 skids left 04:39 Exodist left, Exodist joined 04:40 alphah left, TEttinger joined 04:41 semigloss left 04:45 zoll left 04:47 Actualeyes joined 04:58 bwisti left 05:08 espadrine joined 05:21 BenGoldberg left 05:22 xtreak joined 05:23 setty1 left 05:24 silug left, gdonald left 05:27 nadim joined 05:36 gdonald joined 05:42 lowbro joined, lowbro left, lowbro joined 05:47 wamba joined, leah2 joined 06:12 Cabanossi left 06:14 Cabanossi joined 06:22 xtreak left 06:25 TimToady left 06:26 nadim left 06:27 TimToady joined 06:35 r3m left 06:42 Cabanossi left 06:44 Cabanossi joined 06:52 domidumont joined 06:53 wamba left 06:56 nadim joined 06:58 domidumont left 07:00 domidumont joined 07:10 abraxxa joined 07:14 Cabanossi left, Cabanossi joined 07:18 ab6tract joined
ab6tract . 07:18
yoleaux 18 Jul 2017 22:00Z <lizmat> ab6tract: (g => -5).Bag === bag(), that's why, you probably want Mixes ?
ab6tract m: dd [(^)] ( g => 5 ).Mix, ( g => -5 ).Mix 07:19
camelia ("g"=>10).Mix
ab6tract .tell lizmat i see :)
yoleaux ab6tract: I'll pass your message to lizmat.
07:33 zakharyas joined 07:51 darutoko joined, rindolf joined 07:55 PerlJam left 07:57 spider-mario joined, wamba joined 08:01 dakkar joined 08:07 espadrine left
abraxxa zostay: are you interessted in debugging the DOM::Tiny install issue I've pasted yesterday? 08:22
08:23 dayangkun joined 08:38 robertle joined, domidumont1 joined, domidumont left 08:42 domidumont1 left 08:48 domidumont joined 09:08 TEttinger left, mcmillhj joined 09:12 Cabanossi left 09:13 mcmillhj left, dayangkun left 09:14 Cabanossi joined 09:26 xtreak joined 09:31 xtreak left 09:35 lookatme left
Geth ecosystem: 9f5533a520 | (Alexey Melezhik)++ (committed using GitHub Web editor) | META.list
Add Sparky - continues integration server.

Sparky is a continues integration server based on Sparrow/Sparrowdo ecosystem.
09:37
09:43 Cabanossi left 09:44 Cabanossi joined 09:45 xtreak joined 09:46 Actualeyes left 09:50 xtreak left 09:59 TimToady left 10:01 TimToady joined 10:14 Cabanossi left, Cabanossi joined 10:16 parv joined 10:21 lowbro left 10:22 eliasr joined 10:27 wictory[m] joined 10:33 rindolf left 10:44 Cabanossi left 10:45 Cabanossi joined 10:49 rindolf joined 10:54 lowbro joined, lowbro left, lowbro joined 10:56 parv left
nine Seeing print "Skip? "; my $do = <STDIN>; chomp $do; next if $do eq 'y'; really motivates me to port some of our scripts to Perl 6 ;) 11:10
11:28 wamba left, culb left 11:35 geekosaur left 11:37 geekosaur joined 11:56 mr-foobar left 11:58 mr-foobar joined 11:59 zakharyas1 joined 12:03 zakharyas left
Voldenet nine: actually, this line could be very similar to perl6 12:10
sub prompt { print shift; my $x = <>; chomp $x; $x }; next if prompt("Skip? ") eq "y" 12:11
the last part works in perl6 ;)
nine Voldenet: I know, but no one writes that if there's only a single prompt in the script. 12:12
The other part is MAIN subs and the auto generated usage message. That's sooo incredibly useful :) 12:13
Voldenet Yeah, that is awesome
but tbh, the thing I find the most useful in p6 so far is threading + threadpools + async + channels 12:14
it's so above the forking black magic from p5 12:15
nine And just this week I wrote this image cache cleaner daemon in Perl 6 because of builtin IO::Notification and IO awesomeness in general: gist.github.com/niner/b65597abab2b...e939421a44
jnthn Cute :) 12:18
12:19 wamba joined
nine Had to write this thing myself because I want to pass the name of the cache file off to nginx for delivery while all existing caching solutions would give me the file's content. But seriously, this was fun to implement :) 12:20
zostay abraxxa: sure
I'm interested. 12:21
abraxxa zostay: ok, I have also time now
zostay Oh, if you mean do I have time now? not really 12:22
ab6tract nine: why the use lib:from<Perl5> ? 12:23
abraxxa zostay: I guess I have some test env var set which triggers those tests to be run
nine ab6tract: it's part of our CMS's codebase and all included scripts do: use FindBin qw($Bin); use lib "$Bin/../lib"; 12:24
abraxxa zostay: it's test #6 of Test::META used in t/999-meta.t 12:25
zostay: 'Artistic' is not included in github.com/jonathanstowe/Test-META...nseList.pm 12:26
the version is missing
zostay: no idea why it doesn't fail here travis-ci.org/zostay/p6-DOM-Tiny#L2381 12:27
zostay But it is there, github.com/zostay/p6-DOM-Tiny/blob...META6.json 12:29
abraxxa zostay: there seems some other issue as github.com/zostay/p6-DOM-Tiny/blob...6.json#L25 reads "license" : "Artistic-2.0", mine "license" : "Artistic",
zostay That's my confusion 12:30
abraxxa zostay: see github.com/zostay/p6-DOM-Tiny/issues/2 12:32
12:32 zakharyas1 left 12:33 zakharyas joined
zostay I don't understand. Why is zef not installing the latest code from github? 12:35
nine zostay: zef update? 12:38
ab6tract nine: ah, i see :)
zostay abraxxa: ^^^ 12:39
abraxxa zostay: because you haven't released a new version?
zostay There's no release process. Have you tried a zef update? 12:40
abraxxa I hope that zef doesn't install just the current HEAD of master branch of a github repo! 12:41
currently trying
12:41 Grauwolf left, Grauwolf joined
timotimo it does if you use the modules.perl6.org ecosystem and don't give a tag or commit name 12:41
abraxxa yes, also fails after zef update
zostay It does until we get better build tools. Changing tags in the ecosystem is not practical imo 12:42
12:42 raschipi joined 12:43 wamba left
zostay Waiting for pause to become sop 12:43
12:43 Cabanossi left
nine zostay: why wait? 12:43
zostay Is there toolchain for it? 12:44
timotimo what's "sop" agains
nine zostay: Inline::Perl5 is already hosted on and installed from CPAN and I haven't heard any complaints. mi6 makes uploading just trivial 12:45
12:45 Cabanossi joined
nine timotimo: Standard Operating Procedures 12:45
timotimo lh
ah
zostay Then, how do we get zef to go there instead?
timotimo doesn't it prefer pause already? 12:46
zostay I will consider it when I get back to p6 stuff. 12:47
nine timotimo: yes it does 12:48
abraxxa ===> Found: DOM::Tiny:ver('0.3.3'):auth('github:zostay') [via Zef::Repository::LocalCache]
zef update doesn't change that
nine timotimo: at least if the version of the module on PAUSE is newer than what's listed in the ecosystem's META.list
12:49 mcmillhj joined
zostay I can bump the v# if that will help 12:49
abraxxa I expected DOM::Tiny:ver('0.3.3'):auth('github:zostay') using the tag '0.3.3' or a release with that version if installing from github 12:51
I've deleted ~/.zef/tmp and ~/.zef/store and trying again now
now it installed correctly 12:52
so zefs local cache handling is suboptimal
zostay v0.3.4 pshed 12:55
pushed
12:56 mr-fooba_ joined, MasterDuke left 12:58 mr-foobar left 13:00 lucasb joined
zostay releases through master tagged branches is the suboptimal part 13:00
13:02 domidumont left 13:03 domidumont joined
abraxxa zostay++ 13:12
Geth doc: 64912fb222 | (Brian Duggan)++ | doc/Language/py-nutshell.pod6
Mention that filter=grep in py-nutshell

Resolves #1420
13:13
abraxxa zostay: fails to install ;(
but that might be another zef bug 13:14
zef upgrade DOM::Tiny
13:18 ufobat joined 13:23 cdg joined
abraxxa it works when I again delete the zef store and tmp dir contents 13:24
13:24 bdmatatu joined 13:30 bdmatatu left 13:36 skids joined 13:47 rubio_terra joined 13:52 mr_ron joined 14:03 dolmen joined 14:11 zakharyas1 joined 14:12 zakharyas left 14:15 pmurias joined 14:21 Actualeyes joined 14:23 cdg left 14:25 lowbro left 14:29 perlpilot left 14:30 araraloren joined 14:33 araraloren_ joined
araraloren_ evening 14:34
pmurias araraloren_: evening
araraloren_ :) 14:35
14:35 bwisti joined
andrzejku araraloren_, hey 14:35
14:35 ab6tract left 14:36 araraloren left 14:39 perlpilot joined 14:54 wamba joined 14:57 nadim left, Cabanossi left 14:59 khw joined, Cabanossi joined 15:08 domidumont left 15:10 andrzejku left 15:11 domidumont joined
ugexe you cant have mutatate a version of a distribution and blame the cache 15:17
release by putting your github commit id in the source-url then 15:19
15:20 lizmat left 15:21 nadim joined, wamba left
raschipi He's pushing under the same version number and them expects zef to somehow know it changed? That's not how any of this works. 15:25
15:27 abraxxa left 15:28 abraxxa joined, alimon joined 15:30 lizmat joined 15:42 ChoHag left 15:46 colomon left 15:47 dj_goku joined 15:49 colomon joined 15:51 lizmat left 15:54 nhywyll joined 15:56 abraxxa left 15:59 lizmat joined 16:06 robertle left 16:07 colomon left 16:08 Skarsnik joined, nhywyll left
Skarsnik Hello 16:09
16:09 nightfrog joined
Skarsnik is there a way to have the variable of a for @ -> $ contruct writable? 16:09
jnthn <-> 16:10
16:11 cdg joined 16:12 dj_goku left, zakharyas1 left
Skarsnik I got an error 16:12
m: for 1..5 <-> $foo {;}
camelia Parameter '$foo' expected a writable container, but got Int value
in block <unit> at <tmp> line 1
Skarsnik do I need to declare the variable before so?
16:13 Cabanossi left, zakharyas joined, cdg_ joined
jnthn Oh, you can only do that if you actually have writable containers 16:14
Which you could if you had an array there
You'll need for 1.5 -> $foo is copy { }
Skarsnik Oooh
16:14 Cabanossi joined
Skarsnik yeah it was is copy 16:14
I tried is write xD
16:16 dj_goku joined, colomon joined, araraloren_ left 16:17 cdg left
Skarsnik Thx jnthn :) 16:19
16:21 domidumont left
jnthn
.oO( is rong )
16:22
16:30 zakharyas left
tony-o m: sub x { "x".say; }; sub y { "y".say; }; sub z {"z".say;}; &x.wrap(&y); &y.wrap(&z); z; 16:32
camelia z
tony-o is that right? 16:33
jnthn Looks like, you didn't change z?
&y.wrap(&z) means "wrap &y with &x" 16:34
grr
&y.wrap(&z) means "wrap &y with &z"
tony-o oops, i'm forgetting some stuff
was trying to simplify another issue, and forgetting some callsames 16:35
16:39 robertle joined 16:40 eliasr left 16:43 Cabanossi left 16:44 Cabanossi joined 16:45 mr_ron left
tony-o trying to track down: Cannot invoke this object (REPR: Null; VMNull) 16:47
while 'wrap'ing subs
gist.github.com/tony-o/458a31973a3...42ef943c9d 16:49
i can `dd $req` but i can't `$req.params<stuff>` without that exception 16:50
16:51 mr-fooba_ left, dubi0us joined
tony-o ahh..missing `multi sub` 16:55
16:58 pmurias left, mr-foobar joined, AlexDaniel left, ChoHag joined 17:02 dubi0us left 17:03 dubi0us joined 17:08 dubi0us left 17:11 itaylor57 joined 17:15 ChoHag left, colomon left
nadim o/ 17:18
is there a way to trace where a Seq is consummed ? 17:19
lizmat you mean, in a backtrace kind of way ? 17:21
nadim yes 17:23
I think the hardest thing in P6 is tracking consummed Seqs 17:24
that's made worse when a call to dd on a data structure makes things work!
17:24 fatguy joined
fatguy i have class required attribute like this 'has Int $!profileid is required;', and i initiate it like 'my $profile = ::(module)::Profile.new(profileid => 1);' 17:25
nadim so the "debugging" tool makes the bug go away.
fatguy but exception throwed "The attribute '$!profileid' is required, but you did not provide a value for it."
nadim $!var removes the accessor, no? 17:26
lizmat nadim: yes
hmmm... re consuming 17:27
17:27 |oLa| joined
lizmat nadim: do you actually have the Seq in a variable at some point ? 17:27
nadim lizmat: last entry was for fatguy. not sure but should'nt it be $.profile_id 17:28
17:28 Cabanossi left
nadim lizmat: I this case I put it directly in an array 17:28
lizmat: I this case I put the Seq directly in an array 17:29
lizmat that does make it clear where gets consumed, no ?
17:29 emeric joined
fatguy i tried $.profileid also, same result, confused... 17:29
lizmat if it's anything like "my @a = Iterable, it's the Array.STORE that consumes the Seq
17:29 Cabanossi joined
nadim here is the code nopaste.linux-dev.org/?1159866 17:30
I tried to peper it with .cache, i guess I have to try again
or maybe make a list out of it first 17:31
perlpilot m: class C { has $.profileid is required; }; C.new( profileid => 1 );
camelia ( no output )
lizmat nadim: I don't see the problem?
perhaps maybe precedence of ' ' ~ $foo ?
nadim later I get: This Seq has already been iterated, and its values consumed 17:32
perlpilot fatguy: There's probably a few things that you aren't telling us, but as you can see from the above example, it works if you use $.profileid
17:32 ufobat left
nadim and if I dump the array I get: @fs = [Seq.new-consumed(),] 17:32
lizmat ah, you're actually storing the Seq inside @fs[0], is that intentional? 17:34
17:34 Zoffix joined
Zoffix nadim: what version of Perl 6 you got? 17:34
nadim a week old or so
lizmat: yes the array contains a lists of Seqs 17:35
Zoffix nadim: ah ok. There was a massive bug with Seqs where methods failed to find cache that was fixed sometime in April
nadim Zoffix: then it's not that build it last week 17:36
I wrapped the whole thing in a ().cache and it seems to work
lizmat nadim: is there a reason you want to wait for the Seq to be consumed ? 17:37
nadim wait? I store the seq in an array, and later when the rendering is done the seqs are consummed
and the reason would be that i don't know who is going to consume them 17:38
either the normal dumper renderer or a DHTML generator
Zoffix nadim: I see you storing it in an array element. Shove .list after the map?
m: Seq.^lookup('iterator').wrap: -> | { say "touched in"; nextsame }; <a b c>.grep('a').say
camelia touched in
touched in
No exception handler located for catch
at <unknown>:1 (/home/camelia/rakudo-m-inst-1/share/perl6/runtime/CORE.setting.moarvm:print_exception)
from SETTING::src/core/Exception.pm:452 (/home/camelia/rakudo-m-inst-1/share…
Zoffix Unsure what exception it's whining about, but that'd be one way to trace where a seq is consumed 17:39
17:39 domidumont joined
Zoffix m: Seq.^lookup('iterator').wrap: -> | { say "touched in" ~ (callframe(-1).?name||''); nextsame }; sub foo { <a b c>.grep('a').say }() 17:39
camelia touched in
touched in
No exception handler located for catch
at <unknown>:1 (/home/camelia/rakudo-m-inst-1/share/perl6/runtime/CORE.setting.moarvm:print_exception)
from SETTING::src/core/Exception.pm:452 (/home/camelia/rakudo-m-inst-1/share…
Zoffix bah
nadim looks like something that's good to keep, I put this code somewhere 17:40
lizmat nadim: so that I understand: you basically have a dispatch table with blocks that close over some variables that depend on using a dumping renderer or the DHTML renderer ?
Zoffix nadim: there's also a list of all the methods that cache Seqs automatically: rakudo.party/post/Perl-6-Seqs-Drug...tothecache 17:42
nadim: but if you don't care about your Seq being a seq, just store in in an array or .List it to store it in a List form you can re-use until you're blue in a face
.map returns a Seq for example.. If you want to re-use that @fs[0] data, pop a .List on the end of your .map 17:43
17:44 deep-book-gk_ joined
nadim Zoffix: the problem is 80% due that I am hard headed, Yes I can put it in a list but it is actually a sequence as it is consummed once only, just trying to be a purist and regretting it. 17:44
fatguy perlpilot: the class does role, if i remove the does, it works. but i still can't figure it out 17:46
17:46 deep-book-gk_ left
nadim lizmat: I have a block of data, the data dump with colors separated from the string representation, that block has different type of consummers. DHTML, ANSI color dumper, Curses dumper 17:47
Zoffix .map returns a Seq for example.. If you want to re-use that @fs[0] data, pop a .List on the end of your .map
oops
nadim hehe
I'll probably end up making lists out of it because the curses dumper supports dynmic folding, so the Sequences will be consummed multiple times 17:49
lizmat that feels like a good idea 17:50
fwiw, Seqs should be mostly invisible
17:53 domidumont left
nadim even though I have not measured, I think it's also an efficiency problem, making Lists, Arrays, of a Seq must have a cost. 17:53
17:53 setty1 joined
nadim the dumper is already not fast enough for my taste, although not too bad. 17:53
Zoffix m: Seq.^lookup("iterator").wrap: sub (|) { say "touched in: "; for 3..20 { try say "\t -> {.name || <anon>} ({.file}:{.line})" with callframe($_).code }; put(); nextsame; }; sub foo { <a b c>.grep("a").say }() 17:54
camelia touched in:
-> CALL-ME (SETTING::src/core/Routine.pm:85)
-> cache (SETTING::src/core/Seq.pm:22)
-> gist (SETTING::src/core/Seq.pm:143)
-> gist (SETTING::src/core/Mu.pm:581)
-> say (SETTING::src/core/io_operators.pm:22)
-> say (SE…
Zoffix nadim: output's a bit verbose, but it does manage to mention to routine where the seq is being consumed: gist.github.com/zoffixznet/2c2b0ad...b65a1fd401
17:54 domidumont joined
nadim Zoffix: looks good to me 17:54
can always filter the list out 17:55
17:55 nhywyll joined
tony-o is blead on the fritz? 17:56
Zoffix m: gist.github.com/zoffixznet/02c6b10...32a9d907d2 17:58
camelia Not consumed yet
touched in:
-> CALL-ME (SETTING::src/core/Routine.pm:85)
-> foo (<tmp>:10)
-> <unit> (<tmp>:1)

ABCAlready consumed
touched in:
-> CALL-ME (SETTING::src/core/Routine.pm:85)
-> foo (<tmp>:10)
-> <unit> (<…
Zoffix hm, locally that SEGVs
on 2017.05-297-g608e886 17:59
This version also says when the seq is already consumed or not when its iterator is poked at: gist.github.com/zoffixznet/2c2b0ad...b65a1fd401 18:02
How to make your own Seqs: rakudo.party/post/Perl-6-Seqs-Drug...ll--Part-2 </shameless-plug> 18:03
nadim saving this for the cold days 18:04
Zoffix tony-o: probably won't help your case, but I think whenever you're using `wrap` you also need to put `use soft` in your code 18:05
18:05 |oLa| left
Zoffix There's also a whole bunch of tickets with .wrap exploding, especially in procompiled modules (search perl6.fail/ for "wrap"). Perhaps, try sticking `no precompilation`? 18:06
18:08 domidumont left
Zoffix zostay: zef already considers stuff on pause when looking for the newest dist. App::Mi6 supports uploading dists to PAUSE. And "soon enough" modules.perl6.org will list CPAN dists too 18:09
18:10 |oLa| joined, vendethiel joined
tony-o Zoffix++ - i'll give that shot when i finish nuking p6, getting something about a grapheme when i just run perl6 -e '"hi".say;' 18:14
Zoffix: would i do 'no precompilation' in the module doing the wrapping, the consumer of the module, or both? 18:15
Zoffix jsimonet: you're just misinterpreting the result. There's nothing illegal in `3.3/0` you get back a Rat that's got `33` as numerator and `0` as denominator. The explosion happens when you try to get the Str view of that Rat which does try to divide 33 by 0. The error can probably be improved by saying the division is happening in a Rat :/
tony-o: no idea. Try all three cases?
m: say (3.3/0).nude 18:16
camelia (33 0)
tony-o Zoffix: thanks for the info
is soft preventing all subs in that file from being inlined? 18:18
Zoffix I think so
18:18 u_nuSLASHkm8 joined
tony-o so, maybe methods that don't need to be wrapped should be elsewhere 18:19
18:20 SourceBaby left
Skarsnik is there something nice to plot graph from p6 data? x) 18:20
18:20 u_nuSLASHkm8 left
tony-o Skarsnik: a module? 18:22
github.com/azawawi/perl6-graphics-plplot #maybe? 18:23
Zoffix ChristopherBottoms, that issue sounds like your zef is way outdated, as it was a bug in it that got fixed I think some time in spring. Are you sure your system is using the RC Star's zef and not some other one you had installed previously? 18:24
Skarsnik let's try github.com/colomon/Benchmark-Plot maybe
ugexe Skarsnik: perlgeek.de/blog-en/perl-6/2017-01...ython.html "Perl 6 By Example: Plotting using Matplotlib and Inline::Python" 18:25
18:27 Cabanossi left
Skarsnik Not sure how useful it can be : gist.github.com/Skarsnik/9052b9a5b...0d267f0a60 but there is a weird drop of perf after 2017.02 18:27
Zoffix Without code it's pretty useless :) 18:29
18:30 Cabanossi joined
Zoffix Might as well say "some things got slightly slower" 18:30
Zoffix &
18:30 Zoffix left 18:31 dubi0us joined 18:35 dubi0us left 18:36 andrzejku joined 18:37 dubi0us joined
Skarsnik The code is just a call to Gumbo (C lib) to parse an signifiant html file (11k elements) then transforming then in Perl 6 object, so basicly it's recursly goes through the C struct then creating XML perl6 object. 18:38
lizmat Skarsnik: does --profile give any clues ? 18:39
Skarsnik The time on this test is after the call to the C lib from the end of the creation of all the object
18:39 fatguy left
Skarsnik What rekudo version should I use? or do you want a --profile for each version (it's the average time of 50 executions) 18:41
18:41 dubi0us left
Skarsnik I guess I could run this stripping the XML object creation to compare 18:42
lizmat Skarsnik: any help in finding why the performance dropped, would be welcome :-) 18:43
18:43 dubi0us joined 18:46 |oLa| left, |oLa| joined 18:48 dakkar left, dubi0us left
Skarsnik anyways to exit a when statement? 18:49
18:50 dubi0us joined 18:52 TEttinger joined
lizmat Skarsnik: alas, "leave" is not yet implemented 18:53
m: when 42 { leave } 18:54
camelia ( no output )
lizmat m: $_ = 42; when 42 { leave }
camelia leave not yet implemented. Sorry.
in block <unit> at <tmp> line 1
zostay m: given 'foo' { when 'foo' { say 'A'; proceed; say 'B'; } }
camelia A
18:54 dubi0us left
lizmat TIL proceed 18:55
18:56 dubi0us joined
zostay there's also succeed which is pretty much the same, but lets you give it an argument which becomes the result for the given {} 18:58
i don't think i've actually used either in code
i tend to prefer multis to given blocks
18:59 hythm joined
hythm Hi 18:59
m: grammar Log { token TOP { <alnum>+} }; class LogAction { method TOP($/) { say $v } }; sub MAIN($v) {} 19:00
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '$v' is not declared
at <tmp>:1
------> 3 class LogAction { method TOP($/) { say 7⏏5$v } }; sub MAIN($v) {}
19:00 dubi0us left
hythm I want to use $v variable (reading it from command args, in LogAction method 19:00
how can I do that? 19:01
19:02 dubi0us joined
hythm grammar Log { token TOP { <alnum>+} }; class LogAction { method TOP($/) { say $v } }; sub MAIN($v) {my $m = Log.parse("hello", actions => LogAction.new)} 19:05
tony-o Skarsnik: is that not specific to benchmarking? 19:06
19:07 dubi0us left
Skarsnik What do you mean? x) 19:07
19:08 dubi0us joined
tony-o Benchmark::Plot 19:10
19:11 domidumont joined
andrzejku hey 19:11
how can I check operation system 19:12
nine $*KERNEL.name 19:13
19:13 dubi0us left
raschipi m: say $*KERNEL.name 19:13
camelia linux
nine $*VM.osname takes only half the time though ;) 19:14
andrzejku oh thnks actually I tried to find some globals description in
documentation but it was hard ;d
raschipi There's $DISTRO.name too.
19:15 dubi0us joined
zostay andrzejku: for future reference: docs.perl6.org/language/variables#..._variables 19:15
Skarsnik tony-o, Oh right, well I am doing some benchmark ^^ 19:16
zostay i meant to click on dynamic variables, tho
raschipi andrzejku: If you want to detect if it's windows, there's $*DISTRO.is-win 19:17
19:17 futura left
hythm I'll rephrase my question, hopefully this time I be more clear: how to pass a command line arg variable to grammar action method? 19:18
19:19 tinyurl_comSLASH joined, dubi0us left 19:21 dubi0us joined, tinyurl_comSLASH left
tony-o Skarsnik: ah 19:23
19:24 domidumont left 19:25 dubi0us left
zostay hythm: just add a has $.v to LogAction and pass that through and change the referenced far to $!v or $.v 19:26
19:26 lucasb left
zostay m: grammar Log { token TOP { <alnum>+} }; class LogAction { has $.v; method TOP($/) { say $.v } }; sub MAIN($v) {my $m = Log.parse("hello", actions => LogAction.new(:$v))} 19:26
camelia Usage:
<tmp> <v>
zostay m: grammar Log { token TOP { <alnum>+} }; class LogAction { has $.v; method TOP($/) { say $.v } }; sub main($v) {my $m = Log.parse("hello", actions => LogAction.new(:$v))}; main(42) 19:27
camelia 42
19:30 tinyurl_comSLASH joined 19:32 tinyurl_comSLASH left 19:34 dalek joined, ChanServ sets mode: +v dalek
hythm Thanks zostay, That what I needed 19:34
19:38 darutoko left, wamba joined 19:40 dubi0us joined 19:41 dubi0us left, dubi0us joined 19:44 SourceBaby joined, ChanServ sets mode: +v SourceBaby
andrzejku hey guys who to get %APPDATA% variable on windows? 19:44
Skarsnik probably @*ENV ? 19:46
or %*ENV
lizmat, I started the benchmark script again to do 100 iterations instead of 50, I will check to have profile for each rakudo release tommorow, since this will take a while 19:47
andrzejku how to run external command?
Skarsnik shell "command" 19:48
there is lot of way
19:48 synopsebot6 joined, ChanServ sets mode: +v synopsebot6
andrzejku Skarsnik okay thnks I got it 19:48
srry
19:48 Xliff left
Skarsnik my $proc = shell "PERL6_GUMBOLIB=/usr/local/lib/libgumbo.so.1 " ~ $file.IO.path ~ '/install/bin/perl6 ' ~ $torun, :out; 19:49
for $proc.out.lines -> $line {
do stuff with the output}
for an example 19:50
perlpilot raiph++ I just read your answer to the .bib parsing question on SO. That could almost be a whole chapter in a Perl 6 book.
19:52 rindolf left
zostay i usually prefer to run instead to avoid involving the shell if i can 19:52
Skarsnik yes, but it's more tedious to call
zostay m: run "ls"
camelia run is disallowed in restricted setting
in sub restricted at src/RESTRICTED.setting line 1
in sub run at src/RESTRICTED.setting line 14
in block <unit> at <tmp> line 1
Skarsnik since you have to pass each arguments separatly
And I was not sure how to easily pass the PERL6_GUMBOLIB tibbit easily in this case 19:53
19:53 dct joined 19:54 dubi0us left
andrzejku Skarsnik what does it mean Str:D ? d? 19:54
Skarsnik Defined
zostay m: my $f = "foo.txt; rm *"; shell "cat $f"; # why i don't use shell
camelia shell is disallowed in restricted setting
in sub restricted at src/RESTRICTED.setting line 1
in sub shell at src/RESTRICTED.setting line 15
in block <unit> at <tmp> line 1
lizmat m: say "foo" ~~ Str 19:55
camelia True
lizmat m: say "foo" ~~ Str:D
camelia True
lizmat m: say Str ~~ Str
camelia True
lizmat m: say Str ~~ Str:D
camelia False
zostay i don't trust that any particular use of shell will never ever involve user input
19:55 dubi0us joined 19:56 rindolf joined
Skarsnik m: say Str ~~ Str:U; 19:56
camelia True
zostay m: say "foo" ~~ Str:_; say Str ~~ Str:_; say Str:D ~~ Str:_; say Str:U ~~ Str:_; 19:58
camelia True
True
True
True
Skarsnik :_? 20:01
lizmat :_ is the same as absence 20:02
so Str:_ is the same as Str
zostay it's there for java programmers who are used to stating every tiny detail explicitly (*ducks out*) 20:03
lizmat but Str might be different in some contexts in the future, when a pragma like "use default :D" might force Str to be Str:D
*then* you would need :_ to force either defined or undefined
Skarsnik I wish there was a pragma to force type checking of method/sub at compile time x)
lizmat type checking of subs already happens at compile time 20:04
Skarsnik I am pretty sure 99% of program never add method at runtime
lizmat m: sub a(Int $a) {}; a "foo"
camelia 5===SORRY!5=== Error while compiling <tmp>
Calling a(Str) will never work with declared signature (Int $a)
at <tmp>:1
------> 3sub a(Int $a) {}; 7⏏5a "foo"
lizmat Skarsnik: with role composition, this may be easier to do than you think 20:05
m: my $a = 42 but role { method gist() { "foo" } }; say $a
camelia foo
Skarsnik but probably will force the compiler to check more stuff? 20:06
lizmat the whole idea of spesh / JIT is that code needing optimization for a particular run of a program will get optimized on the fly
Skarsnik It's more for type checking/Validation that optimisation for me 20:07
20:10 Manifest0 left 20:11 Manifest0 joined 20:12 itaipu joined
andrzejku hi I got a problem 20:14
Failed to copy file: illegal operation on a directory why I cann't copy to directory
with IO:Path
geekosaur probably it's being literal and requires a filename, not a directory name, as the destination 20:16
Skarsnik dunno, what function did you use?
andrzejku X::IO::Copy 20:17
20:18 itaipu left
geekosaur docs.perl6.org/type/IO::Path#routine_copy and it looks to me like it does not support the common idiom where the destination is a directory and a file with the same basename as the original is created 20:19
20:21 dubi0us left 20:22 dubi0us joined
andrzejku geekosaur I just take basename 20:25
:)
20:25 dubi0us left
andrzejku but it could be fixed in the future 20:25
usually people copy to dir 20:26
i suppose
geekosaur if you think it should be changed, file a rakudobug 20:27
I suspect that this is the lower level operation and it might be best to reserve that behavior for a higher level one. 20:28
andrzejku ok
geekosaur and users should use the higher level one because they often care about metadata that the lower level one will not handle for them
permissions, extended attributes, etc. 20:29
andrzejku geekosaur I need to go
so :D
thnks for info and bye
20:30 andrzejku left 20:36 emeric1 joined 20:38 emeric left, emeric1 is now known as emeric 20:42 ChoHag joined 20:44 Guest21359 is now known as matt_ 20:46 emeric left 20:57 Skarsnik left 21:01 devmikey joined 21:04 AlexDaniel joined
tony-o .when leont 21:05
geekosaur .seen leont 21:07
yoleaux I saw leont 10 Jul 2017 12:02Z in #perl6: <leont> Would I need a rakudobrew build-zef? Or can I assume it's already there?
tony-o .tell leont - i'm looking into it but on moar-blead i'm getting 'Iteration past end of grapheme iterator' on all tests for YAMLish 21:09
yoleaux tony-o: I'll pass your message to leont.
tony-o ty geekosaur
21:10 robertle left 21:13 skids left 21:18 rindolf left, mcmillhj left 21:21 |oLa| left 21:22 pmurias joined 21:23 pilne joined 21:35 giraffe left 21:37 committable6 joined, ChanServ sets mode: +v committable6, bisectable6 joined, benchable6 joined, coverable6 joined, bloatable6 joined, unicodable6 joined, greppable6 joined, evalable6 joined, quotable6 joined, ChanServ sets mode: +v bisectable6, ChanServ sets mode: +v benchable6, ChanServ sets mode: +v coverable6, ChanServ sets mode: +v bloatable6, ChanServ sets mode: +v unicodable6, ChanServ sets mode: +v greppable6, ChanServ sets mode: +v evalable6, ChanServ sets mode: +v quotable6
hythm hello, I'm writing a script to parse large files, the script parses http log files and create a hash of each domain and the status code. I'm using Grammar to parse the file line by line, but can't figure out how to gather all data from each line in one hash. any idea how to do that? here is the code gist.github.com/hythm7/f80b2d291df...437b72fcef 21:44
jnthn hythm: I'd probably write an actions class with a hash attribute, and write the action method that is called after each line to insert into the hash 21:45
hythm jnth, I tired that, (probably i did it wrong), beacuse when i try to print the hash at the end i find it empty,, then I commented these hash lines in the code gist above 21:48
will look into that more and will try to do it right this time 21:52
21:55 pecastro left 21:58 imcsk8 left, imcsk8 joined 22:01 pecastro joined
raiph perlpilot: Thank you so much for reading it and giving me that feedback. :) 22:05
22:08 zoll joined
raiph moritz: if you're allowed to use bits from SO given an author's permission, and if any of stackoverflow.com/a/45181464/1077672 is useful for your regex book, feel free to copy whatever you want (cf perlpilot's comment) 22:10
22:28 Cabanossi left 22:29 Cabanossi joined 22:31 setty1 left, BenGoldberg joined 22:36 pmurias left 22:39 dolmen left 22:50 cdg_ left 22:54 nhywyll left 23:10 dct left 23:21 nadim left 23:24 bartolin left 23:28 MasterDuke joined 23:31 bartolin joined 23:33 skids joined 23:59 Cabanossi left, Cabanossi joined