»ö« 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:04
firstdayonthejob left
00:07
firstdayonthejob joined
00:18
buharin left
00:20
firstdayonthejob left
00:25
TreyHarris left
|
|||
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:28 | |
raiph | m: my $bar; say Nil eqv $bar | 00:30 | |
camelia | rakudo-moar 1ef247: OUTPUT«False» | ||
ugexe | but his will autovivify on the second eqv i believe | 00:31 | |
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» | ||
raiph | m: my %hash; say %hash<a>.foo; dd %hash | ||
camelia | rakudo-moar 1ef247: OUTPUT«Method 'foo' not found for invocant of class 'Any' in block <unit> at /tmp/R70qhRhDM_ line 1» | ||
raiph | m: my %hash; say %hash<a>.?foo; dd %hash | 00:34 | |
camelia | rakudo-moar 1ef247: OUTPUT«NilHash %hash = {}» | ||
00:34
cdg left
|
|||
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
|
|||
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 | ||
ugexe: :) | |||
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 | ||
camelia | rakudo-moar 1ef247: OUTPUT«True» | ||
00:40
cdg left
|
|||
raiph | m: say Nil.foo eqv Nil | 00:40 | |
camelia | rakudo-moar 1ef247: OUTPUT«True» | ||
raiph | m: role MyNil {}; say Nil.foo eqv Nil but MyNil | 00:41 | |
camelia | rakudo-moar 1ef247: OUTPUT«False» | ||
rudi_s | Hm. When does Nil occur "in normal life"? It's not the same as undefined (undef) in perl5, right? | 00:42 | |
raiph | rudi_s: Nil represents an explicit absence of a value | 00:43 | |
rudi_s | But that's different from unitialized or no value for the given key, right? | 00:45 | |
raiph | rudi_s: correct | ||
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. | ||
rudi_s: But perhaps more than the almost zero you're thinking. | |||
rudi_s | Hm. | ||
So there's no short way which always works? I don't like solutions which may break sometimes. | 00:48 | ||
00:56
maybekoo5 left
|
|||
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 | ||
camelia | rakudo-moar 1ef247: OUTPUT«(Any)» | ||
timotimo | ugexe: that looks syntactically wrong | ||
$_ -> $foo ? | |||
ugexe | i meant $_.?foo -> $foo | ||
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. | ||
timotimo | that still looks wrong :) | 00:59 | |
TTIAR, no? | |||
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 | ||
ugexe | what is ttiar? | 01:04 | |
timotimo | S99:TTIAR | 01:05 | |
what's wrong with synopsebot6? | |||
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". | |||
looks like synopsebot6 netsplit out and never came back? | 01:06 | ||
01:07
synopsebot6 joined
|
|||
timotimo | S99:TTIAR | 01:07 | |
synopsebot6 | Link: design.perl6.org/S99.html#TTIAR | ||
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:09 | |
timotimo | has someone suggested the "with" syntax? | 01:10 | |
that'll check for definedness rather than truthness | |||
raiph | timotimo: That was my first thought and it works too | 01:11 | |
timotimo | ok | ||
01:11
yeahnoob joined,
bpmedley left
|
|||
rudi_s | timotimo: How can I extend that with a second condition? | 01:12 | |
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? | ||
rudi_s | timotimo: if $a{$b}:exists and $a{$b}.foo eqv $bar { .. }? | ||
(Or actually !eqv is what I need.) | 01:14 | ||
01:14
bpmedley joined
|
|||
timotimo | ah. for that "with" probably wouldn't be the right thing | 01:18 | |
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 | ||
raiph | (ie I don't know if it works or not) | ||
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. | ||
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 | ||
rudi_s | raiph: Sorry, eqv should be !eqv. | 01:23 | |
How would I combine that with ".?"? | 01:24 | ||
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» | ||
timotimo | raiph: you mean %a{$b}.?foo | ||
raiph | m: my $bar; my %a; %a<b> = 1; if %a<b>.?foo !eqv $bar { ... } | ||
camelia | rakudo-moar 1ef247: OUTPUT«Stub code executed in block <unit> at /tmp/P6yb16sYjP line 1» | ||
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» | ||
rudi_s | I don't want to enter the block in this case. | 01:27 | |
timotimo | ah, right | 01:36 | |
because Nil wouldn't eqv $bar | |||
01:42
baest left
01:45
zpmorgan joined
01:47
baest joined
01:56
Actualeyes joined,
molaf joined
02:05
raiph left
02:06
molaf_ joined
02:09
molaf left
02:16
BenGoldberg joined
02:20
abaugher left
02:21
abaugher joined
02:32
addison_ left,
tmch joined
02:33
raiph joined
02:48
telex left
02:51
colomon joined
02:54
kid51 left
02:55
Actualeyes left
02:57
telex joined
03:15
raiph left
03:24
wamba left
03:30
rburkholder left
03:34
raiph joined
03:53
noganex_ joined
03:55
BenGoldberg left
03:56
inokenty joined,
noganex left
04:05
jaldhar_ left,
jaldhar_ joined
04:13
xinming left
04:14
xinming joined
04:17
TEttinger left
04:19
anaeem1 joined,
anaeem1 left
04:48
skids left
04:49
Actualeyes joined
04:53
molaf_ left
04:56
Actualeyes left
04:57
jaldhar_ left
|
|||
raiph | rudi_s: ping | 04:57 | |
04:57
jaldhar_ joined
04:59
jaldhar_ left
05:00
jaldhar_ joined
05:10
abaugher left
05:11
abaugher joined
|
|||
dalek | Iish: 46af42f | (Salvador Ortiz)++ | / (9 files): Move testing framework to DBIish::CommonTesting Remove t/lib, we don't want an extra "use lib 't/lib';" in our tests. The work that was done 't/lib/Test/Config/Pg.pm' is useless as the Pg C library implements all the PG* env vars handling. |
05:14 | |
Iish: 8f4d682 | (Salvador Ortiz)++ | / (3 files): Make panda happy bumping the version number. Continuous Integration needs that every change be reflected in the version of our META6.json. We take this opportunity to unify the name of the test databases. |
|||
05:19
Actualeyes joined
05:25
yeahnoob left
|
|||
dalek | Iish: db002ce | (Salvador Ortiz)++ | t/35-pg-common.t: Pg: Fix typo in test db name |
05:27 | |
Iish: f979c70 | (Salvador Ortiz)++ | lib/DBDish/mysql (2 files): mysql: Better error handling at connect |
|||
05:27
idiosyncrat_ left
05:28
yeahnoob joined
05:30
FreezerburnV left
05:43
Cabanossi left
05:47
Cabanossi joined
05:48
Actualeyes left
05:56
Actualeyes joined
06:06
llfourn joined
06:07
khw left
06:15
TEttinger joined
06:22
raiph left
|
|||
jdv79 | that is sad about shimmerfairy bouncin:( | 06:23 | |
06:24
darutoko joined
06:26
xinming left
06:29
sftp left
06:33
labster left
06:34
sftp joined
06:38
nakiro joined
06:39
tmch left
06:50
Relsak left
06:59
CIAvash joined
07:01
bjz joined
07:04
tmch joined
07:05
domidumont joined
07:07
domidumont left
07:08
domidumont joined
07:16
buharin joined
|
|||
buharin | moritz, hi | 07:16 | |
07:20
sno left
|
|||
buharin | why cant I use variable to initialise itself like in python | 07:29 | |
or even C | 07:30 | ||
07:39
firstdayonthejob joined
07:41
xinming joined
|
|||
buharin | someone here? | 07:47 | |
Timbus | ? in what way | ||
buharin | perl6 t/basic.t 12.66s user 0.18s system 99% cpu 12.850 total | ||
wtf I write simple function | 07:48 | ||
and it run it 12s | |||
crazy | |||
xD | |||
07:49
Relsak joined
|
|||
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 | ||
camelia | rakudo-moar 1ef247: OUTPUT«42» | ||
buharin | a = 2 | 07:54 | |
b = 3 | |||
a = a + b | |||
OUTPUT a = 5 | |||
moritz | sure | ||
arnsholt | m: my $a = 2; my $b = 3; $a = $a + $b; say $a | ||
camelia | rakudo-moar 1ef247: OUTPUT«5» | ||
Timbus | put dollar signs in there and you got it | 07:55 | |
moritz | you can shorten that to | ||
m: my $a = 2; $a += 2; say $a | |||
camelia | rakudo-moar 1ef247: OUTPUT«4» | ||
buharin | hey see this | 07:56 | |
github.com/buharin/facebook-sdk | |||
I have started to write it but ;d | |||
my test going thorough 12sec | |||
07:57
nowan left
|
|||
buharin | and sure I cant initialize | 07:57 | |
my $temp = $.GRAPH_API ~ "/" ~ $!version ~ "/" ~ $url; | |||
$url = $temp; | |||
07:58
nowan joined
08:00
vendethiel- joined
08:01
vendethiel left
|
|||
buharin | ?? | 08:02 | |
08:03
sno joined
|
|||
buharin | moritz, Timbus arnsholt | 08:03 | |
moritz | buharin: what makes you think you can't do that? | 08:04 | |
buharin | an error | ||
moritz | buharin: what error? | 08:08 | |
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
buharin left,
ely-se joined
08:17
TimToady left,
buharin joined
|
|||
buharin | need to go | 08:17 | |
08:17
buharin left
|
|||
moritz can't shake off the feeling that buharin trolls us | 08:18 | ||
08:19
TimToady joined
|
|||
nine_ | Would be an elaborate way of trolling though. | 08:20 | |
08:25
zpmorgan left
|
|||
CIAvash | Is "Missing serialize REPR function for REPR VMException" a bug in HTTP::UserAgent or a general issue? | 08:29 | |
08:30
firstdayonthejob left,
uruwi left
08:31
uruwi joined
08:32
zakharyas joined
08:35
abraxxa joined
08:37
jaldhar_ left,
jaldhar_ joined
08:39
nowan left
08:43
labster joined
08:44
nowan joined
08:53
maybekoo5 joined
09:09
kjs_ joined
09:12
kjs_ left,
bioexpress joined
09:14
sunnavy left
09:15
sunnavy joined
|
|||
dalek | kudo/nom: 6f96209 | lizmat++ | src/core/Rakudo/Internals.pm: Streamline error handling for shaped arrays Hopefully gaining a bit of performance because of easier inlineability and get some clearer code as a bonus |
09:22 | |
El_Che | ls | 09:24 | |
lizmat | El_Che o/ | ||
lizmat clickbaits p6weekly.wordpress.com/2016/02/29/...ping-away/ | |||
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
09:28
vendethiel- left
09:29
dakkar joined,
RabidGravy joined
09:31
yeahnoob left,
Actualeyes left
|
|||
lizmat | moritz++ | 09:33 | |
afk for a few hours& | |||
09:36
espadrine joined
|
|||
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«11» | ||
09:36
fireartist joined
|
|||
arnsholt | Spiffy, spiffy | 09:37 | |
09:41
bjz_ joined,
kjs_ joined
|
|||
RabidGravy | BOO! | 09:42 | |
09:42
bjz left
|
|||
bioexpress | Hello, is there a Perl6 signature which I could use to convey a native `wchar_t`? | 09:49 | |
CIAvash | RabidGravy: Can you take a look at this question? irclog.perlgeek.de/perl6/2016-03-01#i_12121045 | 09:50 | |
RabidGravy | It's both :) | ||
it should however be fixed for H::UA for the most recent | 09:51 | ||
CIAvash | Before, that message would just be printed but the code would work, now the code that uses H::UA dies. | 09:53 | |
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 | |
I moved it as late as possible | |||
arnsholt | bioexpress: Not currently, I think. Unfortunately | ||
bioexpress | Thx, than I have to wait a little bit. | 09:57 | |
CIAvash | RabidGravy: You mean a fix was released? | ||
arnsholt | bioexpress: How much variation is there in how wchar_t is defined on various platforms? | 09:58 | |
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 | |
this will be why I'm not seeing it anymore but every one else is | |||
CIAvash | :) | ||
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:00 | |
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:03 | |
And then lobby one of the people working on NativeCall ATM to add a wchar_t type | 10:04 | ||
bioexpress | I will try it | 10:05 | |
RabidGravy | CIAvash, there github.com/sergot/http-useragent/c...3b5beaf4c4 | 10:08 | |
10:08
bioexpress left
10:12
vendethiel left
|
|||
CIAvash | RabidGravy: thanks :) | 10:12 | |
10:13
vendethiel joined
10:16
Actualeyes joined
10:20
maybekoo5 left
10:23
luiz_lha joined,
luiz_lha is now known as Guest22451
10:35
JimmyZ_ joined
10:39
kjs_ left,
JimmyZ_ is now known as JimmyZ
10:43
partly joined
|
|||
partly | Hi | 10:43 | |
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:44 | ||
DrForr | There are legitimate reasons to assign inside an 'if' expression. | 10:45 | |
partly | DrForr: There were? (not arguing, trying to understand) | 10:46 | |
s/There/They/ | |||
jast | in some languages a warning like that is generated only if the assignment is directly on the top level of the expression | ||
e.g. if foo = 4 creates a warning, if (foo = 4) doesn't | |||
DrForr | Sure, think about do_stuff() if $index++; "Tested the index, now move on." | 10:47 | |
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
|
|||
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. | ||
RabidGravy | not so trick | ||
partly | DrForr: how do i propose something? Any manual on that? | 10:51 | |
DrForr | Pull requests speak louder than words ;) | ||
I wouldn't know though. Discussing it here can't hurt. | 10:52 | ||
partly | DrForr: ic :) | ||
RabidGravy | lots of places where you might want to test an assignment | 10:54 | |
if $a = something() { } is quite common | 10:55 | ||
10:55
labster left
|
|||
partly | RabidGravy: yeah i see how this can be useful. | 10:57 | |
DrForr | Worst case, rely on the old C trick of '1 == stuff()' :) | 10:59 | |
11:00
wamba joined
|
|||
partly | DrForr: TIL. thank you! | 11:01 | |
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:02 | |
DrForr | Patience, Daniel-San :) | 11:03 | |
RabidGravy | the icecast source protocol is a bit, er, special | ||
DrForr | Will Crust allow [] in place of the usual content-type? | ||
RabidGravy | well, HTTP::Server::Tiny always adds the Date and Server headers | 11:04 | |
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 | ||
which is all a bit yuck | 11:07 | ||
and it appears the client on receipt of that just splurges the data over the open connection | 11:10 | ||
11:12
rurban joined
11:15
Guest22451 is now known as luiz_lha
|
|||
RabidGravy | the documentation alludes to modern servers using PUT but I haven't find a client that actually does that | 11:16 | |
11:17
johndau joined
|
|||
Juerd | 11:55 < RabidGravy> if $a = something() { } is quite common | 11:17 | |
Well, it used to be. And then we got: if something() -> $a { ... } | |||
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. | ||
RabidGravy | yes | ||
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 | |
(iirc) | |||
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 :) | ||
Might even try to patch that myself | |||
RabidGravy | I'm relaxed about it, but I think it should be limited to constant values on the RHS | 11:20 | |
lizmat | re: if $a = something() { } being quite common: yes, in P5 | 11:33 | |
in P6 we can do: if something() -> $a {} | 11:34 | ||
so perhaps a general warning for if $a = something *could* be in order in P6, pointing to the something -> $a alternative | 11:35 | ||
ah, I see Juerd already made the point :-( | |||
llfourn | I don't think that should be a warning. You can legit reasons for not using pblock. | 11:38 | |
like not wanting a ro container and not wanting to write 'is rw' | |||
or "is copy" rather | 11:39 | ||
jnthn | The "only warn if it's a literal on the RHS" may be a reasonable compromise | ||
llfourn | but people don't usually if literals :P | 11:40 | |
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» | ||
lizmat | *or* fail | ||
llfourn doesn't even know what <-> is | |||
lizmat | short for "is rw" ? | 11:42 | |
arnsholt | It's -> {} but with the parameters being is rw, IIRC | ||
llfourn | oh cool | ||
jnthn | llfourn: Yes, that's exactly the point | ||
llfourn: if $a = 1 { } is very likely a mistake | |||
llfourn | ah right yep I understand now | ||
m: say <-> $a { }.perl | 11:44 | ||
camelia | rakudo-moar 6f9620: OUTPUT«-> $a is rw { #`(Block|55179248) ... }» | ||
llfourn | m: say <-> $a { }.(2) | ||
camelia | rakudo-moar 6f9620: OUTPUT«Parameter '$a' expected a writable container, but got Int value in block <unit> at /tmp/n_pG5HSnJC line 1» | ||
llfourn | is there an 'is copy' one? | ||
jnthn | No, but it's fun to imagine what it might look like :P | 11:45 | |
11:46
ely-se left
|
|||
moritz | -||> | 11:47 | |
-(c)> | 11:48 | ||
-(:c)> # we can put adverbs here! | |||
11:48
ely-se joined
|
|||
llfourn | -⎘> $a { ...} #? | 11:49 | |
11:53
vendethiel- joined
11:54
vendethiel left
|
|||
dakkar | has anyone tried to embed a perl6 runtime into some other programs? | 11:56 | |
11:56
kjs_ left
|
|||
llfourn | I think there's an Inline::Perl6 that nine++ made... | 11:56 | |
dakkar | ah right, that may be a nice starting point | 11:57 | |
llfourn | metacpan.org/pod/Inline::Perl6 | ||
dakkar will look | |||
11:58
kid51 joined
12:01
rindolf joined
|
|||
nine_ | dakkar: documentation is sorely lacking, but I'm happy to answer questions. Also there's niner.name/talks/Building Bridges/examples/inline_perl6.html | 12:01 | |
12:01
Relsak left
12:07
TEttinger left
12:10
M-Illandan left
|
|||
dalek | kudo/nom: cf3b121 | lizmat++ | src/core/Parameter.pm: Streamline Parameter.named a bit |
12:11 | |
12:12
vendethiel- left
12:13
Skarsnik joined,
vendethiel joined
|
|||
Skarsnik | Hello | 12:13 | |
lizmat | Skarsnik o/ | 12:15 | |
12:16
kjs_ joined
|
|||
DrForr | \o | 12:16 | |
12:16
kjs_ left
12:17
kjs_ joined
|
|||
dalek | kudo/nom: b9a79ec | lizmat++ | src/core/Parameter.pm: Simplify Parameter.named_names|type_captures |
12:25 | |
12:26
rurban left,
rurban joined
|
|||
lizmat | jnthn: do you have any idea why it is impossible to create a class that does Blob in the setting? | 12:30 | |
12:30
Relsak joined
|
|||
nine_ | lizmat: "A module can now print to $*OUT while being compiled without messing up the precompilation process." Shouldn't this be $*ERR? | 12:33 | |
lizmat: "Of which one really sad." is missing a verb | 12:34 | ||
12:34
vendethiel- joined,
vendethiel left
|
|||
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:34
kid51 left
|
|||
lizmat | yeah, the verb omission there was intentional | 12:35 | |
nine_ | lizmat++ # I like subtlety | ||
lizmat | nine_: cc0472b43e9edb6c777e7 states: fix precompiling a file that outputs to stdout | ||
nine_ | Oooh I missed that patch. | 12:36 | |
I'm also not sure I like it :/ | |||
lizmat | yeah, FROGGS didn't like it either... but it makes it work for now | ||
nine_ | I wonder why a module's mainline would want to write to STDOUT? | 12:37 | |
12:40
skids joined
12:41
skids left
12:42
rurban left
12:46
colomon left
12:52
colomon joined
|
|||
RabidGravy | would it be enormously difficult to "upgrade" a normal IO::Socket client socket to an IO::Socket::Async one? | 12:53 | |
12:54
Actualeyes left
12:59
kjs_ left,
iH2O joined
|
|||
lizmat | RabidGravy: I think so, because they differ at the nqp level | 13:01 | |
RabidGravy | is the actual VMIO different? | ||
lizmat | nqp::asyncconnect vs nqp::open (I think) | 13:02 | |
that I'm not sure of | |||
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 | ||
We may actually have more luck doing it once we stop using libuv for sync I/O | |||
13:06
sufrostico joined,
Actualeyes joined
13:07
johndau` joined,
johndau left,
wamba left
13:10
burnersk left,
z8 joined
13:15
jaldhar_ left
13:16
z8 left
13:20
iH2O left
13:23
rurban joined
13:25
Relsak left,
Relsak joined
13:28
kaare_ joined
13:34
johndau` is now known as johndau
13:37
kjs_ joined
|
|||
timotimo | o/ | 13:37 | |
13:45
cdg joined
|
|||
lizmat wonders what magic is happening here: $!default_value ~~ Code ?? $!default_value !! { $!default_value } | 13:46 | ||
lizmat wakes up | |||
tadzik | heh | 13:47 | |
"callify" the default_value, it seems | |||
lizmat | yeah, which means adding overhead | ||
jnthn | Probably coping with a place where we may get a funk or may get a value and want it to be consistent | ||
*thunk | 13:48 | ||
tadzik | it may make sense to call it if it's code, save it if not | ||
unless it's meant to be lazy | |||
jnthn | It's rather hard to say without context ;) | ||
tadzik | ye :) | ||
lizmat | $rest ~= ' = { ... }' if $default; | ||
it's about Parameter.perl | 13:49 | ||
jnthn | Hm | ||
If it's a value we could actually .perl the value... | |||
lizmat | now, if $default were just a value, we could actually say: $rest ~= " = $default"; | ||
jnthn | $default.perl() :) | ||
lizmat | yeah... | ||
OTOH, this Parameter.perl is really Parameter.gist | 13:50 | ||
if it's about roundtripping, we could as well do Parameter.new(flags => 723) etc | |||
jnthn | Well, .perl certainly needs to get it .perl'd | ||
lizmat | instead of figuring out how each flag influences how we look at it | ||
jnthn | Yeah, but .perl there is used when .perl-ing Block, Sub, etc. | 13:51 | |
And so you want a signature literal out of it really | |||
So they can come out syntacticly sane | 13:52 | ||
lizmat | agree | ||
jnthn | Phone call, then - at last - should have some Perl 6 hacking time \o/ | ||
bbs | |||
13:58
Ven joined
|
|||
Ven | o/ | 13:58 | |
masak | \o | 13:59 | |
13:59
cdg left,
addison joined
14:07
sftp left,
sftp joined
|
|||
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:08 | |
14:11
dakkar left
14:15
SCHAAP137 joined
14:16
addison left
14:17
dakkar joined
14:25
raiph joined
14:26
skids joined
14:36
abaugher left
14:37
abaugher joined
|
|||
RabidGravy | erk, the mad decoder has a waay weird interface | 14:37 | |
14:38
wamba joined
14:41
SCHAAP137 left
|
|||
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:41 | |
It works fine if @a and @b are not empty, but if they are, it fails: | 14:42 | ||
m: my (@a, @b) := (1,3).classify({ $_ %% 2 }).{True, False} | |||
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» | ||
rudi_s | Any idea how I could fix this? | ||
*but if either one is empty, it fails. | |||
14:44
themonkeybob11 joined
14:51
Relsak left
14:52
themonkeybob11 left
|
|||
lizmat | commute to Amsterdam.PM& | 14:53 | |
14:53
lizmat left
|
|||
RabidGravy | rudi_s, > | 14:59 | |
rudi_s | RabidGravy: ? | ||
RabidGravy | m: my (@a, @b) := (1,3).classify({ $_ %% 2 }).{True, False}.map({ $_ // []}).list; say @a, @b; | ||
camelia | rakudo-moar b9a79e: OUTPUT«[][1 3]» | ||
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:01 | |
RabidGravy | I won my bet with mysefl | 15:02 | |
15:02
sufrostico left
|
|||
rudi_s | Which was? | 15:02 | |
RabidGravy | there was going to be a "but" | ||
rudi_s | Well ;-) | ||
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 | ||
rudi_s | Hm. | ||
masak | rudi_s: whenever you feel a solution is insufficiently nice or un-idiomatic, there's a particular language pattern that helps | 15:04 | |
it's called "named subroutines" | |||
it can help abstract away some tedious code, pulling it out of the way of your main sentence | 15:05 | ||
all the while providing an action or a transformation with a nice, domain-aligned designation | |||
people underestimate this pattern | |||
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 | ||
whenever the name makes sense, at least | |||
timotimo | C question, if i may | 15:07 | |
src/6model/reprs/P6opaque.c:686:52: error: lvalue required as left operand of assignment | |||
(void *)(repr_data->attribute_offsets) += (char *)allocated_repr_blob; | |||
geekosaur | or you can make a private library of such things as modules | ||
rudi_s | I don't like duplication. Anyway, would be nice if perl6 had a short way to express that. | ||
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? | ||
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. | ||
geekosaur | timotimo, it's the cast that's doing it | ||
LHS cast | |||
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 | ||
rudi_s | masak: Not sure if you're trolling. | ||
masak | not trolling. | ||
genuinely trying to help. | |||
rudi_s | timotimo: You'd need to cast to char *. | ||
timotimo | i had (char *) on the lhs before, that errored the same way | ||
rudi_s | Pointer arithmetic is not defined on void *. | ||
geekosaur | casting to (char *) still makes an rvalue | 15:09 | |
rudi_s | Yeah, what geekosaur said. void * vs. char * is a separate problem. | ||
timotimo | well, if i drop the cast, i get "invalid operands to binary +" | ||
so i just won't be able to += ? | |||
and instead replicate the LHS with the cast onto the RHS of a simple =? | |||
geekosaur | yep | 15:10 | |
rudi_s | timotimo: Yeah. | ||
But you don't need the cast on the left side (unless it's C++). | |||
geekosaur | note that old versions of gcc used to permit that because the optimizer removed the cast before it was detected | 15:11 | |
15:11
tadzik left
|
|||
geekosaur | so it seems to be biting a bunch of people who got used to gcc allowing it | 15:11 | |
timotimo | OK | ||
src/6model/reprs/P6opaque.c:688:79: error: invalid operands to binary + (have ‘char *’ and ‘char *’) | |||
well, that's fun | |||
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
nakiro left
|
|||
rudi_s | timotimo: You can't add a char *, you can only add a int. | 15:13 | |
s/int/numeric value/ | |||
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. | ||
geekosaur | timotimo, what is allocated_repo_blob? | 15:14 | |
(in particular what is its type?) | |||
15:14
tadzik joined
|
|||
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:14 | |
Btw. how can I return two arrays from a function so that I can do my (@a, @b) = foo()? | 15:15 | ||
timotimo | geekosaur: void * | ||
masak | rudi_s: the first list can be had through .grep | ||
pyrimidine | Anyone here interested in bioinformatics apps for Perl 6? Open Bioinformatics Foundation is accepting proposals for the Google Summer of Code: summerofcode.withgoogle.com/organi...329984000/ | ||
geekosaur | so how were you expecting to add two addresses together? | ||
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 | ||
camelia | rakudo-moar b9a79e: OUTPUT«[() (1 3)]» | ||
timotimo | geekosaur: the current value of those fields is an offset. so really, i'd want to reverse the arguments to + | ||
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 | ||
not like perl 5 where it would flatten them into a single list | |||
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? | ||
RabidGravy | classify also has an (albeit undocumented) argument "into" | ||
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.) | ||
timotimo | geekosaur: not yet at that point | ||
15:18
sufrostico joined
|
|||
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]» | ||
timotimo | chat C type would i use to hold the value of a pointer as an int? | 15:19 | |
rudi_s | geekosaur: Thanks. | 15:21 | |
masak: But I have to iterate twice over the list which is something I'd like to avoid. | |||
RabidGravy: Perfect, thank you. | 15:23 | ||
RabidGravy wonders why that isn't dpcumented | |||
or indeed the "as" option either | 15:24 | ||
15:24
FreezerburnV joined
|
|||
nine_ | timotimo: shouldn't your rhs just be an int? | 15:27 | |
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])» | ||
timotimo | nine_: should i still be on relocatable_precomp on nqp and rakudo? :) | ||
masak | rudi_s: ^^ | ||
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])» | ||
masak | ...if you want to golf things down a little. | ||
15:30
rurban1 joined
|
|||
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:30 | |
timotimo | OK, so maybe i'll revert to master/nom for now | 15:31 | |
thanks! | |||
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 | ||
camelia | rakudo-moar b9a79e: OUTPUT«([] [1 3])» | ||
masak | :) | ||
15:32
ggoebel16 left
|
|||
masak | probably an Evil use of statement_mod `given`, just for its sequencing logic | 15:33 | |
15:33
rurban left
|
|||
RabidGravy | evil is fair enough | 15:33 | |
15:35
rurban joined
|
|||
timotimo | RabidGravy: damn; your stuff seems really hard to do :S | 15:37 | |
RabidGravy | :) BWAHAHA | ||
timotimo | like, everything's trying to murder your productivity | 15:38 | |
RabidGravy | along with the cat, facebook, and OooOOoooh why has that big bus stopped outside ;-) | 15:39 | |
rudi_s | masak: Thanks. | ||
15:39
rurban1 left
|
|||
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 | |
so | |||
masak | rudi_s: for what it's worth, I agree with you that the API of .classify is clunky and cumbersome in practice. | ||
RabidGravy | perl6++ | ||
masak | rudi_s: not so sure what to do about it, though :/ | ||
it looked better at the earlier stages of the design, when not everything had to fit together in practice | 15:41 | ||
15:41
fireartist left
|
|||
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:42 | |
timotimo | RabidGravy: so, will you turn up the client count now? :) | 15:43 | |
RabidGravy | let's see if I have a client application on another machine | 15:44 | |
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:45 | |
masak | you'll probably want to look at src/core/List.pm or something | 15:46 | |
hehe, that file starts with '# for our tantrums' :) | 15:47 | ||
RabidGravy | Any.pm | ||
masak | lizmat++ | ||
it sounds like the rageful version of '# for our sins' :P | |||
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 ) | |||
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:49 | |
hoelzro | o/ #perl6 | 15:50 | |
15:51
ggoebel16 joined
|
|||
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
|
|||
rudi_s | perlpilot: Will do ;-) | 15:51 | |
masak | a bit more legwork needed if the Blob has values beyond the 0..0xF range, though | ||
RabidGravy | timotimo, three clients is worky, no appreciable wobble | 15:53 | |
timotimo | whoa. | ||
RabidGravy | (difficult to tell with my friend Mike Stern's techno mixes however) | ||
rudi_s | masak: Thank you, that works fine, even with values up to 0xff. | ||
timotimo | hahaha :D | 15:54 | |
15:54
mephinet left
|
|||
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]» | ||
psch | m: say Blob.new(202, 254, 186, 190).list.fmt("%X", "") | ||
camelia | rakudo-moar b9a79e: OUTPUT«CAFEBABE» | ||
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:01
kjs_ left
16:02
hoelzro left
|
|||
masak | rudi_s: oh, so it does | 16:02 | |
16:02
hoelzro joined
|
|||
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 | ||
camelia | rakudo-moar b9a79e: OUTPUT«[4]» | ||
rudi_s | masak: Good idea, thanks. | ||
16:02
virtualsue joined
|
|||
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:06 | |
16:09
khw joined
16:11
domidumont left
16:23
rurban1 joined,
FreezerburnV left
16:24
hankache joined
|
|||
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. | ||
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: github.com/hankache/perl6intro | ||
masak | I wonder if there's a more direct way to show that... | ||
hankache | hello * | ||
masak | hullo hankache | ||
congrats on the draft | |||
16:26
kjs_ joined
|
|||
timotimo | neat! | 16:27 | |
there's a draft, can you please shut the window? | |||
hankache | This is a community effort so ++ everyone who contributed | ||
perlpilot | masak: "is default()" happened at compile time, so it's only got the one reference | ||
16:27
rurban left
|
|||
hankache | draft beer? ;) | 16:27 | |
skids | perlpilot: perhaps, but should "is default(@a)" work in the first place, given @a is something cloned with the block? | 16:33 | |
16:34
ely-se left
16:35
cdg joined
16:36
partly is now known as kalkin-
|
|||
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. | ||
perlpilot | skids: It should probably work, but differently from how it works now :) | ||
masak | I don't see offhand why `is default` should be different | ||
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 | |
16:38
themonkeybob11 joined
|
|||
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:40
hankache left
|
|||
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:42 | |
kalkin- | ugexe: but then the compiler could not evaluate it at compile time, if i understand it right | 16:44 | |
16:51
sufrostico left,
zakharyas left
|
|||
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:52 | |
you could use `Version :$!version! where * ~~ v1 | v2`, but that would break backwards compat with modules that use it | 16:53 | ||
kalkin- | ugexe: but the first example wouldn't be evaluated at compile time, or would it? | 16:54 | |
ugexe | why do you want it evaluated at compile time instead of runtime? | 16:55 | |
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:58 | |
But may be I don't full undestand the Prl 6 spirit | 16:59 | ||
*fully understand* | |||
sjn | useful for static code checking/analysis? (e.g. automatically pick up requirements from code) | ||
ugexe | there are any number of ways to do that. but i dont think the signature is the place for it | ||
sjn sees now that this was a signature | 17:00 | ||
yeah, that's... hm. | |||
API versioning might be nice, but perhaps a bit ambitious to put that information in signatures, yes | 17:01 | ||
17:01
sufrostico joined
|
|||
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? | ||
ugexe | because 'failed type constraint' is not a useful error to the user | 17:03 | |
kalkin- | ugexe: i see | ||
17:05
Ven left
|
|||
ugexe | m: say Distribution.new(:name<foo>).Str | 17:06 | |
camelia | rakudo-moar b9a79e: OUTPUT«foo:ver<>:auth<>:api<>» | ||
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
rurban1 left
|
|||
RabidGravy | couple of things where it would be useful I've already encountered in the last few weeks | 17:08 | |
17:09
mephinet joined,
colomon left
|
|||
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 | |
(or you lost me :) ) | |||
RabidGravy | it's not documented | 17:13 | |
17:14
themonkeybob11 left,
themonkeybob11 joined
|
|||
RabidGravy | the Distribution is the thing that gets installed when some installer does "... install Foo" | 17:14 | |
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:17 | |
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:19
themonkeybob11 left
17:20
Actualeyes left
|
|||
ugexe | because you could theoretically use :api to handle multiple versions of (most likely nativecall) apis/protocols/whatever in a single Distribution | 17:20 | |
sjn | hm | 17:21 | |
kalkin- | ugexe: you mean by adding some api suffix to my `use OpenSSL;` import? | ||
sjn | isn't :api about which API version a module *provides*? | 17:22 | |
ugexe | yes, so it would probably provide a bunch of `new` methods to handle each type of version | 17:23 | |
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 | ||
(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:25 | ||
17:27
zpmorgan joined
|
|||
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 | |
17:28
abraxxa left
|
|||
RabidGravy | yes, the latter, assuming you can get the version from the OpenSSL | 17:28 | |
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:30 | ||
17:32
atweiden joined
|
|||
kalkin- | This is the issue i mentioned github.com/sergot/openssl/issues/22 For some reason OpenSSL always tries to use SSLv3 instead of TLS | 17:34 | |
atweiden | is there a concise way of writing this: | 17:35 | |
m: sub foo(&c where *.signature.params.elems == 1 && *.signature.params.grep(*.positional).elems == 1) { c(Any) }; sub bar($) { say 'works' }; foo(&bar) | |||
camelia | rakudo-moar b9a79e: OUTPUT«works» | ||
17:35
themonkeybob11 joined
|
|||
atweiden | docs say something like sub f(&c:(Int)){} should work, but couldn't understand how to use it | 17:35 | |
psch | m: sub foo(&c:($)) { c(Any) }; sub bar($) { say "works" }; foo(&bar) | 17:36 | |
camelia | rakudo-moar b9a79e: OUTPUT«works» | ||
RabidGravy | kalkin-, I think there's a bug in the way that the library selects the version | ||
atweiden | psch: is it possible to specify &c returns Any ? | ||
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» | ||
RabidGravy | it specifies Int for version then tries to match e.g. 1.1 which is impossible | ||
atweiden | psch++ | ||
psch | atweiden: note that you can use trait_mod<returns> for the argument, but not in the subsignature | ||
kalkin- | RabidGravy: yeah i think fixed it with my pr github.com/sergot/openssl/pull/21 | ||
17:37
ptolemarch joined
|
|||
psch | atweiden: as in, you can define &bar with 'returns Str', but you can't do so for &c | 17:38 | |
17:38
dakkar left
|
|||
kalkin- | RabidGravy: Also specifieng 1 which should pass as the Int type, does not work either. Same error | 17:38 | |
17:40
themonkeybob11 left
|
|||
atweiden | psch: &c return type check seems to check against *.isa(Any) | 17:40 | |
so that if &bar returns Str it fails | |||
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? | ||
m: sub foo(&c:($ --> Any)) { c(Any) }; sub bar($ --> Any) { say "works" }; foo(&bar) | |||
camelia | rakudo-moar b9a79e: OUTPUT«works» | ||
atweiden | m: sub foo(&c:($ --> Any)) { c(Any) }; sub bar($ --> Str) { "does not work" }; foo(&bar) | ||
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
|
|||
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» | ||
psch | m: sub foo(&c:($Any) returns Any) { c(Any) }; sub bar($) returns Any { say "works" }; foo(&bar) # e.g. | ||
camelia | rakudo-moar b9a79e: OUTPUT«5===SORRY!5=== Error while compiling /tmp/3GbbtdzNrzCannot call trait_mod:<returns>(Parameter, Any); none of these signatures match: (Routine:D $target, Mu:U $type)at /tmp/3GbbtdzNrz:1» | ||
psch | well, it does parse but doesn't dispatch | 17:43 | |
a Parameter:D $target candidate for trait_mod:<returns> probably could fix that, if desired... | 17:44 | ||
although probably not quite that easily, i don't think | |||
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 | |
(I asked this yesterday afternoon, and I don't want to be a pest but I'm hoping to catch other eyes today...) | |||
psch | ptolemarch: github.com/rakudo/rakudo/blob/nom/...erver.java | 17:46 | |
ptolemarch: well, and the corresponding superclass, hang on... | |||
ptolemarch: github.com/perl6/nqp/blob/master/s...erver.java | 17:47 | ||
ptolemarch | psch: Awesome. It looks like this accepts a String and can run the resulting code. | ||
psch | ptolemarch: in the end, to call into Perl 6 from Java you have to build the whole interpreter | 17:48 | |
where "build" means "set up" | |||
ptolemarch | psch: Sure, fair enough, especially 'cuz eval() and such. | ||
psch: but is it possible also to run already-compiled code? | |||
psch | ptolemarch: there's an nqp branch that explored packaging into .jar, if that fits your use-case | 17:49 | |
ptolemarch: it's kinda stalled though, no tuits :) | |||
github.com/perl6/nqp/tree/standalo.../tools/jvm | |||
ptolemarch | Interesting. | ||
psch | the .sh script there explains the process as used there, but it's quite an out of date branch | ||
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
kjs_ left
|
|||
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 | ||
ptolemarch | Huh. | 17:52 | |
psch | well, not quite, actually | ||
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. :-) | ||
oh, huh | |||
that explains why there's both a [long hex hash].class and [long hex hash].serialized | |||
psch | and that still needs all the Perl 6 language level stuff to make sense to the JVM | ||
ptolemarch | Hmm. | ||
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:54 | ||
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 | |
well, assuming you can see through my minimal docs and get it working :S | |||
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 | ||
ptolemarch | Okay, this is somewhere to look, then. Thank you. | ||
17:56
kjs_ joined
|
|||
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:56 | |
ptolemarch | Hmm. | 17:57 | |
I hadn't quite realized how very little of "compiling perl6 to JVM bytecode" was really going on. | 17:58 | ||
psch | well, our MOP alone doesn't fit directly onto the JVM | 17:59 | |
add &EVAL and things like BEGIN... vOv | 18:00 | ||
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:01 | ||
ptolemarch | Right. | 18:02 | |
Thank you for your help and advice. | 18:03 | ||
Skarsnik | gah the @array = %hash<stuff> not working as you can expect is annoying :( | ||
18:04
espadrine left
|
|||
RabidGravy | it depends what you expect ;-) | 18:05 | |
dalek | kudo/faster-accessors: e10c487 | jnthn++ | src/ (12 files): Start to code-gen simple accessors. This makes them rather simpler/faster than adding them as closures. Most importantly, though, it will enable inlining of them, which is where the real speed-up will come from. |
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
raiph left
|
|||
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:07 | |
jnthn | dinner & | 18:08 | |
18:08
kjs_ left
|
|||
timotimo | i like the look of that ^ | 18:09 | |
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:11 | |
18:13
idiosyncrat_ joined
18:20
raiph joined
|
|||
Skarsnik | Yay, I finally generate file with gptrixie, see gist.github.com/Skarsnik/59355769f91e49e68abd if you are interessed ^^ | 18:23 | |
18:29
domidumont joined
18:31
robins joined,
avalenn_ joined,
virtualsue left
18:32
sufrostico left
18:34
sufrostico joined
18:36
Cabanoss- joined
|
|||
timotimo | sweet :) | 18:37 | |
18:37
Cabanossi left,
Cabanoss- is now known as Cabanossi
|
|||
RabidGravy | Skarsnik, can't you just do "my @f; my %h; @f := (%h<foo> // ())" | 18:37 | |
18:38
kjs_ joined
18:42
tmch left
18:46
addison_ joined
18:47
llfourn left,
TreyHarris joined,
llfourn joined,
agent008 left,
xinming left
18:48
sufrostico left
18:49
anshin left,
luiz_lha left
18:50
xinming joined,
rudi_s left,
rudi_s joined,
Guest55357 left
18:51
sufrostico joined,
agent008 joined,
agent008 left
18:52
agent008 joined,
agent008 left,
ruoso left,
anshin joined,
ruoso joined,
agent008 joined,
agent008 left,
ilbot3 left,
rdleon left
18:53
agent008 joined,
rdleon joined
18:54
DrForr left,
firstdayonthejob joined
18:55
DrForr joined,
anshin left
18:56
pierrot joined,
pierrot is now known as Guest34004
18:58
zpmorgan left
19:05
ilbot3 joined
|
|||
mspo | hey did perl6 make it into GSOC 2016? | 19:10 | |
timotimo | no | 19:11 | |
volunteer time was spread far too thin, and last year's GSoC has made potential volunteers pretty grumpy | |||
mspo | netbsd was rejected last year but got in this year | 19:12 | |
so we're pleased | |||
timotimo | good :) | 19:13 | |
mspo | but i'm with you on feeling burned | ||
19:17
virtualsue joined
19:20
raiph left
19:22
jim__ joined,
CIAvash left,
jim__ left
19:25
kipd left,
olinkl left,
flussence left,
integral left,
geekosaur left,
drforr1 left
|
|||
dalek | kudo/nom: 231b898 | lizmat++ | src/core/Parameter.pm: Abstract modifier logic into a method |
19:29 | |
kudo/nom: 609e54a | lizmat++ | src/core/Buf.pm: Buf.splice takes the same params as Array.splice Also handle :SINK (although this is not codegenned yet) |
|||
19:31
geekosaur joined,
kipd joined,
olinkl joined,
flussence joined,
Lucas_One_ joined,
integral joined,
drforr1 joined,
timotimo joined,
BinGOs joined,
Peter_R joined
|
|||
[Coke] needs an apache conf file guru. :| | 19:31 | ||
timotimo | hey everyone, i'm back! | 19:32 | |
sjn | hi timotimo, welcome back! | ||
timotimo | thanks! | ||
moritz | [Coke]: not really guru, but I can try to help | 19:34 | |
stmuk | allowoverride all :) | 19:36 | |
mspo | [Coke]: sure, ask away | 19:38 | |
although #apache is also good :) | |||
RabidGravy | stmuk++ | 19:41 | |
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:42 | ||
know | 19:43 | ||
moritz | RewriteEngine OFF # just for RabidGravy | 19:44 | |
El_Che | [Coke] likes to keep people in suspence | ||
stmuk | I know enough to use heavy logging when debugging mod_rewrite rules :) | 19:45 | |
19:45
labster joined,
ggoebel16 left,
labster left
|
|||
RabidGravy | is doing "my &bar = self.^method_table<bar>; &bar.assuming(self); $supply.tap(&bar);" asking for trouble? it seems to work fine | 19:45 | |
moritz | RabidGravy: won't work with inheritance | 19:46 | |
RabidGravy: but, why not just $supply.tap(-> |c { self.bar(|c) }) ? | 19:47 | ||
seems less convoluted | |||
RabidGravy | I had a strange idea that the self went away there, let me try that | 19:48 | |
[Coke] just doesn't treat IRC like a live convo. | 19:49 | ||
(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 github.com/pingidentity/mod_auth_o...issues/55, but having little luck. | 19:51 | ||
19:53
telex left
19:54
musiKk_ joined,
telex joined
|
|||
RabidGravy | moritz yep that does work, dunno why I thought you couldn't use self there | 19:56 | |
mush nicer | 19:57 | ||
19:57
virtualsue left
20:06
labster joined
20:08
molaf left
20:10
robins is now known as robinsmidsrod
20:16
darutoko left
20:19
sufrostico left
|
|||
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:19 | |
20:23
SCHAAP137 joined
|
|||
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 | |
20:27
Ven joined
|
|||
DrForr | But it does throw a warning if the \n becomes a ' '. | 20:28 | |
timotimo | a } at the end of a line gives you a ; for free | 20:30 | |
[Coke] | } ending a line is special. | ||
timotimo++ | |||
timotimo | [Coke]++ | ||
20:32
Ven left
|
|||
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? | ||
timotimo: AFAIK yes. | |||
moritz | rudi_s: so far I've used Test.pm for all of my p6 testing needs | 20:34 | |
20:35
domidumont left
|
|||
rudi_s | moritz: Thanks. | 20:35 | |
And doc.perl6.org even has docs, nice. | |||
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 | gist.github.com/anonymous/0f7bdd4742cd745a1a37 | ||
that gist has the reason for why methods added with .^add_method to a Java class aren't found | 20:37 | ||
apparently the JavaObjectWrapper STable has the authorative method cache | |||
but the nqp::setmethcacheauth call in MethodContainer.add_method only turns off the meth cache authorativeness of the Perl 6 level STable... | 20:38 | ||
20:38
zacts left,
zakharyas joined
|
|||
psch | i'd be tempted to fix this by adding a decont to the nqp::setmethcacheauth call in Metamodel::MethodContainer.add_method... | 20:38 | |
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:39 | ||
20:42
kaare_ left,
zacts joined
|
|||
psch | $ ./perl6-j -e'use nqp; use java::util::zip::CRC32:from<Java>; say nqp::iscont(CRC32);' | 20:45 | |
1 | |||
i suppose that plays a role there as well | |||
m: use nqp; class Foo { }; say nqp::iscont(Foo) | 20:46 | ||
camelia | rakudo-moar 609e54: OUTPUT«0» | ||
20:47
xinming left,
xinming joined
|
|||
timotimo | rudi_s: github.com/perl6/doc/issues/357 | 20:49 | |
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 | |
20:50
spider-mario joined
|
|||
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 | |
i'd be willing to merge pretty much any pull request you could come up with | |||
though please include a screenshot :) | |||
20:54
TEttinger joined
|
|||
timotimo | dinner time! | 20:55 | |
dalek | kudo/jvminterop: 5d57154 | peschwa++ | src/vm/jvm/CompUnit/Repository/Java.pm: Don't import a container around the Java type. With this all the original tests pass again. |
20:56 | |
20:56
sno left
|
|||
psch | yay rubber ducking \o/ | 20:57 | |
20:57
atweiden left
|
|||
rudi_s | I thought that was a background color but it's actually an image. Hm. | 20:58 | |
And no source file available to modify it. | |||
nine_ | psch++ | 20:59 | |
21:01
snarkyboojum joined
21:04
snarkyboojum left
21:06
idiosyncrat_ left
|
|||
Hotkeys | do we have an equivalent of perl.h for perl6? | 21:11 | |
perlpilot | Hotkeys: for embedding rakudo in something? | 21:12 | |
Hotkeys | yeah | ||
I am thinking of taking on the task of making a perl6 plugin for weechat | 21:13 | ||
dalek | kudo/nom: 1b6c901 | lizmat++ | src/core/Str.pm: Fix problem with "q b c d".words -> $a, $b { Spotted by Juerd++ |
21:14 | |
nine_ | Hotkeys: what you need to embed is MoarVM, but that doesn't have an official embedding interface yet. github.com/niner/Inline-Perl6/blob...r/Perl6.xs is a somewhat hackish way to do it anyway. | ||
Hotkeys | ah | 21:15 | |
perlpilot | nine++ | 21:16 | |
[Coke] | (color on docs: github.com/perl6/doc/issues/357) | 21:20 | |
probably github.com/perl6/doc/blob/master/h...e.css#L202 or so | 21:21 | ||
21:22
sno joined
|
|||
rudi_s | [Coke]: I think it's github.com/perl6/doc/blob/master/h...i.css#L206 - but not 100% sure. | 21:25 | |
Yeah, that seems to be it. Problem is, I've no idea how to create this image in a different color. | 21:26 | ||
Zoffix Znet [email@hidden.address] was the last one to update it. | 21:27 | ||
21:27
pyrimidine joined
|
|||
[Coke] | I don't think it's an image that is tied to the categories. | 21:29 | |
(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
|
|||
rudi_s | [Coke]: timotimo: Maybe like this: pbot.rmdir.de/5oHPbugQe0Q8TfjfHOllYw.png ? | 21:33 | |
kalkin- | how do i access a constant defined in a c header? | ||
timotimo | still not happy with it, tbh | ||
rudi_s | timotimo: Suggestions? | ||
kalkin- | I know how to wrap native functions, but how does this work with constants | ||
timotimo | kalkin-: we have a "cglobal" thingie in NativeCall that probably does the trick | ||
not having the text bold, perhaps | 21:34 | ||
have the gradient horizontal instead of vertical? | |||
make the left-margin higher on the headings? | |||
21:35
bjz_ left
|
|||
rudi_s | timotimo: pbot.rmdir.de/PwJm1WUYj_bGPgGsaXZ0Dw.png | 21:37 | |
kalkin- | timotimo: thanks will try that | ||
timotimo | rudi_s: that already looks a noticable bit better, IMO | ||
21:39
kjs_ left
21:40
themonkeybob11 left
21:41
buharin joined
|
|||
buharin | hi | 21:41 | |
rudi_s | timotimo: Not sure if the padding makes it look better: pbot.rmdir.de/PwJm1WUYj_bGPgGsaXZ0Dw.png | ||
[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
musiKk_ left
|
|||
timotimo | it seems like you've pasted the same link twice in a row | 21:42 | |
rudi_s | timotimo: Sorry: pbot.rmdir.de/BCekMXOlW9n7tbCFD_2E6A.png | 21:44 | |
timotimo | you're right, it looks a bit weird | ||
DrForr | Would I be incurring a significant runtime penalty by using 'my %routes{Any}'? I'm guessing it affects lookup at the very least. | ||
timotimo | you mean by making it an object hash? | 21:45 | |
DrForr | Yeah. | ||
buharin | could you help me | ||
my code works very slow | |||
timotimo | hmm, good question | ||
buharin | :/ | ||
timotimo | buharin: please show us your code? | ||
buharin | sure | ||
DrForr | buharin: Put your code up on a gist or pastebin, we won't know until then. | 21:46 | |
timotimo | that's right | ||
also, you could give perl6 --profile foobar.p6 a try | |||
see if that gives you anything obvious | |||
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:47 | |
timotimo | i believe object hashes will work with WHICH, could that be right? | 21:48 | |
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:49 | ||
buharin | timotimo, github.com/buharin/facebook-sdk | 21:50 | |
yeah Im analysing | 21:52 | ||
timotimo | i'm not sure you want the token to stay in your t/basic.t | ||
buharin | why not? | ||
timotimo | or the playground | 21:53 | |
that's something personal to you, isn't it? | |||
buharin | <anon> | ||
gen/moar/stage2/NQPHLL.nqp:1298 | |||
timotimo, yeah | |||
thats not important yet | |||
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 | ||
timotimo | yeah | ||
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. | ||
timotimo | potentially | ||
21:54
skids left
|
|||
buharin | Inclusive time is important? | 21:55 | |
timotimo | the first thing i do is usually sort by exclusive time | ||
that tells me what routines have "overhead" or "do actual work" | |||
buharin | timotimo, <anon> | 21:56 | |
gen/moar/m-BOOTSTRAP.nqp:2048 | |||
21:56
zakharyas left
|
|||
timotimo | inclusive time tells you more about "what paths in the program take much time" | 21:56 | |
buharin | 0.15ms | ||
timotimo | that.s not so long | ||
buharin | and inclusive time is 1.4ms | ||
max | |||
timotimo | ah, yeah, the 2048 one is "find_best_dispatchee" | ||
buharin | <anon> | ||
gen/moar/stage2/NQPHLL.nqp:1298 | |||
timotimo | it doesn't optimize very well yet | ||
buharin | what?:D | 21:57 | |
timotimo | can you upload the .html file instead of pasting individual things? | ||
buharin | sure | ||
timotimo | how long does the thing take all in all, btw? | 21:58 | |
rudi_s | Proposed patch for the search focus: pbot.rmdir.de/eZcAG5cLx84P43bAlAY1mQ (result image: pbot.rmdir.de/PwJm1WUYj_bGPgGsaXZ0Dw.png ). Disclaimer: I don't know CSS. | ||
timotimo | actually, perhaps we could give the results a bit of margin to the left, rather than the headers | ||
21:59
themonke1bob11 joined
|
|||
buharin | timotimo, perl6 t/basic.t 12.43s user 0.19s system 99% cpu 12.643 total | 22:00 | |
timotimo | OK, that's enough to be interesting | 22:01 | |
buharin | where to upload? | ||
timotimo | when you pasted something that takes 1.4ms i was like "are you kidding me." | ||
how big is it? | |||
those files usually gzip extremely well | |||
buharin | it is small | ||
omg | |||
timotimo | upload it whereever you like | 22:02 | |
buharin | could you type me link :D | ||
your favourite | |||
timotimo | i always upload these profiles to my private server | ||
mspo | github | ||
DrForr | It's probably better to keep them out-ofband entirely, I'll just use $routes=:{} for the moment. | 22:03 | |
buharin | www.megafileupload.com/rbjw/profile...92423.html | ||
check this ;D | |||
timotimo | it could be your program only runs slow because it's compiling dependencies | 22:04 | |
it only takes 10 miliseconds to actually run the resulting code | |||
you can check with perl6 --stagestats playground.p6 | 22:05 | ||
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. | ||
timotimo | mhm | 22:07 | |
i'll be AFK for a bit | |||
DrForr | Oh, ne'er mind, just create Any.new. | ||
rudi_s | timotimo: Next try: pbot.rmdir.de/v9Pk63aIeq9sM9a7WRUtiw.png (patch: pbot.rmdir.de/rOhpIzyERe1VMKcV9RndhA ) | ||
buharin | timotimo, I used basic.t | 22:08 | |
Stage parse : 12.602 | |||
timotimo | i like it. how do you like it, rudi_s? | ||
buharin | it is so long | ||
[Coke] | rudi_s: your snippet points out a typo in denominator | ||
timotimo | buharin: there's your answer | ||
demon-inator? | 22:09 | ||
22:09
QORRiE joined
|
|||
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. | ||
buharin | why it took so long? | ||
timotimo | DrForr: of course not | ||
rudi_s | [Coke]: Is the patch fine? I don't know much about CSS. | ||
22:09
johndau left
|
|||
timotimo | buharin: it's probably not precompiling some dependency for some reason. recompiling it every time. | 22:10 | |
DrForr | Different memory addresss, most likely. | ||
timotimo | well, Any isn't a value type | ||
rudi_s: looks OK to me, but i don't know much about css either | |||
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 | ||
compile source code all the time | 22:12 | ||
without reason | |||
how can I check which dependencies are compiled? | 22:13 | ||
DrForr | Ho...ly shit, the trie insertion worked without modification. | 22:14 | |
22:14
Skarsnik left,
virtualsue joined
|
|||
rudi_s | [Coke]: I'll fix the typo too. | 22:14 | |
buharin | DrForr, ?? | 22:15 | |
22:15
themonke1bob11 left
|
|||
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:16 | |
(yes, I know, there are tries in the ecoystem, I have special wildcard needs that those wouldn't accommodate.) | 22:17 | ||
buharin | do you mean | 22:18 | |
I cant modify $url in place | |||
cause I will lose performance? | |||
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
|
|||
buharin | I got a few lines of code | 22:19 | |
which take 12sec | |||
and no-one cannot point me | |||
what is going on | |||
22:19
addison_ left
|
|||
buharin | crazy shit | 22:21 | |
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:24 | |
buharin | DrForr, ok | 22:25 | |
HTTP:UserAgent | |||
is dependency which takes so long | |||
why? | |||
why I cant use this dependency? | |||
DrForr | Noone but you is saying you can't use a dependency. And what do you mean by "so long"? | 22:27 | |
buharin | perl6 t/basic.t 0.30s user 0.03s system 99% cpu 0.327 total | 22:28 | |
without use | |||
perl6 t/basic.t 12.43s user 0.19s system 99% cpu 12.643 total | |||
with use | |||
thats x times faster | 22:29 | ||
only because I cut my dependency from source file | |||
dependency what I am not using actually | |||
thats crazy | |||
22:33
kid51 joined,
buharin left
22:39
addison__ left
22:44
ptolemarch left
|
|||
RabidGravy | the t/basic.t has "use lib "lib"; use HTTP::UserAgent;" I'd wager, the very large module doesn't get compiled | 22:46 | |
dalek | c: 6b3a12c | (Simon Ruderich)++ | html/css/style.css: html/css: make categories better distinguishable from focus Closes #357. |
22:47 | |
c: f6bb663 | (Simon Ruderich)++ | doc/Language/operators.pod: operators: fix typo in reference |
|||
c: e9056d0 | (Simon Ruderich)++ | doc/Type/List.pod: Revert "List: add example to classify to split a list based on condition" This reverts commit 531e97fa509e75fff9920828c45f778ed1df5d72. The proposed solution doesn't work if one result array would be empty. |
|||
22:57
geekosaur left
22:58
geekosaur joined
22:59
rburkholder joined,
addison joined
23:07
ugexe left,
bitmap left,
khagan left
23:13
kjs_ joined
23:21
brainwash joined
|
|||
timotimo | i told buharin it's just that it isn't being precompiled | 23:25 | |
did he just not understand? | |||
23:26
kjs_ left
23:34
spider-mario left
23:36
RabidGravy left
23:37
bitmap joined
23:41
lizmat joined,
khagan joined,
ugexe joined
23:42
idyllei joined,
themonkeybob11 joined
23:47
themonkeybob11 left
23:51
tardisx joined
23:54
themonkeybob11 joined
23:56
jevin joined
|
|||
dalek | kudo/nom: 50a4df3 | lizmat++ | src/core/Buf.pm: Optimize the Buf.splice(offset,size?) case And by consequence, also optimize the other cases |
23:56 | |
lizmat | good night, #perl6! | ||
23:57
BenGoldberg joined
|