»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: irc.perl6.org | UTF-8 is our friend! | feather will shut down permanently on 2015-03-31
Set by jnthn on 28 February 2015.
TimToady I'm just not sure the feature is worth including on unique 00:00
it would have to come with a big note in the docs that says "DOES NOT SCALE"
and something that different should probably be spelled different, .unique-with or so 00:02
_edwin regarding squish: I might file a ticket tomorrow about the order of the arguments to &with, if i don't find any vetoes in the backlog :)
yes, a different name somehow feels right for a very different algorithm 00:04
_edwin off to bed
TimToady well, with is supposed to be an == kind of op
so using it with <= is just wrong
_edwin hm, but squishing can be useful with non-symmetric predicates, I think 00:06
00:07 _edwin left
TimToady but the with is what you remove, not what you keep, so I dunno 00:08
RabidGravy Euclid/Björlud/Toussaint in p6 gist.github.com/jonathanstowe/ff08...1b39aeebed now to write the MIDI thing to make it useful to me
TimToady but if it makes more sense the other order, I guess 00:09
I think I'm fine with reversing 'em 00:10
"with" is just a terrible preposition to use in any case 00:11
"when" or "if" or "exclude" would make more sense 00:13
00:18 RabidGravy left 00:40 BenGoldberg joined
timotimo the documentation of Scheduler says cue 1) takes the code a sa named, which it doesn't; 2) doesn't have a &stop parameter 00:41
00:43 tinyblak joined
timotimo but Scheduler is a role that doesn't even restrict the parameter list 00:44
eli-se m: say 'x' x -1 00:45
camelia rakudo-moar 79bf15: OUTPUT«␤»
TimToady
.oO(negative strings?)
00:46
timotimo i don't really understand why Scheduler.cue wouldn't allow times and every :\ 00:47
00:48 tinyblak_ joined
eli-se m: say ('x' x -1) == 'x'i # <== should be this, TimToady 00:50
camelia rakudo-moar 79bf15: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '⏏x' (indicated by ⏏)␤ in method Numeric at src/gen/m-CORE.setting:15837␤ in sub infix:<*> at src/gen/m-CORE.setting:5283␤ in sub postfix:<i> at src/gen/m-C…»
BenGoldberg m: say sqrt(-1) 00:51
camelia rakudo-moar 79bf15: OUTPUT«NaN␤»
00:51 tinyblak left
BenGoldberg m: say sqrt(-1 + 0i) 00:51
camelia rakudo-moar 79bf15: OUTPUT«6.12323399573677e-17+1i␤»
timotimo .tell tony-o i have a problem with HTTP::Server::Async; if i set buffered to true, EventSource won't work because writing to the response will not give the browser any data 00:53
yoleaux timotimo: I'll pass your message to tony-o.
eli-se sleeptime, bye!
00:53 eli-se left
timotimo .tell tony-o but if i set it to false, waiting for a request's promise to signal that all the data has arrived takes a long time in which the server just waits ... maybe it doesn't handle content-length properly? 00:54
yoleaux timotimo: I'll pass your message to tony-o.
timotimo .tell tony-o i think i've switched the two around, though. but you know ... 00:56
yoleaux timotimo: I'll pass your message to tony-o.
timotimo .tell tony-o i don't expect making $.buffered rw on the response would be absolutely terrible. it was my first instinct to do that, but that caused an exception that didn't get printed due to SCHEDULER problems OSLT 00:58
yoleaux timotimo: I'll pass your message to tony-o.
01:05 jack_rabbit joined 01:06 Tux__ left 01:07 |Tux| joined
timotimo well, i'm glad i'm trying to do stuff with this module 01:09
before someone else runs into problems :P
oh, great, now it crashes again ... 01:10
01:16 kaare_ left 01:24 aborazmeh joined, aborazmeh left, aborazmeh joined 01:29 coffee` left
timotimo well, now it doesn't any more, but i can't tell how i fixed it, or if i fixed it at all ... 01:33
with just a usleep(50) in idle_handler we get drastically reduced cpu usage from idling 01:37
even though that's only 0.05ms, it makes a drastic difference 01:39
as in: you can't even see moar appear in htop any more :P 01:41
(that's not true)
also, the laptop no longer constantly runs its fan when i have the server run in the background 01:44
01:48 larion left 01:50 larion joined
timotimo .tell tony-o i'm wishing for something that'd let me know if the connection that belongs to a Response object gets terminated by the client 01:52
yoleaux ...
timotimo what's wrong, yoleaux?
01:52 raiph joined, aborazmeh left 01:56 larion left, laouji joined 01:57 Milkmand1n is now known as Milkmandan 02:00 Milkmandan is now known as MilkmanDan
flussence an idle handler that doesn't idle is kinda a problem... 02:02
02:03 sirdancealot joined 02:11 skids joined 02:13 BenGoldberg left 02:15 lsm01 left 02:20 bjz_ left 02:21 noganex_ joined 02:23 bjz joined 02:24 noganex left
dalek kudo/nom: e6467a1 | TimToady++ | src/Perl6/Grammar.nqp:
be more awesome on gobbled !!
02:28
02:46 laouji left 02:47 laouji joined 02:48 beastd left 02:50 larion joined 02:51 laouji left 02:55 larion left 02:57 laouji joined 03:01 yqt left 03:02 lustlife joined 03:04 aborazmeh joined, aborazmeh left, aborazmeh joined
lustlife rakudo: say "hello all." 03:06
camelia rakudo-moar e6467a: OUTPUT«hello all.␤»
03:13 laouji left 03:17 laouji joined 03:19 laouji left 03:23 raiph left 03:25 laouji joined 03:32 adu joined 03:38 aborazmeh left 03:44 dj_goku left 03:49 larion joined 03:55 labster joined 04:01 laouji left 04:03 FROGGS_ joined 04:06 Sqirrel left, FROGGS left 04:10 laouji joined 04:14 laouji left 04:15 laouji joined 04:17 vendethiel left 04:18 Sqirrel joined 04:22 laouji left 04:26 kaare_ joined 04:32 vendethiel joined 04:44 Akagi201_ joined 04:46 Akagi201 left 04:55 ShimmerFairy left 04:58 ShimmerFairy joined
TimToady m: say 42 ?? print !! 43 05:21
camelia rakudo-moar e6467a: OUTPUT«5===SORRY!5=== Error while compiling /tmp/10tt3a7iqN␤Your !! was gobbled by the expression in the middle; please use parens␤at /tmp/10tt3a7iqN:1␤------> 3say 42 ?? print !!7⏏5 43␤ expecting any of:␤ infix␤ infix stopp…»
05:38 telex left, adu left 05:39 vendethiel left 05:40 telex joined 05:52 vendethiel joined 06:09 test joined, test is now known as Guest48990 06:10 Guest48990 left 06:12 larion left 06:22 lustlife left, lustlife joined 06:24 lustlife` joined 06:27 lustlife left 06:37 skids left 06:38 vendethiel left 06:39 lustlife` left 06:44 vendethiel joined 06:49 laouji joined 06:50 larion joined 06:54 xfix joined
moritz perl6-all-modules is now at hash ff000fe 07:01
moritz likes it
07:03 xprime joined
dalek kudo/nom: 91958cf | TimToady++ | src/core/ (2 files):
mustn't use assignment precedence inside ??!!
07:05
kudo/nom: 225a7e3 | TimToady++ | src/Perl6/Grammar.nqp:
better messages on loose precedence inside ??!!

  (And fix off-by-one limit error; we don't allow assignment
in there either, since it's looser than ternary.)
07:05 darutoko joined
kudo/nom: c86f754 | TimToady++ | src/Perl6/Grammar.nqp:
s/low/loose/
07:05 prime left
dalek ast: e455d0e | TimToady++ | S03-operators/precedence.t:
test that assignops fail inside ??!!
07:05
07:05 vendethiel left 07:08 rindolf joined 07:11 laouji left
moritz is github still/again slow? 07:16
07:18 vendethiel joined
TimToady m: say 42 ?? $_ = 'a' !! 43 07:22
camelia rakudo-moar c86f75: OUTPUT«5===SORRY!5=== Error while compiling /tmp/7FWWeNLd5o␤Precedence of = is too loose to use inside ?? !!; please parenthesize␤at /tmp/7FWWeNLd5o:1␤------> 3say 42 ?? $_ =7⏏5 'a' !! 43␤»
TimToady m: say 42 ?? print !! 43 07:23
camelia rakudo-moar c86f75: OUTPUT«5===SORRY!5=== Error while compiling /tmp/xwUOrNcXLJ␤Your !! was gobbled by the expression in the middle; please parenthesize␤at /tmp/xwUOrNcXLJ:1␤------> 3say 42 ?? print !!7⏏5 43␤ expecting any of:␤ infix␤ infix sto…»
dalek c: e84e26a | moritz++ | META.info:
Add "provides" section to META.info"
07:25
TimToady there may be ecosystem fallout from disallowing assignops inside of ??!! 07:26
(they were supposed to be disallowed before, but there was an off-by-one precedence level error) 07:27
bartolin_ m: sub foo { 2 }; say 1 ?? foo !! 3 # RT 123115 07:29
camelia rakudo-moar c86f75: OUTPUT«5===SORRY!5=== Error while compiling /tmp/oSNBufOnW4␤Your !! was gobbled by the expression in the middle; please parenthesize␤at /tmp/oSNBufOnW4:1␤------> 3sub foo { 2 }; say 1 ?? foo !!7⏏5 3 # RT 123115␤ expecting any of:␤ in…»
bartolin_ nice, TimToady++ 07:30
moritz TimToady: well, I guess that's small in comparison to the eleven branch merge fallout
07:35 laouji joined 07:40 sirdancealot left 07:50 laouji left
dalek on: f889af3 | moritz++ | META.info:
Add provides section
07:56
moritz FROGGS_: how can panda possibly work, when it needs JSON::Tiny, and JSON::Tiny didn't have a "provides" section in META.info? 07:57
08:04 Perl6_newbee joined 08:07 rindolf left, vendethiel left 08:16 vendethiel joined 08:18 _edwin joined 08:21 azawawi joined
azawawi hi 08:21
yoleaux 25 Mar 2015 19:54Z <raydiak> azawawi: the url is github.com/raydiak/Git-PurePerl though it's far from working yet :)
08:21 RabidGravy joined
azawawi can someone please add github.com/azawawi/perl6-browser-open to the perl6 module ecoystem? 08:24
08:25 egrep left 08:26 egrep joined 08:38 RabidGravy left 08:39 zby_home joined
dalek ast: 4ff2d87 | (Edwin Steiner)++ | S32-list/squish.t:
Add a couple of more realistic examples for the RT #124205 bug in squish.
08:41
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=124205
08:51 laouji joined, RabidGravy joined 09:00 vendethiel left 09:11 laouji left, rindolf joined, RabidGravy left 09:15 vendethiel joined 09:28 larion left
vendethiel TimToady++ #better !! error message 09:29
FROGGS_ moritz: because of github.com/tadzik/panda/blob/maste...tstrap#L27 09:31
azawawi FROGGS_: any chance you could please add github.com/azawawi/perl6-browser-open to the perl6 module ecoystem? 09:34
FROGGS_: also is there a File::Which module or implementation in Perl 6?
dalek osystem: 1d7cafe | FROGGS++ | META.list:
added azawawi/perl6-browser-open
09:39
FROGGS_ azawawi: done, and I've invited you to perl6... you've got now push access 09:40
azawawi: and there does not seem to be a File::Which yet 09:42
09:48 Rounin joined 09:51 larion joined 09:54 Sqirrel left 09:55 Sqirrel joined 09:56 RabidGravy joined 09:59 Sqirrel left, Sqirrel joined 10:01 RabidGravy left 10:07 Sqirrel left, Sqirrel joined 10:10 Perl6_newbee left 10:14 tinyblak_ left 10:23 coffee` joined 10:25 _edwin left 10:28 JimmyZ joined 10:30 JimmyZ left, JimmyZ joined
azawawi FROGGS_: thx 10:31
FROGGS++
10:39 azawawi left 10:42 RabidGravy joined 10:44 eli-se joined
jnthn .tell FROGGS_ MoarVM HEAD gives a bit more info in the "On object at index..." errors, which may help track down what's going on. 10:50
yoleaux jnthn: I'll pass your message to FROGGS_.
jnthn .tell FROGGS_ I also see the "it works on second attempt"; you can cheaply re-produce by nuking the install dir and "make install" in all of moar/nqp/rakudo build dirs, at least. 10:51
yoleaux jnthn: I'll pass your message to FROGGS_.
FROGGS_ ahh 10:52
yoleaux 10:50Z <jnthn> FROGGS_: MoarVM HEAD gives a bit more info in the "On object at index..." errors, which may help track down what's going on.
10:51Z <jnthn> FROGGS_: I also see the "it works on second attempt"; you can cheaply re-produce by nuking the install dir and "make install" in all of moar/nqp/rakudo build dirs, at least.
jnthn oh, you're here :)
I don't have much idea exactly what's going on.
Just figured this may help with hunting it :)
FROGGS_ thank you :o) 10:54
10:54 FROGGS_ is now known as FROGGS
FROGGS moritz: panda now has a gen-meta target 10:54
jnthn FROGGS: Another oddity: when I run "panda" after the install it explodes, but "panda-m" works... 10:55
FROGGS jnthn: delete your panda.bat that was previously shipped with panda
jnthn ah, ok 10:56
FROGGS and then rebootstrap panda to get better batch files
these are generated by CUR::Installation
jnthn Aww, Term::ANSIColor has no provides section
FROGGS I can PR it
jnthn ok, thanks 10:57
FROGGS jnthn: done 10:59
and will do for many others...
jnthn Is cpandatesters.perl6.org/ no longer The Right Domain?
FROGGS tadzik: please merge github.com/tadzik/perl6-Term-ANSIColor/pull/3
testers.perl6.org
jnthn oh, just...right ;) 11:00
I realized I can use this to get a list of my modules so I can see what I need to add a provides to :)
Aww, I can't :)
tadzik FROGGS: thank you!
jnthn Apparently nobody installs and tests my modules :P 11:01
11:01 zby_home left
FROGGS tadzik: if you have more modules without a provides section, just run `panda gen-meta --ver=foo` and copy the provides section from the META.info.generated to your own 11:01
jnthn: same for you^^ 11:02
11:02 lichtkind joined
FROGGS tadzik: lol, moritz++ already PR'd it :/ 11:02
jnthn FROGGS: Oh, I do that in the module's directory?
FROGGS jnthn: aye 11:03
jnthn Odd, my panda doesn't see to know what gen-meta is... 11:04
oh
FROGGS jnthn: I added it just minutes ago
jnthn Right :)
tadzik FROGGS: PR'd what? 11:05
oh, ANSIColor?
I already merged yours
FROGGS yeah
I did not check for open PRs before opening mine 11:06
tadzik ah, so moritz was faster, but your direct marketing made up for that :P 11:07
FROGGS :o)
tadzik 35 open bugs /o\ 11:08
FROGGS btw, our getopt implementation does not seem to understand --foo="bar baz", when :$foo is a Str
jnthn FROGGS: After nuking my panda.bat and rebootstrap with latest, I get "Cannot call postcircumfix:<{ }>(Mu, "bin/panda"); none of these signatures match:"
FROGGS: Again panda-m works 11:09
FROGGS hmmm
weird...
I'll try to reproduce in a bit
jnthn huh... 11:10
tadzik hm, there's a bug and PR to remove parrot support from rakudobrew
jnthn I just did "panda update" then "panda install Term::ANSIColor" and it claims it still doesn't have a provides section...
tadzik I wonder if it'd be better to have rakudobrew warn loudly and install the last rakudo-parrot that worked
last time I checked there were still users of parrot (by choice)
FROGGS jnthn: I guess ecosystem-api.p6c.org is not updated yet 11:11
jnthn FROGGS: ah, ok
FROGGS jnthn: do `panda install .` for now
tadzik ,seen bbkr
.seen bbkr
yoleaux I saw bbkr 22 Mar 2015 15:13Z in #perl6: <bbkr> r: use Test; sub foo { my @a; return |@a;}; is foo, Nil
FROGGS in the Term::ANSIColor directory
jnthn Well, I don't have one :)
I was actually going to update one of my modules that depends on it :)
tadzik .tell bbkr hey, you guys still using Rakudo-Parrot in your business?
yoleaux tadzik: I'll pass your message to bbkr.
jnthn FROGGS: Um, iiuc this may be unfortunate... 11:14
panda-m --ver=v1 gen-meta
It seems the launcher steals the --ver
oh of course
FROGGS and when you put it at the end? 11:15
jnthn I have to put it after...right ;)
FROGGS yeah...
jnthn I'm so use to Perl 6 screwing up subcommand style...
11:15 tinyblak joined
FROGGS but, I can explain in more detail why the wrappers have to swallow certain things 11:15
but not atm
jnthn FROGGS: Hmm, about the proposed META.info
It looks like this:
"depends" : [
"JSON::Tiny::Actions",
"JSON::Tiny::Grammar",
"JSON::Tiny"
], 11:16
And similar in build-depends and test-depends
FROGGS yes
jnthn But will that actually work out OK?
FROGGS since that is 'depends', yes
jnthn build-depends and test-depends has the same
FROGGS that's used to tell panda what other dists need to be fetched and installed before this one
11:17 _edwin joined
FROGGS we can possibly strip these from test-depends 11:17
jnthn OK, but JSON::Tiny::Grammar isn't a dist?
JSON::Tiny is...
jnthn is trying to re-build his mental model of the world :) 11:18
FROGGS depends is about namespaces, and that is why you provide what namespaces your dist provides
jnthn ah
FROGGS like a use statement is 'please give me any dist that provides this namespace'
err, s/dist/cu of dist/ 11:19
jnthn *nod*
Yeah, I was just surprised to see it picking up transitive things
Like, I don't have a "use JSON::Tiny::Grammar" anywhere in my code
FROGGS and that is also the reason that some modules have a lib/Utils.pm but do not provides 'Utils', but other namespaces that are in this file
jnthn Similarly it currently picks up a dependency on "nqp"
Because Test.pm has a "use nqp;" 11:20
FROGGS so this file appears several times under provides
ahh, it was meant to strip indirect deps :/
jnthn oh.
OK, my entire confusion is that I'm seeing all the indirect deps in my META.info :) 11:21
So I'm correct to be surprised? :)
FROGGS yes
_edwin hi all! S32 specifies min/max for List, rakudo implements them for Any. should they be documented under List or under Any in perl6/doc? 11:22
11:22 abraxxa joined
FROGGS I guess a user wants to see them as directly defined in Any, but as inherited in List 11:22
abraxxa hi guys! 11:23
FROGGS hi abraxxa
tadzik hey abraxxa
jnthn _edwin: I'd make the docs match reality; I suspect map/grep etc are also in Any? 11:24
_edwin hm, does returning Inf/-Inf for ().min/max really make sense?
yes, map and grep are also implemented in Any 11:25
jnthn FROGGS: I gotta go for a bit, so that's my flood of issues for now ;) I'll have another go at it later :)
_edwin: And also documented there?
11:25 tinyblak left
FROGGS jnthn: it should be in a better shape until then :o) 11:26
_edwin jnthn, no, they are documented under List
11:26 tinyblak joined
jnthn _edwin: Hm, OK. My guess would be they want documenting in Any, but moritz++ and others may have a reason why not 11:30
jnthn bbiab
11:31 H2O1 joined
moritz yes, grep et al should be documented in Any 11:34
_edwin ok, will take a look at that today probably 11:35
11:35 virtualsue joined
_edwin the -Inf return value feels a bit strange in cases like < >.max(*.chars) 11:36
I'd have expected Nil, I think
moritz _edwin: the return value of an operator applied to an empty list should be the neutral element 11:37
_edwin: and I don't think Nil is a neutral element of a max comparison
m: say Nil max -3
camelia rakudo-moar c86f75: OUTPUT«-3␤»
11:37 H2O1 left
moritz huh, it is 11:37
11:38 grondilu joined
FROGGS perhaps it just vanishes? 11:38
moritz maybe 11:39
m: my $x := Nil; say $x max -3
camelia rakudo-moar c86f75: OUTPUT«-3␤»
FROGGS m: say Nil + 3 11:41
camelia rakudo-moar c86f75: OUTPUT«use of uninitialized value of type Nil in numeric context in block <unit> at /tmp/KMie6lJPiS:1␤␤3␤»
11:43 vendethiel left 11:47 geever joined
bartolin_ m: say Capture(|(1,2)) ~~ \|(1,2) 11:47
camelia rakudo-moar c86f75: OUTPUT«True␤»
bartolin_ m: my $c = Capture(Int, |(1,2)); say $c # is there a way to achieve this with '\'? 11:48
camelia rakudo-moar c86f75: OUTPUT«\((Int), 1, 2)␤»
bartolin_ m: my $c = \(Int, |(1,2)); say $c
camelia rakudo-moar c86f75: OUTPUT«5===SORRY!5=== Error while compiling /tmp/vr9YMONAWF␤Variable '&prefix:<|>' is not declared␤at /tmp/vr9YMONAWF:1␤------> 3my $c = \(Int, 7⏏5|(1,2)); say $c␤»
11:49 erdic left
dalek line-Perl5: 7bbdf61 | (Stefan Seifert)++ | t/p6_to_p5.t:
Remove unneeded workaround in test

The unused 'main' parameter of the identity function comes from a time when all P5 functions were actually called as methods.
11:49
line-Perl5: 18b6301 | (Stefan Seifert)++ | / (2 files):
Handle named arguments in $p5.call and $p5.invoke($package, ...)
line-Perl5: 54a5789 | (Stefan Seifert)++ | / (2 files):
Support named arguments of Perl 5 methods.

  $p5.invoke('Foo', 'new').test_named(a => 1, b => 2) now passes
  ('a', 1, 'b', 2) as arguments to the method.
line-Perl5: 6ea4165 | (Stefan Seifert)++ | / (2 files):
Support named arguments of inherited P5 methods.

class Bar does Inline::Perl5::Perl5Parent['Foo'] {
  }
Bar.new(perl5 => $p5).test_named(a => 1, b => 2);
11:50 vendethiel joined
nine_ .tell PerlJam re irclog.perlgeek.de/perl6/2015-03-27#i_10352333 support for named arguments was rather more involved than just an additional multi method p6_to_p5 since I first need to handle named arguments at all and then flatten them into the P5 argument list. This is the only case where arguments are not a 1:1 mapping. 11:52
yoleaux nine_: I'll pass your message to PerlJam.
nine_ .tell muraiki foo(bar => 1, baz => 2) works now as intended in Inline::Perl5 11:53
yoleaux nine_: I'll pass your message to muraiki.
nine_ That one has bothered me a couple of times but never enough to actually fix it just for me. Users++ :) 11:54
11:54 _edwin left 11:56 _edwin joined 12:00 larion left
bartolin_ do I understand correctly that prefix:<|> can only be used in argument lists? 12:02
jnthn bartolin_: Yes 12:03
bartolin_: But \(...) is meant to behave like one
bartolin_ and has that changed at some time or has it ever been like this?
jnthn (and doesn't sufficiently yet; that's on my todo list to fix)
bartolin_ jnthn: oh, I see.
jnthn I don't think we've ever had \(...) handled quite right in Rakudo 12:04
Though I've a good idea how to fix it :)
FROGGS though that seems not that urgent
_edwin the problem I see with .max returning -Inf is that something like this does not work:
bartolin_ thanks, jnthn++
_edwin m: my Str @words; *; my Str $longest = @words.max(*.chars);
camelia rakudo-moar c86f75: OUTPUT«Type check failed in assignment to '$longest'; expected 'Str' but got 'Num'␤ in block <unit> at /tmp/SH6tAYVGWJ:1␤␤»
jnthn FROGGS: No, though I think one it woulda been annoying to fix and now it's probably easy :) 12:05
FROGGS ahh :o) 12:06
_edwin (the * being some code that either fills or does not fill @words)
jnthn *once
.ask TimToady is there a reason capterm doesn't use arglist to parse inside of the Capture? That'd make sure we get the processing of the two lined up... 12:08
yoleaux jnthn: I'll pass your message to TimToady.
12:09 erdic joined
psch m: my Str @words; *; my Str $longest = do { @words.max(*.chars) } if @words; say $longest 12:17
camelia rakudo-moar c86f75: OUTPUT«(Str)␤»
12:17 yqt joined
_edwin actually even when using the default smart "cmp" semantics, there is a kind of "type surprise" here: 12:17
psch _edwin: i think it's warranted to point out a possible failure mode somehow
_edwin m: my Str @words; @words.max.WHAT.say 12:18
camelia rakudo-moar c86f75: OUTPUT«(Num)␤»
_edwin psch, but isn't that what an undefined Str would be for?
psch i agree with that type confusion though
_edwin: yeah, i suppose a typed &max candidate would be sensible
(and &min for that matter) 12:19
i'm not sure if typed lists are in-place-enough for that
m: say so "0"; say so "0.0"; # i'm reminded the discussion around this behavior 12:20
camelia rakudo-moar c86f75: OUTPUT«False␤True␤»
12:23 Perl6_newbee joined
_edwin psch, if min/max returned Nil on empty lists, the Nil would become a properly typed undef value when it is assigned 12:24
FROGGS it would become trigger the default value to be exact 12:26
psch i think there's some math reason why min of an empty (numeric) list should be -Inf... 12:27
_edwin Inf you mean 12:28
psch and the minimal Str of an empty Str list would be ""
huh
yeah, i probably mean Inf 12:29
but then "" isn't the min Str of an empty list, or the reasoning is different
_edwin it's what moritz said: the idea is to return the neutral element of the binary min/max operator 12:30
psch m: say "a" min Str
camelia rakudo-moar c86f75: OUTPUT«a␤»
psch m: say "a" max Str
camelia rakudo-moar c86f75: OUTPUT«a␤»
psch m: say 5.0 min Num 12:31
camelia rakudo-moar c86f75: OUTPUT«5␤»
psch m: say 5.0 max Num
camelia rakudo-moar c86f75: OUTPUT«5␤»
psch well, the type object seems neutral
_edwin: i suppose you could implement and spectest, see if anything breaks except for tests that explicitly look for ±Inf 12:32
12:35 vendethiel left
_edwin hm, that's interesting in S03: "All orderable object types must support +Inf and -Inf values as special forms of the undefined value." 12:35
m: Inf.defined.say 12:36
camelia rakudo-moar c86f75: OUTPUT«True␤»
psch _edwin++ # design digging
12:36 tinyblak left, tinyblak joined
_edwin so it seems, from design perspective the problem is rather that Inf/-Inf do not behave as undefined values 12:37
my reading of S03 here is that "my Str $longest = -Inf" should make $longest an undefined Str, that would be fine 12:39
moritz that sounds rather unlikely to me 12:40
this is more about ordering, not assignment 12:42
12:43 larion joined
_edwin there is even an assignment example in S03, although one that fails because a native "int" cannot support -Inf 12:43
for the .min/.max method forms, I'm quite convinced that Nil is the correct return value for an empty list. the question is, how well that goes with the binary forms of min/max and [min]/[max] 12:45
moritz _edwin: try it
12:47 vendethiel joined
_edwin I will. I guess one thing that is important is that whatever is returned can be further combined like e.g. $left.min min $right.min 12:48
12:49 bcode left 12:50 bcode joined
eli-se how does temp work with threads? 12:53
e.g. if I have a global variable and I temp it
do other threads see it as well?
13:00 colomon joined
colomon goes to Ambercon for the weekend, and FROGGS++ starts submitting pull requests to his repo adding panda stuff he’s never heard of… 13:01
_edwin what could I be doing wrong when perl6-m.bat gives me "Missing or wrong version of dependency 'src/gen/m-CORE.setting'" 13:02
13:02 larion left
psch _edwin: missing a «make clean» maybe. or you might have to nuke your install/ 13:03
_edwin to be more precise: the failing command is: .\perl6-m.bat --target=mbc --output=lib/Test.pm.moarvm lib/Test.pm
psch, thanks, will try 13:04
13:05 Sir_Ragnarok left
[ptc] _edwin: I've had that issue before; only had to remove install/ and then run 'make install' again 13:05
_edwin [ptc], thanks, doing that now 13:06
13:06 eli-se left, colomon left 13:19 larion joined
FROGGS a reconfigure is needed to get a new makefile 13:19
13:23 jack_rabbit left 13:24 jack_rabbit joined 13:30 davercc left 13:32 xfix left 13:35 eli-se joined, yqt left
vendethiel eli-se: that's a good question. did you try it? :P 13:43
eli-se no
But I should.
13:43 BenGoldberg joined
eli-se Lexically scoped variables with dynamically scoped values tend to be useful. 13:44
arnsholt Yeah. Dynvars are one of those things you don't want too often, but when you need them, you really do need them 13:45
13:50 xprime left 13:53 zakharyas joined 13:59 rindolf left
FROGGS k, created now 23 PRs to add "provides" sections... 14:03
vendethiel FROGGS++ 14:07
14:09 colomon joined, rurban_ joined 14:11 brrt joined
dalek c: bd0f1a3 | (Nathan Brown)++ | lib/Language/5to6.pod:
Fix sigil invariance in :delete example
14:12
c: 8e3bc38 | paultcochrane++ | lib/Language/5to6.pod:
Merge pull request #67 from nbrown/patch-1

Fix sigil invariance in :delete example
14:13 raiph joined 14:17 kjs_ joined
_edwin hm, this seems to hang rakudo-m: 'one'..'two' minmax 'five'..'three' 14:23
FROGGS m: say 'one'..'two'
camelia rakudo-moar c86f75: OUTPUT«"one".."two"␤»
FROGGS m: say ('one'..'two').list 14:24
camelia rakudo-moar c86f75: OUTPUT«one onf ong onh oni onj onk onl onm onn ono onp onq onr ons ont onu onv onw onx ony onz ooa oob ooc ood ooe oof oog ooh ooi ooj ook ool oom oon ooo oop ooq oor oos oot oou oov oow oox ooy ooz opa opb opc opd ope opf opg oph opi opj opk opl opm opn opo opp …»
FROGGS m: say ('one'..'two').list.elems
camelia rakudo-moar c86f75: OUTPUT«3625␤»
FROGGS m: say ('five'..'three').list.elems
camelia rakudo-moar c86f75: OUTPUT«(timeout)»
FROGGS I guess minmax flattens
_edwin hm, I expected it to be smart with ranges 14:25
FROGGS I often think that we should add candidates for ranges...
_edwin background is that I wanted to add tests like these for minmax: github.com/perl6/roast/commit/a77c...cdadcca5e2 14:26
i.e. I wanted to test that you can do minmax on sublists and then combine the results with minmax
for Ints it works perfectly 14:27
for lists of Strs it explodes 14:28
colomon m: say (‘a’..’ba’) 14:29
camelia rakudo-moar c86f75: OUTPUT«5===SORRY!5=== Error while compiling /tmp/W7aRQlnBol␤Missing required term after infix␤at /tmp/W7aRQlnBol:1␤------> 3say (‘a’..7⏏5’ba’)␤ expecting any of:␤ prefix␤ term␤»
colomon grumble.
jnthn m: say (‘a’..‘ba’) 14:31
camelia rakudo-moar c86f75: OUTPUT«"a".."ba"␤»
_edwin aha, but it only worked for the Ints because I used very small ranges 14:32
jnthn eli-se: No, temp on a global from multiple threads won't end too well... Better to go with dynvars for such things. 14:33
eli-se: It's not a fresh variable, but rather a saving of what was in the variable, so it can be assigned back to the variable at LEAVE time. 14:34
grondilu m: say 'α'..'ω'
camelia rakudo-moar c86f75: OUTPUT«"α".."ω"␤»
eli-se jnthn: OK
grondilu m: say ('α'..'ω')[^10] 14:35
camelia rakudo-moar c86f75: OUTPUT«α β γ δ ε ζ η θ ι κ␤»
14:35 larion left 14:36 larion joined
abraxxa is there a way to find out how NativeCall passes a float to a C lib? 14:42
i'm still stuck with Oracle OCI floating binds
FROGGS abraxxa: I can help you there
abraxxa FROGGS: great! 14:43
FROGGS abraxxa: that's where it is passed github.com/MoarVM/MoarVM/blob/mast...all.c#L684
_edwin the strange thing is that the minmax implementation looks as if it would be already smart about ranges 14:44
_edwin confused
abraxxa FROGGS: can i print that somehow? 14:45
_edwin aha, only the .minmax method is smart about ranges
vendethiel oh, there's a p6-php module.
FROGGS abraxxa: sure, add: fprintf(stderr, "float value is %f\n", unmarshal_float(tc, value));
_edwin ...or not 14:46
masak as to those bugs about sqish with a :with named parameter: :with is not in S32, and -- as far as I'm concerned -- has been subsumed by :as
(and so :with should probably by deprecated in Rakudo) 14:47
vendethiel ah, that's not php >_>
FROGGS abraxxa: and then you just need to 'make install' in moarvm and then you can run your tests again 14:48
eli-se DID SOMEBODY SAY PHP??! 14:49
dalek pan style="color: #395be5">perl6-examples: ec5ac2a | paultcochrane++ | t/004-website-basic.t:
Add missing descriptions to collect-metadata tests
perl6-examples: 365c159 | paultcochrane++ | / (2 files):
perl6-examples: Convert p2h into a method on the Website class
14:49 dalek left 14:50 dalek joined, ChanServ sets mode: +v dalek, zby_home_ joined
[ptc] has heard that in php it is common to do pear-programming 14:51
FROGGS :P
_edwin I wonder whether the .minmax implementation inadvertently flattens ranges before doing the .isa(Range) check
14:53 sirdancealot joined
abraxxa FROGGS: brewing 14:53
14:54 xinming left
abraxxa moritz: this blog post has a typo in the link to the Rakudo 2015.03 release notes, it says 2015.02: rakudo.org/2015/03/21/announce-raku...e-2015-03/ 14:55
14:55 telex left 14:56 telex joined
_edwin masak, given TimToady's comments about :with I tend to agree 14:56
RT #124204, however, also affects the squish with only :as
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=124204
FROGGS abraxxa / moritz: fixed it 14:57
abraxxa FROGGS++
14:59 raiph left 15:00 xinming joined 15:01 colomon left 15:02 brrt left 15:04 xfix joined, colomon joined
xfix Apparently, Perl 5.22 adds a new operator for numeric bitwise operations. 15:05
new operators*
15:07 colomon left, colomon joined 15:11 vendethiel left 15:12 skids joined
_edwin I think .minmax is not working according to spec: 15:13
m: my $count = 0; (1..3, 2..40).minmax({$count++; $^a cmp $^b}).say; say $count
camelia rakudo-moar c86f75: OUTPUT«1..40␤82␤»
_edwin S32: "Range elements in @values are treated as if their minimum and maximum values were passed individually"
15:14 prime joined, prime left, prime joined 15:15 vendethiel joined, rudi_s joined
masak _edwin: not sure I see what you consider to be the discrepancy. 15:16
_edwin minimum and maximum values would be two values per range object
however the range object seems to be flattened and *all* the values in the range are iterated over 15:17
15:17 colomon left
_edwin I think that's not the intention of the spec here 15:17
15:18 colomon joined
abraxxa FROGGS: done as you said but i don't see the print output when I run the test script via perl6 -Ilib t/45-oracle-common.t 15:18
15:18 larion left
FROGGS abraxxa: and you modified the file in the correct place? 15:18
abraxxa FROGGS: yes, tried before and after the call in line 684 15:19
15:19 larion joined
FROGGS abraxxa: I mean, there might be two MoarVM repositories... one build directory and one to clone from 15:19
you should change things in the one that has a Makefile
abraxxa i'm in ~/.rakudobrew/moar-2015.03/nqp/MoarVM
_edwin the result may be the same theoretically with the flattening, but it does not scale 15:20
I think the problem is the @.list in github.com/rakudo/rakudo/blob/nom/...ny.pm#L414 15:22
abraxxa FROGGS: as make install works it should be the right one
which file should get updated when I run make install? 15:23
FROGGS abraxxa: yes, 'make install' implies a Makefile
src/core/nativecall.o I think
15:24 brrt joined
_edwin the code inside the for loop tries to do the right thing for Range objects, but at this point they do no longer exist, it seems 15:24
abraxxa FROGGS: compiling src/core/nativecall.o 15:25
linking libmoar.so
linking moar
so should the 'moar' binary be updated?
because the one in my .rakudobrew/bin isn/t 15:26
FROGGS abraxxa: you can also print the type id of the argument
hmmm
dunno
abraxxa cp moar ~/.rakudobrew/bin/ ;)
still no difference 15:27
_edwin m: (1..3,2..4).elems 15:28
camelia ( no output )
_edwin m: (1..3,2..4).elems.say
camelia rakudo-moar c86f75: OUTPUT«2␤»
abraxxa rakudobrew build-panda fails for 2015.03 for me, is this a known problem? 15:29
15:29 eli-se left
abraxxa looks like Shell::Command is causing the failure 15:29
No object at index 296
t/02-shell-command.t ..
15:33 tinyblak left
abraxxa FROGGS: rebuilt it, still nothing. I guess it doesn't bind a float! 15:34
i'm using a num64 15:35
and i'm calling .Num on the p6 var before passing it 15:36
15:38 xfix left
moritz abraxxa: the current panda needs a newer rakudo than 2015.03 15:39
abraxxa: if you want panda on 2015.03, use the star tarball
_edwin m: my $count = 0; ((1..3).item, (2..40).item).minmax({$count++; $^a cmp $^b}).say; say $count
camelia rakudo-moar c86f75: OUTPUT«1..40␤2␤»
abraxxa moritz: ok
_edwin ok, seems I was just too stupid to use it right :)
abraxxa FROGGS: added more prints, make install is sufficient to make it work 15:40
15:43 brrt left 15:45 colomon left 15:46 colomon joined
masak [Tux]: see my latest comments on RT #124191. 15:52
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=124191
masak [Tux]: if you're really eager to see the bug gone, you should be able to run off of the branch 'revert-bho-sink' for the time being. 15:53
_edwin does the evalbot have a timeout for evaluations that blow up? 15:58
flussence m: sleep 50 15:59
camelia rakudo-moar c86f75: OUTPUT«(timeout)»
flussence 15 seconds ish
_edwin ok, thanks. then I can show my problem: I'm having a hard time protecting the range object from flattening. somehow I'm missing something: 16:00
m: (1..3).item minmax (2..10e12).item
camelia ( no output )
_edwin m: say (1..3).item minmax (2..10e12).item
camelia rakudo-moar c86f75: OUTPUT«1..10000000000000e0␤»
_edwin that works find
fine*
16:00 colomon left
_edwin m: say [minmax] (1..3).item, (2..10e12).item 16:00
this blows up 16:01
camelia rakudo-moar c86f75: OUTPUT«(timeout)»
_edwin how can I pass a list of ranges to [minmax]? 16:02
abraxxa FROGGS: accoring the the arg_types[i] it's a MVM_NATIVECALL_ARG_INT 16:03
masak _edwin: re ranges in a list that you then .minmax on -- it is *my* expectation that those ranges should flatten. 16:04
(sorry for the late reply -- doing other things)
flussence _edwin: depending on what you're asking for, [minmax] @ranges».bounds might work fine
masak um, is it just me, or does this line look *wrong*? github.com/rakudo/rakudo/commit/a3...675bfcR457 16:06
flussence yep...
bartolin_ masak++ # digging deep for bug
masak (the .release register happens right allocating the register, then we use it, then we release it again)
ok, gonna try building without that line. 16:07
16:07 brrt joined
_edwin flussence, the background is: I'd like to show that the results of several .minmax calls can be combined by another minmax operation in an analogous way as that works for min and max separately 16:08
FROGGS abraxxa: what does your subroutine signature look like? 16:09
_edwin and it almost works, except that my ranges are blowing up all over the place :(
the ».bounds construction you proposed would probably solve it, but my reading of S32 is that it should work out-of-the-box 16:10
abraxxa FROGGS: num64 is double, this is why I didn't see anything when printing the float 16:11
flussence hm, yeah. it seems like the sort of line that's unnecessarily surprising...
abraxxa FROGGS: looks like it's ok, I get arg type is 14, double value is 4.850000
also printing the arg_types[i] value
FROGGS well, you said float :o) 16:12
<abraxxa> is there a way to find out how NativeCall passes a float to a C lib?
abraxxa it's just that this sub is called more often than i thought so the last call is not the double one
FROGGS but yeah, num64 is correctly a double
abraxxa so that should be fine, right?
still getting ORA-01024: invalid datatype in OCI call and no clue on the internet why
_edwin also S03 for minmax "Range elements in the input are treated as if their minimum and maximum values were passed individually" 16:13
FROGGS if you pass to a num64 param and land in the double case... then that's right
abraxxa that also happens when i try binding it as num32(float)
_edwin I might be misreading it, but to me it sounds exactly like the behavior you need to accumulate results of minmax operations
FROGGS but I can't tell why you get an error... since I cannot try your code on my box I dunno how to help right now 16:14
16:14 spider-mario left
abraxxa FROGGS: ok, will search on 16:14
flussence m: say minmax (1..3).item, (2..10e12).item 16:15
camelia rakudo-moar c86f75: OUTPUT«1..10000000000000e0␤»
flussence okay, sub form of minmax works fine there...
(but only with .item) 16:16
abraxxa FROGGS: the error description makes me think that i don't pass the dty param correctly
b2gills m: multi test ( Int(Cool) $ ){ say 'int' }; multi test ( Cool $ ){ say 'Cool' }; test '5' 16:17
camelia rakudo-moar c86f75: OUTPUT«Ambiguous call to 'test'; these signatures all match:␤:(Cool $)␤:(Cool $)␤ in sub test at /tmp/vmJsxnUffB:1␤ in block <unit> at /tmp/vmJsxnUffB:1␤␤»
flussence I think it makes sense that [minmax] $huge_range would explode, since the [] doesn't know that its contents can handle ranges directly.
_edwin flussence, aha, interesting that it works with minmax ... but not with [minmax] ...
flussence m: say $(1..10) minmax $(2..10e12) 16:18
camelia rakudo-moar c86f75: OUTPUT«1..10000000000000e0␤»
16:18 brrt left
flussence yeah, it's the [] that causes it to explode. 16:18
psch m: say &minmax.signature; say &[minmax].signature 16:19
camelia rakudo-moar c86f75: OUTPUT«(*@args, :by(&by) = { ... })␤(Any |)␤»
abraxxa moritz: panda also fails on nom for me 16:21
_edwin m: say [~] <a b>.item, <c d>.item 16:27
camelia rakudo-moar c86f75: OUTPUT«a bc d␤»
_edwin m: say &[~].signature 16:28
camelia rakudo-moar c86f75: OUTPUT«($?, $?)␤»
psch m: say <a b>.item.Str.perl 16:30
camelia rakudo-moar c86f75: OUTPUT«"a b"␤»
_edwin with [~] the .item works to protect from flattening 16:31
BenGoldberg Could rakudo provide specialized versions of [op] thingies?
psch m: say [~] <a b>, <c d>
camelia rakudo-moar c86f75: OUTPUT«abcd␤»
psch m: say &[&infix:<~>].signature 16:32
camelia rakudo-moar c86f75: OUTPUT«5===SORRY!5=== Error while compiling /tmp/xO1Oek4REY␤Unable to parse expression in infix noun; couldn't find final ']' ␤at /tmp/xO1Oek4REY:1␤------> 3say &[&7⏏5infix:<~>].signature␤»
psch m: say &[infix:<~>].signature
camelia rakudo-moar c86f75: OUTPUT«5===SORRY!5=== Error while compiling /tmp/nD1cS97CCs␤Missing infix inside []␤at /tmp/nD1cS97CCs:1␤------> 3say &[7⏏5infix:<~>].signature␤ expecting any of:␤ argument list␤ infix␤ infix noun␤ infix st…»
BenGoldberg m: say [,] 1..5; 16:33
camelia rakudo-moar c86f75: OUTPUT«1 2 3 4 5␤»
BenGoldberg m: say [R,] 1..5;
camelia rakudo-moar c86f75: OUTPUT«Too many positionals passed; expected 2 arguments but got 5␤ in block at src/gen/m-CORE.setting:21905␤ in sub at src/gen/m-CORE.setting:22055␤ in block <unit> at /tmp/TavqbYOQcI:1␤␤»
16:34 spider-mario joined
_edwin grepping in rakudo, the signatures of infix:<minmax> and infix:<~> look quite differnt 16:35
BenGoldberg Suppose that the [] meta-operator was subject to multi-dispatch, with different versions working on different types of operators. 16:36
_edwin but understanding why that makes [minmax] flatten even the .item'ed ranges is beyond my current perl6-fu, I'm afraid
rudi_s Does perl6 support poll/select/epoll to handle many simultaneous network connections? 16:38
_edwin maybe it's the slurpiness in multi sub infix:<minmax>(*@args) { @args.minmax } 16:39
16:41 larion left
skids BenGoldberg: that probably reduces to the problem of how/when e.g. sub (int *@a) typechecks. 16:43
16:44 perigrin_ joined
perigrin_ anybody have a pointer on aio in perl6? 16:44
16:44 perigrin_ is now known as perigrin
moritz perigrin: in general, you just do IO in another thread, which could feed a Supply or something like that 16:45
perigrin: though we do have doc.perl6.org/type/Proc::Async for executing external commands asynchronously 16:46
perigrin moritz: I'm discussing a new Net::Twitter with semifor and he's pining for the lack of selection in async HTTP modules in perl 5 16:47
AnyEvnet::HTTP and Mojo::UA I think are the only choices
and both implement the full http stack on async sockets
16:48 larion joined 16:49 vendethiel left
flussence masak: d'ya think that use-after-free is what's causing the current panda breakage too? 16:51
16:53 eli-se joined 16:57 mj41 joined 16:59 Psyche^ joined 17:01 Patterner left
mj41 Ahoj. 17:02
yoleaux 24 Mar 2015 21:54Z <hoelzro> mj41: I created a repo under github.com/perl6/docker; just waiting on word from the Docker folks
17:05 virtualsue left, virtualsue joined 17:06 larion left, larion joined 17:07 yqt joined
abraxxa how can i enter hex in perl6? 17:09
_edwin abraxxa, do you mean for a literal constant in the code or from user input? 17:10
abraxxa constants 17:11
_edwin m: say 0xABCD
camelia rakudo-moar c86f75: OUTPUT«43981␤»
abraxxa i tried my ub4 constant OCI_COMMIT_ON_SUCCESS = 0x00000020;
_edwin how does it fail? the hex syntax looks ok, maybe it is something else? 17:13
abraxxa with my favorite error messages which stacktrace doesn't include a pointer to my code: Unhandled exception: This type cannot unbox to a native integer 17:14
17:15 khisanth__ joined
_edwin is ub4 something you declare in your code? 17:15
abraxxa _edwin: yeah, OCI datatype aliases 17:16
ub4 is unsigned byte 4
17:17 molaf joined, khisanth_ left
_edwin m: my uint32 constant TEST = 0x00000020; say TEST; say TEST.WHAT; 17:18
camelia rakudo-moar c86f75: OUTPUT«32␤(Int)␤»
17:18 geever left
abraxxa never mind, it seems to have something to do with where i'm using the constant 17:18
ugexe anyone know github:paultcochrane's irc handle? 17:19
17:20 colomon joined, raiph joined
psch ugexe: i think that's [ptc] 17:20
TimToady testing a fix for minmax 17:21
yoleaux 12:08Z <jnthn> TimToady: is there a reason capterm doesn't use arglist to parse inside of the Capture? That'd make sure we get the processing of the two lined up...
ugexe psch: thanks
FROGGS abraxxa: it is still hard to guess what might be wrong since you dont give me enough information 17:22
abraxxa: like, what are the arguments for the call that fails? what is the exact signature?
_edwin abraxxa, BTW, it seems that constants do not really honor native types (yet?) 17:23
abraxxa FROGGS: i'm still to Perl5ish in my mind and wrote: $!dbh.AutoCommit ?? OCI_COMMIT_ON_SUCCESS :: OCI_DEFAULT, instead of $!dbh.AutoCommit ?? OCI_COMMIT_ON_SUCCESS !! OCI_DEFAULT,
_edwin: FROGGS told my I can define them this way 17:24
FROGGS _edwin: it does not matter what the constant is, as long as it can unbox to the native type
17:25 xfix joined
ugexe shouldnt rakudo have told you what you did wrong if you used '?? ::'? 17:25
FROGGS abraxxa: your malformed ternary should be a syntax error though
m: say 1 ?? 2 :: 3
camelia rakudo-moar c86f75: OUTPUT«5===SORRY!5=== Error while compiling /tmp/pWNGK1Zc_s␤Please use !! rather than ::␤at /tmp/pWNGK1Zc_s:1␤------> 3say 1 ?? 2 :7⏏5: 3␤ expecting any of:␤ colon pair␤»
abraxxa m: sub foo (1 ?? 'bar' :: 'baz'); 17:26
camelia rakudo-moar c86f75: OUTPUT«5===SORRY!5=== Error while compiling /tmp/ws18dzJpLt␤Missing block␤at /tmp/ws18dzJpLt:1␤------> 3sub foo (1 7⏏5?? 'bar' :: 'baz');␤»
abraxxa m: sub foo ($foo); foo(1 ?? 'bar' :: 'baz'); 17:27
camelia rakudo-moar c86f75: OUTPUT«5===SORRY!5=== Error while compiling /tmp/YDLHM_Lxqm␤Semicolon form of sub definitions not allowed except on MAIN subs;␤Please use the block form.␤at /tmp/YDLHM_Lxqm:1␤------> 3sub foo ($foo);7⏏5 foo(1 ?? 'bar' :: 'baz');␤»
abraxxa m: sub foo ($foo) {}; foo(1 ?? 'bar' :: 'baz');
camelia rakudo-moar c86f75: OUTPUT«5===SORRY!5=== Error while compiling /tmp/eVe1E6OLLv␤Please use !! rather than ::␤at /tmp/eVe1E6OLLv:1␤------> 3sub foo ($foo) {}; foo(1 ?? 'bar' :7⏏5: 'baz');␤ expecting any of:␤ colon pair␤»
dalek Heuristic branch merge: pushed 44 commits to rakudo/moreinput by peschwa 17:31
psch current state of moreinput: statements need to be terminated with ';' or "\n\n", i.e. << say "hi" >> gives the secondary prompt once, but evals on empty line 17:32
+for the second prompt
<< if 1 {\nsay "hi"\n}; >> also works now
i suspect some of TimToady++'s ws work played a part in that too 17:33
17:33 vendethiel joined
FROGGS what about if 1 {\nsay "hi"\n} ? 17:33
psch FROGGS: that also prompts for one more line iirc, lemme check
17:34 colomon left
psch FROGGS: no, works 17:34
as in, enter after } prints "hi"
FROGGS that's what I had expected :o)
nice
I think that feels sane all in all
17:37 colomon joined
dalek kudo/nom: 4254764 | TimToady++ | src/core/Any.pm:
minmax should not try to flatten ranges

  (After ** binding, however, it does need to traverse Positionals.)
17:37
TimToady _edwin++ too 17:38
17:40 colomon left
abraxxa FROGGS: the only difference of the OCIBindByName_Real from the _Str and_Int is that I use num64, a nativecall datatype in its definition instead of a Perl 6 type 17:41
i do get a different error if I replace num64 with Num 17:42
dalek kudo/nom: d24f300 | FROGGS++ | src/core/CompUnitRepo/Locally.pm:
attempt to mkdir CUR::Installation locations

We need to do this very early or we end up dropping a CUR::Installation from @*INC, which results in panda not finding installed distributions.
17:42 travis-ci joined
travis-ci Rakudo build errored. TimToady 'minmax should not try to flatten ranges 17:42
travis-ci.org/rakudo/rakudo/builds/56317252 github.com/rakudo/rakudo/compare/c...5476425401
17:42 travis-ci left
FROGGS fatal: unable to access 'github.com/perl6/nqp.git/': Failed connect to github.com:443; Connection timed out 17:43
just a github hickup
abraxxa: what is the error message with Num? 17:44
abraxxa yes, github doesn't work for me too currently
geekosaur yep, other projects seeing that too
abraxxa ORA-01036: illegal variable name/number
17:46 travis-ci joined
travis-ci Rakudo build failed. Tobias Leich 'attempt to mkdir CUR::Installation locations 17:46
travis-ci.org/rakudo/rakudo/builds/56317488 github.com/rakudo/rakudo/compare/4...4f30015c31
17:46 travis-ci left
_edwin TimToady++, the binary infix:<minmax> works like a charm now! 17:50
17:50 colomon joined
jnthn masak: re github.com/rakudo/rakudo/commit/a3...675bfcR457 it has to be wrong solely out of the fact that we double-release the $meth register 17:52
_edwin (still trying the other variants)
FROGGS abraxxa: what is the sql query that fails?
abraxxa FROGGS: github.com/abraxxa/DBIish/blob/mas...on.pl6#L94 17:53
timotimo the touchpad and stick mouse on my laptop are dead :(
abraxxa timotimo: which laptop do you have? 17:54
timotimo t440s
17:54 colomon left
tadzik how many t440s? :D 17:54
timotimo this happened before and fixed "itself" a month or so ago ... i should probably get it fixed, as i have Thinkpad Protection on it still
_edwin [minmax] also works nicely now 17:55
the only form that still blows up without the '.item's is: (1..3, 2..10e12).minmax 17:56
FROGGS jnthn: is it possible that the 'is rw' magic on natives works for ints but not nums? 17:58
abraxxa FROGGS: are there tests for nativecall I could look at or extend? 17:59
can I call a method on an object inside ""?
FROGGS m: "42.say()"
camelia ( no output )
FROGGS m: say "42.chr()"
camelia rakudo-moar 425476: OUTPUT«42.chr()␤»
FROGGS err
m: say "Bool.pick()" 18:00
camelia rakudo-moar 425476: OUTPUT«Bool.pick()␤»
abraxxa like say "$bar.foo";
FROGGS what am I doing wrong?
abraxxa: parens are needed
18:00 larion left
abraxxa ah, yes 18:00
just remembered it
FROGGS m: my $foo = "a"; say "$foo.uc()"
camelia rakudo-moar 425476: OUTPUT«A␤»
FROGGS ahh, must be a variable
abraxxa no, I don't want a method but an attr 18:01
FROGGS abraxxa: you still call the accessor method
so, it is a method call
abraxxa hm... 18:02
has $.dbh; means the attr is mutable, right?
abraxxa wonders why the database handle of a statement handle should be allowed to change
18:02 larion joined 18:03 yqt left
jnthn FROGGS: I know something is up with num32, though not related to "is rw" specifically 18:03
_edwin TimToady, what is your opinion on this?: my Str @words; #`[ some code that *may* push words ] my Str $longest = @words.max(*.chars);
jnthn FROGGS: And not native call or native array related either, more about lexical num32s. 18:04
FROGGS hmmm
I get a segfault here...
DLLEXPORT void SetFloat(float *flt) { *flt = 6.66; } /* in C */ 18:05
sub SetFloat(num32 is rw) is native('./14-rw-attrs') { * }
my num32 $a; SetFloat($a); say $a;
_edwin I'd have expected to get a Str:U if there are no @words, but currently it gives "Type check failed in assignment to '$longest'; expected 'Str' but got 'Num'"
jnthn FROGGS: Um, does nativecall know what to do with "is rw" yet? 18:06
FROGGS: I sure didn't implement it doing so...did you? :)
18:07 colomon joined
FROGGS ohh 18:07
dang
jnthn haha
FROGGS that is still in a branch, right?
jnthn I didn't work on native-ref/nativecall integration at all yet.
FROGGS O.o
jnthn It's on my "stuff to do soon" list :)
FROGGS hehe, so I dreamed it :o)
jnthn I was getting native arrays most of the way along first :) 18:08
abraxxa shouldn't that raise a compile time exception?
FROGGS it is not a compile time error
it is just a noop atm
abraxxa: so, you still cannot do that: github.com/abraxxa/DBIish/blob/mas...e.pm6#L192 18:09
abraxxa FROGGS: can i install rakudo from a branch to support it?
FROGGS abraxxa: and I am under the impression that we already got to the point where we said you've to keep using CArrays for that
jnthn abraxxa: No, FROGGS and I were just discovering that neither of us have actually implemented the thing yet...
FROGGS abraxxa: no, jnthn has not started implementing it yet 18:10
abraxxa FROGGS: just to the case of CArray[Pointer]
ah, so not even a branch, got it
FROGGS it is not CArray[Pointer] what you want, but either CArray[num32] or Pointer[num32]
jnthn I did the stuff to get "is rw" working on natives in Perl 6, just not the integration with NativeCall yet.
abraxxa yes, if you look here github.com/abraxxa/DBIish/blob/mas...e.pm6#L185 you see that I'm not using 'is rw' for the Pointer to a Pointer stuff 18:11
FROGGS jnthn: hmmm, I can potentially make that work...
abraxxa this is a regular, mutable attribute with a default value, right? has $.AutoCommit is rw = 1;
FROGGS but I'll first check if a Pointer[num32] would do the trick
right 18:12
abraxxa and this makes it passable to the constructor: submethod BUILD(:$!svchp!, :$!errhp!, :$!AutoCommit) { }
why is ! used there and not . ?
or is that an error in DBDish::Pg I've copied?
FROGGS because you usually dont talk to the attribute via its *public* accessor from inside of its class
18:13 Perl6_newbee left
abraxxa gah! 18:13
i've mixed mutability with access
$! works for all attributes, not just immutable ones
FROGGS the dot/bang is about publicity
yes
abraxxa my brain translated ! to 'no'
FROGGS from inside the class you can just use $!
well, it is 'no' for the outside 18:14
itz grrr github issues.. the DoS I guess?
FROGGS probably, yeah
18:14 larion left
_edwin is it ok to push a spectest that passes only with a very recent rakudo commit? 18:14
18:14 colomon left
jnthn _edwin: yes 18:14
abraxxa what's the difference between has $.foo and $!foo then? 18:15
jnthn itz: Almost certainly
18:15 larion joined, rindolf joined
abraxxa doc.perl6.org/language/objects#Attributes describes it nicely 18:15
so accessor generation or not 18:16
but I'd still use $!foo inside the class and not call the accessor?
FROGGS yes
as it should be faste
r
jnthn Not only is it faster
It means you're not vulnerable to somebody writing a subclass and overriding the method
MilkmanDan Does anyone know of a project or document that tracks "Perl 6 Internals" in summary form? www.perl6.org/archive/talks/tpc5-in...rnals.html is nice but almost 15 years old and none of the perl.perl6.internals.* Usenet groups have seen posts in over 2 years (most >10). 18:17
jnthn Of course, sometimes you want to allow the overriding :)
FROGGS and you get compile time checks
abraxxa jnthn: depends on what I want, doesn't it?
jnthn abraxxa: Yes, of course. :)
MilkmanDan: It's quite a bit of detail but github.com/edumentab/rakudo-and-nq...ls-course/
18:18 zakharyas left
abraxxa it seems my default value isn't set 18:18
jnthn MilkmanDan: That doesn't count as summary form really though.
Though the opening bits are high level 18:19
FROGGS MilkmanDan: that might be a short intro: www.youtube.com/watch?v=XgPh5Li3k4g
MilkmanDan jnthn: It counts a lot more than "here is the archive of all the online work done through the Internals group; enjoy reading". :)
And 2 years old is much better than 15. :)
18:20 colomon joined
jnthn Yowser, Rakudo startup time almost doubled... 18:21
vendethiel that $*VM initializing?
jnthn No
That's "on latest, as compared to how it was a couple of days ago" 18:22
dalek ast: 13fb4a5 | (Edwin Steiner)++ | S32-list/minmax.t:
Add tests for combining the results of .minmax with further minmax operators.
18:22 colomon left
MilkmanDan FROGGS: Thanks, that might have what I'm looking for. 18:23
jnthn Well, my dinner is nearly done cooking, so I'll worry about finding it later :)
&
MilkmanDan Essentially, I'm just looking for a document or site that says things like "in Perl 6 all integers are stored as 64bit Floats so as to take advantage of FP-optimized compilers and FPUs." or "strings are copy-on-write objects; if you modify the contents of a string the following process takes place: ...."
18:23 colomon joined
FROGGS jnthn: that might be about slurping the module "database" 18:23
MilkmanDan: you are looking for what is called "6model"... I think that highlights it a little: www.youtube.com/watch?v=J8K1JEQcfHs 18:25
abraxxa AutoCommit works ;)
i wasn't passing the AutoCommit parameter here: github.com/abraxxa/DBIish/blob/mas...e.pm6#L806 18:26
MilkmanDan FROGGS: Fantastic, thanks!
abraxxa but shouldn't that used the default value then?
MilkmanDan Knowing what to search for sure makes things easier...
abraxxa why does it call .bless and not .new? 18:27
psch huh 18:29
S19-command-line/repl.t segfaults on the moreinput branch 18:30
18:30 xinming_ joined
FROGGS psch: gdb it! 18:30
18:30 colomon left
psch it also segfaults manually :( 18:31
if i ^D on the secondary prmpt
*prompt
18:31 _edwin left
psch FROGGS: can't i just blindly guess "something about readlinfh"? :) 18:31
err
or maybe readlineintfh 18:32
abraxxa m: class Foo { has $.AutoCommit is rw = 1; submethod BUILD( :$!AutoCommit ) { warn "AutoCommit: $!AutoCommit"; } } Foo.new();
camelia rakudo-moar 425476: OUTPUT«5===SORRY!5=== Error while compiling /tmp/98WheFGvwH␤Strange text after block (missing semicolon or comma?)␤at /tmp/98WheFGvwH:1␤------> 3) { warn "AutoCommit: $!AutoCommit"; } }7⏏5 Foo.new();␤ expecting any of:␤ infix␤ …»
FROGGS psch: no, you not allowed to guess :P 18:33
m: class Foo { has $.AutoCommit is rw = 1; submethod BUILD( :$!AutoCommit ) { warn "AutoCommit: $!AutoCommit"; } }; Foo.new();
camelia rakudo-moar 425476: OUTPUT«use of uninitialized value $!AutoCommit of type Any in string context in submethod BUILD at /tmp/e8ZsNjEdhZ:1␤␤AutoCommit: in submethod BUILD at /tmp/e8ZsNjEdhZ:1␤␤»
FROGGS m: class Foo { has $.AutoCommit is rw = 1; submethod BUILD( :$!AutoCommit = 1 ) { warn "AutoCommit: $!AutoCommit"; } }; Foo.new();
camelia rakudo-moar 425476: OUTPUT«AutoCommit: 1 in submethod BUILD at /tmp/jkBwWMH8YN:1␤␤»
FROGGS abraxxa: ^^
18:34 xinming left
abraxxa FROGGS: can you describe to me what's going on? 18:34
FROGGS m: class Foo { has $.AutoCommit is rw = 1 }; say Foo.new.AutoCommit;
camelia rakudo-moar 425476: OUTPUT«1␤»
MilkmanDan FROGGS: Hmm, since that first video is about the JVM maybe before I dig much deeper I should ask, is there major difference in the internals like in-memory storage based on whether one is using Parrot, Moar, etc? It seems like there would be...
FROGGS abraxxa: since you are intercepting the instantiation of the Foo object, you have to care yourself for what would normally happen in the BUILD methods 18:35
MilkmanDan: yes, the VM (Parrot, MoarVM, JVM) is free to do the memory management as it wants to
abraxxa FROGGS: is there already a different way to specify which attrs have to be specified at instantiation time?
FROGGS MilkmanDan: but whet it comes to object types and memory layout, 6models comes with REPRs (representations), that define how objects work etc 18:36
abraxxa: you could do: submethod BUILD( :$!AutoCommit! ) 18:37
psch ooh
SIGVSEGV [...] in MVM_string_concatenate ()
FROGGS abraxxa: or if you dont have a BUILD methods you'd do: has $.AutoCommit is rw = ...;
abraxxa FROGGS: that's already what I do 18:38
FROGGS: the submethod BUILD is only there to make $!svchp and $!errhp mandatory
i was hoping there is/will be an attribute definition syntax for that
18:39 colomon joined
FROGGS yes, has $.AutoCommit is rw = ...; 18:40
this will explode if you dont supply that argument to .new 18:41
abraxxa what part of it? the 'is rw'?
FROGGS the ... 18:42
m: say ...
camelia rakudo-moar 425476: OUTPUT«Unhandled exception: Stub code executed␤ at <unknown>:1 (/home/camelia/rakudo-inst-1/share/perl6/runtime/CORE.setting.moarvm:throw:4294967295)␤ from src/gen/m-CORE.setting:15857 (/home/camelia/rakudo-inst-1/share/perl6/runtime/CORE.setting.moarvm:s…»
abraxxa what I need is: $!svchp and $!errhp mandatory, $.AutoCommit optional with a default value of 1 if not specified
MilkmanDan Ah, so there are multiple 6model(s).
FROGGS MilkmanDan: no, 6model is the object system.... but there are quite some representations 18:43
like P6bigint, P6num, P6str, VMArray etc
18:45 kaare_ left
abraxxa m: class Connection { has $!.svchp = ...; has $!errhp = ...; has $.AutoCommit is rw = 1; }; Connection.new(); 18:45
camelia rakudo-moar 425476: OUTPUT«Unhandled exception: Stub code executed␤ at <unknown>:1 (/home/camelia/rakudo-inst-1/share/perl6/runtime/CORE.setting.moarvm:throw:4294967295)␤ from src/gen/m-CORE.setting:15857 (/home/camelia/rakudo-inst-1/share/perl6/runtime/CORE.setting.moarvm:s…»
FROGGS m: class Foo { has $.AutoCommit is rw = 1; has $.svchp is rw = die 'Param $!svchp is mandatory' }; say Foo.new( :svchp(42) ).AutoCommit;
camelia rakudo-moar 425476: OUTPUT«1␤»
18:45 kaare_ joined
FROGGS m: class Foo { has $.AutoCommit is rw = 1; has $.svchp is rw = die 'Param $!svchp is mandatory' }; say Foo.new( ).AutoCommit; 18:45
camelia rakudo-moar 425476: OUTPUT«Param $!svchp is mandatory␤ in method at /tmp/X4lfVA1IEP:1␤ in block at src/gen/m-CORE.setting:1039␤ in method BUILDALL at src/gen/m-CORE.setting:994␤ in method bless at src/gen/m-CORE.setting:983␤ in method new at src/gen/m-CORE.setting:9…»
abraxxa m: class Connection { has $!.svchp = ...; has $!errhp = ...; has $.AutoCommit is rw = 1; }; Connection.new( svchp = 'foo' );
camelia rakudo-moar 425476: OUTPUT«5===SORRY!5=== Error while compiling /tmp/YvHOyTR6pq␤Preceding context expects a term, but found infix = instead␤at /tmp/YvHOyTR6pq:1␤------> 3it is rw = 1; }; Connection.new( svchp =7⏏5 'foo' );␤»
abraxxa m: class Connection { has $!.svchp = ...; has $!errhp = ...; has $.AutoCommit is rw = 1; }; Connection.new( svchp => 'foo' );
camelia rakudo-moar 425476: OUTPUT«Unhandled exception: Stub code executed␤ at <unknown>:1 (/home/camelia/rakudo-inst-1/share/perl6/runtime/CORE.setting.moarvm:throw:4294967295)␤ from src/gen/m-CORE.setting:15857 (/home/camelia/rakudo-inst-1/share/perl6/runtime/CORE.setting.moarvm:s…»
FROGGS abraxxa: see my two examples
some prefer die(), some prefer ... 18:46
18:46 colomon left
abraxxa i prefer die but i wish there was a more concise syntax for exactly this case 18:47
which generates a useful exception message
vendethiel troo
abraxxa FROGGS: as those two shouldn't be rw does the = work without it too because I get the exception although the params are specified 18:49
flussence
.oO( «has $!svchp!;» ... maybe not )
FROGGS abraxxa: you need the 'is rw' me thinks 18:50
otherwise you are not allowed to set it at all 18:51
abraxxa there is a readonly trait
abraxxa wonders why it isn't called 'ro'
this looks like Perl 6 doesn't have a (good) way for immutable attributes 18:52
FROGGS because it might be too unimportant to spelled that short
to be*
abraxxa useless use of 'is readonly' on $!svchp in any at src/Perl6/World.nqp:2047
FROGGS yes, as it is the default
abraxxa so define them as $.svchp instead of $!svchp? 18:53
yes, that did it
18:55 yqt joined 18:56 kjs_ left 18:59 colomon joined 19:01 coffee` left
abraxxa moritz: did you use submethod BUILD out of personal preference over the syntax described by FROGGS? github.com/perl6/DBIish/commit/b9d...5194f36R93 19:02
timotimo good news, i still have thinkpad protection and on-site service until the end of 2016
abraxxa Lenovo++
timotimo well, i paid quite a bit extra to have that 19:03
but yeah, it's nice to have the option
moritz abraxxa: over which syntax?
timotimo what i'm even happier about is how easy thinkpads are to self-service
abraxxa moritz: i'd replace submethod BUILD(:$!svchp!, :$!errhp!, :$!AutoCommit = 1) { } with has $.svchp = die 'Param svchp is mandatory'; has $.errhp = die 'Param errhp is mandatory'; has $.AutoCommit is rw = 1; 19:05
moritz abraxxa: you may do that, but in DBIish, I don't want the attributes to be public 19:06
I mean, I don't have enough experience with this stuff to commit to a public API at this point
abraxxa moritz: even if they are read-only?
19:06 kjs_ joined
moritz abraxxa: yes. API is API. 19:07
abraxxa moritz: absolutely. it's just that there is no nice syntax is Perl 6 for that
19:07 kjs_ left
moritz abraxxa: for what? 19:07
abraxxa ok, that's an argument, submethod BUILD then
private attr that is mandatory at construction time 19:08
hoelzro mj41: btw, I filed a PR for the Docker image; still waiting on word from the docker devs
moritz abraxxa: you can always make the named argument in BUILD mandatory
abraxxa moritz: sure but default values defined on the attr definition get lost
see scrollback 19:09
you need to specify them for the submethod BUILD param instead
moritz yes 19:10
I can live with that
it's not quite as pretty, I know
abraxxa that's a pitfall as I've just shown
what if a class specifies a default value for an attr and has no submethod BUILD and someone subclasses it and specifies one? 19:11
m: class Foo { has $!svchp; has $.AutoCommit is rw = 1; submethod BUILD( :$!svchp ) { } } Foo.new(); say Foo.AutoCommit; 19:12
camelia rakudo-moar 425476: OUTPUT«5===SORRY!5=== Error while compiling /tmp/7lP_ebfTYU␤Strange text after block (missing semicolon or comma?)␤at /tmp/7lP_ebfTYU:1␤------> 3w = 1; submethod BUILD( :$!svchp ) { } }7⏏5 Foo.new(); say Foo.AutoCommit;␤ expecting any of:␤ …»
abraxxa m: class Foo { has $!svchp; has $.AutoCommit is rw = 1; submethod BUILD( :$!svchp ) { } }; Foo.new(); say Foo.AutoCommit;
camelia rakudo-moar 425476: OUTPUT«Cannot look up attributes in a type object␤ in method AutoCommit at src/gen/m-CORE.setting:3983␤ in block <unit> at /tmp/_E6QzBroJl:1␤␤»
masak so, I just removed github.com/rakudo/rakudo/blob/nom/...s.nqp#L460 locally; RT #124191 is still present afterwards :/
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=124191
masak so it's something deeper, then. 19:13
dalek kudo/nom: ee7a375 | jnthn++ | src/vm/moar/Perl6/Ops.nqp:
Remove dupe register free; masak++.
arnsholt I'm with moritz on required nameds to BUILD versus die() for the default value
masak oh, jnthn++ beat me to it.
was still spectesting.
arnsholt In particular, it exposes more information via introspection than the die() default value
masak jnthn: RT #124191 is still at large, even after that remove.
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=124191
masak jnthn: so there is *something* wrong with that code.
abraxxa m: class Foo { has $!svchp; has $.AutoCommit is rw = 1; submethod BUILD( :$!svchp ) { } }; Foo.new(); say Foo.AutoCommit;
camelia rakudo-moar 425476: OUTPUT«Cannot look up attributes in a type object␤ in method AutoCommit at src/gen/m-CORE.setting:3983␤ in block <unit> at /tmp/SAvXZpTgrE:1␤␤»
masak jnthn: if you can't see it immediately, I'd recommend rolling back the original commit that created that op. 19:14
jnthn masak: That may fix *something*, but given the generated code works before dynamic optimization kicks in, it's fairly clear we're looking for a problem there.
masak: Nope, wrong approach.
masak if you say so.
abraxxa arnsholt: agreed as I also don't want to type the same error message over and over
jnthn masak: It's pretty obvious from what we know that the commit in question generates valid code.
masak we have a bug in the nom branch right now, and a way to make it go away until we learn what's going on. 19:15
jnthn: ah, so you're saying we should look at how it's optimized/speshed instead?
dalek kudo/moreinput: 7110fdb | peschwa++ | src/Perl6/Grammar.nqp:
NQPMu, not Nil. Also check if we actually want more input.
masak I agree with that, I just don't see why we wouldn't remove the source of the bug in the meantime. creating a more stable nom branch. 19:16
jnthn masak: Yes; presumably setting MVM_SPESH_DISABLE=1 makes it go away
abraxxa m: class Foo { has $!svchp; has $.AutoCommit is rw = 1; submethod BUILD( :$!svchp ) { } }; Foo.new();
camelia ( no output )
masak very probably.
masak tries
abraxxa m: class Foo { has $!svchp; has $.AutoCommit is rw = 1; submethod BUILD( :$!svchp ) { } }; Foo.new(); say Foo.AutoCommit();
camelia rakudo-moar 425476: OUTPUT«Cannot look up attributes in a type object␤ in method AutoCommit at src/gen/m-CORE.setting:3983␤ in block <unit> at /tmp/Lx28sBppz3:1␤␤»
jnthn masak: Because it's not like this just appeared; it was possible to hit it for O(months)
masak jnthn: yes, setting MVM_SPESH_DISABLE=1 makes it go away.
abraxxa m: class Foo { has $!svchp; has $.AutoCommit is rw = 1; submethod BUILD( :$!svchp ) { } }; my $foo = Foo.new(); say $foo.AutoCommit; 19:17
camelia rakudo-moar 425476: OUTPUT«1␤»
abraxxa m: class Foo { has $!svchp; has $.AutoCommit is rw = 1; submethod BUILD( :$!svchp ) { } }; my $foo = Foo.new( AutoCommit => 0); say $foo.AutoCommit;
camelia rakudo-moar 425476: OUTPUT«1␤»
jnthn masak: Right, so that narrows down where we're looking quite significantly.
abraxxa m: class Foo { has $!svchp; has $.AutoCommit is rw = 1; submethod BUILD( :$!svchp, :$.AutoCommit ) { } }; my $foo = Foo.new( AutoCommit => 0); say $foo.AutoCommit;
camelia rakudo-moar 425476: OUTPUT«0␤»
moritz m: class Foo { has $!svchp; has $.AutoCommit is rw; submethod BUILD( :$svchp, :$AutoCommit = 1 ) { }; say Foo.new.AutoCommit
camelia rakudo-moar 425476: OUTPUT«5===SORRY!5=== Error while compiling /tmp/vIigUb64DN␤Unable to parse expression in block; couldn't find final '}' ␤at /tmp/vIigUb64DN:1␤------> 3Commit = 1 ) { }; say Foo.new.AutoCommit7⏏5<EOL>␤ expecting any of:␤ postfix␤ …»
masak jnthn: not gonna argue with you about reverting the commit -- if you prefer that it stay, it stays. but how do we find the optimize/spesh bug?
moritz m: class Foo { has $!svchp; has $.AutoCommit is rw; submethod BUILD( :$!svchp, :!$AutoCommit = 1 ) { }; say Foo.new.AutoCommit
camelia rakudo-moar 425476: OUTPUT«5===SORRY!5=== Error while compiling /tmp/7ZT1LFra_h␤Malformed parameter␤at /tmp/7ZT1LFra_h:1␤------> 3mmit is rw; submethod BUILD( :$!svchp, :7⏏5!$AutoCommit = 1 ) { }; say Foo.new.Auto␤ expecting any of:␤ formal parameter␤…»
abraxxa m: class Foo { has $!svchp; has $.AutoCommit is rw = 1; submethod BUILD( :$!svchp, :$.AutoCommit ) { } }; my $foo = Foo.new( AutoCommit => 0); say $foo.AutoCommit; 19:18
camelia rakudo-moar 425476: OUTPUT«0␤»
abraxxa m: class Foo { has $!svchp; has $.AutoCommit is rw = 1; submethod BUILD( :$!svchp, :$.AutoCommit ) { } }; my $foo = Foo.new(); say $foo.AutoCommit;
camelia rakudo-moar 425476: OUTPUT«(Any)␤»
jnthn masak: Well, looking at the spesh log for one
abraxxa moritz: ^^ that's the suboptimal case
jnthn masak: Though we might try disabling other bits to narrow it further
19:18 Foxcool left
moritz abraxxa: yes. Just avoid it. 19:18
abraxxa moritz: can we add a warning for it?
19:18 kjs_ joined
moritz abraxxa: can you? 19:19
19:19 kjs_ left
masak jnthn: I don't have the skills to do that at present. hoping that someone else finds the tuits to do that. 19:19
19:19 Foxcool joined
abraxxa moritz: maybe if you point me at the right file(s) 19:19
jnthn masak: There's more env vars 19:20
masak: If you moar --help they're there
masak: Seems that they do help too...
moritz abraxxa: I guess the right place would be in method compose of ClassHOW
jnthn masak: Setting MVM_SPESH_INLINE_DISABLE=1 also makes it go away
moritz abraxxa: src/Perl6/Metamodel/ClassHOW.nqp
19:21 travis-ci joined
travis-ci Rakudo build passed. jnthn 'Remove dupe register free; masak++.' 19:21
travis-ci.org/rakudo/rakudo/builds/56323164 github.com/rakudo/rakudo/compare/d...7a3752d9d2
19:21 travis-ci left
abraxxa moritz: thanks 19:21
jnthn masak: Meaning that we can blame it on inlining busting...something. 19:22
masak: Further, you don't need a custom exception type for it 19:23
masak wow. 19:31
so I could've golfed it further?
fancy that :)
xfix Bitwise operators are so confusing. The one in Perl 5 is like opposite of one in Perl 6.
abraxxa moritz: maybe in compose_attributes?
xfix Perl 5.22 introduces numeric bitwise operators like &. - when in Perl 6 it is +&.
jnthn masak: Yeah, Exception.new 19:32
xfix (I wonder if there was a reason to not use Perl 6 operators, or if they just weren't considered)
masak m: for ^207 { die Exception.new(); CATCH { default {} } } 19:33
camelia ( no output )
masak m: for ^208 { die Exception.new(); CATCH { default {} } }
camelia rakudo-moar d24f30: OUTPUT«␤ in block at /tmp/ZLP2WH1C3n:1␤␤»
masak jnthn++
xfix: surely numeric bitwise operators existed already before 5.22, though? spelled just `&`, etc. 19:34
xfix I mean, metacpan.org/pod/release/XSAWYERX/...-operators
Although, looking at it, the reason may have been ~ operator.
masak oh, the `&.` treats it as a string.
xfix &. treats it as a number, to confuse things further 19:35
masak yeah, that's consistent from a p5 perspective, where the `.` operator means what it does.
xfix: no, you're reading it wrong.
xfix Oh.
masak xfix: it's `&` that treats it consistently as a number.
xfix Interesting.
abraxxa moritz: are the OO internals documented somewhere?
masak #123466
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=123466
xfix Finally Perl 5 has consistent bitwise operators. 19:36
masak xfix: interesting discussion about it here: rt.perl.org/Ticket/Display.html?id=123466
xfix I complained before about $a + 1 making $a numeric, even if it shouldn't logically do anything. 19:37
moritz abraxxa: doc.perl6.org/language/mop#Structur...ect_system might be a good entry point
abraxxa moritz: i was just reading through that ;) 19:38
masak xfix: that's a very deep Perl (5 and 6) feature.
xfix: oh, you mean changing the $a itself.
xfix It still exists in Perl 6?
masak xfix: yeah, that's just p5 being weird.
no, I misunderstood you. 19:39
thought you were talking about the casting as such.
abraxxa moritz: so I'd need to check if there is a submethod BUILD, if yes inspect it's params and check each if there is an attr with the same name that has a default value?
19:39 zakharyas joined
xfix codepad.org/8R31X28Y 19:39
masak xfix: I was reading through that RT ticket discussion seeing if they had ever considered `.&`, which would be the more consistent one with Perl 6's `~&`. seems not.
abraxxa xfix: you'd normally do + 0 for numification in p5 ;)
flussence masak++ jnthn++ # panda install works again, didn't an hour ago 19:40
xfix I know, but this is not what I talk about.
jnthn flussence: FROGGS++ is largely/most/maybe entirely to thank for that, I think :)
masak flussence: I didn't have anything to do with that, I think :)
flussence well, FROGGS++ too :)
jnthn flussence: masak++ and I have tracking a diffrent bug
xfix I mean, if you do $fun + 1 that isn't used for anything, $fun changes internally into numeric variable.
There is no loss of value, but bitwise operators and ++ can get confused. 19:41
jnthn masak: I've a feeling it is a much more general issue.
xfix codepad.org/v7wLqHOy 19:42
moritz abraxxa: something like that, yes
masak adds the conversationg so far to the ticket 19:43
abraxxa moritz: at which point in method compose should that happen? 19:44
moritz: i'm not sure if before or after compose_attributes
psch FROGGS: i have gdb'd, but i have no idea how to patch MVM_string_concatenate not to SEGV there 19:48
i suppose that means "golf and ticket to moarvm"
mj41 hoelzro: I saw the PR. hoelzro++
abraxxa what does the ^ mean in say A.^methods(:all); ? 19:49
moritz abraxxa: it means A.HOW.methods(A, :all) 19:50
vendethiel mop-y
b2gills xfix: actually it makes it so that $a in `$a + 0` *also* contains a numeric value if it was a string.
abraxxa moritz: similiar to what i guessed, thanks.
psch fwiw, nqp-m -e'nqp::say(nqp::readlineintfh(nqp::getstdin, "> "))' and hitting ^D is what i golfed it to
xfix When it logically shouldn't do anything (implementation details aside). 19:51
abraxxa moritz: so inside HOW self.methods(:local); should be sufficient?
b2gills logically it shouldn't have to do the conversion more than once
abraxxa why do i get an error when I add say .name for self.methods(:local); to ClassHOW.nqp on make install? does nqp not have say? 19:52
i also tried warn without success 19:53
jnthn abraxxa: nqp doesn't have listops, so it has to be say(...)
masak: Think I've got it narrowed down to a bad interaction between inlining and exception handler search. 19:54
abraxxa jnthn: thanks!
psch jnthn: does the NULL handling of MVM_string_decode also belong to your NFG work? because afaict that's what the readlineintfh SEGV comes down to 19:55
vendethiel "Total number of missing videos where recording did not succeed, sorry: 142", awww, fosdem :(
masak jnthn: cool. 19:56
abraxxa jnthn: should that me ok in NQP? say(self.methods(:local)); 19:57
because I get Too few positionals passed; expected 2 arguments but got 1
jnthn abraxxa: Well, what the error says: you need to pass another positional arg to .methods 19:58
abraxxa: Of note, the type object, probably available in $obj
abraxxa: But the other thing is that arrays don't stringify interestingly in NQP
psch: No, sounds orthogonal to NFG. What's up? 19:59
psch jnthn: SIGSEGV when stringifying EOF from readlineintfh
abraxxa jnthn: i thought self becomes $obj
20:00 colomon left
jnthn abraxxa: When you're inside a meta-object, self is $obj.HOW 20:00
psch > nqp-m -e'nqp::say(nqp::readlineintfh(nqp::getstdin, "> "))' and hitting ^D is what i golfed it to
abraxxa hates stack traces! they completely clutter the screen and are unreadable most of the time anyways 20:01
psch eh, might move that to #moarvm, might be about time i join :)
jnthn psch: What are we passing to the decode function at that point?
abraxxa jnthn: is submethod BUILD something special or should it be contained in the regular MethodContainer? 20:02
jnthn abraxxa: Just a normal submethod 20:03
abraxxa jnthn: i get 'cannot stringify this' for say(self.methods($obj, :local)); although type Method does Str 20:04
jnthn Sure, but self.methods returns an NQPArray
Which doesn't know how to stringify
abraxxa: What're you aiming to do, by the way? 20:05
abraxxa jnthn: doc.perl6.org/routine/methods#role_...dContainer doesn't say so
jnthn abraxxa: That's different
abraxxa jnthn: adding a warning for the case I described earlier when you have an attribute with a default value and also a submethod BUILD which makes the default value of the attr a no-op 20:06
20:06 _edwin joined, darutoko left
jnthn abraxxa: The NQP array is coerced to a Perl 6 array 20:06
abraxxa: When it's returned to Perl 6 code
20:06 Rounin left
abraxxa are there docs for NQP? 20:07
jnthn Well, there's the Rakudo/NQP internals course
20:07 mj41 left
jnthn I'm...dubious about that warning. Or rather, wondering exactly where it belongs. 20:07
20:07 Pleiades` left
abraxxa jnthn: paste.scsys.co.uk/470653 20:08
20:08 virtualsue left 20:09 virtualsue joined
jnthn abraxxa: I told you, you can't stringify and array in NQP. You'll have to loop over the elements. 20:09
*an
20:09 zakharyas left
jnthn I'm still a bit unsure whether putting said warning in the MOP is the way to go, though. 20:09
If you want to grab the curent class's BUILD then you'd be better calling submethod_table which gives you a hash you can look up BUILD in by name. 20:11
I guess at that point you end up having to introspect the signature and parameters of the method. 20:12
abraxxa jnthn: does that only give 'local' methods and not those of parent classes or composed roles?
jnthn abraxxa: You'll get those of composed roles
Not parent classes.
abraxxa works ;) 20:15
jnthn: should I use find_method instead? 20:16
jnthn abraxxa: No, because that will search parent classes, etc. 20:18
And probably is overkill.
You care about BUILD in the current class I guess
abraxxa ok 20:19
20:21 bjz left
abraxxa jnthn: what's wrong with that? %meths<BUILD>.signature.params 20:22
moritz you want submethod_table, I think
jnthn Well, I guess that's where he got %meths from
I don't know what's wrong with it
Except if BUILD doesn't exist in the class 20:23
So that'd need to be wrapped up in an nqp::existskey(%meths, 'BUILD')
uh, wrapped up in an 'if' conditioned on...
abraxxa jnthn: i have if nqp::existskey(%meths, 'BUILD') { before that 20:25
the error message is Cannot find method 'params'
doc.perl6.org/type/Method says there is a method 'signature' which returns the Signature object which according to doc.perl6.org/type/Signature#method_params should have params 20:26
ugexe did rakudo/moar get significantly faster in the last week? things seem to be building quicker 20:28
20:29 grondilu left
FROGGS ugexe: lazy deserialization was turned on again 20:31
20:32 kaare_ left
eli-se awesome! 20:34
20:37 xfix left 20:45 brrt joined
abraxxa jnthn: i can't find the class that signature returns, giving up for today 20:51
jnthn abraxxa: OK, I'm not sure what's going on there either, I'm afraid... 20:52
abraxxa FROGGS: i'll continue when 'is rw' support for NativeCall has landed 20:54
at least I know now what's going on 20:55
eli-se jnthn: your talks are good.
abraxxa good night! 20:58
20:59 abraxxa left
jnthn eli-se: :) 21:07
jnthn has fun doing them
21:09 zby_home_ left 21:10 kjs_ joined
eli-se good! 21:14
21:14 eli-se left 21:16 sftp_ joined 21:17 kjs_ left 21:18 sftp left, sftp_ is now known as sftp 21:19 eli-se joined
psch & 21:21
rudi_s Does perl6 support poll/select/epoll to handle many simultaneous network connections? 21:29
masak 'night, #perl6 21:30
21:31 FROGGS left 21:32 _edwin left 21:34 kjs_ joined
eli-se rudi_s: I hope it's a VM implementation detail. But there doesn't appear to be such a thing on doc.perl6.org 21:35
21:38 kjs_ left
rudi_s eli-se: Hm. Too bad. - Just checked rakudo.org and it seems both threads and non-blocking I/O are still work in progress. 21:40
I guess I'll have to wait a bit longer until I can use perl6.
timotimo rudi_s: we do have async I/O with sockets 21:41
but there's instabilities here and there
i stumbled over some not so nice things yesterday when i was working with HTTP::Server::Async 21:42
our async i/o is based on libuv, but currently we're not making full use of the ability to sleep 21:43
rudi_s timotimo: Could you give me some pointers how to use sockets with async I/O? Basically all I need is to get called when data is available on a socket. 21:45
timotimo sure, you'd build a IO::Socket::Async, connect that and then "tap" its bytes_supply or its chars_supply 21:46
names could slightly vary; i'm not touching sockets myself, just using them through HTTP::Server::Async
21:46 coffee` joined 21:47 rindolf left
rudi_s timotimo: Thanks. How do I wait until data is available? 21:48
timotimo you can coerce a Supply into a Channel or a List
you can .receive on a Channel to block or .poll to check 21:49
i'm not sure how well blocking on a regular socket in a start { ... } block works; it should work well
annoyingly, MoarVM will busy-wait rather than infinite-timeout on the thread that handles event-loopy things 21:52
rudi_s timotimo: How can I coerce a supply to a channel (pointer to doc is fine, still new to perl6). 21:55
Hm, that doesn't sound good.
timotimo just .Channel on it
i think it'll be quite simple to fix; just need to figure out a design that doesn't suck :)
rudi_s Thanks. Can I get a list of all available functions of an object? 21:56
timotimo the reason why it's busy-waiting is that it needs to regularly check if other threads want to start a GC run
sure, say $foobar.^methods>>.name
21:57 Vlavv_ left, larion left
timotimo ideally, the event-loop thread would wait for a signal from the GC and sleep until something happens or that signal gets triggered 21:58
for now, the event loop thread will max out a cpu; locally i just put a usleep(50) into the idle handler and the cpu usage has gone down to almost 0
rudi_s timotimo: Thanks. Where can I find doc about stuff like ^methods? - What does >>.name do?
timotimo >>.name is the same as .map({ $_.name }) 21:59
almost the same
21:59 larion joined
timotimo "hyper operator"; the ^methods and stuff would be in the "meta-object protocol" language doc, hold on 21:59
doc.perl6.org/language/mop
21:59 nbrown joined
timotimo hm, actually 22:00
that's not that helpful for that, it seems
doc.perl6.org/language/classtut#Introspection
rudi_s timotimo: Thank you. 22:02
22:02 davido_ left
timotimo you're welcome; always open for questions :) 22:02
(but right now i'm a bit distracted and it seems like most of the euro-people are AFK and/or asleep) 22:03
22:03 davido_ joined 22:04 larion left, larion joined
timotimo the async i/o stuff and multithreading stuff isn't battle-tested and there are known (but not necessarily properly located and identified) weak points where things may go explodey every now and then ;( 22:08
22:09 Vlavv_ joined 22:10 brrt left 22:11 prime left, larion left 22:12 spider-mario left 22:15 prime joined, prime left, prime joined 22:17 lichtkind left 22:19 khisanth_ joined 22:20 prime left
eli-se Is there a bottom type? 22:21
timotimo we have Mu, from which everything derives
RabidGravy has anyone made anything over Supply that's sugar to make something like the Node.js EventEmitter? It's quite obvious so I'm be surprised if not
22:21 khisanth__ left
timotimo what does EventEmitter do? 22:22
eli-se timotimo: that's the top type, not the bottom type.
timotimo oops
eli-se bottom derives from everything and has no values.
it's useful in certain covariant settings (I don't know whether roles support covariance) and as a return type for subroutines that never return 22:23
RabidGravy f.on('thing", function () {}); ....... f.emit("thing", { });
22:24 prime joined, prime left, prime joined
timotimo that seems exactly like giving f a Supply as an attribute named "thing" and tapping it to run that function 22:24
RabidGravy like I say obvious :) 22:25
with a sugar over Supply.grep on the "subscription" 22:26
22:26 colomon joined
RabidGravy actually yeah, bang on a hash of supplies in the object. Duh. 22:28
eli-se But perhaps, with Perl 6' powerful object model, the bottom type can be implemented. :) 22:32
22:34 RabidGravy left 22:36 colomon left, colomon joined 22:40 davido_ left 22:42 davido_ joined 22:44 virtualsue_ joined, virtualsue left, virtualsue_ is now known as virtualsue
eli-se byebye! 22:56
22:56 eli-se left 22:58 rurban_ left 22:59 eiro left
raydiak wonders if "method emit(Supply:D: msg)" could/should use "|msg" instead 23:00
23:01 colomon left, colomon joined
raydiak also wonders if failed dispatch to a tap should be silently ignored so we could write e.g. $s.tap: -> "event" { ... } as another way to do $s.grep("event").tap: -> { ... }; 23:04
23:05 eiro joined
dalek kudo-star-daily: 4893fee | coke++ | log/ (9 files):
today (automated commit)
23:06
rl6-roast-data: 505e810 | coke++ | / (9 files):
today (automated commit)
23:07
23:08 silug joined 23:10 telex left 23:12 telex joined 23:18 silug left 23:25 silug joined
ugexe i cant get panda to submit test reports 23:41
hasnt been working for about 1.5 weeks
i already nuked my installs and reinstalled 23:42
23:48 larion joined 23:52 tinyblak joined 23:53 larion left