»ö« 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.
stevieb is the ENTER 'phaser' suppose to execute on every iteration of a for() loop? I get one "hi" here: perl6 -e 'ENTER {say "hi"}; for 1..3 -> $x {say $x}' 00:36
stevieb docs say: "ENTER {...} # at every block entry time, repeats on loop blocks.". I would expect it to fire on each loop 00:38
timotimo um ... that enter phaser isn't inside the loop at all
TimToady what timotimo++ said
yoleaux 1 Jun 2016 10:21Z <Zoffix> TimToady: would you have time to offer a ruling on what the default tolerance to is-approx in Test.pm6 should be? Is it relative or absolute, and what value? My ideal choice would be absolute with $*TOLERANCE to match ≅. The specs/docs use absolute at 1e-5. And current impl uses relative at 1e-6. My more detailed plan for rewrite of is-approx: github.com/zoffixznet/debug/blob/m...-rework.md
yoleaux 1 Jun 2016 10:31Z <Zoffix> TimToady: sorry, ≅ uses relative tolerance, not absolute, but my ideal choice would still be to match it. 00:38
timotimo m: ENTER { say "outside" }; for 1..3 -> $x { ENTER { say "inside" }; say $x }
camelia rakudo-moar 069b78: OUTPUT«outside␤inside␤1␤inside␤2␤inside␤3␤»
stevieb ahhhhh... ok, it goes INSIDE the loop. That explains it lol 00:39
timotimo phasers always apply to the block they're in
TimToady all phasers go inside, which is why we put CATCH inside its "try" (even if it isn't a try)
timotimo and for simple statements like 'say "outside"' you don't even need the curlies
stevieb I misunderstood. I thought it was a global thing, and it would act on ALL loops. Now I know
timotimo that would certainly be strange. however, it can be done with a slang if you want to have that
TimToady that's why CATCH can implicitly turn its surrounding block into a "try"
well, you can't do that globally, but you could influence the compilation of all loops within a lexical scope 00:40
timotimo "on enter resume next" 00:41
i expected "global thing" meant "lexically scoped thing"
TimToady we tend to be a bit picky about the meanings of those terms :) 00:42
stevieb I just jumped too far ahead. I was looking at it like a BEGIN or INIT block in p5, where no matter where its located, it'll always get called at the right time (lexical scope is irrelevant). 00:43
slowly but surely all of this will come together
TimToady nodnod 00:44
TimToady should backlog now, but can't really due to double dose of Novocaine® earlier putting his brane in sideways 00:47
TimToady two new crowns put a big dent into my day, not to mention my dentist's and his assistant's 00:49
but had to sneak it in between conferences :) 00:50
timotimo stevieb: well, BEGIN really fires as soon as the parser finishes its closing curly brace, and all INIT blocks are registered in a per-compilation-unit queue and fire when that compilation unit gets loaded. they still have access to the relevant package and lexical environment, of course 00:51
MasterDuke TimToady: i've been looking at RT #128210 and i asked about adverbing chained operators in general a couple days ago, but nobody knew of a working example 00:52
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=128210
MasterDuke then i was looking at the commit where you added the version of ≅ that should allow you to set the tolerance (github.com/rakudo/rakudo/commit/e3c591a1) 00:54
and there don't seem to be any related tests
and i am curiout what the behavior should be: adverb applies to all uses of ≅ in a chain? or just the left-most of the adverb? 00:55
kalkin- I found a bug in moarvm 2016.05 If i have a Grammar B depending on Grammar A it only compiles cleanly the first time 01:00
as soon as i edit Grammar A I get missing or wrong dependency error 01:01
if i nuke my moar vm installation and rebuild everything with rakudbrew it works for one time until i edit Grammar A again 01:02
kalkin- I downgraded to moar 2016.04 and this fixed the issue 01:02
It looks like some precompilation cache doesn't get updated in 2016.05 version 01:03
kalkin- I can reproduce the same behavior on the nom branch 01:08
TimToady MasterDuke: iirc, the named argument was really added for internal use as a normal function call, and was never intended to be used in the chaining form; indeed, as you point out, adverbs are problematical in chained syntax anyway 01:11
MasterDuke TimToady: ah ha, so the ticket should be closed as expected behavior? 01:13
jdv79 TimToady lives. yay.
TimToady was off at a conference last week that turned out not to have good connectivity 01:14
jdv79 yay
TimToady MasterDuke: I don't really consider it a bug, though arguably we should allow adverbs on chaining ops that are not, in fact, being chained 01:16
or make that a degenerate case of applying an adverb to either all or the last one of the chain 01:17
so might be worth leaving open for now
TimToady if we applied to all, then we could do chained identical ops, and the dispatch failure would catch the attempt to misues the adverb more widely 01:18
*misuse 01:19
so I guess I'm vaguely in favor of distributing
what I really don't want to see much of is A op1 B :foo op2 C trying to apply :foo to op1 01:20
though if it can have an allowed meaning and merely be discourage culturally, that's okay I guess 01:21
guessing is about all I'm good for in my current brane state :) 01:22
*discouraged
MasterDuke if you require the adverb to be at the end of a chain and apply to all the operators, would chains with multiple different operators be allowed?
TimToady that's what I'm saying, it would naturally just fail if you applied an adverb where it wasn't recognized
these are functions, not methods, so you can't just pass random named args that will be ignored 01:23
MasterDuke i could imagine confusion if both operators happened to support the same adverb, but it had different meaning to each
TimToady well, sure, but in the overall scheme of things I'm not worried about that failure mode :) 01:24
that falls under enough rope to shoot yourself in the foot
MasterDuke i'll let you be the rope salesman here and point any fingers in your direction. but i will reply to the ticket linking this chatlog 01:27
TimToady thanks 01:30
TimToady wanders dinnerward
Zoffix .tell AlexDaniel wrote the Multi-Server part of the IRC::Client spec. Not overly happy with having server nicknames as methods, but if someone wants to act on a specific server, I guess there's no way around having an identifier. Gonna hack something up on the weekend to get a feel for it: github.com/zoffixznet/perl6-IRC-Cl...-interface 02:39
yoleaux Zoffix: I'll pass your message to AlexDaniel.
Zoffix botsnack
synopsebot6 om nom nom
Zoffix Hey! That wasn't for you! Bad bot!
BenGoldberg .botsnack 02:42
synopsebot6 om nom nom
yoleaux :D
BenGoldberg heh.
huggable, botsnack 02:43
synopsebot6 om nom nom
huggable BenGoldberg, nothing found
BenGoldberg huggable, botsnack is yummy!
synopsebot6 om nom nom
huggable BenGoldberg, nothing found
BenGoldberg synopsebot6, shush ;)
TEttinger huggable, hug botsnack 02:46
synopsebot6 om nom nom
huggable hugs botsnack
BenGoldberg IMHO, IRC bots should not respond on a channel, unless a message begins with the bot's nick, or begins with a command (and the command is very unlikely in ordinary conversation, like yoleaux's .whatever, or many other bots' !whatever). 02:49
Xliff Heh. 03:15
Um. Question. If I want to distribute a file with my Perl6 module, how would I do that? Also... how do I code the module to know how to read it, both when it is installed and when it is in it's module installation dir? 03:16
MasterDuke Xliff: irclog.perlgeek.de/perl6/2016-05-24#i_12539039 03:24
oh, you asked the question that was an answer to. did it not work? 03:25
Xliff .tell MasterDuke Thanks for the link. I haven't tried that, yet. The module is still under development, and I need to know how %?RESOURCE will work when the file still lives in the module installation directory. I will pursue this further! 05:32
yoleaux Xliff: I'll pass your message to MasterDuke.
nine vendethiel: err...no idea. I've had completely forgotten about that question until I read the selected quotes. 06:30
TEttinger vendethiel: I think I now have the longest streak of anyone I know, of course as soon as Github stops tracking streaks 06:45
719 days, will be 720 in 15 minutes
how long did your epic streak get to? 06:46
err that can't be right...
it will be 731 on the 14th, so it should be 718 today, 719 tomorrow 06:48
I think I was right the first time... 06:49
gah 06:50
RabidGravy yeah why did GH stop reporting that 06:58
I don't know how long I've been but it's since January 9 06:59
vendethiel TEttinger: congrats. mine was 531. good timing :P 07:00
TEttinger I thought ven had gotten to 710 or something, wow 07:05
Xliff Dude! My longest streak isn't even 1% of that. 07:07
<- Jealous!
azawawi $good-morning 07:16
psch Useless use of $good-morning in sink context 07:17
:P
azawawi :) 07:27
psch "No mainstream language today allows you to write a library to extend its type system." from lbstanza.org/purpose_of_programming...uages.html
am i misunderstanding our MOP or does that mean Perl 6 isn't considered mainstream by the author? 07:28
...not that i'd necessarily disagree with that. the actual point of my question is "can we do that"
actually, what does "extend its type system" *mean* there..? 07:29
RabidGravy I'd have to understand what the author means by "extend its type system"
hahaha
psch i was thinking e.g. "forbidding multiple inheritance with a new meta object" fits the bill, but i'm not sure
and i do know we can do that 07:30
"The type system of a programming language essentially defines its own subtyping relation, which may well be trivial." from en.wikipedia.org/wiki/Subtyping 07:31
so if we can change the subtyping relation - by e.g. forbidding MI - we change the type system
moritz also, in Perl 6 you can override type checking, afaict 07:32
RabidGravy and the EXPORTHOW stuff allows you to completely change the way it works if you want
azawawi do we have anything in Perl 6 that does unicode string normalization (e.g. 'ü'='u', 'ا'='أ')? 07:36
moritz you mean like p5's Text::Unidecode? 07:37
not that I'm aware of
psch hoelz.ro/blog/combining-character-caveats speaks about pretty much exactly that 07:38
in short: the neatest way we have is unfortunately NYI
azawawi moritz: it is used mainly in search to normalize text (for equality) since the user may input ü or u 07:39
psch azawawi: if you have keywords that you want to match you can :ignoremark i thin 07:40
k
m: say "föö" ~~ /:ignoremark foo/
camelia rakudo-moar 069b78: OUTPUT«「föö」␤»
azawawi_ takes a look at Text::Unidecode 07:40
azawawi_ m: say "أ" ~~ /:ignoremark ا/ 07:42
camelia rakudo-moar 069b78: OUTPUT«「أ」␤»
azawawi_ perfect 07:42
psch++
azawawi_ m: say "ه" ~~ /:ignoremark ة/ 07:43
camelia rakudo-moar 069b78: OUTPUT«Nil␤»
azawawi_ not all cases though
RabidGravy though if one wanted to make an index like that then you'd still want to "normalise"
azawawi_ m: say "ى" ~~ /:ignoremark ي/ 07:44
camelia rakudo-moar 069b78: OUTPUT«Nil␤»
psch azawawi_: the matcher has to be the mark-less, base grapheme 07:44
psch azawawi_: :ignoremark doesn't mean "ignore the marks i put into the regex", it means "ignore marks in the Str i want to match and only match the base grapheme" 07:44
azawawi i noticed 07:45
this is one of the problems with Arabic search: you need to normalize before searching 07:46
and it goes down to the database level where you may need to CREATE FUNCTIONs to normalize 07:48
azawawi basically it is like $user-input.lc == $DB_COL.lc 07:49
BooK nine: just saw your Inline::Perl[56] talk at gpw2016. loved the message at the end! 08:54
nine BooK: thanks :) 09:03
BooK do I understand correctly that I can start a project in Perl 6, and leave the db interactions to DBIC via Inline::Perl5 ? 09:25
timotimo yeah, you can
i think
BooK until a Perl 6 DBIC-equivalent is created
RabidGravy I really ought to start thinking about that 09:26
gregf_ wrt using Perl5 modules from Perl6, should this be all(for e.g if im using DBI): use Inline::Perl5;use DBI::from<Perl5>; #doesn't compile 09:30
timotimo you don't need "use Inline::Perl5" 09:31
RabidGravy because it's :from<Perl5> as an adverb to use
timotimo yeah, only a single colon there
psch isn't it an adverb to the module?
gregf_ yay
psch as in 'use DBI:from<Perl5>' and not 'use DBI :from<Perl5>'
RabidGravy dunno, never used it 09:32
gregf_ hmm spaces and extra colons :|
gregf_ works! 09:32
can call ruby and python as well :)
thanks! 09:33
timotimo and lua, too 09:34
gregf_ er, well, thats almost like perl5 09:35
btw, can i include switches in Perl6?
psch what kind of switches? 09:36
gregf_ like so in Perl5 i can do -I<lib1> -I<lib2> or PERL5LIB
psch did you try --help? :)
gregf_ perl6 -e -I~/PERL/DBICSCHEMA/ 'use HERMESSCHEMA:from<Perl5>; #like that
psch++ ;) 09:37
nine And I thought another talk about Inline::Python wouldn't be worth it. But finally having a decent video recording makes all the difference :) 09:40
timotimo oh, a talk about inline::python? i missed that one 09:45
nine Err...I meant Inline::Perl5
RabidGravy well that's the first time I've tried it but "use Emitria::Schema:from<Perl5>" works fine 09:53
gregf_ was trying this: *doesnt seem to work in Perl6* 09:57
perl -le 'use JSON::XS;my $json = decode_json("{ \"one\" : 1 , \"two\" : 2 }");print $json; #perl5
perl6 -e 'use JSON::XS:from<Perl5>;my $json = decode_json("{ \"one\" : 1 , \"two\" : 2 }");say $json; #does'nt 09:58
anyways *work now*
RabidGravy that' s because of the quotes and the curlies 09:59
it's still Perl6
timotimo right, curlies interpolate in " quotes 10:00
not in ', though
gregf_ ah - i see
RabidGravy perl6 -e 'use JSON::XS:from<Perl5>;my $json = decode_json(q"{ \"one\" : 1 , \"two\" : 2 }");say $json;'
{one => 1, two => 2}
hahaha, brilliant 10:03
perl6 -e 'use lib:from<Perl5> <lib>; use Emitria::Schema:from<Perl5>'
I hadn't realised that would work until just now
nine RabidGravy: well it did need a fix in rakudo back in July ;) 10:07
RabidGravy: though the CompUnit::Repository structure would have fixed it as well just a couple months later.
RabidGravy I may then just flip the rest of Emitria to Perl 6 and just make a wafer thin facade over the schema part 10:09
RabidGravy right! supermarket! 10:23
xtreak I get "Can't exec "git": Too many levels of symbolic links" while running 'rakudobrew build moar' , "Failed running git fetch" 10:39
psch xtreak: i'd guess removing ~/.rakudobrew (i think?) probably helps 10:45
xtreak: of course you have redo any init thingies rakudobrew might do
i don't use it all, so i don't really know :S
BooK so I was looking for some logo implementation to show and teach my kids (and more importantly let them experiment and play with it, without the need for help/supervision) 11:24
and most of the stuff I found wasn't so nice (in-browser stuff, or not extradinary text ui) 11:25
so I was wondering, how hard would it be to make a logo implementation in perl6?
or maybe there's one already? 11:26
I mean showing the result of "repeat 6 [ forward 50 arc 360 50 left 60 ]" got me pretty amazed OHHs and AAHs 11:27
DrForr BooK: There's not one that I'm aware of, but let me find a parser tutorial you mght find helpful :) 11:34
BooK I was already thinking about parsing logo into postscript for the print functions :-) 11:35
DrForr theperlfisher.blogspot.ro/2016/02/f...rs-pt.html
You'll want to jump into part 3 thoguh. 11:36
*though
finanalyst Can't get DBIish to install. Are there system dependencies that must be installed first? I'm running Ubuntu 16.04. 11:41
pmurias hi 11:46
jnthn hi pmurias 11:47
nine finanalyst: probably. Any error messages you get might help us help you 12:01
finanalyst nine: thanks. whats the best way? Several error messages in the test suite.
I installed with panda now with --force and --notests 12:02
But nothing in documentation about system dependents
nine finanalyst: post the full output on gist.github.com
finanalyst nine: gist.github.com/finanalyst/202f079...67709e4bad 12:04
nine finanalyst: could be that DBIish still requires libmysqlclient to be installed 12:11
finanalyst nine: also pq? 12:15
nine finanalyst: maybe. Though I feel like I'm missing something here. I surely hope that DBIish does not require you to have libraries for all drivers available 12:21
finanalyst nine: it looks like that to me.
finanalyst i just installed mysqlclient and got a whole lot more tests passing. 12:22
Does panda run the whole test suite before installing, or does it runs a subset?
there is no 'panda test <module-name>' option, so I assume that to rerun tests requires running prove in the module 12:23
directory 12:24
stevieb I'm very curious to know if the pg and orcl messages were simply warnings or actual failures. It looks like only mysql failed, but I just started in p6, and haven't read up on testing yet, and any differences between p5 and p6
finanalyst Since Im most interested in SQLite, I tried the example there. Got DBDish::SQLite::Connection.disconnect is DEPRECATED, please use .dispose in block <unit> at ./sqlite.p6 line 49 12:30
So example is out of date?
nine t/lib/Test/DBDish.pm6 line 55 suggests that the tests should be skipped when a driver is unable to connect 12:31
stevieb yep. that's what it looked like to me for the other two in the results. Can you manually download the distribution (if that's what it's called in Perl6), rename that test file to eg: 10-mysql.t.no-run or something, and see if it'll work then? From the dist dir: "panda install ." 12:35
finanalyst as I said. I have installed the module. Used 'panda --force --notests DBIish' 12:43
Installed SQLite and got the example working. 12:44
stevieb ahhh ok, I misread that it was successfully installed. I'll get my feet wet with playing with a failing module install in a little while. It'll help me understand writing tests for when I need to do it :) 12:45
if it is just a case of a missing skip, I'll attempt at a fix and create my first p6 PR
nine ++stevieb 12:56
kalkin- FYI: It's not possible to install Task::Star with zef, it fails building Linenoise 13:13
Same works fine with panda
Vish_ Hi 13:41
Does anyone know when the official perl 6 book is gonna be released?
perlpilot Vish_: if you mean "Programming Perl 6", not for a while yet. 13:42
Vish_ Any timelines available?
I'm looking for a good material to learn perl 6. 13:43
perlpilot Vish_: you'd have to talk with TimToady about that. If I were to guess though, I'd say next year at the earliest.
Vish_ Something on the lines of learning perl or the camel book.
perlpilot Vish_: perl6.org has some learning resources
DrForr There are several efforts underway, and people keep pestering me as well :) Is it maybe time to add a learn.perl6.org domain, if we don't already have one? 13:44
Vish_ How can I contact timtoady directly?
perlpilot Vish_: also, you can read the synopses, the docs, the Perl 6 modules, etc. and ask questions here. We're more than happy to help :) 13:45
Vish_ And learn.perl6 sounds like a good idea.
perlpilot Vish_: re contacting TimToady ... if you hang out here long enough, you'll eventually be active around the same time he is active. :) 13:46
Vish_ Hahh. I hope I'll get Lucky someday to talk to larry. Thank u guys. i saw a video where he says this time the book will be a butterfly book coz of camelia. I hope he gets it out soon. 13:48
perlpilot Vish_: Are you a Perl 5 person or just interested in Perl 6?
DrForr I don't think he's interested in that right now. 13:49
Vish_ I'm a perl 5 person
perlpilot Vish_: Are you going to YAPC?
Vish_ I don't if it happening in oz. I'm from sydney. 13:50
DrForr Sydney.pm may be active, have you looked for a local Perl group?
Vish_ I hope Atleast randall shwartz gets learning perl 6 out.
Nope. Probably I should do that. 13:51
DrForr It won't be him, at least I don't remember him talking about it. (at OSCON)
Vish_ Or Brian d foy ?
ZoffixW Probably not. 13:53
Vish_ I'm running out of options. I hope someone releases a book. :p
ZoffixW Vish_, there're a couple of non-perl6.org website resources as well: learnxinyminutes.com/docs/perl6/ perl6intro.com/ and perl6.party/
Vish_, why do you need a book? Perl 6 is a huge language. I think any complete book on the language will be outdated by the time it reaches the printing press. 13:54
Just as CSS and HTML books are
Vish_ Yes those are the resources I'm currently looking into.
Coz I would like to read the thoughts of the language designer in his own words. Also in a book format information is organised 13:55
It's also easier to read from the book.
ZoffixW :/ 13:56
perlpilot Assuming the book is well-written and well-organized.
RabidGravy well, I've written 53 Perl 6 modules and I didn't read a book
gregf_ its easier to fall asleep when reading a book as well *ducks and runs*
ZoffixW Even if it's well-organized, half of it will talk about features you won't have any (immediate) use for.
RabidGravy yaw 13:57
gregf_ docs.perl6.org/ *is quite good for a start*
ZoffixW Yeah, the docs.perl6.org/language.html part covers a good portion of common things. 13:58
Vish_ Well yes and no. Diff people consume info in diff ways. So some people prefer manuals some books and some videos. So the form doesn't matter. But it's good to have all options to cater to the range.
RabidGravy the source is pretty good
jnthn enjoyed reading Programming Perl just as a fun thing to read :) 13:58
ZoffixW The only Perl book I ever read is Modern Perl by chromatic
moritz I liked Higher Order Perl 13:59
RabidGravy all good fun
perlpilot Vish_: either way, I encourage you to continue hanging out on #perl6 and asking questions.
gregf_ havent ever read a book on Perl... only code and IRC :)
moritz and Mastering Regular Expressions, though it's not all perl
Vish_ Thanks pilot 14:00
grondilu learnt most of what he knows about perl with the man pages. Is still hoping there will be something equivalent for perl6 one day. The closest he can find are the synopses.
grondilu likes man pages because he likes to have documentation available on the command line. 14:01
RabidGravy do feel free to make Pod::To::Man 14:02
nine Looks like I'm completely spoiled by Perl 6 already. Tried to use a my scoped package in Perl 5... 14:02
RabidGravy yeah 14:03
perlpilot nine: I'm always typing P6isms in my P5 code. 14:04
RabidGravy mind I always type Perlisms in C too 14:05
perlpilot If I coded more C, I'd probably do that too :) 14:06
perlpilot Years ago, when I was doing C more regularly, I kept trying to use "unless" but that's the only Perlism I can remember using in C 14:07
RabidGravy I go leave out parens a lot 14:08
Juerd When I write C and type "=~" and then realise it doesn't do regexes, I want to just quit and go outside.
RabidGravy :) 14:09
DrForr, how is Prancer doing? Haven't looked in a while
Juerd You just know that the equivalent, no matter how simple, is going to be at least a dozen lines and an annoying loop.
ZoffixW I use single quotes to avoid accidental interpolation... :(
Juerd I came from BASIC originally and can't really get used to single quotes. Sometimes I use them for a while but I tend to get back to ""... 14:10
Even though I first used Perl in 1998...
RabidGravy I can't remember the last time I used regcomp()/regexec() 14:10
Vish_ Quick question ppl. Emacs or vim for perl 6 ? 14:11
ZoffixW Vish_, Atom 14:11
:)
literal whichever editor you prefer for your other coding, of course
Vish_ Haha. But my option is only bw Emacs and vim.
RabidGravy whatever editor you're happiest with
Vish_ I'm in terms of package support 14:12
ZoffixW Vish_, well, I know there are vim P6 highlights, if you use them, never heard of ones for emacs. 14:12
literal vim's syntax highlighting is decent, emacs' is incomplete
RabidGravy I think more people are in favour of vim by a small margin
DrForr RabidGravy: I'm hoping to get some work in on the weekend, mainly making sure it still works with current Crust/perl6.
perlpilot Vish_: I use vim
literal ZoffixW: github.com/hinrik/perl6-mode :) 14:13
Vish_ Awesome. Cool. Thanks.
DrForr I've been focusing on talks and not falling asleep on planes.
And currently beating work repos into submission.
ZoffixW huggable, emacs perl6 :is: github.com/hinrik/perl6-mode
huggable ZoffixW, Added emacs perl6 as github.com/hinrik/perl6-mode
ZoffixW literal, thanks 14:14
Juerd This is probably the only place on the entire internet, where the question 'emacs or vim' does not result in a holy war. 14:15
RabidGravy DrForr, well it still passes all but one test :) 14:16
stevieb my first Perl6 Pull Request... related to discussion here earlier today where t/10-mysql.t in DBIish was not properly skipping tests: github.com/perl6/DBIish/pull/68 14:17
RabidGravy and that is the test being wrong BTW
dalek Iish: 4c04e2e | (Steve Bertrand)++ | t/10-mysql.t:
fixed t/10-mysql.t so it skips properly if mysqlclient not installed
14:18
Iish: a8e1455 | niner++ | t/10-mysql.t:
Merge pull request #68 from stevieb9/mysql_skip_tests

fixed t/10-mysql.t so it skips properly if mysqlclient not installed
RabidGravy what larks 14:19
ugexe thats strange, it used to skip for me at one point (never have mysql installed)
DrForr RabidGravy: Good to hear, I think a wiki will be a nice tiny target to aspire to.
stevieb It may be that with skip(), it had 85 tests manually set. I didn't look, but it may be that more tests were added later, and that 85 was forgotten about. skip-rest() is likely more future-proof anyhow 14:20
RabidGravy but there's an exit after, it should just complain about the wrong number of tests 14:21
weird
stevieb good point. As I've said, I just started really learning p6, and haven't even touched testing yet, so I truly don't know what would have been expected. 14:23
nine The Pg tests use skip-rest already 14:24
stevieb yep
dalek k-simple/declare-build-depends: b76117c | ugexe++ | META6.json:
Declare build-depends
15:10
dalek k-simple: b76117c | ugexe++ | META6.json:
Declare build-depends
15:41
k-simple: 6178e3e | RabidGravy++ | META6.json:
Merge pull request #40 from perl6/declare-build-depends

Declare build-depends
RabidGravy all good
AlexDaniel
.oO( “diff people” – what, how can you diff people? )
16:17
yoleaux 02:39Z <Zoffix> AlexDaniel: wrote the Multi-Server part of the IRC::Client spec. Not overly happy with having server nicknames as methods, but if someone wants to act on a specific server, I guess there's no way around having an identifier. Gonna hack something up on the weekend to get a feel for it: github.com/zoffixznet/perl6-IRC-Cl...-interface
AlexDaniel .tell Zoffix hmm, so is it 「$.irc.X.quit; $.irc.Y.quit」 or 「$.irc.quit: :servers(X, Y)」? 16:30
yoleaux AlexDaniel: I'll pass your message to Zoffix.
AlexDaniel .tell Zoffix I am not sure which one is better, but the last one provides an ability to specify multiple servers at once 16:32
yoleaux AlexDaniel: I'll pass your message to Zoffix.
AlexDaniel .tell Zoffix also, have you thought about throwing an error if e.g. the code says 「$.irc.part: '#perl6';」 but the bot is logged in on #perl6 on multiple servers. Or maybe at least a warning? 16:36
yoleaux AlexDaniel: I'll pass your message to Zoffix.
AlexDaniel Zoffix or maybe it should throw some kind of a warning right when you join the same channel on multiple servers? Or maybe the user may have to :force such actions? I dunno, just brainstorming 16:37
ZoffixW AlexDaniel, :servers() wasn't part of *each* command in what I wrote last night, but yeah, that's a good idea. So basically $.irc.s-whatever.quit is just a shortcut for $.irc.quit: :servers<s-whatever> 16:38
Zoffix .botsnack 16:39
synopsebot6 om nom nom
yoleaux :D
16:30Z <AlexDaniel> Zoffix: hmm, so is it 「$.irc.X.quit; $.irc.Y.quit」 or 「$.irc.quit: :servers(X, Y)」?
16:32Z <AlexDaniel> Zoffix: I am not sure which one is better, but the last one provides an ability to specify multiple servers at once
16:36Z <AlexDaniel> Zoffix: also, have you thought about throwing an error if e.g. the code says 「$.irc.part: '#perl6';」 but the bot is logged in on #perl6 on multiple servers. Or maybe at least a warning?
ZoffixW AlexDaniel, I don't think I'd want a warning or error there. 16:39
And the commands that need a server aren't something that'd be commonly used; at least I don't think so. I think common use would be defining something like method irc-to-me ($msg) { *inspect message and generate output string* $msg.reply: $output } 16:41
The multi-server thing is completely invisible in such use.
ZoffixW Or maybe forgo the $.irc.s-whatever stuff and just require use of :servers. KISS 16:44
ZoffixW (without :servers, command goes out to all servers) 16:44
AlexDaniel huggable: dunno 16:46
huggable AlexDaniel, ¯\_(ツ)_/¯
ZoffixW m: class IRC { multi method irc-to-me ($msg where $msg.what ~~ /^foo/) {say "you said foo"}; multi method irc-to-me ($msg where $msg.what ~~ /^bar/) {say "here's bar"} }; IRC.new.irc-to-me: class {has $.what = 'foo'}.new; IRC.new.irc-to-me: class {has $.what = 'bar'}.new 16:49
camelia rakudo-moar 069b78: OUTPUT«you said foo␤here's bar␤»
ZoffixW Oh, this is lovely \o/
dalek c: dc24fbb | (Jan-Olof Hendig)++ | doc/Type/Dateish.pod:
Added docs for Dateish.daycount
17:47
tony-o anyone have an example of how to write a sub's signature that is passed as a parameter to nativecall whose signature should receive 'const char**'? i've tried using CArray, CPointer (both with [Str]) and have also tried using .deref in the body of the sub - 18:10
i keep ending up with: Internal error: Unwound entire stack and missed handler
i'm attempting to port this example in expat to perl6: sourceforge.net/p/expat/code_git/c...ents.c#l26 18:11
grondilu is it reasonable to hope that one day NativeCall will be able to automatically generate sub declarations from C header files? 18:25
grondilu also I vaguely recall eventually it should be possible to do : 'use someClib:from<C> <funcA funcB>;' 18:26
or something like that 18:27
hoelzro o/ #perl6 18:36
fun bit of miscellanea: I just, for fun, wrote a little shell pipeline to find out how many statements were uttered by each user in this channel over the logs I've kept - 3 years' worth 18:38
and the winner is...
...timotimo, with 91940 messages! 18:39
TimToady I
should
write
more
messages
hoelzro =)
tony-o how many behind is TimToady now? 18:40
hoelzro he's in 6th, with 52991 18:41
granted, this is just the last three years; I don't know how old this channel is
perlpilot Registered : Feb 25 16:36:15 2005 (11y 14w 2d ago) 18:43
it's that old
hoelzro so there's a bit of a gap in my logging =P 18:44
tony-o found my answer, calling .elems after nativecasting the char** to CArray[Str] causes that error ..
timotimo holy hell, how did i manage to chat so much 19:08
mst timotimo: procrastination is an amazing thing 19:10
geekosaur tony-o, that could be either CArray[Str] or CPointer[Str], because C is annoying. and using one when the code expects the other will usually net you a core dump, natch. 19:13
without knowing more about the C code, that's all that can be said
tony-o geekosaur: yea i figured that and tried both - using the CArray[Str] and then iterating two at a time and checkined 'defined'edness seems to work and that's how they're iterating in one of the extended examples 19:14
tony-o since they're not passing the length of the resulting array or anything anywhere it's a little difficult to tell and '.elems' from the nativecast causes the error which makes more sense now, i suppose 19:16
geekosaur right, so defined check is looking for a nullptr at end of array
tony-o yessir
geekosaur wishes C had a real type system 19:17
tony-o which means i might could release a lib-expat XML parser soon
tony-o soon as i hear back from supernovus 19:18
johnjohn101 hi perl6 19:29
how's the speed of perl 6 programs coming along these days? 19:30
lizmat johnjohn101: compared to when in the past ? 19:32
johnjohn101 lizmat: can you compare to perl 5 or so? 19:34
lizmat well, that's a bit comparing apples with pears 19:35
johnjohn101 i know
geekosaur it's faster than it was a month or two ago but still slow. optimizations ongoing
johnjohn101 geekosaur: thanks
geekosaur was watching discussion of another such optimization a couple hours ago
lizmat how long does it take Perl 5 to load Moose with all the extensions you need to get a similar feature set to Perl 6 ?
then again, if you don't need Moose, :-) 19:36
johnjohn101 i don't use moose
Juerd I really wouldn't use Moose, mostly because of the startup overhead.
johnjohn101 i really don't use much in the way of OO
lizmat do you use BigInt ?
RabidGravy tony-o, look forward to it, XML::Class is somewhat slow due to XML being somewhat inefficient
johnjohn101 lizmat: no most of my coding is used for dbi with sqlserver. 19:37
ZoffixW johnjohn101, we actually have a FAQ entry for your question: docs.perl6.org/language/faq#Is_Perl..._for_me%3F
johnjohn101 my favorite perl lib at the moment is xml::twig!
lizmat ZoffixW++
johnjohn101: then you'll love NativeCall I think 19:38
perlpilot johnjohn101: Just use Inline::Perl5 and you can still have XML::Twig ;)
johnjohn101 oh wow
ZoffixW huggable, Inline::Perl5 19:39
huggable ZoffixW, Inline::Perl5 lets you use most of Perl 5's CPAN from Perl 6. See modules.perl6.org/repo/Inline::Perl5 and the talk about the module www.youtube.com/watch?v=CEs1g94qNso
RabidGravy anyway, I reckon I can make the functional equivalent of SQL::Abstract in about a third of the code 19:40
ZoffixW johnjohn101, more on the speed thing, including ways you can optimize: perl6.party/post/Perl-6-Is-Slower-T...-Fat-Momma 19:43
perlpilot RabidGravy: what would be nice would be an SQL::Parser that knows about all of the various database specific syntaxes. 19:45
RabidGravy single grammar with some roles for the dialect parts 19:47
tony-o perlpilot++
ZoffixW m: role Bar { token dem-digits { \d+ } }; grammar Foo does Bar { token TOP { <dem-digits>+ } }.parse('42').say 19:48
camelia rakudo-moar 069b78: OUTPUT«「42」␤ dem-digits => 「42」␤»
ZoffixW wow. I didn't know grammars could do roles :o
RabidGravy there just classes with a specialised Metaclass 19:49
they're
mst dem digits dem digits dem ... numeric digits 19:50
xfix perl6: say 4 ∈ [∩] 19:54
camelia rakudo-jvm 40a953: OUTPUT«cannot connect to eval server: Connection refused␤»
..rakudo-moar 069b78: OUTPUT«False␤»
TimToady m: say 4 ∈ ∅ 19:56
camelia rakudo-moar 069b78: OUTPUT«False␤»
TimToady shorter way to write that :)
japhb lizmat: Speaking of ZoffixW's comment about "ways you can optimize", is there a doc somewhere that lists all the things you've been doing to the setting for performance work? Something like a superset of the commit comment from github.com/rakudo/rakudo/commit/67d3b69 .... 20:01
lizmat japhb: no, there is not, afaik 20:08
but a lot of these are nqp/settings specific 20:09
and many are pretty general, like not setting a flag inside a loop, if you can set it after the loop has finished
dogbert17 o/ #perl6 20:10
for doc purposes, what is the method Exception.resumable used for? 20:12
the code is short: nqp::p6bool(nqp::istrue(nqp::atkey($!ex, 'resume'))); 20:14
lizmat looks like it's a flag on the exception indicating it's resumable ? 20:15
johnjohn101 i guess i can now load rakudo on win64 now?
dogbert17 lizmat: that would imply that not exceptions are resumable? 20:16
s/not/not all/
lizmat I guess so, but I'm only assuming myself here... perhaps timotimo or jnthn have a better idea
dogbert17 lizmat: thanks, I wonder where they are :) 20:17
dogbert17 the docs say: " Any exception handled by the user can be resumed ..." doc.perl6.org/language/exceptions#R...Exceptions 20:18
timotimo oh?
i thought only warnings can be resumed. or perhaps control exceptions?
dogbert17 timotimo: I have noticed that the docs are wrong occasionally :) 20:19
RabidGravy m: CATCH { default { $_.resume } }; die "foo"; say "alive" 20:21
camelia rakudo-moar 069b78: OUTPUT«alive␤»
dogbert17 it's alive
timotimo oh 20:23
well, ok then :)
dogbert17 m: CATCH { default { $_.resume if $_.resumable } }; die "foo"; say "alive" 20:24
camelia rakudo-moar 069b78: OUTPUT«This representation (VMException) does not support associative access (for type BOOTException)␤ in block at /tmp/L0ZqgLtVYP line 1␤ in block <unit> at /tmp/L0ZqgLtVYP line 1␤␤»
timotimo whoops :)
dogbert17 WAT
dogbert17 maybe I should hold on documenting this :) 20:27
if everything that can be caught is resumable then why do we have this method I wonder 20:29
psch hm, do we need a new nqp op for VMException.resumable..? 20:30
'cause (at least on nqp-j) that's just a field in the VMExceptionInstance
oh, or is VMException visible in src/core/Exception.pm and we can just getattr..? 20:31
[Coke] wanders onto IRC a little late today. 20:44
timotimo dogbert17: try resuming an "invalid argument" exception :)
m: sub foo(Int $bar) { say "alive" }; CATCH { default { .resume } }; foo("hello"); say "yo";
camelia rakudo-moar 069b78: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Sga19G_osm␤Calling foo(Str) will never work with declared signature (Int $bar)␤at /tmp/Sga19G_osm:1␤------> 3live" }; CATCH { default { .resume } }; 7⏏5foo("hello"); say "yo";␤»
timotimo oh, haha
good job, compiler
m: sub foo(Int $bar) { say "alive" }; CATCH { default { .resume } }; foo(now ~ "hello"); say "yo"; 20:45
camelia rakudo-moar 069b78: OUTPUT«yo␤»
timotimo ^- can't be resumed, at least not into the sub
lizmat .tell pmurias this could be of interest ? zeit.co/blog/async-and-await 20:53
yoleaux lizmat: I'll pass your message to pmurias.
timotimo how do i debug nativecall 21:00
timotimo what the ... even when the sub in question isn't native ... 21:02
timotimo oh, derp 21:03
AlexDaniel hoelzro: how many of these messages were sent because timotimo was talking to himself? 21:07
timotimo probably a whole many 21:08
frankdaza Hi everyone. ¿Is there a web framework 100% compatible for Perl 6 ? 21:29
RabidGravy there are web frameworks, not sure what "100% compatible" means 21:33
RabidGravy Bailador, Crust, possibly others 21:34
dogbert17 There's a tap example at doc.perl6.org/type/Tap which does not work. Does the Supply have to come from a Supplier instead of created by Supply.new? 21:50
gfldex m: my $s = Supplier.new; my $tap = $s.Supply.tap( -> $v { say "the value is $v" }, done => { say "Supply is done" }, closing => { say "Tap closed" }, quit => -> $ex { say "Supply finished with error $ex" }, ); $tap.close; 21:53
camelia ( no output )
dogbert17 gfldex: many thanks, do you want to change the docs or should I? 22:00
gfldex dogbert17: take it pls 22:01
RabidGravy dogbert17, yes, or could be created by supply { } or from-list or something 22:01
dogbert17 gfldex: consider it done
RabidGravy: thx to you as well 22:02
dalek c: 574fb4d | (Jan-Olof Hendig)++ | doc/Type/Tap.pod:
Fixed broken code example. gfldex++ for the code
22:12