»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
Set by moritz on 22 December 2015.
00:01 afresh1 joined 00:02 troys_ is now known as troys 00:43 markong left
tbrowder .tell moritz just got my printed copy of “Parsing with Perl 6 Regexes and Grammars” and the print quality is much better than your first book. i look forward to studying it closely! 01:06
yoleaux tbrowder: I'll pass your message to moritz.
01:10 troys is now known as troys_
japhb Ulti++ # Very positive advent post 01:15
01:19 MasterDuke joined 01:27 aborazmeh joined, aborazmeh left, aborazmeh joined
colomon Amazon said I’d have my copy of moritz++’s new book by now, but apparently they fibbed. Or maybe it’s out in the mailbox, too cold to check. 01:30
comborico1611 It's always exciting to get a new book. 01:49
01:56 colomon left 01:57 colomon joined 01:58 jeek left 01:59 Cabanossi left 02:01 Cabanossi joined 02:05 wamba left 02:09 MasterDuke left 02:13 agwind left 02:18 comborico1611 left 02:21 Rawriful left, colomon left 02:28 Cabanossi left 02:31 Cabanossi joined 02:45 ilbot3 left 02:57 ilbot3 joined, ChanServ sets mode: +v ilbot3 03:09 colomon joined 03:19 colomon left 03:26 xinming left, aborazmeh left 03:27 xinming joined 03:29 konsolebox left 03:30 konsolebox joined 03:45 araraloren joined
araraloren o| 03:48
o/
o\\
raschipi o/ 03:49
03:50 cdg joined 03:55 cdg left 03:58 Cabanossi left 04:01 Cabanossi joined 04:05 Herby_ left, Herby_ joined 04:08 ryn1x left, ryn1x joined
araraloren eval: gist.githubusercontent.com/araralo...tfile1.txt 04:20
evalable6 araraloren, Successfully fetched the code from the provided URL.
(signal SIGHUP) OUT GET 5
«timed out after 10 seconds»
araraloren what happened of my script ? 04:22
04:26 piojo_ joined 04:27 colomon joined 04:45 troys_ is now known as troys 04:56 piojo_ left 04:58 Cabanossi left 05:00 Cabanossi joined 05:07 raschipi left 05:14 araraloren left, astronavt joined, astronavt left 05:16 khisanth_ left 05:17 araraloren joined 05:31 char_var[buffer] joined, shady0wl_ left, char_var[buffer] left 05:32 char_var[buffer] joined 05:36 khisanth_ joined 05:45 Sgeo left 05:52 Sgeo joined 05:54 john_parr left 05:55 john_parr joined 05:56 spider-mario left 06:03 spider-mario joined 06:13 dj_goku_ left 06:26 xcm left 06:27 xcm joined 06:32 xinming_ joined 06:35 xinming left 06:43 Cabanossi left 06:45 Cabanossi joined 06:50 cdg joined 06:54 troys left 06:55 cdg left
teatime ugh 07:07
wrong window
araraloren :) 07:10
07:14 khw left 07:18 darutoko joined 07:23 Hotkeys joined 07:29 Cabanossi left 07:30 Cabanossi joined 07:33 piojo_ joined 07:45 FiendKing04 joined 07:50 TimToady joined 07:52 natrys joined
AlexDaniel Ulti: you here? 07:56
Ulti: question! What made you write “is export(*)”? :)
Ulti: github.com/MattOates/Text--Homogly...h.pm6#L100 07:57
Ulti: that no longer works since github.com/rakudo/rakudo/commit/16...572cb3cb88
I grepped the whole ecosystem and all chat logs since 2005 I think, nobody ever wrote something like that 07:58
08:13 domidumont joined, FiendKing04 left
AlexDaniel Ulti: I created this pull request but let me know what you think: github.com/MattOates/Text--Homoglyph/pull/6 08:14
08:20 domidumont left, domidumont joined 08:37 rindolf joined 08:42 Cabanossi left 08:45 Cabanossi joined 08:48 setty1 joined 08:51 Mikasi joined 08:53 TimToady left 08:54 TimToady joined 09:01 konsolebox left
moritz \o 09:01
yoleaux 01:06Z <tbrowder> moritz: just got my printed copy of “Parsing with Perl 6 Regexes and Grammars” and the print quality is much better than your first book. i look forward to studying it closely!
09:02 konsolebox joined 09:03 rindolf left
moritz tbrowder: ok. I didn't know there was a print quality issue with the first book; maybe it was just your copy... 09:05
09:07 Mikasi left 09:08 cosimo left
[ptc] moritz: I think Apress sometimes does "print on demand" and the quality isn't as good when they do that. I've been bitten by that before; the text can be quite grey and sort of fuzzy 09:11
09:11 rindolf joined
[ptc] Amazon does that as well, so I've had to become more careful in which books I order from there 09:11
Hotkeys I just found out `@a[$i, $j] = @a[$j, $i]` is much slower than `(@a[$i], @a[$j]) = (@a[$j], @a[$i])` 09:14
yoleaux 19 Sep 2017 15:28Z <AlexDaniel> Hotkeys: I remember you liked golfing in perl 6 code-golf.io
Hotkeys oops has it been that long
AlexDaniel yeah
Hotkeys I'm trying to speed up this advent of code day 16 solution without changing my algorithm first 09:15
turns out that change up there cut my run time by 3x
AlexDaniel Hotkeys: file a PERF issue maybe?
huggable: rakudobug 09:16
huggable AlexDaniel, Report bugs on github.com/rakudo/rakudo/issues/new If you don't have access to GitHub, you can email your report to [email@hidden.address] . See also: github.com/rakudo/rakudo/wiki/rt-introduction
09:17 traxex joined 09:19 piojo_ left 09:23 parv joined
Hotkeys p6: my @a = [1,2]; for ^1000 { @a[0, 1] = @a[1, 0]; }; say now - BEGIN now; 09:26
camelia 0.2041853
Hotkeys p6: my @a = [1,2]; for ^1000 { (@a[0], @a[1]) = (@a[1], @a[0]); }; say now - BEGIN now;
camelia 0.07333712
Hotkeys yeah definitely quicker
09:35 wamba joined 09:42 Cabanossi left 09:45 Cabanossi joined 10:08 parv left 10:22 rindolf left 10:29 Cabanossi left 10:30 Cabanossi joined 10:51 sena_kun joined 10:55 RabidGravy joined
RabidGravy Boom! 10:55
thought I'd pop in to get myself in the mood for writing the advent article ;-) 10:59
11:00 traxex left, ChoHag joined 11:08 traxex joined 11:21 setty1 left 11:27 TEttinger left
AlexDaniel .pizza RabidGravy 11:30
buggable: pizza RabidGravy
buggable RabidGravy, enjoy this slice of Meatzaa pizza, my friend! Yummy 🍕
RabidGravy :)
tbrowder moritz: in your first book the alignment of text blocks on some pages were a little uneven in places. also code examples don’t stand out very well from normal text. apress could do better. 11:35
teatime moritz: have you written about your process / tools / formats for writing books? 11:39
moritz teatime: not yet. Do you want the short version now? 11:40
teatime sure, if you want. mainly curious what format the publisher accepts from you 11:41
moritz I can either use their word template, give them a PDF 11:42
I chose the latter
I use leanpub's markdown writing mode, with a private bitbucket repo
git repo, that is
and leanpub automatically renders on a git push, and puts the files into dropbox 11:43
teatime so you do all the typesetting yourself, or they go through and scrape your pdf ?
moritz they do it
when the manuscript is finished, I hand them over the PDFs, one for each chapter
and they put it into their own system
and from there on, corrections work through their online proofing system, or through comments on PDF files 11:44
teatime interesting. how do you like it?
do they edit your grammar? :) 11:45
moritz I like it better than using MS Word :-)
yes, there's a copy editing phase after typesetting
11:45 mahafyi joined
moritz and then I get to see the result, and can proof-read once again 11:45
mahafyi hello all :) 11:46
moritz and for the first book, that was it. For the second one, they screwed up a bit, and we needed 3 or 4 proof-reading + correction cycles
RabidGravy Are there any Advent articles with images (e.g. diagrams,) in ? Wondering what the best way to do it is. Or whether that is a yak best left hairy 11:47
moritz RabidGravy: one of mine has book cover thumbnails in it 11:48
11:49 natrys left
moritz RabidGravy: wordpress has a "media library" where you can upload images, and it gives you the URLs 11:49
and then you can just <img src="..." /> in your post
RabidGravy ah, cool, just the job, cheers 11:50
11:56 rindolf joined, piojo_ joined 11:59 Cabanossi left 12:00 Cabanossi joined
mahafyi from perl6intro.com - You are free to name your identifiers as you like, but it is good practice to adopt one naming convention consistently. camelCase, kebab-case, snake_case , what is considered standard best practice? or is there no such consideration? 12:04
RabidGravy most people would prefer kebab-case
El_Che many people aren't really huge kebab-case fans, but use it becase a part of the community uses it :) 12:06
teatime I don't use it elsewhere, but it works well for perl6 for me 12:07
El_Che yes, same for me
RabidGravy well to be fair there aren't many languages that allow it 12:08
Hotkeys I don't use it elsewhere typically because elsewhere doesn't allow it :P I am a fan though
araraloren For me it only works on Perl6 12:09
:) Other language I know not support that
teatime it does get some use I suppose, now that I think about it. css, domain names. I use a variant for filenames sometimes 12:10
RabidGravy I get a bit confused at times at work as I do mostly Perl 5 with a bit of Scala on the side and the latter is camelCased by convention
12:10 manchicken joined
El_Che camacase is ugly, but place efficient 12:10
teatime does perl5 have a convention?
El_Che snake_case
teatime (aside: amusing it isn't camelcase) 12:11
El_Che haha
Ulti AlexDaniel: no idea, but Ill accept the PR now 12:12
AlexDaniel 👍 12:13
traxex where does the name kebab-case come from?
mahafyi traxex , it-is-text-skewered-thru-with-hyphen , heh i just red that somewhere. 12:15
manchicken What?! Decent unit tests for documentation?! Absurd(ly useful)! 12:20
12:20 traxex left
manchicken Aww, that's no fun. The spellcheck test fails for words in code. 12:21
Does anybody know where the `aspell.pws` file ran off to? I don't see it in git. 12:23
Oh, no, there it is. Nevermind me.
mahafyi how can one combine a reduction operator with a range constructor - example for 5! , do [*]|(1..5) ? 12:25
teatime why the | ?
m: say [*](1..5) 12:26
camelia 120
araraloren reduce is operator on **list** :)
mahafyi teatime, tahnks 12:27
12:27 Cabanossi left
mahafyi m: say 'thats a nice feature indeed !'; 12:29
camelia thats a nice feature indeed !
teatime yeah.. it's kinda weird it works now that you mention it, but it seems to dwym
12:30 Cabanossi joined
teatime guess that's the point/magic of range, it's iterable 12:31
mahafyi is there any recommended base modules install , like 'zef install these modules upon installation' 12:44
12:44 setty1 joined
AlexDaniel mahafyi: hmmm… maybe the ones that come with rakudo star github.com/rakudo/star/blob/master...ODULES.txt 12:47
hmm that's not the most useful format definitely 12:48
RabidGravy I hate it when I'm trying to describe something and notice there is a flaw in it, ho hum.
12:49 mscha joined
mscha m: $*OUT.autoflush = True; # Is there a way to set autoflush on a file handle? 12:50
camelia No such method 'autoflush' for invocant of type 'IO::Handle'
in block <unit> at <tmp> line 1
mahafyi how can one run a bash command from a perl6 program? example execute 'zef install uri' ? 12:53
araraloren use `shell`
mscha Specifically, $*OUT seems to autoflush when it's directed to a terminal, but not when it's redirected or piped. Any way to set autoflush in that case?
araraloren m: say shell('ls') 12:54
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
mahafyi araraloren , ty
araraloren eval: say shell('ls sandbox/*')
evalable6 sandbox/0.806238500539699.lock
sandbox/answer
sandbox/can
sandbox/foofoo
sandbox/foo.lock
araraloren, Full output: gist.github.com/4c8cb5a4ffda8641df...0ae7f821cf
mscha m: $*OUT.out-buffer = 0; # To answer my own question... 12:57
camelia ( no output )
araraloren mscha, not found it in documents :)
mahafyi shell('ls') as an example works fine of course. The console has output that includes thi line -> Proc.new(in => IO::Pipe, out => IO::Pipe, err => IO::Pipe, exitcode => 0, signal => 0, command => ["ls -asl"])
how can the perl6 script get that output and act upon it, example if exitcode not eq 0 , do something. 12:58
araraloren But this maybe lower performance :)
AlexDaniel mahafyi: both `run` and `shell` return a Proc object: docs.perl6.org/type/Proc 12:59
mahafyi: also, depending on what you do, you may be better off with `run` 13:00
mahafyi AlexDanel : thanks . i want to try and read that url github.com/rakudo/star/blob/master...DULES.txt, strip all comment and whitespaces and use zef install module-name, and try to do that with concurrency, and if there is a failure to install , to produce an error message to manually install it , perhaps with force. 13:01
araraloren Is zef can support concurrency install ? 13:02
13:02 Voldenet left
araraloren maybe not :) 13:03
mahafyi araraloren : ah ok ! thanks
13:04 MasterDuke joined
araraloren You can read the MODULES line by line, use zef check if it already installed, I think it's quite simple 13:05
eval: say shell('zef info zef')
evalable6 /bin/sh: zef: command not found
Proc.new(in => IO::Pipe, out => IO::Pipe, err => IO::Pipe, exitcode => 127, signal => 0, command => ["zef info zef"])
13:08 philomath_ joined
manchicken Always fun to have unit tests which don't pass before you even start making changes... 13:09
13:14 Cabanossi left 13:15 Cabanossi joined
AlexDaniel manchicken: is that in the doc repo? 13:17
manchicken Yeah
AlexDaniel manchicken: we don't force contributors to run xt tests, so that happens sometimes 13:18
manchicken I'm trying to fix them.
AlexDaniel manchicken++
manchicken I've gotta take my boys for breakfast, so I'm going to submit a pull request with a little blurb about pre-allocating containers in C structs for nativecall, along with a few test fixes.
AlexDaniel mahafyi: maybe it's easier to go through every directory here github.com/rakudo/star/tree/master/modules 13:19
mahafyi: and do `zef install .`
mahafyi AlexDaniel : ty, i will try. still working on shell(ls -asl) , lol , to capture exitcode with proc object, heh 13:22
13:25 MasterDuke left, Voldenet joined, Voldenet left, Voldenet joined, brrt joined
Geth doc: manchicken++ created pull request #1715:
Docfix manchicken 2017 12 12
13:31
manchicken Oh, that's a neat trick!
The Geth announce your pull requests now.
13:32 manchicken left 13:34 comborico1611 joined, mscha left 13:43 manchicken joined 13:44 natrys joined 13:49 |oLa| left
mahafyi AlexDaniels : how to list the modules in github.com/rakudo/star/tree/master/modules ? Sorry but I do not know git at all. Do we parse the HTML, or is there a git command line to do that ? 13:53
araraloren It's in github.com/rakudo/star/blob/master/.gitmodules 13:54
the sub modules
mahafyi araraloren, thanks! 13:55
13:58 Cabanossi left 14:00 Cabanossi joined 14:01 eliasr joined
RabidGravy I also hate it when I am half way through the article and start coming up with even cooler examples in addition to the more than plenty I already have 14:04
I may have to write a follow-up
AlexDaniel mahafyi: I was thinking that you can just git clone --recursive github.com/rakudo/star.git 14:05
mahafyi: and it'll clone all submodules also
14:06 espadrine joined 14:07 rindolf left 14:08 manchicken left
mahafyi AlexDaniel: thanks 14:14
14:15 MasterDuke joined
MasterDuke Hotkeys, AlexDaniel: re slow array slicing, rt.perl.org/Public/Bug/Display.htm...et-history 14:16
14:17 wamba left 14:23 brrt left
mahafyi a very late question : the rakudo start distribution already has all these modules installed? github.com/rakudo/star/tree/master/modules 14:24
araraloren yeah, I think it is 14:25
mahafyi it is, i feel rather foolish, but anyways it was a good exercise for the day, lol.
14:27 Cabanossi left 14:30 Cabanossi joined, MasterDuke_ joined 14:34 MasterDuke left 14:36 MasterDuke_ is now known as MasterDuke 14:39 Hotkeys left
mahafyi except DBIsh , it doesn't ship by default, everything else is there on a fresh install of rakudo-star (i have 2017.10) 14:39
RabidGravy which reminds me, does anyone have any strong feelings against deprecating the "heritage" fetch* methods in DBIish as per github.com/perl6/DBIish/issues/110 ? Otherwise I'll probably do it tomorrow. 14:52
moritz RabidGravy: have you looked in the ecosystem if they are in use? 14:56
RabidGravy no, I was going check that beforehand and send PRs 14:58
dogbert17 I wouldn't be surprised if there is a bot which can help out with the searching 15:12
15:12 Cabanossi left 15:13 MasterDuke left 15:15 Cabanossi joined
mahafyi m: say my %hash-1('k1','v1','k2','v2','k3','v3'); 15:16
camelia No such method 'CALL-ME' for invocant of type 'Int'
in block <unit> at <tmp> line 1
mahafyi sorry 15:17
m: say my %hash-one('k1','v1','k2','v2','k3','v3');
camelia 5===SORRY!5=== Error while compiling <tmp>
The () shape syntax in hash declarations is reserved
at <tmp>:1
------> 3 %hash-one('k1','v1','k2','v2','k3','v3'7⏏5);
expecting any of:
constraint
formal parameter
mahafyi argh, pl ignore 15:18
15:19 MasterDuke joined
mahafyi m: say my %kvp1 = ('k1','v1','k2','v2','k3','v3'); 15:21
camelia {k1 => v1, k2 => v2, k3 => v3}
mahafyi m: say my %capitals = ('India','New Delhi','UK','London','Germany','Berlin'); 15:22
camelia {Germany => Berlin, India => New Delhi, UK => London}
mahafyi why does the order of the hashes switch like this?
AlexDaniel dogbert17: like greppable? 15:24
greppable6: fetch\w
greppable6 AlexDaniel, gist.github.com/937a1569189fdfa33b...4fecf75393
teatime mahafyi: it is the nature of hashes
mahafyi: you get fast lookup by (usually string) key, but they don't preserve order.
mahafyi so, we should expect order to be prserved like in an array, when we use hash? 15:25
teatime a list of pairs would preserve order, but lookups would be O(n)
mahafyi should *not* i meant
AlexDaniel greppable6: fetch(row|all)
greppable6 AlexDaniel, gist.github.com/778fb610bd2f13bfa7...c9bfeb0eca
AlexDaniel RabidGravy: ↑ ? :)
teatime mahafyi: right, you can't expect that, then it wouldn't be a hash (aka a hashmap, map, dictionary, key-value store), it'd be something else 15:26
MasterDuke mahafyi: internally they have no order, but if you just 'say' it, it will sort before printing
mahafyi teatime : if i define like (k1 => v1) then order will preserved, but if we expect perl6 (i assume this is 'lookup') then we cannot expect order to be preserved?
teatime mahafyi: I don't understand the question quite? but, it's not unique to perl6 15:27
mahafyi ok , so we cannot use the order like in a array, for a hash?
teatime : but i dont know other languages either, ha aha
RabidGravy AlexDaniel: 👍
mahafyi i get it (i think)
teatime right. you can sort a hash, by key or value or whatever, to get a known deterministic output order
AlexDaniel RabidGravy: well, if I were you, I'd probably create a bunch of pull requests to these modules first 15:28
mahafyi ok ty
AlexDaniel RabidGravy: and then deprecate it right after that
RabidGravy: otherwise unsuspecting users might see deprecation messages and stuff, which we probably don't want to happen
teatime oh I should have included "associative array" in the list of names
AlexDaniel but that'd be in an ideal world, feel free to do it any way you like :) 15:29
teatime mahafyi: en.wikipedia.org/wiki/Associative_array
mahafyi teatime : Thanks
dogbert17 AlexDaniel++ greppable 15:30
RabidGravy AlexDaniel, it looks like it's only github.com/tony-o/perl6-db-orm-quicky the rest are false positives 15:31
mahafyi m: my %h; %h<a b c d e> = 'A'..* ; say %h; 15:50
camelia {a => A, b => B, c => C, d => D, e => E}
mahafyi heheh, somehow these kind of things take away 'the-beginner-programming-funk' 15:51
15:51 geospeck joined
RabidGravy bear in mind that the .gist of Hash explicitly sorts the keys like that 15:54
I've wondered before whether that is actually sensible as it may cause people to reason incorrectly about the behaviour of hashes 15:57
15:59 natrys left
colomon is used to ordered “dictionary” type structures from his C++ programming, easy to fall into thinking P6 does that too 16:00
16:00 espadrine left 16:11 geospeck left 16:22 MasterDuke left 16:24 vike left 16:29 Cabanossi left 16:30 Cabanossi joined 16:49 piojo_ left 16:58 hythm left, mahafyi left
timotimo i think the idea behind it is that gist is for human consumption, and if you output multiple hashes it might be helpful if all of them were sorted so coinciding keys are more apparent? 16:59
17:00 wamba joined
TimToady yes, random orderings of subhashes is really, really irritating when you just want to dump out a data structure and look at it, especially when there gets to be more than a few entries in each hash 17:05
and the worst that will arise from the misunderstanding is that something will happen in an unexpected order, which is usually benign and easily fixable 17:06
timotimo if you have code like for %myhash.pairs -> $p { given $++ { when 0 { "say $p.value() is for key 'a'" }; when 1 { "say $p.value() is for key 'b'" } } } that can be problematic :D 17:08
timotimo BBL
17:17 brrt joined 17:29 Herby_ left
timotimo so ... where *do* we turn postfix:<++> into prefix:<++> calls? i don't see it in the optimizer or the actions 17:31
AlexDaniel timotimo: wrong channel? 17:32
timotimo oh, yeah
17:35 brrt left, troys joined 17:43 Cabanossi left 17:44 Zucker joined 17:45 Cabanossi joined 17:47 khw joined 17:49 Zucker left 17:55 espadrine joined 17:56 comborico1611 left 18:15 MasterDuke joined 18:19 raschipi joined 18:23 AlexDaniel is now known as AlexaDaniel, AlexaDaniel is now known as AlexDaniel 18:24 rindolf joined
araraloren eval: gist.githubusercontent.com/araralo...tfile1.txt 18:27
evalable6 araraloren, Successfully fetched the code from the provided URL.
I am foo, 1
CREATE FOO 3
I am foo, 1
I am foo, 3
I am bar, 2
I am foo, 1
I am foo, 3
I am bar, 2
I am foo, 1
I am foo, 3
I am foo, 3
18:27 troys is now known as troys_
araraloren An simulate OS bash on gather/take :) 18:27
Quite simple :)
18:29 darutoko left, yqt joined 18:34 yqt left 18:46 araraloren left, char_var[buffer] left 19:00 geospeck joined 19:05 comborico1611 joined, zakharyas joined 19:07 Mikasi joined 19:08 troys_ is now known as troys 19:29 Cabanossi left 19:30 Cabanossi joined 19:31 poohman joined
poohman hello all 19:32
my $dom = DOM::Tiny.parse($content);
say $dom.all-text; 19:33
evalable6 (exit code 1) 04===SORRY!04=== Error while compiling /tmp/utWttSdBAn
Variable '$dom' is not declared
at /tmp/utWttSdBAn:1
------> 03say 08⏏04$dom.all-text;
poohman this works
my $dom = DOM::Tiny.parse($content);
my $table = $dom.at('table');
say $table.all-text;
evalable6 (exit code 1) 04===SORRY!04=== Error while compiling /tmp/d5EIlweSMo
Variable '$table' is not declared
at /tmp/d5EIlweSMo:1
------> 03say 08⏏04$table.all-text;
moritz poohman: please use a pastebin for pasting multiple lines of code
19:34 Mikasi left
poohman this does not give any text even though $table contains text 19:34
sorry
19:35 MasterDuke left 19:36 domidumont left 19:38 astronavt joined, astronavt left, Mikasi joined
poohman pastebin.com/ry9Yxgne 19:40
does not print any text even though the table has text
moritz poohman: what's your input? 19:42
19:42 ctilmes joined
ctilmes This one is driving me nuts. I can reliably produce this error, but if I make tiny changes, it goes away: gist.github.com/CurtTilmes/d2da158...3cf1e91b14 19:43
yoleaux 6 Dec 2017 04:47Z <Herby_> ctilmes: ++ on the advent article
poohman pastebin.com/u5hZnBhz 19:44
if I dont use the "at" method to narrow the tree only to table, it works 19:45
moritz poohman: uhm, I get an error response from www.sedar.com/FindCompanyDocuments.do
and that error response contains only one table, and that table doesn't contain anx text
19:47 brrt joined
poohman pastebin.com/qz4nxE14 19:48
19:48 Mikasi left
poohman this has the full file im running 19:48
the formdata hash was missing last tie 19:49
the grammar is not used - but i just copied everything i was running 19:51
and moritz - got ur new regex ebook - by the way - pretty cool 19:53
moritz nice 19:54
poohman: perlpunks.de/paste/show/5a3579ff.57fa.347 this is what that URL returns for me
and the sole <TABLE> in there has child elements, but none of the child elements contain any text 19:55
poohman you get this even with the last pastebin i posted??
strange 19:56
moritz poohman: no, I haven't run your full example, because I don't have cro installed
poohman oh ok
moritz poohman: I opened the URL in the browser, and saved the result
19:57 greppable6 left
moritz sorry, I don't think I can help very much right now :( 19:57
19:57 greppable6 joined, ChanServ sets mode: +v greppable6
poohman ok - ill look around in the code of the module - felt lazy to do that 😁 19:58
thanks
ctilmes Here's a better gist demonstrating my weird error: gist.github.com/CurtTilmes/7f1d39f...2fe57aae60 20:00
If I remove the extraneous module, it works fine.
20:04 MasterDuke joined
ctilmes What does this message mean: Type check failed in assignment to $!list; expected Array[Str] but got Array[Str].new("this") 20:05
20:08 brrt left
SmokeMachine Hi! Is there any kind of Hash that the key is a weakref (or something like that) and when it’s garbage collected it’s value become free to be garbage collected too? 20:09
20:12 Zoffix joined
CIAvash[m] ctilmes: Probably the same bug as rt.perl.org/Public/Bug/Display.html?id=127309 20:13
Zoffix ctilmes: that looks a lot like RT#128287 / RT#132525 I bet sticking `no precomp` into those modules makes it go away, eh?
synopsebot RT#128287 [open]: rt.perl.org/Ticket/Display.html?id=128287 [BUG] Type check `Array[Foo]` in module gets confused if `Array[Foo]` was already referenced in another precompiled module.
20:13 Hotkeys joined
synopsebot RT#132525 [open]: rt.perl.org/Ticket/Display.html?id=132525 [REGRESSION][PRECOMP] type constraints to Array[Pair] don't work when precompiled 20:13
ctilmes Got it. Thank you.
20:16 philomath_ left
ctilmes Was driving me nuts -- error seems to come and go, very difficult to reproduce 20:16
Zoffix poohman: what's the HTML code you're parsing? Dump it and pastebin it
MasterDuke looks like those three could all be combined
poohman ok wait please 20:17
Zoffix poohman: dump it from within your program, before you give it to DOM::Tiny 20:18
(a brower may error correct and give you something different)
20:18 Herby_ joined
Herby_ o/ 20:18
Zoffix |
|\
Hotkeys o7 20:19
20:19 Mikasi joined
Herby_ Zoffix: how goes it? 20:20
Zoffix Been hunting a SEGV for ~12 hours. Giving up :)
c: HEAD use lib '/home/bisectable/git/whateverable/sandbox/Inline-Perl5/lib'; for ^1000 { EVAL('sub { shift->() }', :lang<Perl5>)({;}) } 20:21
committable6 Zoffix, ¦HEAD(ae6177c): « «exit signal = SIGSEGV (11)»»
Herby_ never give up, never surrender!
I'd give some sage advice if I knew what SEGV was
Zoffix heh
Herby_: en.wikipedia.org/wiki/Segmentation_fault
Herby_ ahh 20:22
poohman pastebin.com/CEzL2MBR
there you go with the html dump 20:23
Zoffix tries 20:24
poohman: it's not a DOM::Tiny problem. Getting same empty stuff with Perl 5's Mojo::DOM 20:27
Ah 20:28
poohman: first table ain't got no text
just images
poohman ah ok
sorry for the wild goose chase
SmokeMachine Any idea of how can I use (or create) a weak ref map? 20:29
Zoffix poohman: this prints all tables: perl6 -MDOM::Tiny -e 'DOM::Tiny.parse(slurp "foo.html").find("table")».all-text.say'
SmokeMachine: don't really know what you mean, but we don't use reference counting. Objects will get GCed when they're no longer reachable 20:30
Zoffix &
20:30 Zoffix left
poohman i did try the find method but it complained saying it was Seq 20:30
i did not use the>> operator though 20:31
how does it change things?
the find method does not return a DOM::Tiny object?? 20:32
20:33 eliasr left
poohman or is the all-text method not part of DOM::Tiny 20:33
I could not find it in the module
20:34 Zoffix joined
Zoffix poohman: .at() returns the first element matching the selector, .find() returns a `Seq`uence of all elements matching the selection. Each element of that Seq is a DOM::Tiny object and the `».all-text` is a way to call .all-text on each of those elements 20:35
SmokeMachine I want something that frees the value to be gced when the key is gced
Zoffix: ^^
poohman Seq of DOM::Tiny - ok got it - Thanks 20:36
Zoffix SmokeMachine: no idea what that means. If the object is unreachable, it'd be GCed. Kinda makes me think you shouldn't be worried about stuff like that?
SmokeMachine: what problem are you trying to solve? 20:37
SmokeMachine Something like this: docs.oracle.com/javase/7/docs/api/...shMap.html
poohman is there a shortcut for the smaller >> instead of the unicode values? 20:38
Zoffix SmokeMachine: that's a tool to solve a problem, not a problem in itself :)
poohman: what do you mean? 20:39
poohman i meant in the keyboard
Zoffix >> is the ASCII version of »
DrForr poohman: Are you on Unix/Linux? 20:40
Zoffix m: <a b c>>>.uc.say; <a b c>».uc.say
camelia (A B C)
(A B C)
20:40 Zoffix left
poohman Fedora 20:40
DrForr You can use the Character Map, or there may already be an xcompose alias. 20:41
Another way of saying that is "look around for compose-key"
SmokeMachine Zoffix: I’m caching stuff indexed by a the object of a websocket supply... I want to make all the cache become garbage collected when the websocket closes... 20:42
poohman ok - ill give it a search
DrForr 'man xcompose' is a good start.
poohman ok 20:43
SmokeMachine Does it make sense? 20:45
DrForr SmokeMachine: He /part'ed a few minutes ago.
Long story short is "you can use one of your dead (unused) keys to type <windows> '>' '>' to get the guillemot." 20:47
RabidGravy Zoffix, I may be doing simply really dumb with the Markdown but the advent-highligher (sic) seems to be royally messing up the code blocks for me. It starts off alright but it seems to lose track after a while
DrForr 'compose' came about because the early DEC terminals where X started had a 'CC' key for compose-character.
(had plenty of fun with that in college...) 20:49
20:53 Zoffix joined
RabidGravy I keep meaning to make a special xcompose file for all the pwetty operators that don't already have an entry 20:53
Zoffix RabidGravy: what's your example code? 20:54
SmokeMachine DrForr: sorry, I didn’t get it... what do you mean with <windows>?
Zoffix RabidGravy: also which markdown parser are you telling it to use Perl 6 one or Perl 5?
SmokeMachine: I would've just delete the cache from the socket close handler. That's possible isn't it?
DrForr It's a "dead key" in Linux because applications don't use it in general.
RabidGravy Zoffix, I'll look at it tomorrow now as I have, er, deadline pressure 20:55
SmokeMachine Zoffix: that’s what I’m doing now... :( 20:56
20:56 committable6 left 20:57 committable6 joined
RabidGravy I have Compose set to the right Alt key here 20:57
20:58 benchable6 left, nativecallable6 left, squashable6 left, evalable6 left, bisectable6 left, coverable6 left, unicodable6 left, statisfiable6 left, bloatable6 left, quotable6 left, reportable6 left, releasable6 left, releasable6 joined, benchable6 joined, quotable6 joined, ChanServ sets mode: +v quotable6, bloatable6 joined, evalable6 joined, coverable6 joined, ChanServ sets mode: +v bloatable6, ChanServ sets mode: +v evalable6, ChanServ sets mode: +v coverable6, reportable6 joined, nativecallable6 joined, bisectable6 joined, unicodable6 joined, squashable6 joined, ChanServ sets mode: +v bisectable6, ChanServ sets mode: +v unicodable6, ChanServ sets mode: +v squashable6, statisfiable6 joined, ChanServ sets mode: +v statisfiable6
DrForr RabidGravy: I was explaining for poohman. 20:58
Zoffix SmokeMachine: so, problem solved then? :) 20:59
.tell AlexDaniel last release blocker is now resolved: github.com/rakudo/rakudo/issues/1308
yoleaux Zoffix: I'll pass your message to AlexDaniel.
DrForr (mine is the VirtualBox escape, I use left-Windows for compose.)
RabidGravy I have variously tried the wiindows and menu keys but the right Alt works best
Zoffix SmokeMachine: what you desribe with weakref stuff isn't making much sense in my head. How do you know "a key is no longer in use"? To me, the answer is you'd delete it from the socket close event. And once you do that, our normal GC will clean everything up, so you don't need any weekref stuff 21:00
21:01 MasterDuke left
RabidGravy Zoffix, I'm going to revert to last seasons little number, eschewing the syntax highlighting and remembering to manually remove the extraneous <p> by hand :) 21:01
Zoffix RabidGravy: OK :() 21:02
RabidGravy: well, I was using Perl 5's Text::MultiMarkdown and it worked alright: github.com/zoffixznet/perl6-Acme-A...i-markdown
So install it and use the --multi option. I recall not liking the parse with Perl 6's Markdown module, so maybe it is it that giving you trouble 21:03
21:03 riatre left, riatre joined 21:04 avar left
Zoffix retreats to #perl6-dev 21:04
21:04 Zoffix left, poohman left 21:07 kst joined 21:17 Cabanossi left, labster joined 21:18 Cabanossi joined, nightfrog joined 21:30 brrt joined 21:31 manchicken joined, TEttinger joined
manchicken Anybody from the doc team around? 21:32
raschipi Everyone 21:33
manchicken Need help with this: github.com/perl6/doc/pull/1715/conflicts 21:34
Wasn't sure if I should talk about this here, or in #perl6-dev
It looks like, on `master`, one of the columns demonstrating a different way of passing keys to named parameters was remove. 21:37
21:45 manchicken left
Geth doc: fbab8d318b | (Michael D. Stemle, Jr)++ (committed by Zoffix Znet) | 5 files
Docfix manchicken 2017 12 12 (#1715)

  * Adding a little clarity on pre-allocating strings.
  * Fixed CONTRIBUTORS.md
  * Correcting test failures.
  * Fixing some tests.
  * Tidied up a little.
21:46
doc: ce4aefa7cc | (Zoffix Znet)++ | doc/Language/pod.pod6
Remove merge conflict markers
21:47
synopsebot Link: doc.perl6.org/language/pod
21:50 troys is now known as troys_ 21:52 rindolf left
Geth doc: bcda499285 | MasterDuke17++ (committed using GitHub Web editor) | doc/Language/nativecall.pod6
Fix typo
22:11
synopsebot Link: doc.perl6.org/language/nativecall
22:11 brrt left 22:14 comborico1611 left, comborico1611 joined 22:17 setty1 left, zakharyas left 22:20 Mikasi left 22:24 troys_ is now known as troys
Geth doc: 287bd03332 | (Zoffix Znet)++ | xt/code.pws
Make xtest pass

The only thing remaining is github.com/perl6/doc/issues/1693 and I don't know the right new behaviour to document it.
P.S.: I sorted the code.pws with `sort xt/code.pws -u -o xt/code.pws` which seems to move words with marks on them from the end of the file.
22:32
22:36 llfourn joined 22:37 markong joined 22:39 geospeck left 22:42 Hotkeys left 22:44 vike joined, MasterDuke joined 22:47 Hotkeys joined
moritz RabidGravy: how is your advent post coming along? 23:05
it's supposed to be up in about an hour :-) 23:06
RabidGravy It'll be there or there abouts, stopped yak shaving now
moritz that's great 23:07
though I won't stay up long enough to read it :-)
Hotkeys apparently `my $temp = @a[$i]; @a[$i] = @a[$j]; @a[$j] = $temp;` is even faster still than `(@a[$i], @a[$j]) = (@a[$j], @a[$i]);` 23:08
23:08 troys is now known as troys_
Hotkeys not on a small scale, but it saves a few seconds when it happens nearly 500,000 times 23:12
23:20 TEttinger left 23:22 ctilmes left 23:23 MasterDuke left
Herby_ .tell mattoates ++ on the advent article 23:42
yoleaux Herby_: I'll pass your message to mattoates.
23:45 vike left 23:46 markong left 23:47 MasterDuke joined 23:48 AlexDani` joined 23:52 AlexDaniel left
MasterDuke Herby_: i think mattoates on github is Ulti her 23:52
23:55 avar joined, avar left, avar joined