»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
Set by moritz on 22 December 2015.
Geth perl6.org/bs4: 6e1b5b5f76 | (Zoffix Znet)++ | 2600 files
Break ground with new app-based site
00:48
Geth perl6.org/bs4: 43b20760d5 | (Zoffix Znet)++ | Build.PL
Add build script
04:12
perl6.org/bs4: 1d8bb553ff | (Zoffix Znet)++ | app.pl
Add code block helper
04:13
perl6.org/bs4: 77bc105ec4 | (Zoffix Znet)++ | 4 files
Start sketching home page carousel
04:19
moritz lizmat++ # weekly 05:17
lizmat clickbaits p6weekly.wordpress.com/2018/03/26/...ly-perl-6/ 07:08
donpdonp how would I compare two Buf objects to see if the contents are identical? 07:49
lizmat m: say Buf.new(1,2,3) ~~ Buf.new(1,2,3) # hmmm... would have expected this to be True
camelia False
lizmat m: say Buf.new(1,2,3) cmp Buf.new(1,2,3)
camelia Same
donpdonp lizmat: thx 07:58
donpdonp m: Buf.new(3,4,5) 07:58
camelia ( no output )
lizmat m: dd Buf.new(1,2,3)
camelia Buf.new(1,2,3)
donpdonp m: say (given Buf.new(1,2,3) { when $_ cmp Buf.new(1,2,3) { "same same" } })
camelia False
donpdonp am I not using 'given' correctly?
lizmat m: given Buf.new(1,2,3) { when $_ cmp Buf.new(1,2,3) { say "same same" } }
camelia ( no output )
lizmat m: given Buf.new(1,2,3) { when $_ cmp Buf.new(1,2,3) { say "different" } }
camelia ( no output )
lizmat m: given Buf.new(1,2,3) { when $_ cmp Buf.new(1,2,4) { say "different" } }
camelia ( no output )
lizmat hmmm
m: given Buf.new(1,2,3) { if $_ cmp Buf.new(1,2,4) { say "different" } }
camelia different
lizmat m: given Buf.new(1,2,3) { if $_ cmp Buf.new(1,2,3) { say "different" } } 07:58
camelia ( no output )
lizmat when smartmatches its parameter with $_
so it smartmatches True / False with the Buf
which is always false
so you were using "when" incorrectly
m: given 42 { .say }
camelia 42
lizmat 'given' is basically just a topicalizer
m: $_ = 42; when 42 { say "whee" } # you don't need 'given' to be able to do a 'when'
camelia whee
donpdonp im so confused 08:00
even if i try to fall back to if, its not intuitive
m: if Buf.new(1,2,3) cmp Buf.new(1,2,3) { say "Z" } 08:01
camelia ( no output )
lizmat docs.perl6.org/language/control#given
donpdonp m: if True { say "Z" } 08:02
camelia Z
lizmat donpdonp: cmp returns either Less / Same / More
only the Less / More cases are True in boolean context
donpdonp oO
o^O
lizmat Same is False as a Boolean
Numerically they are -1, 0, 1
donpdonp ohhh
m: if Buf.new(1,2,3) cmp Buf.new(1,2,3) == Same { say "same" } 08:03
camelia same
lizmat but I think you've actually found a bug in Buf ~~ Buf
I think that should be True
am checking with core devs to see whether that is a bug or not 08:04
I intended the "cmp" suggestion as a temporary workaround
Voldenet ~~ checks object identity, because Buf does not implement ACCEPTS 08:10
Voldenet m: if Buf.new(1,2,3) eqv Buf.new(1,2,3) { say "same" } 08:16
camelia same
perlbot daxim pasted a new file at perl.bot/p/uognf5 - rakudo-2018.03 tests broken 08:27
gwnx i spent a lot of time in this server in high school lol... i dont think i formed any close friendships through it, especially since it was a bit of an escape for me. i know if it weren't for this community i'd absolutely be a luddite lol like a lot of people who work with computers are such nasty people and they make such insidious machines and routines and fraternities and societies... there's such a 10:21
gwnx commitment among enough people involved in perl 6 to like, genuine love, & i think any union of people sufficiently committed to that is like such a powerful, impactful force in the world 10:21
gwnx sorry to sound so goofy lol 10:26
perlawhirl bisectable6: say (3, 1, 2).kv.first(-> $k, $v { $v == $k }) 11:45
bisectable6 perlawhirl, On both starting points (old=2015.12 new=5db9ebc) the exit code is 1 and the output is identical as well
perlawhirl, Output on both points: «Too few positionals passed; expected 2 arguments but got 1␤ in block <unit> at /tmp/R2NXIbqohB line 1␤␤»
perlawhirl does it seem bug-worthy to anyone that this works... 11:46
m: say (3, 1, 2).kv.grep(-> $k, $v { $v == $k })
camelia ((1 1) (2 2))
perlawhirl but this doesn't...
m: say (3, 1, 2).kv.first(-> $k, $v { $v == $k })
camelia Too few positionals passed; expected 2 arguments but got 1
in block <unit> at <tmp> line 1
lizmat perlawhirl: yeah, please make it an issue 11:51
perlawhirl will do
llfourn_ lizmat++ #thanks for posting my article to reddit :) 11:54
lizmat llfourn_: thanks for writing them :-) 11:55
perlawhirl camelia: say (3, 1, 2).kv.grep(-> $k, $v { $v == $k })[0]; 12:02
m: say (3, 1, 2).kv.grep(-> $k, $v { $v == $k })[0];
camelia (1 1)
pmurias do we have docs on how multi dispatch order works? 12:30
AlexDaniel squashable6: next 13:25
squashable6 AlexDaniel, Next SQUASHathon in 9 days and ≈20 hours (2018-04-07 UTC-12⌁UTC+14). See github.com/rakudo/rakudo/wiki/Mont...Squash-Day
scimon pmurias: docs.perl6.org/language/functions#...i-dispatch Covers some of it. stackoverflow.com/questions/450472...t-class-or This is a good answer. 13:37
Personally I made a test script. I'll gist it. One sec. 13:38
gist.github.com/Scimon/87571079e09...cfe6d99e58 13:39
scimon (I missed the no signature option I see there) But I've tired to cover a bunch of options and have it say which one is doing the job. 13:40
If I'd had the time at LPM last week I was going to cover it. I plan on writing a complete talk on signatures, type constraints and multi call soon(ish) 13:41
lizmat donpdonp: turns out you can use 'eq' on Buf 15:05
m: say Buf.new(1,2,3) eq Buf.new(1,2,3)
camelia True
lizmat m: say Buf.new(1,2,3) eq Buf.new(1,2,4) 15:06
camelia False
donpdonp lizmat: hey thx. 15:28
mr_ron m: gist.github.com/ronaldxs/c8755a791...525a436d7f 17:59
camelia True
False
False
True
True
True
mr_ron Don't understand 'False' mismatch results ...
timotimo i think i know why it shows that it matched the token backwards 18:06
that's actually how <after> is implemented; it flips both the target string and the rule around so it can use the regular forwards parsing code 18:07
that way you can have variable-width lookbehind
mr_ron how come it matches for the token but not for the literal? 18:08
oh - it flips the rule
not clear it is doing the right thing in all cases here though 18:09
timotimo oh
it's correct that it's matching "or" because that's in the source string 18:10
because it's <!after>, right?
mr_ron it's matching 'ro' not 'or' ... I think 18:11
timotimo hm, ok, it's not the negation, it's the flipping 18:12
mr_ron should the token and the literal give different results? 18:13
AlexDaniel RT#131964 is related I think
synopsebot RT#131964 [new]: rt.perl.org/Ticket/Display.html?id=131964 [REGEX] Anchors ^, ^^, $, $$, «, » confused in <?after>
mr_ron I noticed the RT but wasn't sure it was the same problem ... will check again
AlexDaniel it's a different problem, but a bit similar 18:14
timotimo hm, so maybe we flip the order of things in the regex but we also need to exchange a few pairs?
my little brain has been cooked today while trying to figure out a profile thing … 18:18
mr_ron I looked through RT#131964 again and it looks related to "after" but with line/word/string boundaries and it seems TBD that they are the same. Planning to add new RT. 18:27
synopsebot RT#131964 [new]: rt.perl.org/Ticket/Display.html?id=131964 [REGEX] Anchors ^, ^^, $, $$, «, » confused in <?after>
AlexDaniel mr_ron: maybe github issue instead? 18:33
AlexDaniel unless you really like RT, which is fine too :) 18:33
AlexDaniel huggable: bug 18:34
huggable AlexDaniel, nothing found
AlexDaniel huggable: rakudobug
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
mr_ron ok 18:39
Geth doc/coke/build: 8 commits pushed by (Will "Coke" Coleda)++ 19:58
[Coke] (just a rebase) 20:00
that's... weird.
(that final link from geth isn't what I'd expect)
travis-ci Doc build failed. Will "Coke" Coleda 'make directories a build dep' 20:10
travis-ci.org/perl6/doc/builds/359063988 github.com/perl6/doc/compare/6fa46...345e9455d4
buggable [travis build above] ☠ Did not recognize some failures. Check results manually. 20:10
lizmat www.reddit.com/r/perl6/comments/87..._anything/ # seems like someone has trouble with zef 20:42
Bowlslaw :O 21:02
cool
Bowlslaw i've got a question about perl 6 21:05
pastebin.com/KjPVPPfP 21:06
Bowlslaw Cannot resolve caller sqlite3_bind(DBDish::SQLite::Native::STMT, Int, Date); none of these signatures match: 21:06
(DBDish::SQLite::Native::STMT $stmt, Int $n, Blob:D $b)
(DBDish::SQLite::Native::STMT $stmt, Int $n, Real:D $d)
(DBDish::SQLite::Native::STMT $stmt, Int $n, Int:D $i)
(DBDish::SQLite::Native::STMT $stmt, Int $n, Any:U)
(DBDish::SQLite::Native::STMT $stmt, Int $n, Str:D $d)
in method execute at /home/jon/opt/rakudo-star/share/perl6/site/sources/2D749062AA6D5641452CDA214FC7C566E7E3E2A1 (DBDish::SQLite::StatementHandle) line 38
in method insert at budgetpro.p6 line 54
in block <unit> at budgetpro.p6 line 86
oops! sorry
so um...that's the error i'm getting when I try to run my script
[Coke] do you have sqllite installed? 21:12
Bowlslaw yes 21:12
[Coke] (the binary/dev package)
Bowlslaw I tested it with basic statements and it works fine 21:13
Bowlslaw yes i have libsqlite3-dev installed 21:13
timotimo that's not the problem here 21:14
timotimo looks like DBIish just doesn't support directly binding Date objects into a statement 21:14
Bowlslaw hmm 21:15
timotimo so maybe stringify it first or something; not sure how sqlite likes it
Bowlslaw ok so I will try something like, my $date = date.new(now), and then using the $date var 21:15
timotimo it seems like you've already got a date object and dbiish doesn't like it, though? 21:16
[Coke] that'd still be a Date. 21:17
Bowlslaw what do you mean?
oh
it can't be a Date object at all? 21:18
hmm
[Coke] Seems like that's a reasonable feature request for DBIsh, but in the meantime, you might be able to use a string like timotimo suggests (but you'll probably have to format it yourself to get the right format)
Bowlslaw ok, thanks 21:19
yeah it's the date object 21:21
timotimo if you're interested in the internals, here's a few lines for you to look at: github.com/perl6/DBIish/blob/maste...#L113-L137
sqlite.org/c3ref/bind_blob.html - this is the official sqlite c interface docs, they don't seem to have anything in particular for Date 21:22
Bowlslaw hmmm
maybe the timestamp type is what they use
[Coke] timotimo: wonder if it would make sense to wrap it and have DBIish pick a "sane" format as a default and then save it as a string. 21:23
timotimo yeah, that'd surely be possible
[Coke] (but then yah, do you want timestamp, ISO dates...)
timotimo the first stackoverflow find suggests you can just use unix timestamps 21:23
and bind them as 64 bit integers
Bowlslaw I want it to be in YYY-MM-DD so I can easily select purchases between certain dates 21:24
YYYY*
timotimo this is only about the internal format, you can still use datetime functions in SQL syntax as you are used to 21:25
Bowlslaw thanks for the help, timotimo and [Coke] 21:38
Zoffix .tell tyil FWIW, someone is following your app tutorial and is having issues with modules on Windows. Maybe you'd know what's wrong: www.reddit.com/r/perl6/comments/87..._anything/ 22:00
yoleaux Zoffix: I'll pass your message to tyil.
tyil I dont have any windows machine to reproduce that :/ 22:02
yoleaux 22:00Z <Zoffix> tyil: FWIW, someone is following your app tutorial and is having issues with modules on Windows. Maybe you'd know what's wrong: www.reddit.com/r/perl6/comments/87..._anything/
AlexDaniel perlawhirl: FWIW, there are some extra commands that you might like: 22:04
6c: say (3, 1, 2).kv.first(-> $k, $v { $v == $k });
committable6 AlexDaniel, ¦6c (28 commits): «Too few positionals passed; expected 2 arguments but got 1␤ in block <unit> at /tmp/dKHSpxpk_K line 1␤␤ «exit code = 1»»
AlexDaniel and also 22:05
releases: say (3, 1, 2).kv.first(-> $k, $v { $v == $k });
committable6 AlexDaniel, ¦releases (28 commits): «Too few positionals passed; expected 2 arguments but got 1␤ in block <unit> at /tmp/TNIkFhccvj line 1␤␤ «exit code = 1»»
AlexDaniel oops
all: say (3, 1, 2).kv.first(-> $k, $v { $v == $k });
committable6 AlexDaniel, gist.github.com/8635ade756dd2d1b2c...f5dcd7b28f
AlexDaniel perlawhirl: basically, bisectable only checks 2015.12 and HEAD, but it's a 2-year range now 22:06
further we go, more functionality tends to flap back and forth… and checking just 2015.12 and HEAD is becoming less meaningful :( 22:07
AlexDaniel wonders what is happening with src/gen/m-ModuleLoader.nqp on older releases 22:08
timotimo anybody want to put a Digest::SHA256::Native implementation into GTK::Simple's Build.pm? maybe also a fallback to Digest 22:12
in case the powershell one fails, like it does on many machines
comborico1611 Microsoft is a Linux Foundation platinum member, giving $500,000 per year. 22:45
yoleaux 16 Mar 2018 16:45Z <Zoffix> comborico1611: Perl 6 is already being left. The proposals are for an *alias* to Perl 6, not replacement.
timotimo ... that's a ridiculously low amount of money for a ginormous company like microsoft ... 22:48
timotimo looks like they had a net income of 21 billion dollars last year, that'd come down to ... 22:51
m: say 500_000 / 21_000_000_000
camelia 0.000024
timotimo m: say 500_000 / 21_000_000, " percent"
camelia 0.023810 percent
comborico1611 $500,000 is estimated to be the salaries of 1 manager and 3 testers, plus some equipment. 22:52
comborico1611 Salaries of Microsoft employees. 22:52
timotimo is that the kind of manager that makes about 10000x as much money as they should earn?
probably not
comborico1611 timotimo: www.youtube.com/watch?v=-YdL7Hch78s 22:53
timotimo no time :| 22:54
comborico1611 It's important if you're not aware that Micosoft is buying influence into Linux. 22:54
But I understand. 22:55
timotimo i'm this |--| close to fixing the bug i've been hunting since basically breakfast
comborico1611 Bug hunt! Sounds fun. 22:57
comborico1611 Embrace Exchange Extinguish. 23:01