»ö« 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! Set by masak on 12 May 2015. |
|||
00:02
cognominal left
|
|||
timotimo | a rakudo built with mast_localref_3 (which i just rebased onto latest nqp) spectests fine | 00:21 | |
i mean ... why wouldn't it | |||
but i'm still checking to be sure | |||
something's wrong ... "perl6" doesn't start any more .. ?! | 00:24 | ||
perhaps i need to Configure.pl a few times again | 00:25 | ||
indeed, that was it | 00:27 | ||
dalek | p: d125c71 | timotimo++ | / (2 files): initial implementation of localref X local access as well as three simple failing tests |
00:31 | |
00:31
dalek left,
Averna joined
|
|||
timotimo | poor dalek | 00:31 | |
00:32
dalek joined,
ChanServ sets mode: +v dalek
00:45
cognominal joined
|
|||
dalek | kudo/optimizer_lexicalref_lowering: cbe2eca | timotimo++ | src/Perl6/Optimizer.nqp: the first obvious changes towards lowering lexicalref |
01:08 | |
timotimo | jnthn: ^- this branch currently gives me Stage mast : Cannot take a reference to non-native local __lowered_lex_723 | 01:09 | |
(the name of the local gets output in the exception via a local patch) | |||
maybe you remember what obvious part i've missed that'd cause references to obj primspec'd locals be emitted | |||
.o( and also: shouldn't we actually be able to handle obj registers be localref'd? ) | 01:10 | ||
i'll try to get some good rest now | |||
01:11
rangerprice joined
01:19
ggoebel joined,
rmgk_ joined,
rmgk is now known as Guest8167,
Guest8167 left,
rmgk_ is now known as rmgk
01:23
ggoebel left
01:30
TEttinger joined
01:38
amurf left
01:40
Quom left,
[Coke] left,
Util left
01:41
dalek left,
sergot left,
masak left,
PerlJam left,
pmichaud_ left
01:44
BenGoldberg_ joined
01:46
dalek joined,
ChanServ sets mode: +v dalek
01:47
JimmyZ joined,
avuserow joined
01:48
Mouq joined,
Util joined,
[Coke] joined,
sergot joined,
masak joined,
PerlJam joined,
pmichaud joined,
psch joined,
masak is now known as Guest11116
02:03
chenryn joined
02:07
chenryn left
02:08
chenryn joined
02:11
colomon joined
02:13
amurf joined
02:14
colomon_ joined
02:16
colomon left,
colomon_ is now known as colomon
02:19
colomon_ joined
02:20
colomon left,
colomon_ is now known as colomon
02:21
rangerprice left
02:25
colomon_ joined
02:26
colomon left,
colomon_ is now known as colomon
02:29
laouji joined
02:30
colomon_ joined
02:31
colomon left,
colomon_ is now known as colomon
02:34
colomon_ joined
02:35
colomon left
02:37
colomon joined
02:38
yqt left,
colomon_ left
02:41
AlexDaniel left,
colomon left
02:42
colomon joined
02:44
cognominal left
02:45
colomon_ joined
02:47
colomon left,
colomon_ is now known as colomon
02:51
colomon left
02:54
noganex joined
02:57
noganex_ left
03:02
yeahnoob joined
03:24
schmooster left
03:27
cibs joined
|
|||
census | why did cognominal leave? | 03:30 | |
03:30
gfldex left
03:32
BenGoldberg_ left
|
|||
TEttinger | census: cognominal has quit (Quit: This computer has gone to sleep) | 03:43 | |
03:46
dayangkun left
03:48
atroxaper joined
03:52
laouji_ joined,
laouji left
03:54
dayangkun joined
04:10
schmooster joined
04:13
chenryn left
04:18
Averna left
04:43
chenryn joined
04:53
[Sno] left
04:54
atroxaper left
04:59
sftp_ joined
05:02
khw left
05:05
sftp_ left
05:07
sftp joined
05:12
chenryn left
05:16
atroxaper joined
05:31
mr-foobar left
05:32
laouji_ left
05:33
laouji joined
05:36
atroxaper left
05:37
laouji left
05:40
cognominal joined
05:42
chenryn joined
05:43
atroxaper joined,
laouji joined
05:48
diana_olhovik_ joined
05:57
baest_ is now known as baest
06:01
atroxape_ joined
06:03
atroxaper left
06:04
atroxaper joined,
atroxape_ left
06:13
jkva joined
06:17
[Sno] joined
06:22
FROGGS__ left
06:23
atroxaper left
06:31
atroxaper joined
06:46
atroxaper left
06:47
atroxaper joined
06:51
Woodi left
06:52
Woodi joined
06:53
FROGGS joined
|
|||
FROGGS | o/ | 06:53 | |
nwc10 | \o | 06:55 | |
06:56
zakharyas joined
07:02
rurban joined
07:04
kaare_ joined
07:06
amurf left
07:08
darutoko joined
07:13
espadrine_ joined
|
|||
Guest11116 | morning, #perl6 | 07:14 | |
07:14
Guest11116 is now known as masak
07:17
atroxaper left
|
|||
FROGGS | morning masak_grrr | 07:17 | |
:o) | |||
masak | :) | 07:18 | |
apparently I missed the _grrr part this time. | |||
07:18
telex left
|
|||
jkva | I think most of us are _grrr on mondays :) | 07:19 | |
nwc10 | good Monday, #perl6 :-) | ||
lizmat | good *, #perl6! | 07:20 | |
FROGGS nwc10 masak jkva o/ | |||
07:20
telex joined
07:21
mr-foobar joined
07:24
atroxaper joined
07:25
xinming left
07:26
xinming joined
07:27
atroxaper left
07:29
atroxaper joined
|
|||
lizmat | PSA: it appears I'll be doing the P6W again tonight | 07:31 | |
masak | ++lizmat | 07:32 | |
jkva | lizmat: P6W? | 07:35 | |
lizmat | Perl 6 Weekly: p6weekly.wordpress.com | ||
jkva | lizmat: Thanks | 07:36 | |
nwc10 | lizmat: I thought that irclog.perlgeek.de/perl6/2015-07-23#i_10942545 was cool enough to get a P6W mention | ||
07:36
[Tux] joined
|
|||
lizmat | yeah, that one was cute :-) | 07:36 | |
masak | :) | 07:37 | |
07:38
bjz joined
07:41
pdcawley joined
|
|||
dalek | kudo/nom: 9ed640c | lizmat++ | src/core/ (2 files): Implement .Pos <-> .Int coercing |
07:43 | |
lizmat | b2gills: my experiences with branches in rakudo has not been the best | ||
reverting multiple commits is easy | |||
07:44
RabidGravy joined
|
|||
lizmat | re. using a hypothetical "ifdef" statement in stead of having Pos | 07:44 | |
so you could say something like: | |||
ifdef "foo".index("f") -> $pos { } | |||
is nice and useful in and of itself, but will not help ternaries | 07:45 | ||
anyway, I'm holding off writing tests for Pos until we have reached consensus | |||
meanwhile, this patch gives: | 07:46 | ||
$ 6 'say ?0.Pos' | |||
True | |||
jnthn: regarding batching of method calls using >>.foo | |||
I don't think we can do anything but .cue a job for each method call | 07:47 | ||
as we can have no idea what that method call will do | |||
for example, if you have a list of URL's that you want to scrape | |||
@urls>>.scrape | |||
each scrape could take several seconds\ | 07:48 | ||
you're using >>. for its parallelization | |||
you don't expect them to be batched | |||
perhaps we could have a method attribute "is batched(100)" | 07:50 | ||
masak | lizmat: "but will not help ternaries" -- that part was not clear to me. could you please clarify? | ||
lizmat | say "foo".index("f") ?? "found" !! "did not find" | ||
masak | my $found = "foo".index("f") != -1; | 07:52 | |
lizmat | re "is batched": that would indicate how you would like to have that method batched in >>. situations | ||
masak | say $found ?? "found" !! "did not find" | ||
sometimes I think we're a little bit too eager to reduce those final keystrokes ;) | |||
lizmat | masak: that still doesn't solve the issue if $found is an Int and 0 | 07:53 | |
masak | it doesn't solve the semipredicate problem, no | ||
lizmat | m: say 0 ?? "found" !! "not found" | ||
camelia | rakudo-moar ed945e: OUTPUT«not found» | ||
lizmat | m: say 0.Pos ?? "found" !! "not found" | ||
camelia | rakudo-moar ed945e: OUTPUT«Method 'Pos' not found for invocant of class 'Int' in block <unit> at /tmp/3T2ONNdPBM:1» | ||
masak | you have to make *some* value exceptional to mean "not found" -- unless you go all-out with option types | 07:54 | |
lizmat | $ 6 'say 0.Pos ?? "found" !! "not found"' | ||
found | |||
masak | that value for .index is -1 | ||
the API user is expected to know this | |||
lizmat | m: say "foo".index("bar") | ||
camelia | rakudo-moar ed945e: OUTPUT«(Pos)» | ||
lizmat | it's *not* -1 | 07:55 | |
and hasn't been for a *long* time | |||
it's undefined, either from being a Failure or from being a Type object | |||
masak | oh, right. | ||
lizmat | .index and .rindex actually differed in that, I harmonized that | ||
07:57
azawawi joined
|
|||
masak | yeah, sorry about that. I'm being confused. | 07:57 | |
azawawi | hi | ||
master of confusion is here :) | |||
masak | lizmat: I agree with you that there's a risk of confusion, since 0 and undefined values are both falsly, and that can trip people up. | 07:58 | |
lizmat: I'm not too sold on the solution of overloading ints with bools. | |||
lizmat: partly because we've been down that road design-wise before with other things, and it hasn't worked out so well | |||
lizmat | such as ? | 07:59 | |
was that from the time that "0" was still true ? | |||
masak | no. | ||
it was return values from processes, the prototypical example of `0 but True` | |||
ShimmerFairy | masak: Well, ideally Pos can be used for strings too (the idea was that StrPos could be useful to more than just strings) | 08:00 | |
masak | it ended up with TimToady saying "I never spec'd that" :) | ||
08:00
mrf joined
|
|||
masak | ShimmerFairy: I'm wary of premature generality, too. | 08:00 | |
lizmat | masak: well, it's not mixing in any roles into instances, it is minimally subclassing Int | 08:01 | |
masak | ("let's abstract into positions of all the things!") | ||
08:01
dakkar joined
|
|||
ShimmerFairy | I'll have to look at the GLR draft again and see what Pos can help in there. | 08:01 | |
08:02
atroxaper left,
dakkar left
|
|||
masak | solution looking for a problem. | 08:02 | |
08:02
dakkar joined
|
|||
lizmat | masak: the reason I did this, was a discussion on #perl6 last week | 08:02 | |
it is *not* a solution looking for a problem | |||
masak | lizmat: sorry, was unclear. | 08:03 | |
ShimmerFairy leafing through GLR in order to motivate it being a general positions-of-things solution, that's a solution looking for a problem. | |||
ShimmerFairy | masak: And the problem with finding more uses for something is...? | ||
08:04
Fleurety joined
|
|||
lizmat | masak: "let's not think outside the box, please" ? | 08:04 | |
masak | lizmat: my primary worry is still that the cure (overloading ints with bools) will be perceived as a bigger wart than the problem it solves (semipredicate problem for .index) | ||
lizmat: I'm all for innovative thinking. I just want to end up with solutions that don't come back and bite us. | |||
lizmat: it *is* confusing to have a 0 that boolifies to True. | 08:05 | ||
that's what we learned from the return codes thing. | |||
azawawi | 0 => True... what ? | ||
lizmat | azawawi: 0.Pos => True | ||
masak | ShimmerFairy: the problem with finding more uses for something is you've already *decided* that this solution needs to be general enough to support more uses, before you've seen those other uses. | ||
ShimmerFairy: that's what "premature generalization" means. | 08:06 | ||
ShimmerFairy | masak: How else shall I see other uses if not with the hope that I can generalize something? :) | ||
I disagree with the notion that "solution looking for a problem" is _always_ a bad way to figure things out. | 08:07 | ||
masak | ShimmerFairy: that's usually not how you arrive at a solid design. you're supposed to notice a number of uses that can be unified, and *then* generalize. doing it the other way triggers warning bells. | ||
lizmat needs to be afk for a few hours, will backlog later | 08:08 | ||
masak | lizmat: \o | ||
ShimmerFairy | masak: IIRC I initially agreed with the suggestion to reintroduce StrPos by saying it could even be useful for lists and such. | 08:09 | |
azawawi confused | 08:10 | ||
masak | ShimmerFairy: granted, .first-index and such have the same semipredicate problem. | 08:11 | |
(but that's still assuming that the proposed Pos solution is something we should adopt) | 08:12 | ||
I think another part of my worry is that Pos intentionally mixes up two concepts: boolean truth, and definedness. | |||
all in the name of trying to make it easier for the user. | |||
in my experience, it's easier when those concepts are not mixed up. | 08:13 | ||
08:13
Hor|zon joined
|
|||
ShimmerFairy | masak: One difference between return types and this, is that this is a separate type (and not just a "0 but Bool" being returned). I think you'd be expected to know Pos.new(0) == True in the same way you'd be expected to know index() returns Int:U in its Pos-less version. | 08:19 | |
masak | well, neither the old nor the new solution is hard to use if you know what you're expected to know. :P | 08:20 | |
so the only interesting cases to discuss are the failure modes that happen when the user does not have full knowledge of the API | |||
and in that case, an *undefined* value will warn and make noise in various ways | 08:21 | ||
a truthy 0.Pos will just silently be accepted everywhere | |||
ShimmerFairy | masak: Now knowing what "semipredicate problem" means, that's something I try to avoid all the time (and I hate whenever it has to happen). Haskell's "Maybe" type comes to mind as a possible, if unlikely by now, solution to that issue :) | 08:23 | |
masak | yes, that's why I mentioned option types above | ||
ShimmerFairy | I must have missed that. | 08:24 | |
masak | the semipredicate problem runs deep. any language that has IEEE 754 floating-point values also has NaN, which gets in *everywhere*. | 08:26 | |
ShimmerFairy | I imagine something like if "foo".index(bar) -> $a { my Int $idx = $a.just; ... } potentially | ||
masak | maybe try it out in a fork of rakudo | 08:27 | |
ShimmerFairy | Maybe I will :) | ||
vendethiel thinks this is the wrong solution to the wrong problem | |||
nwc10 | masak: sorry for being slow/unable to read scrollback, but why does NaN end up as causing semipredicate problems? (I'm aware that NaN != NaN etc, and it's pretty much like NULL in SQL, rather than Perl's undef) | ||
ShimmerFairy | (Wouldn't be the first time we were inspired by Haskell :P) | 08:28 | |
vendethiel | The solution should be 1-indexing, that's obvious *g* | ||
masak | nwc10: NaN is not on the real number line. it's a floating-point value with the semantics "I am not a floating-point value". | ||
nwc10 | masak: aha yes. That's a lovely way to look at it. | ||
masak | it's undefined, but for floats | 08:29 | |
nwc10 | it's not even on the complex plane. | ||
(which is the image in my head when you say "real number line") | |||
vendethiel doesn't know why NaN exists | |||
masak | you won't find it among the hypercomplex numbers, either | ||
nwc10: also, NaN + NaN\i is a lovely thing to ponder. | |||
nwc10: it's undefined in two dimensions! | |||
08:30
atroxaper joined
|
|||
masak | vendethiel: IEEE 754 is full of sensible compromises. I'd rage against NaN too, but we live in the real world, which often (rightly) prefers "practical" to "pure". | 08:30 | |
vendethiel is tired of hearing that line as well :) | 08:31 | ||
especially about something designed in '85 | |||
masak | sorry :/ | ||
what's wrong with '85? | |||
I do think we did a good thing standardizing on floats in that way. | |||
vendethiel | pretty much everything we did (programming-wise) then has changed. Or at least, it certainly looks like it from my point of view. | ||
masak | I don't think all that many people need floats these days, however. | 08:32 | |
vendethiel | *40 years ago*. If we go the other way, that's 1945, and "programming" is ... | ||
masak | I'm not sure what kind of fallacy that is. "if we go twice as far back..." | ||
08:32
bjz left
|
|||
masak | :) | 08:32 | |
vendethiel | '85 is closer to cobol's birth than to us. | ||
whoops, I meant 30, not 40. anyway, not twice | |||
masak | vendethiel: I'd much much rather have IEEE 754 than no standards for floats (and most of the designed by amateurs) | 08:33 | |
vendethiel | I'm just taking '85 and going backward instead of forward | ||
oha | perhaps the point is that NaN makes sense in some scopes, but in a higher level language it is more easy to handle exceptions? | ||
ShimmerFairy | I don't see anything wrong with NaN, but then again I'm not the world expert on floating point :) | ||
masak | er, "lots of standards", I mean. | ||
ShimmerFairy: you said you tried to avoid the semipredicate problem at all times. ShimmerFairy, meet NaN. | |||
oha | or actually, failures | ||
08:33
inokenty joined
|
|||
RabidGravy | in 1985 I only knew COBOL, BASIC and some Assembly language | 08:34 | |
masak | NaN's purpose is to propagate up your calculations, blanking them all out as it goes. | ||
RabidGravy | oh and Logo | ||
ShimmerFairy | masak: It's more for when I'm designing something, I really like making sure the failure value can't be a valid value too. | ||
masak | ShimmerFairy: there are many situations where one has to express the idea of (a) "there is no value here", or (b) "I don't know this value". | 08:36 | |
08:36
g4 joined
08:37
espadrine_ left
|
|||
masak | Ovid has some nice blog posts about how NULL can mess up your SQL logic, because boolean logic invisibly turns into three-value logic. | 08:38 | |
and he's right. but there is often a real, practical need for NULL in some columns too. | |||
why? because the world refuses to be as neat and filled with perfect knowledge as we would like. | 08:39 | ||
DrForr | Multivalue screws up the underlying Coad-Yourdon model. | 08:40 | |
08:40
daxim joined,
yeahnoob left
|
|||
jkva | DrForr: Never seen that before, thanks | 08:41 | |
masak | DrForr: I didn't know what "Coad-Yourdon model" was, so I looked it up. looks vaguely UML-y. | ||
DrForr | I might have the name wrong actually. | ||
It's the mathematical underpinnings to SQL. | |||
And I think actually 'multiset' is the problem I was looking for. | |||
masak | you're not thinking of Edgar F. Codd, are you? | 08:42 | |
DrForr | Codd, yes, thanks. | ||
masak | his paper set off the SQL thing. | ||
www.seas.upenn.edu/~zives/03f/cis550/codd.pdf | |||
DrForr | One damn character. | ||
jkva | Huh, I ended up at conceptdraw.com/a2283c3/preview | ||
masak | DrForr: I seem to recall you're right. Codd never liked NULL at all. | ||
DrForr: but the *industry* did, and even though that's not all that great perhaps, I would say it's significant. | 08:43 | ||
DrForr | And of course it made it practical rather than a pure model. | ||
masak | aye. | 08:44 | |
I would say though that SQL has still benefited from being based on a mathematical model as opposed to, say, OOP. | |||
DrForr | Oh, I wouldn't question that. | 08:45 | |
08:52
yakudza joined
|
|||
RabidGravy | you can always tell which database engine someone firsted learned SQL on by whether they always tend to do "foo is not null and foo = bar" or not | 08:52 | |
08:55
amurf joined
|
|||
masak | unless there are only two database engines, I'm not sure you can :P | 08:55 | |
nwc10 | country *and* western? :-) | ||
masak | www.youtube.com/watch?v=YSTJ5Xe-E8c | 08:56 | |
08:58
abraxxa joined
|
|||
RabidGravy | There are only two | 08:59 | |
Oracle and Informix | |||
08:59
amurf left
09:00
araujo joined
09:03
laouji left
09:04
bjz joined
|
|||
RabidGravy | there's a comment in IO::Handle that the $whence argument should be an Enum, is there any reason why that hasn't been done? | 09:09 | |
masak | m: say Pair ~~ Enum # note that the type "Enum" may not be what you think it is | 09:13 | |
camelia | rakudo-moar 9ed640: OUTPUT«True» | ||
RabidGravy | oh it is | 09:14 | |
unfortunate mis-capitalization | 09:15 | ||
09:15
espadrine_ joined
|
|||
masak | if I remember my S12 correctly, it encourages people to call the whole thing an "enumeration", and its individual constituent parts "enums" or "enum values". | 09:16 | |
this despite the fact that the *keyword* for the whole thing is just `enum`. | |||
a little similar to the fact that the name of the thing you create in Perl 6 using the keyword `given` can be referred to as a "switch statement". | 09:17 | ||
RabidGravy | (just documenting seek() and tell() - I'll leave the other bit to later) | 09:19 | |
azawawi | m: class Foo { has Int $.a; }; my $o = Foo.new(:b(1),:a(1)).a; | ||
camelia | ( no output ) | ||
azawawi | should rakudo warn about parameter b? | 09:20 | |
ShimmerFairy | Not currently, and that's thanks to the implicit *%_ on methods :) | 09:21 | |
masak | azawawi: there's been a persistent wish for that, yes. | ||
azawawi: ShimmerFairy has it right. | |||
RabidGravy | also shouldn't IO::Handle.slurp-rest be a multi? (i.e. one with :bin returning a BUf and one without returning a Str) | 09:23 | |
ShimmerFairy | That actually wouldn't work IIRC, because of implicit *%_ | ||
masak | RabidGravy: that sounds reasonable, yes. | ||
ShimmerFairy: if does if you mark the :$bin! as required | 09:24 | ||
RabidGravy | indeed | ||
masak | m: class C { multi method foo() { say "without" }; multi method foo(:$bin!) { say "with" } }; given C.new { .foo(); .foo(:bin) } | 09:25 | |
camelia | rakudo-moar 9ed640: OUTPUT«withoutwith» | ||
ShimmerFairy | right, my mistake :) | ||
masak | not everything gets screwed up by *%_ :P | ||
RabidGravy | I'll do that later (and leave documenting slurp-rest until then.) | ||
azawawi | thanks | ||
ShimmerFairy | masak: Still haven't seen what good *%_ does either :P | 09:26 | |
09:26
laouji joined,
laouji left
|
|||
masak | if it were unambiguously bad, we'd have removed it ages ago. | 09:26 | |
dalek | c: 63fb6eb | RabidGravy++ | lib/Type/IO/Handle.pod: document seek/tell somewhat |
09:27 | |
09:27
laouji joined
|
|||
ShimmerFairy | masak: It's been complained about for a long time now, and I've never been able to understand (or been shown) what it helps with. | 09:27 | |
09:29
Alina-malina left
09:30
araujo left
|
|||
masak | ShimmerFairy: it makes a method in a base class resilient to named arguments it doesn't know but which a deriving class might know what to do with. | 09:31 | |
I wish I had a real example to demonstrate it with. | |||
ShimmerFairy | Shouldn't it be the other way around? Or are there cases where the base class' methods are tried first? O_o | ||
masak | for now, maybe imagine `class Coord3d is Coord2d`, and you can initialize either one with .new(:$x, :$y, :$z) | 09:32 | |
ShimmerFairy: it matters for things like `nextsame` | |||
in fact, `nextsame` (I now recall) tends to be the argument that makes *%_ not be removed :) | 09:33 | ||
ShimmerFairy | masak: I think my question then is why isn't .new($x, $y, $z) afforded the same resiliency? | ||
09:34
araujo joined
|
|||
masak | ShimmerFairy: I think it's grounded in the fact that positional arguments and named arguments are used differently in practice. | 09:35 | |
a positional is required by default, and tends to be part of the necessary/primary information going into a call. | |||
a named is optional by default, and tends to be used for "extra" information, or tweaks, or settings. | 09:36 | ||
ShimmerFairy | What about optional positionals then, at least? (Imagine if Coord3D made the $z positional optional and defaulted to zero when not supplied) | ||
Couldn't the argument be made that nextsame should treat foo($x, $y, $z?) and foo($x, $y) equivalently? | 09:37 | ||
09:40
dayangkun left
|
|||
masak | it could. | 09:40 | |
but it's probably significant that it hasn't ;) | |||
ShimmerFairy | masak: I just think that *%_ has historically caused far more problems than it solves, on top of the fact that I've never even seen a solution showing how useful having implicit *%_ in the lang is :) | 09:41 | |
09:42
atroxaper left
|
|||
ShimmerFairy | I'm not so sure the problem of "extraneous nameds" is nearly as prevalent as implicit *%_ would suggest. | 09:42 | |
(The other inconsistency question aside from positionals is why subs don't get the same implicit *%_ ? Can't we use the nextsame bunch outside of classes too?) | |||
masak | classes have a different story to them. someone else can subclass your base class. | 09:43 | |
whereas multi subs and the like are tied to nested lexical scopes, all of which tend to be under your control. | 09:44 | ||
09:45
espadrine_ left
09:48
atroxaper joined
|
|||
ShimmerFairy | masak: I think my problem with implicit *%_ is that it purports to fix something I've never seen be a problem. I understand the concern to not die on extra, unknown nameds by default. Problem is, I don't know when that ever is likely to happen. | 09:49 | |
Only in cases like foo(|c) (where you're passing a collection of things as args), but then you also have to worry about positionals. | 09:50 | ||
Er, I can only see it potentially happening in cases like that, to be clear. | 09:51 | ||
RabidGravy | I can see a case like 'my %conf = get-config-from-file(); my $foo = Foo.new(|%conf)' where thee config may be shared between multiple types and a given type is only interested in a sub-set | 10:01 | |
ShimmerFairy | Essentially I don't see nameds and positionals as being fundamentally different (they're just different ways of accepting arguments from callers), so I don't understand why just nameds get this special and unintuitive treatments, in just methods too. | 10:03 | |
10:04
espadrine_ joined
|
|||
masak | I find optional positionals to be quite similar to nameds :) | 10:06 | |
required positionals, not so much. YMMV | |||
10:06
spider-mario joined
|
|||
ShimmerFairy | masak: I don't doubt their typical usages, btw. I only doubt that those typical usages should be upheld in design to the extent that *%_ does. (Look at the Coord2d/3d example you shared earlier, for an example of nameds not being "extra" info) | 10:08 | |
RabidGravy | y'see for me as an application designer I would probably favour a multi over optional positionals | ||
10:12
renormalist joined
10:13
renormalist left,
renormalist joined
10:17
baest_ joined
|
|||
jdv79 | lizmat: define "batched" | 10:19 | |
10:19
Spot___ joined,
laouji_ joined
10:20
mr-fooba_ joined
10:21
mr-foobar left,
robinsmidsrod left,
Spot__ left,
baest left
10:22
jkva left,
laouji left
10:23
Spot___ is now known as Spot__
|
|||
jdv79 | tadzik: sup wit smoke runs? | 10:29 | |
RabidGravy | the oom killer got my last smoke on raspberry pi | 10:30 | |
nine | RabidGravy: so what about "foo is not null and foo = bar"? | ||
10:31
chenryn left
|
|||
RabidGravy | some databases comparison of a null to a non null yields false, some it's undefined | 10:33 | |
roughly split between Sysbase/MS-SQL/Informix and the rest | 10:34 | ||
tadzik | jdv79: I have no idea, I don't smoke :) | ||
oha | tadzik, you don't smoke? mh... let's see... | 10:36 | |
10:36
spider-mario left
10:37
jkva joined
|
|||
RabidGravy | just multi'd slurp-rest in github.com/rakudo/rakudo/pull/480 if anyone cares to take a look | 10:40 | |
dalek | kudo/nom: 8a46049 | RabidGravy++ | src/core/IO/Handle.pm: Make IO::Handle.spurt-rest a multi |
10:41 | |
kudo/nom: e3314c8 | FROGGS++ | src/core/IO/Handle.pm: Merge pull request #480 from jonathanstowe/slurp-rest-multi Make IO::Handle.spurt-rest a multi |
|||
vendethiel | lgtm, it seems :) | ||
RabidGravy | last great trans-dimensional meatload? | 10:42 | |
nine | masak: I understand your caution regarding Pos(0) being True. I just really like that it's the first time I see such an API where the intuitive or naive approach to using it is actually the right one. | 10:45 | |
Up until that, I've only seen bad solutions and worse. PHP gives you False which is harder to differentiate from 0 in boolean context. Python and Javascript are horrible in that they are both dynamic languages yet feel the need to invent yet another error indicator (-1) when both already have ways to express undefinedness + exceptions | 10:47 | ||
10:47
rurban1 joined
|
|||
timotimo | o/ | 10:47 | |
masak | nine: JS gets a lot of flak because it has an == operator in which 0 == "0", 0 == "", but "0" != "". it feels to me that we're making a similar thing, breaking a common expectation somewhere. | 10:48 | |
nine: I'm usually quite proud of Perl 6 for making a proper distinction between true/false and defined/undefined | 10:49 | ||
ShimmerFairy | masak: If we think of the index as being defined when it can find what it's looking for, and undefined otherwise, then the problem with something like Int is that you can't simply check if it's a type object or not without creating a temporary variable. | 10:53 | |
nine | For use cases where the exact position is not needed, I'd rather see a .contains method with a Bool result. That leaves two cases: one where we just want to know the index. And the other, where we don't know yet if the string is actually contained and need the exact index if it is. | 10:54 | |
ShimmerFairy | masak: if the statement if "foo".index("bar").defined -> $idx { ... } put the actual index in $idx (not necessarily .defined exactly, but something like it at least), I suppose there's a bit less reason for Pos. | ||
timotimo | right; that's what lizmat means with "if foo.index(bar) -> $idx { ... }" | 10:55 | |
FROGGS | m: if "foobar".index("foo").grep(*.defined) -> [$idx] { say $idx; say $idx.WHAT } | 10:57 | |
camelia | rakudo-moar 9ed640: OUTPUT«0(Pos)» | ||
timotimo | ouch :D | ||
FROGGS | it is a workaround, surely | ||
dalek | c: e7c25b1 | RabidGravy++ | lib/Type/IO/Handle.pod: Document IO::Handle.slurp-rest |
||
RabidGravy | there, now back to writing my own stuff | 10:59 | |
nine | Please note, that we currently don't have a .contains, so this needs covering, too: if $string.index("foo") { ... } | ||
timotimo | don't we have has-substr? | ||
ShimmerFairy | One of my biggest problems in any language is when you basically need two values from something. This feels similar to me to when you want to do for @items -> $item { ... } but you also need the index, so you end up having to do something like for ^+@items -> $idx { $items = @items[$idx] } | ||
10:59
atroxaper left
|
|||
timotimo | m: "foobar".has-substr("oob").say | 10:59 | |
camelia | rakudo-moar 9ed640: OUTPUT«Method 'has-substr' not found for invocant of class 'Str' in block <unit> at /tmp/6TOlZNfCu2:1» | ||
timotimo | hm | ||
RabidGravy | boo | ||
timotimo | ShimmerFairy: well, we do have .kv for that particular case | ||
11:00
leont joined
|
|||
timotimo | and python has enumerate(...) together with index unpacking | 11:00 | |
other languages ... not so much | |||
ShimmerFairy | timotimo: Huh, I didn't think of .kv , probably because that's a very Associative method for something I'm not using in a hash-like fashion :) | 11:01 | |
leont | Can someone tell me where coersions are documented, and what their current state is? | ||
timotimo | ah! | ||
well, we're "proud" of our Cool and Any things | |||
m: say "hello".kv.perl | |||
camelia | rakudo-moar 9ed640: OUTPUT«(0, "hello")» | ||
timotimo | m: say "hello".pairs.perl | ||
camelia | rakudo-moar 9ed640: OUTPUT«(0 => "hello",)» | ||
ShimmerFairy | timotimo: maybe .iv or .ie ("index/value" or "index/element") for the array-related use :P :P | 11:02 | |
timotimo | not only do single items behave like lists of that single item, our lists also behave like hashes of index to value | ||
ShimmerFairy | timotimo++ # reminding me of .kv is gonna help me out a lot in the future, since I seem to do stuff requiring index + value somewhat often :) | 11:03 | |
timotimo | yay | ||
RabidGravy | leont, design.perl6.org/S02.html#Coercive_...clarations | 11:05 | |
and currently only work for argument types IIRC | |||
11:05
atroxaper joined
|
|||
leont | Does not appear to work on Array arguments :-s | 11:08 | |
timotimo | yeah, that won't work | ||
typed arrays are more of a "all or nothing" thing | 11:09 | ||
11:10
robinsmidsrod joined
11:12
Begi joined
11:13
chenryn joined
|
|||
RabidGravy | I think that is stated explicitly elsewhere in the design docs | 11:14 | |
jdv79 | tadzik: i meant why is smoke.perl6.org stalled at 7/21 | 11:16 | |
Woodi | hi today :) | ||
FROGGS | jdv79: ups | 11:18 | |
ohh, unups | |||
I can't fix that | |||
jdv79: ask colomon | 11:19 | ||
11:20
robinsmidsrod left
|
|||
Woodi | whatever "chaining" is $a ~~ (2..3) is strange. it should be the same with () and without. probably via DWIM. we need GLR to remove DWIM *inside* core but keep it user facing. maybe redefining some user things too... | 11:20 | |
11:21
robinsmidsrod joined
|
|||
Woodi | but anyway, it is Perl ! sooner or later someone will remove need for () :) | 11:21 | |
m: (2 ~~ 1 .. 3 ~~ 0..4) ~~ True # chaining... | 11:22 | ||
camelia | rakudo-moar e3314c: OUTPUT«5===SORRY!5=== Error while compiling /tmp/slSEl48ldWOperators '~~' and '..' are non-associative and require parenthesesat /tmp/slSEl48ldW:1------> 3(2 ~~ 17⏏5 .. 3 ~~ 0..4) ~~ True # chaining... expecting any of: infix…» | ||
Woodi | m: (2 ~~ (1 .. 3) ~~ (0..4)) ~~ True # chaining... | 11:23 | |
camelia | rakudo-moar e3314c: OUTPUT«5===SORRY!5=== Error while compiling /tmp/QIMZ1PXu50Operators '~~' and '~~' are non-associative and require parenthesesat /tmp/QIMZ1PXu50:1------> 3(2 ~~ (1 .. 3) ~~7⏏5 (0..4)) ~~ True # chaining... expecting any of: inf…» | ||
Woodi | m: (2 ~~ ((1 .. 3) ~~ (0..4))) ~~ True # chaining... | 11:24 | |
camelia | rakudo-moar e3314c: OUTPUT«Potential difficulties: Smartmatch against True always matches; if you mean to test the topic for truthiness, use :so or *.so or ?* instead at /tmp/bLgqlc4yQx:1 ------> 3(2 ~~ ((1 .. 3) ~~ (0..4))) ~~7⏏5 True # chaining...» | ||
Woodi | m: (2 ~~ ((1 .. 3) ~~ (0..4))) so True # chaining... | ||
camelia | rakudo-moar e3314c: OUTPUT«5===SORRY!5=== Error while compiling /tmp/4hnVkhEDRuTwo terms in a rowat /tmp/4hnVkhEDRu:1------> 3(2 ~~ ((1 .. 3) ~~ (0..4)))7⏏5 so True # chaining... expecting any of: infix infix stopper statement …» | ||
Woodi | m: (2 ~~ ((1 .. 3) ~~ (0..4))) :so True # chaining... | ||
camelia | rakudo-moar e3314c: OUTPUT«5===SORRY!5=== Error while compiling /tmp/CDXph6L_gsYou can't adverb thatat /tmp/CDXph6L_gs:1------> 3(2 ~~ ((1 .. 3) ~~ (0..4))) :so7⏏5 True # chaining... expecting any of: pair value» | ||
RabidGravy | right off out for a bit. play nicely. | 11:25 | |
leont | It seems Proc.status is returning crap :-/ | 11:26 | |
Probably tries to perform math on Int:D + Any:U | 11:27 | ||
Yeah, xAB($!exitcode +< 8) +| $!signalxBB, with $!signal being Any:U | 11:30 | ||
11:32
skids left
|
|||
leont | I think submethod BUILD should handle $!signal (and possibly $!pid) | 11:32 | |
azawawi Atom::Electron windows events are now working :) | |||
11:33
RabidGravy left
|
|||
azawawi | github.com/azawawi/perl6-atom-elec...e_launcher # Finished Atom::Electron example | 11:35 | |
Woodi | azawawi: ! some tutorial or blog post pleas ! :) | ||
azawawi | Woodi: on it :) | 11:36 | |
Woodi should read-first | |||
jdv79 | .tell colomon smoke is stalled | ||
yoleaux | jdv79: I'll pass your message to colomon. | ||
azawawi | Woodi: basically write Perl 6 desktop webapps and control chromium (aka google chrome) windows :) | 11:37 | |
Woodi | azawawi: bookmarks too ? | ||
azawawi | Woodi: you run your own chromium instance. you dont control google chrome | 11:38 | |
Woodi: so you can run your own web app and create a window and load that web app and handle its events directly | 11:39 | ||
what's the tool we use to generate module documentation in Perl 6? | 11:41 | ||
moritz | what tool? :- | 11:42 | |
) | |||
there's Pod::To::HTML, but it just generates one HTML file, and you have to manually take care of running it for each module | 11:43 | ||
11:43
baest_ is now known as baest
|
|||
masak | <leont> It seems Proc.status is returning crap :-/ | 11:44 | |
leont: please submit a rakudobug. | |||
azawawi | moritz: API to wrap github.com/atom/electron/tree/master/docs/api ... it is a fair daunting task :) | 11:45 | |
11:46
rurban left
|
|||
Woodi | so it is GUIs future ? :) | 11:47 | |
tadzik | heh, I hope not, but I'm afraid yep | ||
masak | we are all afraid | 11:48 | |
Woodi | anyone have examples or some pointers to that technology that "in 100 year we will not use code" ? | ||
masak | Woodi: that doesn't square too well with Perl 6 being a 100-year language ;) | 11:49 | |
awwaiid | naw, just need to add the NLP grammar | 11:50 | |
Woodi | masak: too :) but I read this few times here as sure thing :) | ||
awwaiid | or maybe the robots will still program in perl6 | ||
moritz | Woodi: I've herad the interesting notion that, eventually, we'll stop writing code, and start growing it instead | ||
*heard | |||
awwaiid | so... if "we" == humans... there are LOTS of reasons why humans won't be programming in perl6 :) | ||
moritz | like, guiding program auto-assemble from many small parts | 11:51 | |
Woodi | for sure programming could be less university-grade occupation... artisanal web pages should be by ppls without engeenering degree... | ||
azawawi | or machines writing code and then figure out it is easier to outsource it to humans :) | ||
Woodi | as soon some code is generated noone is interested in quality or performance... | 11:52 | |
I mean things like XML configs not compiler output :) | 11:53 | ||
11:54
cognominal left,
cognominal joined
11:55
itz joined,
rurban1 left,
freeze joined
11:57
itz_ left
11:58
Begi left
11:59
itz left
|
|||
masak | moritz: I like that. I think I would prefer a future where I discussed the design of a system with an expert system, and then the expert system coordinated the implementation. | 12:00 | |
12:06
itz joined
|
|||
Woodi | anyone know how to exit from emacs ? | 12:07 | |
12:07
gfldex joined
|
|||
nine | Woodi: kill -9? | 12:07 | |
Woodi | nine: this is not from inside it :) | 12:08 | |
Woodi asked before running emacs... but stackoverflow knows everything :) | 12:09 | ||
nwc10 | Woodi: control-X control-C | 12:10 | |
and if someone has unmapped *that* | |||
try | |||
ESC x save-buffers-kill-emacs | |||
but why would anyone want to leave emacs? | |||
or just hit control G a lot. | 12:11 | ||
Woodi | nwc10: exiting is first reaction after entering vi, so I wanted to be prepared :) | 12:13 | |
of course it *do not* tell anything about vi quality :) | 12:14 | ||
nine | Well on pressing Ctrl-C in vim, it at least tells you exactly how to exit. | ||
Woodi | someone have some advice about C developmnet on Windows ? eg. compiling Moar. looks gcc hallow.c is not all... | 12:16 | |
azawawi | Woodi: C/C++ development on windows = Visual Studio Express Community edition | 12:21 | |
FROGGS | but not the 2015 version | 12:22 | |
Woodi | azawawi: yes, but Express probably do not allow eg. mysql libs linking or I just have problems... | ||
azawawi | Woodi: you link the .lib and you are set | 12:23 | |
Woodi: but then again i used professional in the past | 12:24 | ||
12:25
llfourn joined
|
|||
Woodi | in *nix you say gcc file.c and you have a.out... in windows you need ide tons of swithes and libraries for simple "Hallo World"... | 12:25 | |
12:26
cognominal left
|
|||
FROGGS | Woodi: no, you don't | 12:26 | |
you can also use gcc or cl directly | 12:27 | ||
12:27
atroxaper left
|
|||
Woodi | I just tried once :) | 12:27 | |
12:28
atroxaper joined
|
|||
masak | I would just like to say about 0.Pos and all that -- I'm not staunchly against it. many people like the change, and I can see why. the design feels to me like it replaces risk by magic, which I'm not sure is the right thing to do. but it may be that it's still a net win. | 12:28 | |
again one might argue that good tutorials and idioms trump the actual language choice we make. | |||
12:29
FROGGS left
12:32
atroxaper left
12:33
amurf joined
|
|||
jdv79 | why does calling $*SCHEDULER.queue.elems always return 1? | 12:35 | |
Woodi | num of treads ? | ||
masak | jdv79: the answer to that lies in learning what $*SCHEDULER.queue is. what type is it? | ||
jdv79 | its seems to be a "ConcBlockingQueue" repr | 12:36 | |
trying to print it seems to always yield "Queue.new" | 12:37 | ||
:( | |||
12:37
amurf left
|
|||
masak | jdv79: so my guess is that it simply doesn't have its own .elems, and so the method call falls back to Any.elems | 12:40 | |
dalek | kudo-star-daily: 2232970 | coke++ | log/ (8 files): today (automated commit) |
||
masak | m: say Any.new.elems | ||
camelia | rakudo-moar e3314c: OUTPUT«1» | ||
jdv79 | ah | 12:42 | |
masak | jdv79: I agree with you that a Queue should be expected to have its own .elems, though | ||
jdv79 | i see elems in the .c file | ||
masak | jdv79: so essentially, you've found a bug. | ||
jdv79 | i tried nqp::elems($queue) and nope | ||
any ideas? | |||
masak | jdv79: please submit to [email@hidden.address] | ||
jdv79 | Well Queue is an empty class in ThreadPoolScheduler so idk... | 12:43 | |
but i'll but it | |||
*bug | |||
timotimo | if it's empty, it probably gets all of its functionality from the REPR it uses | ||
jdv79 | i just don't know how to work with opaue vm-ish things yet | ||
[Coke] | (you have to make some value exceptional) ... if only we had... exceptions. | 12:44 | |
masak | [Coke]: :) | 12:46 | |
[Coke]: not really applicable, since the use case is "if it's in the string (then give me the position of its first occurrence)" | |||
jdv79 | timotimo: any idea how to call its elems func? | ||
masak | [Coke]: it's not "I'm going to assume it's in the string, and please blow up if it isn't" | 12:47 | |
azawawi | masak: is it possible to run n Bailador servers within the same Perl 6 process using start { baile; } ? | 12:49 | |
masak: with different ports that is | |||
masak | azawawi: no idea; maybe ask tadzik? | ||
12:51
chenryn left,
yqt joined,
chenryn joined
12:52
llfourn left
|
|||
azawawi | github.com/azawawi/perl6-atom-elec...example.p6 # it works sometimes lol :) | 12:53 | |
Woodi | Perl6 should have something like emacs --daemon, then using emacsclient just connect to server :) would solve startup time problems... | ||
jnthn | [6~ | 12:54 | |
Woodi | azawawi: I saw WebContent.undo in Electron API, what it can do ? | 12:55 | |
azawawi | Woodi: link it please | 12:56 | |
moritz | Woodi: we have that for the JVM | ||
timotimo | jdv79: you can try "use nqp; nqp::elems(nqp::decont($thequeue))" or something | 12:57 | |
Woodi | github.com/atom/electron/blob/mast...ntentsundo | ||
[Coke] | I have no problem with other languages where the sentinel value used isn't possible, like -1. | ||
[Coke] re-reads what he just wrote. | 12:58 | ||
jdv79 | timotimo: segfault | ||
Woodi | moritz: looking | ||
jdv79 | i'll ignore it for now | ||
timotimo | oh my | ||
masak | m: my $i = "foo".index("y"); say $i.perl | 12:59 | |
camelia | rakudo-moar e3314c: OUTPUT«Pos» | ||
masak | m: my $i = "foo".index("y"); say $i | ||
camelia | rakudo-moar e3314c: OUTPUT«(Pos)» | ||
masak | :/ | 13:00 | |
[Coke] , having had at least some coffee, is still ok with that. | |||
masak | I didn't realize Pos was (re?)applied to nom. I wanted to check what kind of undefined value we used to return from .index | ||
moritz | well, its .perl method needs some improvement | 13:01 | |
masak | guess I can check the source | ||
ShimmerFairy | masak: It was (Int) | ||
moritz | aye | ||
masak | ShimmerFairy: thank you. | ||
moritz | star: say 'foo'.index('why?') | ||
camelia | star-m 2015.03: OUTPUT«(Int)» | ||
azawawi | Woodi: i think it is for controlling text fields (editing commands), undo/redo/replace/etc... | ||
masak | moritz++ | 13:02 | |
well, if people are OK with this change, then I'll be silent. my unease could be just a measurement glitch or something. | 13:03 | ||
azawawi | jnthn: any idea why gist.github.com/azawawi/901a7c4e086615ea6721 is not capturing prompt output from either thread? | ||
[Coke] | If we're going with Pos, I assume there's a ton of places where it would make sense to use. It's basically the old StrPos from the syn with a new name, yes? | 13:04 | |
masak | yes. | ||
jnthn | You're really not meant to use what .queue returns directly. It's only for passing off to various other VM-level APIs, and decidedly not intended for use in userspace. | ||
masak | though I always saw the advantage of StrPos in being that it abstracted a numerical position into a more "cursor-like" thing that could straddle/ignore the bytes/chars/graphs levels. | 13:05 | |
that doesn't seem to be the case with this new Pos. it seems to be a subtype of Int. | |||
[Coke] | I am torn. It handles the use case it was introduced for very nicely, but it's yet another type. I am probably just an old fart at this point, but having to save the result of an expression if I want to inspect it multiple ways seems like "the way to do it" not a big problem. | ||
jdv79 | i was just poking at the async stuff | 13:06 | |
jnthn | azawawi: Using sync IO handles from threads other than the one that created them is currently not supported | ||
jdv79 | i'll find a better way later i guess to do what i was attempting | ||
jnthn | (It's on the to-fix list.) | ||
jdv79: What were you trying to do? | |||
tadzik | azawawi: it may not be | ||
azawawi: but probably you can read what start() does and just replicate it with different values for port and stuff :) | |||
jdv79 | just fan out and collect - experimenting in general | ||
13:07
chenryn left
|
|||
jdv79 | the particular issue was detecting when the queue is exhausted | 13:07 | |
azawawi | jnthn: so `use Bailador; start { baile; }; start { baile; }` # wont be supported? | ||
jdv79 | but its the wrong way about it anyway for anything real | ||
jnthn | jdv79: my @results = await do for @work { start { ...computation... } } | 13:08 | |
13:08
cognominal joined
|
|||
jdv79 | that's higher level than i wante | 13:08 | |
jnthn | Why? | ||
jdv79 | just wanted to see how much extra taht is from a minimal impl | 13:09 | |
just for fun | |||
jnthn | ah | ||
13:09
ggoebel joined
|
|||
jnthn | You can't do it by looking at the queue | 13:09 | |
Not reliably | |||
That'll be full of races | |||
13:09
llfourn joined
|
|||
jnthn | You need a semaphore or cond var somewhere so you can wait efficiently | 13:10 | |
azawawi: That's almost certainly the wrong way to do it | |||
jdv79 | yeah, i know. i was trying to do the absolute min and then build up | ||
less min tehn | 13:11 | ||
thanks | |||
moritz | well, you can start by startings Tread objects and joining them in the end | ||
jdv79 | yeah but i didn't want to code a pool mgr | ||
i'll fool later - have to run though. thanks! | 13:12 | ||
masak .oO( run, you fools! ) | 13:13 | ||
moritz | fool, you, run! | ||
masak | [Coke]: well, the expectation we're breaking is essentially that ?$pos == ?+$pos | 13:14 | |
Woodi | moritz: eval-client.pl reads file and sents to perl-j listening on port and doing eval ? | ||
azawawi | jnthn: thanks... run Bailador in an async process ftw github.com/azawawi/perl6-atom-elec...example.p6 | 13:16 | |
moritz | Woodi: iirc it named socket/pipe | 13:17 | |
azawawi | moritz: with that bailador example, we could run perl6 REPL in a very nice GUI and control the browser window shortcuts (no more Ctrl-W closing the window ...etc) | 13:22 | |
moritz: we can even run web irc in a separate browser tab. | 13:23 | ||
13:24
laouji_ left,
Begi joined
13:25
ribasushi left
|
|||
moritz | azawawi: nice | 13:27 | |
13:28
ribasushi joined
|
|||
azawawi | is panda install HTTP::Server::Async failing on your dev box? where is the testers link? | 13:31 | |
13:38
laouji joined
|
|||
Woodi | can be electron binary packaged with app ? | 13:39 | |
13:40
JimmyZ_ joined
|
|||
azawawi | Woodi: yes we can :) | 13:40 | |
Woodi: just make it available in your $PATH | 13:41 | ||
13:42
raiph joined
|
|||
azawawi | Woodi: did you download the appropriate runtime for your plaform from github.com/atom/electron/releases/tag/v0.30.1? | 13:43 | |
Woodi | azawawi: not downloaded yet. but thinking about making Windows apps becouse on linux I usually don't have X desctop | 13:46 | |
*desktop | |||
curently there is a fashion for making game launchers that rsync conntent for you :) | 13:47 | ||
13:49
jkva left
|
|||
timotimo | do you mean content as in game updates or as in save games and such? | 13:55 | |
13:56
cognominal left
|
|||
Woodi | timotimo: content. eg. DayZ mod for Arma2 | 13:57 | |
azawawi | Woodi: cool | ||
timotimo | mhm | ||
Woodi | azawawi: can I replace firefox with electron and have my own session manager ? :) | ||
timotimo | you would have your own session manager, but not much else | 13:58 | |
Woodi | timotimo: but having GUI for app builded on SDL would be nice | ||
13:58
raiph left
|
|||
timotimo | very difficult to embed, i assume | 13:58 | |
Woodi | what to embed ? SDL window with menu, status bar and grid... | 13:59 | |
dalek | c: 53189e2 | (Lloyd Fournier)++ | lib/Language/modules.pod: 1. Addressed some of the tense and passive voice issues 3. Fixed some mistakes |
||
c: 33b9276 | (Lloyd Fournier)++ | lib/Language/modules.pod: small touch ups and sentence rewrites on modules |
|||
c: ccf8229 | paultcochrane++ | lib/Language/modules.pod: Merge pull request #108 from LLFourn/master Attempted to address passive vs active voice and added examples for need,use,import and require |
|||
timotimo | i thought you meant SDL + electron | 14:00 | |
Woodi | no, electron is 30Mb, SDL 3 ? | ||
timotimo | SDL doesn't load different image and video formats and doesn't do text layouting and 3d stuff ... | 14:01 | |
14:01
raiph joined
|
|||
nine | [Coke]: unfortunately if $string.index('foo') { ... } is such an easy trap to fall into. | 14:01 | |
14:02
khw joined
14:03
census left
|
|||
azawawi | Woodi: it is Atom::Electron. i have not seen a way to embed firefox while doing research | 14:06 | |
timotimo | well, you can use gecko | 14:07 | |
14:07
laouji left
|
|||
azawawi | true | 14:07 | |
but then again electron is more actively developed because of the Atom editor atm :) | 14:08 | ||
azawawi going home in 10 min :) | |||
timotimo | right | 14:09 | |
14:11
skids joined
14:14
ggoebel left
|
|||
azawawi | Woodi, timotimo: Enjoy i.imgur.com/Nbf57YO.png # Electron + Bailador :) | 14:17 | |
Woodi | azawawi: maybe I do not understand how electron is working... it framework for making desktop apps. it can load url. so I can have many windows like in firefox -> session manager, bookmarks :) maybe not tabs | ||
masak | azawawi: wow! | 14:18 | |
azawawi++ | |||
azawawi | Woodi: you can make new BrowserWindow(s) :) | ||
Woodi: and there is Session management but not wrapped yet | |||
Woodi | I think about something on Perl side... | ||
azawawi | Woodi: github.com/atom/electron/blob/mast...ioncookies | ||
Woodi | azawawi: that "File View Help" is standard thing ? | 14:19 | |
azawawi off to get a Frappuccino to celebrate :) | |||
Woodi: can be disabled, it is for development | 14:20 | ||
Woodi | azawawi: I want to have it :) windows on the right could be hidden... | ||
azawawi | masak: the fun thing is that we can also use clipboard api, frameless transparent windows, tray api and shell api :) | 14:22 | |
14:22
amurf joined
|
|||
azawawi | Woodi: BrowserWindow->new(:show(False)); # should work :) | 14:22 | |
masak | azawawi: nice! | 14:24 | |
14:24
atroxaper joined
|
|||
azawawi | masak: so basically it is a wxwidgets app but with a HTML/CSS layout engine :) | 14:25 | |
masak: cross platform, hopefully lol | |||
azawawi home & | 14:26 | ||
14:27
amurf left
14:29
atroxaper left
14:30
cognominal joined,
azawawi left
|
|||
timotimo | cute | 14:34 | |
the image | |||
14:34
jkva joined
|
|||
dalek | ast: f30dec1 | skids++ | S06-currying/named.t: Remove unused sub from test file. |
14:37 | |
Begi | azawawi : nice ! I'll try that ! | 14:41 | |
14:42
g4 left
|
|||
skids | So... question for those who think removing the implicit *%_ is a good idea: "class A { has $.a }". What should be the signature of the implicitly defined A.new and A's submethod BUILD? Will it still be Mu's, or an autogenerated one? Curious just how radical you rebels are. | 14:42 | |
14:43
telex left
14:44
telex joined
|
|||
moritz | skids: I still think Mu.new can accept any named param | 14:44 | |
skids | Right, but would A have Mu's new, or an autogenerated one based on attributes? | 14:47 | |
moritz | it can have Mu's new | 14:48 | |
skids | OK, so anyone who wants to NOT take unnown named attributes to new will have to define their own new anyway. | ||
moritz | yes | 14:49 | |
skids | (just as they do now) | ||
moritz | it's all the other methods I'm concerned about right now :-) | ||
skids does not share that concern frankly. But that's good to know. | 14:50 | ||
14:56
brrt joined
|
|||
vendethiel | m: [1] @ [2] | 14:57 | |
camelia | rakudo-moar e3314c: OUTPUT«5===SORRY!5=== Error while compiling /tmp/EE4eHIqWNsTwo terms in a rowat /tmp/EE4eHIqWNs:1------> 3[1]7⏏5 @ [2] expecting any of: infix infix stopper statement end statement modifier …» | ||
vendethiel | ^ @ is now an operator python has, and we don't :P | ||
brrt | \o | ||
vendethiel | o/ brrt | 14:58 | |
brrt | \o vendethiel | ||
15:00
yqt left
15:01
RabidGravy joined
|
|||
RabidGravy | boom | 15:02 | |
15:05
jkva left
15:06
jkva joined
15:08
diana_olhovik_ left
15:14
eMBee left
15:20
brrt left
15:29
dustinm` left
15:31
zakharyas left
15:32
mtj_- left,
dustinm` joined
15:35
petercommand left,
agentzh left
15:36
mtj_- joined,
petercommand joined,
agentzh joined
15:37
Begi left
|
|||
vendethiel | looking at PEP-492, it looks like me that we... "folded" the generator feature that languages added/are adding (php5.6, python, es6) into gather thanks to infinite lists, and I like it :D. | 15:38 | |
one thing "interesting" is that "await" really applies to "one expression". Like: "await fut + 1" will be parsed as "(await fut) + 1". Basically, you're really "calling a function with a modifier", it's not like our "await {}" | 15:39 | ||
15:40
[Tux] left
15:42
captain-adequate joined
|
|||
nine | Assuming I can fix all emerging issues, would it actually be a good idea to have Perl5Object inherit from Mu instead of Any? One one hand it would fix issues with Any's methods shadowing the Perl 5 object's methods. On the other hand those objects would feel less like Perl 6 objects. | 15:43 | |
15:43
Begi joined
15:46
diana_olhovik joined
|
|||
masak | vendethiel: do you mean "one term"? | 15:47 | |
vendethiel | masak: where? | 15:48 | |
oh, yes. I did. | 15:49 | ||
15:54
[Tux] joined
|
|||
timotimo | nine: i think it's a bit problematic because we basically limit the big majority of parameters to Any | 15:54 | |
by default, that is | |||
for pointy blocks, parameters are Mu, but for subs and methods, they are Any by default | |||
nine | timotimo: sounds like an excellent argument for keeping Any as base class. Especially since I hit that even in Inline::Perl5's code itself. | 15:55 | |
timotimo: I wonder how this works with custom meta objects? | 15:56 | ||
15:57
khw left,
yqt joined
|
|||
timotimo | haven't tried | 15:57 | |
dalek | c: 7485ab2 | (Lloyd Fournier)++ | lib/Language/functions.pod: added example of type coercions for non builtin types |
15:59 | |
c: c874e11 | LLFourn++ | lib/Language/functions.pod: Merge pull request #109 from LLFourn/master added example of type coercions for non builtin types |
|||
16:02
rurban joined,
jkva left
16:03
rurban1 joined
16:06
smls joined
|
|||
smls | gist.github.com/jnthn/a56fd4a22e7c43080078 looks pretty cool, jnthn++ | 16:08 | |
I especially like supply/emit as the observable equivalent to gather/take | |||
masak | me too. | 16:09 | |
and whenever as an async loop construct. | |||
smls | I admit I don't quite understand why whenever $supply { } is needed when for $supply.list { } already works | 16:11 | |
or after pmichaud's GLR changes, simply for $supply { } | 16:12 | ||
masak | I can't imagine that those have the same semantics. | ||
(the first two) | |||
the for loop looks blocking to me | |||
smls | and whenever doesn't? | 16:13 | |
oh right, "asynchronous looping construct" | |||
16:13
xinming_ joined
|
|||
dalek | line-Perl5/mu: f1d4668 | (Stefan Seifert)++ | / (2 files): Failed attempt to use Mu as base for Perl5Object Using Mu instead of Any as base class for Perl5Object and Perl5Package classes might have helped cases where Any's methods shadow the Perl 5 object's methods. But as timotimo++ pointed out, the big majority of parameters is restricted to Any (so Perl5Objects would not be accepted). So this would probably cause more harm than good. Push it into a branch to document this fact and what changes would have been necessary. |
16:14 | |
smls | Though inside a supply { }, using a blocking loop should be fine too shouldn't it? If it works like gather { } | ||
16:17
xinming left
|
|||
masak | yeah, but two `whenever`s can work in parallel without any extra instructions, which is nice. | 16:28 | |
smls | yeah, I think I see the benefits now | ||
lizmat is back | 16:32 | ||
and has read all of the backlog | |||
(of today) | |||
I like the idea of Str.contains(Str) returning a boolean | 16:33 | ||
I wonder if .contains could be more general | |||
and a replacement for the $int ~~ ^10 meme | |||
(^10).contains($int) | 16:34 | ||
smls | What's wrong with .index().defined ? | ||
lizmat | if "foo".index("f").defined -> $pos # doesn't work | 16:35 | |
smls | Neither will .contains -> $pos if it returns a Bool will it? | ||
16:35
espadrine_ left
|
|||
lizmat | no, but if you use .contains you declare not being interested in the position | 16:35 | |
there are a few places in the core where .index is used in that way | 16:36 | ||
.contains will *always* return a bool | |||
smls | index().defined too :) | 16:37 | |
lizmat | I wonder whether we should maybe change .defined in such a way that it will pass on the value but True ? | ||
m: if "foo".index("f") -> $pos { say $pos } # says $pos even if it is 0 and therefore false in the Int interpretation | 16:38 | ||
camelia | rakudo-moar e3314c: OUTPUT«0» | ||
flussence | re: *%_ -- the kernel devs do a similar thing, with `flags` params in all new syscalls for future-expansion stuff. That's one reason to have it, but it'd be nice to fix the awkward things it causes too. | ||
lizmat | ISTR that jnthn at least has an idea for complaining about unused named parameters | ||
smls | Maybe .defined needs a shorter name (akin to .so) to make encourage its use? | ||
lizmat | that would at least solve some of the issues | ||
flussence | that'd help a lot, yeah :) | ||
lizmat | smls: it's not about the name, it is about the functionality | 16:39 | |
if you find something *and* you want to know its position, you needed (before Pos) to go through hoops | |||
*or* forget the case it was found at the first position | |||
m: my $pos = "foo".index("f"); if $pos.defined { say $pos } # old situation | 16:40 | ||
camelia | rakudo-moar e3314c: OUTPUT«0» | ||
smls | right, but introducing .contains would not help at all with that | ||
lizmat | no, but it *would* clarify the intended use better... | 16:41 | |
smls | maybe | ||
16:41
cognominal left
|
|||
lizmat | and it could be made to be slightly faster than .index | 16:42 | |
basically: nqp::index( nqp::unbox_s(self.Str), nqp::unbox_s($needle.Str), nqp::unbox_i($pos.Int) ) >= 0 | 16:43 | ||
smls | For some reason, use of .index() for merely checking existence does not bother me much, but using .first/.first-index on a list for merely checking existence does bother whenever I see it | 16:44 | |
lizmat | I would say: another case for .contains :-) | ||
smls | or, make $needle == any(@haystack) really short-circuiting and optimized :P | 16:45 | |
leont would like a short-cutting contains on lists | |||
smls | What comparison would List.contains use? eqv? | 16:46 | |
leont | Yeah, that is the tricky bit | ||
If junctions in boolean context can be optimized to short-cut, that may be helpful too, but I'm not sure they could be | |||
16:47
kst left
16:48
atroxaper joined
|
|||
smls | I was always under the impression that the reason why Perl 6 does not have a .contains (or "in" operator like Python), was that we are supposed to combine junctions with a comparison operator for that | 16:50 | |
But I vaguley remember that junctions also are supposed to be allowed to parallelize, which would be mutually exclusive with short-circuiting | 16:51 | ||
16:52
atroxaper left
|
|||
smls | lizmat: Also, overloading .contains for both strings and lists, would be unusual in the context of Perl 6 | 16:53 | |
16:53
JimmyZ_ left
|
|||
smls | e.g. $string.grep does not grep characters, it treats $string as a single-element list | 16:54 | |
lizmat | good point, smls++ | ||
dalek | ast: beded9e | moritz++ | S32-io/slurp.t: Remove a test that does not work anymore |
16:57 | |
lizmat starts backlogging the past 2 weeks to be able to write the P6W | 16:58 | ||
moritz | lizmat: did you do a roeast cleanup? 'cause a "make spectest" with RAKUDO_DEPRECATIONS_FATAL=1 seems pretty clean | ||
lizmat | moritz: I haven't done much in the past 2 weeks being on the road and such | ||
I *did* remove some deprecations before the release and their associated tests | 16:59 | ||
maybe that could account for the difference? | |||
moritz | lizmat: uhm, no, it seems that RAKUDO_DEPRECATIONS_FATAL=1 doesn't do much | ||
lizmat | oh? | ||
moritz | export RAKUDO_DEPRECATIONS_FATAL=1; make t/spec/S17-su│·· | ||
pply/rotor.t | |||
passes | |||
even though there's a deprecation warning | 17:00 | ||
lizmat | hmmm..... | 17:01 | |
moritz | ah no | ||
it's a dies-ok { ... }, 'no param version illegal' | |||
and that triggers the deprecation warning | 17:02 | ||
and RAKUDO_DEPRECATIONS_FATAL=1 makes it fatal, thus passing the otherwise TODOed test | |||
lizmat | maybe we should have a RAKUDO_DEPRECATIONS_EXIT ? | ||
moritz | don't bother | 17:03 | |
is a sufficiently obscure case that we shouldn't optimize for it | |||
lizmat | okidoki :-) | ||
[Coke] | I thought we absolutely had an in operator for sets. | 17:08 | |
leont | There's unicode for that :-p | ||
TimToady | .tell mdinger the way to think about it is that all assertions are about the current cursor, so <?after foo> means "is the cursor after foo?", and <?before baz> means "is the cursor before baz?" | ||
yoleaux | TimToady: I'll pass your message to mdinger. | ||
leont | Yeah, that was initially confusing for me too | 17:09 | |
smls | [Coke]: Right, but sets are special-purpose and have a settled on === comparison for everything | 17:10 | |
moritz | not more or less confusing that look-ahead and and look-behind | ||
if you look ahead to something, it's before you, no? | |||
smls | [Coke]: The ASCII version is called $needle (elem) $haystack I think | 17:11 | |
leont | "Is foo after this" versus "is this after foo" | ||
17:11
dakkar left
|
|||
[Coke] | moritz: now you're confusing meanings of before. :P | 17:12 | |
moritz | [Coke]: am I? | ||
[Coke] | are you referring to looking ahead in time or place? | 17:15 | |
lizmat | .oO( when it's Daylight Saving Time, is it earlier or later than before? :-) |
17:16 | |
[Coke] | and did it happen before now, or does it lay before your current position? I agree with OP that this is potentially confusing. I think TimToady answered it fine. | ||
lizmat: I don't know, but I'm sure all the IT people in the room are grumpier when it's DST. :P | 17:17 | ||
Juerd | A thought crossed my mind, and please don't take this seriously: shouldn't $_ be renamed to $- now? ;) | 17:27 | |
[Coke] | m: say $-; | 17:29 | |
camelia | rakudo-moar e3314c: OUTPUT«5===SORRY!5=== Error while compiling /tmp/ZgNU7T3_VGMissing required term after infixat /tmp/ZgNU7T3_VG:1------> 3say $-7⏏5; expecting any of: prefix term» | ||
lizmat | Juerd: no, because you cannot have a trailing - | ||
Juerd | I know :) | ||
lizmat | or an identifier starting with - | 17:31 | |
b2gills | $- The number of lines left on the page of the currently selected output channel. ( from perldoc -v '$- | 17:34 | |
Juerd | b2gills: That's Perl 5 | 17:35 | |
raiph | TimToady: did you suggest a Maybe thing sitting alongside junctions that does stuff like collapsing to a Bool but value? | ||
TimToady | don't recall that | 17:36 | |
I did suggest an Each that autothreads lists though | |||
nine | smls: .index().defined is stating how it should be done, while .contains() states what should be done. | 17:38 | |
17:38
yqt left
17:41
llfourn left
|
|||
vendethiel | metacpan.org/pod/Dios Damian Conway is just insane :o). In a good way,obviously | 17:44 | |
leont | Obviously, he is! | 17:49 | |
vendethiel is now reading the source code | 17:51 | ||
leont says goodbye to vendethiel's sanity | 17:53 | ||
vendethiel | leont: I could do with a definition of "sanity" before leaving :D. | ||
17:57
rurban1 left
17:58
zakharyas joined
|
|||
leont | Being able to distinguish up and down :-p | 17:58 | |
17:58
abraxxa left
18:00
amurf joined
18:04
amurf left
18:05
mr-fooba_ left,
ChoHag joined
|
|||
ChoHag | How's perl 6's support of unicode wrt. modules and their filenames? | 18:06 | |
In particular considering that perl 5 doesn't allow non-ascii modules because of, largely, Windows' filesystem. | 18:07 | ||
lizmat | ChoHag: they should be supported, but aren't yet afaik | ||
S11:420 | 18:08 | ||
ChoHag | "internal names are Unicode-aware, even if the filesystem isn't" | 18:11 | |
Уау! | 18:12 | ||
dalek | kudo/nom: 174049f | TimToady++ | src/Perl6/Grammar.nqp: Revert "move ~~ from chaining to structural" This reverts commit 81ad2c0db9910fe7093c1db1d0e25e4710f3e67e. Consensus that the damage inflicted by changing the precedence is worse than the unnaturalness of considering ~~ a chaining op. |
18:13 | |
ast: 687df77 | TimToady++ | S (9 files): Revert "benign prep for ~~ going chained -> structural" This reverts commit ab605d96f42e531f9d544a167eef590a381a80b0. Don't need parens around ranges in ~~ again |
18:14 | ||
18:15
Begi left
|
|||
leont | ChoHag: in perl5 that could be solved, but no one @people.grep(Tuits&Win32-knowledge) eqv () | 18:26 | |
18:27
kst joined
18:28
cognominal joined
|
|||
ChoHag | That's what I figured from the reading I was able to do on the subject. | 18:32 | |
Except in English. | |||
jnthn | evening, #perl6 | 18:36 | |
Few bits from backlog (mostly gut feeling, I'm too tired for anything else :)) | 18:37 | ||
18:39
zakharyas left
|
|||
jnthn | On the eternal *%_ complaining (I guess 'cus named params are overused and Liskov is underunderstood :P): I wonder if we should make it be invocations with callsame/nextsame/callwith/nextwith that tolerate dropping extra named args, since that's where you actually want it. And normal invocations don't. | 18:40 | |
Basically, a failover on the "do we have any extra named args" check that realizes the invocation was done through callsame and friends. | |||
And fails to complain in that case. | |||
18:41
muraiki joined
|
|||
lizmat | jnthn o/ | 18:41 | |
jnthn | Probably we have to make $foo.Bar::baz() also behave the same way too | ||
o/ lizmat | |||
18:42
FROGGS joined
|
|||
jnthn | On 'for $supply.list { }': it's an anti-pattern to do this most of the time. It's occasionally useful. I would say it's useful in demos, but last time I did the .Net equivalent in a live demo my code deadlocked on itself. :P | 18:43 | |
The reason being that it is an async/sync transition. Such boundaries are inherently dangerous. | |||
On hyper op parallelization semantics: I think we probably should have the operator form of hyper try to DWIM, and let named args be used to the method equivalents for when you really need the escape hatch. | 18:45 | ||
18:46
bin_005 joined,
pdcawley left
|
|||
jnthn | Experience tells that too many folks think they can beat the runtime's decisoins without actually seeing if that's true...and even when they're right on the system they test the code on, that can all be undone by deploying on different hardware or on a loaded system (vs. their unloaded development machine). | 18:46 | |
So I'm inclined to dehuffmanize the "I want to over-specify things" path. | 18:47 | ||
lizmat | jnthn: so I understand, you're talking about @list>>.foo ? | 18:48 | |
jnthn | lizmat: Yeah | ||
Well, I'm talking more generally, but that's an example. | 18:49 | ||
18:49
Hor|zon left
|
|||
lizmat | my idea was that methods would specify how they would like to be batched in hypers (if at all) | 18:49 | |
jnthn | The method is only one axis of the decision making, though. | 18:50 | |
18:50
inokenty left
|
|||
jnthn | And you might legitimately want to make different decisoins in different uses of the method. | 18:51 | |
lizmat | what is the other axis then? Number of threads / cores available ? | ||
jnthn | Size of data set, and whether you care more about throughput or latency. | ||
raiph | isn't batching (1 or 100) what lazy vs mostly lazy was about? | ||
lizmat | but how can the system know from the outside how much CPU / wallclock a method will take ? | 18:52 | |
jnthn | raiph: No; hyper is a form of eager that can thread. | ||
raiph | thanks | ||
jnthn | (We have used the word batching in the context of laziness though, so I understand the confusion. :)) | 18:53 | |
lizmat: You can't know, but you can measure and use the past to predict the future. | |||
lizmat: And even then you have to be somewhat dynamic about it. | 18:54 | ||
lizmat | ok, that would imply starting with one and adapting along the way ? | ||
jnthn | Crappy example 'cus I'm tired, but (^1000)>>.&a-stupid-recursive-fib-impl has vastly different costs for different calls over time. | ||
lizmat: Yes. | 18:55 | ||
lizmat: Thankfully there's lots of prior art we can look at on this. :) | |||
lizmat: I think hill-climbing algos are common in this space, though. | 18:56 | ||
I think that's what we should do as the default, anyways. But I'm all for a control know too. I just thing it's most useful on a use-case basis. | 18:57 | ||
For example, if I'm throwing results onto a UI then I'd like to work in small batches to get the latency down. If I'm just crunching away non-interactively, I'd prefer bigger batches to keep the thread communication down. | 18:58 | ||
uh, an control *knob* | |||
and an a... | |||
18:58
estrabd_afk is now known as estrabd
|
|||
jnthn | en.wikipedia.org/wiki/Hill_climbing is the thing I'm talking about, fwiw | 19:00 | |
19:00
Alina-malina joined
19:07
spider-mario joined
|
|||
lizmat | moritz: shall I mention the Rakudo * Release Candidate at hack.p6c.org/~moritz/rakudo-star-2...RC0.tar.gz ? | 19:14 | |
moritz | lizmat: uhm, I could also just release it :-) | ||
lizmat | Fine by me too :-) | 19:15 | |
.oO( long live P6W driven development :-) |
|||
19:15
beastd joined
|
|||
timotimo | long live the lizmat | 19:17 | |
moritz | hack.p6c.org/~moritz/rakudo-star-2015.07.tar.gz tests welcome | 19:20 | |
lizmat | moritz: you want me to use that URL ? | 19:23 | |
moritz | lizmat: no | ||
lizmat | okidoki | ||
moritz | release tagged, tarball uploaded | 19:25 | |
lizmat: you can link to rakudo.org/2015/07/27/announce-raku...e-2015-07/ :-) | 19:27 | ||
lizmat | moritz++ (done) | ||
19:28
jkva joined
|
|||
timotimo | is [release 2015.07.2] supposed to have brackets around it? | 19:29 | |
Notable changes in modules in modules: | 19:31 | ||
moritz | timotimo: linkified | ||
timotimo | there's one in modules in modules too modules in | ||
dalek | ar: 60ecaef | moritz++ | docs/announce/2015.07.md: Grammar fix, timotimo++ |
19:32 | |
19:34
mr-foobar joined
19:36
[Sno] left,
zakharyas joined,
espadrine_ joined
19:37
ChoHag left,
darutoko left,
yqt joined,
llfourn joined
|
|||
timotimo | moritz++ # rakudo star release | 19:37 | |
jnthn | going for some rest...back tomorrow & | 19:39 | |
dalek | ar: f5f2ca3 | moritz++ | tools/star/release-guide.pod: mention 2015.07 release in release-guide.pod |
19:41 | |
moritz | jnthn: have a RESTful night :-) | 19:42 | |
19:42
llfourn left,
zakharyas left
|
|||
moritz | R* release process finally winding down | 19:43 | |
... except for the missing .msi | 19:44 | ||
19:45
Hor|zon joined
19:48
dha joined
19:49
brrt joined,
rurban1 joined
19:50
espadrine_ left,
Hor|zon left
|
|||
dha | I'm sure this is just me being confused, but where the heck is panda in my rakudo distribution? | 19:50 | |
lizmat | it's not | 19:51 | |
panda lives separately, or in rakudo star | |||
or installed with rakudobrew | |||
dha | I keep getting confused about rakudo vs. rakudo star. | ||
lizmat | generally, we don't announce rakudo compiler outside the echo chamber, just rakudo star | 19:52 | |
dha | *nod* | ||
19:55
raiph left
|
|||
RabidGravy | but if you already installed rakudo & panda via rakudobrew then reinstall rakudo with it you'll get the new panda and all the modules reinstalled | 19:55 | |
19:56
smls_ joined,
smls left,
cognominal left
|
|||
moritz | panda intall Task::Star | 19:56 | |
20:00
[Tux] left
|
|||
dha | I've not been using rakudobrew. In fact, I've not installed rakudo. Just been using it in its own directory. | 20:03 | |
rakudobrewing now, though. | |||
Which, using the airplane's wifi, should be tons of fun. | |||
lizmat | .oO( building in the very fast lane ) |
20:04 | |
nine has never used rakudobrew | |||
I just have a git checkout of rakudo and panda and do make install in rakudo | 20:05 | ||
lizmat | looking at $a.?foo and $a.*foo and $a.+foo | ||
I've seen the first abused a lot when in fact we only want to call the method if the object is instantiated | 20:06 | ||
so sometimes I think we need something like: | |||
20:06
Hor|zon joined
|
|||
lizmat | $a//.foo | 20:06 | |
this would call "foo" on $a if $a was defined | |||
20:06
jkva left
|
|||
lizmat | m: sub infix:<//.>($obj,$method) { $obj.DEFINITE ?? $obj.$method !! Nil }; my $a; sub b { $^a + 2 }; say $a//.&b # something like this | 20:07 | |
camelia | rakudo-moar 174049: OUTPUT«Nil» | ||
lizmat | m: sub infix:<//.>($obj,$method) { $obj.DEFINITE ?? $obj.$method !! Nil }; my $a = 40; sub b { $^a + 2 }; say $a//.&b # same, now defined | ||
camelia | rakudo-moar 174049: OUTPUT«42» | ||
lizmat | note the messy &b is needed to make sure we have a callable there | ||
was this functionality discussed in the past in some way ? | 20:08 | ||
20:10
diana_olhovik left
|
|||
ShimmerFairy | lizmat: Any reason you couldn't use Callable $method or &method in the parameter list? (But for a sub call, you need & to use it as a method anyway) | 20:12 | |
lizmat | m: sub infix:<//.>($obj,$method) { $obj.DEFINITE ?? $obj.$method !! Nil }; my $a = 40; say ($a//.Str).perl # this actually works ??? | 20:14 | |
camelia | rakudo-moar 174049: OUTPUT«"40"» | ||
lizmat | probably not very optimized, as $method is a Str there | ||
m: sub infix:<//.>($obj,$method) { dd $obj, $method; $obj.DEFINITE ?? $obj.$method !! Nil }; my $a = 40; say ($a//.Str).perl | 20:15 | ||
camelia | rakudo-moar 174049: OUTPUT«$obj = 40$method = Str"40"» | ||
lizmat | so we would need some syntactic sugar there | ||
ShimmerFairy | lizmat: Now I see why you thought you needed the & , and now I'm surprised it works too. | 20:16 | |
lizmat | m: sub infix:<//.>($obj,$method) { $obj.DEFINITE ?? $obj.$method !! Nil }; my $a = 40; say ($a//.foo).perl # interesting | ||
camelia | rakudo-moar 174049: OUTPUT«5===SORRY!5=== Error while compiling /tmp/HepXEsCotMUndeclared routine: foo used at line 1» | ||
lizmat | so, if it is not known, it thinks it's a sub | 20:17 | |
ShimmerFairy | m: sub infix:<//.>($obj,$method) { dd $obj, $method; $obj.DEFINITE ?? $obj.$method !! Nil }; my $a = 40; say ($a//.pred).perl | ||
camelia | rakudo-moar 174049: OUTPUT«5===SORRY!5=== Error while compiling /tmp/bgsotB_n_RUndeclared routine: pred used at line 1» | ||
lizmat | and if it *is* known, it is passed as a string | ||
ShimmerFairy | lizmat: It always thinks it's a sub, you were just trying methods with sub versions, it turns out :) | 20:18 | |
brrt | \o | 20:19 | |
ShimmerFairy | o/ | ||
brrt | hmm | 20:20 | |
i'm not sure i can formulate my question clearly enough to expect an answer | |||
rurban1 | Dios is nice, but with its PPI dependencies too big. t/alias.t compiles to a 18M c files which runs out of memory. Do you like it's syntax? The {{{ }}} interpolation with <{ … }> expansion syntax is esp. ugly. I used `` for expansion. | 20:21 | |
brrt | i'm trying to prune the combinations of rules to those that will actually appear | ||
nine | m: role Foo { $?CLASS.^add_method(list => method (|args) {}); }; my $class := Metamodel::ClassHOW.new_type( name => "Foo" ); $class.^add_role(Foo); $class.^compose; | 20:23 | |
camelia | rakudo-moar 174049: OUTPUT«Cannot find method 'collisions' in any apply at src/gen/m-Metamodel.nqp:2633 in any compose at src/gen/m-Metamodel.nqp:2810 in block <unit> at /tmp/lTIz0X99Nd:1» | ||
nine | why?? ^^^ | ||
m: role Foo { $?CLASS.^add_method("list", method (|args) {}); }; my $class := Metamodel::ClassHOW.new_type( name => "Foo" ); $class.^add_role(Foo); $class.^compose; | |||
camelia | ( no output ) | ||
ShimmerFairy | nine: probably because the Pair is gobbled up by *%_ , would be my guess | 20:24 | |
m: role Foo { $?CLASS.^add_method((list => method (|args) {})); }; my $class := Metamodel::ClassHOW.new_type( name => "Foo" ); $class.^add_role(Foo); $class.^compose; | |||
camelia | rakudo-moar 174049: OUTPUT«Cannot find method 'collisions' in any apply at src/gen/m-Metamodel.nqp:2633 in any compose at src/gen/m-Metamodel.nqp:2810 in block <unit> at /tmp/KiczotfpnX:1» | ||
nine | This "Cannot find method 'collisions'" appears in some constellations and not in others. But I cannot find a system | ||
20:24
atroxaper joined
|
|||
nine | It's not the =>. That's just one way to provoke it. In Inline::Perl5 it fails without a => | 20:25 | |
ShimmerFairy | nine: and I'm guessing there's a reason you can't just do role Foo { method list (|args) { } } and class Foo { ... } :) | ||
nine | ShimmerFairy: of course :) The class name is only known at runtime and the methods I add are Any.^methods | 20:26 | |
Oh, I think I know the system! It appears on any error during method creation: | 20:29 | ||
m: role Foo { for Any.does-not-work -> $name { $?CLASS.^add_method($name, method (|args) {}); }; }; my $class := Metamodel::ClassHOW.new_type( name => "Foo" ); $class.^add_role(Foo); $class.^compose; | |||
camelia | rakudo-moar 174049: OUTPUT«Cannot find method 'collisions' in any apply at src/gen/m-Metamodel.nqp:2633 in any compose at src/gen/m-Metamodel.nqp:2810 in block <unit> at /tmp/9KSnt7YtMK:1» | ||
20:29
atroxaper left
|
|||
ShimmerFairy | m: role Foo { $?CLASS.^add_method((list => method (|args) {})); }; my $class := Metamodel::ClassHOW.new_type( name => "Foo" ) but Foo; say $class; # mixing in the role with "but" | 20:30 | |
camelia | rakudo-moar 174049: OUTPUT«'Foo+{Foo}' cannot inherit from 'Foo' because 'Foo' isn't composed yet (maybe it is stubbed) in any add_parent at src/gen/m-Metamodel.nqp:774 in any generate_mixin at src/gen/m-Metamodel.nqp:1290 in any mixin at src/gen/m-Metamodel.nqp:1250 …» | ||
nine | m: role Foo { for <foo foo> -> $name { $?CLASS.^add_method($name, method (|args) {}); }; }; my $class := Metamodel::ClassHOW.new_type( name => "Foo" ); $class.^add_role(Foo); $class.^compose; | 20:33 | |
camelia | rakudo-moar 174049: OUTPUT«Cannot find method 'collisions' in any apply at src/gen/m-Metamodel.nqp:2633 in any compose at src/gen/m-Metamodel.nqp:2810 in block <unit> at /tmp/cYVtXaM62J:1» | ||
nine | I think this is what happens in Inline::Perl5 ^^^ | 20:34 | |
I'm trying to add a method that is already inherited from somewhere. Ironically this works just fine when I crate the class using EVAL "class GLOBAL::$module does Perl5Package[\$p5, \$module] { }"; | 20:35 | ||
ShimmerFairy | nine: maybe you can use a macro that creates a method instead of trying to go through the metamodel? (I'm not familiar with doing such complex language trickery, so I'm afraid I can't be of much help) | 20:36 | |
20:37
llfourn joined
20:42
llfourn left
20:43
bin_005 left
20:44
dalek left
20:45
rurban left,
dalek joined,
ChanServ sets mode: +v dalek
|
|||
nine | Ok, I think the loop adding methods runs multiple times. No idea why though. A next if $?CLASS.^declares_method($name); in the loop seems to help. | 20:48 | |
20:54
bin_005 joined
|
|||
nine | "An exception occurred while evaluating a BEGIN" | 20:55 | |
Is it me or has rakudo's error reporting become drastically worse in the past few days? I'm now getting such usefull messages... | |||
skids | .oO(If we implemented failures to spec we could just have my $nosink = Any.method.fails.down.to.this.semicolon; # and not deal with syntax sugar.) |
20:56 | |
20:57
brrt left
|
|||
ShimmerFairy | nine: There was something about error reporting over the last few days. Though if this is your first time messing with the MOP, I'd blame delving deeper into the internals as a cause for more cryptic errors :P | 20:59 | |
21:00
dha left,
RabidGravy left
|
|||
nine | ShimmerFairy: unfortunately it's not only the messing around with the MOP | 21:00 | |
m: class Foo is Mu { }; say Foo.new ~~ Pair; | 21:01 | ||
camelia | rakudo-moar 174049: OUTPUT«X::Multi::NoMatch exception produced no message in block <unit> at /tmp/JcPiZmeThD:1» | ||
nine | ^^^ another example of a pretty useless error message | ||
skids | Because someone did not put a .message in that. | ||
nine | And I have the feeling that "Cannot find method 'collisions'" is also new | ||
There is code that should tell me that the message already exists | 21:02 | ||
s/message/method/ | |||
21:02
bin_005 left
|
|||
skids | Hrm what did you do to get the X::Multi::NoMatch? | 21:03 | |
OIC nm | |||
I'll look at that when I get home. That should not happen. | |||
it has a .message method. | 21:04 | ||
21:04
dha joined
|
|||
skids | (And is likely my fault somehow.) | 21:04 | |
21:05
[Sno] joined
|
|||
nine | Ok, the "Cannot find method 'collisions'" was already there on July 18th | 21:06 | |
class Foo is Mu { }; say Foo.new ~~ Pair; gave an equally unhelpful "Invocant requires a 'Failure' instance, but a type object was passed. Did you forget a .new?" | 21:07 | ||
skids | I've only seen that one when doing something truly abusive with roles/scoping. | ||
nine | skids: so actually your changes really were an improvement. There's just more to be gained :) | ||
skids | Well, if there really is a type object being passed in, then no, that would not be an improvement. Anyway decommute and then I'll dig at it a bit. | 21:09 | |
21:09
telex left
|
|||
nine | Since I only do Foo.new ~~ Pair, I think the source of the error is a missing ACCEPTS that Any would provide. | 21:09 | |
X::Multi::NoMatch is a mild indication to that effect. | |||
smls_ | lizmat: "was this functionality discussed in the past" -- I tried to. :P I think TimToady told me to use 'andthen'. (Once it works correctly. But even then, the low precedence will be bothersome.) | 21:10 | |
21:10
telex joined
|
|||
smls_ | i.e. ($obj andthen .method) | 21:10 | |
My biggest gripe with "andthen" is actually, that its name makes it sounds like a version of "and" (which checks for truthiness), but it instead checks for definedness. | 21:12 | ||
lizmat | m: my Int $a; say $a andthen .succ # how is this supposed to work ? | 21:13 | |
camelia | rakudo-moar 174049: OUTPUT«(Int)Method 'succ' not found for invocant of class 'Any' in block <unit> at /tmp/9tjkbHrpId:1» | ||
21:13
skids left
|
|||
lizmat | m: my Int $a; say $a andthen $a.succ # huh? | 21:14 | |
camelia | rakudo-moar 174049: OUTPUT«(Int)Invocant requires a 'Int' instance, but a type object was passed. Did you forget a .new? in block <unit> at /tmp/s8WBKf681l:1» | ||
ShimmerFairy | m: my Int $a; say ($a andthen .succ); # low precedence caught you here, looks like | ||
camelia | rakudo-moar 174049: OUTPUT«(Int)» | ||
smls_ | andthen is supposed to make the LHS available as $_ before evaluating the RHS | 21:16 | |
diegok | Hello, is there any config or anything to make p6 repl more friendly? | 21:23 | |
dha | define "friendly". :-) | 21:24 | |
smls_ | diegok: If you install the Linenoise module, the REPL will automatically use it and you'll get proper line editing, tab completion, and history support. | 21:25 | |
21:25
Fleurety left
|
|||
diegok | smls_: thanks!, installing it :-) | 21:26 | |
21:26
paulmcquad joined,
paulmcquad left
21:27
egrep joined,
egrep left
|
|||
smls_ | Maybe the REPL should print a corresponding hint when started... | 21:28 | |
Python's REPL prints 3 lines of intro messages when starting the REPL; Perl 6 prints none so far... | 21:29 | ||
diegok | smls_: looks like a good idea... now I should understand why it isn't working for me :-( | 21:30 | |
dha | Ironic. I'd expect Python to print 3 lines of whitespace. | ||
;-) | |||
diegok | dha: or tabs... | ||
smls_ | "Rakudo version 2015.07.1-11-ge3314c8 [no line-editing support enabled]. Type 'help' for info." -- an intro message like this could really increase discoverability of the Linenoise feature... | 21:31 | |
dha | Yeah, I just found something about Linenoise today. I would have liked to have found it some time ago. :-) | 21:32 | |
smls_ | diegok: With "isn't working" you mean that even after installing the Linenoise Perl 6 module, the REPL doesn't have line editing support for you? | 21:33 | |
diegok | smls_: right :-/ | ||
21:34
Fleurety joined
|
|||
smls_ | How did you install it? I installed Rakudo and panda via rakudobrew, and Linenoise via "panda install Linenoise", and it works for me. | 21:35 | |
diegok | smls_: Linenoise module seems to be installed as I can 'use' it but has no effect :-/ | ||
smls_: I've installed rakudo-star using homebrew today | 21:36 | ||
dha | Huh. I just got this error message when running the perl6 after installing Linenoise: "Cannot locate native library 'liblinenoise.dylib': dlopen(liblinenoise.dylib, 1): image not found" | ||
? | |||
diegok | smls_: and installed Linenoise with panda | ||
smls_ | strange | ||
21:37
amurf joined
|
|||
diegok | dha: rjbs.manxome.org/rubric/entry/2081 ? | 21:37 | |
dha | Thanks. I'll see if that helps. | 21:41 | |
21:42
amurf left
|
|||
dha | Out of curiosity, where would panda be installing things? | 21:46 | |
Ok. used rjbs's fix, and I'm not getting the error, but the line editing still isn't working. :- | 21:53 | ||
/ | |||
21:53
colomon_ joined
|
|||
dha | Ah. Now it's working. yay. | 21:53 | |
diegok | hm... looks like I should use rakudobrew again :-) | 21:54 | |
21:55
dolmen joined
|
|||
lizmat has wrought another P6W: p6weekly.wordpress.com/2015/07/27/...e-present/ | 21:57 | ||
21:58
colomon joined
21:59
dha left
22:00
colomon_ left
|
|||
lizmat | good night, #perl6! | 22:01 | |
colomon | o/ | ||
yoleaux | 11:36Z <jdv79> colomon: smoke is stalled | ||
22:06
colomon left
22:09
dha joined
22:15
kaare_ left
22:19
Begi joined,
beastd left
22:20
fling left
22:26
fling joined,
rurban joined
22:27
dolmen left,
rurban1 left
22:30
Begi left
22:34
bjz left
22:38
llfourn joined
22:39
rurban left
|
|||
diegok | smls_: it just works with a fresh rakudobrew install, yay! | 22:41 | |
22:43
llfourn left,
skids joined
22:48
dha left
22:51
dha joined
22:54
fling left
22:58
Mhoram left,
fling joined
22:59
Mhoram joined
23:00
khw joined
|
|||
skids | m: class Foo is Mu { }; say Foo.new ~~ Failure; 1; | 23:01 | |
camelia | rakudo-moar 174049: OUTPUT«X::Multi::NoMatch exception produced no message in block <unit> at /tmp/pPbuN9_oSG:1» | ||
23:02
smls_ left
|
|||
skids | Yeah. Because one of the things X::Multi::Nomatch.message does is take the Foo.new and ~~ Failure with it. And off in circles we go. | 23:02 | |
Similar to the problem that necessitated github.com/rakudo/rakudo/pull/479 | 23:04 | ||
23:05
amurf joined
|
|||
skids | nine: ^^^ | 23:05 | |
Really some of the core X:: classes are way too optimistic about how many language features they are allowed to get. | 23:09 | ||
*use | |||
23:16
spider-mario left,
lsm-desktop left
23:28
lsm-desktop joined
23:30
dha left
23:43
BenGoldberg_ joined
23:46
Mhoram left
23:47
leont left
23:48
Mhoram joined
23:54
bloomburgers joined
|
|||
bloomburgers | anyone know if rakudo supports method stubs in roles? I seem to be getting errors | 23:55 |