»ö« 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 hm, for some reason it stopped working. I run `resume` and it doesn't break at the breakpoint 00:00
00:00 mcmillhj joined
Zoffix 1) start the script; 2) start moar-remote; 3) type `assume thread 1`; 4) type `breakpoint "src/Perl6/World.nqp" 4240 1 1`; 5) type resume 00:01
Ah, it was a blank line in the code; I guess it gets eliminated 00:02
timotimo yeah, there's a missing feature
since we lazily deserialize frames and such, we don't immediately know what lines are even there to begin with 00:03
so currently we just accept anything the user throws at us
Zoffix still says lexicals 0; gonna try with --optimize=off... That's for rakudo, not MoarVM, right?
timotimo what we'll want to have is a way to figure out if setting a breakpoint on a given line that's a "hole" would want the previous or the next line, because it could be right on a routine boundary for example
that's for rakudo, yes
that should disable lexical-to-local lowering 00:04
in the future we'll be able to inspect locals, too, but that's a bit tricky
since at the time we're past the compiler, the names will have gone, and we'll have one register potentially storing the values for different local variables at different points in the bytecode
that'll be a bit of design work
anyway, yeah :) 00:05
00:05 mcmillhj left 00:07 vcv joined
timotimo oh, be warned: stepping is currently ... underimplemented 00:10
only "step into" actually does anything, and backtraces have super weird line numbers more than half the time
thankfully, "step into" is also what it does when you just "step" 00:11
00:13 skids joined
Zoffix Well, it still says no lexicals. And all lexicals says "Frame 0" is can_has_coercers, which is the method I got my variable's at: gist.github.com/zoffixznet/ed56853...-p6-p6-L23 00:13
But I don't see it anywhere in all lexicals: gist.github.com/zoffixznet/2bf444e...73c2498960
00:14 mcmillhj joined
timotimo hm, perhaps the $/ in number 213 is good enough? 00:14
since it'd mostly have parts of itself passed down to other action methods? 00:15
i do agree this sucks, though
i was close to implementing getting the arguments to any frame, but man our argument passing code is weird and i am too flu'd up to do well at this
Zoffix Ah right
I'm sick now too. I think I caught it from you!! 00:16
:)
timotimo nnnoooooooooo
was it because you forked my code? :<
isn't this how bacteria spreads? by forking themselves?
skids
.oO(why I so rarely go to cons)
00:17
timotimo not actually sure whether i have a flu or a cold or whatever
i.e. bacterial or viral. none of this matters right now!
Zoffix timotimo: "once you have an object you're interested in". How do I get it? What's between `all lexicals` and `metadata` commands? 00:18
00:19 mcmillhj left
Zoffix Ah, the handle 00:19
00:19 comborico1611 left, markong left
Zoffix hahaha "p6opaque_ass_delegate" 00:19
and "p6opaque_body_replaced" 00:20
Do I want the ass or the body? ^_^
skids I hereby delegate my ass to...
Zoffix Well, metadata gave me stuff, but I don't know what's next: gist.github.com/zoffixznet/99bf8de...f54dd0ed37 00:21
timotimo you'll want "attributes 425" 00:22
the words that show up in the features field are also commands you can use on handles
Zoffix timotimo: what's next? gist.github.com/zoffixznet/9a028cb...9efef80d2a 00:23
timotimo looks like you want 430 and 431, the first one will let you "positionals", the second one will let you "associatives" 00:24
Zoffix Or is that it? It's an empty array which is why it was giving me null before? But then I don't get how that .dump turned up :/
Oh, wait we're dumping $/, not $target-el 00:25
timotimo here's where i'd love to tell you you can "reverse-cont", but time-travelling debugging is really not easy
Zoffix wait, it's working!! :D 00:26
timotimo YES! /o\
00:28 mcmillhj joined
timotimo if you do stuff with the debugger in the future, please be aware that having a handle on something will cause that object to be kept alive until the handle is released 00:28
releasing lots of handles is of course currently totally awkward :P
unless you "release all keep 1 2 3 4" (which only refers to the last command that gave you handles) 00:29
Zoffix Ohhhhhh. Now I freaking get it 00:31
It's a <colonpair> with an empty key,
timotimo this is potentially the first bug that really got nailed with the debug remote
Zoffix :D 00:32
timotimo i might already be asleep when celebration commences
00:33 mcmillhj left
Zoffix recompiles to see if the debugger was right :) 00:33
00:33 dugdig joined
timotimo the big strength of the debug remote will be that it'll reduce re-compile cycles to hopefully about 10% or something :D 00:36
Zoffix uhh, nope. I think I added a `[0]` that shouldn't be there 00:38
Zoffix re-tries
Herby_ timotimo: that's awesome :) 00:40
Zoffix oh, I may have misread the debugger... Re-reading the session and I don't see where I got the empty key from :P
timotimo oh no :< 00:41
00:42 mcmillhj joined 00:47 mcmillhj left, athenot left
timotimo sloop time 00:49
00:57 vcv left 00:58 zachk left, mcmillhj joined, pharv left 00:59 pharv joined 01:03 pharv left, mcmillhj left
Zoffix .tell timotimo I followed the debugger's trace and got the code to work :) Success! 01:05
yoleaux Zoffix: I'll pass your message to timotimo.
01:11 albongo left 01:14 mcmillhj joined 01:19 mcmillhj left 01:38 undersightable6 joined 01:41 mcmillhj joined 01:45 mcmillhj left 01:47 ilbot3 left 01:49 pharv joined 01:54 pharv left 01:56 ilbot3 joined, ChanServ sets mode: +v ilbot3 01:57 mcmillhj joined 02:00 aa_ joined
aa_ hello anybody here 02:01
SmokeMachine m: use Test; is now.Int - 37, time # why now is 37 seconds greater then time?
camelia ok 1 -
02:02 aa_ left, mcmillhj left 02:07 mcmillhj joined
geekosaur o.O 02:08
02:12 notostraca is now known as TEttinger, mcmillhj left
[Coke] leap seconds? 02:20
skids ehhhh.... now that's.... strange? 02:26
[Coke] en.wikipedia.org/wiki/Leap_second - look at Current TAI − UTC
skids Oh. 02:27
[Coke] still weird and I'm guessing needs more docs. :)
02:27 mcmillhj joined
SmokeMachine shouldn't it be 1 second? 02:27
hum!!! 37 leap seconds! 02:28
02:33 mcmillhj left
Geth doc: 272759f786 | (Zoffix Znet)++ | doc/Language/terms.pod6
Point out leap sec diff between `now` and `time`
02:35
synopsebot Link: doc.perl6.org/language/terms
02:37 quotable6 joined 02:38 kurahaupo left 02:40 mcmillhj joined 02:45 mcmillhj left
skids wonders if there is a name for the time interval between leap seconds akin to "age"/"era" 02:45
could be a fun "geek code a" extension... "what leap second were you born under"? 02:51
[Coke] I was born before leap seconds. :| 02:53
02:56 mcmillhj joined 02:57 ufobat___ joined
skids Well, TAI started with 10 retroactive seconds embedded... before even those? 02:59
03:00 mr_ron left 03:01 mcmillhj left, ufobat_ left 03:12 mcmillhj joined, eliasr left
SmokeMachine do you guys thinks this (github.com/FCO/test-time) make any sense? 03:14
s/thinks/think/
03:17 mcmillhj left 03:18 mr_ron joined 03:22 mcmillhj joined 03:27 mcmillhj left
skids Could be useful. Do we currently have any tests that have the VM lie about time? 03:29
SmokeMachine Not that I know... but I have a module test flopping because sleep some times waits to much... so I thought to use something like this... 03:31
03:33 mcmillhj joined 03:37 mcmillhj left 03:44 kybr left 03:47 mcmillhj joined 03:52 mcmillhj left 03:56 skids left 04:03 mcmillhj joined 04:07 mr_ron left 04:08 wamba joined, mcmillhj left 04:11 tt left 04:16 mcmillhj joined 04:17 khw left 04:19 Actualeyes joined 04:20 mcmillhj left
Herby_ beginner question... 04:31
04:31 dct joined
Herby_ github.com/nxadm/rakudo-pkg/blob/m.../README.md 04:32
half way down the page it talks about adding perl6/rakudo to a .travis.yml file
at a highlevel, what is the purpose of that .travis.yml file?
04:32 mcmillhj joined 04:37 mcmillhj left 04:42 herby__ joined, herby__ left 04:48 mcmillhj joined 04:53 mcmillhj left 05:03 mcmillhj joined 05:04 jmerelo joined
Herby_ disregard the question above :) 05:07
jmerelo Herby_: I'm going to do a pull request anyway to make clear it's for continuous integration using Travis (and other CI systems that use it too) 05:08
05:09 mcmillhj left, dct left
Herby_ jmerelo: thanks! 05:10
05:10 sauvin joined 05:11 aindilis left 05:15 mcmillhj joined
jmerelo Herby_: What documentation did you check for the profiler? (from irclog.perlgeek.de/perl6/2018-04-11#i_16032533) 05:19
05:20 mcmillhj left
Herby_ jmerelo: the "profile locally" section on this page docs.perl6.org/language/performance 05:20
I was thinking that a "the most basic example of how to profile" might be useful for beginners that stumble upon it 05:21
i initially saw all that sql stuff and my eyes glazed over
but its likely not a problem for non-novices
jmerelo Herby_: can you please write an issue for that? We'll try to fix it.
Herby_: well, nowadays with NoSQL and everything not everyone knows sql... 05:22
Herby_: This line "To learn how to interpret the profile info, use the prof-m: your code goes here evalbot (explained above) and ask questions on the channel." is kinda "Leave interpretation to the adults, don't even try..." 05:23
Herby_: so please create an issue in perl6/doc
github.com/perl6/doc/issues
Herby_ jmerelo: will do. I'm still a bit new to contributing to open source but tomorrow I will see if I can create a simple example of how to profile locally, and I will submit an issue for that blurb you mentioned 05:24
I'm off to bed
jmerelo Herby_: Thanks! 05:25
Herby_ i'll idle in the channel, so if there are any other low-hanging fruit you'd like to be try and resolve, just let me know :)
o/
jmerelo Herby_: thanks again :-)
See you tomorrow 05:26
05:26 mcmillhj joined 05:31 mcmillhj left 05:34 robertle left, wamba left 05:45 mcmillhj joined 05:50 mcmillhj left 06:02 wamba joined 06:04 mcmillhj joined, brrt joined 06:09 mcmillhj left 06:12 HaraldJoerg joined 06:13 espadrine_ left 06:15 mcmillhj joined 06:19 mcmillhj left 06:21 robertle joined 06:22 aindilis joined 06:28 tyil joined 06:29 mcmillhj joined
jmerelo tyil: your PR to linguist is on github.com/github/linguist/pull/4083 06:30
tyil jmerelo: thanks for the headsup
I just woke up though (about 5 minutes ago)
jmerelo tyil: I don't know what's left there. Everything seems to be OK. You're probably aware of this github.com/github/linguist/pull/33...-380467950 06:31
tyil I was aware of the PR, not of the latest comments 06:32
06:34 mcmillhj left
jmerelo asks everyone to StackOverflow it! blogs.perl.org/users/jj_merelo/2018...-that.html 06:34
tyil jmerelo++ 06:35
06:37 brrt left 06:38 brrt joined, AlexDaniel left 06:40 domidumont joined 06:41 darutoko joined 06:42 mcmillhj joined 06:45 rindolf joined 06:47 domidumont left, mcmillhj left, mr_ron joined 06:48 domidumont joined
AlexDaniel` weekly: > * jmerelo (IRC) asks everyone to StackOverflow it! blogs.perl.org/users/jj_merelo/2018...-that.html 06:54
notable6 AlexDaniel`, Noted!
06:57 mcmillhj joined 07:02 mcmillhj left 07:04 |oLa| joined 07:09 mcmillhj joined 07:14 mcmillhj left
Geth doc: 44eebac07c | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Language/modules.pod6
Remove incorrect information about deprecation of p6c

Missed during review of the original PR
  github.com/perl6/doc/pull/1647
07:18
synopsebot Link: doc.perl6.org/language/modules
07:19 domidumont left 07:20 domidumont joined 07:21 domidumont1 joined 07:22 mcmillhj joined 07:23 imcsk8_ is now known as imcsk8 07:24 domidumont1 left, domidumont left, imcsk8 left, imcsk8 joined 07:25 domidumont joined 07:27 mcmillhj left, pharv joined 07:32 pharv left
Geth doc: c28d37b262 | (JJ Merelo)++ | doc/Language/modules.pod6
Adds .pod6 to the list of extensions, closes #1919
07:33
synopsebot Link: doc.perl6.org/language/modules
07:37 mcmillhj joined 07:40 dakkar joined 07:42 mcmillhj left 07:50 AlexDaniel joined 07:51 ufobat___ is now known as ufobat 07:52 mcmillhj joined
ufobat is this supposed to work: glot.io/snippets/f01j72rq12 (It's an Inline::Perl5 question) 07:52
07:54 scimon joined
moritz ufobat: maybe related to github.com/niner/Inline-Perl5/issues/102 ? 07:55
07:56 zakharyas joined, araujo left, mcmillhj left
ufobat *Shrug* 07:57
moritz shrugs back 07:59
08:05 xinming_ joined 08:08 mcmillhj joined, xinming left 08:13 mcmillhj left 08:23 kurahaupo joined 08:27 mcmillhj joined 08:29 Zoffix left 08:32 mcmillhj left 08:34 wamba left 08:38 wamba joined 08:44 mcmillhj joined
buggable New CPAN upload: P5lc-0.0.3.tar.gz by ELIZABETH cpan.metacpan.org/authors/id/E/EL/...0.3.tar.gz 08:44
08:49 mcmillhj left 08:53 vike left 08:54 mcmillhj joined
buggable New CPAN upload: P5lcfirst-0.0.4.tar.gz by ELIZABETH cpan.metacpan.org/authors/id/E/EL/...0.4.tar.gz 08:54
08:57 zakharyas left, zakharyas joined 08:59 mcmillhj left 09:04 vike joined
buggable New CPAN upload: P5index-0.0.3.tar.gz by ELIZABETH cpan.metacpan.org/authors/id/E/EL/...0.3.tar.gz 09:04
09:06 TEttinger left 09:09 mcmillhj joined 09:11 markong joined 09:14 mcmillhj left 09:15 Actualeyes left 09:24 mcmillhj joined 09:29 pharv joined, sena_kun joined, mcmillhj left 09:30 llfourn left 09:33 pharv left
Ulti are commits welcome on the docs.perl6.org output format? Im getting really annoyed with the table of contents being this huge thing I have to scroll through to get to the meat of the article when it could just be rendered in the endless white space I have either side of the 800px fixed width content 09:35
09:37 mcmillhj joined
Ulti "Routines supplied by class Any/Mu" are especially annoying 09:39
ufobat personally i'd like your idea :) 09:40
09:42 mcmillhj left 09:43 rindolf left
El_Che Ulti++ 09:49
Ulti: thx a lot. It didn't bother me bofore, but it does now :)
timotimo i'm amazed, github will let me commit directly to someone's branch that's the base for a pull-request i have? 09:50
yoleaux 01:05Z <Zoffix> timotimo: I followed the debugger's trace and got the code to work :) Success!
09:50 wamba left
Ulti El_Che: now I've mentioned it and ruined the illusion, or its gotten worse for you recently 09:52
Im not sure if something has changed because its only started annoying me more recently
Geth doc: 72c2b9019c | (Zoffix Znet)++ | assets/sass/style.scss
Collapse to TOC-on-a-side layout on narrower widths
09:54
09:55 zakharyas left 09:56 zakharyas joined
Ulti dun dun dun 09:57
Zoffix++ as Im assuming that will tweak it for me 09:59
09:59 rindolf joined
Ulti I was just getting interested in pod to bigpage and how all the docs are built :3 09:59
El_Che Zoffix is omnipresent
Ulti ask and ye shall receive 10:00
El_Che "Do my laundry"
Ulti hah
El_Che nope
Ulti "I would really like perl6 --deep-auto-code=doitforme
jast I'm pretty sure the result would look like code without actually doing anything sensible :) 10:02
Ulti I dunno you could make it like google translate where one deep net just looks at Perl 5 on CPAN and creates a percept that the perl6 network can then generate code from 10:03
even if it got close thats nicer than an empty file
jast I kind of like the minimalism of an empty file ;) 10:06
10:06 zakharyas left 10:07 zakharyas joined, wamba joined 10:08 wamba left
Ulti it never fails to compile either 10:08
10:11 broquaint joined
jmerelo Ulti: You're not the only one github.com/perl6/doc/issues/1916 10:11
10:11 zakharyas left
jmerelo Ulti: and yes, pull requests are _very_ welcome. 10:12
Ulti well I just got a clone of the repo to play with
jmerelo Ulti++ 10:13
Ulti I think Zoffix just "fixed" the major problem of vertical space
jmerelo Ulti: please bear in mind that there's a mapping from repo-to-site that is not totally straightforward. And it's called htmlify.p6
Ulti yeah I saw in the makefile
and that the html is a little bit interlaced with the structure of the docs 10:14
10:14 zakharyas joined, rindolf left
jmerelo Ulti: That's correct. You can voice your support in the issue, too. That way if we eventually decide to change that we'll have enough arguments to do it. 10:14
Ulti will do 10:15
jmerelo Ulti: thanks! :-)
10:16 wamba joined 10:17 zakharyas left
Ulti oh man Zoffix++ that change already hit the server 10:18
so much nicer
jmerelo Zoffix: maybe you can do github.com/perl6/doc/issues/650 as long as you're dealing with that? 10:20
Geth ¦ doc: JJ self-unassigned Squished table cells on mobile github.com/perl6/doc/issues/650
jmerelo (I can self-assign it again if not)
mr_ron .tell moritz could you please look at irclog.perlgeek.de/perl6/2018-04-11#i_16036613 10:25
yoleaux mr_ron: I'll pass your message to moritz.
10:28 zakharyas joined 10:30 mcmillhj joined 10:32 zakharyas left, brrt left 10:33 zakharyas joined 10:35 mcmillhj left 10:37 sena_kun left 10:38 sena_kun joined 10:39 sena_kun left 10:48 mcmillhj joined 10:53 mcmillhj left
lizmat mr_ron: if you think it is a problem, please make it a rakudo issue 11:03
timotimo i think this is not backtracking but just failing one branch and going to the next 11:04
otherwise you could never use || in tokens at all
11:04 zakharyas left
timotimo mr_ron: does that make sense to you? 11:04
buggable New CPAN upload: P5chr-0.0.4.tar.gz by ELIZABETH cpan.metacpan.org/authors/id/E/EL/...0.4.tar.gz
11:05 zakharyas joined, mcmillhj joined 11:06 zakharyas left 11:10 mcmillhj left
buggable New CPAN upload: P5hex-0.0.4.tar.gz by ELIZABETH cpan.metacpan.org/authors/id/E/EL/...0.4.tar.gz 11:14
mr_ron m: my token param-y1 { ^ [ [ <[mn]>+ {say 'matched first word'} '=' \w+ ] || <[ab]>+ ] $ }; say so 'a' ~~ /<param-y1>/; # no backtracking 11:18
camelia True
mr_ron m: my token param-y { ^ [ [ \w+ {say 'matched first word'} '=' \w+ ] || <[ab]>+ ] $ }; say so 'a' ~~ /<param-y>/; # backtracks - think it should not 11:19
camelia matched first word
True
moritz mr_ron: trying different alternsatives does not count as backtracking
yoleaux 10:25Z <mr_ron> moritz: could you please look at irclog.perlgeek.de/perl6/2018-04-11#i_16036613
11:20 albongo joined, albongo left, albongo joined
moritz backtracking is if a single regex element once matched some chars, and now needs to match a different amount 11:20
but in this case, it's a single <elem1> || <elem2>, and neither backtracks 11:21
just elem1 fails, and so elem2 is tried
mr_ron looking ... 11:23
buggable New CPAN upload: P5chomp-0.0.3.tar.gz by ELIZABETH cpan.metacpan.org/authors/id/E/EL/...0.3.tar.gz 11:24
11:29 eliasr joined, pharv joined
mr_ron In Perl 5 this fails with (*PRUNE) but works if you take the prune out: perl -E 'say "a" =~ qr/ ^ (?: (?: \w+ (*PRUNE) = \w+ ) | [ab]+ ) $ /x;' 11:30
Is this difference documented anyplace? 11:33
woolfy Hmpf... me sad... insights.dice.com/2018/04/05/perl-...obe-index/ 11:34
El_Che hey woolfy
11:34 pharv left
El_Che (it's perl6's fault according to the article :) ) 11:35
little too simplistic, though
jmerelo woolfy: also this blogs.perl.org/users/mithaldu/2013/...ut-it.html (seen in Wendy's presentation)
gfldex woolfy: please note that TIOBE mostly measures ignorance
El_Che although Perl is loosing mind share
AlexDaniel I don't get that article 11:36
the whole tiobe index makes no sense to me 11:37
El_Che it doesn't
AlexDaniel Delphi is 11th, Go is 19th
woolfy The comments are very interesting... Choroba: "The site adds a “Related Jobs” frame that lists over 2400 open Perl jobs. There’s another possibility for developers and pros who still rely on Perl: stop reading Tiobe. Or maybe just come back for fun in 2028 to see what they predicted in 2018."
tadzik it's a measurement, but not exactly of language popularity
AlexDaniel “Perl” went from 10th to 16th, so still ahead of Go
woolfy Christian Walde: "TIOBE’s results are entirely bogus, because their method for ranking data is completely bunk. Anyone trying to draw any conclusions from their “work” might as well be reading tea leaves. Please stop reporting on TIOBE, or heck, maybe even write an article that investigates why it’s broken. Journalism and all that. I’d be happy to help."
tadzik rather "which language people google for the most when they struggle with it" 11:38
AlexDaniel do people struggle often with Delphi nowadays?
rly?
tadzik if your language has excellent documentation that everyone knows where to look for... ;)
AlexDaniel maybe I don't know something…
El_Che Go dropped also slightly, why it's seems more popular than before (looking at big name projects)
woolfy Struggle? With Perl 6? Nobody. It's the easiest!
El_Che woolfy: I woudn't call Perl 6 easy 11:39
woolfy (I mean, #perl6 and other Perl 6 irc channels (and other resources) are extremely helpful)
tadzik AlexDaniel: I can easily imagine that :)
woolfy Claudio Ramirez: I was searching for the tongue-in-cheek-emoji... didn't find it.
mr_ron m: my token param-x { ^ [ <[ab]>+ { say <match 1> } || [ \w+ { say <match 2> } '=' \w+ ] ] $ }; say so "a=b" ~~ /<param-x>/ # shouldn't this backtrack same way?
camelia (match 1)
False
mr_ron m: my token param-x { ^ [ <[mn]>+ { say <match 1> } || [ \w+ { say <match 2> } '=' \w+ ] ] $ }; say so "a=b" ~~ /<param-x>/ # shouldn't this backtrack same way? 11:40
camelia (match 2)
True
mr_ron m: my token param-y { ^ [ [ \w+ {say 'matched first word'} '=' \w+ ] || <[ab]>+ ] $ }; say so 'a' ~~ /<param-y>/; # backtracks - think it should not 11:41
camelia matched first word
True
AlexDaniel “Wikipedia: 13%” 11:42
mr_ron Can moritz or someone explain why param-x and param-y seem to backtrack differently?
El_Che woolfy: 😛
😜 11:43
11:43 wamba left
El_Che you may need to make your font bigger to see the difference :) 11:43
timotimo m: say so "=" ~~ /\w/
camelia False
lizmat .tell Zoffix I've merged 6 P5dists into another: chop -> chomp, oct -> hex, ord -> chr, rindex -> index, uc -> lc, ucfirst -> lcfirst 11:44
yoleaux lizmat: I'll pass your message to Zoffix.
timotimo mr_ron: how does it backtrack ni the second one?
mithaldu_ jmerelo: which presentation was this? 11:46
mr_ron In the second param-x it does not backtrack, in param-y it backtracks after \w+
11:46 brrt joined
jkramer Is CPAN broken? :( search.cpan.org/search?query=gitlik...ode=module 11:46
timotimo what you're seeing there isn't backtracking
ilmari jkramer: search.cpan.org != cpan 11:47
jkramer: use metacpan.org 11:48
mr_ron I understand that moritz said param-y does not count as backtracking. Fine. Why can't it do the same for param-x though?
param-x first case ...
timotimo i may not be looking correctly
jkramer ilmari: Ah didn't know that, thanks
timotimo how does it "not do the same" there? 11:49
mr_ron In the case of the first param-x the first alternative partially matches but it can't back up to match the second alternative. 11:50
timotimo oh, i was only looking at the last two lines
i thought you had corrected the first line to get the second one 11:51
OK, not really sure what's up there 11:52
mr_ron No - its not a correction the first param-x has to back up to match the later alternative, the second param-x does not need to back up.
timotimo: thanks for looking. If nobody has a good explanation maybe I put in an RT / rakudo issue. 11:53
timotimo gotta go afk now, too 11:54
buggable New CPAN upload: P5built-ins-0.0.7.tar.gz by ELIZABETH cpan.metacpan.org/authors/id/E/EL/...0.7.tar.gz
jmerelo mithaldu_: www.wendy.org/PerlConf/GPW2018/Chan...rl2018.pdf 12:06
12:06 Tison joined
woolfy mithaldu_ I've been promoting your blog about Tiobe a bit. 12:07
jmerelo So woolfy == Wendy. Nobody tells me anything!
Hi woolfy !
12:08 profan_ is now known as profan
woolfy jmerelo: Really? OK, I am Wendy. And woolfy. For many years. :-) 12:11
jmerelo woolfy: :-) Very nice presentation. I really liked it :-)
12:15 wamba joined
jmerelo Still, look at the rank in pull requests in GitHub github.com/JJ/perl6em/blob/master/data/rank.csv 12:18
This is taken using BigQuery from GitHub events that are identified by language; PRs are actually the only ones. I do have the raw data somewhere else, but baseline is it's gone down from #15 to #25 12:21
12:28 Tison left 12:31 scimon left, Aaronepower joined 12:32 wamba left 12:33 wamba joined 12:35 scimon joined 12:38 wamba left, wamba joined 12:40 zakharyas joined 12:44 wamba left 12:49 andrzejku left 12:50 AlexDaniel left, vcv joined 12:53 vcv left 12:54 mcmillhj joined 12:56 vcv joined
jkramer I'm playing with grammars and trying to parse an ini-style file but somehow Grammar.parse seems to loop forever and use 100% CPU. Any ideas what's wrong here? paste.pound-python.org/show/H5FiE0...NpTjmE7AQ/ 13:02
13:03 wamba joined
jkramer It's my first try on grammars so it's probably something stupid and obvious :) 13:04
timotimo yup
your token TOP can match an empty string an infinite number of times
so it does that gladly
13:04 zakharyas left
jkramer Oh :D 13:05
Thanks!
jmerelo jkramer: can you please StackOverflow that? blogs.perl.org/users/jj_merelo/2018...-that.html :-) 13:11
moritz jkramer: might I humbly advertise for smile.amazon.com/Parsing-Perl-Rege...0785L6WR6/ ? :-) 13:13
it deals with gotchas such as this one as well
13:15 rindolf joined
Geth perl6.org: dengyouhua++ created pull request #103:
Chinese translation
13:16
jkramer jmerelo: I'm afraid I lost my SO account a long time ago :) 13:26
moritz: Thanks, I might check it out if I go deeper into the topic, currently I'm just fooling around a bit 13:27
13:31 scimon left
timotimo moritz: i wasn't smart enough to figure out what was with mr_ron's example :S 13:31
13:32 scimon joined 13:34 skids joined
Geth perl6.org: ccworld1000++ created pull request #104:
tips change
13:36
perl6.org: acab0fed71 | CC++ (committed using GitHub Web editor) | app.psgi
tips change

  perl6.org/
13:39
perl6.org: d9ef9bf531 | (Aleks-Daniel Jakimenko-Aleksejev)++ (committed using GitHub Web editor) | app.psgi
Merge pull request #104 from ccworld1000/patch-3

tips change
jmerelo jkramer: I can do it for you and link to your question here, if you don't mind. 13:41
moritz timotimo: nothin' to do with being smart, just experience with regexes
13:42 jmerelo left
jkramer jmerelo: Sure :) 13:42
13:44 kurahaupo left 13:45 rindolf left 13:47 kurahaupo joined
mr_ron moritz: still here if you would like to give further insight. There was a (new I think) variant of the question later irclog.perlgeek.de/perl6/2018-04-12#i_16038507. Also noticed seems different from Perl 5. 13:47
moritz m: my token param-x { ^ [ [<[ab]>+ { say <match 1> }] || [ \w+ { say <match 2> } '=' \w+ ] ] $ } 13:51
camelia ( no output )
moritz m: my token param-x { ^ [ [<[ab]>+ { say <match 1> }] || [ \w+ { say <match 2> } '=' \w+ ] ] $ }; say so "a=b" ~~ /<param-x>/
camelia (match 1)
False
13:52 Aaronepower left
moritz m: my token param-x { ^ [ [ \w+ { say <match 2> } '=' \w+ ] ] $ }; say so "a=b" ~~ /<param-x>/ 13:52
camelia (match 2)
True
moritz mr_ron: here the first alternative matches, so the second isn't tried 13:53
mr_ron: but when the $ tries to match, the || would need to backtrack to try the second alternative
mr_ron: but the token explicitly disables this backtracking
that's why the regex as a whole doesn't match 13:54
mr_ron m: my token param-y { ^ [ [ \w+ {say 'matched first word'} '=' \w+ ] || <[ab]>+ ] $ }; say so 'a' ~~ /<param-y>/; # why different backtracking ?
camelia matched first word
True
moritz mr_ron: I don't see any backtracking in this example 13:55
the first branch tries to match, it matches. Done.
decommute&
mr_ron I don't see the first branch matching in param-y. the test example 'a' has no '=' 13:56
13:58 llfourn joined
mr_ron m: my token param-y { ^ [ [ \w+ {say 'matched first word'} '=' \w+ {say 'branch 1'} ] || <[ab]>+ {say 'branch 2'} ] $ }; say so 'a' ~~ /<param-y>/; # why different backtracking ? 13:58
camelia matched first word
branch 2
True
14:00 zakharyas joined 14:04 Aaronepower joined 14:06 FROGGS joined 14:17 markong left 14:25 markong joined 14:33 kybr joined 14:34 margeas joined 14:35 markong left, Aaronepower left, Aaronepower joined 14:39 Aaronepower left 14:41 rindolf joined, skids left, Aaronepower joined 14:42 aindilis left 14:43 aindilis joined 14:44 jeek joined 14:46 AlexDaniel joined 14:49 brrt left
mr_ron m: my token param-x { ^ [ [<[ab]>+ { say <match 1> }] || [ \w+ { say <match 2> } '=' \w+ ] ] $ }; say so "a=b" ~~ /<param-x>/; # can't backtrack outside of alternative 14:51
camelia (match 1)
False
mr_ron my token param-x2 { [ [ ^ <[ab]>+ { say <match 1> } $ ] || [ ^ \w+ { say <match 2> } '=' \w+ $ ] ] }; say so "a=b" ~~ /<param-x2>/; # does backtracks in alternatives 14:52
evalable6 (match 1)
(match 2)
True
mr_ron Got it now - possible doc issue.
14:56 domidumont1 joined 15:00 domidumont left 15:04 zakharyas left 15:06 zakharyas joined 15:08 Actualeyes joined
moritz there is no backtracking in this example 15:12
trying both branches of an alternative is *not* backtracking
it always happens if the first branch does not match
15:12 khw joined 15:14 skids joined 15:17 releasable6 left, releasable6 joined, ChanServ sets mode: +v releasable6, athenot joined 15:19 margeas left, brrt joined 15:23 domidumont1 left
AlexDaniel u: 🤬 15:26
unicodable6 AlexDaniel, U+1F92C SERIOUS FACE WITH SYMBOLS COVERING MOUTH [So] (🤬)
15:26 vcv left
AlexDaniel that's a nice one 15:27
15:27 pharv joined 15:28 markong joined
Geth doc: 8af748d3c2 | (Will "Coke" Coleda)++ | doc/Language/modules.pod6
remove trailing ws
15:31
synopsebot Link: doc.perl6.org/language/modules
doc: feeb94202c | (Will "Coke" Coleda)++ | htmlify.p6
No point in caching this, it's called once per page
15:34
15:34 vcv joined 15:36 jmerelo joined 15:37 khisanth_ left 15:38 wamba left 15:41 pharv left, caasih left, zostay left 15:42 pharv joined 15:43 simpleseeker joined
jmerelo timotimo, jkramer: reposted question to StackOverflow stackoverflow.com/questions/498007...se-100-cpu 15:44
skids usually a rule that can match zero characters is involved. Maybe try an anchor in TOP? 15:47
15:47 brrt left
skids Oh, or maybe it's the "value" rule. 15:49
15:49 vcv left, adu joined 15:50 pharv left, vcv joined, pharv joined, khisanth_ joined 15:51 Aaronepower left 15:59 robertle_ joined
moritz TOP has nested * quantifiers 16:02
16:04 pharv left, zakharyas left, pharv joined, vcv left 16:05 mcmillhj left
Geth doc: 2ef1365f7d | (JJ Merelo)++ | CONTRIBUTING.md
Linked labels with the repository

Linked also the label description, and while I was at it, changed Perl 6 to use non-breaking space. Closes #1909
16:06
16:08 zakharyas joined
jmerelo .tell jkramer to take a look at this and help however possible stackoverflow.com/questions/498007...3_49800790 16:08
yoleaux jmerelo: I'll pass your message to jkramer.
16:13 pharv left 16:14 pharv joined 16:18 vcv joined 16:24 simpleseeker left 16:26 scimon left 16:33 troys joined 16:34 adu left, amalia___ joined 16:35 adu joined, wamba joined 16:38 robertle_ left 16:39 dakkar left 16:41 mcmillhj joined
Geth doc: 1cdd22f432 | (Will "Coke" Coleda)++ | 5 files
Test .md files for Perl 5|6 nbsp

Fix all instances in the md docs
16:44
jmerelo So what's the deal with the perl6/doc pod tags? gist.github.com/JJ/72d332e4cee266a...07b660652a
Are they ever used? There's tutorial, index, perl6, convert, and, for some reason, self.
[Coke] ? 16:46
Can you point me at one in the file itself? 16:47
jmerelo [Coke]: =begin pod :tag<index>
[Coke] ah, :tag<perl6> ?
jmerelo in fag.pod6
[Coke]: yep
[Coke] in *what* now? 16:48
tag isn't referenced in lib, t, xt, htmlify
jmerelo Here, for instance github.com/perl6/doc/blob/master/d...hell.pod6. 5to6 seem to favor tag<convert>
github.com/perl6/doc/blob/master/d...ll.pod6#L1 16:49
[Coke] I also don't see tag in our Pod::To::HTML 16:50
16:50 testNode joined
jmerelo This is the commit where they were added github.com/perl6/doc/commit/1509c4...ce5f695fcb 16:50
[Coke] maybe do a git blame and see which commits added them all. I picked one at random, and the commit is just "adding tags"
haskell e.g. has a "convert" tag; doesn't appear anywhere in the generated HTML 16:51
16:51 Aaronepower joined
[Coke] I don't see what they're doing. 16:52
jmerelo [Coke]: see above. Most of them were added in a single commit in February last year. It does not reference any issue...
.seen gfldex 16:53
yoleaux I saw gfldex 11:35Z in #perl6: <gfldex> woolfy: please note that TIOBE mostly measures ignorance
16:54 testNode left
jmerelo .tell gfldex can you please tell me something about tags and why they were added? github.com/perl6/doc/commit/1509c4...ce5f695fcb ? 16:54
yoleaux jmerelo: I'll pass your message to gfldex.
16:55 Aaronepower left 16:56 robertle_ joined 16:57 domidumont joined
tony-o github.com/tony-o/perl6-koos 16:59
17:02 travis-ci joined
travis-ci Doc build failed. Will "Coke" Coleda 'Test .md files for Perl 5|6 nbsp 17:02
travis-ci.org/perl6/doc/builds/365704966 github.com/perl6/doc/compare/2ef13...dd22f432dc
17:02 travis-ci left
buggable [travis build above] ☠ Did not recognize some failures. Check results manually. 17:02
17:04 FROGGS left, escherlat joined
Geth doc: fddc9f6139 | (JJ Merelo)++ | doc/Language/faq.pod6
Includes @timtoady comment as part of the FAQ

We could make it longer, but there's already a link from the answer, so I guess that's enough. Since all faq seems to go to a single page, refs #114; it does not even go to a new section. On the other hand, it closes #1753.
17:05
synopsebot Link: doc.perl6.org/language/faq
17:06 zakharyas left
jmerelo tony-o: a ORM. Neat :-) 17:12
s/a/an/
17:17 isBEKaml joined, isBEKaml left 17:18 isBEKaml joined
Geth doc: 574982ac92 | (JJ Merelo)++ | doc/Language/quoting.pod6
Rewrites description of unquoting constructs

Following suggestions by @cfa and @coke. Closes #1280 again. Please feel free to reopen and/or rewrite if needed.
17:19
synopsebot Link: doc.perl6.org/language/quoting
17:21 lalitmee joined
jmerelo c: my %words = KeyBag.new 17:25
committable6 jmerelo, ¦my: «Cannot find this revision (did you mean “all”?)»
jmerelo p: my %words = KeyBag.new
p: my %words = KeyBag.new; say %words.perl 17:26
p6: my %words = KeyBag.new; say %words.perl 17:27
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared name:
KeyBag used at line 1
jmerelo So I guess this is no longer working... perl6advent.wordpress.com/2012/12/...-and-sets/
[Coke] from 2012? very likely not, yes. 17:28
last comment: "KeyBag is now being depreciated in favour of BagHash" 17:29
jmerelo [Coke]++ 17:34
17:38 domidumont left 17:42 isBEKaml left, isBEKaml joined 17:49 zakharyas joined
[Coke] gah, I copied the typo. :) 17:49
17:51 st_elmo joined 17:53 lalitmee left
tony-o [sic] 17:56
[Coke] thank you. :) 17:59
El_Che hi 18:00
18:03 espadrine_ joined 18:04 zakharyas left
jmerelo O/ 18:05
18:14 Zoffix joined
Zoffix "<AlexDaniel>: do people struggle often with Delphi nowadays?"... But that's exactly why TIOBE is crap. Delphi folks simply gamed the TIOBE's system to get higher ranking. 18:15
yoleaux 11:44Z <lizmat> Zoffix: I've merged 6 P5dists into another: chop -> chomp, oct -> hex, ord -> chr, rindex -> index, uc -> lc, ucfirst -> lcfirst
jmerelo Zoffix: how can they do that? 18:16
moritz TIOBE used to be only a google search for "$language programming"
and they basically put delphi programming on a whole lot of pages 18:17
nowadays, TIOBE incorporates a few more criteria, like job offers on certain sites
Zoffix jmerelo: blog.timbunce.org/2009/05/17/tiobe...ing-gamed/
El_Che the worst the doc, the better result
jmerelo It's not only Tiobe. It's also Redmonk redmonk.com/sogrady/2018/03/07/lang...ings-1-18/
El_Che jmerelo is actually killing Perl 6!!
jmerelo El_Che: killing it softly with a song, I guess :-) 18:18
18:18 sauvin left
Zoffix hasn't googled for "perl 6" anything in years 18:18
18:19 wamba left
El_Che the perl 5 - 6 thing kind of kills googling for perl 6 18:19
Zoffix And I see Mithaldu is proposing exacly the same gamification. Heh 18:20
jmerelo You can try this in BigQuery github.com/JJ/perl6em/blob/master/...s/bq.perl6 which counts the number of pull requests in GitHub. Perl has lost 10 positions in that ranking too. 18:21
I'm not for gaming the system, but I do think we need to be aware of what's going on and do what we can to promote Perl 5&6 everywhere. 18:22
I'm giving a talk next Saturday on a completely unrelated conference on a completely unrelated topic, and I'll be wearing my Perl 6 tee and show perl 6 pictures for no reason at all.
Maybe some Perl 6 code. I'll see. 18:23
Zoffix So lets discuss that instead of talking about endless charts and losing positions?
18:23 Kaiepi left
mr_ron weak promotion on PerlMonks: perlmonks.org/?node_id=1212735 18:24
jmerelo Zoffix: I'm all for that, but I guess some people need some extra motivation and a data-based approach.
tony-o it doesn't hurt to be able to show that p6 isn't failing after the articles that are out there from years ago 18:27
Zoffix jmerelo: is it motivational though? To me it's depressing. I wouldn't want to stay in the community that endlessly posts links to charts and talks about declines and whose lauded solution to the problem is to game one of the indexers.
tony-o: IMO that's like a clingy date that keeps asking if you still love them. Despreation. 18:28
El_Che Zoffix: well, I see it differently. For me is the strongest argument for renaming Perl 6 for Perl 6's sake. The argument used to be for Perl 5's sake
Zoffix I'll tell you what's motivational. This: 6guts.wordpress.com/2018/03/13/rem...or-moarvm/ Remote debugging! Fucking awesome!
El_Che wow factor indeed 18:29
tony-o Zoffix: i agree, but i've lived in the corporate world where people can't look beyond an article they read 5 years ago
remote debug looks pretty rad
Zoffix Hey, someone used that and thought it was awesome and is talking about it: twitter.com/zoffix/status/984246166094254082
Happy.
tony-o: so make more articles for them to read. Look at Rust people. They can't shut up about how awesome everything is. 18:30
Geth ecosystem: e4c02805ad | (Tony O'Dell)++ (committed using GitHub Web editor) | META.list
Koos - an ORM.
18:31
Zoffix Here, a small card they're "super excited" about: twitter.com/swissgathu/status/9832...9109767168
El_Che Zoffix: because there isn't a Rust - 1
tony-o Zoffix: i totally agree
El_Che Zoffix: when people hear Rust, they hear hype
when people hear Perl 6, they hear Perl 4
Zoffix I wrote maybe 3 lines of Rust in my life, but I'm already promoting them: twitter.com/zoffix/status/983744917716553728
18:33 Zoffix left
mithaldu_ zoffix: why the hell don't you have a bnc 18:34
18:35 vcv left
mithaldu_ also i kinda want to edit the blog post because nowadays my thought on tiobe is: kill it with extreme prejudice 18:35
woolfy: good to know it's still useful :) 18:36
although details might be outdated
18:39 comborico1611 joined 18:42 zachk joined 18:43 zachk left, zachk joined, darutoko left 18:44 pharv left 18:45 pharv joined 18:47 vcv joined
woolfy mithaldu_ Thanks again for writing it. People sometimes mail me to tell me that they what was advised. :-) 18:55
And details that are outdated can be updated in a new post.
18:58 robertle_ left, simpleseeker joined, robertle_ joined 18:59 pharv left 19:01 pharv joined, caasih joined 19:04 AlexDaniel left 19:11 Kaiepi joined 19:12 Kaiepi left, Kaiepi joined 19:13 pharv left 19:18 pharv joined 19:25 jmerelo left 19:30 Kaiepi left 19:32 Kaiepi joined 19:35 Kaiepi left 19:38 rindolf left, pharv left 19:42 rindolf joined, pharv joined 19:43 pharv left, pharv_ joined 19:45 FROGGS joined 19:47 zakharyas joined, dct joined 19:50 Kaiepi joined 19:56 adu left 20:05 mcmillhj left 20:06 nige joined
nige jmerelo++ on the call for questions and answers on stackoverflow 20:08
this was also mentioned at this lightning talk: youtu.be/52oMgCOC5a0?t=2933 20:09
- you can even ask and answer your own question - this is also useful
El_Che nige: but awkward 20:10
nige - having been coding in golang the last couple of weeks - it does make me smile that Google chose such a Google-unfriendly name for their langage -in @go@
El_Che the random stranger simulation sounds better :) 20:11
nige: "having been coding in golang"
you use the google friendly name :)
nige yes - but it's a bit hit and miss 20:12
- all the more reason to choose a distinctive, google friendly name in the first place :-)
El_Che go as a command is a huge win, though
go get, go fmt, go build, ...
nige yes - I do like that
El_Che rk get, rk fmt, rk build ...
nige I was thinking about other similar words 20:13
yes - I liked .rk as a suffix
'do', 'run'
El_Che what I wrote on the ticket?
nige yes - I prefer a distinctive, non-numerical suffix 20:14
El_Che yes, indeed
nige (if possible) - I know this is hard btw
20:14 mcmillhj joined
nige on the go get, go fmt point - I wonder if there is something perlish there we could use .... 20:15
exec
xec
lucs Using Inline::Perl5, how do I pass a string reference to a function from the inlined module? (in Perl5 I'd do 「foo(\$str)」)
nige ^- last one is short and google friendly 20:16
20:19 vcv left
nige having a distinctive google-friendly alias for Perl 6 will really help the 'google loop' 20:22
I've just been around the loop for "go" many times - and it is important for new uses acquiring the language 20:23
20:24 FROGGS left
nige - ideally the shorter the loop the better 20:24
by loop I mean: problem -> solution 20:25
Golang can spit out some LTA error messages - and I've missed some of the help provided by Perl 6 - in suggesting a fix 20:26
20:27 vcv joined
timotimo we should make our error messages more arcane again so that people search for perl 6 more often on ogogle 20:27
nige :-) 20:28
golang often just says 'panic'
which is the opposite of trying to help someone up the learning curve
20:30 mcmillhj left 20:33 simpleseeker left 20:40 mcmillhj joined 20:41 pharv_ left 20:42 pharv joined, Zoffix joined 20:44 raynold joined
raynold ahh it's a wonderful day 20:44
Zoffix lucs: just pass a Capture 20:45
lucs: $foo.some-method: \("the string")
lucs Um, not sure what that means :/
Oh, I see.
Zoffix lucs: a Capture is a type: docs.perl6.org/type/Capture
lucs Zoffix++ Thanks a bunch 20:46
20:48 vcv left
lucs Oh, cool, the docs layout appears to be much better. 20:52
20:56 mcmillhj left
mr_ron m: my token param-x { [ [ ^ <[ab]>+ { say <match 1> } $ ] || [ ^ \w+ { say <match 2> } '=' \w+ $ ] ] }; say so "a=b" ~~ /<param-x>/; # got it NO backtrack 20:57
camelia (match 1)
(match 2)
True
mr_ron moritz: perl -E 'say "a=b" =~ / (?: ^ [ab]+ (*PRUNE) $) | (?: ^ \w+ = \w+ $ ) /x' # But in Perl 5.(18|24) this fails unless you take out prune so backtrack?
moritz: It looks to me from the example like Perl 5 and 6 differ on backtracking and alternation. Can anyone please confirm/refute.
20:58 rindolf left 21:01 Zoffix left 21:03 isBEKaml left, skids left 21:04 zakharyas left
tony-o m: module X { sub l is export(:custom) { "hi".say; }; }; ::("X")::EXPORT::custom::.keys.say; X::EXPORT::custom::.keys.say; 21:05
camelia ()
(&l)
21:06 kent\n left 21:08 mcmillhj joined
tony-o hmm 21:12
21:18 nige left
MasterDuke huh, how come the resources section of perl6.org hasn't been updated? 21:22
i.e., it hasn't picked up the recent commits (day or two ago) 21:23
21:24 mcmillhj left 21:26 pharv left 21:27 simpleseeker joined 21:29 pharv joined 21:33 pharv left, pharv joined
timotimo hm, doesn't it offer the update log on the webserver? 21:36
21:37 Zoffix joined
Zoffix MasterDuke: on it. 21:37
MasterDuke thanks 21:38
also, i thought there was some sort of debug mode you could turn on that would show you when it was last built?
oh, that's docs.perl6.org 21:39
Zoffix MasterDuke: I didn't catch what the posts were showing earlier. Did it get fixed? 21:44
I mean is the problem fixed now?
Geth perl6.org: 46472c37f3 | (Zoffix Znet)++ (committed using GitHub Web editor) | README.md
Trigger rebuild
21:45
Zoffix Should be good now. 21:46
21:47 char_var[buffer] left
Zoffix Was broken since github.com/perl6/perl6.org/commit/...2c12c17b41 'cause someone (might've been me) edited the source/resources/index.html in February as root and it was getting perm issues updating it 21:47
Zoffix sets up a sudo account for self instead of using root all the time 21:48
21:48 TEttinger joined
timotimo .o( should we be monitoring the absence of root-owned files in user directories? ) 21:49
Zoffix Nah, I'd say it's a one-off thing because I only ever had a root account instead of a proper user. 21:50
timotimo that's fair
Zoffix There's still a bunch of them tho; the modules.perl6.org might've been me and I'm gonna fix it but the rest I've no idea: gist.github.com/zoffixznet/89ef115...23a7f7d359 21:52
this is the www. box
21:53 st_elmo left 21:55 mcmillhj joined, xi- joined
Geth infrastructure-doc: d0f1c65a73 | (Zoffix Znet)++ (committed using GitHub Web editor) | hosts/www.p6c.org.pod
Update user account for zoffix
21:59
21:59 mcmillhj left 22:06 simpleseeker left 22:08 simpleseeker joined, HaraldJoerg left 22:09 comborico1611 left, comborico1611 joined
MasterDuke Zoffix++ looks good 22:24
22:26 TEttinger left 22:36 Guest89780 joined
Guest89780 is it possible to convert a string to binary? 22:36
22:37 skids joined
lizmat m: dd "foo".encode # assume utf8 22:37
camelia utf8.new(102,111,111)
timotimo yes, you can, Guest89780
22:37 TEttinger joined
timotimo right, what liz said 22:37
lizmat m: dd "foo".encode(<ascii>)
camelia Blob[uint8].new(102,111,111)
timotimo m: say "foo".encode.list.map(*.base(2)) 22:38
camelia (1100110 1101111 1101111)
lizmat ah, binary like that :-)
timotimo dunno
i just thought i'd give the example so they can choose
22:38 xi- left
timotimo though of course when you do it like that, what you get is a string again 22:39
22:39 xi- joined
timotimo m: say "foo".encode.list.map(*.base(2)).join(",").encode.list.map(*.base(2)) 22:39
camelia (110001 110001 110000 110000 110001 110001 110000 101100 110001 110001 110000 110001 110001 110001 110001 101100 110001 110001 110000 110001 110001 110001 110001)
timotimo so maybe that's what you really want :P
22:42 Zoffix left
Guest89780 timotimo: what about "101" to 0b101? 22:43
timotimo ah, sure
m: my $input-string = "101"; say $input-string.parse-base(2)
camelia 5
timotimo m: my $input-string = "101"; say $input-string.parse-base(2) == 0b101
camelia True
Guest89780 what about 0b101 to "101" or "5"? 22:47
22:48 epony left
timotimo m: say 0b101.base(2); say 0b101 22:48
camelia 101
5
Guest89780 what about f($input_base, $input, $output_base) as a string? 22:49
timotimo you mean the string starts with "f(" literally?
or you want the result to be a string?
Guest89780 no that as a function?
timotimo OK
m: sub f($inb, $in, $outb) { $in.parse-base($inb).base($outb") }; say f(2, "1010", 7); say f(10, "99", 16) 22:50
Guest89780 "101" could be any base so $input_base says what it is
camelia 5===SORRY!5=== Error while compiling <tmp>
Unable to parse expression in argument list; couldn't find final ')' (corresponding starter was at line 1)
at <tmp>:1
------> 3$outb) { $in.parse-base($inb).base($outb7⏏5") }; say f(2, "1010", …
timotimo m: sub f($inb, $in, $outb) { $in.parse-base($inb).base($outb) }; say f(2, "1010", 7); say f(10, "99", 16)
camelia 13
63
timotimo m: say 0x63 == 99
camelia True
timotimo say 0o13 == 0b1010 22:51
evalable6 False
timotimo oh, octal is 8 not 7
say :7("13") == 0b1010
evalable6 True
timotimo there we go
m: say "0b1010".Int 22:52
camelia 10
timotimo m: say "0b111101".Int
camelia 61
timotimo m: say "0x111101".Int
camelia 1118465
timotimo ^- the .Int function on a string will also respect prefixes like 0x or 0b or 0o
22:53 Herby_ left, herby_ joined
herby_ \o 22:53
timotimo yo
22:56 skids left, skids1 joined
herby_ timotimo: I was reading various posts yesterday regarding the performance of p6 regexes, and I saw an older post by you regarding optimization ideas: www.reddit.com/r/perl6/comments/5n...p_regular/ 22:57
have you had an opportunity to investigate any of those ideas? 22:58
timotimo m) the best thing is as a reddit mod of the sub i see the removed spam comments, too. wtf. 23:00
i have not yet had the opportunity 23:01
herby_ I didn't realize you were a mod there :) 23:02
timotimo it's still a very low-maintenance job, especially since i'm not the only active mod
i'm not really an active mod, i suppose 23:03
herby_ What are your thoughts on creating a weekly "What's everyone working on this week?" thread?
dugdig the best thing you can do as mod is set an automoderator rule for 3 reports = remove
well, one of the best things
and add another rule for accounts with trolling history where 1 report = remove
23:04 skids1 left
dugdig i really like the welcome message on perl6.org 23:04
timotimo the one beginning in "Hi, my name is Camelia"?
herby_: that's an interesting idea; so more or less offering a no-hassle "microblogging" thing for p6 devs and users to briefly (or at length) talk about what they're doing? 23:05
dugdig timotimo: yes, that one
timotimo i like it, too
herby_ timotimo: yep. Just something to kickstart discussions and positive conversations. A good deal of the other programming subreddits have it (ex: python, rust) and I always enjoy reading the posts because it helps drive learning and creating new ideas 23:07
timotimo oh! i haven't seen one of those yet
herby_ www.reddit.com/r/rust/comments/8aw...ek_152018/
www.reddit.com/r/Python/comments/8...this_week/
it's always stickied at the top of the board, and it could be great for people who are stopping by for the first time 23:08
23:14 giraffe left
Guest89780 how do you write 0b00000101 to file? 23:16
or any other base 23:17
timotimo you'd want to have the value as an integer, split it into 8-byte sized chunks, and then use the "write" functions of file handles instead of the "print" family 23:18
you'll want to make either a Buf or a Blob for your data 23:19
Guest89780 spurt "file", :16("AB"), :bin
not like that? 23:20
timotimo or if you want to open, write, and close all in one step, you can use the "spurt" subroutine/method with a Blob or Buf
no, that will turn your number into a string first and write it as an ascii representation into the file
unless that's what you want
Guest89780 no
timotimo it's difficult to talk about this precisely :D
Guest89780 why do you need to split it into chunks? :16("FFFF") should write two bytes? 23:21
timotimo sorry, i got disconnected from my irc for a moment 23:23
23:23 dct left
Guest89780 why do you need to split it into chunks? :16("FFFF") should write two bytes? 23:23
timotimo we only support writing 8 bits per piece at a time. not sure if that's the actual reason for it, but endianness is the big issue i see here 23:24
Guest89780 do you mean using pack() ? 23:25
timotimo you could use pack for it, but the current implementation of pack in perl6 is marked as "experimental", i.e. it could change or disappear at any time
buggable: eco pack
buggable timotimo, Found 17 results: MessagePack, Net::Packet, Data::MessagePack, HTTP::HPACK, if. See modules.perl6.org/s/pack
timotimo ah, this doesn't seem bad 23:26
buggable: eco P5pack
buggable timotimo, P5pack 'Implement Perl 5's pack()/unpack() built-ins': www.cpan.org/authors/id/E/EL/ELIZAB...0.2.tar.gz
timotimo buggable: eco numeric::pack
buggable timotimo, Numeric::Pack 'Convert perl6 Numerics to Bufs and back again!': github.com/samgwise/p6-Numeric-Pack
timotimo buggable: eco native::packing
buggable timotimo, Native::Packing 'Endian safe Binary Struct packing and unpacking': github.com/p6-pdf/Native-Packing-p6
timotimo i have not tested any of those yet
Guest89780 m: Buf.new(0xf) == Blob.new(0xf) 23:28
camelia Resource temporarily unavailable
timotimo == is not the right operator to use here
that's numerical equivalence, i.e. interpret both sides as a number
m: say Buf.new(0xf) == 1 23:29
hm, camelia is having a little hiccup?
evalable6: say Buf.new(0xf) == 1
evalable6 True
herby_ m: say "no way jose"
Guest89780 === is false but == is true
timotimo m: say Buf.new(0xf) eqv Blob.new(0xf) # this is closer to what you want, but eqv also wants you to have the same type on both sides 23:30
Guest89780 is there a function that will split numbers?
timotimo we have polymod
camelia Resource temporarily unavailable
False
timotimo docs.perl6.org/routine/polymod
m: my @digits-in-base256 = 9123607.polymod(256 xx *); say @digits-in-base256.reverse 23:31
camelia (139 55 23)
timotimo m: say :256[139, 55, 23]
camelia 9123607
23:34 probono7I1V2Q joined 23:37 probono7I1V2Q left
Guest89780 why are Blob and Buf reveresed? 23:37
23:39 simpleseeker left
timotimo how do you mean? 23:43
23:45 |oLa| left
Guest89780 m: 0x0102030405060708090a.polymod(256 xx *) == (0x01..0x0a).reverse 23:46
camelia WARNINGS for <tmp>:
Useless use of "==" in expression ".polymod(256 xx *) == (0x01..0x0a).reverse" in sink context (line 1)
timotimo the == operator will lie to you here 23:47
but the reason is that polymod works by taking the mod and then dividing to get to the next values, so the first value in the list will be the smallest contributor to the number 23:48
herby_: i didn't have a chance to look at the threads yet, but now i shall
herby_ :)
Guest89780 m: spurt "file", Blob.new(0x01..0x0a), :bin; say qx/hexdump file/ 23:49
camelia spurt is disallowed in restricted setting
in sub restricted at src/RESTRICTED.setting line 1
in sub spurt at src/RESTRICTED.setting line 17
in block <unit> at <tmp> line 1
Guest89780 hexdump says "090a 0708 0506 0304 0102" 23:50
but I want it to say "0102 0304 0506 0708 090a"
timotimo that's weird, when i do the same code and use xdd i get 00000000: 0102 0304 0506 0708 090a 23:51
Guest89780 Blob.new(0x01..0x0a.reverse # 0201 0403 0605 0807 0a09
timotimo ah, interesting
try different flags for hexdump, for example hexdump -C 23:52
or hexdump -b gives you the data in octal
-x, --two-bytes-hex 23:53
Two-byte hexadecimal display. Display the input offset in hexadecimal, followed by eight space-separated, four-col‐
umn, zero-filled, two-byte quantities of input data, in hexadecimal, per line.
it looks like, from the man page, this is what it does by default
actually, huh again, because hexdump on the file gives me 0201 0403 0605 0807 0a09 23:54
rather than your 090a 0708 etc
Guest89780 depends if you reverse the Blob 23:55
23:55 pharv left
timotimo ah, i was using the exact code you had pasted for camelia (where you got the error about spurt not being allowed in the RESTRICTED setting) 23:55
23:55 mcmillhj joined 23:56 |oLa| joined, markong left, pharv joined
Guest89780 what about `spurt "file", Blob.new(@rray).reverse, :bin; say (slurp "file", :bin)` ? 23:58
how do you know if it is in the right order in the actual file?
23:58 simpleseeker joined
timotimo i think you probably want the .reverse inside the Blob.new() call 23:58
rather than outside
Guest89780 no diff 23:59
timotimo locally i get
timo@schmand ~> perl6 -e 'spurt "/tmp/file.txt", Blob.new(0x01..0x0a);'
timo@schmand ~> perl6 -e 'say slurp "/tmp/file.txt", :bin'
Buf[uint8]:0x<01 02 03 04 05 06 07 08 09 0a>