»ö« 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:02 cpage_ left, telex left, troys is now known as troys_ 00:07 cpage_ joined 00:09 firstdayonthejob left
samcv hmm what is the way to check if a Proc::Async process is still running? I thought it was $proc.kill(0) but it's always returning 0 00:15
before and after the program is killed. even after awaiting for the process is finished still returns 0
00:16 stmuk_ joined
samcv docs.perl6.org doesn't say this but S29 says: The special signal 0 can be sent which does not actually deliver a signal at all, and is used to determine if processes are still running: say "Still running" if $proc.kill(0); i think that's where i read about it initially 00:17
00:18 telex joined 00:20 stmuk left, kyclark left 00:23 cpage_ left 00:25 pierre_ joined, pierre_ left, pierre_ joined 00:38 sufrostico left 00:40 sufrostico joined, Actualeyes left 00:45 sufrostico left 00:47 sufrostico joined 00:49 kyclark joined 00:53 cpage_ joined 00:55 sufrostico left
MasterDuke kyclark: "because check of the data" is either missing a "the" or should be "checking the data" 00:58
kyclark: "if we have a the forward or reverse strand" has an extra "the" 00:59
01:00 Actualeyes joined, kyclark left
samcv ahh actually S17 about proc async doesn't mention it... maybe the kill(0) isn't something you can do on proc async objects yet? 01:00
S29 is about running programs other ways
and the .started method for proc async objects only returns whether .start has been called on it already, not whether it's currently running 01:02
01:06 kyclark joined 01:11 sufrostico joined
kyclark Thanks. 01:12
MasterDuke samcv: .exitcode of the Proc says "Returns the exit code of the external process, or -1 if it has not exited yet.", but i guess you still wouldn't know if it actually had started yet
kyclark Is it possible to integrate matplotlib (Python) directly from Perl 6?
Or any plotting program, e.g., gnuplot?
samcv thanks MasterDuke 01:13
AlexDaniel kyclark: I think right now you'll have to use Inline::Python or something
MasterDuke kyclark: i've used SVG::Plot
samcv MasterDuke, .exitcode is not a method for Proc::Async 01:14
MasterDuke or Inline:Perl5 and Chart::Gnuplot
01:16 canopus left
MasterDuke samcv: correct, it's Proc.exitcode(), you can get the Proc from awaiting the promise that Proc::Async.start() gave you 01:16
samcv i need to check after it's already been started though. how do i get the proc object created by proc::async.start? 01:20
awaiting doesn't really help me since i need to determine if it's still running while it's running 01:21
01:22 kyclark left 01:23 canopus joined
MasterDuke Proc::Async.start(), "Returns a promise that will be kept with a Proc object once the external program exits, and that will be broken if the program cannot be started." 01:28
samcv: i agree, Promise, Proc, Proc::Async are all a bit confusing
Xliff Supplier, Supplies... 01:29
MasterDuke and i'm not sure how to do what you're asking
Xliff I'm still trying to go through it all.
samcv heh Xliff
Xliff MasterDuke: Sounds like he's trying to start an external program in P6, then come back later and check to see that it is still running.
MasterDuke yeah, and i don't know a great way to do that 01:31
Xliff So, I think you are fine. If you can get a Promise from Proc::Async, then as long as that promise has not been kept or broken, the program should still be running.
samcv oh MasterDuke i can do $promise.status and if it's kept then know it's not running 01:32
MasterDuke sure
samcv that works for me
what i'm needing to do is before outputting to the external program, check if it's still running, and if it's not, start it again. so that should work 01:33
well will just make a new promise and new proc async object into the same variables basically 01:34
Xliff samcv: $process_still_running = $async_promise.status == Planned
samcv yea
Xliff kk then. 01:35
Good Luck! ;)
samcv though idk if you can use == though
01:35 troys_ is now known as troys
samcv i would probably use ~~. == is for numerical equality 01:35
so don't use that
Xliff It's an enum. == should be fine.
samcv ah ok 01:36
it does work just tested
Xliff Good to check, though.
samcv now gonna read infix == docs :P
hmm Coerces both arguments to Numeric if necessary, and returns True if they are equal. 01:37
Xliff Awww... poor puppy! ]8-)
Yes. And enums are numeric at heart.
samcv yeah. what's what i was thinking must be true
otherwise it wouldn't make much sense 01:38
Xliff Although I am thinking it is not that simple in rakudo.
samcv m: say Planned.Int; say Kept.Int;
camelia rakudo-moar ee8ae9: OUTPUT«0␤1␤»
samcv it is true :)
Xliff m: say Broken.Int 01:39
camelia rakudo-moar ee8ae9: OUTPUT«2␤»
samcv my enum PromiseStatus (:Planned(0), :Kept(1), :Broken(2)); there in rakudo 01:42
01:44 ugjka left 01:47 ugjka joined 02:04 girafe left
Xliff But of course! 02:04
02:05 nadim left
Xliff Does anyone know of any examples that use LWP::Simple to send POST with form data? 02:06
dj_goku Xliff: maybe metacpan.org/pod/LWP::Simple::Post 02:13
02:15 Actualeyes left 02:19 skids joined 02:23 troys is now known as troys_
Xliff dj_goku++: Looks promising. Thanks! 02:29
Hrm... 02:30
Still a little raw, from the looks of it, though.
02:40 kyclark joined 02:41 Actualeyes joined 02:42 evdubs joined, mayathecat joined 02:46 Actualeyes left, ilbot3 left 02:48 ilbot3 joined 02:50 mayathecat left, labster left 02:51 Actualeyes joined 02:52 dataangel joined 02:57 aborazmeh joined, aborazmeh left, aborazmeh joined 03:05 pierre_ left 03:14 pierre_ joined 03:18 pierre_ left
kyclark Given a list of two elements, is there a quick way to make them into a Pair? 03:18
m: "1 2".split(/\s+/) 03:19
camelia ( no output )
kyclark m: put "1 2".split(/\s+/)
camelia rakudo-moar ee8ae9: OUTPUT«1 2␤»
kyclark m: put %("1 2".split(/\s+/)) 03:27
camelia rakudo-moar ee8ae9: OUTPUT«1 2␤»
kyclark m: say %("1 2".split(/\s+/)).WHAT
camelia rakudo-moar ee8ae9: OUTPUT«(Hash)␤»
kyclark m: put %("1 2".split(/\s+/)).perl 03:28
camelia rakudo-moar ee8ae9: OUTPUT«{"1" => "2"}␤»
03:28 labster joined, pierre_ joined 03:32 aborazmeh left, mayathecat joined 03:37 mayathecat left 03:39 BenGoldberg joined
AlexDaniel m: say [=>] "1 2".split(/\s+/) 03:40
camelia rakudo-moar ee8ae9: OUTPUT«1 => 2␤»
AlexDaniel kyclark: ↑ ?
03:40 noganex joined
dj_goku Xliff: why not something in perl6? 03:40
kyclark Yeah, sort of. I’ve got a file of lines that I want to make into a hash, but I’m realizing I’m going the wrong way. But this did work: 03:41
$file.IO.lines.map(*.split(/\s+/)).flat.pairup;
AlexDaniel pairup, yeah!
kyclark I was trying to remember that [] thing. How can I remember that?
AlexDaniel it is just a reduction 03:42
kyclark Just gotta use it some more.
AlexDaniel like in [+] 2, 5, 15, 20
but you can use any other operator, e.g. =>
Xliff dj_goku: I am in the process of working on that, now.
kyclark That’s really cool. I’m feeling small right now. I want to convert some R code into Perl 6 and make some cool plots like I might in R or Python, but we’ve no such libraries (yet) 03:43
03:43 noganex_ left
Xliff There's SVG::Plot 03:43
But I don't know what you are trying to do, so I couldn't tell you if that would work, for sure.
AlexDaniel committable6: stdin hello world test␤foo bar␤ 03:45
committable6 AlexDaniel, STDIN is set to «hello world test␤foo bar␤»
AlexDaniel committable6: HEAD say lines.map(*.split(/\s+/, 2)).flat.pairup
committable6 AlexDaniel, ¦«HEAD»: (hello => world test foo => bar)
AlexDaniel committable6: HEAD say lines.map([=>] *.split(/\s+/, 2))
committable6 AlexDaniel, ¦«HEAD»: Too few positionals passed; expected 2 arguments but got 1␤ in block <unit> at /tmp/tyoyTJqw24 line 1␤ «exit code = 1»
AlexDaniel right 03:46
Xliff m: sub a($s) { $s ~ 'a'; } "Testing"."a"().say
camelia rakudo-moar ee8ae9: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Strange text after block (missing semicolon or comma?)␤at <tmp>:1␤------> 3sub a($s) { $s ~ 'a'; }7⏏5 "Testing"."a"().say␤ expecting any of:␤ infix␤ infix stopper␤ s…»
Xliff hrm.
Just when I think I get the hang on something. 03:47
AlexDaniel m: sub a($s) { $s ~ ‘a’; }; ::("&a")(‘Testing’).say 03:49
camelia rakudo-moar ee8ae9: OUTPUT«Testinga␤»
AlexDaniel Xliff: I have no idea what were you trying to do
dj_goku Xliff: :D 03:50
AlexDaniel perhaps if you can say what your goal is, we can give a better answer
Xliff $obj."$meth"() was it?
gfldex samcv: did you check if stdout is not closed yet? (does not work for all programs tho)
Xliff A way of augmenting a class without actually using "augment"
I'll have to look it up later. 03:51
m: $a = 'aa' => 42; say $a.list; 03:54
camelia rakudo-moar ee8ae9: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Variable '$a' is not declared␤at <tmp>:1␤------> 3<BOL>7⏏5$a = 'aa' => 42; say $a.list;␤»
Xliff m: my $a = 'aa' => 42; say $a.list;
camelia rakudo-moar ee8ae9: OUTPUT«(aa => 42)␤»
kyclark Do junction type constraints work like “Str|Regex”? 04:03
I have a method that could take either a Str or a Regex for a given param (it would be used for “split") 04:04
BenGoldberg Try it and see. 04:08
04:09 labster left
kyclark Sorry, I did, and it complained. I guess I was wondering if I had the wrong syntax. 04:09
I thought I remembered seeing that somewhere. 04:10
MasterDuke m: sub a($b where Str|Array) { say $b.WHAT }; a([1, 2, 3]); a("abc") 04:11
camelia rakudo-moar ee8ae9: OUTPUT«(Array)␤(Str)␤»
MasterDuke m: sub a($b where Str|Array) { say $b.WHAT }; a([1, 2, 3]); a("abc"); a(2) 04:12
camelia rakudo-moar ee8ae9: OUTPUT«(Array)␤(Str)␤Constraint type check failed for parameter '$b'␤ in sub a at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
04:16 kyclark left
AlexDaniel MasterDuke: this example asks for +@b :) 04:17
04:19 labster joined
AlexDaniel m: sub a(+@b) { [+] @b».chars }; say a([‘abc’, ‘a’, ‘zz’]); say a("abc", ‘z’) 04:19
camelia rakudo-moar ee8ae9: OUTPUT«6␤4␤»
04:20 evdubs left, raiph left 04:21 raiph joined
MasterDuke i haven't played with with the different kinds of slurpy parameters. i've read the docs about + vs *, but that's about it 04:21
04:25 ggoebel left 04:30 raiph left, raiph joined 04:32 rpburkholder left 04:45 pierre_ left
BenGoldberg m: my \SorA = Str|Array; sub a(SorA $x) { $x.WHAT.say }; a( [] ); 04:51
camelia rakudo-moar ee8ae9: OUTPUT«===SORRY!===␤No compile-time value for SorA␤»
BenGoldberg m: constant SorA = Str|Array; sub a(SorA $x) { $x.WHAT.say }; a( [] ); 04:52
camelia rakudo-moar ee8ae9: OUTPUT«Type check failed in binding to $x; expected Junction but got Array ($[])␤ in sub a at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
BenGoldberg m: constant SorA = Str|Array; sub a($x where SorA) { $x.WHAT.say }; a( [] );
camelia rakudo-moar ee8ae9: OUTPUT«(Array)␤»
04:52 pierre_ joined, labster left
BenGoldberg m: constant SorA = Str|Array; sub a(SorA $x) { $x.WHAT.say }; a( "is this useful?" | [] ); 04:53
camelia rakudo-moar ee8ae9: OUTPUT«(Junction)␤»
BenGoldberg m: constant SorA = Str|Array; sub a(SorA $x) { $x.WHAT.say }; a( 42 | [] );
camelia rakudo-moar ee8ae9: OUTPUT«(Junction)␤»
BenGoldberg m: constant SorA = Str|Array; sub a(SorA $x) { dd $x }; a( 42 | {} );
camelia rakudo-moar ee8ae9: OUTPUT«Constraint type check failed for parameter '$x'␤ in sub a at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
BenGoldberg m: constant SorA = Str|Array; sub a(SorA $x) { dd $x }; a( 42 | [] );
camelia rakudo-moar ee8ae9: OUTPUT«any(42, [])␤»
BenGoldberg m: constant SorA = Str|Array; sub a(SorA $x) { dd $x }; a( 42 ^ [] ); 04:54
camelia rakudo-moar ee8ae9: OUTPUT«one(42, [])␤»
BenGoldberg m: constant SorA = Str|Array; sub a(SorA $x) { dd $x }; a( 42 ^ &a );
camelia rakudo-moar ee8ae9: OUTPUT«Constraint type check failed for parameter '$x'␤ in sub a at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
BenGoldberg m: constant SorA = Str|Array; sub a(SorA $x) { dd $x }; a( 42 ^ sub { "foo" } );
camelia rakudo-moar ee8ae9: OUTPUT«Constraint type check failed for parameter '$x'␤ in sub a at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
BenGoldberg m: constant SorA = Str|Array; sub a(SorA $x) { dd $x }; a( [] | [] ); 04:55
camelia rakudo-moar ee8ae9: OUTPUT«any([], [])␤»
BenGoldberg m: constant SorA = Str|Array; sub a(SorA $x) { dd $x }; a( [] | ( 42 & pi ) );
camelia rakudo-moar ee8ae9: OUTPUT«any([], all(42, 3.14159265358979e0))␤»
BenGoldberg m: constant SorA = Str|Array; sub a(SorA $x) { dd $x }; a( [] | ( 42 & pi & sub { "why not?" } ) ); 04:56
camelia rakudo-moar ee8ae9: OUTPUT«any([], all(42, 3.14159265358979e0, sub () { #`(Sub|70531392) ... }))␤»
BenGoldberg m: constant SorA = Str|Array; sub a(SorA $x) { dd $x }; a( [] | sub { "why not?" } );
camelia rakudo-moar ee8ae9: OUTPUT«any([], sub () { #`(Sub|54537016) ... })␤»
BenGoldberg m: constant SorA = Str|Array; sub a(SorA $x) { dd $x }; a( sub { "why?" } | sub { "why not?" } ); 04:57
camelia rakudo-moar ee8ae9: OUTPUT«Constraint type check failed for parameter '$x'␤ in sub a at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
04:57 pierre_ left, skids left
dj_goku is there a way to add to a buf? 05:15
AlexDaniel m: my $b = Buf.new(1, 2, 3); $b.push(42); say $b 05:17
camelia rakudo-moar ee8ae9: OUTPUT«Buf:0x<01 02 03 2a>␤»
AlexDaniel dj_goku: is that what you mean?
05:21 Cabanossi left 05:22 Cabanossi joined 05:23 bjz joined
dj_goku AlexDaniel: yes! I am trying to start something up using nc -ul 9999 and interface with IO::Socket::Async, but when I try to $socket.print-to() it doesn't print out. 05:29
05:31 bjz left 05:33 troys_ is now known as troys 05:43 bjz joined 05:53 pierre_ joined 05:55 BenGoldberg left 05:58 pierre_ left 06:00 rurban joined, rurban left 06:02 bjz left 06:11 xinming_ joined 06:13 Tonik joined 06:14 xinming left 06:16 troys left 06:20 xinming_ left 06:21 xinming joined, pierre_ joined 06:23 wamba joined 06:30 officialsandeep8 joined, cyphase left
officialsandeep8 What is the difference between Perl 5 and Perl 6? 06:31
06:36 cyphase joined 06:40 rurban joined
gfldex officialsandeep8: see the 5to6-* sections on docs.perl6.org/language.html 06:42
06:44 domidumont joined 06:48 domidumont left, domidumont joined 06:49 domidumont left 06:50 domidumont joined 06:52 RabidGravy joined, domidumont left, domidumont joined 06:59 labster joined 07:00 officialsandeep8 left 07:02 cyphase left 07:06 AlexDaniel left, cyphase joined, abraxxa joined 07:11 abraxxa left 07:12 neuraload joined 07:13 eivindgl joined
RabidGravy boom! 07:15
07:19 darutoko joined 07:22 pierre_ left, cyphase left 07:23 RabidGravy left 07:27 cyphase joined, pierre_ joined
seatek I just had to create a Crust::Middleware::Sessions::Store for databases using DBIish (instead of storing in memory/cookies). Figured I might as well upload it for others. But I don't even know where to begin. Just upload it to my own github account? 07:33
07:33 firstdayonthejob joined
gfldex seatek: yes 07:36
seatek: if you link the repo I can gladly tell you what you did wrong. :->
seatek cheeky gfldex ;)
ok :)
i put my public ssh key up there.... now i guess i just have to create the repo there... can't just push to something that doesn't exist there yet already i imagine 07:37
07:40 firstdayonthejob left
seatek ugh web interfaces 07:41
07:41 xinming left 07:42 abraxxa joined, bjz joined
[ptc] seatek: if you don't like web interfaces, maybe this will come in handy: github.com/ingydotnet/git-hub 07:44
seatek [ptc] oh my gosh i'm going to set that up to use from now on. just did the web interface finally before i saw it though 07:46
gfldex: ok there it is, and i have no idea how to write tests for it outside of here (since everyone has their own database auth stuff). but it passes all Crust::Middleware::Session tests when it's used as the storage backend 07:48
github.com/adaptiveoptics/Crust-Mi...ore-DBIish 07:49
decided to use JSON::Fast from timotimo to do the serialization for the database. since it's so superior to JSON::Tiny ;) 07:52
hehe
honestly i hate storing any kind of session data to a database. it ends up like the... "i'll get around to that some day" garbage heap 07:57
07:57 [ptc] joined
seatek oh i should put in some column type information 07:58
moritz \o 08:00
Hello from the Devops days Berlin!
08:03 bjz left
[ptc] o/ 08:05
08:06 cyphase left
[ptc] moritz: I'm interested to hear how the conference goes 08:06
moritz: your work is a sponsor, am I right?
08:11 cyphase joined 08:14 aindilis joined 08:18 rindolf joined
TimToady d 08:19
08:19 rurban left 08:20 rurban joined
moritz [ptc]: it is 08:20
[ptc]: will tell you once I know :-)
08:22 rurban left 08:23 rindolf left
[ptc] moritz: hope you have a good tim e:-) 08:23
08:23 zakharyas joined
[ptc] *time 08:23
moritz [ptc]: thanks
08:26 domm1 left
seatek gfldex: i assume the perfection has left you speechless in awe 08:26
gfldex: honestly, have no idea what i'm doing there. Needed a META whatever, which I completely guessed at 08:27
08:27 domm joined
seatek and it drives me nuts not having a test for it, but i don't know how i possibly could, considering it needs both the Crust PSGI interface AND a database connection 08:28
so i just test it here ;)
avalenn_ is there any way to have localized month names with strftime ?
08:30 bjz joined
masak morning, #perl6 08:32
08:32 pierre_ left, cpage left, xinming joined 08:36 ufobat joined 08:37 pierre_ joined
seatek avalenn_: do you mean with DateTime::Format? I think it uses native strftime... ? so shoudl be 08:38
oh docs on it say It also comes with some localizations for month and day names. 08:39
avalenn_ I tested and localization seems not to work. 08:40
08:41 pierre_ left
avalenn_ and some strftime codes are not recognised 08:42
08:43 brillenfux joined 08:44 nadim joined
seatek %B is recognized -- i just checked 08:44
it spoke french to me.. unsettling
use DateTime::Format; 08:45
use DateTime::Format::Lang::FR;
my $d = DateTime.new(now);
strftime("%B", $d, :lang<fr>);
and it will say: novembre
08:48 trnh joined, trnh left, trnh joined 08:49 g4 joined
avalenn_ I lacked the :lang attribute 08:57
thank you 08:58
08:59 brrt joined
brrt \o #perl6 08:59
I would like to help out and write an advent calendar post 09:00
moritz \o/
brrt let me see if I actually have a commit bit :-) 09:04
DrForr github.com/perl6/mu/blob/master/mi...6/schedule
I need to add mine when I come up with something. 09:05
moritz brrt: if not, tell me your github userid
dalek : 41619f2 | brrt++ | misc/perl6advent-2016/schedule:
Add myself to the advent calendar list

Would like to write a post from the perspective of perl6 as a hackable language with a hackable JIT compiler (which is after all the aim :-))
09:07
brrt I can haz one
moritz brrt++
everybody who can't log in on perl6advent.wordpress.com, please /msg me your email address, I'll send you an invite 09:08
brrt if you are in a pinch, I have another topic in the waiting, but that will require some more upfront work 09:09
i.e. the original work was done in perl5 and in python, so it would have to be ported
.ask masak I wonder what you think of the 'hackable language' idea, and if maybe 007 can fit in
yoleaux brrt: I'll pass your message to masak.
09:11 Actualeyes left 09:12 pierre_ joined
brrt moritz: I can log in 09:16
so, yay
09:19 wamba left 09:23 Sgeo_ left 09:32 khw joined 09:33 dakkar joined 09:35 Actualeyes joined 09:37 labster left 09:42 domm left, domm joined 09:51 cdg joined 09:52 ocbtec joined 09:53 cdg left 09:54 cyphase left, cdg joined 09:59 cyphase joined 10:10 bjz_ joined 10:11 bjz left 10:12 gregf_ joined 10:14 camelia left 10:15 camelia joined 10:16 ChanServ sets mode: +v camelia 10:20 pierre_ left 10:21 camelia left, cpage_ left, camelia joined 10:22 mohae_ left 10:23 ChanServ sets mode: +v camelia, mohae joined 10:25 dalek left 10:26 dalek joined, ChanServ sets mode: +v dalek, pierre_ joined 10:27 jonas2 joined
tbrowder hi, #perl6 10:30
masak \o
yoleaux 09:09Z <brrt> masak: I wonder what you think of the 'hackable language' idea, and if maybe 007 can fit in
tbrowder o/ masak!
10:30 pierre_ left
tbrowder I hate to be a Scrooge as we approach the Advent season, but I have a complaint about the font faces on the docs site. 10:31
masak let's hear it 10:32
brrt: yes -- quite possibly. let's discuss it more
tbrowder The use of the sans-serif font for most Roman text hides things form those without perfect vision, and also from those with, and I think it really must confuse those who native alphabet doesn't use all the Roman letters. 10:33
huf i dont think anyone on the internet is surprised by sans-serif fonts... that would be very strange. 10:34
but maybe it's harder to read, i dunno 10:35
tbrowder For example, take the module "DBIish": The "I" looks like an 'ell' but it's an upper case "I" (eye).
brrt I think the idea of a 'hackable language' is that you can fit in any abstraction you'd like 10:36
or rather, the language can evolve with your abstractions, doesn't force them on you 10:37
10:37 pierre_ joined
tbrowder Even if one must use sans-serif, there must be some that distinguish between such characters (also: the digit "one" versus the letter "ell" and digit "zero" from letter "oh"...) 10:37
huf nah, those fonts are notorious for the I1l problem
brrt that can help when new paradigms appear (like neural nets / tensorflow
huf which is why they're absolutely horrible for programming
tbrowder Uh, pardon me, but a hackable language is a poor common denominator for communication among diverse cultures. 10:38
huf wat
brrt i wonder what you mean with diverse cultures 10:39
and, I disagree
masak brrt: 'hackable language' is pretty much what 007 aspires to be
brrt natural languages are hackable almost to a fault
masak tbrowder: I respectfully disagree
brrt ambiguity is a problem, but not an insurmountable
tbrowder So we each use a word as we want it to mean, with no common definition? 10:40
Bah, humbug!
10:40 maybekoo2 joined
masak tbrowder: don't know if you're serious, but you're putting up a bit of a strawman to knock down 10:41
no-one suggested words should have no fixed meaning :)
I would suggest that CPAN *already* shows that "hackable language" is a viable strategy
huf also this is already the case because nearly every language lets you write functions and any sizeable codebase is mostly calls to those functions 10:42
masak Perl 6 simply aims to do it a bit more formally
huf and those are already whatever you want them to be
brrt it's just that 'fixed' is a kind of relative idea :-P
huf so this is both already the case in every progland and not the case at all in any progland
g
impressive strawman :)
brrt the whole question is how to allow language to be extended while still enabling communication 10:43
natural languages allow words to be... combined, and modified, and inflected (I think is the word)
based on the rules of grammar and usage
dalek c: 73f7a31 | seatek++ | doc/Language/modules.pod6:
Create META.info files not META6.json files

Assuming that's what everyone wants now, since that's all that seems to be used.
synopsebot6 Link: doc.perl6.org/language/modules
timotimo flex all the words
brrt but it is because those changes are themselves limited by rules that we can understand what they mean 10:44
tbrowder I guess I don't understand what is meant by a hackable language (unless you're referring to Perl 6 and other such languages. My whole problem here is the visual words on a page and being able to distinguish individual characters.
brrt and the same holds for perl6, I think
huf tbrowder: you pick the fonts you see 10:45
brrt It is a good question because the concept is not very strictly defined? 10:48
unless someone knows of a definition
dalek osystem: 97cdaa0 | seatek++ | META.list:
Crust::Middleware::Session::Store::DBIish added

Implements a DBIish database backend store for Crust::Middleware::Session stuff
10:49
tbrowder huf: okay, I can do that, but I don't usually have to customize my browser for every site I go to--just saying. 10:51
(puts Scrooge persona away...)
huf i gave up on fonts as picked by other people long ago
they almost invariably pick bad ones 10:52
i suppose it's fashion
10:52 canopus left
tbrowder Another subject: are the advent articles expected to be original, i.e., never have appeared before? 10:53
10:59 canopus joined 11:00 isacloud left 11:01 isacloud joined 11:02 cpage_ joined 11:22 spebern joined 11:23 domidumont left
tbrowder .tell moritz Are the advent articles expected to be original, i.e., never have appeared before? 11:23
yoleaux tbrowder: I'll pass your message to moritz.
spebern hi, I have a question concerning NativeCall: I want to use the following function to get the name of a excel worksheet: FREEXL_DECLARE int freexl_get_worksheet_name (const void *xls_handle, unsigned short sheet_index, const char **string); 11:25
my first idea was that this should boil down to sub freexl_select_active_worksheet(Pointer $xls_handle, uint16 $sheet_index --> int32) is native(&freexl_lib) { * }
11:26 pierre_ left
spebern ups, I meant: sub freexl_get_worksheet_name(Pointer $xls_handle, uint16 $sheet_index, Pointer[Str] $name --> int32) 11:26
is native(&freexl_lib) { * }
11:26 AlexDaniel joined, rindolf joined
spebern I also tried Str $name is rw, but $name will never store the worksheet after calling the function 11:27
timotimo oooooh, you're working on excel spreadsheet support?
spebern yes I wanted to give it a try, everything works so far
timotimo that's super cool
spebern it works perfectly
the only problem is the double pointer 11:28
timotimo can it handle the newest excel versions already? i see the last release is from 2015-07, so more than a year old ...
spebern it handles xls
timotimo oh, so not the new format. understood.
spebern I only found a commercial lib handling xls 11:29
*xlsx
timotimo ugh ;(
spebern I thought char* boils down to Str, so shouldnt char** be "Str is rw" ? 11:30
timotimo thing is, if you pass a Str in, we'll decode it (by default to utf8) and pass a pointer to our "temporary" char array
i'm not sure how nativecall handles getting a pointer to a string back 11:31
personally, i'd probably fumble around with CArray here
oh, what. freexl ignores formulas? 11:32
that makes it not interesting to what i was thinking of >_<
spebern ok, so I'll try CArray. Thanks :-). I'm more than amazed how easy to use NativeCall already is!
timotimo good luck!
11:32 cyphase left
spebern only found a xlsx lib in objective c -.- 11:33
11:37 spebern left
viki tbrowder: it'd be preferable, since the Advent may be read by people who saw the in-original post before. 11:37
gfldex seatek: did crust install for you without problems? 11:42
seatek gfldex: yup no problem. but that was a few days ago... something might have happened in the meantime? 11:45
11:45 cdg left
gfldex seatek: i'm getting failing tests in Crust itself, some Auth stuff doesn't work 11:46
seatek gfldex: lemme try on a system i haven't used for a while -0 that never had it on it -- i'll update current stuff and give it a shot 11:48
wow crust has a lot of dependencies 11:51
timotimo it brings together the best code at your fingertips 11:52
11:52 wamba joined
seatek gfldex: installed perfectly fine for me. you probably broke your perl with all the funny stuff you do 11:53
timotimo: it IS sooo nice to have here :)
i've been using the SCGI interface in it, with an nginx frontend
timotimo: oh I'm using your JSON::Fast to serialize session data in Crust::Middleware::Sessions for DBIish backends 11:54
11:54 skids joined
seatek i figure that's best if it's so fast... ;) since it has to be done every hit on the website doing session data 11:55
timotimo yeah. i wish it were a bit faster still :| 11:56
seatek i think you might be obsessed
it's very fast!
timotimo are you kidding ... 11:57
seatek i just hope it serializes all kinds of data properly
timotimo only if you accept the general slowness of perl6 :P
i'm not responsible for *that* part :D
the first version i stole from JSON::Tiny, the second version is 1:1 JSON::Faster
masak .oO( note to self: try not to call people who make Perl 6 modules faster "obsessed" ) :P 11:58
seatek hehe true masak :)
timotimo seatek: how long would you expect a 50 megabyte json file to be loaded? 11:59
python's json module - though it is written in C if i'm not mistaken - does it in about two or three seconds. JSON::Fast takes about 45 seconds 12:01
not to mention how much RAM it noms
seatek that would be horrific! 12:02
why would anyone do that? 12:03
timotimo clientupdate-v6.cursecdn.com/feed/a...e.json.bz2 - this real-life piece of data 12:04
12:04 ggoebel joined
timotimo so anyway. i'd like another factor of 10, please. 12:05
timotimo BBL
12:06 araujo left, araujo joined, araujo left, araujo joined
seatek i can't even load that into my text editor in under 30 seconds! 12:06
well, gedit at least ;)
masak just make sure that ain't an argument against your editor :P 12:07
(I just created a 50M dummy file using Perl 6. it took a few seconds to generate, and pressing `G` (end of file) in vim also made vim hesitate for a few more seconds than I expected) 12:08
currently trying to parse the dummy file with JSON::Fast. it's taking more than 45 seconds, I can say that.
(I'm on a reasonably new laptop)
seatek gedit took forever. emacs was fast. but it warned me -- REALLY.. a 50Mb file? You want to open that??
timotimo hehe.
seatek gedit was syntax highlighting it nicely though 12:09
tadzik plot twist: emacs was already loading it while asking the question to appear faster than gedit
seatek see? emacs is smart
tadzik . o O ( be like emacs )
seatek ooo wow addons :) 12:11
there are just too many
that's what all this means
masak process is still running 12:12
I think I'm now well into memory thrashing territory
seatek hehe
tadzik I imagine a trenchline along the L3 cache 12:13
seatek well, as for storing session data in json in a database -- it's absolutely the database latency that's going to cause trouble
12:13 MilkmanDan left
tadzik lines being blown up 12:13
masak done!
seatek and any person storing 50Mb of data in a session deserves their servers to freeze up
12:13 MilkmanDan joined
masak real 8m18.149s 12:13
seatek wowo 12:14
masak my json data file was simply 2 million entries of the form `"foo4": 4,`
12:14 Hotkeys left
masak gonna try it with timotimo's file now 12:14
expecting same-ish results 12:15
jantore ccccccfnjbftnlreukervcultbnvudhleeitrhhtunib
seatek use something that will syntax highlight it
jantore oops ;-)
masak I was wrong 12:16
timotimo's complete.json did indeed take 45 seconds.
timotimo only a few days ago i made it go from about 1:05 to 45
masak hey, why does one file take 45 seconds and the other one 8 minutes?
is it because I'm building a huge hash?
12:16 Hotkeys joined
timotimo maybe 12:16
i expect hashes, arrays, strings all have different performance characteristics 12:17
masak is there a way to measure just the time of the parse, not the time of building objects in memory?
timotimo not in JSON::Fast.
seatek that would be an interesting metric
timotimo just comment out all the parts that put stuff into stuff :P 12:18
seatek it's too fast to care about such things :)
masak does that
12:19 bazzaar joined
bazzaar o/ perl6 12:20
12:21 pmurias joined
pmurias seatek: re why would anyone do this, if you get a 50MB JSON from somewhere you have to process it somehow 12:21
arnsholt Sometimes, that's just how big your data set is 12:24
seatek pmurias: it's true. i spend so much time thinking transactionally that this seems obscene
masak it wasn't trivial to rip out object creation, because of `if $key.DEFINITE {`
I almost made it, though :) a more concerted effort might get me there
bazzaar m: grammar REST { token TOP { <backslash> }; proto token backslash {*}; token backslash:sym<n> { :i <sym> } } ; say REST.parse('n'); 12:27
camelia rakudo-moar ee8ae9: OUTPUT«「n」␤ backslash => 「n」␤ sym => 「n」␤»
bazzaar m: grammar REST { token TOP { <backslash> }; proto token backslash {*}; token backslash:sym<n> { :i <sym> } } ; say REST.parse('N'); 12:28
camelia rakudo-moar ee8ae9: OUTPUT«Nil␤»
timotimo masak: that's for signaling if we'll get a key or a value next
masak: you can just set 1 instead of a key or value there, i'm sure
12:29 iH2O joined, Actualeyes left
masak aye 12:30
lunch break is over though, so I'll try it some other time :>
bazzaar re. earlier discussion on use of <sym> token, with a modifier such as :i (former is compiled, latter works lexically)
12:31 KevinYang joined
bazzaar I just want to point out there are 13 lines of code that use this combination in src/Perl6/Grammar.nqp 12:32
@linux:~/rakudo/rakudo-star-2016.10/rakudo> grep -FR ':i <sym>' src/*
tadzik perhaps a JSON::Fast::Streaming would be in order, one that doesn't build data structures but calls callbacks on thingts
(SAJ parser) 12:33
12:33 Actualeyes joined
masak tadzik: I had the same thought 12:34
viki bazzaar, good catch. The :i should be removed IMO
timotimo i had the same thought in the past, too
masak it could even riff off SAX and make corresponding events
viki bazzaar, would you submit a PR? 12:35
bazzaar, run make spectest after the change to ensure nothing broke
12:36 rurban joined
bazzaar viki: I was afraid someone would say that :) I'm not entirely sure how to go about it, I've got to do one for a doc change too 12:36
viki heh 12:37
viki shall write an article for this stuff today 12:38
bazzaar I've got as far as forking and cloning the repo, but after that I am unsure
viki too many people asking and I have no good reply
12:38 KevinYang left 12:39 Sgeo joined
viki Maybe someone can help bazzaar right now? I'm on my phone which is a pita to type on :( 12:39
bazzaar I would contribute, I just need to get over this hurdle
Is there a step by step guide that anyone can refer me to 12:41
timotimo do you have an account on github.com? that's generally how we accept pull requests, but we can do it other ways, too 12:42
seatek the one i did was... you go to the page at github -- the file -- and hit Pull -- then you can make your changes and submit them back
they get reviewed and merged back in
12:45 aries_liuxueyang joined
bazzaar yes I have an account and Moritz kindly gave me direct push access to carry out the PR 12:45
timotimo cooln 12:46
okay, when you've made your changes, ideally not committed yet, you can "git checkout -b name-of-your-change"
then you can commit your changes to be on that branch you just created
when you then "git push origin name-of-your-change", it'll land on github
when you next open up the rakudo/rakudo repository page, it'll show your just-pushed branch above the file list and have a "compare and PR" button (or something) 12:47
12:48 domidumont joined
bazzaar timotimo: (and viki, and setek) thanks for your help, I will give it a go 12:49
apologies.. seatek
timotimo BBL 12:50
seatek no prob bazar :)
bazzaar :)
masak tadzik: ooh 12:51
tadzik: could even do a JSON::Stream and have it work through Channels
and the `whenever` keyword and the like 12:52
I think that'd be a killer, but I'm not 100% sure it'd be the fastest
12:55 iH2O left
tadzik . o O ( a performance killer ) 12:55
masak reading your JSON through streams isn't for everything -- but with the `whenever` sugar I could see it being sometimes really nice 12:59
and once you get up to things like 50M (and for certain uses) I could see it being a reasonable solution
12:59 AlexDaniel left
arnsholt Especially if you only need part of the data 13:00
In which case a pull-style system is probably useful
masak it's a sliding scale -- DOM is when you want to get into the fray and manip things. SAX/SAJ is for when you mostly want to pick up individual bits here and there, but do no modification 13:01
viki bazzaar: if moritz gave you access, you don't need a separate branch. You can just commit directly. git commit file/you/changed; *describe the change in the editor that pops up*; git push 13:04
bazzaar viki: thanks for that info 13:06
13:10 seatek left 13:11 eivindgl left
moritz .tell tbowder original content is preferred, but you can adopt existing articles if they haven't had too many readers yet 13:14
yoleaux moritz: I'll pass your message to tbowder. 13:15
11:23Z <tbrowder> moritz: Are the advent articles expected to be original, i.e., never have appeared before?
13:16 cyphase joined 13:17 iH2O joined
iH2O perl6s magnitude has now reached the level of a science 13:19
viki What does that mean?
13:19 domidumont left
iH2O means its as big as or bigger than physics 13:20
:-P
viki :/
13:20 rurban left
huf how big is physics? in m^3 13:21
13:22 ggoebel left
masak a bit smaller than a duck, but bigger than a hamster 13:22
the reason people find this unintuitive is that they never see physics running around on the ground, like one might see a duck or a hamster
huf are you saying that it floats? 13:23
masak depends on the physics
some physics float, others sink
huf what i'm getting at here really is this: is it a witch?
masak yes. very yes
even a physics that sinks is a witch 13:24
[Coke] moritz;wow. logged into perl6advent.wordpress.com, clicked on the add content icon.... crashed chrome. :|
13:24 Lucas_One1 left
masak timotimo: forgot to say: thank you for writing JSON::Fast 13:26
timotimo: if nothing else, it's a very interesting showcase of the current overhead of grammars
13:29 cyphase left 13:31 cyphase joined 13:35 nicq20 joined
timotimo :) 13:39
thank you
13:45 Lucas_One joined 13:47 user9 left
timotimo quickdraw.withgoogle.com/ - kinda cute 13:55
13:56 dj_goku left, maybekoo2 left
viki Seems the stuff it asks you to draw has been pre-fed to the neural net. I barelly drawn a couple of rectangles and it guessed that I was drawing a calculator. 13:57
Also... 13:58
... KILL IT! Kill it with fire, before it spreads!
13:58 bjz_ left
huf wow i suck at drawing :D 14:00
14:00 cooper left, diakopter left
nicq20 The time limit does not help. >_< 14:01
14:01 wamba left
huf what is a dressre? 14:02
viki It's a regex made of dresses!
dalek ecs: acc747f | (Stéphane Payrard)++ | S13-overloading.pod:
Be more specific about coercion being a convention
14:04
14:04 cdg joined
viki I suck at drawing too 14:04
It guessed 2/6 14:05
timotimo viki: would you go ahead and spec test jnthn's latest commit on that moarvm branch and compare timings with moarvm master?
viki 25-year-old Zoffix could draw though: i.imgur.com/he5hoTp.jpg 14:07
viki cries at lost skills
timotimo: hm?
jnthn timotimo: Or just wait for tomorrow's numbers ;) 14:08
It'll be more interesting to measure after my patch to reduce the size of hashes too
viki timotimo: Not sure what branch you mean, so I'll wait for tomororw's numbers :) 14:09
timotimo MoarVM/rehash 14:10
right 14:11
jnthn (Spectesting that part of it now)
14:14 diakopter joined
viki timotimo: looks like it hung 14:16
oh nm.. just took ages for some reason
viki re-runs
m: say $*VM.version 14:17
camelia rakudo-moar f03ef5: OUTPUT«v2016.10.55.g.20.c.8591␤»
viki t/spec/integration/weird-errors.t is failing 14:18
OLD: Files=1203, Tests=130161, 134 wallclock secs (20.46 usr 2.79 sys + 2354.09 cusr 195.34 csys = 2572.68 CPU) 14:19
REHASH: Files=1203, Tests=130161, 145 wallclock secs (19.95 usr 2.93 sys + 2651.93 cusr 231.11 csys = 2905.92 CPU)
14:19 mohae_ joined
viki Oh, it's "not ok 31 - using a null string to access a hash does not segfault" that fails 14:20
And it's fine, 'cause that change is not in that branch
14:22 dj_goku joined, domidumont joined, mohae left
viki 152 wallclock secs for second run 14:23
viki tries to run spectest instead
REHASH: Files=1154, Tests=53747, 94 wallclock secs (12.66 usr 2.32 sys + 1461.50 cusr 156.14 csys = 1632.62 CPU) 14:25
timotimo um, what
that can't be right
14:26 domidumont left
viki Well, it's really iffy of a benchmark. As I've said before, there are a couple of test files that take forever, so all the tests get smoked on 24-cores, but at the end of the stresstest you get just 1 or 2 files slowing everything else down 14:26
Like t/spec/integration/weird-errors.t seems to take ages to run 14:27
14:27 kyclark joined, domidumont joined
timotimo OK 14:29
weird-errors compiles and runs another program 20 times near the end, for example 14:30
14:31 Khisanth left
viki Rebuilt with normal moarvm, spectest: Files=1154, Tests=53739, 94 wallclock secs (12.54 usr 2.37 sys + 1469.14 cusr 157.55 csys = 1641.60 CPU) 14:31
And t/spec/S17-procasync/many-processes-no-close-stdin.t and/or t/spec/S17-procasync/no-runaway-file-limit.t seem to be holding everything back 14:32
14:32 iH2O left
viki still haven't played around with making the longest files run first thing 14:32
14:36 dalek left 14:37 dalek joined, ChanServ sets mode: +v dalek 14:38 ocbtec left 14:40 ggoebel joined 14:41 mohae joined 14:43 user9 joined, mohae_ left 14:44 Khisanth joined 14:50 brillenfux left 14:55 skids left 14:56 kyclark left
nicq20 So, I know there are ways to override core parts of Rakudo using the "Monkey*" modules, but is there something similar with the NQP base? 15:06
brrt not the right person to answer, but what do you mean with NQP base? 15:07
viki monkeys are pragmas
MONKEY-GUTS pragma gives you nqp ops, if that's what you mean... 15:08
nicq20 Probably wording this wrong (like usual for me), but I think I noticed a bug in on of the NQP classes, but I'm not sure if it really is one or not. So I wanted to mess with the code a bit to see if I can "fix" it (assuming it is flawed). 15:09
15:10 domidumont left
nicq20 I believe it's this part here: github.com/perl6/nqp/blob/master/s...e.java#L38 15:10
viki has no idea 15:11
nicq20 It might throw an acception without closing the socket.
15:11 domidumont joined 15:16 domidumont left
[Coke] your best bet with nqp is to work in a local checkout, edit the source, and rebuild, in my experience. 15:20
15:20 domidumont joined
nicq20 [Coke]: Ok. The tests don't seem to work on my end. I'm assuming it should be run with `prove -enqp t/` right? 15:22
viki make test
And there's make m-test / make j-test to test just for that backend
15:23 ggoebel left 15:29 user9 left
nicq20 Hmm... `Make test` does not do the concurrency tests. Is that on purpose? 15:32
viki shrugs 15:33
nicq20: what about make m-test?
Maybe make test is just the rudimentary test
[Coke] nicq20: are you running rakudo's make test or nqps? 15:34
nicq20 "m-test" runs t/nqp t/hll t/qregex t/p5regex t/qast t/moar t/serialization t/nativecall
[Coke]: NQP
15:37 iH2O joined, kyclark joined 15:39 user9 joined 15:40 snowman joined 15:41 wamba joined
kyclark Let’s say I create “class Person { has $.first_name }” and then try to create with Person.new(frist_name => “Ken”) (typo intended), how can I have the object blow up? I was kind of hoping it would fail, but I guess I need to write my own “new” to make sure of this? 15:41
viki Yeah 15:42
oh
kyclark: depends on what you mean by blow up: blow up because the first-name is missing or because an invalid attr was given? 15:43
kyclark Invalid attr
viki 'cause for the formeer you can mark the atribute as is required
Yeah, for that you'll need a special new
Xliff \o #perl6
viki \o
Xliff Has LWP::UserAgent been ported to rakudo, yet?
ugexe So I was working with perl5 IO::Async on a recursive directory watcher for 30k files, and it chokes before even getting a chance to react to anything. Perl6 IO::Notification::Recursive is reacting instantly.
viki Xliff: HTTP::UserAgent ? 15:44
kyclark Hmm, “is required” will suffice for my purposes. Thanks!
15:44 ocbtec joined
Xliff viki: Thanks. Will check. I don't know if that handles HTTPS though. 15:44
viki kyclark: can be shortened to just an exclamation mark: has $.first-name!
kyclark Ah, very nice.
viki Xliff: it does, if you have IO::Socket::SSL installed 15:45
Xliff Oh? Neat. I will check it out. It still has that on the TODO list, according to modules.perl6.org
viki star: HTTP::UserAgent -e 'say HTTP::UserAgent.new.get("perl6.org").content.comb(/"<title>" <(.+?)> "</title>") 15:47
camelia star-m 2016.10: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> 3HTTP::UserAgent -e7⏏5 'say HTTP::UserAgent.new.get("p␤ expecting any of:␤ infix␤ infix stopper␤ postfix␤ statemen…»
viki star: use HTTP::UserAgent; say HTTP::UserAgent.new.get("perl6.org").content.comb(/"<title>" <(.+?)> "</title>") 15:48
camelia star-m 2016.10: OUTPUT«===SORRY!===␤Could not find HTTP::UserAgent at line 1 in:␤ /home/camelia/.perl6␤ /home/camelia/star-2016.10/share/perl6/site␤ /home/camelia/star-2016.10/share/perl6/vendor␤ /home/camelia/star-2016.10/share/perl6␤ CompUnit::Repository…»
viki :(
Xliff Thanks, anyways.
<tongueFirmlyInCheek>So is viki a regular thing now, zoffixBorg</tongueFirmlyInCheek> 15:49
ugexe where is this TODO at?
Xliff github.com/sergot/http-useragent
viki Xliff: works locally6: gist.github.com/zoffixznet/6541018...05571e6083
Xliff: there's no regular thing, but some things live longer than others.
ugexe the TODO is just to make it work on more platforms 15:50
Xliff :)
ugexe: Ah. That isn't very clear from the wording.
15:51 FROGGS joined
Xliff Both OpenSSL and IO::Socket::SSL are headers, and it doesn't mention anything about HTTPS support, so I assumed it lacked it. 15:51
\o FROGGS
FROGGS hi
Xliff Whee! Now I get to spend the day ripping out LWP::Simple to support HTTP::UserAgent
15:54 ugjka is now known as Jim_Lahey, Jim_Lahey is now known as Lahey 15:55 iH2O left
kyclark viki: I think the “$.first_name!” for “is required” is not right: “Negation metaoperator not followed by valid infix 15:56
viki m: class { has $.x! }.new 15:57
camelia rakudo-moar 395f36: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Negation metaoperator not followed by valid infix␤at <tmp>:1␤------> 3class { has $.x!7⏏5 }.new␤ expecting any of:␤ constraint␤ infix␤ infix stopper␤ postfi…»
viki bisect: class { has $.x! }.new
bisectable6 viki, On both starting points (old=2015.12 new=395f369) the exit code is 1 and the output is identical as well
viki, gist.github.com/e45d59b67c0dc80463...a99131cf51
timotimo interesting, we never supported that?
viki m: class { has $.x! = 42 }.new
camelia rakudo-moar 395f36: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Negation metaoperator not followed by valid infix␤at <tmp>:1␤------> 3class { has $.x!7⏏5 = 42 }.new␤ expecting any of:␤ constraint␤ infix␤ infix stopper␤ p…»
viki Weird, I could've swore it worked.
15:57 sufrostico left
viki kyclark: I guess we don't support it for attributes, but it does work for named signature parameters 15:58
kyclark Got it.
nicq20 kyclark: use "is required" instead.
kyclark Roger that.
15:58 wamba left 15:59 Woodi left, sufrostico joined 16:01 neuraload left, domidumont left
dalek href="https://perl6.org:">perl6.org: 236b5d1 | (Zoffix Znet)++ | source/index.html:
Add more descriptive title to home page
16:08
16:09 atweiden joined
dj_goku how do you know if IO::Socket::INET connection is still open? 16:10
dalek href="https://perl6.org:">perl6.org: 172fefb | (Zoffix Znet)++ | source/index.html:
Update home page "news" box

  - Remove content from the 2015.12 release.
  - Shorten text
16:11
ugexe try { $sock.read(0); CATCH { when /'Out of range'/ { say "Connection is still open" } }; # >:)
dalek href="https://perl6.org:">perl6.org: bd8343b | (Zoffix Znet)++ | source/index.html:
Fix typo

icannottypetoday
16:12
dj_goku hmm
ugexe github.com/ugexe/Perl6-Net--HTTP/b...ls.pm6#L88
dj_goku ugexe: ugh, that seems weird. 16:14
16:14 Lahey is now known as ugjka
dj_goku I don't do a lot of network programming so that might seem ok. 16:14
ugexe: is there a reason it isn't apart of IO::Socket by default? 16:15
16:15 skids joined 16:16 gregf_ left 16:23 rurban joined
dj_goku ugexe: haha I just noticed it was your repo on github. :D 16:24
16:31 sufrostico left 16:33 domidumont joined
ugexe its weird cause its totally a hack :) 16:33
16:33 sufrostico joined
nicq20 Anyone know of what the best way to implement a timeout for a function? It's a built-in one so I can't change it much. 16:34
ugexe thats why its in a role I can apply to the socket and not have to see it anymore
dj_goku ugexe: :(
16:34 kyclark left
[Coke] nicq20: my $timeout = 5; await Promise.anyof(Promise.in($timeout), start { YOUR LONG RUNNING TASK }); 16:35
nicq20 [Coke]: I was thinking that too, but I want the slower of the two to stop running. 16:36
start vows to itself, so I can't break it that way. :/
ugexe dj_goku: the correct way is probably to use the native-descriptor (github.com/rakudo/rakudo/blob/nom/...et.pm#L93) somehow, but this wasn't added until after I came up with that hack 16:37
16:37 sufrostico left
[Coke] nicq20: Maybe jnthn knows a way to abort running code as opposed to getting control back in your main line. 16:37
16:38 ugjka is now known as therealugjka 16:39 sufrostico joined
nicq20 [Coke]: Ok, thanks! :) I'll ask him next time I see him on here. 16:40
16:40 domidumont left
jnthn Just use another Promise that the long-running task polls every so often. 16:43
And then break that in order to cancel
[Coke] jnthn: so, more of a cyanide pill than a bullet. 16:44
jnthn Yes. Bullets are generally a bad idea. 16:45
You don't know whether your code is in any reasonable state to be cancelled.
What if it's holding a lock when the bullet hits?
Xliff Aaannnd.... 16:46
viki nicq20: what's the function anyway?
Xliff HTTP::UserAgent also fails this crazy auth procedure.
dj_goku ugexe: alright cool. probably could just just have a method that returns True/False if/ifnot $PIO
[Coke] so, nicq20, if you don't have any control over the long running thing, you're out of luck.
nicq20 Hmm... good point. I'm trying to setup a timeout for a IO::Socket::INET connection.
For example, connecting to google.com on port 3 takes forever because they drop the packets. 16:47
16:48 sufrostico left, sufrostico joined 16:50 therealugjka is now known as therealtherealug 16:51 therealtherealug is now known as therealizedugjka
Xliff When you have an exception like this: X::HTTP::Response.new(:rc('Max redirects exceeded'), :response($response)).throw; 16:52
How can you retrieve $response from it? 16:53
Especially if there is already a $response in scope.
timotimo should be possible to just .response
Xliff kk
\o/
timotimo++
I was worried HTTP::UserAgent would also be a dead end, but I think I can salvage it. 16:54
timotimo worst case: bind libcurl?
viki waaaaat.. "Microsoft today announced that it is joining the Linux Foundation as a high-paying Platinum member." twitter.com/search?q=%22Linux%20Fo...p;src=tren 16:56
viki lols
If you can't beat 'em, join 'em? XD 16:57
timotimo i guess so
MS got money out the wazzoo, i'm glad TLF is getting some of that
but maybe they only join that to sabotage it? 16:58
16:59 sufrostico left
dj_goku if I add my own method to Socket.pm can I just re-open the REPL and have it called? because I am getting a failure of No such method 'closed' for invocant of type 'IO::Socket::INET' 17:00
viki dj_goku: what do you mean by "add my own method"?
How are you adding it?
dj_goku viki: with vi? :D 17:01
viki :/
dj_goku viki: just as a test
17:02 Actualeyes left
dj_goku viki: is there a better way? 17:02
viki I don't know what your way is, so I don't know if there's a better way. 17:03
dj_goku: how are you adding the method? 17:04
dj_goku viki: I am using rakudobrew and I just modified all the IO/Socket.pm to add my method
I inlined it after the close method
viki dj_goku: I'm guessing you didn't recompile anything?
dj_goku nope
I assumed it would just work. :D
viki dj_goku: the IO/Socket.pm isn't actually used for anything what you edited is likely what rakudobrew just keeps around.
dj_goku: git clone github.com/rakudo/rakudo 17:05
dj_goku: then edit IO/Socket.pm
[Coke] if you want to try this sort of thing you should have a local copy of the module, and use that one, not edit the installed one.
viki dj_goku: then run perl Configure.pl --gen-moar --gen-nqp --backends=moar; make; make test; make install
[Coke] ... what viki just said while I was typing and not catching up. :)
viki dj_goku: and when making more changes you can run just `make install`. And that will build a ./perl6-m executable in that dir that will have your change in it
17:06 sufrostico joined
dj_goku I might do what Zoffix blogged about: blogs.perl.org/users/zoffix_znet/20...r-fix.html 17:06
17:06 rurban left
viki Sure, that should work too 17:06
dj_goku: just be sure to do IO::Socket::INET.^compose after augmentation as well
hmmm 17:07
can you even augment roles?
m: use MONKEY; augment role Numeric { method close { say "weee" } }; Int.^compose; 42.close
camelia rakudo-moar 4ccb2f: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Cannot augment Numeric because it is closed␤at <tmp>:1␤------> 3use MONKEY; augment role Numeric7⏏5 { method close { say "weee" } }; Int.^c␤ expecting any of:␤ generic role␤»
viki Right
dj_goku: that method likely doesn't work for roles, and IO::Socket is a role
.oO( is there a way to "reopen" a role? )
jnthn viki: Even if you managed to do that, your changes would not affect anything that had composed the role 17:08
Only things that did so in the future 17:09
viki m: use MONKEY; augment class Int does role { method close { say "self is {self}" } }; 42.close
camelia rakudo-moar 4ccb2f: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Invalid typename 'role'␤at <tmp>:1␤------> 3use MONKEY; augment class Int does role7⏏5 { method close { say "self is {self}" }␤»
dj_goku m: use MONKEY-GUTS; augment role Numeric { method close { say "weee" } }; Int.^compose; 42.close
camelia rakudo-moar 4ccb2f: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤augment not allowed without 'use MONKEY-TYPING'␤at <tmp>:1␤------> 3use MONKEY-GUTS; augment role Numeric7⏏5 { method close { say "weee" } }; Int.^c␤ expecting any of:␤ generic role␤»
viki m: use MONKEY; role BetterNumeric { method close { say "self is {self}" } }; augment class Int does BetterNumeric {}; 42.close
camelia rakudo-moar 4ccb2f: OUTPUT«self is 42␤»
viki \o/
dj_goku: ^ that's one way to make Zoffix's article's method work
dj_goku viki: alright cool 17:10
[Coke] I think in the general case you need to re-compose there.
viki MONKEY-GUTS is for nqp; MONKEY-TYPING is the one for augmentation
17:13 domidumont joined 17:15 Actualeyes joined 17:17 wamba joined 17:22 espadrine joined 17:23 therealizedugjka is now known as ugjka 17:31 nicq20 left 17:32 sufrostico left 17:33 sufrostico joined 17:37 aries_liuxueyang left 17:38 aries_liuxueyang joined 17:43 dakkar left
viki Hm... my "Perl 6 Core Hacking: The Ultimate Contributor's Guide" is already 1,200 words and I've not even touched any of Rakudo/NQP/MoarVM bits :/ 17:46
Starting to think a dynamic web app would be more awesomer for the purpose. 17:47
17:49 labster joined
viki Yes. yes. 17:52
viki creates perl6/contribute
18:00 sufrostico left 18:01 kyclark joined 18:02 sufrostico joined 18:08 sufrostico left 18:09 labster left 18:10 sufrostico joined 18:11 kyclark left 18:12 firstdayonthejob joined 18:14 mienaikage joined
pmurias viki: how will contribute.perl6.org work? 18:15
18:15 snowman left, snowman joined
ugexe dj_goku: the way I do it is `my $socket = IO::Socket::INET.new(...) but role :: { method closed { ... } };` 18:16
18:17 sufrostico left 18:19 sufrostico joined
Xliff How getting this when trying to request an HTTPS page using HTTP::UserAgent -- 'Cannot look up attributes in a OpenSSL type object' 18:23
Anyone run into this before?
viki pmurias: will commit a design doc soon
18:24 sufrostico left 18:26 sufrostico joined
viki Well, now I'm self-conscious about it :D 18:36
18:44 zakharyas left
viki pmurias: that's a start: github.com/perl6/contribute/blob/m.../DESIGN.md 18:46
pmurias: I want to write and play around with some code before going further with how it all work 18:47
pmurias: the main idea is a response to this would be a single link the user can just read: irclog.perlgeek.de/perl6/2016-11-16#i_13577116 18:48
without daunting them with a wall of text that is our CONTRIBUTING.md files
18:48 itcharlie joined
ugexe now we just need a bot to do the contributing for us 18:51
18:55 sufrostico left, cdg left 18:57 sufrostico joined 18:58 beatdown joined 18:59 labster joined 19:01 mienaikage left 19:07 domidumont left 19:09 sufrostico left 19:15 darutoko left 19:20 skids left 19:26 labster left 19:27 cyphase left 19:29 espadrine left 19:31 rurban1 joined 19:33 SourceBaby left, SourceBaby joined 19:34 cyphase joined, Undercover joined, ChanServ sets mode: +v Undercover 19:36 snowman left 19:38 snowman joined 19:39 RabidGravy joined 19:40 telex left 19:41 domidumont joined, Exodist joined 19:42 telex joined 19:43 AlexDaniel joined 19:44 sufrostico joined 19:46 itcharlie left 19:48 kyclark joined, snowman left 19:49 kyclark left, snowman joined 19:50 firstdayonthejob left 19:51 girafe joined 19:53 kyclark joined 19:54 firstdayonthejob joined 20:03 snowman left 20:04 snowman joined 20:20 sufrostico left 20:23 domidumont left 20:24 kyclark left 20:29 kurahaupo__ joined
AlexDaniel now that we have #130081 resolved, I'm wondering about this: 20:31
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=130081
AlexDaniel m: grammar G { token TOP { ‘a’ || ‘abc’ } }; say G.parse(‘abc’)
camelia rakudo-moar 58a482: OUTPUT«Nil␤»
AlexDaniel m: grammar G { token TOP { [ ‘a’ || ‘abc’ ] ‘z’ } }; say G.parse(‘abcz’) 20:32
camelia rakudo-moar 58a482: OUTPUT«「abcz」␤»
AlexDaniel so the first one is expected, right
20:32 sufrostico joined
AlexDaniel but… how does the second one work? 20:32
20:34 FROGGS left 20:36 ggoebel joined, sufrostico left
viki shrugs 20:38
20:38 sufrostico joined
AlexDaniel is it alright or is it a bug? 20:40
psch m: grammar G { token TOP { [ ‘a’ | ‘abc’ ] ‘z’ } }; say G.parse(‘abcz’) 20:42
camelia rakudo-moar 58a482: OUTPUT«「abcz」␤»
viki Well, here it doesn't need to backtrack. 20:43
psch hm, i don't think that actually adds information
it's just LTM
i mean, my eval doesn't add information
AlexDaniel that's correct
psch so the actual problem seems to be that a single rule in a Grammar doesn't follow LTM?
20:44 abraxxa left
psch only skimmed the corresponding correspondence about "TOP has to be terminated" in the emails 20:44
not sure it was ML or GH, either :S
m: grammar G { token TOP { [ ‘abc’ | ‘ab’ ] ‘z’ } }; say G.parse(‘abcz’) 20:45
camelia rakudo-moar 58a482: OUTPUT«「abcz」␤»
psch m: grammar G { token TOP { [ ‘abc’ || ‘ab’ ] ‘z’ } }; say G.parse(‘abcz’)
camelia rakudo-moar 58a482: OUTPUT«「abcz」␤»
psch m: grammar G { token TOP { [ ‘abc’ || ‘ab’ ] } }; say G.parse(‘abc’)
camelia rakudo-moar 58a482: OUTPUT«「abc」␤»
psch yeah that's wonky 20:46
|| should follow LTM afaik
viki huh
AlexDaniel huh?
timotimo didn't we just get a commit about the TOP stuff?
viki Isn't || specifically to avoid LTM and to do first-listed-match instead?
Yeah 20:47
psch ...is it?
timotimo yes, || is the anti-LTM one
viki The TOP stuff is fixed.
psch right, it's the sequence one
sorry, apparently i'm not really useful rn vOv
viki The current question is how come || backtracks in a token:
m: grammar G { token TOP { [ ‘a’ || ‘abc’ ] ‘z’ } }; say G.parse(‘abcz’)
camelia rakudo-moar 58a482: OUTPUT«「abcz」␤»
viki Or rather... does it backtrack? and if it does, how come?
psch m: grammar G { token TOP { [‘a’ { say "once" } || ‘abc’ ] ‘z’ } }; say G.parse(‘abcz’) 20:48
camelia rakudo-moar 58a482: OUTPUT«once␤「abcz」␤»
AlexDaniel and if it's not counted as backtracking, then TOP should probably do that as well…
viki m: grammar G { token TOP { [ ‘a’ { say "wat" } || ‘abc’ {say "huh" } ] ‘z’ } }; say G.parse(‘abcz’)
camelia rakudo-moar 58a482: OUTPUT«wat␤huh␤「abcz」␤»
psch that does look backtrack-y to me
viki m: grammar G { token TOP { [ ‘ab’ { say "wat" } || ‘abc’ {say "huh" } ] ‘z’ } }; say G.parse(‘abcz’)
camelia rakudo-moar 58a482: OUTPUT«wat␤huh␤「abcz」␤»
psch m: grammar G { token TOP { [ ‘a’ {say $/.CURSOR.pos} || {say $/.CURSOR.pos} ‘abc’ ] 'z' } }; say G.parse(‘abcz’) 20:49
camelia rakudo-moar 58a482: OUTPUT«1␤0␤「abcz」␤»
psch yeap
m: grammar G { token TOP { [ ‘a’ {say $/.CURSOR.pos} || {say $/.CURSOR.pos} ‘abc’ ] {say "here"} 'z' } }; say G.parse(‘abcz’) 20:50
camelia rakudo-moar 58a482: OUTPUT«1␤here␤0␤here␤「abcz」␤»
psch ^^^ definitely
AlexDaniel committable6: all grammar G { token TOP { [ ‘a’ {say $/.CURSOR.pos} || {say $/.CURSOR.pos} ‘abc’ ] {say "here"} 'z' } }; say G.parse(‘abcz’)
committable6 AlexDaniel, gist.github.com/0fd25e5fc47ee43444...e18394f3de 20:51
AlexDaniel dammit
psch huh, it never worked before :)
AlexDaniel committable6: all grammar G { token TOP { [ 'a' {say $/.CURSOR.pos} || {say $/.CURSOR.pos} 'abc' ] {say "here"} 'z' } }; say G.parse(‘abcz’)
psch i wonder if that relates to the array interpolation regex bug i ticketed some long time ago
it feels faintly familiar
committable6 AlexDaniel, gist.github.com/e797752987bc96b01d...5f60b305ee
AlexDaniel committable6: all grammar G { token TOP { [ 'a' {say $/.CURSOR.pos} || {say $/.CURSOR.pos} 'abc' ] {say "here"} 'z' } }; say G.parse('abcz') 20:52
psch bad quotes for old compilers?
AlexDaniel yup
committable6 AlexDaniel, gist.github.com/814019538d89ec53fc...9269136ebd
AlexDaniel but yeah, it has always been this way
20:53 kyclark joined
AlexDaniel so “no backtracking” only means that it does not reenter rules? 20:54
but inside one rule it can do whatever it wants to?
psch that's not what it *should* mean i'm pretty sure
20:55 seatek joined
AlexDaniel masak: any ideas? 20:55
psch m: say "abcz" ~~ m:r/\w+ 'z'/
camelia rakudo-moar 58a482: OUTPUT«False␤»
psch m: say "abcz" ~~ m:r/['a'||'abc'] 'z'/ 20:56
camelia rakudo-moar 58a482: OUTPUT«「abcz」␤»
psch m: say "aaaz" ~~ m:r/['a'**2||'aaa'] 'z'/
camelia rakudo-moar 58a482: OUTPUT«「aaaz」␤»
psch m: say "abcz" ~~ m:r/[.**2||...] 'z'/
camelia rakudo-moar 58a482: OUTPUT«「abcz」␤»
masak AlexDaniel: sorry; not following along too closely. heading off to bed. 20:57
psch "This process of giving up characters (or in the case of alternations, trying a different branch) is known as backtracking." from docs.perl6.org/language/regexes#in...:r-Ratchet
masak AlexDaniel: but if you think there's something that feels like a bug, please do rakudobug it. 20:58
psch so, trying a different alternation is backtracking, backtracking should off in tokens and with :r
masak 'night, #perl6
psch 'nite masak
AlexDaniel sure I will, thanks anyway
20:58 richi235 left
psch +1 for the ticket 20:58
seatek nite masak
AlexDaniel how many things are going to break if we fix it? :|
20:58 richi235 joined
psch or a patch, of course 20:58
that's a fun question :)
viki A better question is how much faster stuff will become if we fix it :D 20:59
AlexDaniel that I thought about too
psch it kinda feels we like we need a regex champion, fwiw :S
viki Any idea wtf is going on here? A test in a test file fails, but if I run it as it is it succeeds: gist.github.com/zoffixznet/bc223e4...e27165d4fe
The is-deeply '−FF'.parse-base(16), -255, 'can parse − sign'; and is-deeply '-FF'.parse-base(16), -255, 'can parse - sign'; 21:00
psch i mean, i've kinda been letting bartolin++ carry the jvm-champion role for quite a while already, so maybe i shouldn't talk
viki Despite it succeeding for the method form too :S
psch but still
viki What does the regex champion do?
psch fix the regex engine
or, well, champion the development of the regex engine
viki oh.. sounds very hard :) 21:01
psch there's quite a few hairy edge cases, and -- apparently -- at least one major bug
yes, yes it does :)
AlexDaniel alright, I'll try to rakudobug this now…
21:01 labster joined, cdg joined
AlexDaniel but I'm still trying to see if I'm missing something. I mean, this thing was there for years and nobody noticed 21:02
viki hm 21:08
Looks like my issue is due to some string caching or something :\
timotimo uh oh?
viki m: use MONKEY; augment class Str { method borgle { $!value = "meow"; } }; say "foo".borgle; say "foo" 21:09
camelia rakudo-moar 58a482: OUTPUT«meow␤meow␤»
viki Or object caching or whatever this is...
Basically, I shouldn't modify $!value :D
AlexDaniel m: grammar G { token TOP { [.||.||.||.||.||.||.||.] [.||.||.||.||.||.||.||.] [.||.||.||.||.||.||.||.] [.||.||.||.||.||.||.||.] [.||.||.||.||.||.||.||.] [.||.||.||.||.||.||.||.] [.||.||.||.||.||.||.||.] [.||.||.||.||.||.||.||.] [.||.||.||.||.||.||.||.] [.||.||.||.||.||.||.||.] [.||.||.||.||.||.||.||.] <!> } }; say G.parse(‘abcdefghij’)
good luck camelia
awwaiid what could go wrong?
camelia rakudo-moar 58a482: OUTPUT«(timeout)» 21:10
viki At least I proved my mantra to test things thoroughly, even if you know its impementation just passes the job to an already-tested thing :)
The only reason the bug showed up is 'cause I also ran the sub-form tests on the same strings after running them with method form 21:11
(and sub just forwards to the method)
OMFSM... I's almost half hour since I was supposed to go home from work >_< 21:13
I guess I can take Uber instead of the bus to make up lost gaming time :) 21:17
And I have an off-by-one error in error position reporting for my .parse-base improvement too :/ messy and wrong 21:18
kyclark If I want to use $*CWD as a default in my MAIN, why do I have to put it quotes or ~-prefix it to work? E.g., sub MAIN (:$out-dir=~$*CWD) {…}
viki Better leave it off for another day.
psch huh, that Str interning thing is really annoying
m: say $*CWD.WHAT
camelia rakudo-moar 58a482: OUTPUT«(Path)␤»
psch kyclark: well, if you treat it like the Path it is it won't complain :) 21:19
kyclark: i strongly suspect it depends on what you do with it afterwards
kyclark Oh, I was thinking it was a string
viki It's a Cool
m: say $*CWD ~~ Cool
camelia rakudo-moar 58a482: OUTPUT«True␤»
psch m: say $*CWD.^mro
camelia rakudo-moar 58a482: OUTPUT«((Path) (Cool) (Any) (Mu))␤»
psch it *does* Cool 21:20
viki So you can treat it like a string. I dunno why it would complain to you
psch it *isa* Path
point being that you have to tell to be Stringy for it to be Stringy
which is what i was alluding to with "it depends on what you do afterwards"
m: say $*CWD
camelia rakudo-moar 58a482: OUTPUT«"/home/camelia".IO␤» 21:21
psch that for example already wouldn't DWYM
m: say "$*CWD"
camelia rakudo-moar 58a482: OUTPUT«/home/camelia␤»
viki Oh, OK. I thought MAIN complained about it, but it actually doesn't
psch kyclark: what's the next occurance of :$out-dir? as in, the exact line of code?
stmuk_ www.kickstarter.com/projects/14228...ing-perl-6 21:22
kyclark It was just coming out as nothing or empty string. Actually, I can’t really recall. I was messing with it this morning and was confused, but now it makes sense to know it’s a Path. Sorry. 21:23
viki stmuk_: as someone already asked... why is there a kickstarter project when this is being published by O'Rly?
stmuk_ I've no idea
21:23 sufrostico left
psch only has an overly cynical opinion on this, and thus holds it in 21:23
viki opposes that endeavour entirely 21:24
Though I don't know if there are reasons for it other than brian being a giant dick to me a decade ago :)
night all \o
viki &
21:25 ggoebel left, sufrostico joined, sufrostico left, sufrostico joined
AlexDaniel if only there was some crowdfunding to improve our actual docs… :) 21:25
psch kyclark: well, if you don't know/have the codes anymore it's hard to offer specfici advice
kyclark Right, thanks. I’m good now.
psch *specific 21:26
...the letter were all there at least :)
+s
m: say "a" ~~ / [.||.||.||.||.||.] <!> / 21:27
camelia rakudo-moar 58a482: OUTPUT«Nil␤»
stmuk_ its also a bit odd you get charged more to help with early e editions
psch m: say "ab" ~~ / [.||.||.||.||.||.] [.||.||.] <!> /
camelia rakudo-moar 58a482: OUTPUT«Nil␤»
psch m: say "ab" ~~ m:r/ [.||.||.||.||.||.] [.||.||.] <!> /
camelia rakudo-moar 58a482: OUTPUT«False␤»
psch it's really weird that so many high-tier rewards are about Perl 5, actually 21:29
weellll, FSDO "so many"
i mean, in the end bdfoy is probably a Perl 5 person..?
m: say "ab" ~~ / [.||.||.||.||.||.] <!> / 21:32
camelia rakudo-moar 58a482: OUTPUT«Nil␤»
psch anyway, apparently i don't grok that backtracking issue :P
or it doesn't turn fatal in with that few alternatition/.chars 21:33
21:35 sufrostico left 21:36 sufrostico joined
AlexDaniel m: grammar G { regex TOP { .* ‘z’ } }; say G.parse(‘abcz’)' 21:37
camelia rakudo-moar 58a482: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> 3ex TOP { .* ‘z’ } }; say G.parse(‘abcz’)7⏏5'␤ expecting any of:␤ infix␤ infix stopper␤ postfix␤ statement end…»
AlexDaniel m: grammar G { regex TOP { .* ‘z’ } }; say G.parse(‘abcz’)
camelia rakudo-moar 58a482: OUTPUT«「abcz」␤»
AlexDaniel m: grammar G { token TOP { .* ‘z’ } }; say G.parse(‘abcz’)
camelia rakudo-moar 58a482: OUTPUT«Nil␤»
AlexDaniel m: grammar G { regex TOP { [ ‘a ’ || ‘abc’ ] ‘z’ } }; say G.parse(‘abcz’) 21:38
camelia rakudo-moar 58a482: OUTPUT«「abcz」␤»
AlexDaniel m: grammar G { token TOP { [ ‘a ’ || ‘abc’ ] ‘z’ } }; say G.parse(‘abcz’)
camelia rakudo-moar 58a482: OUTPUT«「abcz」␤»
21:46 dnmfarrell joined
dnmfarrell hey folks, thought you might like to know there is a new kickstarter project for "Learning Perl 6" written by brian d foy and published by O'Reilly www.kickstarter.com/projects/14228...ing-perl-6 21:47
AlexDaniel /o\ 21:49
dnmfarrell: thanks, but yes, we know already :)
viki lol 21:50
dnmfarrell, ... and no one knows why :)
viki is getting a sweet ride home
Literally... the guy has "CAKE" in the license plate :) 21:51
labster m: my $a = 1; class Foo { also is ::( $a ?? Str !! Int) } 21:55
camelia rakudo-moar 58a482: OUTPUT«===SORRY!===␤This type cannot unbox to a native string: P6opaque, QAST::Op␤»
21:56 ufobat left
viki labster, what if you use that ternary as a block in a string? 21:56
ummm 21:57
labster I'm trying to figure out dynamic inheritance, but QAST shouldn't be leaking either.
viki m: say ::("Int")
camelia rakudo-moar 58a482: OUTPUT«(Int)␤» 21:58
viki m: say ::(Int)
camelia rakudo-moar 58a482: OUTPUT«Use of uninitialized value of type Int in string context.␤Methods .^name, .perl, .gist, or .say can be used to stringify it to something meaningful.␤ in block <unit> at <tmp> line 1␤No such symbol ''␤ in block <unit> at <tmp> line 1␤␤Actually…»
viki riiight
21:59 redhands joined
AlexDaniel buggable: tags 22:00
buggable AlexDaniel, Total: 1395; BUG: 937; UNTAGGED: 284; LTA: 125; NYI: 92; RFC: 60; JVM: 55; CONC: 52; SEGV: 36; REGEX: 35; UNI: 28; PERF: 27; @LARRY: 22; NATIVECALL: 20; POD: 19; IO: 18; TODO: 15; PRECOMP: 14; BUILD: 11; TESTCOMMITTED: 11; OO: 10; MATH: 8; BOOTSTRAP: 6; STAR: 6; TESTNEEDED: 6; GLR: 5; OSX: 4; OPTIMIZER: 3; REPL: 3; WEIRD: 3; REGRESSION: 2; SPESH: 2; @y: 1; CONFIGURE: 1; D
[Coke] the typos in the kickstarter text are disheartening.
viki m: my $a = BEGIN 1; class { also is ::("{$a ?? 'Int' !! 'Str' }") }.^mro.say
camelia rakudo-moar 58a482: OUTPUT«===SORRY!===␤This type cannot unbox to a native string: P6opaque, QAST::Op␤»
AlexDaniel viki: looks like it does not fit into one message
viki gah... tooke ages to type on the phone and it didn't work :) 22:01
labster I know, Brian even forgot to capitalize his name.
[Coke] :P
viki AlexDaniel, yeah :(
stmuk_ its in the wrong font as well! 22:02
[Coke] viki: in my shell script, I curated the tags I cared about. might be worth doing that to limit the size there. (not sure if it'll help.)
El_Che I love the idea of a "Learning Perl 6" book, but I thought brian d foy had given up on Perl 6
labster m: class Foo { also is ::("Int") };
camelia rakudo-moar 58a482: OUTPUT«===SORRY!===␤This type cannot unbox to a native string: P6opaque, QAST::Want␤»
El_Che I guess kickstarter accepts paypal
[Coke] El_Che: he did, twice, according to the kickstarter. :) 22:03
labster m: class Foo is ::("Int") { }; 22:04
camelia rakudo-moar 58a482: OUTPUT«===SORRY!===␤This type cannot unbox to a native string: P6opaque, QAST::Want␤»
viki El_Che, but has he given up on creating media he's guaranteed to turn profit on based on name recognition alone? :) Who can blame hin
El_Che no, I meant about the language-in-progress 22:05
I dunno what lizmat did to him, but it worked
AlexDaniel by “it worked” you mean?
22:06 sufrostico left
[Coke] I have so many questions about the reward levels. 22:06
AlexDaniel: presumably that he is now planning on writing a book.
El_Che AlexDaniel: he attended a perl6 workshop (how to write modules) and is now publishing a book (maybe)
with a safari account I don't buy as many IT books as I used to do, but I wouldn't mine having some Perl 6 books at my bookshelf at work :) 22:07
moritz why does a book published by oreilly need a kickstarter campaign?
22:08 sufrostico joined
El_Che moritz: www.kickstarter.com/projects/14228...faq_191567 22:08
awwaiid The Future
22:09 RabidGravy left
labster Because if O'Reilly won't even invite Larry to OSCON they're not very committed to Perl. 22:09
El_Che labster: I don't think it's a Perl thing. They just want best sellers 22:10
geekosaur ^
ORA is committed to making a profit, just like any other business
moritz I'm still not sure I understand it 22:13
seatek he wants the most money possible
El_Che moritz: the risk is on the backers not on O'Reilly
moritz does the money go to brian? or to the publisher? or do they split?
seatek kickstarter looks like just to brian 22:14
and it's a kinda "promise" that he'll write the book
then again, maybe it will be another false start for h im
moritz ok, so O'Reilly won't give an advance
but they publish the book if he write it
seatek i have no idea about that :)
El_Che moritz: I think that's it indeed. The overhead is for the backers, the royalties for brian
[Coke] brian, if you're reading this, I'm sure you could find folks here willing to comment on interim e-book versions.
El_Che but it's a guess :) 22:15
viki They're not paying him as much as he wants :)
seatek it's also advertising for his consulting services. give me money, and hey, get a discount on my consulting services! 22:16
viki [Coke], isn't that a privilege afforded only to the backers?
stmuk_ [Coke]: that costs $25
seatek the technical beauty of what's going on with Perl6 is what drew me to it, not any book or advertising 22:17
[Coke] Yes, folks, I read that. I'm mentioning that he can get that without money changing hands. (and I get that's not in his financial interest) 22:18
moritz ah well, I totally understand him
seatek i think that'll be true with most people any more -- not books for bookshelves
moritz writing a book is a shitton of effort
viki Actually, seems like the $25 gives you only the final e version. The early versions require $50
[Coke] oooh. I just followed @grover on twitter. ahhhhhh
seatek there is little point in those kinds of books any more 22:19
moritz so not wanting it go to waste is quite a reasonable motivation
seatek: and yet we regularly get people asking after Perl 6 books
seatek moritz: won't last long 22:20
viki What's so special about 108 in a different baee?
*base
to Perl history
moritz seatek: I'm not so sure. Some people don't want to learn from an random sample of blog posts and reference docs 22:21
viki (the $108 reward says it is)
22:21 trnh left
seatek moritz: i'm pretty sure that's the people who are used to learning from books alone. and those are fewer and fewer 22:22
viki 108 == 10 oct == 25 dec == christmas?
TEttinger viki: it's an important number in buddhism IIRC
seatek moritz: 10 years ago i saw people buying books on different things. now i never do. it's weird even to see someone using a book
moritz seatek: at least here in .de, schools still have books in school :-) 22:23
s:2nd/school/class/
stmuk_ I really liked the K&D Go Programming Book
TEttinger en.wikipedia.org/wiki/108_(number)
seatek yeah i bet in school they still use books
viki Tettinger, and why is that important to Perl history? 22:24
gfldex seatek: what makes sense as books are quite resistant to gravity
viki TEttinger, and what's the base?
seatek books for muscle building
TEttinger good question. 22:25
El_Che stmuk_: I read it good. It was quite good, indeed 22:26
viki TEttinger: I think the 108 meaning 10 oct is a good guess, 'cause the reward is called Christmas. 22:27
seatek i'm pretty sure that discussions on the wonderful technical merits of Perl6 like can happen on reddit and stuff has far more impact than books. all the info to get in and actually try it is available immediately insteading of ponderously waiting for and wading through a book that may eventually get you to something interesting
viki moritz: what about your book? You got kickstarter yet?
El_Che "I learn english from a book" 22:28
moritz viki: no, and I don't plan to
viki Oh
AlexDaniel as I've said, I am ready to spend some time reviewing a book, if somebody writes it
moritz viki: I don't like to take money for stuff I haven't done yet
viki moritz: fair enough.
moritz AlexDaniel: will do
seatek moritz: me too
AlexDaniel though of course I am expecting to do it for free… both ways! :) 22:29
[Coke] m: (2..36).map({108.base($_)})
camelia ( no output )
[Coke] m: say (2..36).map({108.base($_)})
camelia rakudo-moar 58a482: OUTPUT«(1101100 11000 1230 413 300 213 154 130 108 99 90 84 7A 73 6C 66 60 5D 58 53 4K 4G 4C 48 44 40 3O 3L 3I 3F 3C 39 36 33 30)␤»
[Coke] 300 reminds me of sparta. I got nothing on the rest of them. 22:30
22:30 pmurias left
moritz regarding the schedule for my book, I currently plan to start blogging about in December 22:32
psch m: BEGIN my $a = 1; constant \type = $a ?? ::("Int") !! ::("Str"); class { also is type }.^mro.say 22:35
camelia rakudo-moar 58a482: OUTPUT«((<anon|72018304>) (Int) (Cool) (Any) (Mu))␤»
AlexDaniel OK, here's my best take on the token issue: #130117 22:36
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=130117
AlexDaniel please write a comment if I got something wrong
22:43 nicq20_ joined 22:48 sufrostico left 22:49 sufrostico joined 22:52 kurahaupo__ left 22:53 bilbo joined 22:54 skids joined 22:56 canopus left
kyclark AlexDaniel: I would gladly have your input on my book (www.gitbook.com/book/kyclark/metag...s/details) 22:58
AlexDaniel 190 pages, great :) 22:59
kyclark I’M JUST GETTING WARMED UP! (Sorry, I loved Scent of a Woman) 23:00
23:00 dnmfarrell left
kyclark I start off with a lot of non-Perl stuff for our students, introduction to Unix, bash scripting, and HPC. 23:00
AlexDaniel kyclark: do you want me to use gitbook discussions for everything I find or can I just write you an email with all of my notes? 23:02
kyclark Email is fine.
Or discussions, whatever works.
AlexDaniel okay
gfldex seatek: i added travis support to *::Store::DBIish but it is blocked by a zef bug (github.com/ugexe/zef/issues/107) do you want the pull request right now anyways? 23:03
AlexDaniel ouch, bash!
kyclark I just added the Modules and OOP in the last couple of days. I have a couple empty chapters until I can think of something to say. Also need to come up with more chapters, probably, but trying to keep everything very focused on fully working examples that solve prolems in bioinformatics.
Bash is still bread-and-butter in bioinformatics. Much of what we do is running existing programs and then processing the output. 23:04
23:04 canopus joined
kyclark Perl is very much our glue to bind programs together. 23:04
23:05 sufrostico left
AlexDaniel kyclark: yeah, but I see a bunch of unquoted stuff and other issues. Anyway, I'll write it all down. Thanks, will read it instead of procrastinating, expect an email in a week :P 23:06
23:06 snowman left 23:07 sufrostico joined
Xliff Is there a way to augment an existing grammar? 23:08
(Aside from ripping it out of where you found something useful and reimplementing it)
AlexDaniel Xliff: just subclass it?
it is a regular class 23:09
Xliff Ahh..
Thanks!
23:09 bilbo left
Xliff Ah... fahrfignugen! 23:10
Grammer is inside another class.
I am looking at DateTime::Parse and it is missing what I get by like... smidgens.
And I just want to enhance it to catch the variations in format, not rip out pieces to reimplement. 23:11
23:12 rurban1 left
seatek gfldex: oh gosh thanks! sure. or should i just wait for a fix? will this cause problems for travis in the meantime? 23:13
gfldex seatek: no, did you use travis before?
seatek gfldex: nope never have - new to me, github. but not git. assume its some automated build/checking thing that runs periodically for the perl module stuff 23:15
i'm trying to track down some kind of horrific memory eating bug in Crust's middleware wrapper (with Crust::Builder it looks like so far) 23:16
23:22 Tonik left 23:32 kyclark left 23:37 wamba left
Xliff Oh wow! 23:41
I use Grammar::Tracer to test my grammar and it works.
The moment I comment out "use Grammar::Tracer" the parser fails. 23:42
o_O
seatek sooo, i don't suppose anyone knows of a profiler that will display memory usage of each class and variable as a program is running, yes?
i love Grammar::Tracer. but yeah that's weird
MasterDuke Xliff: related to RT #130083 perhaps? 23:43
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=130083
Xliff I don't know. 23:44
I would have to take that and see if the original version works with Grammar::Tracer in play. 23:45
23:47 ocbtec left
viki seatek: if there's any obvious spot with a regex (especially with one taking a variable), try checking that. I ran across a huge memory leak in buggable, but I don't recall ever narrowing it down or reporting 23:50
And there was a ticket for a var-in-a-regex memory leak, I don't remember if it was fixed or not.
seatek viki: oh thanks viki - i just glanced through and then stopped and had a bowl of cereal. you just gave me a little hope. ;) 23:52
23:52 firstdayonthejob left, sufrostico left
Xliff Wow! You can't do this? 23:55
[ <weekday> || <wkday> ] ','? <SP> <date=date2> <SP> <time> <SP> 'GMT'
For some reason Grammar::Tracer allows it!
<weekday> == long name for DOW 23:56
<wkday> == 3 letter abbr for DOW
Ah well. I have solution. Will press on. However this script is a bit of a mess, now. 23:57
23:59 sufrostico joined