»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg camelia perl6: ... | irclog: irc.perl6.org | UTF-8 is our friend!
Set by sorear on 25 June 2013.
timotimo what. 00:18
using >>.ast is actually faster than .map(*.ast) in JSON::Tiny ... ?! 00:19
and it's also faster than .map({ $_.ast }) 00:20
wow.
00:21 rurban left 00:22 kurahaupo joined
timotimo perl6-m is nowadays starting up the repl's input prompt in 0.02s 00:22
that's pretty good
when you actually execute code, like "say 1", the time jumps up to 0.25s on my laptop and the memory usage balloons up to about 6x the size 00:24
Mouq timotimo: well >>.ast is autothreaded ;) 00:34
timotimo m) 00:35
Mouq m: for 500..1000 { { $_.Str }($_) }; say now - BEGIN now 00:38
camelia rakudo-moar e16766: OUTPUT«0.04111123␤»
Mouq m: for 500..1000 { { $_.Str }($_) }; say now - BEGIN now
camelia rakudo-moar e16766: OUTPUT«0.0387570␤»
Mouq m: for 500..1000 { $_.'Str'() }; say now - BEGIN now
camelia rakudo-moar e16766: OUTPUT«0.02135463␤» 00:39
Mouq m: for 500..1000 { $_.'Str'() }; say now - BEGIN now
camelia rakudo-moar e16766: OUTPUT«0.0404778␤»
Mouq m: for 500..10000 { { $_.Str }($_) }; say now - BEGIN now
camelia rakudo-moar e16766: OUTPUT«0.1061059␤»
Mouq m: for 500..10000 { $_.'Str'() }; say now - BEGIN now
camelia rakudo-moar e16766: OUTPUT«0.05337681␤»
Mouq m: for 500..10000 { $_.'Str'() }; say now - BEGIN now
camelia rakudo-moar e16766: OUTPUT«0.05296991␤»
Mouq ^^ That's why, I think
>>.meth is more like for ... { .'meth'() } and .map(*.meth) is more like for ... { (*.meth)($_) }, which is slower 00:40
(apparently)
Well, also, isn't .map lazy be default? 00:41
00:41 rurban joined
Mouq *by 00:41
00:46 zakharyas joined
timotimo oh, hm. 00:48
hadn't considered that
but at least .'meth'() sounds like it ought to be slower
[Coke] moritz: no, I followed the directions on the perl6.org readme, which leaves off the --make; I'll give it a shot. 00:49
timotimo i hope it'll lead you onto a path of productivity 00:51
01:07 zakharyas left 01:08 zakharyas joined 01:09 colomon joined
Mouq FROGGS: How do you use the nqp_to_perl6 branch of v5? 01:17
01:30 FROGGS_ joined, klapperl_ joined 01:31 ren1us joined 01:34 klapperl left, FROGGS left
ren1us is there a built in function/operator for getting the intersection of two lists? 01:35
01:35 zakharyas left
timotimo (&) should do 01:35
it will coerce both arguments to sets and give you a set back, though 01:36
ren1us i'm really not sure what to make of the result of & 01:37
m: 0,1,2 & 1,2,3
timotimo not &, (&)
camelia ( no output )
ren1us ah
timotimo if you need to keep the order, i'd suggest something like @list.grep(any(@otherlist))
ren1us m: say 0,1,2 (&) 1,2,3 # this still seems rather peculiar 01:38
camelia rakudo-moar e16766: OUTPUT«01set()23␤»
timotimo yes 01:39
it maskes a set from 2 and 1
and that's inside a list of 0, 1, *here*, 2, 3
m: say (0, 1, 2) (&) (1, 2, 3)
camelia rakudo-moar e16766: OUTPUT«set(1, 2)␤»
timotimo m: my @list = <foo bar baz quux>; my @otherlist = <bar quux potatoes>; say @list.grep(any(@otherlist)) 01:40
camelia rakudo-moar e16766: OUTPUT«bar quux␤»
ren1us that makes sense. it's weird that it showed up as 01set()23, since that looks like an empty set
timotimo it is an empty set 01:41
m: say (0,1,2 (&) 1,2,3).perl
camelia rakudo-moar e16766: OUTPUT«(0, 1, set(), 2, 3)␤»
timotimo it's just an operator precedence issue
ren1us ah
the list items need to be wrapped in something
that makes sense
timotimo it's not that it "needs to be wrapped in something", just that the , will bind looser than the (&) 01:42
01:43 ventica2 joined 01:44 ilbot3 left 01:45 ventica left 01:46 ilbot3 joined
ren1us yeah, but the wrapping is a workaround to adjust the order, so close enough 01:47
anyway, thanks :>
timotimo right
you're welcome :)
timotimo commutes
ren1us oh, right. timotimo++ 01:51
01:55 Mouq left 01:59 ren1us left 02:05 thou joined 02:09 Alina-malina left 02:11 thou left 02:13 BenGoldberg left 02:15 Alina-malina joined 02:16 rurban left 02:29 pecastro left, Alina-malina left 02:30 pecastro joined 02:35 Alina-malina joined 02:57 noganex_ joined 03:00 noganex left 03:03 ventica2 left 03:07 echoprinter left 03:13 xragnar_ joined, xragnar left, xragnar_ is now known as xragnar 03:29 thou joined 03:44 ventica2 joined 03:46 akaseki joined 03:49 kurahaupo left, aoseki left 04:30 xinming_ joined 04:34 xinming left
dalek kudo/nom: c270e91 | duff++ | src/Perl6/Actions.nqp:
Fix for RT #79160
05:00
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...l?id=79160
dalek ast: c2e9aa8 | duff++ | S12-subset/subtypes.t:
un-todo test for RT #79160
05:01
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...l?id=79160
05:04 dwarring left 05:14 gfldex joined 05:16 Akagi201 joined, Akagi201 left, Akagi201_ left 05:17 Akagi201_ joined
dalek kudo/nom: b86a152 | duff++ | src/core/Temporal.pm:
Get Date from Instant (RT #111356)
05:23
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=111356
05:23 Akagi201 joined 05:24 Akagi201 left, Akagi201_ left, Akagi201 joined 05:25 kaare_ joined 05:38 nbrown____ left 05:51 kurahaupo_ joined 06:17 iarna left 06:18 iarna joined 06:21 kurahaupo_ left 06:22 chenryn joined 06:29 dmol joined 06:31 Alina-malina left 06:42 khisanth_ joined 06:44 Khisanth left 06:50 iarna left 06:51 iarna joined 07:05 chenryn left
dalek rlito: c119825 | (Flavio S. Glock)++ | misc/alias.pl:
misc - add a parameter aliasing example
07:07
07:08 chenryn joined 07:09 FROGGS_ is now known as FROGGS
FROGGS .tell Mouq What do you mean by 'how'? <Mouq> FROGGS: How do you use the nqp_to_perl6 branch of v5? 07:10
yoleaux FROGGS: I'll pass your message to Mouq.
07:15 virtualsue joined 07:18 denis_boyun_ joined 07:34 darutoko joined 07:53 [Sno] joined 07:57 psch joined
FROGGS .tell Mouq In case you meant build instructions I updated the README.md 08:11
yoleaux FROGGS: I'll pass your message to Mouq.
08:12 chenryn left 08:15 anaeem1_ joined 08:24 lizmat_ joined 08:26 Rotwang joined 08:28 lizmat left
itz this has to be one to steal :> 08:33
github.com/Russell91/pythonpy
08:33 iarna left 08:37 brrt joined 08:38 lizmat_ left 08:45 chenryn joined 08:49 chenryn left 08:54 thou left 08:59 spider-mario joined 09:01 FROGGS[mobile] joined 09:15 Rotwang left 09:16 chenryn joined, chenryn left 09:17 chenryn joined 09:19 anaeem1_ left 09:21 chenryn left 09:22 anaeem1_ joined 09:33 kivutar joined 09:53 colomon left
masak good noon, #perl6 09:54
10:17 chenryn joined 10:22 chenryn left
FROGGS[mobile] o/ 10:23
10:44 brrt left 10:47 anaeem1_ left
psch hi #perl6 o/ 11:12
11:18 chenryn joined 11:23 chenryn left, brrt joined
psch unborked his pre-commit hook for roast. 11:27
testneeded RTs here i come! :p
...after building latest rakudo for all backends, that is
11:32 chenryn joined 11:36 denis_boyun_ left, denis_boyun_ joined 11:43 akaseki left, aoseki joined, kurahaupo_ joined 11:45 chenryn left 11:46 chenryn joined 11:50 chenryn left 11:59 anaeem1 joined 12:01 anaeem1 left 12:02 anaeem1__ joined 12:05 colomon joined 12:08 rurban joined 12:17 chenryn joined 12:20 kurahaupo_ left 12:21 chenryn left 12:28 BenGoldberg joined
dalek p: 02f47bf | jnthn++ | src/QAST/Block.nqp:
Give QAST::Block a code object property.

This will hold the code object associated with the code ref.
12:58
p: 435e62c | jnthn++ | src/vm/ (3 files):
Teach backends about QAST::Block.code_object.

This is just doing the simple, naive thing for now - generating the code we once would have. However, this will enable doing something smarter on some backends - Moar first.
carlin sergot: are you planning on adding a .post() method to HTTP::UserAgent? 13:02
dalek p: 17a5794 | jnthn++ | src/NQP/World.nqp:
Switch to using new code_object support.
13:06
kudo/nom: c8736ab | jnthn++ | / (2 files):
Bump NQP_REVISION; use new .code_object support.
13:07
13:16 brrt left 13:19 chenryn joined 13:22 pecastro left 13:23 sjn left, chenryn left, sjn joined
vendethiel oh what. 13:27
magic the gathering is turing-complete ???!!
13:29 kivutar left
tadzik :o 13:29
well, you could probably define every operation in terms of a different infinite combo available in mtg 13:30
13:32 pippo joined, BenGoldberg left
pippo o/ #perl6 13:33
vendethiel timotimo: boingboing.net/2012/09/12/magic-the...ering.html 13:34
timotimo: actually, beza1e1.tuxen.de/articles/accidenta...plete.html - more global 13:35
pippo Anybody has time to explain me what does sink context mean? 13:36
vendethiel pippo: it means that everything will be thrown away 13:37
(the result is unused)
pippo vendethiel: Thank you! 13:38
13:38 aghbas joined 13:39 aghbas left 13:40 pecastro joined
psch RT #109800 is not horribly misplaced in S06-operator-overloading/sub.t, right? 13:41
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=109800
psch .oO( "forgiveness before permission" might count for "this test should go somewhere else..." )
on one hand the name sub.t seems to indicate it's for using sub {}, but on the other it has binding to e.g. my &infix:<plus> 13:43
dalek ast: a9171d7 | (Pepe Schwarz)++ | S06-operator-overloading/sub.t:
Added test for RT #109800.
13:44
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=109800
pippo o/
13:44 pippo left
psch a few testneeded RTs depend on github.com/perl6/nqp/pull/173 and github.com/rakudo/rakudo/pull/301, the list on the rakudo PR is not exhaustive. i'll add those fudged i guess 13:45
13:50 denis_boyun_ left
dalek p: ee50e95 | (Pepe Schwarz)++ | src/QRegex/P6Regex/Grammar.nqp:
Convert panic() calls to more specific, overrideable methods.
13:53
p: 64be958 | jonathan++ | src/QRegex/P6Regex/Grammar.nqp:
Merge pull request #173 from peschwa/panics_to_typed

Convert panic() calls to more specific, overrideable methods.
kudo/nom: d78a1c0 | (Pepe Schwarz)++ | src/ (2 files):
Add a few typed exceptions and override P6Regex::Grammar methods to throw them.

This lets us test sensibly for RT #77380, RT #77522 and similar.
13:57
kudo/nom: 19a8e34 | jonathan++ | src/ (2 files):
Merge pull request #301 from peschwa/panics_to_typeds

Add a few typed exceptions and override P6Regex::Grammar methods to throw them.
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...l?id=77380
psch good thing i'm so timid about pushing :) jnthn++ 14:01
14:02 eMBee left
FROGGS jnthn: I need to follow the code_object changes? 14:04
jnthn FROGGS: Don't need to 14:05
FROGGS: May want to. 14:06
FROGGS: The previous way will continue to work.
14:06 chenryn joined, khisanth_ is now known as Khisanth 14:09 eMBee joined
timotimo the next memory conservation win we're going to get might end up being pretty big :D 14:13
vendethiel
.oO( big++ )
timotimo and startup time improvement etc etc 14:14
14:17 brrt joined 14:19 kaare_ left, pippo joined 14:31 nbrown____ joined 14:36 groky left 14:38 Bucciarati left, avar left 14:40 avar joined 14:41 groky joined, anaeem1__ left 14:42 ggoebel1111113 joined 14:43 guru joined, guru is now known as Guest35458 14:44 anaeem1 joined 14:45 groky left
dalek kudo/nom: 5d5ec1e | jnthn++ | tools/build/NQP_REVISION:
Bump NQP_REVISION for regex error improvements.

Should allow tests to be safely unfudged and pass for everyone who is building against NQP_REVISION.
14:46
14:46 ggoebel1111112 left
14:46 anaeem1 left 14:47 Guest35458 is now known as ajr_
dalek p: c4db3ef | jnthn++ | / (2 files):
Adopt new MoarVM code object handling.

Includes a MOAR_REVISION bump.
14:47
15:00 pippo left 15:07 pippo joined
psch apparently those two PRs were somewhat stale, the only one of the Exceptions that still works is X::Syntax::Regex::Unterminated, and it gets grouped with a X::Comp::Adhoc 15:07
the grouping might actually make sense, the Adhoc is "Unable to parse Regex; couldn't find final '/'" 15:09
15:13 PZt left 15:16 denis_boyun_ joined 15:21 brrt left
psch eh, no, i just again and again forget how to properly set up CATCH blocks for compile time Exceptions... 15:24
15:24 ajr_ left 15:25 guru joined, thou joined 15:26 guru is now known as Guest52917, Guest52917 is now known as ajr_ 15:30 pippo left 15:31 kaare_ joined 15:47 denis_boyun_ left 15:51 pippo joined
psch m: /a ** 1 ..2/ # this does confuse me. 15:53
camelia rakudo-moar 5d5ec1: OUTPUT«===SORRY!===␤Cannot find method 'ast'␤»
masak submits rakudobug
15:53 rakudobug joined
rakudobug submits masak 15:53
masak it's mutual <3 15:54
psch the curious bit is that P6Regex::Grammar has <.integer> '..' <.throw_bare_spaces_in_range>
which is the patch jnthn merged a bit
15:54 rakudobug left
vendethiel hahaha 15:54
psch but apparently it matches differently and gets through to the corresponding action in Perl 6's Actions.nqp
carlin uh oh, the rakudobugs have become sentient
psch where there's nothing in $<min>
because it shouldn't have matched or somesuch...?
vendethiel if "language composition" is really the future, then perl 6 might be able to get some chunk of the cake ;-)
(did they read about perl 6 slangs ?) 15:55
masak vendethiel: that matches my thinking.
psch unfortunately i get a segfault with --target=parse for that case on moar, which makes it hard to gain some insight
vendethiel masak: well, it certainly is an opportunity to get rid of string programming :-)
I like the idea of slangs because that means we can TOTALLY do away with SQL injections, XSS, etc. 15:56
(or, well, do away with it in 99% of the cases)
masak *nod*
one slang per child.
vendethiel and the perl 6 slang to rule them all ;) ? 15:57
perl 6 is merely a slang of perl 6, after all
psch supersede $~MAIN { } # rien ne va plus
masak vendethiel: that's a good point.
vendethiel psch: il y en a qui ont essayé, ils ont eu des problèmes ;-) 15:58
psch vendethiel: to be honest, that's about the extend of my french
vendethiel psch: haha - I guessed so, don't worry
masak: it does raise another point, though: we need something to get a bit terser slang-using. 15:59
we don't want to `{use SQL; SELECT * FROM a}.map(...)`; I don't think.
We could see `SQL{}`, obviously
psch that's module space though, isn't it? exporting a block-taking sub that uses the module slang for the block 16:00
16:00 iarna joined
masak vendethiel: I think overloading circumfix:<` `> as switch-into-slang in a given scope would work fine. 16:00
vendethiel: or, you know, something like SQL"..."
I dunno.
syntax will come for these things. 16:01
vendethiel masak: that can't work. you can't decide which slang with just ``
also, SQL"" (scala/c++-like) doesn't work because it doesn't really do away with string programming
masak I don't mean it should actually be a string.
vendethiel I know, but you're implying it with ""
masak so go with SQL[ ... ] or something. 16:02
my point is I'm not too worried about the specifics of syntax.
vendethiel no, but I'm very against using string-like anything.
masak nailing how everything will interop is the interesting/difficult challenge.
16:04 Bucciarati joined
vendethiel it does seem interesting, though. I see myself doing stuff like that in 5 years 16:06
well, I already kinda do with haskell/hamlet and stuff like that
16:10 chenryn left
masak I see much of good module building as (a) finding the right algebra/model and building the corresponding functions for it, followed by (b) exposing this through an easy-to-grok grammar. 16:10
16:11 echoprinter joined
masak sometimes the (b) part only needs an "internal API" or something. sometimes, though, it would be greatly helped by some grammar tweak or other. sometimes, by an entirely different grammar. 16:11
16:20 brrt joined 16:21 brrt left 16:22 flussence left 16:25 flussence joined
FROGGS ahh, the SQL slang pops up again :o) 16:25
16:30 denis_boyun_ joined
vendethiel FROGGS: It's 2014, and I refuse to write SQL strings ;-) 16:32
FROGGS I don't
vendethiel YMMV
FROGGS but I'd like to see compile time errors for typo's in these 16:33
timotimo there's people now who say "don't use ORM, write your sql yourself!"
vendethiel well, they have reasons
geekosaur would very much prefer writing some good sql instead of relying on the horrors created by "smart" packages with the intelligence of a 2yo 16:34
timotimo haha
if we had a package that is anything like SQLAlchemy, that would be swee. 16:35
vendethiel that string was in the programming sense. 16:39
I'm fine with handcrafting SQL queries. Not fine with them being strings
timotimo since we have compile-time code running and macros, we could surely make a nice DSL for sql query construction that makes objects of different types give you the semantics you want or something 16:40
vendethiel sure :)
that's the whole point 16:43
persistent (haskell) is pretty nice in that area
16:43 ajr_ left
vendethiel well, yesod in a whole is a great piece of techonology 16:44
16:44 guru joined, guru is now known as ajr_
psch not sure what's more sensible here wrt the latest ticket that i saw masak++ create 16:45
16:45 nbrown____ left
psch turns out the error comes from the branch that throws the exception not capturing the integer 16:46
i.e. does it make more sense to assume that the grammar ontop of P6Regex::Grammar checks for $<min> in the action for sym<**> or should the token capture even if it's throwing an exception
or panicking rather, because that's the nqp grammar does 16:47
16:48 dalek left
psch i.e. capture here github.com/perl6/nqp/blob/master/s...r.nqp#L240 16:48
or check for definedness of $<min> here github.com/rakudo/rakudo/blob/nom/....nqp#L7290
16:49 dalek joined, ChanServ sets mode: +v dalek 16:54 nbrown____ joined
psch i have decided that the second of those options is out, because if anything it should be in P6Regex::Actions... :) 16:55
and because that'd be two places to check for definedness capturing min even if we're panicking seems more sensible 16:56
16:57 telex left 16:58 telex joined 16:59 nbrown____ left
psch std: /a ** 1 ..2/ 17:04
camelia std 0f2049c: OUTPUT«===SORRY!===␤Spaces not allowed in bare range at /tmp/kN92GTOwA1 line 1:␤------> /a ** 1 ..⏏2/␤Parse failed␤FAILED 00:01 122m␤»
psch std: /a ** 1.. 2/
camelia std 0f2049c: OUTPUT«===SORRY!===␤Malformed range at /tmp/GiQ9V62RP0 line 1:␤------> /a ** 1..⏏ 2/␤ expecting quantifier␤Parse failed␤FAILED 00:01 122m␤»
psch this is also kind of weird, i think
the eject after .. in the first case bothers me very slightly
i guess the different types are due to LTM? 17:05
or rather, different messages
masak the ⏏ being where it is in both cases makes some sense to me. 17:10
it is where the error was discovered.
in the first case, after discovering that it was a range (and thus the spaces earlier are wrong)
in the second case, after not meeting the expectations of what comes after a range (which happens to be spaces, which we're not eating today) 17:11
a very small case could be made for having the same error message in both cases, I guess. "Spaces not allowed in bare range" being the best one.
17:12 denis_boyun_ left, denis_boyun joined
psch eject as "where an error was discovered" seems to be the better understanding. i was operating with "where it breaks", which breaks in cases like these 17:13
unifying the message makes sense to me, as it seems a bit more user friendly - the problem is the same in both cases, the distinction is parser guts
17:23 FROGGS[mobile] left 17:24 nbrown____ joined 17:31 nbrown____ left 17:37 colomon left 18:04 xenoterracide joined 18:12 pmurias joined
pmurias masak: re quoting sql one problem is that our quasiquoting syntax is a bit heavyweight, quasi:lang(SQL) {select * from foobar} 18:17
masak so... don't do it that way ;) 18:18
qq string interpolation employs a kind of quasi quoting, and it doesn't need any heavyweight syntax. 18:19
18:22 xenoterracide left 18:25 denis_boyun left 18:27 nbrown____ joined
vendethiel pmurias: re masak: re quoting, we should totally be able to get `sql{}` to workj 18:28
18:29 ajr_ left 18:31 nbrown____ left 18:32 molaf__ joined, xenoterracide joined
raydiak mornin p6ppl 18:34
vendethiel o/, raydiak 18:35
18:35 molaf_ left 18:37 rurban left
geekosaur do we still collect autopuns? "I both hate and love analogies with QM, but I can't decide until I see one" 18:39
masak ;) 18:45
vendethiel "how many implementations of `[a] -> [a]` are there ?" well, an infinite number. Parametricity doesn't buy you that. 18:46
that's one thing I dislike about these talks, saying that parametricity removes the need for a name. id and reverse can both have the type [a] -> [a]. 18:47
A function that pattern matches on different list sizes also does. etc...
masak aka "dang, we still have to implement stuff"
I envision a future where my job is to provide a spec of some sort, and AI agents mill around to provide an implementation, coming back now and then to challenge me on specifics. 18:48
vendethiel aka types aren't the only documentation. Function names *are* useful
admittedly, you can go *very* far, moreso with dependent typing, but it doesn't change the fact that *types are not a complete documentation*. Not even for abstractions 18:49
18:49 woolfy joined
masak *nod* 18:50
vendethiel (though when idris/agda infers some implementation, I'm still quite happy :P (but then again, it knows which arguments your function takes)) 18:51
18:52 iarna left 18:53 iarna joined
masak "X don't prevent *all* bugs, but they're still useful in preventing some of them" where X (in) <<types tests "things like tab completion and other IDE things">> 18:53
vendethiel that's a bit unfair. 18:54
"you don't have to tests to the extent that you have types" is a mantra I like to repeat
18:54 pmurias left 18:57 xenoterracide left
masak pretty sure I don't agree with that. 18:58
in the JavaScript code I write, I can feel how nice it is to move to something like TypeScript and have some stuff statically checked. 18:59
but I wouldn't trade that away for writing unit tests.
it's like, they catch errors, but two different kinds.
19:02 iarna left, iarna joined
vendethiel masak: you read that wrong the same way I did first 19:03
"to the extent" doesn't mean they replace tests -- it means you start testing what can't be catched by said types
(and you can catch a lot more with haskell's type system than typescript (which is unsound)) 19:04
masak oh, you're talking about a kind of coverage then.
vendethiel (it's a pretty confusing way to say it, admittedly :P)
yes.
masak got it.
vendethiel types are like "free coverage", somewhat.
masak *nod* 19:05
I would love to hear more about TypeScript's unsoundness, and whether it has any real-world consequences.
I know it does inference both upwards and downwards.
vendethiel well, it's simply: it has untagged unions
ie forall A. A=A|undefined|null
19:06 brrt joined
vendethiel masak: gist.github.com/t0yv0/4449351 19:06
their generics are also unsound, because they allow types to be used both in co- and contra-variant positions 19:07
(dart is unsound as well. TypeScript is sound, yay :-).) 19:08
19:08 kurahaupo joined
vendethiel www.dartlang.org/articles/why-dart-types/ <- there's even a blog post to justify it hahahaha. 19:09
.oO( they chose to be covariant by default because they couldn't decide whether they wanted definition-site variance or use-site variance. Little did they know they could have both ... )
19:10
19:10 mr-foobar left
vendethiel (on that note, I'll stop spamming #perl6 with was must not be an interesting topic for a lot of people here...) 19:11
masak no, thank you for sharing. 19:12
19:15 darutoko left 19:22 virtualsue left 19:28 nbrown____ joined
dalek ast: c1f9b00 | (Pepe Schwarz)++ | S32-exceptions/misc.t:
Added test for RT #77522.
19:29
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...l?id=77522
ast: ca327a9 | (Pepe Schwarz)++ | S32-exceptions/misc.t:
Added test for RT #77380.
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...l?id=77380
masak vendethiel: took me a while to see, but yeah -- that looks like a bug. 19:30
vendethiel masak: the typescript soundness? 19:31
masak yes. 19:32
19:32 nbrown____ left
masak I can see it has to do with contravariance. 19:32
but I had to step through it to viscerally feel that it does something wrong.
pippo good night #perl6! 19:35
19:35 pippo left
vendethiel well, really, it's the simple rule that parameters are in a contravariant position. 19:35
masak right.
19:42 kaare_ left 19:43 iarna left 19:44 iarna joined 19:45 cognome left 19:46 iarna left
vendethiel erm, are you supposed to read "programming perl" when you don't know any perl? 19:48
there's a lot of stuff that's "there" but havn't been introducted. 19:49
dalek ast: 59436af | (Pepe Schwarz)++ | S32-exceptions/misc.t:
Added (fudged) test for RT #122502.
19:50
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=122502
p: ad212c2 | (Pepe Schwarz)++ | src/QRegex/P6Regex/Grammar.nqp:
Always capture min for quantifier **.
19:53
p: 50b2038 | (Tobias Leich)++ | src/QRegex/P6Regex/Grammar.nqp:
Merge pull request #174 from peschwa/master

Always capture min for quantifier **.
psch btw, CLA won't go out for at least 2 more months, i'm moving end of this month and TPF probably wants my then-current address 19:54
but there won't be any PRs either starting in about 3 weeks 'cause we won't have internet for a bit so there's that at least 19:55
19:56 xenoterracide joined 19:57 cooper- is now known as cooper, cooper left, cooper joined
masak psch++ 19:58
19:58 dmol left
FROGGS ohh dear, no internet /o\ 19:59
psch well, maybe not none at all, but not enough to push and pull code around all the time :P
although i could probably assume that git is better at saving bandwidth than i assumed 20:00
20:01 xenoterracide left 20:02 anaeem1 joined
FROGGS git likes to eat up my mobile broadband limit very quickly :o) 20:02
20:06 virtualsue joined
timotimo m: my @test = 1, 2, 3; say " → @test[1..2] ← "; 20:06
camelia rakudo-moar 5d5ec1: OUTPUT« → 2 3 ← ␤»
20:07 rurban joined 20:11 xenoterracide joined
masak m: my @test = 1, 2, 3; say " → @test[0..2] ← "; 20:12
camelia rakudo-moar 5d5ec1: OUTPUT« → 1 2 3 ← ␤»
masak m: my @test = 1, 2, 3; say " → @test[] ← ";
camelia rakudo-moar 5d5ec1: OUTPUT« → 1 2 3 ← ␤»
masak m: my @test = 1, 2, 3; say " → @test[0..*] ← ";
camelia rakudo-moar 5d5ec1: OUTPUT« → 1 2 3 ← ␤»
masak m: my @test = 1, 2, 3; say " → @test[*..2] ← ";
camelia rakudo-moar 5d5ec1: OUTPUT«(timeout)» 20:13
masak hm.
20:14 anaeem1__ joined, denis_boyun_ joined
FROGGS m: my @test = 1, 2, 3; say " → @test[-Inf..2] ← "; 20:14
well...
camelia rakudo-moar 5d5ec1: OUTPUT«(timeout)»
FROGGS perhaps not the best idea :o)
masak I'm not able to locate a piece of spec that talks about what * means in the lhs of a range of an indexing. 20:16
20:17 anaeem1 left
jnthn What were you wanting it to mean? 20:18
Or were you just wanting to break stuff? :P
20:18 brrt left
masak the latter. 20:19
but now I'm curious: what *does* it mean?
(a) by spec, and (b) in Rakudo today.
lue masak: if that range turns into WhateverCode, how do you know when the * is in the LHS? So, I'd expect *..2 to be (+@test)..2 20:20
masak me too, I think.
more generally, I expect * to mean +@array in a range in an indexing. 20:21
20:21 Khisanth left, Khisanth joined
jnthn Ranges don't turn into whatevercode, though; afair, they are excluded from taht 20:22
masak *nod*
still, it doesn't hurt if they play to users' intuition. 20:23
jnthn I suspect therefore that indexing wiht a range must special-case the endpoint.
The endpoint being a *, that is
Probably nobody thought (quite reasonably :P) about the starting point being * :)
lue If array indexing can tell when the * is on the left, then it'd make sense for it to be 0, but otherwise I expect things with * in them to be WhateverCode, which wouldn't know where the * is. 20:24
20:28 nbrown____ joined
masak jnthn: I get that no-one thought of writing the starting point as * before. it doesn't make much sense, since the first index is always 0. 20:29
jnthn: but it doesn't explain why Rakudo hangs on it.
jnthn masak: Oh, I can imagine that easily enough... 20:30
psch m: my @a := *..0; say @a[􏿽xC2^10] # a bit like watman
camelia rakudo-moar 5d5ec1: OUTPUT«===SORRY!=== Error while compiling /tmp/qFL5e1xob0␤Undeclared routine:␤ Â used at line 1␤␤»
jnthn masak: For example, maybe it grabs the first endpoint and loops, incrementing, until we hit the number of elems - 1.
psch eh, half a unicode character :/ 20:31
m: my @a := *..0; say @a[^10] # a bit like watman
camelia rakudo-moar 5d5ec1: OUTPUT«-Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf␤»
jnthn m: say -Inf + 1
camelia rakudo-moar 5d5ec1: OUTPUT«-Inf␤»
jnthn Right :)
20:33 nbrown____ left
masak m: my @a = 1..3; @a[-Inf] 20:35
camelia rakudo-moar 5d5ec1: OUTPUT«Unhandled exception: Unsupported use of [-Inf] subscript to access from end of Array; in Perl 6 please use [*-Inf]␤ at <unknown>:1 (/home/p6eval/rakudo-inst-2/languages/perl6/runtime/CORE.setting.moarvm:throw:4294967295)␤ from src/gen/m-CORE.setting…»
masak but it clearly doesn't try to index -Inf, or we'd see that.
hehe, "in Perl 6 please use [*-Inf]" :P 20:36
jnthn Right, we don't really want to have to make another multi-dispatch round-trip through postcircumfix instead of calling .at_pos, I guess...
And the negative check is there
20:36 lizmat joined
jnthn I suspect we should probably just spot that it's -Inf at that point, tbh 20:37
20:37 xenoterracide left
psch m: my @a = 1..3; say @a[*-Inf] # but i am 20:39
camelia rakudo-moar 5d5ec1: OUTPUT«Unsupported use of [-Inf] subscript to access from end of Array; in Perl 6 please use [*-Inf]␤ in method gist at src/gen/m-CORE.setting:12952␤ in sub say at src/gen/m-CORE.setting:13890␤ in block at /tmp/eAPhGTSEue:1␤␤»
psch m: my @a = 1..3; say @a[*-*]
camelia rakudo-moar 5d5ec1: OUTPUT«1␤»
psch the last one surprised me a bit, but i guess it makes sense 20:40
vendethiel "inf inf inf inf BATMAN"++ 20:42
masak psch: it does make sense. one sometimes wants to do @a[*/2] 20:44
lue masak: wouldn't * div 2 be safer, or is subscripting just that smart? :) 20:45
timotimo i think we have an "as Int" nowadays
masak lue: subscripting floors.
20:45 xenoterracide joined
lue ah, good to know. 20:45
masak or rounds towards 0, rather.
lue depends on your definition of flooring I guess :) 20:47
masak flooring always means towards -Inf
m: say floor(-2.5)
camelia rakudo-moar 5d5ec1: OUTPUT«-3␤»
timotimo right. so it truncates, right? 20:48
masak indexing does, yes.
which is the same semantics as "as Int"
lue masak: huh. my own definition is towards zero (or towards the smaller absolute value) 20:49
masak lue: if you can provide me with a source for that... :)
lue: otherwise I recommend you adjust your definition to everyone else's.
20:49 colomon joined
lue masak: I recall hearing long ago about there being confusion with floor/ceiling and what it means to everyone else's, and recently when I had to contend with floor/ceiling negative numbers, I figured "towards zero" made the most sense. 20:50
masak lue: the thing that rounds towards zero is called "truncating". 20:51
20:51 zengargo1le left
dalek p: 5f67fae | jnthn++ | src/vm/moar/QAST/QASTCompilerMAST.nqp:
Don't neglect to pass down :$want.
20:52
p: ba097e3 | jnthn++ | src/vm/moar/QAST/QASTCompilerMAST.nqp:
Can use a native int for this flag.
p: 6f9397f | jnthn++ | src/vm/moar/QAST/QASTCompilerMAST.nqp:
Convey $want down into variable compilation.
masak lue: the metaphor of "flooring" is that the space you're occupying between two integers has a floor (the integer below you). the floor is always downwards, towards a lower number.
unless you're on the integer, in which case you're already there. 20:54
dalek p: 224c4f7 | jnthn++ | src/vm/moar/QAST/QASTCompilerMAST.nqp:
Void context variable can generate no code.
20:55
p: f962e8f | jnthn++ | src/vm/moar/QAST/QASTCompilerMAST.nqp:
Cleanup/simplify compile_all_the_stmts.

No need to handle QAST::Var here specially; that falls out of the logic in compile_var now. Also don't dupe-fetch .node.
lue eh, sure. (I could swear there was something debatable there...) I still think going for the smallest absolute value has a better symmetry to it though :)
masak sure. it's just not called "flooring".
timotimo jnthn: is there a big benefit to this codegen? 20:56
masak you might be thinking of the debatability of infix:<%>
lue wonders if the absolute-value-based version of ceiling has a special name
20:56 dwarring joined
lue masak: no, it was purely mathematical, and about floor/ceiling. Maybe I'm misremembering the section on wikipedia called "stuff that got it wrong" :P 20:56
dalek p: 804aa54 | jnthn++ | src/vm/moar/QAST/QASTCompilerMAST.nqp:
Fix QAST::WVal void context optimization.

It failed to generate nothing if in a void context.
20:57
p: 3f1e934 | jnthn++ | src/vm/moar/QAST/QASTOperationsMAST.nqp:
Don't emit anything for a null in void context.

We often use nqp::null() as a symbolic "null" op when optimizing bits away. Make the code-gen cooperate with this technique.
jnthn timotimo: Yes, just take a look at Frame_1 for CORE.setting before and after it :P
masak lue: it's called "rounding towards infinity" according to en.wikipedia.org/wiki/Rounding
lue aw, that's not nearly as fun to say as "antitruncation" or something :) 20:58
timotimo jnthn: ok
20:58 iarna joined
lue masak: thanks for clearing that up. I blame my brain taking "floor(n) rounds to the smaller integer for all positive n" and extending that concept to "smaller absolute value" instead of "smaller number, including negatives" :P 21:00
masak extending concepts is always intriguing. 21:01
21:02 xenoterracide left
lue vows to call rounding to infinity "countertruncation" or whatever prefix makes the most sense :) 21:04
psch no good sounding antonym for truncate on thesaurus.com :/ 21:06
"prolong" is most striking, but not pretty
lue The opposite of truncation would be to add more digits, so a pure antonym doesn't really make sense. 21:07
dalek p: 40b6408 | jnthn++ | src/vm/moar/QAST/QASTOperationsMAST.nqp:
Fix coercion code-gen bug found by FROGGS++.

We should not so carelessly re-use registers that may actually be for variables.
21:10
p: 92be0f8 | jnthn++ | tools/build/MOAR_REVISION:
Get latest MoarVM.

Includes lazy deserialization imrpovements, including thread safety fixes.
21:11 brrt joined
dalek kudo/nom: 9bca34d | jnthn++ | tools/build/NQP_REVISION:
Get latest NQP for code-gen fixes, better Moar.
21:12
kudo/nom: 40748bc | jnthn++ | src/vm/moar/ops/perl6_ops.c:
Use new API for grabbing a code object.

This handles lazily deserializing it if needed.
jnthn This also deals with the recent regressions in encode.t, which I think was also noticed in the ecosystem.
psch lue: abtruncate maybe, as "truncate away from [zero]" 21:13
actually that would have to be abstruncate, because t, says wordinfo.info/unit/2357/ip:1 21:14
lue I was just going to say, there would need to be some sort of sound change for abtruncate.
psch it doesn't sound bad to my german ears... :) 21:15
masak 'night, #perl6
FROGGS correct :o)
gnight masak
lue masak o/
colomon \o
lue abstruncate works for me, now to find excuses to spread it across the globe! :) 21:16
psch night masak
timotimo sweet! we're down to 104 megabytes maxrss when we run "say 1" on perl6-m 21:19
we seem to be going in the right direction 21:20
lizmat jnthn: we got a few new failures though: 21:21
timotimo oh no :<
lizmat make t/spec/S32-list/uniq.t fails 11 tests, but running without the harness it's ok 21:22
21:22 nbrown____ joined
jnthn Yes, I get it fine without the harness too. Had no luck hunting down why. I'm not sure how much it is to do with recent changes. 21:22
lizmat t/spec/S04-phasers/init.t fails 7 of 11 21:23
jnthn Yup, that one's on my "to fix tomorrow" list.
That one is easily reproducable without the harness, but really weird.
lizmat the third one was a flap
jnthn Which ws the third one?
*was
lizmat t/spec/S03-operators/subscript-adverbs.t
jnthn Oh
Never seen that one have any issues here... 21:24
lizmat Non-zero wait status: 6
Parse errors: No plan found in TAP output
jnthn Odd
lizmat no, it's just every now and then a random test file fails
jnthn Hm
Was there a time improvement?
lizmat Files=912, Tests=31961, 176 wallclock secs ( 8.91 usr 3.73 sys + 1099.75 cusr 127.86 csys = 1240.25 CPU)
parsing the setting: 29.409 21:25
the lowest I've ever seen
21:25 anaeem1__ left
jnthn What were your previous values, ooc? 21:25
Lowest for spectest too?
lizmat a few weeks ago around 35
jnthn is almost at a new low on spectest
lizmat could be the lowest, lemme try again
jnthn Lowest for me was before we added the threading tests 21:26
Some of them still take a while and clog the run on windows. :(
But certainly what I get now is the lowest since we've got them.
21:27 nbrown____ left 21:28 anaeem1_ joined
lizmat Files=912, Tests=32080, 172 wallclock secs ( 8.56 usr 3.62 sys + 1065.74 cusr 125.92 csys = 1203.84 CPU) 21:29
only t/spec/S04-phasers/init.t failed this time
jnthn Ah, OK
lizmat that is *definitely* the loweset I've seen
jnthn I'll see if I can nail that one tomorrow.
lizmat okidoki... it was a long day and a long drive for me... so I'm calling it a day 21:30
sleep&
jnthn :)
See you tomorrow o/
21:33 iarna left 21:37 anaeem1_ left 21:42 brrt left 21:48 iarna joined 21:51 grondilu joined
grondilu are transliterations supposed to accept the :pos adverb? 21:51
m: say "foo bar".trans: 'ao' => 'oa', :pos(1); 21:52
camelia rakudo-moar 5d5ec1: OUTPUT«faa bor␤»
grondilu m: say "foo bar".trans: 'ao' => 'oa', :pos(3);
camelia rakudo-moar 5d5ec1: OUTPUT«faa bor␤»
21:55 denis_boyun_ left 22:03 ventica3 joined
psch .trans (and tr///) adverbs aren't really clear to me either. i mentioned only thinking :i and :ii sensible a few days back, with lue++ adding :m and :mm 22:04
roast tests for :c, :squash and :delete, the last of which seems redundant
lue :p doesn't make sense, but I can see a case for :c
22:05 spider-mario left 22:06 ventica2 left
lue I'm noticing more and more that S05 was either never fully completed, or it's an extreme victim of "oh, we won't bother mentioning stuff that's the same as in Perl 5" syndrome. 22:06
psch i'm still a bit unsure about m:g//, especially in for 22:10
the perl5 idiom is something like "say $1 while m/(.)/g"
m: $_ = "abc"; for m:g/(.)/ { say $1 } # works now, iirc 22:11
camelia rakudo-moar 5d5ec1: OUTPUT«(Any)␤(Any)␤(Any)␤»
psch i don't... :)
m: $_ = "abc"; for m:g/(.)/ { say $/[0] } # works now, iirc
camelia rakudo-moar 5d5ec1: OUTPUT«「c」␤␤「c」␤␤「c」␤␤»
psch m: $_ = "abc"; for m:g/(.)/ { .say } # works now, iirc
camelia rakudo-moar 5d5ec1: OUTPUT«「a」␤ 0 => 「a」␤␤「b」␤ 0 => 「b」␤␤「c」␤ 0 => 「c」␤␤»
psch that last one
but that's because m:g// returns a List 22:12
but the spec usually says "m:g// returns a Match"
22:12 gfldex left, ventica joined
psch so in the branch i implemented that does that we'd have to run it as 'for @(m:g/(.)/) ...' which seems a bit unwieldy 22:12
but no one told me it's really wrong, so it sits there untill someone looks at it and says whether it's wrong or not :) 22:13
that's the main gripe i have with S05 :P
22:13 ventica3 left
lue psch: like I said, either it's secretly never been finished, or suffers from "it's in Perl 5, so why say it" syndrome, or both :) 22:14
btw, the P6 version of that idiom would be say $_ for $str.comb(/./) , most likely. 22:15
psch that does seem more idiomatic, yes. 22:17
22:23 iarna left, nbrown____ joined 22:27 nbrown____ left 22:31 Psyche^ joined 22:35 Psyche^_ left 22:51 cono joined
cono paste.org.ru/?krh2pi is it possible to say ^sqrt(*) somehow? 22:52
colomon cono: what do you want it to do? 22:55
lue r: my @a = 1,2,3,4; say $_ for @a[^*.sqrt]
camelia rakudo-{parrot,jvm,moar} 40748b: OUTPUT«1␤2␤»
lue for some reason [^sqrt(*)] fails
cono uh :)
thanks 22:56
lue no problem :)
colomon sqrt(*) is passing a Whatever to the sqrt function, rather than making a WhateverCode. 22:57
cono my first version was with loop: paste.org.ru/?2zfau0 What am I doing wrone ? 22:58
------> t $i = 0; $i < @cache.elems.sqrt; ++$i) ⏏{
23:00 grondilu left
psch m: loop #`[[ without this space here you have a function call ]] (my $a = 0; $a < 5; ++$a) { say $a } 23:01
camelia rakudo-moar 40748b: OUTPUT«0␤1␤2␤3␤4␤»
psch m: loop(my $a = 0; $a < 5; ++$a) { say $a }
camelia rakudo-moar 40748b: OUTPUT«===SORRY!===␤Word 'loop' interpreted as 'loop()' function call; please use whitespace around the parens␤at /tmp/7YqNoPLv1Z:1␤------> loop⏏(my $a = 0; $a < 5; ++$a) { say $a }␤Unexpected block in infix position…»
cono uh, got it. Thanks
23:12 aghbas joined, aghbas left
colomon m: my @a = 1..10; say @a.sqrt 23:15
camelia rakudo-moar 40748b: OUTPUT«3.16227766016838␤»
cono I did it :) ./perl6-m ~/perl/25k_prime.pl 1082.62s user 4.10s system 100% cpu 18:05.34 total 23:21
23:24 nbrown____ joined
cono inspired by this video www.youtube.com/watch?v=UJPdhx5zTaw 23:26
23:28 nbrown____ left 23:37 BenGoldberg joined
timotimo oof, 18 minutes 23:42
cono: can you tell us moar --version?
23:56 SevenWolf joined