Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-03-01

Perl 6 | Reference Documentation | Rakudo

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:07 firstdayonthejob joined #perl6
00:28 rudi_s Hi. Is there a quick way to to if $a{$b}:exists and $a{$b}.foo eqv $bar { .. }? I don't want to retype $a{$b}.
00:30 raiph m: my $bar; say Nil eqv $bar
00:30 camelia rakudo-moar 1ef247: OUTPUT«False␤»
00:31 ugexe but his will autovivify on the second eqv i believe
00:33 raiph m: my %hash; %hash<a>.foo; dd %hash
00:33 camelia rakudo-moar 1ef247: OUTPUT«Method 'foo' not found for invocant of class 'Any'␤  in block <unit> at /tmp/Qs_ioOD1x2 line 1␤␤»
00:33 raiph m: my %hash; say %hash<a>.foo; dd %hash
00:33 camelia rakudo-moar 1ef247: OUTPUT«Method 'foo' not found for invocant of class 'Any'␤  in block <unit> at /tmp/R70qhRhDM_ line 1␤␤»
00:34 raiph m: my %hash; say %hash<a>.?foo; dd %hash
00:34 camelia rakudo-moar 1ef247: OUTPUT«Nil␤Hash %hash = {}␤»
00:35 ugexe i've been avoiding a non-existing problem, excellent
00:35 raiph rudi_s: use `.?` as the dispatcher instead of `.`
00:35 cdg joined #perl6
00:38 rudi_s raiph: Thank you. But this will break if $bar is e.g. a (Int) and $a is an Int hash, right?
00:38 raiph ugexe: those are generally the best type of problem to have but not if you're avoiding them
00:38 raiph ugexe: :)
00:39 rudi_s raiph: Ah, it returns Nil for undefined values. So unless $bar is Nil, everything is fine?
00:39 raiph m: say Nil eqv Nil
00:39 camelia rakudo-moar 1ef247: OUTPUT«True␤»
00:40 raiph m: say Nil.foo eqv Nil
00:40 camelia rakudo-moar 1ef247: OUTPUT«True␤»
00:41 raiph m: role MyNil {}; say Nil.foo eqv Nil but MyNil
00:41 camelia rakudo-moar 1ef247: OUTPUT«False␤»
00:42 rudi_s Hm. When does Nil occur "in normal life"? It's not the same as undefined (undef) in perl5, right?
00:43 raiph rudi_s: Nil represents an explicit absence of a value
00:45 rudi_s But that's different from unitialized or no value for the given key, right?
00:45 raiph rudi_s: correct
00:47 rudi_s Good. Thank you. Then that should work fine for me.
00:47 raiph rudi_s: One doesn't encounter Nil nearly as often as Any.
00:47 raiph rudi_s: But perhaps more than the almost zero you're thinking.
00:47 rudi_s Hm.
00:48 rudi_s So there's no short way which always works? I don't like solutions which may break sometimes.
00:57 raiph rudi_s: Perl 6 is so beautiful. I'm still figuring stuff out.
00:57 ugexe maybe `if %x<a> andthen $_ -> $foo { say $foo.perl; }`, but its probably even more to type
00:58 raiph m: my $a = Nil; say $a
00:58 camelia rakudo-moar 1ef247: OUTPUT«(Any)␤»
00:58 timotimo ugexe: that looks syntactically wrong
00:58 timotimo $_ -> $foo ?
00:58 ugexe i meant $_.?foo -> $foo
00:58 raiph rudi_s: if one assigns Nil to a container, it resets the container's content to the default value. The default default value is Any.
00:59 timotimo that still looks wrong :)
00:59 timotimo TTIAR, no?
01:02 raiph rudi_s: Nil, which represents an absence of value, disappears when you assign it to things. So $bar won't be Nil
01:02 timotimo yeah, assigning Nil into a scalar variable will reset it to its default value
01:04 ugexe what is ttiar?
01:05 timotimo S99:TTIAR
01:05 timotimo what's wrong with synopsebot6?
01:05 timotimo Two Terms In A Row. A common error message often resulting from a missing "semicolon" between two "statement"s or putting an operator directly after a "sub".
01:06 timotimo looks like synopsebot6 netsplit out and never came back?
01:07 synopsebot6 joined #perl6
01:07 timotimo S99:TTIAR
01:07 synopsebot6 Link: http://design.perl6.org/S99.html#TTIAR
01:09 rudi_s raiph: ugexe: Thanks for the explanation. I think for now I'll stick with the explicit check as it feels clearer to me (as perl6 beginner).
01:10 timotimo has someone suggested the "with" syntax?
01:10 timotimo that'll check for definedness rather than truthness
01:11 raiph timotimo: That was my first thought and it works too
01:11 timotimo ok
01:11 yeahnoob joined #perl6
01:12 rudi_s timotimo: How can I extend that with a second condition?
01:13 raiph timotimo: but I felt there ought to be a nicer solution and I thought using `.?` fits the bill
01:13 timotimo can you show example code for what you mean, rudi_s?
01:13 rudi_s timotimo: if $a{$b}:exists and $a{$b}.foo eqv $bar { .. }?
01:14 rudi_s (Or actually !eqv is what I need.)
01:14 bpmedley joined #perl6
01:18 timotimo ah. for that "with" probably wouldn't be the right thing
01:19 raiph timotimo: darn it, `with` was my first thought but please ignore the rest of what I said about it
01:19 ugexe `say "same" with my $xxx = %x<a> and $xxx.?foo !eqv $bar` i think
01:19 raiph (ie I don't know if it works or not)
01:20 timotimo ugexe: but the eqv will only ever return a boolean value and the with will check on that, rather than the %x<a>
01:20 rudi_s Something like this would be nice: $a{$b}:exists -> $_ and $_.foo eqv $bar { .. } - then I don't have to write $a{$b} two times.
01:21 raiph rudi_s: I don't understand why that's not just: use `.?` instead of `.`
01:21 timotimo you can use "my" inside that line, kind of like ugexe showed
01:23 rudi_s raiph: Sorry, eqv should be !eqv.
01:24 rudi_s How would I combine that with ".?"?
01:25 raiph m: my $bar; my %a; %a<b> = 1; if %a.?foo !eqv $bar { ... }
01:25 camelia rakudo-moar 1ef247: OUTPUT«Stub code executed␤  in block <unit> at /tmp/1twOXXJaxX line 1␤␤»
01:25 timotimo raiph: you mean %a{$b}.?foo
01:25 raiph m: my $bar; my %a; %a<b> = 1; if %a<b>.?foo !eqv $bar { ... }
01:25 camelia rakudo-moar 1ef247: OUTPUT«Stub code executed␤  in block <unit> at /tmp/P6yb16sYjP line 1␤␤»
01:26 rudi_s m: my $bar; my %a; if %a<b>.?foo !eqv $bar { ... }
01:26 camelia rakudo-moar 1ef247: OUTPUT«Stub code executed␤  in block <unit> at /tmp/V_2pld3Jb0 line 1␤␤»
01:27 rudi_s I don't want to enter the block in this case.
01:36 timotimo ah, right
01:36 timotimo because Nil wouldn't eqv $bar
01:45 zpmorgan joined #perl6
01:47 baest joined #perl6
01:56 Actualeyes joined #perl6
01:56 molaf joined #perl6
02:05 molaf_ joined #perl6
02:16 BenGoldberg joined #perl6
02:21 abaugher joined #perl6
02:32 tmch joined #perl6
02:33 raiph joined #perl6
02:51 colomon joined #perl6
02:57 telex joined #perl6
03:34 raiph joined #perl6
03:53 noganex_ joined #perl6
03:56 inokenty joined #perl6
04:05 jaldhar_ joined #perl6
04:14 xinming joined #perl6
04:19 anaeem1 joined #perl6
04:49 Actualeyes joined #perl6
04:57 raiph rudi_s: ping
04:57 jaldhar_ joined #perl6
05:00 jaldhar_ joined #perl6
05:11 abaugher joined #perl6
05:14 dalek DBIish: 46af42f | (Salvador Ortiz)++ | / (9 files):
05:14 dalek DBIish: Move testing framework to DBIish::CommonTesting
05:14 dalek DBIish:
05:14 dalek DBIish: Remove t/lib, we don't want an extra "use lib 't/lib';" in our tests.
05:14 dalek DBIish:
05:14 dalek DBIish: The work that was done 't/lib/Test/Config/Pg.pm' is useless as
05:14 dalek DBIish: the Pg C library implements all the PG* env vars handling.
05:14 dalek DBIish: review: https://github.com/perl6/DBIish/commit/46af42f4be
05:14 dalek DBIish: 8f4d682 | (Salvador Ortiz)++ | / (3 files):
05:14 dalek DBIish: Make panda happy bumping the version number.
05:14 dalek DBIish:
05:14 dalek DBIish: Continuous Integration needs that every change be reflected in the
05:14 dalek DBIish: version of our META6.json.
05:14 dalek DBIish:
05:14 dalek DBIish: We take this opportunity to unify the name of the test databases.
05:14 dalek DBIish: review: https://github.com/perl6/DBIish/commit/8f4d682965
05:19 Actualeyes joined #perl6
05:27 dalek DBIish: db002ce | (Salvador Ortiz)++ | t/35-pg-common.t:
05:27 dalek DBIish: Pg: Fix typo in test db name
05:27 dalek DBIish: review: https://github.com/perl6/DBIish/commit/db002cef2a
05:27 dalek DBIish: f979c70 | (Salvador Ortiz)++ | lib/DBDish/mysql (2 files):
05:27 dalek DBIish: mysql: Better error handling at connect
05:27 dalek DBIish: review: https://github.com/perl6/DBIish/commit/f979c70966
05:28 yeahnoob joined #perl6
05:47 Cabanossi joined #perl6
05:56 Actualeyes joined #perl6
06:06 llfourn joined #perl6
06:15 TEttinger joined #perl6
06:23 jdv79 that is sad about shimmerfairy bouncin:(
06:24 darutoko joined #perl6
06:34 sftp joined #perl6
06:38 nakiro joined #perl6
06:59 CIAvash joined #perl6
07:01 bjz joined #perl6
07:04 tmch joined #perl6
07:05 domidumont joined #perl6
07:08 domidumont joined #perl6
07:16 buharin joined #perl6
07:16 buharin moritz, hi
07:29 buharin why cant I use variable to initialise itself like in python
07:30 buharin or even C
07:39 firstdayonthejob joined #perl6
07:41 xinming joined #perl6
07:47 buharin someone here?
07:47 Timbus ? in what way
07:47 buharin perl6 t/basic.t  12.66s user 0.18s system 99% cpu 12.850 total
07:48 buharin wtf I write simple function
07:48 buharin and it run it 12s
07:48 buharin crazy
07:48 buharin xD
07:49 Relsak joined #perl6
07:51 Timbus how do you "use a variable to initialize itself" in C ?
07:51 moritz m: my $x = 42; say $x; # initialized variable, for buharin
07:51 camelia rakudo-moar 1ef247: OUTPUT«42␤»
07:54 buharin a = 2
07:54 buharin b = 3
07:54 buharin a = a + b
07:54 buharin OUTPUT a = 5
07:54 moritz sure
07:54 arnsholt m: my $a = 2; my $b = 3; $a = $a + $b; say $a
07:54 camelia rakudo-moar 1ef247: OUTPUT«5␤»
07:55 Timbus put dollar signs in there and you got it
07:55 moritz you can shorten that to
07:55 moritz m: my $a = 2; $a += 2; say $a
07:55 camelia rakudo-moar 1ef247: OUTPUT«4␤»
07:56 buharin hey see this
07:56 buharin https://github.com/buharin/facebook-sdk
07:56 buharin I have started to write it but ;d
07:56 buharin my test going thorough 12sec
07:57 buharin and sure I cant initialize
07:57 buharin my $temp = $.GRAPH_API ~ "/" ~ $!version ~ "/" ~ $url;
07:57 buharin $url = $temp;
07:58 nowan joined #perl6
08:00 vendethiel- joined #perl6
08:02 buharin ??
08:03 sno joined #perl6
08:03 buharin moritz, Timbus arnsholt
08:04 moritz buharin: what makes you think you can't do that?
08:04 buharin an error
08:08 moritz buharin: what error?
08:08 moritz buharin: do you seriously expect us to be able to help you if you don't even tell us the error you get?
08:14 ely-se joined #perl6
08:17 buharin joined #perl6
08:17 buharin need to go
08:18 * moritz can't shake off the feeling that buharin trolls us
08:19 TimToady joined #perl6
08:20 nine_ Would be an elaborate way of trolling though.
08:29 CIAvash Is "Missing serialize REPR function for REPR VMException" a bug in HTTP::UserAgent or a general issue?
08:31 uruwi joined #perl6
08:32 zakharyas joined #perl6
08:35 abraxxa joined #perl6
08:37 jaldhar_ joined #perl6
08:43 labster joined #perl6
08:44 nowan joined #perl6
08:53 maybekoo5 joined #perl6
09:09 kjs_ joined #perl6
09:12 bioexpress joined #perl6
09:15 sunnavy joined #perl6
09:22 dalek rakudo/nom: 6f96209 | lizmat++ | src/core/Rakudo/Internals.pm:
09:22 dalek rakudo/nom: Streamline error handling for shaped arrays
09:22 dalek rakudo/nom:
09:22 dalek rakudo/nom: Hopefully gaining a bit of performance because of easier inlineability
09:22 dalek rakudo/nom: and get some clearer code as a bonus
09:22 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/6f96209fd2
09:24 El_Che ls
09:24 lizmat El_Che  o/
09:24 * lizmat clickbaits https://p6weekly.wordpress.com/2016/02/29/2016-9-blobs-leaping-away/
09:25 El_Che it is OK to add additional information to the META6.json file? Maybe "namespaced" prefix_something: "blah"
09:25 * El_Che reading p6weekly
09:27 vendethiel joined #perl6
09:29 dakkar joined #perl6
09:29 RabidGravy joined #perl6
09:33 lizmat moritz++
09:33 lizmat afk for a few hours&
09:36 espadrine joined #perl6
09:36 arnsholt m: role R { my $a = 0; method foo() { $a++; say $a; } }; class A does R {}; class B does R {}; A.foo; B.foo # I wonder...
09:36 camelia rakudo-moar 6f9620: OUTPUT«1␤1␤»
09:36 fireartist joined #perl6
09:36 arnsholt Spiffy, spiffy
09:41 bjz_ joined #perl6
09:41 kjs_ joined #perl6
09:42 RabidGravy BOO!
09:49 bioexpress Hello, is there a Perl6 signature which I could use to convey a native `wchar_t`?
09:50 CIAvash RabidGravy: Can you take a look at this question? http://irclog.perlgeek.de/perl6/2016-03-01#i_12121045
09:50 RabidGravy It's both :)
09:51 RabidGravy it should however be fixed for H::UA for the most recent
09:53 CIAvash Before, that message would just be printed but the code would work, now the code that uses H::UA dies.
09:54 RabidGravy what causes it is some code in the compile time mainline giving rise to a Failure, in the case of H::UA it is a "try require IO::Socket::SSL" that was in the mainline of the class
09:54 RabidGravy I moved it as late as possible
09:54 arnsholt bioexpress: Not currently, I think. Unfortunately
09:57 bioexpress Thx, than I have to wait a little bit.
09:57 CIAvash RabidGravy: You mean a fix was released?
09:58 arnsholt bioexpress: How much variation is there in how wchar_t is defined on various platforms?
09:59 RabidGravy Hmm I thought so but I may have made a mistake, it's in my local copy but not on GH :(  'ang on a sec
09:59 RabidGravy this will be why I'm not seeing it anymore but every one else is
09:59 CIAvash :)
10:00 bioexpress arnsholt: I don't know. I asked because I'ld like to use the ncurses `int addwstr(const wchar_t *wstr);` in Perl6.
10:03 arnsholt Right. If you'd like to get stuck in you can always just hardcode the relevant type for the platform you're working on
10:04 arnsholt And then lobby one of the people working on NativeCall ATM to add a wchar_t type
10:05 bioexpress I will try it
10:08 RabidGravy CIAvash, there https://github.com/sergot/http-useragent/commit/1c929ad9fa7aad54d3af9b0cc902fa3b5beaf4c4
10:12 CIAvash RabidGravy: thanks :)
10:13 vendethiel joined #perl6
10:16 Actualeyes joined #perl6
10:23 luiz_lha joined #perl6
10:35 JimmyZ_ joined #perl6
10:43 partly joined #perl6
10:43 partly Hi
10:44 partly I just search 15 minutes for an error. In the end it was an if $foo = -1 instead if $foo == -1. May be the compiler should warn one about this? Or is it a feature?
10:45 DrForr There are legitimate reasons to assign inside an 'if' expression.
10:46 partly DrForr: There were? (not arguing, trying to understand)
10:46 partly s/There/They/
10:46 jast in some languages a warning like that is generated only if the assignment is directly on the top level of the expression
10:46 jast e.g. if foo = 4 creates a warning, if (foo = 4) doesn't
10:47 DrForr Sure, think about do_stuff() if $index++; "Tested the index, now move on."
10:48 partly DrForr: Is $index++ not different from $index = -1? The first one is a function call, the second one is an assignment?
10:48 DrForr They're both assigning.
10:49 partly Maybe a similar warning like jast mentioned?
10:50 kjs_ joined #perl6
10:50 RabidGravy regarding the wchar_t thing, it would need to be implemented in NativeCall::Types, MetaModel::NativeHOW and the P6Int repr
10:50 DrForr Well, propose it, I suppose. I do it myself on occasion but usually find it quickly.
10:50 RabidGravy not so trick
10:51 partly DrForr: how do i propose something? Any manual on that?
10:51 DrForr Pull requests speak louder than words ;)
10:52 DrForr I wouldn't know though. Discussing it here can't hurt.
10:52 partly DrForr: ic :)
10:54 RabidGravy lots of places where you might want to test an assignment
10:55 RabidGravy if $a = something() { } is quite common
10:57 partly RabidGravy: yeah i see how this can be useful.
10:59 DrForr Worst case, rely on the old C trick of '1 == stuff()' :)
11:00 wamba joined #perl6
11:01 partly DrForr: TIL. thank you!
11:02 RabidGravy is there some web server module that a) won't output any headers at all if you don't ask it to, b) can support arbitrary request methods
11:03 DrForr Patience, Daniel-San :)
11:03 RabidGravy the icecast source protocol is a bit, er, special
11:03 DrForr Will Crust allow [] in place of the usual content-type?
11:04 RabidGravy well,  HTTP::Server::Tiny always adds the Date and Server headers
11:06 DrForr Feature request of them, maybe?
11:06 RabidGravy and the source protocol don't work if you send anything other than a "HTTP/1.0 200 OK\r\n\r\n" in response to a valid SOURCE request
11:07 RabidGravy which is all a bit yuck
11:10 RabidGravy and it appears the client on receipt of that just splurges the data over the open connection
11:12 rurban joined #perl6
11:16 RabidGravy the documentation alludes to modern servers using PUT but I haven't find a client that actually does that
11:17 johndau joined #perl6
11:17 Juerd 11:55 < RabidGravy> if $a = something() { } is quite common
11:17 Juerd Well, it used to be. And then we got: if something() -> $a { ... }
11:17 DrForr Well, Prancer accepts PUT but I don't know if the P6SGI layer does. I've had to rewrite the core because I found a problem in the URL mapping.
11:17 RabidGravy yes
11:18 Juerd So far, I haven't written a single "if $a = something() { ... }" yet, simply because I never wanted that $a to be scoped outside the block anyway.
11:18 Juerd (iirc)
11:19 RabidGravy well the HTTP::Parser thing will accept any old request method
11:19 Juerd So this does change my mind from not wanting that warning to really wanting it :)
11:19 Juerd Might even try to patch that myself
11:20 RabidGravy I'm relaxed about it, but I think it should be limited to constant values on the RHS
11:33 lizmat re: if $a = something() { } being quite common: yes, in P5
11:34 lizmat in P6 we can do:   if something() -> $a {}
11:35 lizmat so perhaps a general warning for if $a = something *could* be in order in P6, pointing to the something -> $a alternative
11:35 lizmat ah, I see Juerd already made the point :-(
11:38 llfourn I don't think that should be a warning. You can legit reasons for not using pblock.
11:38 llfourn like not wanting a ro container and not wanting to write 'is rw'
11:39 llfourn or "is copy" rather
11:39 jnthn The "only warn if it's a literal on the RHS" may be a reasonable compromise
11:40 llfourn but people don't usually if literals :P
11:41 lizmat m: sub a(\a) is raw { a }; my $a; if a($a) <-> $b { $b = 42 }; dd $a  # hmmm.. sorta expected $a to be 42
11:41 camelia rakudo-moar 6f9620: OUTPUT«Any $a = Any␤»
11:41 lizmat *or* fail
11:41 * llfourn doesn't even know what <-> is
11:41 lizmat short for "is rw" ?
11:42 arnsholt It's -> {} but with the parameters being is rw, IIRC
11:42 llfourn oh cool
11:42 jnthn llfourn: Yes, that's exactly the point
11:42 jnthn llfourn: if $a = 1 { } is very likely a mistake
11:42 llfourn ah right yep I understand now
11:44 llfourn m: say <-> $a { }.perl
11:44 camelia rakudo-moar 6f9620: OUTPUT«-> $a is rw { #`(Block|55179248) ... }␤»
11:44 llfourn m: say <-> $a { }.(2)
11:44 camelia rakudo-moar 6f9620: OUTPUT«Parameter '$a' expected a writable container, but got Int value␤  in block <unit> at /tmp/n_pG5HSnJC line 1␤␤»
11:44 llfourn is there an 'is copy' one?
11:45 jnthn No, but it's fun to imagine what it might look like :P
11:47 moritz -||>
11:48 moritz -(c)>
11:48 moritz -(:c)> # we can put adverbs here!
11:48 ely-se joined #perl6
11:49 llfourn -⎘> $a { ...} #?
11:53 vendethiel- joined #perl6
11:56 dakkar has anyone tried to embed a perl6 runtime into some other programs?
11:56 llfourn I think there's an Inline::Perl6 that nine++ made...
11:57 dakkar ah right, that may be a nice starting point
11:57 llfourn https://metacpan.org/pod/Inline::Perl6
11:57 * dakkar will look
11:58 kid51 joined #perl6
12:01 rindolf joined #perl6
12:01 nine_ dakkar: documentation is sorely lacking, but I'm happy to answer questions. Also there's http://niner.name/talks/Building Bridges/examples/inline_perl6.html
12:11 dalek rakudo/nom: cf3b121 | lizmat++ | src/core/Parameter.pm:
12:11 dalek rakudo/nom: Streamline Parameter.named a bit
12:11 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/cf3b121b79
12:13 Skarsnik joined #perl6
12:13 vendethiel joined #perl6
12:13 Skarsnik Hello
12:15 lizmat Skarsnik  o/
12:16 kjs_ joined #perl6
12:16 DrForr \o
12:17 kjs_ joined #perl6
12:25 dalek rakudo/nom: b9a79ec | lizmat++ | src/core/Parameter.pm:
12:25 dalek rakudo/nom: Simplify Parameter.named_names|type_captures
12:25 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/b9a79ece93
12:26 rurban joined #perl6
12:30 lizmat jnthn: do you have any idea why it is impossible to create a class that does Blob in the setting?
12:30 Relsak joined #perl6
12:33 nine_ lizmat: "A module can now print to $*OUT while being compiled without messing up the precompilation process." Shouldn't this be $*ERR?
12:34 nine_ lizmat: "Of which one really sad." is missing a verb
12:34 vendethiel- joined #perl6
12:34 lizmat nine_: not sure about that verb missing there
12:34 nine_ Though that might be a subtle hint to that a part of us is missing.
12:35 lizmat yeah, the verb omission there was intentional
12:35 nine_ lizmat++ # I like subtlety
12:35 lizmat nine_: cc0472b43e9edb6c777e7 states: fix precompiling a file that outputs to stdout
12:36 nine_ Oooh I missed that patch.
12:36 nine_ I'm also not sure I like it :/
12:36 lizmat yeah, FROGGS didn't like it either... but it makes it work for now
12:37 nine_ I wonder why a module's mainline would want to write to STDOUT?
12:40 skids joined #perl6
12:52 colomon joined #perl6
12:53 RabidGravy would it be enormously difficult to "upgrade" a normal IO::Socket client socket to an IO::Socket::Async one?
12:59 iH2O joined #perl6
13:00 lizmat RabidGravy: I think so, because they differ at the nqp level
13:01 RabidGravy is the actual VMIO different?
13:02 lizmat nqp::asyncconnect vs nqp::open (I think)
13:02 lizmat that I'm not sure of
13:02 RabidGravy it was just something that occurred to me while I was playing with this noddy streaming server
13:03 jnthn Moving handles between libuv event loops is very fraught
13:03 jnthn We may actually have more luck doing it once we stop using libuv for sync I/O
13:06 sufrostico joined #perl6
13:06 Actualeyes joined #perl6
13:07 johndau` joined #perl6
13:10 z8 joined #perl6
13:20 iH2O left #perl6
13:23 rurban joined #perl6
13:25 Relsak joined #perl6
13:28 kaare_ joined #perl6
13:37 kjs_ joined #perl6
13:37 timotimo o/
13:45 cdg joined #perl6
13:46 * lizmat wonders what magic is happening here: $!default_value ~~ Code ?? $!default_value !! { $!default_value }
13:46 * lizmat wakes up
13:47 tadzik heh
13:47 tadzik "callify" the default_value, it seems
13:47 lizmat yeah, which means adding overhead
13:47 jnthn Probably coping with a place where we may get a funk or may get a value and want it to be consistent
13:48 jnthn *thunk
13:48 tadzik it may make sense to call it if it's code, save it if not
13:48 tadzik unless it's meant to be lazy
13:48 jnthn It's rather hard to say without context ;)
13:48 tadzik ye :)
13:48 lizmat $rest ~= ' = { ... }' if $default;
13:49 lizmat it's about Parameter.perl
13:49 jnthn Hm
13:49 jnthn If it's a value we could actually .perl the value...
13:49 lizmat now, if $default were just a value, we could actually say: $rest ~= " = $default";
13:49 jnthn $default.perl() :)
13:49 lizmat yeah...
13:50 lizmat OTOH, this Parameter.perl is really Parameter.gist
13:50 lizmat if it's about roundtripping, we could as well do Parameter.new(flags => 723) etc
13:50 jnthn Well, .perl certainly needs to get it .perl'd
13:50 lizmat instead of figuring out how each flag influences how we look at it
13:51 jnthn Yeah, but .perl there is used when .perl-ing Block, Sub, etc.
13:51 jnthn And so you want a signature literal out of it really
13:52 jnthn So they can come out syntacticly sane
13:52 lizmat agree
13:52 jnthn Phone call, then - at last - should have some Perl 6 hacking time \o/
13:52 jnthn bbs
13:58 Ven joined #perl6
13:58 Ven o/
13:59 masak \o
13:59 addison joined #perl6
14:07 sftp joined #perl6
14:08 RabidGravy so if I had a thing to decode the input stream so I can emit a properly encoded output stream this streaming server might actually work
14:15 SCHAAP137 joined #perl6
14:17 dakkar joined #perl6
14:25 raiph joined #perl6
14:26 skids joined #perl6
14:37 abaugher joined #perl6
14:37 RabidGravy erk, the mad decoder has a waay weird interface
14:38 wamba joined #perl6
14:41 rudi_s Hi. I'm having a problem with the classify solution to split an array into two based on a predicate: my (@a, @b) := (1,2,3,4).classify({ $_ %% 2 }).{True, False}
14:42 rudi_s It works fine if @a and @b are not empty, but if they are, it fails:
14:42 rudi_s m: my (@a, @b) := (1,3).classify({ $_ %% 2 }).{True, False}
14:42 camelia rakudo-moar b9a79e: OUTPUT«Type check failed in binding @a; expected Positional but got Any (Any)␤  in block <unit> at /tmp/VfJiSa2CWB line 1␤␤»
14:42 rudi_s Any idea how I could fix this?
14:42 rudi_s *but if either one is empty, it fails.
14:44 themonkeybob11 joined #perl6
14:53 lizmat commute to Amsterdam.PM&
14:59 RabidGravy rudi_s, >
14:59 rudi_s RabidGravy: ?
14:59 RabidGravy m: my (@a, @b) := (1,3).classify({ $_ %% 2 }).{True, False}.map({ $_ // []}).list; say @a, @b;
14:59 camelia rakudo-moar b9a79e: OUTPUT«[][1 3]␤»
15:01 rudi_s RabidGravy: Thanks. But that's a little ugly. With just {True, False} it was nice, but this needs quite a lot of boilerplate.
15:02 RabidGravy I won my bet with mysefl
15:02 rudi_s Which was?
15:02 RabidGravy there was going to be a "but"
15:02 rudi_s Well ;-)
15:03 rudi_s Please don't tell me you think this is a nice solution for the simple task to split a list in two?
15:03 RabidGravy I don't have any opinion whatsoever about it
15:03 rudi_s Hm.
15:04 masak rudi_s: whenever you feel a solution is insufficiently nice or un-idiomatic, there's a particular language pattern that helps
15:04 masak it's called "named subroutines"
15:05 masak it can help abstract away some tedious code, pulling it out of the way of your main sentence
15:05 masak all the while providing an action or a transformation with a nice, domain-aligned designation
15:05 masak people underestimate this pattern
15:06 rudi_s masak: And how's that going to help? I have to write that small subroutine in each perl6 project where I need that particular feature.
15:06 masak yes, that's an excellent start, IMO
15:06 masak whenever the name makes sense, at least
15:07 timotimo C question, if i may
15:07 timotimo src/6model/reprs/P6opaque.c:686:52: error: lvalue required as left operand of assignment
15:07 timotimo (void *)(repr_data->attribute_offsets)     += (char *)allocated_repr_blob;
15:07 geekosaur or you can make a private library of such things as modules
15:07 rudi_s I don't like duplication. Anyway, would be nice if perl6 had a short way to express that.
15:07 timotimo all i want to do is move the pointer on the lhs by the amount of bytes on the RHS. how do i spell that correctly?
15:07 masak rudi_s: one of the nice parts about this is re-use -- if you end up using the pattern in many places, and you need to change the underlying code, you only need to change the code in one place.
15:07 geekosaur timotimo, it's the cast that's doing it
15:07 geekosaur LHS cast
15:08 timotimo geekosaur: right, but if i don't cast, wouldn't i have to divide the RHS by the pointer size of the LHS?
15:08 masak rudi_s: I guess it's all a question of what's more important at this point -- using an abstraction mechanism and making the code nicer, or being stubborn
15:08 rudi_s masak: Not sure if you're trolling.
15:08 masak not trolling.
15:08 masak genuinely trying to help.
15:08 rudi_s timotimo: You'd need to cast to char *.
15:08 timotimo i had (char *) on the lhs before, that errored the same way
15:08 rudi_s Pointer arithmetic is not defined on void *.
15:09 geekosaur casting to (char *) still makes an rvalue
15:09 rudi_s Yeah, what geekosaur said. void * vs. char * is a separate problem.
15:09 timotimo well, if i drop the cast, i get "invalid operands to binary +"
15:09 timotimo so i just won't be able to += ?
15:09 timotimo and instead replicate the LHS with the cast onto the RHS of a simple =?
15:10 geekosaur yep
15:10 rudi_s timotimo: Yeah.
15:10 rudi_s But you don't need the cast on the left side (unless it's C++).
15:11 geekosaur note that old versions of gcc used to permit that because the optimizer removed the cast before it was detected
15:11 geekosaur so it seems to be biting a bunch of people who got used to gcc allowing it
15:11 timotimo OK
15:11 timotimo src/6model/reprs/P6opaque.c:688:79: error: invalid operands to binary + (have ‘char *’ and ‘char *’)
15:11 timotimo well, that's fun
15:12 rudi_s masak: I know I can abstract things, but I'd like to get core features in the language.
15:12 geekosaur hm
15:13 rudi_s timotimo: You can't add a char *, you can only add a int.
15:13 rudi_s s/int/numeric value/
15:13 masak rudi_s: is this about wanting .classify to work differently? maybe the discussion would be more productive if it was clearer what exactly you're currently missing.
15:14 geekosaur timotimo, what is allocated_repo_blob?
15:14 geekosaur (in particular what is its type?)
15:14 tadzik joined #perl6
15:14 rudi_s masak: I want to split an array/list into two based on a predicate. The first contains the ones where the predicate returns true, the second where it's false.
15:15 rudi_s Btw. how can I return two arrays from a function so that I can do my (@a, @b) = foo()?
15:15 timotimo geekosaur: void *
15:15 masak rudi_s: the first list can be had through .grep
15:15 pyrimidine Anyone here interested in bioinformatics apps for Perl 6?  Open Bioinformatics Foundation is accepting proposals for the Google Summer of Code: https://summerofcode.withgoogle.com/organizations/5693436329984000/
15:15 geekosaur so how were you expecting to add two addresses together?
15:16 geekosaur did you want the size instead of the address? (you can't derive that from the address if it's allocated)
15:16 masak m: sub split_on_predicate(@l, &p) { [@l.grep(&p), @l.grep({ !&p($_) })] }; say split_on_predicate [1, 3], * %% 2
15:16 camelia rakudo-moar b9a79e: OUTPUT«[() (1 3)]␤»
15:16 timotimo geekosaur: the current value of those fields is an offset. so really, i'd want to reverse the arguments to +
15:17 masak rudi_s: about the same length as your solution, and much less cluttered ;)
15:17 geekosaur rudi_s, arrays, like other objects, are "passed by reference". so return (@a, @b) should work
15:17 geekosaur not like perl 5 where it would flatten them into a single list
15:18 pyrimidine re: GSoC and OBF: not just limited to Perl 6 of course, but figured it's worth mentioning here :)
15:18 geekosaur timotimo, so they're not really pointers?
15:18 RabidGravy classify also has an (albeit undocumented) argument "into"
15:18 geekosaur (I know you're working on a memory manager, but if it's not actually a pointer then it's a bad idea to tell C that it is a pointer.)
15:18 timotimo geekosaur: not yet at that point
15:18 sufrostico joined #perl6
15:18 RabidGravy m: my (@a, @b) := (1,3).classify({ $_ %% 2 }, into => {True => [], False => []}).{True, False}; say @a, @b
15:18 camelia rakudo-moar b9a79e: OUTPUT«[][1 3]␤»
15:19 timotimo chat C type would i use to hold the value of a pointer as an int?
15:21 rudi_s geekosaur: Thanks.
15:21 rudi_s masak: But I have to iterate twice over the list which is something I'd like to avoid.
15:23 rudi_s RabidGravy: Perfect, thank you.
15:23 * RabidGravy wonders why that isn't dpcumented
15:24 RabidGravy or indeed the "as" option either
15:24 FreezerburnV joined #perl6
15:27 nine_ timotimo: shouldn't your rhs just be an int?
15:29 masak m: sub split_on_predicate(@l, &p) { my (@yes, @no); (&p($_) ?? @yes !! @no).push($_) for @l; (@yes, @no) }; say split_on_predicate [1, 3], * %% 2
15:29 camelia rakudo-moar b9a79e: OUTPUT«([] [1 3])␤»
15:29 timotimo nine_: should i still be on relocatable_precomp on nqp and rakudo? :)
15:29 masak rudi_s: ^^
15:30 masak m: sub split_on_predicate(@l, &p) { (&p($_) ?? (my @yes) !! (my @no)).push($_) for @l; (@yes, @no) }; say split_on_predicate [1, 3], * %% 2
15:30 camelia rakudo-moar b9a79e: OUTPUT«([] [1 3])␤»
15:30 masak ...if you want to golf things down a little.
15:30 rurban1 joined #perl6
15:30 nine_ timotimo: if it works for you ;) Note however that that branch is a little out of date wrt nom. And I probably won't do any more development on it for a week as I've still got two talks to prepare and a room to book for GPW
15:31 timotimo OK, so maybe i'll revert to master/nom for now
15:31 timotimo thanks!
15:32 RabidGravy so there I was thinking that the output from this stupid streaming toy was all messed up, and it turns out the file I was streaming *was actually like that*
15:32 masak m: sub split_on_predicate(@l, &p) { return my (@yes, @no) given ((&p($_) ?? @yes !! @no).push($_) for @l) }; say split_on_predicate [1, 3], * %% 2
15:32 camelia rakudo-moar b9a79e: OUTPUT«([] [1 3])␤»
15:32 masak :)
15:33 masak probably an Evil use of statement_mod `given`, just for its sequencing logic
15:33 RabidGravy evil is fair enough
15:35 rurban joined #perl6
15:37 timotimo RabidGravy: damn; your stuff seems really hard to do :S
15:37 RabidGravy :) BWAHAHA
15:37 timotimo like, everything's trying to murder your productivity
15:39 RabidGravy along with the cat, facebook, and OooOOoooh why has that big bus stopped outside ;-)
15:39 rudi_s masak: Thanks.
15:40 RabidGravy so anyway with one client Perl 6 is fast enough to stream MP3 at 320kbps (with the server and source client being perl6 apps)
15:40 RabidGravy so
15:40 masak rudi_s: for what it's worth, I agree with you that the API of .classify is clunky and cumbersome in practice.
15:40 RabidGravy perl6++
15:40 masak rudi_s: not so sure what to do about it, though :/
15:40 masak it looked better at the earlier stages of the design, when not everything had to fit together in practice
15:42 masak rudi_s: (as you can see, I'm actually arguing exactly the same point as you -- a core construct for this behavior -- it's just that I've seen it happen, and what we got was .classify)
15:43 timotimo RabidGravy: so, will you turn up the client count now? :)
15:44 RabidGravy let's see if I have a client application on another machine
15:45 rudi_s masak: I thought about adding a new function "partition" (which would be your split_on_predicate) but I failed to understand the rakudo internals.
15:46 masak you'll probably want to look at src/core/List.pm or something
15:47 masak hehe, that file starts with '# for our tantrums' :)
15:47 RabidGravy Any.pm
15:47 masak lizmat++
15:47 masak it sounds like the rageful version of '# for our sins' :P
15:48 rudi_s Is there an easy way to convert a blob to a hex string?
15:48 * masak .oO( # for our laziness, impatience, and hubris )
15:48 perlpilot rudi_s: as soon as you do make your partition routine, be sure to put up a version of quicksort that uses it on rosettacode   :)
15:50 hoelzro o/ #perl6
15:51 ggoebel16 joined #perl6
15:51 masak m: say Blob.new(12, 10, 15, 14, 11, 10, 11, 14).list.fmt("%X", "")
15:51 camelia rakudo-moar b9a79e: OUTPUT«CAFEBABE␤»
15:51 molaf joined #perl6
15:51 rudi_s perlpilot: Will do ;-)
15:51 masak a bit more legwork needed if the Blob has values beyond the 0..0xF range, though
15:53 RabidGravy timotimo, three clients is worky, no appreciable wobble
15:53 timotimo whoa.
15:53 RabidGravy (difficult to tell with my friend Mike Stern's techno mixes however)
15:53 rudi_s masak: Thank you, that works fine, even with values up to 0xff.
15:53 timotimo hahaha :D
15:54 skids m: my %h is default([]); my (@a, @b) := (%h = (1,3).classify({ $_ %% 2 })).{True, False}; say @a.perl, @b.perl
15:54 camelia rakudo-moar b9a79e: OUTPUT«[][1, 3]␤»
15:54 psch m: say Blob.new(202, 254, 186, 190).list.fmt("%X", "")
15:54 camelia rakudo-moar b9a79e: OUTPUT«CAFEBABE␤»
15:59 skids m: my %h is default([]); my (@a, @b) := (%h = (1,3).classify({ $_ %% 2 })).{True, False}; say @a.perl, @b.perl; @a.push(4); %h = (); %h{5}.say # heheh.  So much evil could be accomplished.
15:59 camelia rakudo-moar b9a79e: OUTPUT«[][1, 3]␤[4]␤»
16:02 masak rudi_s: oh, so it does
16:02 hoelzro joined #perl6
16:02 skids m: sub foo {my %h is default([])}; my %h := foo(); %h{5}.push(4); my %g := foo(); %g{3}.say
16:02 masak rudi_s: you might want to pad with zeroes, though. %02X or so
16:02 camelia rakudo-moar b9a79e: OUTPUT«[4]␤»
16:02 rudi_s masak: Good idea, thanks.
16:02 virtualsue joined #perl6
16:05 skids m: sub foo {my @a = (); my %h is default(@a)}; my %h := foo(); %h{5}.push(4); my %g := foo(); %g{3}.say # I don't know maybe this one is pushing into bug territory.
16:05 camelia rakudo-moar b9a79e: OUTPUT«[4]␤»
16:09 khw joined #perl6
16:23 rurban1 joined #perl6
16:24 hankache joined #perl6
16:25 masak skids: seems you ordered your foot to be shot by giving default() a reference type
16:25 perlpilot skids: I'd say not a bug.
16:26 masak but I agree it's a wee bit odd that you're getting the *same* reference twice from two function calls, seemingly
16:26 hankache The first draft of the French translation of perl6intro.com is available at fr.perl6intro.com PRs are welcomed: https://github.com/hankache/perl6intro
16:26 masak I wonder if there's a more direct way to show that...
16:26 hankache hello *
16:26 masak hullo hankache
16:26 masak congrats on the draft
16:26 kjs_ joined #perl6
16:27 timotimo neat!
16:27 timotimo there's a draft, can you please shut the window?
16:27 hankache This is a community effort so ++ everyone who contributed
16:27 perlpilot masak: "is default()" happened at compile time, so it's only got the one reference
16:27 hankache draft beer? ;)
16:33 skids perlpilot: perhaps, but should "is default(@a)" work in the first place, given @a is something cloned with the block?
16:35 cdg joined #perl6
16:36 skids Probably a question for (much) later, anyway.
16:36 masak perlpilot: in a way the `my` itself happens at compile time, but it still gets the right per-actual-scope behavior.
16:36 perlpilot skids: It should probably work, but differently from how it works now :)
16:36 masak I don't see offhand why `is default` should be different
16:38 kalkin- ugexe: I've read your github comment on my PR for sergot/openssl. After reading the docs about Version, wouldn't it make more sense to use the build in Version type? Yes this will obviosly break the api, but it would be a saner solution, wouldn't it?
16:38 themonkeybob11 joined #perl6
16:39 ugexe kalkin-: than naming it something else like AllowedVersion?
16:39 kalkin- ugexe: it would be nice to have v2.0 v3.0 v1.2 in the when clause ;), but obviosly renaming is the simplest way
16:40 * kalkin- is probably getting overexcited with the perl6 syntax sugar stuff
16:42 ugexe if you take the where clause out of the signature you can then give a sensible error message as well instead of 'type constraint failure'
16:44 kalkin- ugexe: but then the compiler could not evaluate it at compile time, if i understand it right
16:52 ugexe maybe something like this as the first new candidate? `multi new(:$!version! where {Version.new($_) !~~ v1.1 | v1.2}) { die "this module only supports versions 1.1 and 1.2"; }`
16:53 ugexe you could use `Version :$!version! where * ~~ v1 | v2`, but that would break backwards compat with modules that use it
16:54 kalkin- ugexe: but the first example wouldn't be evaluated at compile time, or would it?
16:55 ugexe why do you want it evaluated at compile time instead of runtime?
16:58 kalkin- ugexe: because I want to catch errors early? It's not like there is a new TLS version every week, so it needs to be dynamically determined if a specific version is available. I prefer the compiler doing the work for me, or I would code in Python :)
16:59 kalkin- But may be I don't full undestand the Prl 6 spirit
16:59 kalkin- *fully understand*
16:59 sjn useful for static code checking/analysis? (e.g. automatically pick up requirements from code)
16:59 ugexe there are any number of ways to do that. but i dont think the signature is the place for it
17:00 * sjn sees now that this was a signature
17:00 sjn yeah, that's... hm.
17:01 sjn API versioning might be nice, but perhaps a bit ambitious to put that information in signatures, yes
17:01 sufrostico joined #perl6
17:02 * sjn wonders if API versioning can be done with roles
17:02 kalkin- why is it bad or ambitious? Like I said it's not like it needs to change that often and if TLSv1.3 will be released there should be no issue just extending the subset? Or am I missing something basic?
17:03 ugexe because 'failed type constraint' is not a useful error to the user
17:03 kalkin- ugexe: i see
17:06 ugexe m: say Distribution.new(:name<foo>).Str
17:06 camelia rakudo-moar b9a79e: OUTPUT«foo:ver<>:auth<>:api<>␤»
17:08 ugexe when the :api part of the above is implemented it will provide a more ideal solution
17:08 RabidGravy yeah I was thinking that
17:08 RabidGravy couple of things where it would be useful I've already encountered in the last few weeks
17:09 mephinet joined #perl6
17:12 kalkin- ugexe: i think i lost you. What is this api part you are talking about and how do you want to reuse it? p6doc has no information on Distribution class
17:12 kalkin- (or you lost me :) )
17:13 RabidGravy it's not documented
17:14 themonkeybob11 joined #perl6
17:14 RabidGravy the Distribution is the thing that gets installed when some installer does "... install Foo"
17:17 kalkin- About the 'failed type constraint' error. A proper IDE would normally show that you are allowed only to enter the values 2, 3, .... May be the compiler could do the same?
17:18 kalkin- RabidGravy: Ok but the Distribution api version is module specific, while the SSL version stuff are just different protocols, or did I misunderstand something?
17:18 ugexe but you can have `where $_ * 100 > 3 ?? die !! True`
17:20 ugexe because you could theoretically use :api to handle multiple versions of (most likely nativecall) apis/protocols/whatever in a single Distribution
17:21 sjn hm
17:21 kalkin- ugexe: you mean by adding some api suffix to my `use OpenSSL;` import?
17:22 sjn isn't :api about which API version a module *provides*?
17:23 ugexe yes, so it would probably provide a bunch of `new` methods to handle each type of version
17:24 ugexe you are providing the same apis in essence
17:24 kalkin- Ok but how would i map the following case (which currently isn't possible): I'm writing an application which I want to limit to support only TLS 1.1 and TLS 1.2. If the server does not support the both versions i want, i don't want to connect
17:25 kalkin- (besides that using TLS does not work with the current api at all, i wanted to submit the bugerport for this, but first needed to fix the Int issue)
17:27 zpmorgan joined #perl6
17:28 kalkin- Or shouldn't the case of limiting to TLS 1.1 & 1.2 handled by the OpenSSL api at all, and be done in the application logic?
17:28 RabidGravy yes, the latter, assuming you can get the version from the OpenSSL
17:30 RabidGravy the only way it would make sense in the libray API is if you can supply an optional matcher for the version when making the connection
17:32 atweiden joined #perl6
17:34 kalkin- This is the issue i mentioned https://github.com/sergot/openssl/issues/22  For some reason OpenSSL always tries to use SSLv3 instead of TLS
17:35 atweiden is there a concise way of writing this:
17:35 atweiden m: sub foo(&c where *.signature.params.elems == 1 && *.signature.params.grep(*.positional).elems == 1) { c(Any) }; sub bar($) { say 'works' }; foo(&bar)
17:35 camelia rakudo-moar b9a79e: OUTPUT«works␤»
17:35 themonkeybob11 joined #perl6
17:35 atweiden docs say something like sub f(&c:(Int)){} should work, but couldn't understand how to use it
17:36 psch m: sub foo(&c:($)) { c(Any) }; sub bar($) { say "works" }; foo(&bar)
17:36 camelia rakudo-moar b9a79e: OUTPUT«works␤»
17:36 RabidGravy kalkin-, I think there's a bug in the way that the library selects the version
17:36 atweiden psch: is it possible to specify &c returns Any ?
17:37 psch m: sub foo(&c:($ --> Any)) { c(Any) }; sub bar($ --> Str) { say "works" }; foo(&bar)
17:37 camelia rakudo-moar b9a79e: OUTPUT«Constraint type check failed for parameter '&c'␤  in sub foo at /tmp/2xGQvfGHAD line 1␤  in block <unit> at /tmp/2xGQvfGHAD line 1␤␤»
17:37 RabidGravy it specifies Int for version then tries to match e.g. 1.1 which is impossible
17:37 atweiden psch++
17:37 psch atweiden: note that you can use trait_mod<returns> for the argument, but not in the subsignature
17:37 kalkin- RabidGravy: yeah i think fixed it with my pr https://github.com/sergot/openssl/pull/21
17:37 ptolemarch joined #perl6
17:38 psch atweiden: as in, you can define &bar with 'returns Str', but you can't do so for &c
17:38 kalkin- RabidGravy: Also specifieng 1 which should pass as the Int type, does not work either. Same error
17:40 atweiden psch: &c return type check seems to check against *.isa(Any)
17:40 atweiden so that if &bar returns Str it fails
17:41 psch atweiden: i mean syntax, specifically.  as in "sub f(&c:($) returns Any) {..}" doesn't parse
17:41 atweiden i could do without the return type checking but is there any way to fix tha?
17:41 atweiden m: sub foo(&c:($ --> Any)) { c(Any) }; sub bar($ --> Any) { say "works" }; foo(&bar)
17:41 camelia rakudo-moar b9a79e: OUTPUT«works␤»
17:41 atweiden m: sub foo(&c:($ --> Any)) { c(Any) }; sub bar($ --> Str) { "does not work" }; foo(&bar)
17:41 camelia rakudo-moar b9a79e: OUTPUT«Constraint type check failed for parameter '&c'␤  in sub foo at /tmp/dvZsgH7G8l line 1␤  in block <unit> at /tmp/dvZsgH7G8l line 1␤␤»
17:42 themonkeybob11 joined #perl6
17:42 psch m: sub foo(&c:($ --> Any)) { c(Any) }; sub bar($) returns Any { say "works" }; foo(&bar) # e.g.
17:42 camelia rakudo-moar b9a79e: OUTPUT«works␤»
17:42 psch m: sub foo(&c:($Any) returns Any) { c(Any) }; sub bar($) returns Any { say "works" }; foo(&bar) # e.g.
17:42 camelia rakudo-moar b9a79e: OUTPUT«5===SORRY!5=== Error while compiling /tmp/3GbbtdzNrz␤Cannot call trait_mod:<returns>(Parameter, Any); none of these signatures match:␤    (Routine:D $target, Mu:U $type)␤at /tmp/3GbbtdzNrz:1␤»
17:43 psch well, it does parse but doesn't dispatch
17:44 psch a Parameter:D $target candidate for trait_mod:<returns> probably could fix that, if desired...
17:44 psch although probably not quite that easily, i don't think
17:45 ptolemarch Hi, there. I'm looking for information on Rakudo/JVM-Java interoperability. In particular, I can find a lot on calling Java from Perl6, but nothing on calling Perl6 from Java.
17:45 ptolemarch (I asked this yesterday afternoon, and I don't want to be a pest but I'm hoping to catch other eyes today...)
17:46 psch ptolemarch: https://github.com/rakudo/rakudo/blob/nom/src/vm/jvm/runtime/org/perl6/rakudo/RakudoEvalServer.java
17:46 psch ptolemarch: well, and the corresponding superclass, hang on...
17:47 psch ptolemarch: https://github.com/perl6/nqp/blob/master/src/vm/jvm/runtime/org/perl6/nqp/tools/EvalServer.java
17:47 ptolemarch psch: Awesome. It looks like this accepts a String and can run the resulting code.
17:48 psch ptolemarch: in the end, to call into Perl 6 from Java you have to build the whole interpreter
17:48 psch where "build" means "set up"
17:48 ptolemarch psch: Sure, fair enough, especially 'cuz eval() and such.
17:48 ptolemarch psch: but is it possible also to run already-compiled code?
17:49 psch ptolemarch: there's an nqp branch that explored packaging into .jar, if that fits your use-case
17:49 psch ptolemarch: it's kinda stalled though, no tuits :)
17:49 psch https://github.com/perl6/nqp/tree/standalone-jar/tools/jvm
17:49 ptolemarch Interesting.
17:49 psch the .sh script there explains the process as used there, but it's quite an out of date branch
17:50 psch no idea how easy it'd be to get that merged into master, though
17:50 ptolemarch I'm able to get `perl6 --target=jar --output blah.jar blah` to work, at least in the sense that it creates a .jar, but I have no idea what code is really resulting.
17:51 ptolemarch decompiling seems to result in a handful of `public static void` methods (none `main`), and classes embedded into the script don't seem to result in multiple .class files
17:51 psch ptolemarch: yeah, that gets you jvm bytecode that needs to be invoked via the Perl 6 interpreter
17:52 ptolemarch Huh.
17:52 psch well, not quite, actually
17:53 psch as in, the .jar contains program state after Perl 6 level BEGIN (or INIT, not sure) time
17:53 ptolemarch Here's what I'm hoping for: a jar, however big it needs to be, that I can use as a Minecraft server mod. :-)
17:53 ptolemarch oh, huh
17:53 ptolemarch that explains why there's both a [long hex hash].class and [long hex hash].serialized
17:53 psch and that still needs all the Perl 6 language level stuff to make sense to the JVM
17:53 ptolemarch Hmm.
17:54 ptolemarch I have no problem with the idea of a huge .jar with all the Perl6 interpreter in it. I'm just hoping to be able to write a mod in Perl6 rather than Java.
17:55 psch i don't know if the minecraft classloader can load nested jars, but if it can the standalone-jar branch should do most of what you need
17:55 psch well, assuming you can see through my minimal docs and get it working :S
17:56 ptolemarch :-)
17:56 psch if you don't need 6.c you can just get the nqp and rakudo standalone-jar branches as is and build them
17:56 ptolemarch Okay, this is somewhere to look, then. Thank you.
17:56 kjs_ joined #perl6
17:56 psch note though that you get lots of overhead and a very slow mod that way, 'cause you're effectively embedding a Perl 6 interpreter instead of adding a mod
17:57 ptolemarch Hmm.
17:58 ptolemarch I hadn't quite realized how very little of "compiling perl6 to JVM bytecode" was really going on.
17:59 psch well, our MOP alone doesn't fit directly onto the JVM
18:00 psch add &EVAL and things like BEGIN... vOv
18:01 psch i don't doubt that some jvm/indy wiz could make it all fit a lot closer, but those seems to be rather rare :)
18:02 ptolemarch Right.
18:03 ptolemarch Thank you for your help and advice.
18:03 Skarsnik gah the @array = %hash<stuff> not working as you can expect is annoying :(
18:05 RabidGravy it depends what you expect ;-)
18:06 dalek rakudo/faster-accessors: e10c487 | jnthn++ | src/ (12 files):
18:06 dalek rakudo/faster-accessors: Start to code-gen simple accessors.
18:06 dalek rakudo/faster-accessors:
18:06 dalek rakudo/faster-accessors: This makes them rather simpler/faster than adding them as closures.
18:06 dalek rakudo/faster-accessors: Most importantly, though, it will enable inlining of them, which is
18:06 dalek rakudo/faster-accessors: where the real speed-up will come from.
18:06 dalek rakudo/faster-accessors: review: https://github.com/rakudo/rakudo/commit/e10c487387
18:06 Skarsnik to affect the array in %hash<stuff>; I know you need to use := but it's causing me issue when it's not defined
18:07 Skarsnik I am not sure how to transform my @exclude-structs := %conf<exclude-structs>; without having 2 lines to avoid the := when it's not defined
18:08 jnthn dinner &
18:09 timotimo i like the look of that ^
18:11 Skarsnik could we have an operator that only apply the operator next to him if the left side is defined/exists in 6.d? x)
18:13 idiosyncrat_ joined #perl6
18:20 raiph joined #perl6
18:23 Skarsnik Yay, I finally generate file with gptrixie, see https://gist.github.com/Skarsnik/59355769f91e49e68abd if you are interessed ^^
18:29 domidumont joined #perl6
18:31 robins joined #perl6
18:31 avalenn_ joined #perl6
18:34 sufrostico joined #perl6
18:36 Cabanoss- joined #perl6
18:37 timotimo sweet :)
18:37 RabidGravy Skarsnik, can't you just do "my @f;  my %h;  @f := (%h<foo> // ())"
18:38 kjs_ joined #perl6
18:48 addison_ joined #perl6
18:48 TreyHarris joined #perl6
18:48 llfourn joined #perl6
19:05 ilbot3 joined #perl6
19:05 Topic for #perl6 is now »ö« Welcome to Perl 6! | https://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:,  or /msg camelia p6: ... | irclog: http://irc.perl6.org or http://colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
19:10 mspo hey did perl6 make it into GSOC 2016?
19:11 timotimo no
19:11 timotimo volunteer time was spread far too thin, and last year's GSoC has made potential volunteers pretty grumpy
19:12 mspo netbsd was rejected last year but got in this year
19:12 mspo so we're pleased
19:13 timotimo good :)
19:13 mspo but i'm with you on feeling burned
19:17 virtualsue joined #perl6
19:21 jim__ joined #perl6
19:28 dalek rakudo/nom: 231b898 | lizmat++ | src/core/Parameter.pm:
19:28 dalek rakudo/nom: Abstract modifier logic into a method
19:28 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/231b898b72
19:28 dalek rakudo/nom: 609e54a | lizmat++ | src/core/Buf.pm:
19:28 dalek rakudo/nom: Buf.splice takes the same params as Array.splice
19:28 dalek rakudo/nom:
19:28 dalek rakudo/nom: Also handle :SINK (although this is not codegenned yet)
19:29 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/609e54ac23
19:31 * [Coke] needs an apache conf file guru. :|
19:31 geekosaur joined #perl6
19:31 kipd joined #perl6
19:31 olinkl joined #perl6
19:31 flussence joined #perl6
19:31 Lucas_One_ joined #perl6
19:31 integral joined #perl6
19:31 drforr1 joined #perl6
19:31 timotimo joined #perl6
19:31 BinGOs joined #perl6
19:31 Peter_R joined #perl6
19:32 timotimo hey everyone, i'm back!
19:32 sjn hi timotimo, welcome back!
19:32 timotimo thanks!
19:34 moritz [Coke]: not really guru, but I can try to help
19:36 stmuk allowoverride all :)
19:38 mspo [Coke]: sure, ask away
19:38 mspo although #apache is also good :)
19:41 RabidGravy stmuk++
19:42 RabidGravy having worked at a certain large UK media organisation I'm an absolute master at rewrite rules, but no jack-shit else about apache
19:43 RabidGravy know
19:44 moritz RewriteEngine OFF # just for RabidGravy
19:44 El_Che [Coke] likes to keep people in suspence
19:45 stmuk I know enough to use heavy logging when debugging mod_rewrite rules :)
19:45 labster joined #perl6
19:45 RabidGravy is doing "my &bar = self.^method_table<bar>; &bar.assuming(self); $supply.tap(&bar);" asking for trouble? it seems to work fine
19:46 moritz RabidGravy: won't work with inheritance
19:47 moritz RabidGravy: but, why not just $supply.tap(-> |c { self.bar(|c) }) ?
19:47 moritz seems less convoluted
19:48 RabidGravy I had a strange idea that the self went away there, let me try that
19:49 * [Coke] just doesn't treat IRC like a live convo.
19:51 [Coke] (apache conf) I am using mod_auth to do OIDC; trying to copy the http headers; but the headers aren't available when I'm running mod_rewrite, (but they are when the app tier gets called). Trying https://github.com/pingidentity/mod_auth_openidc/issues/55, but having little luck.
19:54 musiKk_ joined #perl6
19:54 telex joined #perl6
19:56 RabidGravy moritz yep that does work, dunno why I thought you couldn't use self there
19:57 RabidGravy mush nicer
20:06 labster joined #perl6
20:19 RabidGravy there's nothing like testing an audio software with a mix that has three deck beat cutting, spinbacks and bit crushing, maybe some Bach would be better
20:23 SCHAAP137 joined #perl6
20:27 DrForr Hrm. I'm not getting any errors or warnings for 'use Test; is-deeply $foo, {...}\nq{Route is correct};' There should be an error about a missing comma between {...} and q{}, no?
20:27 Ven joined #perl6
20:28 DrForr But it does throw a warning if the \n becomes a ' '.
20:30 timotimo a } at the end of a line gives you a ; for free
20:30 [Coke] } ending a line is special.
20:30 [Coke] timotimo++
20:30 timotimo [Coke]++
20:33 timotimo hm. so, when /proc/cpuinfo says "cache alignment: 64" does that mean 64 bytes is how wide a single cache line is?
20:33 rudi_s What is the recommended way to write (unit) tests?
20:33 rudi_s timotimo: AFAIK yes.
20:34 moritz rudi_s: so far I've used Test.pm for all of my p6 testing needs
20:35 rudi_s moritz: Thanks.
20:35 rudi_s And doc.perl6.org even has docs, nice.
20:36 rudi_s Btw. we really should change the color of selections in search results in doc.perl6.org - I missed test because it looked like a section header. Any recommendations for a color?
20:36 psch https://gist.github.com/anonymous/0f7bdd4742cd745a1a37
20:37 psch that gist has the reason for why methods added with .^add_method to a Java class aren't found
20:37 psch apparently the JavaObjectWrapper STable has the authorative method cache
20:38 psch but the nqp::setmethcacheauth call in MethodContainer.add_method only turns off the meth cache authorativeness of the Perl 6 level STable...
20:38 zakharyas joined #perl6
20:38 psch i'd be tempted to fix this by adding a decont to the nqp::setmethcacheauth call in Metamodel::MethodContainer.add_method...
20:39 psch but i think that's not really fixing this in the right spot - the fact that everything else works fine without a decont there aside
20:42 zacts joined #perl6
20:45 psch $ ./perl6-j -e'use nqp; use java::util::zip::CRC32:from<Java>; say nqp::iscont(CRC32);'
20:45 psch 1
20:45 psch i suppose that plays a role there as well
20:46 psch m: use nqp; class Foo { }; say nqp::iscont(Foo)
20:46 camelia rakudo-moar 609e54: OUTPUT«0␤»
20:47 xinming joined #perl6
20:49 timotimo rudi_s: https://github.com/perl6/doc/issues/357
20:50 rudi_s timotimo: Yeah, found that as well. Still needs a fix and I'm not sure what color to use. I'd use a light yellow for the current selection but I'm not sure if that's visible enough.
20:50 spider-mario joined #perl6
20:51 timotimo i thought it'd be enough to post that issue and mention it in the irc; there was a bit of discussion, but nobody actually did a fix :|
20:51 timotimo i'd be willing to merge pretty much any pull request you could come up with
20:51 timotimo though please include a screenshot :)
20:54 TEttinger joined #perl6
20:55 timotimo dinner time!
20:56 dalek rakudo/jvminterop: 5d57154 | peschwa++ | src/vm/jvm/CompUnit/Repository/Java.pm:
20:56 dalek rakudo/jvminterop: Don't import a container around the Java type.
20:56 dalek rakudo/jvminterop:
20:56 dalek rakudo/jvminterop: With this all the original tests pass again.
20:56 dalek rakudo/jvminterop: review: https://github.com/rakudo/rakudo/commit/5d571540af
20:57 psch yay rubber ducking \o/
20:58 rudi_s I thought that was a background color but it's actually an image. Hm.
20:58 rudi_s And no source file available to modify it.
20:59 nine_ psch++
21:01 snarkyboojum joined #perl6
21:11 Hotkeys do we have an equivalent of perl.h for perl6?
21:12 perlpilot Hotkeys: for embedding rakudo in something?
21:12 Hotkeys yeah
21:13 Hotkeys I am thinking of taking on the task of making a perl6 plugin for weechat
21:14 dalek rakudo/nom: 1b6c901 | lizmat++ | src/core/Str.pm:
21:14 dalek rakudo/nom: Fix problem with "q b c d".words -> $a, $b {
21:14 dalek rakudo/nom:
21:14 dalek rakudo/nom: Spotted by Juerd++
21:14 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/1b6c901c10
21:14 nine_ Hotkeys: what you need to embed is MoarVM, but that doesn't have an official embedding interface yet. https://github.com/niner/Inline-Perl6/blob/master/Perl6.xs is a somewhat hackish way to do it anyway.
21:15 Hotkeys ah
21:16 perlpilot nine++
21:20 [Coke] (color on docs: https://github.com/perl6/doc/issues/357)
21:21 [Coke] probably https://github.com/perl6/doc/blob/master/html/css/style.css#L202 or so
21:22 sno joined #perl6
21:25 rudi_s [Coke]: I think it's https://github.com/perl6/doc/blob/master/html/css/custom-theme/jquery-ui.css#L206 - but not 100% sure.
21:26 rudi_s Yeah, that seems to be it. Problem is, I've no idea how to create this image in a different color.
21:27 rudi_s Zoffix Znet <cpan@zoffix.com> was the last one to update it.
21:27 pyrimidine joined #perl6
21:29 [Coke] I don't think it's an image that is tied to the categories.
21:30 [Coke] (if that does turn out to be it, though, put an override in the styles file, don't edit the jquery-ui.css file)
21:30 rudi_s [Coke]: Ah, I tried to change the selection. But the categories should work fine too.
21:32 ggoebel16 joined #perl6
21:33 rudi_s [Coke]: timotimo: Maybe like this: https://pbot.rmdir.de/5oHPbugQe0Q8TfjfHOllYw.png ?
21:33 kalkin- how do i access a constant defined in a c header?
21:33 timotimo still not happy with it, tbh
21:33 rudi_s timotimo: Suggestions?
21:33 kalkin- I know how to wrap native functions, but how does this work with constants
21:33 timotimo kalkin-: we have a "cglobal" thingie in NativeCall that probably does the trick
21:34 timotimo not having the text bold, perhaps
21:34 timotimo have the gradient horizontal instead of vertical?
21:34 timotimo make the left-margin higher on the headings?
21:37 rudi_s timotimo: https://pbot.rmdir.de/PwJm1WUYj_bGPgGsaXZ0Dw.png
21:37 kalkin- timotimo: thanks will try that
21:37 timotimo rudi_s: that already looks a noticable bit better, IMO
21:41 buharin joined #perl6
21:41 buharin hi
21:41 rudi_s timotimo: Not sure if the padding makes it look better: https://pbot.rmdir.de/PwJm1WUYj_bGPgGsaXZ0Dw.png
21:42 rudi_s [Coke]: How can I override the font-weight in jquery-ui.css? My CSS knowledge is very limited.
21:42 timotimo i don't see any padding there
21:42 timotimo it seems like you've pasted the same link twice in a row
21:44 rudi_s timotimo: Sorry: https://pbot.rmdir.de/BCekMXOlW9n7tbCFD_2E6A.png
21:44 timotimo you're right, it looks a bit weird
21:44 DrForr Would I be incurring a significant runtime penalty by using 'my %routes{Any}'? I'm guessing it affects lookup at the very least.
21:45 timotimo you mean by making it an object hash?
21:45 DrForr Yeah.
21:45 buharin could you help me
21:45 buharin my code works very slow
21:45 timotimo hmm, good question
21:45 buharin :/
21:45 timotimo buharin: please show us your code?
21:45 buharin sure
21:46 DrForr buharin: Put your code up on a gist or pastebin, we won't know until then.
21:46 timotimo that's right
21:46 timotimo also, you could give perl6 --profile foobar.p6 a try
21:46 timotimo see if that gives you anything obvious
21:47 DrForr timotimo: I'm rebuilding Prancer's handlers, and I want to be able to have stuff like undefined Str and Int as keys, so I can keep them out-of-band as handler types.
21:48 timotimo i believe object hashes will work with WHICH, could that be right?
21:49 timotimo it should be all-right performance-wise. but calculating a WHICH for strings and ints means to concatenate a bit of stuff, so there's that
21:50 buharin timotimo, https://github.com/buharin/facebook-sdk
21:52 buharin yeah Im analysing
21:52 timotimo i'm not sure you want the token to stay in your t/basic.t
21:52 buharin why not?
21:53 timotimo or the playground
21:53 timotimo that's something personal to you, isn't it?
21:53 buharin <anon>
21:53 buharin gen/moar/stage2/NQPHLL.nqp:1298
21:53 buharin timotimo, yeah
21:53 buharin thats not important yet
21:54 buharin just trying to understand why it is going so long
21:54 mst well, except that people have bots that scan github repos for keys and abuse them
21:54 timotimo yeah
21:54 DrForr Actually it'd probably make a little more sense internally to use a leading '%(Str)' or '%(*)' since % is an illegal character in a URL.
21:54 timotimo potentially
21:55 buharin Inclusive time is important?
21:55 timotimo the first thing i do is usually sort by exclusive time
21:55 timotimo that tells me what routines have "overhead" or "do actual work"
21:55 buharin timotimo, <anon>
21:55 buharin gen/moar/m-BOOTSTRAP.nqp:2048
21:56 timotimo inclusive time tells you more about "what paths in the program take much time"
21:56 buharin 0.15ms
21:56 timotimo that.s not so long
21:56 buharin and inclusive time is 1.4ms
21:56 buharin max
21:56 timotimo ah, yeah, the 2048 one is "find_best_dispatchee"
21:56 buharin <anon>
21:56 buharin gen/moar/stage2/NQPHLL.nqp:1298
21:56 timotimo it doesn't optimize very well yet
21:57 buharin what?:D
21:57 timotimo can you upload the .html file instead of pasting individual things?
21:57 buharin sure
21:57 timotimo how long does the thing take all in all, btw?
21:58 rudi_s Proposed patch for the search focus: https://pbot.rmdir.de/eZcAG5cLx84P43bAlAY1mQ (result image: https://pbot.rmdir.de/PwJm1WUYj_bGPgGsaXZ0Dw.png ). Disclaimer: I don't know CSS.
21:58 timotimo actually, perhaps we could give the results a bit of margin to the left, rather than the headers
21:59 themonke1bob11 joined #perl6
22:00 buharin timotimo, perl6 t/basic.t  12.43s user 0.19s system 99% cpu 12.643 total
22:01 timotimo OK, that's enough to be interesting
22:01 buharin where to upload?
22:01 timotimo when you pasted something that takes 1.4ms i was like "are you kidding me."
22:01 timotimo how big is it?
22:01 timotimo those files usually gzip extremely well
22:01 buharin it is small
22:01 buharin omg
22:02 timotimo upload it whereever you like
22:02 buharin could you type me link :D
22:02 buharin your favourite
22:02 timotimo i always upload these profiles to my private server
22:02 mspo github
22:03 DrForr It's probably better to keep them out-ofband entirely, I'll just use $routes=:{} for the moment.
22:03 buharin http://www.megafileupload.com/rbjw/profile-1456869086.92423.html
22:03 buharin check this ;D
22:04 timotimo it could be your program only runs slow because it's compiling dependencies
22:04 timotimo it only takes 10 miliseconds to actually run the resulting code
22:05 timotimo you can check with perl6 --stagestats playground.p6
22:06 timotimo if it's spending all the time in dependencies being compiled, you'll see a lot of time spent under "parse"
22:06 DrForr That *does*, however, mean that it'll throw warnings when I print the bare Any as part of the hash.
22:07 timotimo mhm
22:07 timotimo i'll be AFK for a bit
22:07 DrForr Oh, ne'er mind, just create Any.new.
22:07 rudi_s timotimo: Next try: https://pbot.rmdir.de/v9Pk63aIeq9sM9a7WRUtiw.png (patch: https://pbot.rmdir.de/rOhpIzyERe1VMKcV9RndhA )
22:08 buharin timotimo, I used basic.t
22:08 buharin Stage parse      :  12.602
22:08 timotimo i like it. how do you like it, rudi_s?
22:08 buharin it is so long
22:08 [Coke] rudi_s: your snippet points out a typo in denominator
22:08 timotimo buharin: there's your answer
22:09 timotimo demon-inator?
22:09 QORRiE joined #perl6
22:09 DrForr Crap, two copies of Any.new don't compare the same under Test::is-deeply.
22:09 rudi_s timotimo: Looks good. The padding is a nice touch.
22:09 buharin why it took so long?
22:09 timotimo DrForr: of course not
22:09 rudi_s [Coke]: Is the patch fine? I don't know much about CSS.
22:10 timotimo buharin: it's probably not precompiling some dependency for some reason. recompiling it every time.
22:10 DrForr Different memory addresss, most likely.
22:10 timotimo well, Any isn't a value type
22:10 timotimo rudi_s: looks OK to me, but i don't know much about css either
22:11 DrForr It works with (Str), which is all I really need, as that's the ultimate fallback. I'll just roll with that.
22:11 buharin timotimo, ok so my perl virtual machine
22:12 buharin compile source code all the time
22:12 buharin without reason
22:13 buharin how can I check which dependencies are compiled?
22:14 DrForr Ho...ly shit, the trie insertion worked without modification.
22:14 virtualsue joined #perl6
22:14 rudi_s [Coke]: I'll fix the typo too.
22:15 buharin DrForr, ??
22:16 DrForr Prancer core uses a trie to store URL paths for matching. I didn't design it initially for object hashes, jus static strings. Change it to :{} and insert a Str.new type, and it worked without modification.
22:17 DrForr (yes, I know, there are tries in the ecoystem, I have special wildcard needs that those wouldn't accommodate.)
22:18 buharin do you mean
22:18 buharin I cant modify $url in place
22:18 buharin cause I will lose performance?
22:18 DrForr buharin: That wasn't directed at you, I was just commenting on what I'm working on.
22:19 buharin omg
22:19 addison__ joined #perl6
22:19 buharin I got a few lines of code
22:19 buharin which take 12sec
22:19 buharin and no-one cannot point me
22:19 buharin what is going on
22:21 buharin crazy shit
22:24 DrForr Cut out dependencies until the time starts to drop? If you're just testing, it shouldn't matter if the code works or now, just what is compiled.
22:25 buharin DrForr, ok
22:25 buharin HTTP:UserAgent
22:25 buharin is dependency which takes so long
22:25 buharin why?
22:25 buharin why I cant use this dependency?
22:27 DrForr Noone but you is saying you can't use a dependency. And what do you mean by "so long"?
22:28 buharin perl6 t/basic.t  0.30s user 0.03s system 99% cpu 0.327 total
22:28 buharin without use
22:28 buharin perl6 t/basic.t  12.43s user 0.19s system 99% cpu 12.643 total
22:28 buharin with use
22:28 buharin thats x times faster
22:29 buharin only because I cut my dependency from source file
22:29 buharin dependency what I am not using actually
22:29 buharin thats crazy
22:33 kid51 joined #perl6
22:46 RabidGravy the t/basic.t has "use lib "lib";  use HTTP::UserAgent;"  I'd wager, the very large module doesn't get compiled
22:47 dalek doc: 6b3a12c | (Simon Ruderich)++ | html/css/style.css:
22:47 dalek doc: html/css: make categories better distinguishable from focus
22:47 dalek doc:
22:47 dalek doc: Closes #357.
22:47 dalek doc: review: https://github.com/perl6/doc/commit/6b3a12c002
22:47 dalek doc: f6bb663 | (Simon Ruderich)++ | doc/Language/operators.pod:
22:47 dalek doc: operators: fix typo in reference
22:47 dalek doc: review: https://github.com/perl6/doc/commit/f6bb663103
22:47 dalek doc: e9056d0 | (Simon Ruderich)++ | doc/Type/List.pod:
22:47 dalek doc: Revert "List: add example to classify to split a list based on condition"
22:47 dalek doc:
22:47 dalek doc: This reverts commit 531e97fa509e75fff9920828c45f778ed1df5d72.
22:47 dalek doc:
22:47 dalek doc: The proposed solution doesn't work if one result array would be empty.
22:47 dalek doc: review: https://github.com/perl6/doc/commit/e9056d0234
22:58 geekosaur joined #perl6
22:59 rburkholder joined #perl6
22:59 addison joined #perl6
23:13 kjs_ joined #perl6
23:21 brainwash joined #perl6
23:25 timotimo i told buharin it's just that it isn't being precompiled
23:25 timotimo did he just not understand?
23:37 bitmap joined #perl6
23:41 lizmat joined #perl6
23:41 khagan joined #perl6
23:41 ugexe joined #perl6
23:42 idyllei joined #perl6
23:42 themonkeybob11 joined #perl6
23:51 tardisx joined #perl6
23:54 themonkeybob11 joined #perl6
23:56 jevin joined #perl6
23:56 dalek rakudo/nom: 50a4df3 | lizmat++ | src/core/Buf.pm:
23:56 dalek rakudo/nom: Optimize the Buf.splice(offset,size?) case
23:56 dalek rakudo/nom:
23:56 dalek rakudo/nom: And by consequence, also optimize the other cases
23:56 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/50a4df363a
23:56 lizmat good night, #perl6!
23:57 BenGoldberg joined #perl6

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

Perl 6 | Reference Documentation | Rakudo