»ö« 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.
moritz o good morning 06:09
I've just received my royalty statement from my publisher; it seems that the regex book sold 113 print and 14 ebook copies in December when it came out 06:11
I don't quite know what numbers to compare it against to make sense of it, but if 100 people actually read the book, it was worth the effort :-) 06:12
TEttinger you wrote a book on regexes? perl 6 variety? 06:14
moritz sure did: smile.amazon.com/dp/1484232275/ 06:15
and "Perl 6 Fundamentals" sold 76 print copies, 58 ebook in Q4 2017 06:17
moritz TEttinger: seems I haven't spammed enough about it :-) 06:18
TEttinger moritz: could have made a pun on reducing the difficulty of regexes by "seeing through Lenz's Lenses" 06:21
moritz TEttinger: I must say I'm quite happy with the current subtitle :-) 06:29
TEttinger ah, didn't see it 06:36
that is clever
masak noticed the subtitle :) 07:38
Geth doc: 306b4e59a3 | (Elizabeth Mattijsen)++ | doc/Type/Proc.pod6
Minimally document Proc.pid
08:06
synopsebot Link: doc.perl6.org/type/Proc
scimon So over Easter I think I may have to do something I've been avoiding. Install Rakudo Star on a Windows machine. Yay. 08:18
stmuk scimon: just install the MSI! or use chocolatey which does the same thing and allows other installs as well! 08:55
buggable New CPAN upload: Image-QRCode-0.0.2.tar.gz by FRITH cpan.metacpan.org/authors/id/F/FR/...0.2.tar.gz 09:11
mienaikage I was trying out rakudo on the microsoft/windowsservercore docker container this morning, might play around a bit more later. Still need to get to grips with powershell 09:20
tyil scimon: just reinstall the machine with a better OS and install rakudo star like usual :D 09:23
El_Che mienaikage: keep us posted on how that works out. Interesting 09:25
scimon It's just my Windows machine at home is really just for gaming. When I develop on it it's generally in a Virtual Machine (or more recently Unity, but that's it's own environment). But I would like to get Proc::InvokeEditor working cross platform so it's useful so I feel I really need ot. 09:47
(Actually testing on a Mac might be harder)
Geth doc: e4ee4ce9fa | (JJ Merelo)++ | xt/links-not-links.t
Adds tests for not-<L>inked links closes #1856
11:03
Geth doc: 4a113a7e79 | (Wenzel P. P. Peppmeyer)++ (committed using GitHub Web editor) | doc/Type/Signature.pod6
return type constraints also work for pointy blocks

also, links are nice
11:12
doc: e67da64ae4 | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | doc/Type/Signature.pod6
Merge pull request #1881 from gfldex/patch-12

return type constraints also work for pointy blocks
Well, `htmlify.p6`is what is going to process it anyway... Having a `type` preffix is also a heuristic, because it's where it goes now, as processed with htmlify.p6. Be that as it may, that's fair enough, so I'll accept it anyway. If we change this to some other thing it will go to the pile of links that have to be changed.
synopsebot Link: doc.perl6.org/type/Signature
travis-ci Doc build failed. JJ Merelo 'Adds tests for not-<L>inked links closes #1856' 11:23
travis-ci.org/perl6/doc/builds/359789677 github.com/perl6/doc/compare/306b4...ee4ce9fac6
buggable [travis build above] ☠ Did not recognize some failures. Check results manually. 11:23
travis-ci Doc build failed. Juan Julián Merelo Guervós 'Merge pull request #1881 from gfldex/patch-12 11:29
travis-ci.org/perl6/doc/builds/359792719 github.com/perl6/doc/compare/e4ee4...7da64ae438
buggable [travis build above] ☠ Did not recognize some failures. Check results manually. 11:30
Geth doc: 537e3a3643 | (JJ Merelo)++ | xt/links-not-links.t
Eliminates one mention of bare http
11:35
doc: 373b62aeba | (JJ Merelo)++ | doc/Type/Signature.pod6
Merge branch 'master' of github.com:perl6/doc
doc: 94a0d3ca05 | (JJ Merelo)++ | 16 files
Left only 8, mainly false positives
synopsebot Link: doc.perl6.org/type/Signature
doc: 760fabc904 | (JJ Merelo)++ | xt/links-not-links.t
Now I'm positive: I hate the no tabs rule
11:37
travis-ci Doc build failed. JJ Merelo 'Left only 8, mainly false positives' 11:56
travis-ci.org/perl6/doc/builds/359799890 github.com/perl6/doc/compare/e67da...a0d3ca0524
buggable [travis build above] ☠ Did not recognize some failures. Check results manually. 11:56
[Coke] .tell jmerelo re 760fabc904 and other similar commit messages; now I'm sure, I dislike commit messages like this. 12:11
yoleaux [Coke]: I'll pass your message to jmerelo.
buggable New CPAN upload: Lingua-Stopwords-0.0.1.tar.gz by CHSANCH cpan.metacpan.org/authors/id/C/CH/...0.1.tar.gz
New CPAN upload: Proc-InvokeEditor-0.0.3.tar.gz by SCIMON cpan.metacpan.org/authors/id/S/SC/...0.3.tar.gz 12:21
Geth doc: b09c781c54 | (Will "Coke" Coleda)++ | xt/links-not-links.t
fix whitespace
12:58
Geth doc: b40bc13ffd | (Will "Coke" Coleda)++ | xt/links-not-links.t
Set executable bit for test
13:06
perlawhirl hi perlers 13:34
I'm probably going about this the wrong way... but say i want to move functions into their own sub-modules, but still be importable by the user 13:36
is there a better way to go about it than this?
gist.github.com/0racle/a8121cfbb8b...d47ca1861a
ie. without explicitly creating export packages for each sub-module 13:37
lizmat perlawhirl: this is the approach I took in P5built-ins: github.com/lizmat/P5built-ins/blob...lt-ins.pm6 13:57
perlawhirl lizmat++ thanks 14:00
AlexDaniel squashable6: next 14:50
squashable6 AlexDaniel, Next SQUASHathon in 7 days and ≈19 hours (2018-04-07 UTC-12⌁UTC+14). See github.com/rakudo/rakudo/wiki/Mont...Squash-Day
FROGGS uhh, we have a squashathon! \o/ 15:01
buggable New CPAN upload: cro-core-0.7.4.tar.gz by JNTHN cpan.metacpan.org/authors/id/J/JN/...7.4.tar.gz 15:11
New CPAN upload: cro-tls-0.7.4.tar.gz by JNTHN cpan.metacpan.org/authors/id/J/JN/...7.4.tar.gz
New CPAN upload: cro-0.7.4.tar.gz by JNTHN cpan.metacpan.org/authors/id/J/JN/...7.4.tar.gz
New CPAN upload: cro-websocket-0.7.4.tar.gz by JNTHN cpan.metacpan.org/authors/id/J/JN/...7.4.tar.gz
New CPAN upload: cro-http-0.7.4.tar.gz by JNTHN cpan.metacpan.org/authors/id/J/JN/...7.4.tar.gz
New CPAN upload: cro-zeromq-0.7.4.tar.gz by JNTHN cpan.metacpan.org/authors/id/J/JN/...7.4.tar.gz 15:12
mspo cro? 15:32
dogbert17 cro.services/ 15:33
mspo: ^^
Altreus is there like a DBICish or something? I want to read some code that might help me answer architecture questions without bugging everyone for ages 15:43
scimon I don't think there's a drop in DBIC replacement yet. There's one module I remember that is the start of an ORM but not much more. 15:44
AlexDaniel huggable: cro 15:47
huggable AlexDaniel, nothing found
mspo timeout 15:49
dogbert17 mspo: sorry drop the https for http 15:51
abraxxa Altreus: github.com/maros/oarm-p6 15:54
Geth DBIish/wip-mysql-threaded: bdcb646484 | (Tobias Leich)++ | 2 files
Protect more of mysql.connect and conn.dispose
15:55
mspo okay neat 15:56
timotimo waitwhat
that should really work with https
jnthn: cro.services/ is unhappy!
dogbert17 timotimo: agreed
timotimo only the https part 15:56
jnthn Was never intended to be happy :) 15:57
(Would be nice to fix that, though)
timotimo really? the site never had https?
jnthn No
timotimo i didn't even realize 15:58
FROGGS jnthn: chrome will get you soon :D
jnthn It's all public content, and I'm not sure illicit Cro use is on any nasty government's radar. :P But it should be easy to add HTTPS. Just a matter of getting around to it. 15:59
FROGGS no, but chrome wants to discourage all none https-sites at some point 16:00
timotimo i do assume you already get downgrades in your search rank if you don't have https on? 16:02
FROGGS likely 16:03
scimon Google is pushing for it heavily yes. 16:04
Zoffix Google's been penalizing for a couple of years already and in Oct2017 they even made chrome cry that stuff' insecure when you enter any content on non-HTTPS site 16:09
jnthn: that's not the only reason to use HTTPS. A malicious attacker can inject "Download CroInstaller.exe" into the page fetched by the user, installing malware to them 16:10
timotimo remember that fun instance where some bank site or something was complaining to a browser (was it firefox or chrome?) that it shows something about being insecure?
and they firmly claimed their site is totally secure
and shortly thereafter - because the bug report was public and surely passed around like an adorable kitty at a children's birthday party - someone hacked the 'site? 16:11
Zoffix jnthn: this thing is easy to use and can hook you up with free SSL in like 2 minutes: certbot.eff.org/
(with cert from letsencrypt)
Zoffix moritz++ # selling P6 books 16:12
Altreus oh they left, I was going to say thanks 16:13
mspo I like the zerossl client for letsencrypt 16:15
also they (finally) released wildcards!
scimon (Zoffix makes good points :) )
I'm off, long easter weekend beckons.
tyil I just learned that "Private multi-methods are not supported", is there a particular reason for this? 16:16
also, is there a workaround for this :p
Zoffix IIRC the reason's no one did the work yet 16:17
Zoffix m: class Foo { method !d-i($a) { say "$a is an Int" }; method !d-a ($a) { say "$a is not an Int" }; method !d ($a) { multi z (Int) { self!d-i: $a }; multi z (Any) { self!d-a: $a }; z $a }; method pd ($a) { self!d: $a }; }.new.pd: 42 16:20
camelia 42 is an Int
Zoffix m: class Foo { method !d-i($a) { say "$a is an Int" }; method !d-a ($a) { say "$a is not an Int" }; method !d ($a) { multi z (Int) { self!d-i: $a }; multi z (Any) { self!d-a: $a }; z $a }; method pd ($a) { self!d: $a }; }.new.pd: "x"
camelia x is not an Int
Zoffix ZofBot: hax
ZofBot Zoffix, And when we got to school Siobhan said, “So you’re Christopher’s mother
timotimo working around not implemented multi-dispatch for private methods? 16:21
Zoffix yeah
Zoffix TIL we got twitter.com/perl6_cpan_new 16:24
jmerelo Hi all ö/ 16:24
yoleaux 12:11Z <[Coke]> jmerelo: re 760fabc904 and other similar commit messages; now I'm sure, I dislike commit messages like this.
Zoffix Written in go? :( 16:25
\o
tyil for now I'll just make them public and add a "please dont use this" doc
timotimo "it's easiest to migrate from go to cro, because just two letters differ"
Zoffix: now i feel dumb, just above your code was the explanation m)
moritz do we also have croroutines? 16:26
tyil did anyone from the cro team see my pr on the code sample with react?
timotimo make it so
Zoffix
.oO( croutines )
timotimo next pun we need is on "salad" so we have something the croutines can go in 16:27
Zoffix
.oO( a templating engine called "TagSoup" )
timotimo temp'ting 16:28
jmerelo yoleaux: I got it :-). Would it be better if I just said "dislike"?
Zoffix jmerelo: I think the complaint was that such commit messages aren't descriptive of what's being changed and why. 16:29
jmerelo: e.g. here: Left only 8 what? github.com/perl6/doc/commit/94a0d3...ff8379f238 16:30
jmerelo Zoffix: OK.
Zoffix jmerelo: we have this guide for commit messages, though people don't adhere to it religiously: github.com/rakudo/rakudo/blob/mast...t-messages
jmerelo Zoffix: great resource. Thanks. 16:31
Zoffix \o 16:32
timotimo i'm not sure i've seen that :S 16:34
Geth doc: ff60b70fa5 | (JJ Merelo)++ | 6 files
Eliminating false positives from non-linked links tests

Works towards #1856, only 1 false positive to go.
17:05
doc: 6dad81a6a3 | (JJ Merelo)++ | 2 files
Editing the file to eliminate false positive in links.

In this case, it was due to the indentation which was seen as code in single-line mode.
This closes #1856 leaving 0 false positives. It should start work now.
doc: b0f8fe0535 | (JJ Merelo)++ | xt/links-not-links.t
Adds overview section to the new test.

Closes #1882.
17:09
Bowlslaw No such method 'select' for invocant of type 'Bool' 17:18
hello everyone 17:19
why does this code give me that error? pastebin.com/R4diswbw
I'm trying to make a simple sql select method
my insert method works, but I don't know why the select one doesn't, even though it is modeled directly after the working insert method
say $item.select; 17:20
mst Bowlslaw: your insert method does not return the object 17:23
so $item is not the object 17:24
Bowlslaw hmmmmmmmmmmm
how do i do that?
travis-ci Doc build failed. JJ Merelo 'Editing the file to eliminate false positive in links. 17:24
travis-ci.org/perl6/doc/builds/359941944 github.com/perl6/doc/compare/b40bc...ad81a6a3a3
buggable [travis build above] ☠ Did not recognize some failures. Check results manually. 17:24
travis-ci Doc build failed. JJ Merelo 'Adds overview section to the new test. 17:29
travis-ci.org/perl6/doc/builds/359943602 github.com/perl6/doc/compare/6dad8...f8fe053526
Geth doc: 26c64de429 | (JJ Merelo)++ | doc/Language/modules.pod6
Fixes POD error
17:29
synopsebot Link: doc.perl6.org/language/modules
buggable [travis build above] ☠ Did not recognize some failures. Check results manually.
jmerelo Bowlslaw: insert should return something, if you want to do that with insert. 17:33
Bowlslaw jmerelo: how do i make it return an object?
jmerelo Bowlslaw: just do return. But you should maybe try and do that in a constructor. You can override the default constructor by using submethod new. 17:34
jmerelo Bowlslaw: also, you might want to take db and create-schema outside that class, since they are not working on self. They can be just average routines. 17:35
Bowlslaw hmm
Zoffix Bowlslaw: just put `self` at the end of insert method's body. Right now you're returning the return value of `say`, which is a `Bool` which is what the error is telling you
Bowlslaw OOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
Zoffix m: class Foo { method a { say "a"; self; } method b { say "b"; self } }.new.a.b.a.b.a.b
camelia 5===SORRY!5=== Error while compiling <tmp>
Strange text after block (missing semicolon or comma?)
at <tmp>:1
------> 3class Foo { method a { say "a"; self; }7⏏5 method b { say "b"; self } }.new.a.b.a.
expecting any of:
17:36
Zoffix m: class Foo { method a { say "a"; self; }; method b { say "b"; self } }.new.a.b.a.b.a.b
camelia a
b
a
b
a
b
Bowlslaw hmm interesting 17:37
thanks jmerelo and Zoffix 17:38
jmerelo: how can you tell they are not working on self?
jmerelo Bowlslaw: Well, they are, but they are not actually working on any instance variable. You could change line 23 to just create-schema() and it would work the same, if you also take $!db outside the class. Bear in mind that, in this way, the db handle is going to be an attribute of a particular object. You probably don't want that... 17:42
jmerelo Bowlslaw: or from another point of view, you will have a database handle in every Item object. It's better if you either create a Singleton class to hold that, or simply a global variable. 17:42
Bowlslaw ahh 17:43
Zoffix m: sub trait_mod:<is>(Method:D \meth, :$fluent!) { meth.wrap: method (|c) { callsame |c; self } }; class Foo { method a is fluent { say "a" }; method b is fluent { say "b" } }.new.a.b.a.b.a.b 17:44
camelia a
b
a
b
a
b
Zoffix :)
travis-ci Doc build passed. JJ Merelo 'Fixes POD error' 17:46
travis-ci.org/perl6/doc/builds/359951771 github.com/perl6/doc/compare/b0f8f...c64de429f8
Zoffix s/callsame/callwith/; 17:48
m: role FluentInterface { method new { with self.bless -> \SELF { .wrap: sub (|c) {callwith |c; SELF} for SELF.^methods: :local; SELF } } }; class Foo does FluentInterface { method a($a, $b) { say "a [$a, $b]" }; method b { say "b" } }.new.a(1, 2).b.a(3, 4).b
camelia a [1, 2]
b
a [3, 4]
b
Zoffix Perl6++
Bowlslaw woo hoo! thanks for the help guys 17:57
i got this basic functionality working and I understand more about the design now 17:58
Bowlslaw so all I have to do is expand upon this foundation to implement the other functionality! 17:58
i admit i was quite hesitant to adopt perl 6...
jmerelo Bowlslaw: congrats :-)
Bowlslaw i'm enjoying it now for some reason ;p
it's like a holy child of Haskell, Perl 5, and Scala 17:59
jmerelo Bowlslaw: happy to hear that. To tell you the truth, Haskell and Scala are a bit over the top for me. And the community here is much more welcoming :-)
Bowlslaw yeah, not a fan of Scala, but I think Haskell is quite cool, and their community is super friendly and helpful 18:01
jmerelo Bowlslaw: and smart on top of that. I guess that coming from Perl I found the Perl 6 community easiest. And I still find Haskell a bit difficult to follow. Still, mightily powerful. 18:02
Bowlslaw perl is a lot more useful, in general, than Haskell is, but Haskell really excels at mathematical modeling
if you are curious about Haskell, I highly recommend this book: www.amazon.com/Programming-Haskell...dpSrc=srch 18:03
jmerelo Bowlslaw: you will find that most of the things that make Haskell good at maths are also in Perl 6. First compiler, by Audrey Tang, called PUGs, was written in Haskell.
Bowlslaw: Thanks. I'll check it out.
jmerelo O/ 19:23
lichtkind is there any need to announce my class as unit class; ..... ? 19:45
AlexDaniel lichtkind: this way you don't need to indent everything inside :) 19:46
maybe there are other benefits though 19:47
masak no, that's basically it 19:48
masak maybe it also shows some intent, like "this file is for mainly this thing" 19:48
lichtkind you mean without i have only curlies? thanks 19:51
thanks mäsak too good to see you still
your great 19:53
lichtkind can i do types depending on dynamic data? 20:16
Bowlslaw ..what?
lichtkind like subset PInt of Int where * > $g; 20:17
vcv subset PInt of Int where { $_ > $g }; ? 20:22
masak lichtkind: yes, you can 20:24
as long as $g is in scope for the `where`, it's fine for it to change during its lifetime 20:25
lichtkind but not on private attributes?
masak whether it's _sane_ for a type to change dynamically like that is another discussion :)
lichtkind: yes, I think also on private attributes
vcv It appears you might have to put it in a block explicitly? 20:26
lichtkind thanks so much and i think it is sane i do the matrix lib and i want types for basice range check or column and row indeces
vcv I'm guessing something to do with how WhateverCode creates a block for you 20:26
lichtkind indices
Bowlslaw can i do 'multi sub' as well as 'multi method' ? 20:27
masak m: my $g = 1; class C { has $!a where { $_ > $g }; method a { $!a } }; say C.new( a => 5 ).a
camelia (<anon>)
lichtkind Bowlslaw, sure 20:27
masak humm
Bowlslaw: and if you want, you can spell 'multi sub' just 'multi', too 20:28
Bowlslaw :O 20:34
lichtkind masak, no got again: Variable $... used where no 'self' is available 21:11
masak I think I'd need a (small!) example of what exactly it is you're doing 21:16
(small!)
(make it a one-liner and run it through camelia)
Bowlslaw hey how is Perl 6's GUI tools? 21:37
AlexDaniel buggable: eco GTK 21:38
buggable AlexDaniel, Found 4 results: GTK::Simple, GTK::Simpler, GTK::Scintilla, Inform. See modules.perl6.org/s/GTK
Bowlslaw hmmm 21:40
Bowlslaw I hope Perl 6 fixes Perl 5 biggest weakness: lack of GUI ;p 21:41
needs screenshots
Zoffix Bowlslaw: FWIW there was a recent tutorial posted that goes through building a GUI app: www.tyil.nl/tutorials/perl6-introd...ogramming/ 22:04
Bowlslaw Zoffix: yes, i'm definitely looking into that :) 22:07
Bowlslaw Zoffix: DO you know how one would take the sum of all values of all rows in SQLite? 22:14
for example, this code gives me the total number of elements, instead of the sum of the values: 22:15
AlexDaniel heh, nice use of emoji: github.com/appcypher/awesome-wasm-...d#contents
Bowlslaw my $sth = $dbh.prepare('select price from $table'); $sth.execute; my $total = $sth.allrows; say $total.sum; 22:16
Bowlslaw nevermind I got it 22:28
haha
Bowlslaw sql has a nifty sum function >_> 22:30
timotimo sql is a rather big language full of cool stuff 22:38
Bowlslaw yes 22:40
haha i'm likin my simple app so far 22:41
it accepts items into tables and then can sum up their total prices, select by date, description, etc
now I just need to make some graphs and a nice GUI >_> 22:42
titsuki_ bisectable: say log(3/4 * (3/7) ** 3 * 1/14 * 1/14) == log(3/4) + 3 * log(3/7) + log(1/14) + log(1/14) 22:45
bisectable6 titsuki_, On both starting points (old=2015.12 new=7572983) the exit code is 0 and the output is identical as well
titsuki_, Output on both points: «False␤»
Herby_ o/ 22:59
timotimo o/ 23:00
Zoffix m: say log(3/4 * (3/7) ** 3 * 1/14 * 1/14) ≅ log(3/4) + 3 * log(3/7) + log(1/14) + log(1/14)
camelia True
Zoffix titsuki_: log is gives a Num, which is floating point math 23:01
Zoffix .tell Bowlslaw well, first `$dbh.prepare("select price from $table")` is an unsafe statement. You need to quote $table properly. I don't use DBIish, but there should be some method to quote stuff (placeholders might work too). As for the sum, `my $total = $sth.allrows».head.sum` 23:03
yoleaux Zoffix: I'll pass your message to Bowlslaw.
titsuki_ Zoffx: oh... I just have raised an issue: github.com/rakudo/rakudo/issues/1670 23:04
Zoffix c: 2018.03,HEAD say [log(3/4 * (3/7) ** 3 * 1/14 * 1/14), log(3/4) + 3 * log(3/7) + log(1/14) + log(1/14)]
committable6 Zoffix, ¦2018.03: «[-8.10769031284391 -8.10769031284391]␤» ¦HEAD(7572983): «[-8.107690312843909 -8.10769031284391]␤»
Zoffix And on HEAD Num stringification is fixed ^ and you can see those are slightly different numbers. 23:05
titsuki_ so should I use "is-approx" even if they are equivalent in mathematically? 23:08
Zoffix Yeah
titsuki_ Zoffix: OK, I see. Thanks!