»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend! Set by moritz on 22 December 2015. |
|||
mr_micawber | Have a rational question now: How do I turn an Array of Lists into a flat Array. .flat doesn't cut it. | 00:00 | |
ugexe | .map(*.flat) or .map(*.flat).flat | 00:01 | |
leont | .flatmap(*.flat) ? | ||
00:01
avenj joined,
avenj left,
avenj joined
|
|||
leont | m: [ ( 1, 2), (3, 4) ].map(*.flat).perl.say | 00:02 | |
camelia | rakudo-moar 0fa13c: OUTPUT«((1, 2).Seq, (3, 4).Seq).Seq» | ||
leont | m: [ ( 1, 2), (3, 4) ].flatmap(*.flat).perl.say | ||
camelia | rakudo-moar 0fa13c: OUTPUT«(1, 2, 3, 4).Seq» | ||
leont | m: [ ( 1, 2), (3, 4) ].flatmap(*.flat).list.perl.say | ||
camelia | rakudo-moar 0fa13c: OUTPUT«(1, 2, 3, 4)» | ||
mr_micawber | Seems quite wordy ;-) Back to hacking! | 00:03 | |
leont tends to flatten things all the time, that may just be his style | 00:04 | ||
AlexDaniel | mr_micawber: rt.perl.org/Public/Bug/Display.html?id=127121 | ||
mr_micawber: may be relevant to your question | |||
mr_micawber | Studying... | 00:05 | |
bpetering | rosettacode /% | 00:06 | |
* /^B/ half done | |||
about half work, I'll fix the rest soon | |||
00:06
vividsnow left,
vividsnow joined
|
|||
Skarsnik | good night #perl6 | 00:07 | |
bpetering | night! | ||
00:09
Skarsnik left
00:10
mr_micawber left,
AlexDaniel left
00:13
xpen joined
|
|||
grondilu | Juerd: you tagged rosettacode.org/wiki/Arithmetic-geo...lculate_Pi as broken but it works fine with me. | 00:17 | |
00:17
xpen left
|
|||
grondilu | $ perl6 --version | 00:18 | |
00:18
felher_ joined
|
|||
grondilu | This is Rakudo version 2015.12-69-g3568c1e built on MoarVM version 2015.12 | 00:18 | |
implementing Perl 6.c. | |||
bpetering | works fine for me too ("This is Rakudo version 2015.12 built on MoarVM version 2015.12 | 00:19 | |
implementing Perl 6.c") | |||
00:19
iml_ left
|
|||
grondilu pulls the very latest rakudo and compiles | 00:20 | ||
flussence | works on 2015.12-116-g0fa13c0e85ef too | 00:21 | |
00:23
joydo joined
00:24
llfourn joined
00:29
llfourn left
|
|||
timotimo | uh ... bwuh? | 00:30 | |
gist.github.com/timo/aba86c6375b4c1857839 - why do i get a bunch of allocations regarding an X::Dynamic::NotFound every time the loop there runs? | 00:31 | ||
00:32
regreg left,
bobh joined
|
|||
timotimo | it doesn't cause much of time usage, but why does it do that at all? | 00:32 | |
skids | Some code is generating a soft Failure object and then handling it before it gets thrown. | 00:35 | |
00:35
bobh left
|
|||
bpetering | huggable: life, the universe and everything | 00:35 | |
huggable | bpetering, nothing found | ||
dalek | kudo/nom: f6b956d | timotimo++ | src/core/HyperSeq.pm: remove debug output, see also RT #127190 |
00:36 | |
skids | Though odd that the X::AdHoc and the X::Dynamic::Notfound are both alloced -- I would expect a failure to only need one X:: | ||
00:36
itaipu joined
|
|||
Mouq | depends on when INITIALIZE_DYNAMIC gets called; that's the only thing that creates those, AFAICT | 00:36 | |
Juerd | grondilu: It works fine here too. I probably just used the wrong tag. Thanks for letting me know. | 00:37 | |
00:38
ZoffixWin left
|
|||
timotimo | skids: i think the X::AdHoc is there just to get a backtrace ... | 00:38 | |
oh | 00:40 | ||
i think i know what that is | |||
probably the code for filtering out repetitions in .gist | |||
i wonder if there's some magic nqp:: op that can figure out if a dynamic variable "exists" | 00:41 | ||
skids | If Backtraces could be serialized (I tried they cannot) then one might be able to, when conditions merit it, create one static Failure object that just serves as a marker for a particular area of code, which would never need allocation of anything until it got thrown. You don't always need a freshly created creation-time bt. | 00:42 | |
timotimo | i ... don't think that'd work | 00:43 | |
the earlier parts of the bt are unlikely to match whatever earlier object you've built | |||
Mouq | nqp::isnull(nqp::getlexdyn(nqp::unbox_s(name))) ? | 00:44 | |
skids | Yeah but sometimes you just want the first backtrace to give a line number somewhere near the right place to look, and it is otherwise useless (the second one is what matters). | 00:45 | |
Often the first bactrace is mostly redundant to the second one. | 00:46 | ||
In general we could use some more flavors of Failure behavior. | |||
Mouq | m: use nqp; my $*foo = 1; { say nqp::isnull(nqp::getlexdyn('$*foo')) } | ||
camelia | rakudo-moar 0fa13c: OUTPUT«0» | ||
Mouq | m: use nqp; my $*foo = 1; { say nqp::isnull(nqp::getlexdyn('$*bar')) } | ||
camelia | rakudo-moar 0fa13c: OUTPUT«1» | ||
lsm-desktop | k/ | 00:47 | |
timotimo | cool | ||
Mouq++ | |||
this is unlikely to be worthwhile, but i'll patch it in anyway :) | |||
Hotkeys | since we have List.flatmap can we get List.flatgrep? | ||
00:47
lsm-desktop is now known as lsm
|
|||
Hotkeys | :p | 00:47 | |
leont | Why would that make sense? | 00:49 | |
Hotkeys | it might not I'm just doing some golfing and it would save a character | ||
:p | |||
00:50
zwu joined,
pjscott joined
|
|||
leont | Fair enough :-p | 00:50 | |
00:52
pjscott left
|
|||
timotimo | so anyway ... looking at the output for a few different classes, it seems like the BUILDALLPLAN costs only very, very little time all in all | 00:59 | |
er, i mean executing the BUILDALLPLAN via BUILDALL | 01:00 | ||
before i measured i had been thinking about maybe implementing jumplists in the optimizer or inside spesh, as that'd trigger in the BUILDALL "interpreter" | |||
hm, actually i put the start time measurement before the call to BUILDALLPLAN | 01:03 | ||
i wonder if that changes things | |||
01:04
Psyche^_ joined
01:05
leont left
01:06
pjscott joined,
pjscott left
|
|||
zwu | Hi, what is signature binding. Please give me an example code, thanks. The code line in doc my (*@x) := foo(); # signature binding, but I didn't see the variable @x. | 01:07 | |
01:09
Psyche^ left
|
|||
timotimo | i don't understand | 01:12 | |
01:17
uruwi left,
BenGoldberg joined
01:19
uruwi joined
|
|||
Mouq | zwu: 'my (...) := ...' is a lot like the calling function 'sub baz (...) {}; baz(...)', and you can use many of the same symbols. For example: | 01:20 | |
m: my (|c) := (1,2,3, :foo<bar>); say c | |||
camelia | rakudo-moar f6b956: OUTPUT«\(1, 2, 3, :foo("bar"))» | ||
Mouq | m: my (*@a, *%h) := (1,2,3, :foo<bar>); say @a; say %h | ||
camelia | rakudo-moar f6b956: OUTPUT«[1 2 3]foo => bar» | ||
Mouq | m: my ($a,:$foo,|) := (1,2,3, :foo<bar>); say $a; say $foo | ||
camelia | rakudo-moar f6b956: OUTPUT«1bar» | ||
Mouq | Does that address you question? | 01:21 | |
01:21
lichtkind left
01:23
kaare_ joined
|
|||
zwu | yes, thanks Mouq. Finally understand the signature binding to each individual variables, is the * in the *@a here for the whatever? | 01:24 | |
Mouq | Kinda :) doc.perl6.org/type/Signature#Slurpy...Parameters | 01:25 | |
01:25
llfourn joined
01:27
wamba left
|
|||
zwu | Great! Thanks! | 01:28 | |
I love it! | |||
01:30
llfourn left
|
|||
zwu | it is more flexible in the form of signature binding, and I prefer my (*@a, *%h) := (1,2,3, :foo<bar>) over my (@a,*%h) := ([1,2,3],:foo<bar>) | 01:31 | |
01:32
ykk_ joined
|
|||
Juerd | m: my @foo = ^3; @foo ,= 3; say @foo; | 01:32 | |
camelia | rakudo-moar f6b956: OUTPUT«(\Array_65238112 = [Array_65238112 3])» | ||
Juerd | ,= was really neat pre-glr. Oh well. | ||
Although someone might find a use for it anyway :) | 01:34 | ||
zwu | sorry, what is the ,= here | ||
Juerd | m: my $foo = 1; $foo ,= 2; say $foo; | ||
camelia | rakudo-moar f6b956: OUTPUT«(\List_57377656 = (List_57377656 2))» | ||
01:35
yeahnoob joined
|
|||
Juerd | zwu: Oh, don't pay much attention to it. It's an operator like += but it isn't really useful :) | 01:35 | |
zwu: Perl 6 lets a lot of operators exist automatically, so if you define an infix operator ♥ you get ♥= for free. | |||
zwu: Likewise, FOO ,= BAR means FOO = FOO , BAR | |||
At some point in Perl 6 history, that worked like .append | 01:36 | ||
01:36
kid51 joined,
ykk_ left
|
|||
zwu | thanks, I know how powerful the operators features! | 01:36 | |
Mouq | m: sub infix:<♥> ($a,$b) { "$a loves $b" }; my $info = "Mouq"; $info ♥= $*PERL; say $info | 01:38 | |
camelia | rakudo-moar f6b956: OUTPUT«Mouq loves Perl 6» | ||
Juerd still really loves .= and how that works out with type objects | |||
Mouq: Nice example! | |||
timotimo | aye, .= is neato | 01:39 | |
Mouq | . is an infix now, isn't it? So .= isn't as much of a hack anymore either | 01:40 | |
m: say "abcd" . comb | |||
camelia | rakudo-moar f6b956: OUTPUT«(a b c d)» | ||
01:40
[MadcapJake] joined
|
|||
Juerd | m: sub infix:<♥> ($a,$b) { "$a loves $b" }; my &infix:<loves> := &infix:<♥>; my $info = "Juerd also"; $info loves= $*PERL; say $info; | 01:40 | |
camelia | rakudo-moar f6b956: OUTPUT«Juerd also loves Perl 6» | ||
Mouq | Haha :) | ||
Juerd | Texas love. | ||
[MadcapJake] | lol | 01:41 | |
Juerd | Mouq: . is an infix iff you use whitespace. | ||
ugexe | heh. so on the topic of windows invalid paths again... my $path = "foo:bar"; $path.IO.spurt("xxx"); say $path.IO.slurp.chars #`(3) say $path.IO.e #`(True) say $*CWD.dir[0].e #`(False) (also cmd.exe dir shows `foo` and Explorer shows `foo`) | ||
Juerd | Mouq: Whitespaceless . is still a specially parsed thing, with very tight precedence. | ||
[MadcapJake] | That was my first irc message seen inside Solus OS, I'm going to try and wire up some Solus packages for installing Rakudo and Panda | 01:42 | |
Mouq | Juerd: right :) | ||
ugexe | so you can use invalid characters in file names just fine, except `.dir` doesnt handle them properly | ||
Juerd | Mouq: So I guess that while .= is no longer a hack, . can now rightfully be considered one... ;) | ||
timotimo | . ? | 01:43 | |
oh, i see | 01:44 | ||
Mouq | Push down in one place and it pops up in another vOv | ||
ugexe: I'd file it :/ | 01:46 | ||
ugexe | i think its more windows problem | 01:47 | |
01:50
alber left
|
|||
timotimo | Mouq: such is the life of the waterbed | 01:52 | |
zwu | I know the powerful named parameter as adverb, most time it is using the bool variable. Can we just have a naming tag for that name parameter such as foo($a, Mu :$adverb), in which $adverb can be undefined but just for the purpose of method dispatch? | 01:53 | |
01:53
bpetering left
|
|||
Juerd | m: multi sub foo (:$bool where so *) { say "Yay" }; multi sub foo (:$bool) { say "Nay" }; foo(:bool); foo(); foo(:!bool); :foo(bool => 42); | 01:57 | |
camelia | rakudo-moar f6b956: OUTPUT«WARNINGS for /tmp/2ZZSVBp4Jz:Useless use of ":foo(bool => 42)" in sink context (line 1)YayNayNay» | ||
01:57
itaipu left
|
|||
Juerd | Argh, a : too many. | 01:57 | |
m: multi sub foo (:$bool where so *) { say "Yay" }; multi sub foo (:$bool) { say "Nay" }; foo(:bool); foo(); foo(:!bool); foo(bool => 42); | |||
camelia | rakudo-moar f6b956: OUTPUT«YayNayNayYay» | ||
timotimo | for multiple dispatch, named parameters are only ever used for stalemate breaking, so you'll have to put the candidates in the right order in your source code | ||
Juerd | zwu: Something like that? | ||
zwu | given the multimethod dispatch, can we have similar generic template in c++, which instantiates to multiple methods/class from the template? | ||
Juerd doesn't know C++ well enough to answer that question | 01:58 | ||
timotimo | hm, we don't have multi roles, eh? that'd be weird. | 01:59 | |
but we do have parametric roles, and you can mix in at run time | 02:01 | ||
zwu | I think the :named parameter restriction used for the multiple dispatch maybe more powerful and flexible than C++ template functions, | ||
Juerd | If there's any language feature that C++ does better than Perl 6 something went wrong ;) | 02:03 | |
timotimo | "speed"? ;) | 02:08 | |
the way c++ and java restrict subclasses method signatures can be useful | |||
for static analysis and such | |||
Juerd | timotimo: Speed is not a language feature :) | 02:11 | |
And yes, restrictions can be useful, but it's hard to argue that it's better to not have features because it enables other features. | 02:12 | ||
I think that in general, more expressive languages tend to be slower and harder to analyse. | 02:13 | ||
02:14
xpen joined
|
|||
Juerd | m: sub foo (@bar[4]) { say @bar }; my @x[4] = ^3; say @x; say foo(@x); | 02:16 | |
camelia | rakudo-moar f6b956: OUTPUT«5===SORRY!5=== Error while compiling /tmp/v7QDOVhL9cVariable '@bar' is not declaredat /tmp/v7QDOVhL9c:1------> 3sub foo (@bar[4]) { say 7⏏5@bar }; my @x[4] = ^3; say @x; say foo(@» | ||
timotimo | hm, shapes in argument lists are not parsed, eh? | 02:17 | |
Juerd | The same code compiles in my local rakudo | ||
This was not the bug I was looking for... | |||
timotimo | it's sad that there's still more than one bug in rakudo | 02:19 | |
Juerd | Huh? It stopped working after I restarted the repl. | ||
02:19
xpen left
|
|||
Juerd | That's not fair :( | 02:19 | |
> sub foo(@bar[4]) { say @bar } | |||
sub foo (@bar[4] where { ... }) { #`(Sub|106348200) ... } | |||
But when I try it again it fails exactly like camelia did. | 02:20 | ||
Oh, I already had an outer @bar | |||
So it allows the signature but doesn't declare @bar... | |||
m: sub foo (@bar[4]) { say "can haz bar" }; my @x[4]; foo(@x); | 02:21 | ||
camelia | rakudo-moar f6b956: OUTPUT«can haz bar» | ||
Juerd | m: sub foo (@bar[4]) { say "can haz bar" }; my @x[3]; foo(@x); | ||
camelia | rakudo-moar f6b956: OUTPUT«Constraint type check failed for parameter '@bar[4]' in sub foo at /tmp/SkM7ctyXC7 line 1 in block <unit> at /tmp/SkM7ctyXC7 line 1» | ||
Juerd | The type check works though | ||
Although I'm not certain that it does the right thing, because a 3-element array will fit perfectly in a 4-element one. | 02:22 | ||
02:27
llfourn joined
|
|||
Juerd | Rakudobugged as #127195 | 02:30 | |
02:31
llfourn left
02:33
colomon joined
02:43
kaare_ left
02:44
pjscott joined
|
|||
awwaiid | Well I have no idea how to get "use CSV:from<Ruby>" to work, but I did a proof-of-concept with something like "ruby_require 'csv'" | 02:45 | |
gist.github.com/awwaiid/6751d2897f63054c82ab | |||
02:45
ilbot3 left
|
|||
zwu | my question is that what is the state of running performance on rakudo and morvm. I know the performance is the focus in this year, but it is appreciated if there is a picture of current states. | 02:46 | |
for the performance comparison to python (without numpy) or javascript (node). | |||
thanks! | |||
hoelzro | awwaiid: you could probably do it with NQP | ||
use nqp: my $p6ml := nqp::gethllsym('perl6', 'ModuleLoader'); | |||
02:47
ilbot3 joined
|
|||
hoelzro | and then call that registration method I mentioned earlier | 02:47 | |
awwaiid | hoelzro: all cool, I'll try that | ||
hoelzro | (disclaimer, I haven't tried this!) | ||
02:47
iml_ joined
|
|||
[Coke] | anyone else having trouble loading RC? lots of 404 resources. | 02:49 | |
timotimo | may have to set $p6ml to be Mu perhaps | ||
awwaiid | I also want the user to list what they want imported, something like: use csv:from<Ruby> <CSV> # because the name of the class and the name of the include file aren't predictable enough. Though eventually I guess I might be able to have it introspect what classes get created upon require on the ruby side. | ||
hoelzro | timotimo: good call | ||
timotimo | that's often what happens when you get something from nqp space | 02:50 | |
though i think the module loader is now implemented in pure perl6? | |||
02:50
colomon left
|
|||
timotimo | wasn't that one of the big things in the last refactor? | 02:50 | |
02:50
colomon joined
|
|||
hoelzro | is it? I have no idea =/ | 02:50 | |
awwaiid | hoelzro: wait is that a colon after your use statement? | 02:51 | |
hoelzro | er, sorry | ||
typo | |||
use nqp; | |||
awwaiid | ok great. was going to have to add another colon to my collection | ||
timotimo | you hate colons, i take it? | 02:52 | |
geekosaur | colons in perl 6 are starting to seem like dots in haskell: too many different meanings >.> | ||
hoelzro | how many different meanings do they have in Perl 6? | 02:53 | |
I can think of two off the top of my head | |||
(namespace separator and invocant marker) | |||
er, labels | |||
that's 3 | |||
adverbs | |||
4 | |||
02:53
pjscott left
|
|||
hoelzro | adverbial pair forms...4½ | 02:54 | |
timotimo | marking named parameters | ||
hoelzro | hmm | ||
timotimo | in the signature, i mean | ||
hoelzro | I kinda lump that under adverbial pair forms, but true | ||
awwaiid | prefix for signature literal | 02:56 | |
timotimo | and for object hashes | ||
hoelzro | ah, true | ||
damn, that's a lot | |||
awwaiid | colon pairs count as a few since :foo -> :foo<True> but looks different | ||
timotimo | in type smileys | ||
hoelzro | timotimo: that's an adverb, right? | ||
timotimo | hm, you could perhaps call it that | 02:57 | |
awwaiid | probably a type adverb; as we use this over and over they'll probably feel more like adverbs instead of different :) | ||
we should try to get all the usages onto one line | 02:58 | ||
did you get the one off of map: ? | |||
hoelzro | awwaiid: invocant marker | ||
awwaiid | ah. did you get the backwards method call then? | 02:59 | |
hoelzro | which is that? | ||
TimToady | no, that one is more like Haskell's $ | ||
awwaiid | method(obj: args...) | ||
hoelzro | awwaiid: you mean like method foo($self: *@args) ? | 03:00 | |
awwaiid | TimToady: I definitely see why you said everyone wants the colon :) | ||
TimToady | all of these kinda fit in the category of "here's one thing that corresponds to the following things" | ||
awwaiid | hoelzro: yes | ||
hoelzro | awwaiid: I would also call that invocant marker | ||
TimToady | that one is invocant marker, yes | 03:01 | |
timotimo | that's exactly the invocant marker :) | ||
awwaiid | oh. then what is the map: one | ||
TimToady | but $obj.map: 1,2,3 isn't | ||
awwaiid | right | ||
timotimo | oh hey TimToady, didn't hear you come in | ||
TimToady | that's really a precedence dropper like a listop | ||
hoelzro | ahhhh | ||
[Coke] | ~~ | ||
TimToady | and like $ in Haskell | ||
it's a left paren that doesn't require a right paren, as it were | 03:02 | ||
timotimo | did IO::ArgFiles disappear? | ||
m: say IO::ArgFiles | |||
camelia | rakudo-moar f6b956: OUTPUT«Could not find symbol '&ArgFiles' in block <unit> at /tmp/n_GRGvd8qj line 1Actually thrown at: in block <unit> at /tmp/n_GRGvd8qj line 1» | ||
timotimo | two tests in S02-types/which.t depend on IO::ArgFiles existing | ||
i can't find it in the generated core setting at least | 03:03 | ||
03:04
noganex joined
03:06
noganex_ left
03:07
kid51 left
|
|||
colomon | What’s the current state of p6 JSON? | 03:07 | |
hoelzro | timotimo: I think it was on the chopping block | 03:08 | |
timotimo | colomon: i have a fast json implementatoin that's not full-featured, there's at least one nativecall-based one around some C parser and we still have JSON::Tiny | 03:10 | |
colomon | and JSON::Pretty, I see. | ||
Mouq | There's also | ||
m: my $a = 1; say $a.:<++> | 03:11 | ||
camelia | rakudo-moar f6b956: OUTPUT«2» | ||
colomon | and isn’t something built in? | ||
Mouq | And also the :, ::, and ::: forms in Regexes | ||
colomon | timotimo++ | ||
03:12
vendethiel joined
|
|||
awwaiid | Mouq: I kinda think of regexes as a separate embedded language | 03:12 | |
Mouq | True enough :) | ||
awwaiid | Mouq: so what is the colon doing there, saying the next thing is quotes? | ||
colomon | actually, for my purposes at this very moment, I’d be perfectly happy with something which can pretty print a JSON structure. | 03:13 | |
awwaiid | was the colon in infix:<+> listed already? | ||
Mouq | In the first? $a.:<++> is the same as ++$a | ||
m: my $a = 1; say $a.:<!> | |||
camelia | rakudo-moar f6b956: OUTPUT«False» | ||
Mouq | That counts as namespace separator, I think | 03:14 | |
awwaiid | hm. I think there is one like that for multi-dispatch full names too (or same thing) | ||
03:15
xpen joined
|
|||
hoelzro | oh, longname? (I think that's what it's call) | 03:15 | |
awwaiid | ya that | ||
hoelzro | like method term:sym<...> | ||
03:15
pjscott joined,
pjscott left
|
|||
gfldex | m: my @c = Nil, a => 42; dd Nil ∈ @c; | 03:19 | |
camelia | rakudo-moar f6b956: OUTPUT«Bool::False» | ||
gfldex | :-| | ||
03:20
xpen left,
nomenclature joined
03:22
nomenclature left
|
|||
timotimo | is "Not In List" an element of every list? | 03:22 | |
awwaiid | m: :hmm(5).key.what.say ; :hmm<5>.key.what.say | ||
camelia | rakudo-moar f6b956: OUTPUT«Method 'what' not found for invocant of class 'Str' in block <unit> at /tmp/9ajCZdvM1v line 1» | ||
timotimo | has to be WHAT | 03:23 | |
awwaiid | m: :hmm(5).key.WHAT.say ; :hmm<5>.key.WHAT.say | ||
camelia | rakudo-moar f6b956: OUTPUT«(Str)(Str)» | ||
awwaiid | I expected the first to be Int | ||
timotimo | um, why would the key be Int? when the key is "hmm"? | ||
awwaiid | er | ||
oops | |||
m: :hmm(5).value.WHAT.say ; :hmm<5>.value.WHAT.say | 03:24 | ||
camelia | rakudo-moar f6b956: OUTPUT«(Int)(IntStr)» | ||
awwaiid | nothing to see here :) | ||
03:28
llfourn joined,
_Vi left
03:30
woodruffw left
03:33
llfourn left
|
|||
awwaiid | timotimo: no, I like the colons. That's why I collect them :) | 03:33 | |
timotimo | hmm | ||
awwaiid | so for $a.:<++>, that is the prefix operator as-method invocation; are there other similar things for postfix etc? | 03:35 | |
03:36
vendethiel left
|
|||
gfldex | m: sub f(){Nil}; my @c; @c[0] := f; dd @c; say so do for @c { .&infix:<===>(Nil) } | 03:36 | |
camelia | rakudo-moar f6b956: OUTPUT«Array @c = [Nil]True» | ||
gfldex | m: sub f(){Nil}; my @c; @c[0] := f; dd @c; say Nil ∈ @c; | ||
camelia | rakudo-moar f6b956: OUTPUT«Array @c = [Nil]False» | ||
timotimo | well, i know an infix could be invoked on an object with .&[+], but how to do a postfix? i think just .++ would do it | 03:37 | |
gfldex | m: sub f(){Nil}; my @c; @c[0] := f; dd @c; say so do for @c { .&postfix:<++> } | ||
camelia | rakudo-moar f6b956: OUTPUT«Array @c = [Nil]Cannot call postfix:<++>(Nil); none of these signatures match: (Mu:D $a is rw) (Mu:U $a is rw) (Int:D $a is rw) (int $a is rw) (Bool:U $a is rw) (Bool:D $a is rw) (Num:D $a is rw) (Num:U $a…» | ||
gfldex | m: sub f(){Nil}; my @c; @c[0] := 1,2; dd @c; say so do for @c { .&postfix:<++> } | ||
camelia | rakudo-moar f6b956: OUTPUT«Array @c = [(1, 2),]Cannot call postfix:<++>(List); none of these signatures match: (Mu:D $a is rw) (Mu:U $a is rw) (Int:D $a is rw) (int $a is rw) (Bool:U $a is rw) (Bool:D $a is rw) (Num:D $a is rw) (Num…» | ||
Mouq | awwaiid: just $a.++ | 03:38 | |
:P | |||
gfldex | m: sub f(){Nil}; my @c; @c] = 1,2; dd @c; say so do for @c { .&postfix:<++> } | ||
camelia | rakudo-moar f6b956: OUTPUT«5===SORRY!5=== Error while compiling /tmp/C659bJbQyLUnexpected closing bracketat /tmp/C659bJbQyL:1------> 3sub f(){Nil}; my @c; @c7⏏5] = 1,2; dd @c; say so do for @c { .&pos» | ||
gfldex | m: sub f(){Nil}; my @c; @c = 1,2; dd @c; say so do for @c { .&postfix:<++> } | ||
camelia | rakudo-moar f6b956: OUTPUT«Array @c = [1, 2]True» | ||
Mouq | That works too :) | ||
gfldex | m: sub f(){Nil}; my @c; @c[0] := f; dd @c; say Nil ∈ @c; | ||
camelia | rakudo-moar f6b956: OUTPUT«Array @c = [Nil]False» | ||
gfldex | that should work too | ||
only sub infix:<<"∈">>($a, $b --> Bool) | 03:39 | ||
but it wont with that signature | |||
awwaiid | oh! := is another colon. good one. | ||
Mouq | ::= | ||
awwaiid | ::=? | ||
gfldex | compile time binding | 03:40 | |
Mouq | bind-read-only | ||
Colon isn't one of those hypothetical twigils is it? | 03:43 | ||
hoelzro | =:= | 03:44 | |
dammit, you're right Mouq | |||
gfldex | doc.perl6.org/language/variables#The_%3A_Twigil | ||
hoelzro | $:k | ||
Mouq | Oh, not even hypothetical, that's right | ||
awwaiid | good one | 03:50 | |
gist.github.com/awwaiid/268cf5a3517a87806897 is a collection (though I got distracted with the fun of writing out lots of colon-pairs) | 03:51 | ||
geekosaur | perl 6 colonoscopy? | 03:52 | |
awwaiid | Golfing this down to one line is going to be tough | 03:56 | |
awwaiid goes to bed instead | |||
hoelzro | night awwaiid | 03:57 | |
Juerd | Argh, why is reading code with one-letter variables so hard, and why do people continue to use them? | ||
I was thinking maybe it would be worth looking into why stringification of integers was so slow. Python stringifies its integers very fast. | |||
So I dived into libtommath's mp_toradix_n and into Python's long_to_decimal_string. | 03:58 | ||
03:58
lucs left,
lucs joined
|
|||
Juerd | Only to find that I can't really read that code because of the combination of really dense code (single letter variables) and my lack of math skills. | 03:59 | |
I can definitely follow what's going on with *str... But a, i, j, p, aa, z, t, d, w, and q are isn't quite so obvious. | 04:00 | ||
They probably make more sense to people who already roughly know what the code does. | 04:01 | ||
awwaiid | Unfortunately deep-math is one of the places that I tend to forgive that ... because the long name of the variables would be like first-number, second-number, first-fudge-factor, second-fudge-factor. Though already I've contradicted myself because fudge-factor would be better than a delta-triange | 04:02 | |
Juerd | I'm giving up anyway. | 04:03 | |
I don't know enough to fix this. | |||
04:05
[MadcapJake] left
|
|||
Juerd | What I did find is that Python has a special and optimized case for base 10 numbers, whereas libtommath uses the generic case for base 10 stringification | 04:06 | |
gfldex | m: my @c; @c := 1,Nil,2; dd @c; say so Nil === any(@c); | ||
camelia | rakudo-moar f6b956: OUTPUT«(1, Nil, 2)True» | ||
04:08
MadcapJake joined
|
|||
Mouq | Juerd++ regardless :) even reading good code sucks | 04:12 | |
dalek | c: 9582910 | (Wenzel P. P. Peppmeyer)++ | doc/Type/Nil.pod: doc binding to Nil and test against Nil |
04:13 | |
c: b25cfbd | (Wenzel P. P. Peppmeyer)++ | / (4 files): Merge remote-tracking branch 'upstream/master' |
|||
c: 258f79b | (Wenzel P. P. Peppmeyer)++ | doc/Type/Nil.pod: Merge pull request #323 from gfldex/master doc binding to Nil and test against Nil |
|||
04:15
colomon left,
colomon joined
04:16
xpen joined
04:21
xpen left
04:24
itaipu joined
04:25
yqt left
04:29
llfourn joined,
itaipu left
|
|||
yurivish | What does the ~ mean in headers => $<header>.map({ ~.<header-name> => ~.<header-value> })? | 04:33 | |
TimToady | coerce to string | 04:34 | |
yurivish | oh, right. It confused me because it looked like it was the object on which the method was being invoked. | ||
is the code there something more-or-less like ~($_).<header-name>? | 04:35 | ||
I mean ~($_.<header-name>) | |||
TimToady | yes, that's what it means | 04:38 | |
yurivish | thanks. | ||
04:38
molaf joined,
iml_ left
04:42
nige1 joined
04:43
inokenty joined
04:44
itaipu joined
04:48
psy_ left
04:49
jeek left
04:56
xpen joined,
xpen left
04:57
xpen joined
05:00
BenGoldberg left,
zwu left
05:06
itaipu left
05:09
molaf left,
n0tjack joined
05:13
n0tjack left
05:15
avenj left
05:20
woodruffw joined
05:21
jeek joined
05:23
pjscott joined
05:24
jeek left
05:27
skids left,
jeek joined
05:31
khw left
05:32
alber joined
05:34
avenj joined,
avenj left,
avenj joined
05:36
Cabanossi left
|
|||
alber | Greetings! Could someone advise please what the simplest way to read a web page in perl6? I tried to use 'LWP::Simple', but the line 'my $page = get('example.com')' causes an error 'get() is not a method of Str'. | 05:36 | |
05:39
Cabanossi joined,
jeek left
|
|||
alber | qualifying the name solved the problem | 05:40 | |
...although all examples used the unqualified name | 05:41 | ||
05:41
alber left
|
|||
TimToady | m: my $x = get('foo') | 05:43 | |
camelia | rakudo-moar f6b956: OUTPUT«Method 'get' not found for invocant of class 'Str' in block <unit> at /tmp/XWGKt0qxQT line 1» | ||
TimToady | I'd say that 'get' was not properly imported, somehow | ||
so it tried to use CORE::get instead, which just delegates to method get | |||
05:59
jeek joined
06:05
pjscott left
|
|||
dalek | c: a7e0056 | (Wenzel P. P. Peppmeyer)++ | doc/Type/Hash.pod: doc Hash subscript adverbs |
06:12 | |
c: d2b00f6 | (Wenzel P. P. Peppmeyer)++ | doc/Type/Hash.pod: Merge pull request #324 from gfldex/master doc Hash subscript adverbs |
|||
06:14
pjscott joined
06:20
pjscott left,
pjscott joined
|
|||
gfldex | LWP-Simple doesn't export any methods | 06:21 | |
06:30
pjscott left,
cognominal joined
06:31
CIAvash joined
06:32
cognominal left
06:33
jeek left
06:35
geraud left
06:41
jeek joined
|
|||
ugexe | seems strange to use :ver<> in your depends fields at the moment when there is no way to find a specific version past the most recent available on github. as soon as one is updated your module will break until every single one is updated | 06:42 | |
gfldex: get is a method/routine on IO::ArgFiles (if thats what you were referring to) | 06:45 | ||
m: say get | |||
camelia | rakudo-moar f6b956: OUTPUT«Céad slán ag sléibhte maorga Chontae Dhún na nGall» | ||
gfldex | i was not and the fellow who got problems with that is gone already | ||
FROGGS | Mouq: my Archive::Tar port is surely not idiomatic... problem is that I dont understand the code :o( | 06:48 | |
06:51
FROGGS left
06:53
colomon_ joined,
colomon left,
colomon_ is now known as colomon
07:01
yeahnoob left
07:02
domidumont joined
07:06
domidumont left,
domidumont joined
07:08
AlexDaniel joined
07:10
n0tjack joined,
jack_rabbit joined
07:15
n0tjack left
07:16
yeahnoob joined
|
|||
dalek | osystem: 496b15f | (Sam Morrison)++ | META.list: Add AWS::Pricing to ecosystem |
07:19 | |
osystem: 9dea55b | (Aleks-Daniel Jakimenko-Aleksejev)++ | META.list: Merge pull request #115 from scmorrison/master Add AWS::Pricing to ecosystem |
|||
07:24
_nadim joined,
FROGGS joined
|
|||
nine | .tell tony-o the one and only reason why I don't want to read the log is because it's a huge waste of time to read through thousands of lines of chatter when you already know what you want to tell me. If you have useful input, please just give it. | 07:28 | |
yoleaux | nine: I'll pass your message to tony-o. | ||
nine | .tell tony-o nothing would make me happier than someone coming up with a good plan where we don't have to recompile modules for every user. | ||
yoleaux | nine: I'll pass your message to tony-o. | ||
nine | .tell awwaiid CompUnit::Repository::Perl5 (from core) is the only living example. github.com/niner/CompUnit-Repository-Panda is an example for adding such a repo at runtime. | 07:30 | |
yoleaux | nine: I'll pass your message to awwaiid. | ||
07:37
firstdayonthejob joined,
Axord left
07:38
nige1 left
|
|||
[Tux] | csv-ip5xs 50000 18.313 18.201 | 07:43 | |
test 50000 23.715 23.603 | |||
test-t 50000 12.841 12.729 | |||
csv-parser 50000 50.587 50.475 | |||
07:47
Tonik joined
07:54
zakharyas joined
|
|||
lizmat | timotimo: yes, I've removed IO::ArgFiles | 07:55 | |
and I removed the only test for it in WHICH.t | |||
08:03
yeahnoob_ joined,
yeahnoob left
|
|||
lizmat | .tell timotimo I've removed IO::ArgFiles and its only test (WHICH.t) if you think we should have a deprecation cycle, I could do that | 08:05 | |
yoleaux | lizmat: I'll pass your message to timotimo. | ||
08:09
yeahnoob_ left,
yeahnoob joined
|
|||
nine | Good morning lizmat! | 08:10 | |
lizmat | nine o/ | ||
nine | Do you happen to know anything about tony-o's rejected precomp work? | ||
lizmat | I'm afraid not | ||
I can't recall anyway, but that may just be another effect of burnout | 08:11 | ||
:-( | 08:13 | ||
nine | The irclog doesn't seem to know anything either | 08:14 | |
FROGGS | I don't know either fwiw | ||
08:15
nige1 joined,
darutoko joined
|
|||
nine | There are no pull requests by him either. | 08:17 | |
So surprise: I did his work anyway and ended up empty handed. Just hot air. | 08:19 | ||
08:32
marshyon left
08:36
bubba joined
08:37
bubba left
08:39
abraxxa joined,
firstdayonthejob left
08:44
uruwi left
|
|||
stmuk_ | if I have a script (rather than a module) I suppose the most easy way to take advantage of precomp is just to refactor most of the code into a module? | 08:47 | |
08:48
dakkar joined
|
|||
lizmat | stmuk_: atm, yes | 08:49 | |
08:53
Guest64716 is now known as luiz_lha
08:55
rindolf joined
09:02
Amnez777 left,
Amnez777 joined
09:08
AlexDaniel left
|
|||
jkramer | Can I use rakudobrew to build from git or just releases? | 09:11 | |
09:12
abraxxa left
09:13
abraxxa joined
09:16
xfix joined
|
|||
nine | stmuk_: that's not only good for precomp but also for testability :) | 09:16 | |
jkramer: AFAIK also from git nom (which is our master branch) | |||
jkramer | nine: Any idea how? Should there be a special entry in list-available or something? | 09:17 | |
nine | jkramer: I've never used rakudobrew myself. If it's not documented, maybe look at the source code. It's quite easy to read | 09:18 | |
09:21
itaipu joined
|
|||
jast | rakudobrew --help seems to indicate that you can | 09:24 | |
dalek | kudo/nom: 5b9d5eb | lizmat++ | src/core/Rakudo/Internals.pm: initialize-sprintf-handler doesn't return anything |
09:26 | |
jkramer | jast: Where exactly? I'm probably blind but I can't see anything about git/nom. | ||
jast | rakudobrew build jvm|pre-glr|moar|all [tag|branch|sha-1] [--configure-opts=] | 09:28 | |
AFAICS that mean syou can use any tag/branch/commit ID from git | |||
dalek | kudo/nom: fdd431f | lizmat++ | src/ (4 files): Make RAKUDO_MODULE_DEBUG show times in msecs And only the difference between this and the previous step. Getting Perl6/Moduleloader.nqp to participate in that program, turned out to be something of a bridge too far: there is no setting loaded at that point, and the sprintf handler is also not initialized yet. So we don't show timings for loading the setting anymore. |
09:29 | |
jkramer | Ha, seems I was indeed blind. Thanks jast | ||
Yup, 'build moar nom' seems to work. | 09:31 | ||
lizmat | afk for a few hours& | 09:32 | |
09:34
krunen joined
|
|||
_nadim | .seen masak | 09:34 | |
yoleaux | I saw masak 6 Jan 2016 22:58Z in #perl6: <masak> 'night, #perl6 | ||
masak is here | 09:36 | ||
antenoon, #perl6 | |||
_nadim: yo | |||
09:37
RabidGravy joined
09:38
uruwi joined
09:41
xfix left
|
|||
RabidGravy | morning! | 09:42 | |
09:44
gregf_ left,
foodoo joined
|
|||
foodoo | Hi, I have heard, that you can create a perl 5 block within a perl 6 program. What is the syntax for this? (Google did not give me any helpful results) | 09:45 | |
masak | foodoo: it's not on by default | 09:47 | |
I think that was in a branch or something | |||
DrForr | foodoo: Use Inline::Perl5. | ||
yoleaux | 6 Jan 2016 16:09Z <ilmari> DrForr: Readline has a bunch of native functions with Int parameter/return types, which NativeCall now complains about | ||
masak | m: my $_ = "OH HAI"; { use v5; say } | ||
camelia | rakudo-moar 5b9d5e: OUTPUT«===SORRY!===Could not find Perl5 in: /home/camelia/.perl6/2015.12-118-g5b9d5eb /home/camelia/rakudo-m-inst-2/share/perl6/site /home/camelia/rakudo-m-inst-2/share/perl6/vendor /home/camelia/rakudo-m-inst-2/share/perl6 CompUn…» | ||
DrForr | .tell ilmari noted re: Readline, will unbreak. | 09:48 | |
yoleaux | DrForr: I'll pass your message to ilmari. | ||
09:48
leont joined
09:51
gregf_ joined,
yeahnoob left
09:54
rindolf left
|
|||
DrForr | El_Che: Yes, 40 minutes for grammar, I'll be rewriting as well. | 09:55 | |
09:55
gregf_ left
|
|||
nine | foodoo: please have a look at github.com/niner/Inline-Perl5 | 09:56 | |
09:56
bpmedley left
09:57
bpmedley joined,
bpmedley left
|
|||
FROGGS | foodoo: it was possible with an external module called v5, but that is currently not in a usable shape... instead if you want to access Perl 5 modules, use Inline::Perl5 as suggested | 09:58 | |
foodoo | Thanks for the explanations :) | ||
10:01
pdcawley left,
bpmedley joined,
pdcawley joined
10:02
bpmedley left
10:03
schnuppi joined
10:04
gregf_ joined
10:06
bpmedley joined
10:09
pjscott joined
10:10
raiph joined
10:20
kubrat left
10:21
foodoo left
10:28
scoopio joined
10:30
_nadim left
|
|||
DrForr | Okay, nativecall question - IIRC 'int' in C is a floating type, just "at least 16 bits" yet the docs are saying to use int32. | 10:30 | |
10:31
vividsnow left
10:32
vividsnow joined
|
|||
RabidGravy | I did a quick survey the other day and found C ints to be 32 bit, I think you'd have to find a 16 bit platform to have a 16 bit int | 10:33 | |
nine | I start to think that instead of outlawing int as NativeCall type, we should actually map it to the platform's C int. | 10:34 | |
RabidGravy | but the perl "int" seems to be a native sized long which does vary between various systems | ||
nine, yeah perhaps | 10:35 | ||
arnsholt | The size of a Perl 6 in depends on the platform | ||
RabidGravy | yeah, that's the point | ||
10:35
scoopio is now known as kubrat,
pjscott left
|
|||
nine | arnsholt: yes, but you can't use that currently for NativeCall | 10:36 | |
arnsholt | The correct way is to have type whose size is explicitly defined to be "whatever the size of C's int is on this platform" | ||
DrForr | I'd agree with arnsholt, if only because 'int32' could cause a problem when moving to a 64-bit CPU. Or eventually when we go to 128-bit :) | 10:37 | |
arnsholt | Especially since making what you want work would involve weird contortions to the P6int REPR that basically amount to letting you ask an integer type "are you the `int` type?" | 10:38 | |
DrForr | I'll use 'int32' for the moment... | ||
10:39
leont left
|
|||
RabidGravy | and you can do something like "constant Nint = $*KERNEL.bits == 64 ?? int64 !! int32" if you need to | 10:41 | |
DrForr | Feels a little hackish, but I'll accept it. | 10:46 | |
RabidGravy | in my NC meanderings I've only found one place where a C library explicitly used a different storage size depending on the CPU bits | 10:49 | |
arnsholt | Anything that uses size_t is word-size dependent | 10:50 | |
10:51
avenj left
|
|||
RabidGravy | yes | 10:53 | |
nine | Perl 5's IV is depending on the CPU bits _and_ compilation settings | ||
arnsholt | Even better! =) | 10:55 | |
nine | "easy" solution: sub p5_size_of_iv() returns size_t { ... } BEGIN native(&p5_size_of_iv); BEGIN my constant IV = p5_size_of_iv() == 8 ?? int64 !! int32; | 10:56 | |
10:56
iH2O joined
|
|||
nine | With size_t p5_size_of_iv() { return IVSIZE; } | 10:56 | |
10:57
bpmedley left
|
|||
RabidGravy | now I can't find the ctype trait, but I think that does actually take account of the native size | 10:57 | |
can't find where it is defined that is | 10:58 | ||
10:59
bpmedley joined
11:00
wamba joined
|
|||
FROGGS | nine: problem with Perl 6's int is that it can very well be 128bits on a future platform | 11:00 | |
RabidGravy | yeah it uses Perl6/Metamodel/NativeHOW.nqp which presumably has the size compiled in | 11:01 | |
nine | FROGGS: look at my commit message :) github.com/niner/Inline-Perl5/comm...7ee1739aae | 11:03 | |
FROGGS | nine++ # :o) | 11:04 | |
11:05
rindolf joined
|
|||
nine | A larger issue is Perl 5's NV type which may be a num80. We don't have support for that in NativeCall. | 11:05 | |
arnsholt | We'll cross that bridge when we get to it | 11:06 | |
11:06
raiph left
|
|||
arnsholt | On any platform though, or just some? | 11:06 | |
FROGGS | isnt that a IEEE float? | 11:07 | |
arnsholt | No, pretty sure it isn't | 11:08 | |
FROGGS | hmmm, I thought I had read about that | ||
arnsholt | x86 uses IEEE, and floats are power-of 2 sized | ||
IEEE floats are super-general thoug, so could be a variant of IEEE floats though | |||
nine | num80 is a long double | 11:10 | |
RabidGravy | you can explicitly set the native size of a type, though that may not deal with marshalling issues | ||
nine | I think you need to compile perl with -Dusemorebits to get that | ||
jkramer | I keep seeing "use v6;" in code samples everywhere. What does this actually do in a perl 6 program? | ||
nine | or -Duselongdouble | ||
arnsholt | RabidGravy: You're still dependent on the REPR knowing how to deal with that size; and the num REPR doesn't know about 80 bit floats | 11:11 | |
nine | jkramer: it's mostly to give a useful error message when the program is accidentally run with perl instead of perl6 | ||
jkramer | Ah ok | ||
11:11
n0tjack joined
|
|||
arnsholt | nine: On x86 presumably? long double is 16 bytes on my machine | 11:13 | |
RabidGravy | though, "use v6.c;" will stop running on an older v6 too, and for the futurists "use v6.e" won't run at all | ||
nine | arnsholt: yes. I'm curious. What machine are you on? | 11:15 | |
arnsholt | x64 | ||
Linux x64, to be specific | 11:16 | ||
11:16
n0tjack left
|
|||
nine | arnsholt: there it's usually 80 bit precision stored in 12 or 16 bytes. Except for MSVC which uses double for long double. And lots of other exceptions. A tough read: en.wikipedia.org/wiki/Long_double | 11:17 | |
dalek | kudo/nom: 0e7102d | lizmat++ | src/Perl6/World.nqp: Also let the world know when imports are done |
11:18 | |
arnsholt | Ah, that makes sense I guess. Just use two machine words and throw away the excess bits | ||
FROGGS throws in www.perlmonks.org/bare/?node_id=587486 | 11:20 | ||
11:22
TEttinger left,
xpen left
11:24
xpen joined
|
|||
dalek | line-Perl5: 05196de | (Stefan Seifert)++ | lib/Inline/Perl5.pm6: Don't assume a storage size for 80 bit long double Those 80 bits of precision are usually stored in 12 or 16 bytes. So we no longer assume anything. We know we support only 4 or 8 bytes. For everything else, error out. Thanks to arnsholt++ for pointing this out! |
11:24 | |
RabidGravy | as a normal consumer can you even get computers that run a normal operating system that is other than 32 or 64 bits ? | 11:26 | |
dalek | kudo/nom: 8f7cfde | lizmat++ | src/core/CompUnit/PrecompilationRepository.pm: Only fetch dependencies once |
||
lizmat | RabidGravy: I guess of your wallet is big enough :-) | ||
nine | RabidGravy: the answer to that will change over time :) | 11:27 | |
RabidGravy | :) | ||
nine | lizmat: nice catch! | ||
lizmat | hmmm... I should probably just should have deleted the first line | 11:28 | |
11:29
espadrine_ joined,
espadrine_ is now known as espadrine
|
|||
lizmat | nine: is this not really debug info ? say "$id $src" if $*W and $*W.is_precompilation_mode; | 11:29 | |
nine | no no no, that's essential! | 11:30 | |
lizmat | ok :-) | ||
nine | It's the way we communicate the ids and source locations of dependencies back up to the dependant for writing into the .deps file | ||
11:30
wamba left
|
|||
lizmat | okidoki | 11:30 | |
nine | And I'm really surprised that using stdout for that has not been more of a problem | 11:31 | |
FROGGS | ohh, it is when you actually add debug statements :o) | 11:32 | |
11:32
bpmedley left
|
|||
nine | Well STDERR is for debugging ;) | 11:32 | |
FROGGS | yeah, potentially | 11:33 | |
dalek | kudo/nom: 1a6f7fe | lizmat++ | src/core/CompUnit/PrecompilationRepository.pm: Other way of fetch deps only once And some clarification why there's a "say" in there, nine++ |
||
11:37
bpmedley joined
11:43
AlexDaniel joined
11:45
xpen left
11:47
rindolf left
|
|||
AlexDaniel | I don't really see 128-bit systems coming… | 11:47 | |
moritz | new idea: CPU registers for UUID | 11:49 | |
*UUIDs | |||
lizmat | FROGGS nine moritz is there a reason why we haven't bumped Moar / NQP recently? | 11:50 | |
especially because of the GC / string concat bug fixed in Moar the other day | |||
moritz | lizmat: I think we had the idea floating around that we do a point release of rakudo to support a star release | ||
lizmat | I wonder if that would fix the problem described in blogs.perl.org/users/sterling_hanen...6N4wNWStrD | 11:51 | |
JimmyZ | I think NQP have bumped? | ||
moritz | lizmat: though iirc the current decision is to do the 2016.01 star instead | ||
lizmat | yeah, but not with that MoarVM fix, afaik | ||
moritz: fwiw, that would make more sense to me | |||
now, will 2016.01 be 6.c ? | |||
moritz | lizmat: it will support 6.c | 11:52 | |
nine | Considering yesterday's progress, I'd say yes | ||
moritz | lizmat: and I expect several more rakudo and R* releases support 6.c | ||
lizmat | Q: does 6.c support Date.new($year,$month,$day) ? | 11:53 | |
nine | Isn't the plan for all of them to support 6.c? | ||
lizmat | A: it depends :-( | ||
2016.01 does, 2015.12 doesn't | 11:54 | ||
it's questions like this that I worry about | |||
masak | lizmat: I thought Date.new($year, $month, $day) was ancient | ||
lizmat | masak: if it was, it's back | 11:56 | |
as an alternate interface, of course, Date.new(:$year,:$month,:$day) still works | 11:57 | ||
moritz | didn't the positional form always work? | ||
FROGGS | lizmat: IMO if the introduction of positionals to Date.new does not break 6.c (the roast branch), then rakudo 2016.01 still complies to 6.c | 11:58 | |
lizmat | the only positiional form was Date.new(Instant) | ||
FROGGS: it doesn't | |||
moritz | aye, a new feature doesn't break backwards compatiblity with the language | ||
nine | FROGGS: how does that look from a user's perspective? As a user I'd like to use that feature. What do I have to do? | 11:59 | |
lizmat | but how can you make sure that using that new feature will work? | ||
use v6.c will not be sufficient | |||
if you happen to be running 2015.12 | |||
FROGGS | sure, use v6.c cannot be enough because that feature is unspecced | ||
awwaiid hops up and down | |||
yoleaux | 07:30Z <nine> awwaiid: CompUnit::Repository::Perl5 (from core) is the only living example. github.com/niner/CompUnit-Repository-Panda is an example for adding such a repo at runtime. | ||
awwaiid | Thanks nine! :) | 12:00 | |
FROGGS | and if you wanna use unspecced stuff you might wanna use rakudo:ver(v2016.01) or something like that | ||
lizmat | someone might not be aware it is unspecced | 12:02 | |
12:02
_nadim joined
|
|||
lizmat | especially if it *is* in the doc | 12:02 | |
so I probably should move it from the doc until we hit 6.d ? | |||
nine | use v6.d.PREVIEW; | 12:03 | |
As suggested by jnthn++ | |||
lizmat | so what lives in there ? | 12:04 | |
anything I put in nom? | |||
nine | anything you put in nom's src/core.d/ | 12:05 | |
lizmat | so I we will have nom *and* core.d ? | ||
so I would have to commit things twice, or maintain two branches ? | 12:06 | ||
sorry if I seem belligerent, but I really don't have a mental image of how we're supposed to develop forward | |||
nine | No. Language versions have nothing at all to do with branches. We have the src/core/ directory for 6.c code and src/core.d/ for 6.d code that uses augment and supersede and other trickery to change 6.c into 6.d | 12:07 | |
lizmat | without creating a massive backward maintenance hell on everybody, users and developers alike | ||
nine | Look at the example in the language_versions branch. The 6.d code simply deletes IO::ArgFiles, as that language version will no longer contain it | ||
12:08
Skarsnik joined
|
|||
lizmat | I could argue that wouldn't even be needed, as there weren't really any tests for IO::ArgFiles in roast (apart for checking of existence) | 12:09 | |
so IO::ArgFiles was never part of 6.c | |||
nine | The existence check is enough to preclude removing it from 6.c | ||
lizmat | so removing the tai-utc class *is* alright then, as there wasn't even a check for its existence in roast | 12:10 | |
nine | We could maybe make an exception for this, as we're new to this whole backwards compatibility train. But we could also just use it as an exercise. We'll have to figure out how to do this anyway. | 12:11 | |
moritz | couldn't we just say constant IO::ArgFiles = WhateverTheNewNameIs and be happy? | ||
lizmat | I'm just very afraid that saying "that feature wasn't tested., so it can be removed / altered at will" is a meme that will not make module developers and toolchain people very happy | 12:12 | |
nine | It really depends on how much we like our users ;) | ||
lizmat | moritz: we could, the new API is a superset of the old | ||
moritz: well, apart from .new | |||
:-( | |||
but yeah, we could do a deprecation cycle for it | |||
nine | lizmat: exactly! That's why I'd err on the side of keeping it. Especially if keeping it doesn't cost all that much because we have a good back compat architecture | ||
lizmat | I don't worry too much about a deprecation cycle | 12:13 | |
I *do* worry about newish / untested features that accumulate between now and 6.d | |||
for which module developers cannot test, other than trying them out with a CATCH block | 12:14 | ||
nine | Well before we cut a 6.d we'll have time to remove features again or write tests. | ||
lizmat | so, saying "use v6.c" in your module, doesn't really mean anything | ||
nine | There's still use v6.d.PREVIEW for getting at those features. | ||
What about an extensions thing like in OpenGL? New OpenGL versions are usually just bundles of extensions that have been available individually before. | 12:15 | ||
lizmat | well, in the case of Date.new($year,$mointh,$day), it would mean maintaining that in two places | ||
nine | Why two places? | 12:16 | |
lizmat | once in nom, once in 6.d | ||
12:16
_nadim left
|
|||
lizmat | the thing is, that the positional form of Date.new is basically an internal method for building all of the other .new candidates (well, not all, but some) | 12:16 | |
nine | nom is completely tangential to 6.d | 12:19 | |
lizmat | ok, now you lost me again :-( | 12:21 | |
I think I'll refrain from doing anything that changes / adds any interface or whatever, until at least 2016.01 comes out | 12:22 | ||
nine | The plan is to ship one source tree that implements all versions of Perl 6. What is currently in our src/core/ directory will be more or less frozen and implements 6.c. Future versions are overlays in directories like src/core.d/. | ||
lizmat | I'm just afraid I'll be making the work of the release manager more and more difficult | ||
nine | So you have your 6.c version of Date.pm in src/core/Date.pm and a file called src/core.d/Date.pm that contains augment class Date { method new($year, $month, $day) { ... }; } | ||
lizmat | so, maintain Date.pm at two places :-( | 12:24 | |
nine | multiple places even, because there will be one directory for every language version | 12:25 | |
At $work we develop online tax calculation software. As tax laws change on an almost yearly basis, we have a calculations class for every calculator for the first year we introduced it. Every following year is a class derived from the previous year's class. | 12:26 | ||
Skarsnik | how that work when you want to remove stuff? | ||
And hello | |||
nine | That's essentially the same architecture as jnthn suggested. Yes it sucks that you no longer get easy access to a consolidated view of the code running in the latest version, but of all the architectures we've tried, it's still the least sucky. | ||
Skarsnik: github.com/rakudo/rakudo/commit/c5...2612f83ee5 | 12:27 | ||
masak | lizmat: oh, I meant "ancient" as in, "has been in there for a long time" | 12:28 | |
Skarsnik | That look like a nightmare to follow what is in what x) | ||
arnsholt | Skarsnik: At a guess, a stub implementation that throws an exception signalling that this is no longer relevant in this version of the tax laws, or nothing at all | 12:29 | |
lizmat | masak: ah, ok, no it wasn't | ||
12:29
lichtkind joined
|
|||
arnsholt | Removing code is probably not going to happen frequently (if at all) since the software probably needs to be capable of rerunning the calculations for previous years | 12:29 | |
12:29
cognominal joined
|
|||
nine | arnsholt: yep | 12:30 | |
arnsholt | I've a friend who works with similar stuff (laws changing) and he's explained how they never remove things, since things that occured under the old laws are still in the DB, so the software needs to handle it correctly | ||
Skarsnik | Did you look at how other major project handle this kind of stuff? I am just curious, I am not here to critic what you probably already spend lot of time thinking x) | 12:31 | |
lizmat | I feel we need to make 6.c just equivalent to 2015.12 | ||
nine | Nice detail: so far we've only once removed support for previous years. It was the years that made HTTP requests to the PHP code in which the tax calculation was implemented originally ;) | ||
lizmat | some bug fixes may be ported to that version | ||
but anyting else is just 6.d.DEVELOP | 12:32 | ||
keeping stuff in different dirs is just going to be a nightmare to maintain | |||
cognominal | hi *, can someone explain why macros are necessary at the end of github.com/jnthn/oo-monitors/blob/...onitors.pm | ||
lizmat | and so it will probably not be maintained correctly | ||
I think we should learn from p5 here | 12:33 | ||
nine | lizmat: but how will a 6.d rakudo be able to run 6.c code? | ||
lizmat | nine: you mean as in: I'm running my code in 6.c, and load a module that says 'use 6.c' ? | 12:34 | |
nine | Perl 5's code probably contains a lot of version or feature checks by now. That's not gonna make code better maintainable | ||
Skarsnik | how gcc does this kind of stuff | ||
lizmat | s:1st/c/d/ | ||
nine | lizmat: yes | ||
lizmat | well, I don't see how we can *not* add a lot of version checks with this setup either ? | 12:35 | |
nine | lizmat: or just run a script that was written for 6.c with a rakudo implementing 6.f | ||
A script that may use IO::ArgFiles for example | 12:36 | ||
12:36
joydo left
|
|||
Skarsnik | sound like a bad idea to want to keep old version (like v-2) running with the same code | 12:37 | |
nine | Skarsnik: why? | ||
We promise backwards compatibility. Why should keeping us to our promise be a bad idea? | 12:38 | ||
lizmat | no, that's not a bad idea | 12:39 | |
we shouljd | |||
somehow :-) | |||
Skarsnik | maybe a buggy code make a feature work, maybe keeping a old stuff compatible make changing/adding something impossible. I am not even sure how that work with npq and moar/jvm behind | ||
awwaiid | nine: this is working great; do you know if I can get any extra params, like foo in: use csv:from<Ruby> :import<CSV> | ||
12:40
_nadim joined
|
|||
Skarsnik | I mean, you know a lot much more of how everything work, so I am maybe wrong x) | 12:40 | |
nine | awwaiid: github.com/niner/Inline-Perl5/blob...5.pm6#L842 | 12:43 | |
awwaiid: the whole method require will be of great interest to you I guess | |||
Skarsnik: no matter what architecture we use, maintaining backwards compatibility will be a large part of "torturing the implementors" going forward. There's no way around that. You can only make it a bit less tedious. | 12:45 | ||
Skarsnik: yet still we have to try. Because it's really one of the best features a language can have. | 12:46 | ||
llfourn | cognominal: they are used in the examples, do you mean why are they not subs? | 12:49 | |
12:49
nige1 left
|
|||
awwaiid | nine: thanks. I already took some code from here :) . I think this bit makes sense, I hadn't understood it's purpose before | 12:49 | |
cognominal | lifourn, yes, why macros not subs? | 12:50 | |
nine | awwaiid: you mean it's not totally self explanatory? *g* I'm not really surprised ;) | ||
12:50
avenj joined,
avenj left,
avenj joined
|
|||
lichtkind | i have a question regarding travis | 12:50 | |
llfourn | cognominal: I don't know :( | 12:51 | |
cognominal: maybe try changing it to sub and see if everyhing is fine | 12:52 | ||
cognominal | probably masak or jnthn could answer | ||
llfourn | probably :) | ||
nine | I somehow cannot imaging jnthn reaching for macros when plain subs would do | 12:53 | |
llfourn | cognominal: maybe so get-cond-attr is run at compile time? | 12:54 | |
ie faster | |||
lizmat | afaik, that was one of the reasons macros were not completely removed before 6.c, instead of being made "experimental' | ||
12:54
virtualsue joined
|
|||
llfourn | cognominal: notice how the arguments to the macros are known at compile time | 12:55 | |
RabidGravy | Skarsnik, do you by any chance have access to a machine with the portmidi devel package installed? If so point gptrixie at the portmidi.h - it seems that it uses PortMidiStream all over the place, but never defines it | ||
llfourn | so essentially it's inlining the condition | ||
cognominal | yea probably | ||
got Useless use of constant value not-empty in sink context (lines 15, 20) | |||
Useless use of constant value not-full in sink context (lines 12, 22) | |||
runing t/condition.t | 12:56 | ||
dalek | kudo/nom: 8f173f2 | lizmat++ | src/core/CompUnit/PrecompilationRepository.pm: Fewer $*RAKUDO_MODULE_DEBUG lookups please |
||
llfourn | that looks like a Greak Sink Refactor regression that wasn't caight because noone uses marcros :\ | ||
12:56
loren joined
|
|||
nine | lizmat: I wonder, how costly are those $*RAKUDO_MODULE_DEBUG lookups? | 12:57 | |
loren | Hi, everyone.. | ||
12:57
Herby_ joined
|
|||
Skarsnik | RabidGravy, let me have a look x) | 12:57 | |
lizmat | nine: they're pretty costly | ||
Herby_ | Good morning, everyone! | ||
For lowly Windows users like myself, any word when a new rakudo MSI will be released? | 12:58 | ||
cognominal | lifourn, got "Can only use meet-condition in a monitor" when replacing macros by subs, so indeed the execution order matters. | ||
12:59
wamba joined
|
|||
RabidGravy | Skarsnik, how I would typically express it would be "class PortMidiStream is repr('CPointer') { }" and then lose the indirection later on | 12:59 | |
12:59
iH2O left
|
|||
RabidGravy | but that would probably require a second pass | 12:59 | |
Skarsnik | RabidGravy, it's a void type.. | ||
RabidGravy | Skarsnik, yeah, quite a common thing in this kind of stuff | 13:00 | |
Skarsnik | typedef void PortMidiStream; | 13:01 | |
RabidGravy | yeah, but it's only every used as "PortMidiStream *" | ||
13:02
lichtkind_ joined
|
|||
Skarsnik | It's not lost, it's just I keep typedef as is when they ref a fundamental type like int/void... | 13:02 | |
lizmat | m: my $*FOO = 42; for ^100000 { my int $a = $*FOO }; printf "%d", 1000 * (now - INIT now) | ||
camelia | rakudo-moar 1a6f7f: OUTPUT«143» | ||
lizmat | m: my $*FOO = 42; my int $FOO = $*FOO; for ^100000 { my int $a = $FOO }; printf "%d", 1000 * (now - INIT now) | ||
camelia | rakudo-moar 1a6f7f: OUTPUT«40» | ||
lizmat | m: my $*FOO = 42; my int $FOO = $*FOO; for ^100000 { }; printf "%d", 1000 * (now - INIT now) | 13:03 | |
camelia | rakudo-moar 1a6f7f: OUTPUT«31» | ||
RabidGravy | more typical might be "typdef (void *) Foo" for this type of thing | ||
lizmat | m: say (143 - 31) / (40 - 31) | ||
camelia | rakudo-moar 1a6f7f: OUTPUT«12.444444» | ||
Skarsnik | RabidGravy, I have to go, sadly | 13:04 | |
lizmat | now, it gets worse with dynamic lookups if there are more stack frames between the scope in which the dynamic is defined and the executing code | ||
RabidGravy | no worries | ||
lizmat | nine: so this is more like a best case scenario | ||
FROGGS | RabidGravy: what do you mean by "lose the indirection later on" ? | ||
RabidGravy: you can also do: constant PortMidiStream = Pointer | 13:05 | ||
13:06
lichtkind left
|
|||
nine | lizmat: many thanks for this clarification! | 13:06 | |
13:06
brrt joined
|
|||
cognominal | lifourn, now it makes sense. So much magic going around :) jnthn++ | 13:06 | |
lizmat | nine: do you think we will have a different value for $*PERL inside a "use v6.x" where x is different from the base ? | 13:07 | |
RabidGravy | FROGGS, Something like that, currently it is doing "Pointer[PortMidiStream]" in the type constraints, but if I was writing it by hand I would see that and do "class PortMidiStream is repr(CPointer) ..." and lose the Pointer[] | ||
loren | Regex match are segment fault .. someone help help .. | 13:08 | |
RabidGravy | which has the additional benefit of being able to add methods to it | ||
lizmat | nine: I wonder if we shouldn't cache $*PERL.compiler.id as well | ||
nine | lizmat: oh yes, definitely. Otherwise we'd get "Perl 6 (6.c)" forever as use v6.x will be the only way to request post-6.c semantics | ||
lizmat | ok, so we can't cache that per process :-) | ||
13:08
_nadim left
|
|||
nine | lizmat: to be honest, I didn't think much about performance of the Repository code, since as soon as something involves I/O, CPU time should only a small part of the cost anyway | 13:09 | |
lizmat | yeah, I know | ||
brrt | jnthn++ for the stomp class posts | ||
nine | So it's even more shameful, that we read those .deps files twice. And completely uselessly as well :) | ||
RabidGravy | loren, well it shouldn't segfault but without code it's difficult to help | ||
lizmat | but at least not having to repeatedly lookup $*RAKUDO_MODULE_DEBUG seems to have shaved off about 5 msecs from loading Text::CSV | ||
RabidGravy | brrt, yeah they're very useful | 13:10 | |
nine | nice! | ||
loren | RabidGravy, www.oschina.net/code/snippet_2531803_53446 | ||
abraxxa | jnthn++ # indeed! very helpful to follow the thoughts | ||
lizmat | nine: about 2% worth | ||
loren | i shared the code | ||
and data | |||
13:12
rindolf joined
13:13
perlawhirl joined
|
|||
lizmat is suddenly remembering the first Perl Whirl in 2000 | 13:14 | ||
.oO( how long will it be until we have a Perl 6 Whirl :-) |
|||
brrt | what was the perl whirl? | ||
RabidGravy | I can only just remember that far back | 13:15 | |
13:15
kaare_ joined
|
|||
TimToady | a cruise to alaska | 13:15 | |
lizmat | www.perl.com/pub/2000/06/perlwhirl.html # brrt | ||
loren | RabidGravy, is that link available ? | ||
brrt | a conference on a boat :-o | ||
loren | I use this script convert some data to another type | 13:16 | |
13:16
pochi left,
pochi joined
|
|||
RabidGravy | loren, it is, but for me at least it is no good as I can only see part of the code and I don't understand Japanese | 13:16 | |
lizmat | www.wired.com/2000/10/cruise/ # less formal description | ||
loren | RabidGravy, that's chinese | 13:17 | |
RabidGravy | see! I don't even know what language it is :) | ||
lizmat | sadly, Bill Harp passed away a few years ago :-( | ||
13:17
dsp- left
13:18
dsp- joined
|
|||
nine | Woah | 13:18 | |
lizmat | nine? | ||
13:18
stmuk__ joined
|
|||
RabidGravy | he just played Black Sabbath at 78? | 13:18 | |
loren | OK, still thank you willing to help | 13:19 | |
perlawhirl | lizmat: i also don't know what the Perl Whirl was... despite my nick | ||
13:19
Peter_R left
|
|||
lizmat | perlawhirl o/ | 13:19 | |
:) | |||
Herby_ | I'm in a windows environment. Is there a simple way to benchmark two programs, to compare how long they take to run? | ||
stmuk__ wonders if November works in January | |||
13:19
lnrdo joined
|
|||
nine | lizmat: a Perl Whirl might even get me to go to the US :) | 13:19 | |
dalek | kudo/nom: 564f0d6 | lizmat++ | src/core/CompUnit/PrecompilationRepository.pm: Only make an .IO once |
||
13:20
Peter_R joined
|
|||
loren | RabidGravy, i think there must be some problem with regex match, Perl 5 can process that file . | 13:20 | |
13:20
stmuk_ left
13:24
CIAvash left
|
|||
DrForr | . o ( tiltaperl? ) | 13:24 | |
Also, readline change pushed. There are other issues open, I'll look at those tonight. | |||
perlawhirl | hi perlers... is there a 'stat' like method i can use to get file permissions (not just IO's .r or .rwx stuff) | 13:26 | |
nine | Herby_: looks like there aren't any Windows users present besides you. I'd guess that an .msi will become available somewhere in the next two weeks. | 13:27 | |
RabidGravy | loren, okay I guessed my way to showing the whole code, what value of "$line" causes it to segfault? | ||
13:27
mcmillhj_ left
|
|||
lizmat | perlawhirl: .r / .w / .rw / .rwx / .rx etc. | 13:28 | |
Herby_ | nine, thanks for the reply | ||
lizmat | ah, perlawhirl : didn't read throgh | ||
loren | RabidGravy, you haven't run it ? | ||
perlawhirl | lizmat: yeah, so for example, on a nix like os, i would also like permissions for group and other | 13:29 | |
RabidGravy | loren, no | ||
loren | RabidGravy, the 295th line | ||
lizmat | perlawhirl: that would have to live in module space, and maybe it already does | ||
perlawhirl: as that isn't really portable between e.g. Win and Unix | 13:30 | ||
RabidGravy | perlawhirl, the mode is available via nqp, I think I have use it somewhere | 13:31 | |
perlawhirl | hmm.. the file test operators look to be calling nqp::stat | ||
i haven't used any nqp yet, so if you have an example of it in use that would help... otherwise i will plod along until i figure it out | 13:32 | ||
13:32
xpen joined
|
|||
loren | RabidGravy, that file is a input pinyin table | 13:32 | |
lizmat | I'm not sure using nqp::stat will give you more than what is already exposed in P6 | ||
loren | input method | ||
RabidGravy | lizmat, yeah there is a mode define that isn't exposed, 'ang on I'll find it | 13:33 | |
perlawhirl | RabidGravy: ta | 13:34 | |
masak | perlawhirl: you're not on a cruise to Alaska, are you? :) | 13:36 | |
perlawhirl | erm... nope... I'm staying in Australia | 13:37 | |
RabidGravy | perlawhirl: | 13:39 | |
m: use nqp; say nqp::stat($*PROGRAM.Str, nqp::const::STAT_PLATFORM_MODE); | |||
camelia | rakudo-moar 564f0d: OUTPUT«33188» | ||
RabidGravy | picking the bits out of the returned number is left as an exercise to the reader | ||
perlawhirl | yup! | 13:40 | |
no prob . that works a treat | |||
lizmat | RabidGravy: so what is that ? | ||
perlawhirl | i believe i just convert to octal and good to go | ||
13:40
schnuppi left
|
|||
RabidGravy | you may need to mask off some of the bits to the left but yeah | 13:40 | |
lizmat refers from exposing that in P6 :-) | 13:41 | ||
masak | perlawhirl: I hear in Australia, the Perl whirls spin the opposite way :P | ||
perlawhirl | yup, works a treat... using arbitrary base converter i also wrote in perl6... | ||
33188 in Base-8 is 100644 | |||
RabidGravy | lizmat, the same as whatever you'd get back from the C stat in the mode member | ||
lizmat | m: say 33188.base(8) | 13:42 | |
camelia | rakudo-moar 564f0d: OUTPUT«100644» | ||
perlawhirl | masak: Hah! though i believe that was debunked | ||
lizmat | perlawhirl: converter built into the language :-) | ||
perlawhirl | coreralis... or whatever it's called | ||
hoelzro | o/ #perl6 | ||
lizmat | hoelzro o/ | ||
RabidGravy | lizmat, I suggested exposing it a while back but people were concerned about cross platform matters | ||
hoelzro | o/ lizmat | ||
perlawhirl | lizmat: converting to base 60 isn't :D | ||
lizmat | ah, no | 13:43 | |
DrForr | Coriolis force is much weaker than even air currents at the scale of the toilet bowl :) | ||
masak | perlawhirl: yes, it's not actually true :) | ||
perlawhirl | as far as stat and cross-platform woes... it could live in a ::Unix namespace | ||
masak | perlawhirl: you need big things like tyfoons and stuff for it to be feasible | ||
typhoons* | |||
hoelzro | does anyone here know what name Sterling Hanenkamp goes by here? I have some insights into his abort() issue | 13:44 | |
lizmat | hoelzro: zostay ? | 13:45 | |
13:45
Zoffix joined
|
|||
perlawhirl | masak: i don't think we get many typhoons down this way. just friendly spiders | 13:46 | |
13:48
pjscott joined
13:50
pjscott left
|
|||
dalek | rl6-roast-data: 36915bc | coke++ | / (6 files): today (automated commit) |
13:51 | |
masak | perlawhirl: :) | 13:52 | |
hoelzro | lizmat: logs seem to agree, thanks! | ||
13:52
skyl4rk left
|
|||
masak | perlawhirl: what's your impression on Perl 6 so far? anything missing or undocumented? any snags you've hit? | 13:52 | |
perlawhirl: "we value your feedback!" :D | 13:53 | ||
hoelzro | .tell zostay could you ping me when you have a chance? I have ideas about your abort() woes | ||
yoleaux | hoelzro: I'll pass your message to zostay. | ||
dalek | c/MARTIMM-patch-4: f249036 | (Marcel Timmerman)++ | doc/Type/Str.pod: Add method info to trans Added trans method declarations and changed typo. Also added new-lines for readability in source. |
||
perlawhirl | ummmmmm... just playing around. i pop my head in here every so often when i get stuck | 13:54 | |
i'd like better examples in the docs, and hope to write some myself... cloned the docs repo just today actually | |||
RabidGravy | I'm actually surprised that the mode thing hasn't been done in the ecosystem | 13:55 | |
perlawhirl | but that was selfishly for my own purposes... the long train commute without internet. but gives me a reason to maybe contribute | ||
13:55
virtualsue left
|
|||
perlawhirl | yes... the mode thing i think should be exposed. golang is also very careful about cross-os compat (ie, can't natively look up group names) but it still has a low-level stat exposed | 13:56 | |
moritz | we all love good examples | ||
dalek | kudo/nom: 4662be6 | lizmat++ | src/core/Rakudo/Internals.pm: Add an internal KEY_SPACE_VALUE method |
||
kudo/nom: 988a783 | lizmat++ | src/core/CompUnit/PrecompilationRepository.pm: Use new KEY_SPACE_VALUE primitive Using .words for this is bad for performance in 2 ways: it creates an iterator for generating the words (when we know there's only 2), and it uses another iterator to assign to the two variables. Shaves off another few milliseconds from loading e.g. Text::CSV |
|||
perlawhirl | for the record... go is in general pretty horible to use compared to perls. but when i need something compilable, it's easier for me than c | ||
i am not a real programmer... i'm a network admin that likes to automate stuff... mostly perl5 | 13:57 | ||
masak | perlawhirl++ | ||
13:57
avenj left
|
|||
masak | perlawhirl: what would make Perl 6 more attractive to you as a network admin? | 13:57 | |
RabidGravy | if you right software then you're a real programmer | ||
er write | |||
13:58
regreg joined
|
|||
llfourn | RabidGravy: spelling is not necessery for a real programmar dw | 13:58 | |
perlawhirl | Rabid: yes i know you're right... but a lot of stuff flies way over my head sometimes. | ||
13:59
_nadim joined
|
|||
perlawhirl | masak: i really need a telnet and ssh module... right now using Net::Telnet (and IO::Pty with the telnet module) to do SSH, (because it means i can use the same methods for either protocol) | 13:59 | |
RabidGravy | llfourn, I think my fingers go faster than my brain sometimes | ||
llfourn | RabidGravy: at least something goes fast :) | ||
perlawhirl | i am thinking of rewriting my script using inline::perl5 | ||
RabidGravy | I thought someone had made an SSH module, but I haven't looked | 14:00 | |
perlawhirl | i'm waiting for performance improvements... but that wont stop me writing in perl6 so when things get faster i can hit the ground running | ||
lizmat | nine: have you considered using epoch values everywhere instead of Instants? | 14:01 | |
I mean, are we worried about an extra compilation when in a leap-second ? | |||
llfourn | lizmat: what what if I make a change and try and re-run in less than a second? | 14:02 | |
lizmat | well, that's already an issue | ||
llfourn | oh. | ||
lizmat | because the OS's only supply modified info with second granularity | ||
loren | Everyone want high performance ... but stable is important than performance | 14:03 | |
lizmat | it's only that on a leap-second (which we may not be getting in the foreseeable future anyway) | ||
llfourn: that window would be two seconds | |||
llfourn | lizmat: why? | 14:04 | |
lizmat | because during a leap-second, epoch doesn't advance | ||
llfourn | oh right leap seconds yeah... | ||
lizmat | so epoch stays the same for 2 seconds, rather than 1 | ||
llfourn | but why can't instant be more than 1 second accurate? | ||
lizmat | Instant *is* | ||
llfourn | oh you mean for file last modified gotcha | ||
lizmat | but the underlying OS doesn't provide that info | 14:05 | |
dalek | c: f249036 | (Marcel Timmerman)++ | doc/Type/Str.pod: Add method info to trans Added trans method declarations and changed typo. Also added new-lines for readability in source. |
||
perlawhirl | loren: that's why i'm waiting, not asking :D | ||
dalek | c: e54be5a | (Zoffix Znet)++ | doc/Type/Str.pod: Merge pull request #325 from perl6/MARTIMM-patch-4 Add method info to trans (Closes #319) |
||
lizmat | so why using Instants when we're only getting epoch granularity anyway | ||
perlawhirl | can someone remind me how to iterate a Seq without consuming it | ||
llfourn | perlawhirl: you can .cache | ||
but I have never needed to do this in practice | |||
(or assign to an array ofc) | |||
lizmat | perlawhirl: yeah, it should probably never need to be done by users | 14:06 | |
nine | lizmat: I just compare .modified as that appears to give me the mtime. Didn't think about anything else ;) | ||
perlawhirl | yep can assign to an array... i just forgot the method name | ||
14:06
inokenty left
|
|||
lizmat | so if you see that, please let us know how you did that | 14:06 | |
nine: ok | |||
ilmari | lizmat: some OSes do, e.g. linux has st_atim.tv_nsec | ||
yoleaux | 09:48Z <DrForr> ilmari: noted re: Readline, will unbreak. | ||
ilmari | in perl5 Time::HiRes can override stat() with a version that exposes that | 14:08 | |
14:08
inokenty joined
|
|||
ilmari | and OSX has st_[acm]timespec | 14:09 | |
loren | perlawhirl, I often use Rakudo, in order to find more problem ... | ||
RabidGravy | so I'm thinking in the first instance an IO::Path::Mode that augments IO::Path with a mode() method that returns some object | ||
lizmat | ilmari: well, fwiw, that's currently not exposed in nqp::stat :-( | ||
RabidGravy | ilmari, yeah, linux supports a stuct timespec with nanoseconds there | 14:10 | |
ilmari | lizmat: I may have to add that to moar/nqp then :) | ||
lizmat | ilmari: by all means :-) | ||
ilmari | RabidGravy: there are apparently at least 5 different ways of doing it, judging by the code in Time::HiRes | ||
llfourn | is there a short way of doing $_ !=== Any, I find myself doing it ALL the time | 14:11 | |
RabidGravy | lawks | ||
llfourn | I want to know whether any *information* has been provided in the variable | ||
hahainternet | so if i have a list like (1,2,*) and i use it in a hyper operator, the last value will repeat ad nauseum as expected, but if i try to do for example say $l[^10] it doesn't account for the whatever star, can i do so manually or is it restricted to hyper stuff? | ||
llfourn | obviously given $var { when Any { } } doesn't do what I want | ||
nine | Btw. I think the way to go about cross platform compat in a language is to provide abstractions wherever possible but expose native APIs when not. Because it should always be up to the user to decide if the code needs to be platform independent. | 14:12 | |
Juerd | llfourn: (Any) is information too | ||
ilmari | RabidGravy: metacpan.org/source/RJBS/Time-HiRe...s#L735-759 | ||
llfourn | Juerd: explain that to me :) | ||
lizmat | llfourn: .DEFINITE ? | 14:13 | |
Juerd | llfourn: Well, just like (Str) indicates that it is an undefined string, (Any) indicates that it is undefined but it could have been anything. | ||
llfourn: Can you explain your use case? I don't understand why Any is different than, say, Str. | |||
llfourn | Juerd: right but in the normal swing of things Any is the *most* undefined thing | ||
14:13
ugexe left
|
|||
Juerd | No, Mu is the Most Undefined :) | 14:14 | |
ilmari | RabidGravy: libuv already supports st_atimespec and st_atim | ||
llfourn | Juerd: yes but you don't run into it | ||
14:14
Herby_ left
|
|||
Juerd | This is true. | 14:14 | |
llfourn: But in which use case are Str and Int useful information, where Any isn't? | |||
llfourn: My gut says you're doing something unperlish, but that's just a gut feeling | 14:15 | ||
[Coke] | Regarding 6.d - 6.d isn't official yet; anything that is using 6.d at this point is defacto experimental, no? | ||
llfourn | Juerd: Any is useful information... I think that's the point.. but almost everything ~~ Any is true | ||
lizmat | ilmari: well, since we already expose Instants, you could use the current interface already | 14:16 | |
llfourn | Juerd: Any tells me that no definite information has been provided | ||
Juerd | llfourn: What I'm wondering about is if your use case is generic enough to warrant a language feature, or if it's specific to something you're doing but that few other people would try... | ||
RabidGravy | is this in the context of sub routine? In which case I'd be inclined to go for some multis | ||
FROGGS | [Coke]: v6.d will be official at the day it gets released... | ||
llfourn | Juerd: but if I want to see if that's the case ~~ Any doesn't work I have to do === Any | ||
Juerd: ok I'll test of lizmat++'s suggestion of .DEFINITE and get back to you :) | 14:17 | ||
Juerd | If it's just you, you could just define a new operator. | ||
lizmat | llfourn: not sure what you wanted, though :-) | ||
FROGGS | [Coke]: and all changes we make now have a chance to go into v6.d, but not necessarily have to | ||
Juerd | llfourn: Please provide use case examples. I think I understand what you mean, but not how and why you'd use it. | ||
arnsholt | llfourn: Is what you're trying to do check whether an optional argument was passed or not? | 14:18 | |
Juerd | m: sub postfix:<?> { $^thing !=== Any }; my Str $foo; my Any $bar; say $foo?, $bar?; | ||
camelia | rakudo-moar 988a78: OUTPUT«TrueFalse» | ||
ilmari | lizmat: but nqp::stat only returns ints, though, so we'd need a new op or stat(2) the file twice :( | ||
RabidGravy | :) | 14:19 | |
lizmat | but we could make it return nums, no ? | ||
ilmari: or do you fear breakage in nqp ? | |||
llfourn | this is what it is: Lets say I have a given/when, if I want to know if it's Any:U I can just do when Any { ... }. But if I want to know if it's *not* Any:U I have to do $_ !=== Any | ||
when Any:U that is | 14:20 | ||
the latter seems harder than it should be | |||
and i find myself doing it a lot | |||
I would like to make a Type that is the negation of antoher type essentially | 14:21 | ||
lizmat | nine: any reason why that line is there? github.com/rakudo/rakudo/blob/nom/...ry.pm#L126 | ||
[Coke] | Maybe we can make it explicitly experimental. | ||
lizmat | nine: seems it can be removed | ||
moritz | .oO( unwhen Any { ... } ) |
||
ilmari | lizmat: that'll break e.g. the size of files over 2**53 bytes | ||
llfourn | moritz: exactly :) | ||
14:22
pjscott joined
|
|||
[Coke] | "use v6.d :experimental" vs. "use v6.d" | 14:22 | |
RabidGravy | llfourn, then maybe a subset | ||
lizmat | ilmari: only return nums on modified / created / etc ? | ||
TimToady | when none(Any) { ... } | ||
loren | Night ..everyone, BTW, If someone understand and interested in regex match problem, can look at this . *link* -> www.oschina.net/code/snippet_2531803_53446 | ||
llfourn | RabidGravy: right what I am looking for is a way to auto create a quick negated subset | ||
ilmari | lizmat: can a single nqp op return different types depending on arguments? | 14:23 | |
14:23
pjscott left
|
|||
FROGGS | [Coke]: both statements do not make sense today | 14:23 | |
arnsholt | TimToady to the rescue, as usual! =) | ||
lizmat | ilmari: good question, probably not :-( | ||
14:23
skids joined
|
|||
llfourn | m: when none(Any) { "win".say }; | 14:23 | |
camelia | ( no output ) | ||
14:23
nige1 joined
|
|||
moritz | IME, introducing a second op is easier | 14:23 | |
nine | lizmat: it's used in github.com/rakudo/rakudo/blob/nom/...ry.pm#L130 | ||
lizmat | moritz ilmari : yeah, probably :-) | ||
ilmari | we'd need a new l?stattime or similar | ||
that returns num | |||
llfourn | m: $_ = "str"; when none(Any) { "win".say } | 14:24 | |
camelia | ( no output ) | ||
llfourn | it seems that doesn't work.. | ||
RabidGravy | m: subset NotAnAny of Any where * ~~ none(Any); my NotAnAny $f = Str; my NotAnAny $g = Any | ||
camelia | rakudo-moar 988a78: OUTPUT«Type check failed in assignment to $f; expected NotAnAny but got Str in block <unit> at /tmp/xeRX6v1coG line 1» | ||
FROGGS | ilmari: l?stat_n ? | ||
llfourn | none(Any:U)? | ||
lizmat | nine: yeah, but its already set at github.com/rakudo/rakudo/blob/nom/...ory.pm#L84 | ||
RabidGravy | or something like that | ||
nine | [Coke]: jnthn's suggestion was use v6.d.PREVIEW; | ||
ilmari | FROGGS: possibly, but it only makes sense for the time fields | ||
llfourn | m: $_ = "str"; when none(Any:U) { "win".say } | ||
camelia | rakudo-moar 988a78: OUTPUT«win» | ||
llfourn | m: when none(Any:U) { "win".say } | ||
camelia | ( no output ) | ||
nine | lizmat: true! It can go :) | ||
ilmari | nqp::const::STAT_*TIME | 14:25 | |
llfourn | there! | ||
lizmat | oki | ||
FROGGS | ilmari: k, just wanted to mention our '_n' naming convention | ||
llfourn | TimToady++ | ||
nine | lizmat++ # cleaning up my mess | ||
14:25
yibing joined
|
|||
moritz | or maybe teach the existing op to return one more field | 14:25 | |
and if that's added at the end, there's no problem | |||
14:26
pjscott joined
|
|||
ilmari | moritz: the existing one just returns an int | 14:26 | |
14:26
yibing left
|
|||
ilmari | if you want more than one stat field, you need to stat multiple times :( | 14:26 | |
14:26
sun joined
|
|||
lizmat | nine: it's not a mess! it needs peer review, which I sadly wasn't able to give until now | 14:26 | |
14:26
sftf joined
|
|||
moritz | ilmari: you can retrieve a float from the OS, truncated it to an integer, ship it in the int field, and additionally untruncated in the new float field | 14:27 | |
RabidGravy | yeah, I was wondering if there was scope to make a new op that returns a structure with all of them | ||
ilmari | whereas perl5 has the opposite problem, getting all the fields for stat requires multiple (slow) system calls on windows | ||
14:28
sun left
|
|||
TimToady | .oO(it needs someone peering at it) |
14:28 | |
Zoffix | I'm writing a module that lets you skip all tests in a test file based on env vars (taken from Lancaster Concensus as well as a couple more), installed modules, or installed C libs. If anyone wants to give feedback on my plan, especially the 'Method of Use' section, please do so :) github.com/zoffixznet/perl6-Test-I...ICATION.md | ||
dalek | kudo/nom: a2195ea | lizmat++ | src/core/CompUnit/PrecompilationRepository.pm: Reduce number of $*PERL.compiler.id lookups |
14:30 | |
FROGGS | Zoffix: OFFLINE_TESTING should be called ONLINE_TESTING or so, no? | ||
ilmari | moritz: maybe I don't understand now nqp ops work well enough, but won't that break compatibility if I change it from returning an int to a list of (int, num)? | ||
FROGGS | Zoffix: or I dont understand its use | 14:31 | |
Zoffix | FROGGS, I figure there is a far larger subset of people who *do* want to run network tests, thus, they'll be run by default, unless the user (or its installation client) specifically specifies that network is not available | ||
FROGGS | Zoffix: and did you think about the name 'Test::When' ? | ||
Zoffix | FROGGS++ Test::When is a far better name | 14:32 | |
I'll change it | |||
lizmat | nine: is there a reason why you make .IO objects inside the spurt ? github.com/rakudo/rakudo/blob/nom/...ry.pm#L137 | 14:33 | |
nine | Zoffix: are you sure about people wanting to run network tests? I generally avoid it as much as possible when installing foreign modules but would want to run them while developing | ||
lizmat: probably just ignorance | 14:34 | ||
FROGGS | Zoffix: abuot offline/online: say I state "use Test::When <online>" in my tests, and you run them with OFFLINE_TESTING, shouldnt the tests be skipped? | ||
moritz | ilmari: iirc nqp::stat returns an array | ||
lizmat | nine: ok, so the path is already an absiolute path, right ? | ||
ilmari | moritz: no | ||
moritz | ilmari: then my information is outdated, and I should stop talking about it :-) | ||
Zoffix | FROGGS, yes, if you set OFFLINE_TESTING those will be skipped | 14:35 | |
ilmari | moritz: github.com/perl6/nqp/blob/master/d...kdown#stat | ||
FROGGS | Zoffix: then the description of OFFLINE_TESTING is wrong | ||
ilmari | «Given a path and a code, return an int describing that path using the OS's stat() function.» | ||
Zoffix | FROGGS, is it? "if true, tests are being run in an environment with a restricted or unavailable network" | 14:36 | |
14:36
molaf joined
|
|||
Zoffix | FROGGS, thus, the tests with use Test::When <network>; are skipped, because the env var said network is unavailable | 14:36 | |
FROGGS | Zoffix: okay, seems we have a different understanding of English :o) | 14:37 | |
Zoffix | :| | ||
nine | lizmat: yes, it's absolute because it's based on the repository's $.prefix which is absolutified by repository-for-spec | ||
FROGGS | OFFLINE_TESTING does not make tests run, it potentially makes tests skipped | ||
lizmat | nine: cool, :-) | ||
FROGGS | so I think it is weird to state that it makes tests run under some circumstances | 14:38 | |
Zoffix: and btw, that OFFLINE_TESTING is currently the only env var that skips tests | |||
Zoffix | FROGGS, I see the confusion, s/tests/test suite/; | ||
FROGGS | that might be okay, just wanna mention it | ||
ahh | 14:39 | ||
Zoffix | FROGGS, NONINTERACTIVE_TESTING skips <interactive> tests. | ||
lichtkind_ | FROGGS, your patiente was for a good cause istarted to actually write code :) | ||
FROGGS | Zoffix: so you explain where OFFLINE_TISTING might be useful without explaining what OFFLINE_TESTING does | ||
Zoffix | nine, I created a poll on twitter. Gonna see what the results are and then make the changes accordingly twitter.com/zoffix/status/685108122227113984 | ||
FROGGS | lichtkind_: nice :o) | ||
14:40
perlawhirl left
|
|||
Zoffix | FROGGS, it's explained in the Method of Use section: github.com/zoffixznet/perl6-Test-I...-variables | 14:40 | |
14:40
ugexe joined,
icelesstea left
|
|||
Zoffix | Or at least, explained as much as NONINTERACTIVE_TESTING is ^_^ | 14:40 | |
lichtkind_ | FROGGS, which leads me to the question why in modules.perl6.org/ Math::Matrix has no status even it has a travis.yml? | 14:41 | |
14:41
icelesstea joined
|
|||
FROGGS | Zoffix: btw, it is not uncommon that a module wants to have one lib out of a set... how do you want to solve that? | 14:42 | |
Zoffix | lichtkind_, it's not no status, it's "not setup". Along with .travis.yml, the author needs to enable it on travis-ci.org/profile/USERNAME | ||
FROGGS | Zoffix: yes, have spotted it a minute ago | ||
lichtkind_: I believe the author has to enable travis on the travis-ci.org page | |||
RabidGravy | lichtkind_, it want run the tests until the first commit after the travis is enabled and there is a .travis.yml present | 14:43 | |
won't | |||
Zoffix | FROGGS, hm, how about :module()/:lib() can take junctions too. So it'll be: :lib('sqlite3', any(<foo bar ber>) ) | ||
lichtkind_ | thing is we already run tests when i make pull requests | ||
Zoffix | Though I don't yet know how to use junctions :D | 14:44 | |
FROGGS | Zoffix: +1 | ||
14:44
sjoshi joined
14:45
loren left
|
|||
FROGGS | so :libs<sqlite3 someotherlib> is equivalent to :libs(:all(<sqlite3 someotherlib>)), which is nice | 14:45 | |
Zoffix: and also important: headers | |||
and tools or so | |||
nine | Zoffix: can you vote "Only when asked" for me? The poll seems to require an account on that website. | ||
14:46
schnuppi joined
|
|||
timotimo | o/ | 14:46 | |
yoleaux | 08:05Z <lizmat> timotimo: I've removed IO::ArgFiles and its only test (WHICH.t) if you think we should have a deprecation cycle, I could do that | ||
Zoffix | nine, sure | ||
timotimo | lizmat: i wouldn't have wanted a deprecation cycle. however, it seems like my tests were outdated or something | 14:47 | |
Zoffix | FROGGS, noted. | ||
nine | So far 0 feedback on github.com/rakudo/rakudo/commit/92...e43d3765da | 14:48 | |
lizmat | nine: I'm getting into the code, I hope to be able to do in a little while :-) | ||
FROGGS | Zoffix: hmmm | 14:49 | |
14:50
xpen left,
aenaxi left
|
|||
FROGGS | Zoffix: now I'm thinking that parts of it should be in union with LibraryCheck or so | 14:50 | |
[Coke] | I'm fine with .PREVIEW | ||
timotimo | i have a tiny patch that prevents an allocation of two exceptions, a Backtrace and a Failure every time .gist is called | ||
FROGGS | Zoffix: because my dist will surely depends on testneeded C libs, headers or tools | ||
depend* | |||
lizmat | timotimo: cool! | ||
timotimo | lizmat: i was spec testing it when the which.t failure surprised me | 14:51 | |
Zoffix | FROGGS, oh right. I *knew* there was some module for library checking and I searched for Test:: but didn't find anything | ||
timotimo | and then somehow i stopped working on it completely :| | ||
FROGGS | nine: that's like the old candidates method? | ||
nine | FROGGS: a lot like that, yes. | ||
Zoffix | FROGGS, yeah, I most likely will use that module under the hood | ||
RabidGravy | Zoffix, I didn't call it Test::LibraryCheck as I could see a use for it outside of tests :) | ||
see also CheckSocket | 14:52 | ||
FROGGS | nine: does it get used by .load? | ||
Zoffix cringes at the naming inconsistency :) | |||
FROGGS | *g* | 14:53 | |
RabidGravy | I changed my ideas about the naming in between the two ;-p | 14:54 | |
timotimo | noming inconsistency | ||
14:54
psy_ joined
|
|||
nine | FROGGS: not directly. Both need and resolve use a common private method for finding a candidate. !matching-file vs. !matching-dist | 14:54 | |
RabidGravy | If I worried too much about naming I would never do anything | 14:55 | |
Zoffix | :D | ||
dalek | kudo/nom: 2a3fb6b | lizmat++ | src/core/CompUnit/PrecompilationRepository.pm: Don't use .IO or arrays when we don't need to |
||
14:55
brrt left
|
|||
Juerd | llfourn: Your "use case" is still described in language features. What kind of data are you dealing with? Why is Any different from Str in your code flow? What is the given in your given/when, and what does this given/when altogether do? | 14:56 | |
nine | FROGGS: the major difference between resolve and need is that need returns a CompUnit object with an initialized $.handle and dies if no matching candidate was found. | ||
14:56
aenaxi joined
|
|||
FROGGS | nine: ahh, I see | 14:56 | |
nine | FROGGS: resolve returns Nil if nothing is found and a CompUnit object with empty $.handle | ||
Juerd | llfourn: If you find yourself doing this a lot, I'm sure you could also just share some code to clarify if explaining what it does is hard. | ||
Excuse me, s/what it does/what it is used for/ | 14:58 | ||
nine | lizmat: you're fast tracking bitrot in the query_repos branch :) | ||
lizmat | nine: not sure that's a good thing ? | 14:59 | |
nine | lizmat: it will prolong my rebasing session when query_repos is up for merge. On the other hand, your modifications _are_ good. | ||
Juerd | nine: Rebase often, rebase early :) | 15:00 | |
llfourn | Juerd: You have ~~ right? when uses that. So do lots of things. But there is no version of when that uses !~~ and there is no way to have sub (Str:! $thing ) { } # an arg that isn't a string. | ||
you have to do where { $_ !~~ Str) or when $_ !~~ Str { } etc | 15:01 | ||
this is all I am talking about | |||
the negation is a lot more messy | 15:02 | ||
Juerd | llfourn: You seem to be ignoring my question. I understand what you mean, just not why you need this. If you can't come up with a use case explanation or examples, that's okay, but then let's just stop. | ||
llfourn | Juerd: ok :) | ||
nine | llfourn: when would a sub accept literally _everything_ except for a Str? | 15:03 | |
RabidGravy | is there a MONKEY-* that turns on all of "use nqp" and "MONKEY-TYPING' ? | ||
nine | RabidGravy: like a use MONKEY-ABANDON-ALL-HOPE-YE-WHO-ENTER-HERE;? | 15:04 | |
RabidGravy | yeah | 15:05 | |
llfourn | nine: I dunno. Just an example. | ||
RabidGravy | MONKEY-GONE-TO-HEAVEN alters what 6 is | 15:06 | |
15:06
khw joined
|
|||
nine | llfourn: that's exactly what Juerd was talking about. Examples for highly theoretical use cases make no good basis for language design :) | 15:07 | |
Juerd | MONKEY-SEE-MONKEY-DO will evaluate all your expressions twice. | ||
stmuk__ | MONKEY-ISLAND-2 | 15:08 | |
RabidGravy | :) | ||
dalek | ast: bfd3eff | timotimo++ | S03-binding/nonsense.t: test: can't bind to some things. type objects, ints, ... |
15:10 | |
timotimo | yeah, i had a local commit that "make spectest" refused to merge | ||
RabidGravy | for reference "use MONKEY;" does what I suggested, it probably kills kittens in the background but hey | ||
timotimo | ^- if those tests look sane, someone could add them to spectest.data | ||
llfourn | nine: well I don't consider conditional branches on the negations of things "Highly Theoretical" but I'll have a go :) | 15:11 | |
El_Che | silly question: I have read here some stuff about precomp and people moving stuff from the script to a pm. Is the precomp stuff that much faster? | 15:13 | |
nine | llfourn: well the signature example was highly theoretical. For given/when you have already given $foo { when Str { ... }; default { say "not a string!"; } } which is the same as given $foo { when $_ !~~ Str { ... } }; just clearer in my eyes | 15:14 | |
lizmat | El_Che: compiling the settings takes about 60 seconds, loading it .1 second | 15:15 | |
that's about 600x faster | |||
llfourn | nine: I am working on an example. Just going through my code and finding the common thread :) | ||
El_Che | Ai caramba would and older version of Bart Simpsons say | ||
15:15
bpetering joined
|
|||
nine | llfourn: now you're making me very curious :) Keeping up the suspense like that | 15:16 | |
timotimo | "eat my shorts!" | 15:17 | |
Juerd | bpetering: Thanks for helping out on rosettacode! I'll probably do C in a few days, and check another letter every few days. | ||
lizmat | Juerd++ | 15:18 | |
bpetering | Juerd: no problem, I'll fix up the broken /^B/ ones in the next couple days | ||
Juerd | bpetering: I'm just testing and tagging. I fix them only if the fix is really easy (about half of the broken examples). | ||
bpetering: I think it's great that you're also fixing stuff :) | 15:19 | ||
timotimo | wow, for the first time in a LONG time: All tests successful. | ||
bpetering | Juerd: I prefer to dive in a bit more, I've been away for a while and it helps me get up to speed quicker | ||
Juerd | timotimo: Let's celebrate! \o/ | 15:20 | |
bpetering | Juerd: maybe just mention in the channel when you start on a new section, I backlog so I'll avoid overlapping with you | ||
timotimo | \o/ | 15:21 | |
Juerd | bpetering: Will do | ||
bpetering: Look for /rosetta/ :) | |||
bpetering | Juerd: will do, cheers mate :) | ||
Juerd | One thing that's present a lot, is "say LIST" | ||
e.g. say map ... | |||
That adds parens where it didn't use to before | 15:22 | ||
dalek | kudo/nom: 29fa675 | timotimo++ | src/core/Mu.pm: gistseen doesn't have to allocate a Failure. Mouq++ |
||
Juerd | If the list is always one item, "say item LIST" works. If not, "say ~ LIST" makes things pretty again. | ||
lizmat | timotimo: wouldn't that also apply to perlseen ? | 15:23 | |
timotimo | ah, yeah | ||
let me also put it there | |||
Juerd | But I'm really wondering if say should even have those parens there. IIRC, say was for communicating with humans, whereas dd was for debugging. | ||
timotimo | i meant to check for the whole core setting for this "pattern" | ||
RabidGravy | I wish our neighbours hadn't finished their kitchen, they keep bringing tasty Indian food round :) | 15:24 | |
Juerd | say has become less useful for outputting stuff for human users | ||
15:24
nige1 left
|
|||
Juerd | (Everyone knows programmers aren't human, right? :P) | 15:24 | |
lizmat | timotimo: well, there's plenty... but generally, we want things to auto-initialize :-) | ||
TimToady | Juerd: I was mostly just changing the output to include the parens :) | 15:25 | |
timotimo | right, that wants to go through DYNAMIC, right? | ||
15:25
brrt joined
|
|||
TimToady | lack of parens is not human friendly when you have nested lists | 15:25 | |
Juerd | TimToady: I think that for single-element lists, not having the parens is the most dwimmy thing, as if "say item LIST" were used. | ||
TimToady: The nested lists situation could perhaps be solved by only leaving out the outer parens. | 15:26 | ||
TimToady | it's just a different kind of consistency | ||
15:26
atta left
|
|||
bpetering | .tell perlawhirl NativeCall bindings for libssh is on my TODO in the next month | 15:27 | |
yoleaux | bpetering: I'll pass your message to perlawhirl. | ||
Juerd | TimToady: It's definitely consistent. Not complaining about that :) | ||
15:27
atta joined
|
|||
Juerd | It just makes say slightly less useful for the use cases that I (and apparently several rosettacode example authors) run into, where apparently we like to just have a space separated list of things without delimiters. | 15:28 | |
TimToady | and, in case you didn't notice, last year was the time to redesign the language, not this year :) | ||
lizmat | timotimo: yes | 15:29 | |
Juerd | TimToady: I don't think that changing say's output is changing the language per se, but I do agree that keeping it steady for the sake of stability is probably a good idea. | ||
TimToady | anyway, I think a lot of the RC examples are not harmed by including the parens, having fixed a bunch of them last year already | 15:30 | |
so it's all tradeoffs... | |||
dalek | kudo/nom: ced637b | lizmat++ | src/core/CompUnit/PrecompilationRepository.pm: Only look up %*ENV once |
15:31 | |
nine | RabidGravy: I can imagine.....far worse fates | ||
Juerd | TimToady: A lot aren't, that's right. | ||
15:32
pjscott left
|
|||
bpetering | I haven't done enough to notice, I'll have an opinion after another 4 categories :) | 15:32 | |
TimToady | and ~ is short for a reason too :) | 15:33 | |
RabidGravy | nine, except for the getting huge from eating bhajis and samosa for snacks :) | ||
autarch | karl williams suggested to me that it might be good to announce Perl 6 on the unicode mailing list | ||
lizmat | autarch: what does that entail ? | 15:34 | |
15:34
Sqirrel joined
|
|||
autarch | sending an email, I think | 15:34 | |
www.unicode.org/consortium/distlist.html | |||
dalek | kudo/nom: 506473c | timotimo++ | src/core/Mu.pm: make perlseen more efficient like gistseen |
15:35 | |
bpetering | TimToady: I suspect over the last 2 weeks of intense perl 6 say ~ is what I've been falling back on | 15:39 | |
(that's been my inclination not knowing any better) | |||
15:40
larion joined
|
|||
lizmat | autarch: yeah, but that would be people subscribing, not perl6, right ? | 15:40 | |
autarch | lizmat: I'm not following | ||
15:40
larion left
|
|||
TimToady | bpetering: there's also put | 15:40 | |
lizmat | autarch: "good to announce Perl 6 on the unicode mailing list" | ||
so not just have someone subscribing, also writing something there about Perl 6, is what you mean? | 15:41 | ||
autarch | I'm saying it might be good to send an email about Perl 6 focusing on unicode to [email@hidden.address] | ||
lizmat | ok, then we're on the same page... :-) | ||
autarch | actually, I'm just passing on what Karl suggested, I have no strong opinion | ||
bpetering | m: my $a = 1,2; $a.put; | 15:42 | |
camelia | rakudo-moar 29fa67: OUTPUT«WARNINGS for /tmp/4ncecwqAXz:Useless use of constant integer 2 in sink context (lines 1, 1)1» | ||
bpetering | m: my $a = 1,2,3; $a.put; | ||
camelia | rakudo-moar 29fa67: OUTPUT«WARNINGS for /tmp/xH_zL9hnrV:Useless use of constant integer 2 in sink context (lines 1, 1)Useless use of constant integer 3 in sink context (lines 1, 1)1» | ||
TimToady | item assignment is tighter than comma | 15:43 | |
dalek | kudo/nom: 2fac939 | lizmat++ | src/core/Rakudo/Internals.pm: Introduce Rakudo::Internals.LL_EXCEPTION '--ll-exception' if running with that, otherwise '' |
||
bpetering | ergh | ||
braino much. | |||
my @a = 1,2,3; @a.put; | |||
m: my @a = 1,2,3; @a.put; | 15:44 | ||
camelia | rakudo-moar 29fa67: OUTPUT«1 2 3» | ||
bpetering | I should not be on IRC at 2am, this is disgraceful | ||
TimToady: I like put more. thanks :) | |||
m: my @a = 1; @a.put; | 15:46 | ||
camelia | rakudo-moar 29fa67: OUTPUT«1» | ||
bpetering | m: (1,1,2,3,5).put; | 15:48 | |
camelia | rakudo-moar 29fa67: OUTPUT«1 1 2 3 5» | ||
TimToady | it's just a print with a newline, basically | ||
and print uses .Str rather than .gist | 15:49 | ||
15:49
yurivish_ joined
|
|||
bpetering | m: say ~(1,1,2,3,5); | 15:50 | |
camelia | rakudo-moar 29fa67: OUTPUT«1 1 2 3 5» | ||
15:50
mattp_ joined
|
|||
bpetering | Having done a fair bit of python I think I have a slight preference for object.method syntax, I guess that's why | 15:51 | |
15:51
mattp__ left,
yurivish left,
xinming_ left
15:52
xinming joined
|
|||
llfourn | Juerd, nine: gist.github.com/LLFourn/9e08d3a94b08af9d5c38 # it wasn't as easy as I expected to come up with a cogent example but check that | 15:52 | |
masak | ooh, .put | ||
llfourn | but now I know none(Any:U) works I can't remember too well why I did this! | 15:53 | |
lizmat | llfourn: maybe Any::U didn't work yet when you tried initially | ||
moritz | llfourn: typically one wants to check if something is defined or undefined | ||
lizmat | it's fairly recent work of FROGGS++ | ||
moritz | ~~ !*.defined might also work there | 15:54 | |
Juerd | llfourn: That's not a real world use case. | 15:55 | |
llfourn | Juerd: oh ok. | ||
Juerd | llfourn: It's contrived. You said you ran into this "all the time", so it shouldn't be hard to just copy/paste one of those. | ||
15:55
avenj joined,
avenj left,
avenj joined
|
|||
TimToady | I'd write that ~~ :!defined | 15:55 | |
llfourn | Juerd: to be honest I am usually writing MOP introspecting stuff | 15:56 | |
TimToady | introspection is usually a design smell | ||
masak | these pair short forms kind of double as "symbols" in Perl 6 | ||
llfourn | so checking if something is or isn't exactly equal to Any is what I do a lot | ||
timotimo | *.defined.not? :) | ||
masak | TimToady: I think that's taking it too far. but just like all power tools, introspection should be confined to a small part somewhere. | ||
llfourn | this is in the context of descending $=pod and looking at the .WHEREFORE objects | 15:57 | |
TimToady | "small part" eqv "not usually" | ||
masak | TimToady: I used introspection just yesterday, in a (successful) effort to eliminate a lot of boring repetition in code. | ||
TimToady: my point is, I would only consider it a design smell if it was all over a code base | |||
TimToady | "all over" eqv "usually" | ||
I said "usually" for a reason | 15:58 | ||
timotimo | use introspection to figure out if your usage of introspection is all right | ||
masak | I realize that you can define all kinds of stuff to be equal to each other in order to be right :P | ||
llfourn | introspecting the return values of subs is not a design smell if you are trying to create .md files to describe the subs :| | ||
TimToady | well, that's not usual :) | ||
15:59
abraxxa left
|
|||
awwaiid | www.atdot.net/~ko1/activities/2015_...gi2015.pdf -- nice slides on precomp in ruby YARV land, experimental feature in ruby-2.3.0 | 15:59 | |
llfourn | TimToady: I don't use p6 to do usual things :P | ||
15:59
abraxxa joined
|
|||
PerlJam | .oO( I don't usually, but when I do, it's a design smell ) |
16:00 | |
awwaiid | I like the mst quote "Sufficiently encapsulated ugly is indistinguishable from beauty" | 16:01 | |
so like -- keep that meta in a box :) | |||
perigrin | masak: sometimes you need to write Durian code. | ||
TimToady | it's hard to encapsulate durian... | 16:02 | |
perigrin | TimToady: when overripe the abstractions do tend to leak. | 16:03 | |
TimToady ate a durian candy once and smelled like Yellowstone for two days after | 16:04 | ||
perigrin | Mom went to KL for a business trip many moons ago. She said the guy who picked her up apologized for the smell, the week before he'd been transporting durian in his car. | 16:05 | |
It was still noticeable. | |||
she did say it wasn't bad tasting though. | 16:06 | ||
llfourn | Juerd: I updated it with four real-world examples gist.github.com/LLFourn/9e08d3a94b08af9d5c38 | ||
Juerd: in the end it was four times so I guess that isn't "all the time" :P | 16:07 | ||
16:07
sjoshi left
|
|||
llfourn | I tried to golf it down so that it would make sense | 16:07 | |
masak | perigrin: durian tastes quite nice, yes | ||
perigrin | masak: my point being soemtimes the code may smell but leave the best taste in your mouth after :) | ||
16:08
P6Test joined
|
|||
masak | many years ago, I compared Perl itself to the durian | 16:10 | |
weird-looking, often misunderstood, heart of gold | |||
16:11
iml_ joined
|
|||
lizmat | this just in from FB: blog.builtinperl.com/post/happy-new...6-released | 16:11 | |
DrForr | I should've mentioned that :) | 16:12 | |
lizmat | .oO( the internets are fast :-) |
||
[Coke] gets notified that @nogoodnickleft tweeted something about postgres... and gets caught up in a p5/p6 thread, yikes. | 16:14 | ||
ugexe | nine: i mentioned to you before he threw his work out when it was clear what he was working on would no longer work with what had been merged in. Its most definitely not hot air, as I was running it on a slightly modified version of rakudo to load an external compunit before modules were loaded. Some people are ok with sending unfinished work in a PR, but he was not. I would not brush him off just because his | 16:15 | |
opinion conflicts with yours | |||
PerlJam | random weirdness: last night I was looking for a walmart near me, so I went to the maps app on my phone and started to search. As I typed "Wal", the top answer that popped up was "Larry Wall" (and what I would guess is his home address) | ||
[Coke] | if you have his address in your contacts, that might explain that | 16:17 | |
nine | ugexe: opinions are never an issue. He thinks the current architecture sucks? Well, so do I. It's the trying to win an argument instead of having a discussion that rubs me the wrong way. And dismission data about Inline::Perl5's test suite because "there are very few people that care about how fast Inline::Perl5's test suite runs" is just that. | ||
16:18
lostinfog joined,
xinming_ joined
|
|||
nine | ugexe: and "loading modules a little more quickly" when it's a factor of 600 faster. | 16:18 | |
ugexe | nine: he had modules loading quicker by changing the manifest layout. that was the easy part | 16:19 | |
16:19
P6Test left
|
|||
nine | ugexe: the manifest issue is on top of the factor 600 | 16:19 | |
ugexe | but he did have discussions about it. i think hes not interested in doing it again because its already there | ||
PerlJam | I'm not sure why I would have his address in my contacts, but it was a happy accident anyway :) | ||
ugexe | except its slower on a programs first run while modules are precompiled. this is not always acceptable | 16:20 | |
nine | ugexe: Discussions in private are useless. Keeping code on one's own harddrive is useless. | ||
16:20
bpetering left
|
|||
ugexe | im not talking about with me | 16:20 | |
with people here in #perl6, the lizmat gist, etc | |||
nine | What would help is concrete examples, suggestions and code that one can look at. And when asked about that it was "pull it out of thousands of lines of backlog yourself" | ||
ugexe | and it clearly wasnt on just his own hard drive, i just said i had ran it | 16:21 | |
nine | Yeah, how many rakudo core developers had access? | ||
ugexe | i just told you he was not interested in sending an unfinished pr | 16:22 | |
16:22
xinming left
|
|||
nine | Apparently he was also not interested in letting people know that he had work in progress. I certainly would have found other interesting bits to work on if I had known that the precomp issue was already well in hand. | 16:22 | |
But I didn't know. So I started to act. | |||
ugexe | clearly | 16:23 | |
Skarsnik | damn my backlog is too small | ||
PerlJam | Skarsnik: I was thinking just the same thing | ||
nine | It would just have taken a single message to stop me. I would have liked to have more time for Inline::Perl5 or even non-Perl6 things. | ||
ugexe | but as a "core developer" you're bound to be tortured by the users, not the other way around | ||
mspo | core developers inflict the most pain on users | 16:24 | |
☞ Think ahead. (You think that’s cute this year…) | |||
ugexe | torture the implementor on behalf of the user - one of the perl6 mottos | 16:25 | |
nine | ugexe: what does that have to do with anything? | ||
The motto is about not punting when things are really hard to implement but benefit the user. Not about making them do pointless extra work. | 16:26 | ||
ugexe | if you have to ask with the way you've been replying to a "user" i dont know what to tell you | ||
you brought up "core developers" | 16:27 | ||
nine | "core developers" as someone who can actually integrate code into rakudo. If tony-o wants a commit bit and push his stuff directly, I'd be absolutely fine with it. He'd just have to ask. | ||
Or you for what it's worth. | 16:28 | ||
16:28
FROGGS left
|
|||
nine | But until you do, you'll have to let someone with a commit bit know that you want to get code into rakudo. | 16:28 | |
ugexe | afaik he doesnt care about that | ||
nine | If he doesn't care about getting his code into rakudo, then what's the grief about contributions being rejected? | 16:29 | |
To this date I don't know what his issues with precompilation are. And I don't know what his alternative solution would be. So what does he want with me? | 16:30 | ||
ugexe | who cares, that doesn't mean throw out the rest of his opinions and points | ||
nine | What _are_ his points?? | ||
All he's said so far is "the current implementation sucks", "we've had another implementation a year ago" and "find other arguments somewhere in the backlog" | 16:31 | ||
16:31
bpmedley left
|
|||
Skarsnik | Does precomp file is system wide? (or at least in the perl6 install?) | 16:31 | |
*are | |||
nine | And of course that precompilation in FileSystem repositories is useless because the speedup is not worth some unspecified problems which many people disagree with. | ||
ugexe | nope, that was one of his points he brought up literally yesterday | ||
nine | So because those files are not system wide, we better give up the whole thing? Because if not, I'd be very interested in his solutions. Because I don't have one. | 16:32 | |
16:33
brrt left
|
|||
nine | I don't _know_ how to make it work with system wide precomp files. If I knew I'd implement it today. | 16:33 | |
But neither he, nor you will tell me what the solution would be. | |||
ugexe | im not sure why you are even bringing me up | 16:34 | |
lizmat | dinner& | ||
Skarsnik | Well for me it's a good point, they should be tied with p6 install, not on the user home | ||
nine | Because you said that you have discussed these issues with him for hours, so I assume that you would know at least a little about it. | ||
Which is more than I do. | |||
ugexe | yes, but most of my knowledge was on the previous implementation and ive never stated anything otherwise. nor have i ever stated which problems i had solved or not | 16:35 | |
nine | Skarsnik: yes, they should be. Definitely. We even tried it and failed spectacularily. | ||
Skarsnik: it's a really, really hard problem. | |||
Skarsnik | But, yeah precomp is awesome. I have some script that depend on 5+ modules. they don't start up on 30-40 sec anymore | ||
ugexe | precomp itself is not new, it was only removed for a period of time | 16:36 | |
llfourn | ugexe: it never worked on -Ilib stuff though right? | 16:37 | |
nine | Yes because the old implementation was even worse than what we have now and none of the people working on it thought that it was the right way to do it. | ||
llfourn | that's what speeds up development.. | ||
mst | uh | ||
I don't think we're going anywhere useful with this | |||
ugexe | llfourn: right | ||
mst | tony-o just keeps screaming incoherently without content | ||
nine is showing every sign of being burned out | 16:38 | ||
ugexe seems to feel stuck in the middle | |||
Zoffix is just eating popcorn | |||
mst | and other than those human observations, I'm basically lost technically | ||
I think we need some sort of ... ugh, working group like thing | |||
maybe a #perl6-comprepo channel or something that's just these discussions | |||
Skarsnik | #perl6-internal? | 16:39 | |
PerlJam | or at least get it off #perl6 | ||
mst | no | ||
I don't want to be in a general compiler channel | |||
the CUR stuff is like an entire specialism to itself | |||
16:39
nige1 joined
|
|||
mst | that or we mint a #perl6-trollchain or something | 16:39 | |
Zoffix | :D | ||
hoelzro | I wouldn't mind a list of grievances and proposed solutions in a document or something | ||
Zoffix | hoelzro, well volunteered! | ||
hoelzro | esp. since sometimes parts of the discussion are in the backlog, which is hard to get through | ||
RabidGravy | Wiki! | ||
mst | I think maybe we should mint an extra repo in the rakudo org and then abuse its issues and wiki | 16:40 | |
hoelzro .oO( what did I do?! ) | |||
Zoffix | something in /mu would be good | ||
mst | basically, we need to get it separated and coherent discussion to happen | ||
Zoffix | hoelzro, start the document of grievances in /mu repo. An editable wiki so we can log what the issues are and what suggestions to fix them are, rather than having all that spread over the backlog | ||
nine | mst++ # moving this into a productive direction again | ||
mst | because right now we have people not feeling heard, people feeling out of the loop, people not sure exactly what's going on, and me, who's basically completely clueless except I can spot an argument that's gone horribly wrong pretty reliably ... when I'm on the outside | ||
hoelzro | Zoffix: the only issue with having it in mu is non-commit bit folk will have to submit PRs | 16:41 | |
Zoffix | hoelzro, good point. | ||
RabidGravy | but you can separately permission a project wiki | ||
Skarsnik | I kinda wanted for Test/NC to have their own issue rather than lot on RT x) | ||
PerlJam | who *doesn't* have commit on mu? We can fix that very easy I think | ||
stmuk__ | I'm starting to wonder if we actually need a wiki and are outgrowing IRC | 16:42 | |
Skarsnik | *lost | ||
hoelzro | Skarsnik: I hear you there | ||
16:42
Actualeyes left
|
|||
hoelzro | stmuk__: for some things, definitely | 16:42 | |
stmuk__ | either using a fixed November (dogfood) or is there a github one | ||
16:42
lnrdo left
|
|||
nine | stmuk__: yes, this needs to be collected in a single place | 16:42 | |
hoelzro | hell, a wiki with a "proposed branches" page would be nice, b/c a lot of people felt that curli was "snuck in" | ||
well, proposed|active | 16:43 | ||
16:43
lnrdo joined
|
|||
Skarsnik | unrelated. will it be a good idea to have a page on the doc that list of modules that aim to make writing modules easier? But something neutral that does not talk about the quality of the modules/tools itself | 16:44 | |
Zoffix | Skarsnik, yes | 16:45 | |
Skarsnik, I'm trying to find a lib to test my test module and so far I only see bitrot -_- | |||
nine | hoelzro: may I then paste this URL into the wiki page as answer for the "snuck in" accusation? irclog.perlgeek.de/perl6/2015-11-26#i_11603568 | ||
Zoffix | Skarsnik, and I missed LibraryCheck module last night | ||
RabidGravy | if only there were tags specified for the meta files | 16:46 | |
hoelzro | nine: I'm just saying for future branches of curli-scale | ||
ex. if we had the wiki two months ago, you would have probably put curli on that page when you started it in October | |||
Zoffix | RabidGravy, if only those tags were searchable :P | ||
hoelzro | it would be *really* cool if the page were intelligent and could say how much the branches have diverged | 16:47 | |
nine | hoelzro: definite +1 on that page anyway | ||
RabidGravy | but if you find a good test tester I'd be all ears, with Test::META I resorted to exposing the internal subs and testing those | ||
hoelzro | but, like many of my ideas, it's probably overkill =) | ||
nine | sounds like ;) | ||
Zoffix | Will do | ||
stmuk__ | what the hell does »+<« do? and how can I search the docs for it? :) | ||
RabidGravy | bit shift? | 16:48 | |
hoelzro | hyper operator | ||
RabidGravy | m: say 1 +< 2; | ||
camelia | rakudo-moar 2fac93: OUTPUT«4» | ||
RabidGravy | yep bit shift | ||
stmuk__ | ah doc.perl6.org/language/operators#infix_%2B%3C | 16:49 | |
RabidGravy | and presumably | 16:51 | |
m: 4 +> 2; | |||
camelia | rakudo-moar 2fac93: OUTPUT«WARNINGS for /tmp/YN4pUCFGbs:Useless use of "+>" in expression "4 +> 2" in sink context (line 1)» | ||
RabidGravy | m: say 4 +> 2; | ||
camelia | rakudo-moar 2fac93: OUTPUT«1» | ||
stmuk__ | m: say (1,2,3) »+« (4,5) | ||
camelia | rakudo-moar 2fac93: OUTPUT«Lists on either side of non-dwimmy hyperop of infix:<+> are not of the same lengthleft: 3 elements, right: 2 elements in block <unit> at /tmp/j1WZvXNwhD line 1» | ||
stmuk__ | is that doc'd at doc.perl6.org/language/operators#Hyper_Operators | ||
"If one of the lists is shorter then the other, the operator will cycle over the shorter list until all elements of the longer list are processed." | |||
the error suggests otherwise | 16:52 | ||
RabidGravy | oh, you really meant »+<« literally, I though the » and « were just being used as funky quotes | ||
Zoffix | m: say (1,2,3) «+» (4,5) | ||
camelia | rakudo-moar 2fac93: OUTPUT«(5 7 7)» | ||
Zoffix | Weird. I thought the DWIMM was the other way around | 16:53 | |
RabidGravy | "do what I might mean" ? | ||
Zoffix | :) | 16:54 | |
stmuk__ | its a hyperoperator and a bit shift together I think | ||
skids | The point of the » points to the thing that gets "fanned out" to more entries. | ||
Zoffix | k | ||
RabidGravy | you kids should really lay off the crack | ||
stmuk__ | ah " The pointy part of « or » has to point to the shorter list." | ||
16:54
zakharyas left
|
|||
skids | m: say (1,2,3) «+« (4,5) | 16:54 | |
camelia | rakudo-moar 2fac93: OUTPUT«(5 7)» | ||
16:55
itaipu left
|
|||
skids | makes more visual sense with e.g. 1 <<+ 3,4,5 | 16:55 | |
mst | right, screw it | 16:56 | |
mst mints #perl6-toolchain | |||
nine: please | |||
ugexe: please | |||
tony-o: please | |||
flussence: please | |||
tadzik: please | |||
Zoffix: come be spare minion! | |||
Zoffix | Already there | ||
mst | jnthn: adult supervsion requested. in its absence, you'll do. | ||
alpha123 sneaks in | 16:57 | ||
stmuk__ | skids: the pointy part in your example points to the longer list | 16:58 | |
I'm either misunderstanding the docs or they are wrong (or both) | 16:59 | ||
mst | right, so, who can give us a repo? | ||
Zoffix | mst, what does it need to be called? | ||
mst | I wanted one in rakudo org called rakudo-toolchain-discuss or something | ||
RabidGravy | mst++ # jfdi | ||
Zoffix | Ah. I don't got access to rakudo org | 17:00 | |
hoelzro | PerlJam has access, iirc | ||
mst | I'd be ok with anywhere but I wanted to use github issues and wiki | ||
Juerd | mst: Rakudo or Perl 6? They're different organizations on Github. | ||
hoelzro | hmm, I have perl6 perms | ||
mst | Juerd: I was -thinking- rakudo for the moment, I'm not sure how much our internals will generalise and I'm definitely sure that's not the biggest problem we have yet | ||
stmuk__ | more people have perl6 access .. that might be a more pragmatic choice | ||
mst | I was planning to get perms to this new repo given out like water | 17:01 | |
since it's primarily a discussion space anyway | |||
stmuk__ | I think rakudo needs a posted signed agreement | ||
mst | right, then let's create it under perl6, with title toolchain-bikeshed | ||
that should make the discursive, non-formal nature clear | 17:02 | ||
Juerd | Working on it :) | ||
mst | hopefully you can see what I'm trying to achieve in terms of presentation of this thing | ||
while not being completely fragmented away from the mainline stuff | |||
17:02
domidumont left
|
|||
RabidGravy | yeah I was just going to say a hellabunch o people have the commit on perl6 | 17:02 | |
Zoffix | doc.perl6.org/language/io is glaringly missing the STD[OUT|ERR|IN] operations :/ | 17:03 | |
Juerd | github.com/perl6/toolchain-bikeshed | ||
Next up: permissions | |||
RabidGravy | Juerd++ # jfdi | ||
hoelzro | Juerd++ mst++ | 17:04 | |
Juerd | mst: Your github username? | ||
mst | shadowcat-mst | ||
17:05
dwarring joined
|
|||
Juerd | Okay, have fun :) | 17:05 | |
mst | does that give me the capacity to add other people? | 17:06 | |
Juerd | If anyone disagrees with this move, open an issue on the repository :) | ||
mst: As far as I know, yes. | |||
PerlJam | Juerd++ | 17:08 | |
PerlJam goes back to work | |||
17:08
Peter_R left
|
|||
mst | Juerd: looks like it. ta. | 17:08 | |
17:09
Peter_R joined
|
|||
Zoffix | How do I re-open $*OUT after closing it? What I want to achieve is to temporarily redirect STDOUT/STDERR into variables and then reopen the filehandles back to normal | 17:10 | |
flussence shows up at exactly the right wrong time | |||
mst | flussence: WELL VOLUNTEERED | ||
moritz | Zoffix: you can achieve that with my $*OUT = open(...); in a new scope | 17:11 | |
ugexe | my $oldout = $*OUT; $*OUT = class { ... }; $*OUT = $oldout ? | ||
17:11
dakkar left
|
|||
Zoffix | moritz, thanks | 17:11 | |
RabidGravy | I was just typing exactly that | ||
Zoffix | Thanks all :) | ||
Juerd | { temp $*OUT ... } | ||
ugexe | temp didnt work right on $*OUT when i tried that a long time ago. maybe it does now | 17:12 | |
Juerd | Works fine | ||
m: say "hi"; { temp $*OUT := $*ERR; say "hello"; }; say "bye"; | 17:13 | ||
camelia | rakudo-moar 2fac93: OUTPUT«5===SORRY!5=== Error while compiling /tmp/VYWAtUAR5LCannot use bind operator with this left-hand sideat /tmp/VYWAtUAR5L:1------> 3say "hi"; { temp $*OUT := $*ERR7⏏5; say "hello"; }; say "bye";» | ||
Juerd | Argh, not := | ||
m: say "hi"; { temp $*OUT = $*ERR; say "hello"; }; say "bye"; | |||
camelia | rakudo-moar 2fac93: OUTPUT«hihellobye» | ||
Juerd | Oh, camelia doesn't differentiate between stdout and stderr. | ||
You'll just have to take my word for it or try it locally then :) | 17:14 | ||
17:14
huggable left,
huggable joined
|
|||
nine | flussence: congrats on making it into lwn.net's quote of the week :) | 17:15 | |
flussence | aw crap | 17:16 | |
Zoffix | What's the quote? :) | ||
flussence | why is everything happening to me today /o\ | 17:17 | |
nine | lwn.net/Articles/670378/ | ||
17:18
Peter_R left
17:19
Peter_R joined
|
|||
hoelzro | btw, is anyone planning on going to NLPW in April? | 17:20 | |
hoelzro assumes lizmat is | |||
17:21
domidumont joined
|
|||
dalek | albot: 48f1121 | (Zoffix Znet)++ | freenode.org.conf: Add #perl6-toolchain to Freenode channels to join |
17:25 | |
17:25
camelia left
17:26
camelia joined
|
|||
Juerd | rosettacode.org/wiki/Call_an_object...hod#Perl_6 is a mess. | 17:27 | |
17:27
ChanServ sets mode: +v camelia
|
|||
Juerd is going to remove all that and start over. | 17:27 | ||
Zoffix | Is it even possible to open() without a file, but a variable instead? Like Perl 5's open my $fh, '>', \ $foo; Where print $fh 'blah'; is basically equivalent to $foo .= 'blah'; | 17:32 | |
Reading the IO* Type docs and not seeing anything. | |||
m: temp $*OUT = 42; say 42 | 17:33 | ||
camelia | rakudo-moar 2fac93: OUTPUT«Too many positionals passed; expected 1 argument but got 2 in block <unit> at /tmp/hXKHjeiomu line 1» | ||
Zoffix | weird eh :) | ||
RabidGravy | Isn't there an IO::Stringy or something in the ecosystem? | ||
Zoffix | Ah, right | 17:34 | |
RabidGravy++ | |||
I'm really hesitant to use modules with docs like these -_- github.com/sergot/IO-Capture-Simple | |||
C'mon people, this isn't node.js! :) | 17:35 | ||
hoelzro++ # IO::String looks exactly like what I want | |||
17:36
FROGGS joined
|
|||
Skarsnik | duh is there a better way to write $t.ref-type = %types{$t.ref-id} if %types{$t.ref-id}.defined; | 17:36 | |
ilmari | why are the filetest tests split between S32-io/file-tests.t and S16-filehandles/filestat.t? | 17:37 | |
Hotkeys | Skarsnik: I believe you can do $foo //= $bar | 17:38 | |
Zoffix | Skarsnik, $t.ref-type = %types{$t.ref-id} // $.ref-type ? | ||
s/'$.'/'$t.'/ | |||
ilmari | the latter has time related tests, the former everything else | ||
Hotkeys | $t.ref-type //= %types{$t.ref-id} | ||
Zoffix | Don't think it's better, but shorter :) | ||
Hotkeys | should work I think | 17:39 | |
Zoffix | Hotkeys, that's a different meaning | ||
Skarsnik | $foo //= $bar affect $foo if $foo is undef | ||
Zoffix | Hotkeys, that will assign if $t.ref-type is not defined, but the OP is if %types{$t.ref-id} is defined | ||
Hotkeys | oh | ||
17:40
yqt joined
17:44
schnuppi left
|
|||
Juerd | Can we place bets on when indirect method syntax is dropped? My guess is 6.e ;) | 17:45 | |
FROGGS | hehe | ||
Hotkeys | indirect method? | ||
Juerd | I don't recall having seen it in the wild. | ||
FROGGS | I would not use it either | ||
Hotkeys | What are those? | 17:46 | |
RabidGravy | oh | ||
perigrin | Hotkeys: method $object instead of $object.method | ||
RabidGravy | m: class C { }; say new C | ||
camelia | rakudo-moar 2fac93: OUTPUT«5===SORRY!5=== Error while compiling /tmp/jYxt1nTQMsUnsupported use of C++ constructor syntax; in Perl 6 please use method call syntaxat /tmp/jYxt1nTQMs:1------> 3class C { }; say new C7⏏5<EOL>» | ||
Hotkeys | oh | ||
FROGGS | no I think: method: $object | ||
mst | wait, of all the things to retain from perl5, you kept *that* :( | ||
Hotkeys | that's confusing though | ||
yeah I'm alriht with that FROGGS | |||
Juerd | m: class Thing { method m($name) { say "Hi $name" } }; my $thing = new Thing:; m $thing: "#perl6"; | ||
camelia | rakudo-moar 2fac93: OUTPUT«5===SORRY!5===Unrecognized regex metacharacter ; (must be quoted to match literally)at /tmp/jhrg9Z424q:1------> 3 $thing = new Thing:; m $thing: "#perl6"7⏏5;Couldn't find terminator $ (corresponding $ was at line 1)at /tmp/jhrg9Z42…» | ||
mst | Hotkeys: yes that's why nobody writing perl5 uses it anymore because aaaaaaaaaaaaaa | ||
Hotkeys | but justhaving 'method $object' looks like a sub | ||
FROGGS | mst: exactly my feelings :o) | ||
Hotkeys | what if there is an overlap | 17:47 | |
what happens then | |||
perigrin | mst: nobody writing perl5 _intentionally_ uses it anymore | ||
RabidGravy | actually who was asking about the error messages before | ||
mst | Hotkeys: I refer you to: aaaaaaaaaaaaaaa | ||
RabidGravy | that is a pretty good example | ||
Hotkeys | lol perigrin | ||
perigrin | we _all_ get bit by it until we learn to use 'no indirect;' | ||
Hotkeys | is aaaaaaaaaaaaaaaa | ||
a noise | |||
mst | that's why I tried to have Moo feed you 'no indirect' by default | ||
Hotkeys | screaming in anguish | ||
Juerd | "regex metacharacter"? | ||
OH! | |||
mst | Hotkeys: it's the sound of mst hiding under the desk and screaming until the evil syntax goes away | ||
Juerd | Probably shouldn't call my method 'm' | ||
perigrin | Hotkeys: the noise he makes when he remembers what it was like before 'no indreict;' | ||
Hotkeys | ah | ||
Juerd | m: class Thing { method not-m($name) { say "Hi $name" } }; my $thing = new Thing:; not-m $thing: "#perl6"; | ||
camelia | rakudo-moar 2fac93: OUTPUT«Hi #perl6» | ||
Hotkeys | aaaaaaaaaaaaaaaaa | ||
RabidGravy | Unsupported use of C++ constructor syntax; in Perl 6 please use method call syntax | 17:48 | |
Juerd | RabidGravy: It needs a colon before the (empty) argument list. | ||
RabidGravy | I know | ||
but I liked the error message :) | |||
mst | m: class Thing { method not-m($name) { say "Hi $name" } }; my $thing = new Thing:; $thing.not-m: "#perl6"; | ||
camelia | rakudo-moar 2fac93: OUTPUT«Hi #perl6» | ||
nine | Why on earth do we have this? | ||
Hotkeys | RabidGravy: I was asking about errors | ||
mst | ^^ that version seems fine | ||
'not-m $thing:' ... aaaaaaaa | |||
Juerd | :) | ||
RabidGravy | HotKeys, there you are then :) | ||
Juerd | I like showing people new stuff they didn't know before. Even if it keeps them up at night, yelling and screaming :P | 17:49 | |
FROGGS | nine: TimToady likes it I guess | ||
Juerd | But I'm sure that someone, somewhere, will love this syntax :) | ||
I don't mind that it's there. | 17:50 | ||
I don't think it'll be used much. And when it is used, it *will* impress whoever reads that code. | |||
perigrin | There are a few places where linguistically it helps ... but most programmers don't think like that anymore. | ||
Hotkeys | RabidGravy: pretty neat | ||
will it impress them? | 17:51 | ||
perigrin | Juerd: the problem is how easy would it be to trip accidentally. That's the biggest pain in p5's indirect object notation. | ||
Juerd | rosettacode.org/wiki/Call_an_object...rl_6.7D.7D # Cleaned this up. Please proof-read. | ||
Hotkeys | or will it make them go aaaaaaaaaaaaa | ||
Juerd | perigrin: IIRC that's why the colon is necessary. | ||
Hotkeys | what about only moderately direct methods | 17:52 | |
perigrin | Juerd: ... to stop things from leaking out the backside ... I see. | ||
Hotkeys: tangential methods? | |||
Hotkeys | yes | ||
perigrin | I think you need to quote them or store the method object in the varaiable ... otherwise you're fine. | 17:53 | |
Hotkeys | what if I'm annoying | ||
and do .method with $object | |||
m: .Rat with pi | 17:54 | ||
ilmari | $ ./perl6 -e '".".IO.modified.say' | ||
Instant:1452188499.967552 | |||
camelia | ( no output ) | ||
arnsholt | perigrin: It's like prefix period to call methods on $_. It only *looks* implicit =) | ||
Hotkeys | m: .Rat.say with pi | ||
camelia | rakudo-moar 2fac93: OUTPUT«3.141593» | ||
ilmari | m: ".".IO.modified.say | ||
camelia | rakudo-moar 2fac93: OUTPUT«Instant:1452189285» | ||
ilmari | \o/ | ||
perigrin | Hotkeys: then I would hope your code-reviewer smacks you on teh knuckles. | ||
Hotkeys | eheheh | ||
.smack with $knuckles | |||
RabidGravy | though, somewhat related to indirect I do have callwith passing a new invocant somewhere in some code | 17:55 | |
perigrin | .smack: $knuckles with $ruler | ||
nine | ilmari++ | ||
17:55
ab6tract joined
|
|||
nine | ilmari: now if only Windows on FAT32 would give better than 2 seconds resolution ;) | 17:56 | |
Juerd | m: class K { method smack { say "Like this?" } }; my $knuckles = K.new; | 17:57 | |
camelia | ( no output ) | ||
Juerd | Argh. Too early. | ||
(Wacom tablet is borking. Pasting too much) | 17:58 | ||
17:58
abraxxa left
|
|||
Juerd | m: class K { method smack { say "Ouch!" } }; sub infix:<with> { $^object.$^method }; my $knuckles = K.new; .smack with $knuckles; | 17:58 | |
camelia | rakudo-moar 2fac93: OUTPUT«Ouch!» | ||
Juerd | To be honest, I don't really understand how that works :) | 17:59 | |
RabidGravy | return $foo but Bar; is my favourite thing of the say | ||
day | 18:00 | ||
perigrin | m: class Ruler { method smack ($thing) { say "ouch: you hurt my $thing" } }; my $ruler = Ruler.new; .smack: "knuckles" with $ruler; | ||
camelia | rakudo-moar 2fac93: OUTPUT«ouch: you hurt my knuckles» | ||
ab6tract | nine: fwiw, the overlay style makes a lot of sense to me | ||
perigrin | :) | ||
Juerd | Oh, there already is a 'with'? | ||
masak | Juerd: yes | ||
Juerd | Ha, that might explain why my code magically dwim. | ||
ab6tract | and it also seems to me that it will make comprehending language versions significantly easier | ||
Juerd | My infix with was never called :) | ||
masak | Juerd: it's like `if`, except (a) it checks for definedness, not truthiness, and (b) it topicalizes | 18:01 | |
perigrin | Juerd: I'm as supprised as anyone that worked. Possibly because it's the first perl6 I've ever written. | ||
ab6tract | as the changes are forefronted | ||
Juerd | masak: Thanks for explaining :) | ||
18:01
firstdayonthejob joined
|
|||
Skarsnik | I made something that took 12 sec, took 0.2 sec. I am happy x) | 18:02 | |
RabidGravy | and we're happy you're happy | 18:03 | |
nine | ab6tract: lizmat++ is right though. It will not be enough. For example when 6.c code uses a 6.d module and the latter creates some core object and passes it back to the 6.c code, this object will still have the 6.d API. | ||
18:03
nige1 left
|
|||
ab6tract | it also seems to me like we should be able to write a script that would be able to generate a 'munged' directory? | 18:03 | |
ah, i hadn't thought of that. nice catch lizmat :D | 18:04 | ||
[Coke] | m: my $a = Str.new(:value<hi>); my $b = .new(:value<hi>) with Str; say $a; say $b; | ||
camelia | rakudo-moar 2fac93: OUTPUT«hi(Any)» | ||
Juerd | [Coke]: Str is undef | 18:05 | |
[Coke] | Str is still an object. | ||
Skarsnik | RabidGravy, gptrixie: Times -- gccxml: 0.24837610 sec; xml parsing: 2.9047862 sec; magic: 10.2859833 | ||
-> after changing stuff : Times -- gccxml: 0.2442622 sec; xml parsing: 2.80925026 sec; magic: 0.2820472 | |||
ab6tract | maybe we could get away with .v6c , .v6d , coercers implemented on any augmented classes ? | ||
[Coke] | but yes, I assume that whether it's defined might impact the ability to 'with' it | ||
Juerd | [Coke]: I just learned that 'with' is a conditional, checking for definedness. | ||
nine | ab6tract: OTOH if the module uses 6.d because it's a newer version than was available when the 6.c user was written, the correct answer is to stick with the older (presumably 6.c) version of the module. | ||
Skarsnik | Oh a if $foo.defined and $foo eq 'foo' can be written: with $foo eq 'foo' ? | 18:06 | |
nine | ab6tract: and if module using code was added when 6.d was already available, the using code should manage that. | ||
ab6tract | right. it's a bit DIWIDT | 18:07 | |
nine | Still something we should keep in mind when changing core APIs. Some hurts can surely be avoided easily. | ||
ab6tract | nine: i think coercers might be a decent peg | 18:10 | |
and after you coerce down, that object is at the earlier version, full stop | |||
flussence | ooh, this is fun. The output of perl6 -v (and the pathname for precomp modules) depends on the `git-config core.abbrev` in effect when it was built | ||
masak | ab6tract: "Doctor, It When I Do This"? | 18:11 | |
ab6tract | masak: i knew that looked off :) | ||
nine | ab6tract: certainly an intriguing idea. Especially since we have version support for classes. Probably the hardest part would be figuring out, when to actually coerce. | ||
18:11
ilbot3 left,
lucs left,
ilbot3 joined
|
|||
ab6tract | nine: good point. doing it cheaply might be a trick | 18:12 | |
yurivish_ | quick bug: Perl docs for // go to doc.perl6.org/routine/%2F%2F, which is not found | ||
18:12
lucs joined
|
|||
flussence | yurivish_: yep, that's known about. ".." has a similar problem | 18:13 | |
Zoffix | yurivish_, known issue | ||
github.com/perl6/doc/issues/155 | |||
yurivish_ | ah, good :) | 18:14 | |
mspo | are the docs statically generated files or powered by something | ||
flussence | .oO( we're going to need telegram encoding for texas variants ) |
||
Skarsnik | generated | 18:15 | |
ab6tract | the traditional thing with languages is more like you are stuck on an earlier version until you can upgrade | ||
mspo | so there's a file named ...html ? | ||
18:15
zwu joined
|
|||
ab6tract | s/upgrade/migrate your old crap/ | 18:15 | |
Skarsnik | I don't think 6.c will be adopted comparing to the next major release x) It's just a feeling | 18:16 | |
ab6tract | so the fact we potentially enable anything reasonable with that at all would be pretty cool | ||
nine | Skarsnik: when do you think the next major release will arrive? | ||
zwu | What is reason for that "List cannot be parameterized" , in m: my List of Int @a; I know the default @variable is to Array, which is a mutable and subclass of List. | ||
How can I declare a list variable using @? instead of array? | 18:17 | ||
Zoffix | mspo, statically | ||
Skarsnik | nine, No idea. but in my head I prefer using a 1.1 version of something than the 1.0 that did not have previous beta widly tested | ||
18:18
lucasb joined
|
|||
mspo | Zoffix: so there's a file named '..' ? | 18:18 | |
Zoffix | lemme check | ||
mspo | when I say statically generated I mean a process is reading the docs and creating files | ||
nine | Skarsnik: there's a huge difference between the language version and the compiler version. I honestly do not recommend using rakudo 2015.12 due to curli issues. But 2016.01 will be much better already, while still being an implementation of Perl 6.c | 18:19 | |
And 6.d will probably arrive at the end of the year earliest. | |||
18:19
sftf left
|
|||
Juerd | What is "curli"? | 18:19 | |
icelesstea | The Finnish version of curl. | ||
Skarsnik | Yep, I am waiting for the next rakudo release to upgrade the install on my dedicated server x) | ||
nine | Juerd: the module management redesign that landed far too close to Christmas | 18:20 | |
Skarsnik | I am more concerned by the modules used on my script on this system x) | ||
nine | The openSUSE packages I built are sort of an unofficial 2015.12.1, as 2015.12 was just not packageable. | ||
mspo | gist.github.com/jnthn/47a42b2e86e7e552b2e2 | ||
is curli I think | |||
lizmat | www.dagolden.com/index.php/2589/per...l-enemies/ # food for thought | ||
nine | mspo: yes | ||
Zoffix | mspo, "...html" | ||
perigrin | nine: I was sort of hoping it was a middleware messaging system ... curli-queue is just too good a name to pass up | ||
Zoffix | in /routines/ | ||
mspo | Zoffix: okay! | 18:21 | |
Zoffix | mspo, this actually works: doc.perl6.org/routine/...html | ||
Juerd | @rosettacode.grep(/^C/)[^20] done. | ||
Zoffix | But won't without the '.html' bit | ||
mspo | Zoffix: yeah | ||
Juerd | C is a huge catagory | ||
mspo | there's also a /.html or simiar, right? | ||
Skarsnik | ++ to people updating rosettacode | ||
18:22
balazs joined,
nige1 joined
|
|||
Juerd | Skarsnik: Not really updating much. I'm mostly checking whether examples still work. There's some pre-GLR stuff left on RC. | 18:22 | |
Skarsnik: And some need MONKEYs. | |||
Skarsnik | Well it's still some work ^^^ | ||
Juerd | It is. Too much, actually :) | ||
mspo | Zoffix: so is powering the no .html rule? mod_rewrite or MultiViews ? | 18:23 | |
llfourn | there is also 'without' that is with but checks for definedness | ||
Juerd | I've rewritten two articles today: "Call an object method" and "Check that file exists". | ||
llfourn: undefinedness? | |||
llfourn | *undefinedness | ||
Zoffix | lizmat, I utterly disagree with this postulate. My knowledge of Perl 5 impeded progress with Perl 6 on more than one occasion. Especially the whole flattening business "First, a postulate: given the language similarities, the people that will find it easiest to learn Perl 6 are today's Perl 5 developers." | ||
lizmat | Zoffix: not saying I agree with the blog post, hence the "food for thought" | 18:24 | |
Zoffix | mspo, "Options +Indexes +MultiViews" | ||
mspo | Zoffix: multiviews suck ;) | ||
Juerd | Zoffix: So far I've seen two people without any prior Perl experience pick up Perl 6 without much trouble. | ||
Zoffix | *shrug* :D | ||
lizmat | I think Dagolden, being a uni-language person (afaik), doesn't realize the destructive power of "false friends" | 18:25 | |
Juerd | Zoffix: I think non-Perl people are a larger and more useful target audience :D | ||
Zoffix | Juerd, totally | 18:26 | |
Juerd | lizmat: With a limited syntax, though, there will always be false friends in relation to *some* language. For example flattening, it's either a false friend to Perl 5 or to other languages, but neither design choice would actually solve the issue. | ||
18:27
peter__ joined
|
|||
El_Che | I think learning perl6 is a lot easier when you know perl5 (in my experience) | 18:27 | |
Juerd | The one-arg rule is a false friend to every other language, perhaps, but I find that I'm already getting used to it. | ||
El_Che: Nobody can compare this because nobody will simultaneously know and not-know Perl 5 :) | |||
Zoffix | :D | 18:28 | |
El_Che | Juerd: you understimate my quantum state :) | ||
Zoffix | eheh | ||
Juerd | El_Che: Yet at the same time, I don't :P | ||
Zoffix | I think that blog post has a lot of truth TBH. | ||
Skarsnik | m: my $foo; say "nop" with $foo eq 'a'; $foo = "a"; say $foo with $foo eq 'a'; | ||
camelia | rakudo-moar 2fac93: OUTPUT«Use of uninitialized value $foo of type Any in string contextAny of .^name, .perl, .gist, or .say can stringify undefined things, if needed. in block <unit> at /tmp/HkNsl2zayb line 1nopa» | ||
PerlJam | Zoffix: which parts? | 18:29 | |
El_Che | let's say my perl5 is crappy enough to not count as enough perl5 and too good to count as not existent :) | ||
lucasb | m: say so Perl S& !Perl | ||
camelia | rakudo-moar 2fac93: OUTPUT«True» | ||
lucasb | Juerd: ^^ :D | ||
Zoffix | PerlJam, the Scenario $n analysis with the option that both Perl 6 and Perl 5 grow rather improbable. | ||
PerlJam | Zoffix: yeah, I can agree with that one too | 18:30 | |
though ... C and C++ still happily co-exist after all these years :) | 18:33 | ||
El_Che | which is the C everyone love to love and the C++ everyones loves to hate? | 18:34 | |
El_Che ducks | |||
zwu | How can I declare a simple List variable instead of Array? Thanks! | 18:35 | |
my @v = 1,2,3 is to create array by default. | |||
Skarsnik | El_Che, so true | ||
PerlJam | zwu: my $list = (); | ||
Juerd | m: my List $foo = 1, 2, 3; say $foo; say $foo.WHAT; | ||
camelia | rakudo-moar 2fac93: OUTPUT«WARNINGS for /tmp/_5FhZrIue5:Useless use of constant integer 2 in sink context (lines 1, 1)Useless use of constant integer 3 in sink context (lines 1, 1)Type check failed in assignment to $foo; expected List but got Int in block <unit> at /tmp…» | ||
lucasb | zwu: my @a := (1,2,3) | ||
Juerd | m: my List $foo = (1, 2, 3); say $foo; say $foo.WHAT; | ||
camelia | rakudo-moar 2fac93: OUTPUT«(1 2 3)(List)» | 18:36 | |
lizmat | m: my List $foo = (1,2,3); dd $foo #zwu | ||
camelia | rakudo-moar 2fac93: OUTPUT«List $foo = $(1, 2, 3)» | ||
zwu | I know this scalar form my $list = 1,2,3; | 18:37 | |
El_Che | What I think is true is that devs putting down any of 5 or 6, will harm both languages | ||
zwu | didn't my @a := (1,2,3) is to create the binding only, since List is immutable, binding is fine. | ||
El_Che | Sharing more than almost the complete name, the association is big | ||
Juerd | zwu: *Why* do you want a List instead of an Array? | ||
El_Che | (and that is not a bad thing) | ||
18:38
ab6tract left
|
|||
zwu | just try to understand the way of not being default, as the doc said the default of my @a is to declare the Array, I thought my can use coerce type like my List of Int @a to create immutable List. | 18:39 | |
18:40
peter__ left
|
|||
Skarsnik | m: my List of Int $a = 1..4; | 18:40 | |
camelia | rakudo-moar 2fac93: OUTPUT«5===SORRY!5=== Error while compiling /tmp/hbxDSAzydzList cannot be parameterizedat /tmp/hbxDSAzydz:1------> 3my List of Int7⏏5 $a = 1..4;» | ||
18:40
FloydATC left
18:41
yqt left
|
|||
Skarsnik | you can't type your list at all them x) | 18:41 | |
zwu | Sakrsnik, m: my List of Int $a = 1..4; the output is List cannot be parameterized | ||
PerlJam | zwu: generally, if you want to make specific types like that, you'll want to use a scalar $thingy. Using @ and % have other implications about your type | 18:42 | |
18:44
jack_rabbit left
|
|||
zwu | PerlJam, so for a list, I can not use the @ sigil to the variable? | 18:44 | |
PerlJam | zwu: if you bind it, sure. | ||
zwu | you are right, bind works. | 18:45 | |
18:45
espadrine left
|
|||
Zoffix | Hm. Any idea how to have a filehandle that receives both $*OUT and $*ERR? | 18:45 | |
PerlJam | "receives"? | ||
Zoffix | IO::Handle that is | 18:46 | |
MadcapJake | when you run --gen-moar and --gen-nqp, where are those files placed inside the rakudo directory? | ||
gfldex | docs.perl6.org is stalled again: Generated on 2016-01-06T01:01:32.633373Z | ||
can i see the build logs somewhere? | |||
18:47
masukomi joined
|
|||
Zoffix | PerlJam, yeah, basically I have this code that captures $*OUT and $*ERR into separate variables. I want to have a third variable with both of those: gist.github.com/zoffixznet/468cde2b29e869b8c687 | 18:47 | |
[Coke] | gfldex: do have sudo on hack? (I do, checking now...) | ||
gfldex | [Coke]: i do not | 18:48 | |
Zoffix | gfldex, doc.perl6.org/build-log/ | ||
18:48
xxpor_lap left
|
|||
[Coke] | btw, checking the logs doesn't help because there's a bug in the log script that wipes the log if there's overlap. | 18:48 | |
Zoffix: that only tells you about builds that worked. :) | |||
Zoffix | ah :) | 18:49 | |
[Coke] | (or that failed in the past) | ||
Juerd | It seems /^A/ had much more brokenness than /^C/ on RC. | ||
Zoffix | "Method 'lc' not found for invocant of class 'Any' in block at ./htmlify.p6 line 432" | ||
masukomi | .ask brrt is it currently possible to create a stand-alone executable for *nix system ? | ||
yoleaux | masukomi: I'll pass your message to brrt. | ||
[Coke] | Zoffix: what did you invoke with? | ||
Zoffix | Oh god, did I break it | ||
[Coke], that's from doc.perl6.org/build-log/build-2016-...0+0000.log | |||
Is this the right way to create an index thing? github.com/perl6/doc/commit/d93052...9884d6cdfe | 18:50 | ||
Juerd | "This type cannot unbox to a native integer" is LTA. *Which* type? | ||
Zoffix | Maybe that's what breaks the build script | 18:51 | |
18:51
vendethiel joined
|
|||
[Coke] | no, the last run says there's nothing to do. | 18:51 | |
Juerd | rosettacode.org/wiki/Colour_pinstri...lay#Perl_6 | ||
Zoffix | hm | ||
[Coke] | ... and the last commit is a merge commit... last time we had issues, it was when I cherry picked an old commit. | ||
I think it's depending on not just sha1, but also timestamps at some point. | |||
dalek | c: d55cfb7 | coke++ | doc/Language/modules.pod: remove trailing whitespace |
18:52 | |
[Coke] | let's see if that kickstarts it. | ||
Skarsnik | Juerd, use Color;? x) | 18:53 | |
18:54
iml_ left
|
|||
Juerd | Skarsnik: ? | 18:54 | |
Zoffix | ? | ||
dalek | c: 331e65d | (Wenzel P. P. Peppmeyer)++ | doc/Type/Hash.pod: fix headings in Hash |
||
c: 53e217f | (Wenzel P. P. Peppmeyer)++ | doc/Type/Hash.pod: Merge pull request #326 from gfldex/master fix headings in Hash |
|||
18:54
yurivish joined
|
|||
Juerd | @rosettacode.grep(/^C/)[^30] done. Quitting for today. | 18:55 | |
Zoffix | Juerd++ | ||
lizmat | Juerd++ | ||
[Coke] | a doc build is going... | ||
... and it's immediately hit with another pull request. arglebargle. | |||
Juerd | Now to do some work for a client. In Perl 5. Head's going to hurt from switching. | ||
[Coke] | so this may die in five minutes again when the cronjob hits. | ||
dalek | kudo/nom: d979b5c | lizmat++ | src/core/Rakudo/Internals.pm: Appears returning Empty is handier for run() |
18:57 | |
kudo/nom: 07a021b | lizmat++ | src/core/CompUnit/PrecompilationRepository.pm: Lazily initialize $lle once per process |
|||
kudo/nom: c4fc775 | lizmat++ | src/core/Rakudo/Internals.pm: Introduce Rakudo::Internals.PRECOMP-EXT/TARGET So we don't have to create an expensive $*VM object just to find out something that is basically static for a build of the system. |
|||
kudo/nom: a84d4ed | lizmat++ | src/core/CompUnit/ (3 files): Use Rakudo::Internals.PRECOMP-EXT/TARGET |
|||
Juerd | "taking the best from languages like Ruby, Go, Perl 6 and JavaScript" github.com/trizen/sidef/wiki | 18:58 | |
lizmat | good to see Perl 6 being an inspiration :-) | ||
Zoffix | \o/ | 18:59 | |
Juerd | It actually does look like a mix of those languages | ||
[Coke] | yup, looks like it died again. | ||
mspo | oftl: I don't think you generated a file named /.html | 19:00 | |
Zoffix: ^ | |||
Hotkeys | er | ||
where does panda get put with rakudobrew | |||
I need to stick it on my path | |||
mst | Hotkeys: uhh | ||
Hotkeys | because it isn't there apparently | ||
19:00
lnrdo_ joined
|
|||
mst | Hotkeys: you added rakudobrew's bin dir to your PATH right? | 19:00 | |
mspo | Zoffix: and .?.html is definitely problematic since '?' is the end of the url :) | ||
Hotkeys | yeah | ||
mst | Hotkeys: if you run 'rakduobrew build-panda' | 19:01 | |
Zoffix | Hotkeys, panda is /home/zoffix/.rakudobrew/bin/panda | ||
Hotkeys | oh | ||
mst | Hotkeys: panda will turn up in the bin/ dir | ||
Hotkeys | I did without the space | ||
zwu | m: my $a='a'; my $b='b', $c='c'; # create list or array, my $list = ($a, $b, $c), $list[0] = 0; say $a; my @arr = $a, $b, $c; @arr[0] = 1; say $a; the $list[0] seems share the content with $a, , the $arr seems it copied the content from $a, managing it's own content. | ||
camelia | rakudo-moar 2fac93: OUTPUT«5===SORRY!5=== Error while compiling /tmp/KPPeNlaj2xVariable '$c' is not declaredat /tmp/KPPeNlaj2x:1------> 3my $a='a'; my $b='b', 7⏏5$c='c'; # create list or array, my $lis» | ||
Hotkeys | er | ||
with the spae | |||
insteadof hyphen | |||
oh oops my rakudobrew was out of date | 19:02 | ||
Zoffix | mspo, right, the generation script needs to do-something-smarter(); | 19:03 | |
mspo, I'd even say: we need to have a dynamic app instead of some build thing :) | |||
19:03
nige1 left
|
|||
Hotkeys | should i panda install Readline or Linenoise? | 19:04 | |
is one better than the other? | |||
p6 repl is telling me I should get one of them | |||
19:04
lnrdo left
19:05
lnrdo_ left
|
|||
dalek | c: 838a43d | coke++ | doc/Language/control.pod: remove trailing whitespace |
19:05 | |
[Coke] tries again. | |||
19:06
masukomi left
|
|||
zwu | updated to show the list and array difference (looks like list is sharing the data, and array is copying the data) in this code m: my $a = 'a'; my $b='b'; my $list = ($a, $b); $list[0] = 'list'; say $a; my $arr = $a, $b; $arr[0] = 'array'; say $a; | 19:06 | |
hoelzro | Hotkeys: Readline supports more standard keybindings, but Linenoise has tab completion | 19:07 | |
Readline also *may* be broken | |||
but I DrForr++ fixed it | |||
19:08
mohae joined
|
|||
RabidGravy | I thought readline did tab completion too, or just not implemented | 19:08 | |
hoelzro | RabidGravy: just NYI | ||
because we need to figure out how to get a Perl 6 module to be able to assign a Perl 6 code object to a C function pointer via NC | 19:09 | ||
zwu | do we have a doc about passing value or reference (container?) in list or array creation? | ||
gfldex | zwu: the best we have is doc.perl6.org/language/containers | 19:10 | |
Zoffix | Solved my "have a thing contain both $*OUT and $*ERR" with this: gist.github.com/zoffixznet/8f9675bc3fb3cf8ef0c7 | ||
zwu | gfldex: thanks! | 19:11 | |
RabidGravy | we so need to get an arrays and list page going, unless someone else jumps in I'll start something tomorrow when I've finished this module | ||
gfldex | is there something like Metamodel::ClassHOW for subs? | 19:13 | |
RabidGravy | well, the thing itself is an object | ||
m: sub foo() {}; say &foo.WHAT | 19:14 | ||
camelia | rakudo-moar a84d4e: OUTPUT«(Sub)» | ||
RabidGravy | m: sub foo() {}; say &foo.HOW | ||
camelia | rakudo-moar a84d4e: OUTPUT«Perl6::Metamodel::ClassHOW.new» | ||
gfldex | i would like to declare a new declarator (and tie it to a trait) | ||
19:14
uvtc joined
|
|||
dalek | kudo/nom: 25481dd | lizmat++ | src/core/CompUnit/ (3 files): Some micro-opts |
19:14 | |
RabidGravy | explain "new declarator" ? :) | ||
gfldex | see github.com/jnthn/oo-monitors/blob/...ors.pm#L90 | 19:15 | |
PerlJam | RabidGravy: instead of "sub foo", he wants "something-else foo" | ||
RabidGravy | ah no, it's only sufficiently class like things that you can do that with | 19:16 | |
skids | RabidGravy: I'll help doc lists/array, if I start something before you do I'll yoleaux you | ||
RabidGravy | skids++ | ||
flussence | Bailador cheats by making foo a normal string, and something-else a sub defined elsewhere | ||
19:17
masukomi joined
19:19
P6Test joined
|
|||
gfldex | please don't say "macro is the answer". I'm happy to see my head not spinning wildly atm. | 19:19 | |
PerlJam | gfldex: macro will be *an* answer at some point in the future ;) | 19:20 | |
tadzik | mst: eyy, thanks! | 19:21 | |
19:22
ChoHag joined
|
|||
skids | gfldex: I believe the corresponding code in oo-Actors mixes a role into the resulting actor, which -- is what traits do? | 19:22 | |
ChoHag | Can I mock a subclass with Test::Class? | ||
Also З Різдвом. | |||
... with Test::Mock? | |||
19:23
masukomi left
|
|||
Zoffix wishes this was configurable: github.com/rakudo/rakudo/blob/nom/...t.pm6#L520 | 19:24 | ||
ChoHag | Wow. proclaim is a deceptively large function. | 19:25 | |
RabidGravy | gfldex, I think the src/Perl6/Metamodel/EXPORTHOW.nqp gives all the things that can be superceded with EXPORTHOW::SUPERCEDE, the things with -attr can also be thinged with foo-attr in DECLARE | ||
lizmat | Zoffix: how ? | 19:26 | |
ChoHag | Having briefly scanned Test.pm6 I assumed it was a glorified 'say'. | ||
Zoffix | lizmat, dynamic vars? | ||
lizmat | well, possibly, but what do you want to configure? | 19:27 | |
Zoffix | lizmat, basically, I have a Test module that uses Test.pm6, but I want the file/line reference the file/line of where the user of my module is using the test. Right now I'm getting: gist.github.com/zoffixznet/7b5b40899b9f1edda5b7 | ||
ChoHag | m: my $foo = class Foo { }; class Bar is Foo { } | ||
camelia | ( no output ) | ||
lizmat | ah yes, if you have a patch, I'll gladly accept it (probably :-) | ||
Zoffix | It references /home/zoffix/Desktop/CPANPRC/perl6-Test-Output/lib/Test/Output.pm6:31, but the actual test is on /home/zoffix/Desktop/CPANPRC/perl6-Test-Output/t/01-stdout.t:28 | ||
ChoHag | m: my $foo = class Foo { }; class Bar is $foo { } | 19:28 | |
camelia | rakudo-moar a84d4e: OUTPUT«5===SORRY!5=== Error while compiling /tmp/hH_Pv0_SttInvalid nameat /tmp/hH_Pv0_Stt:1------> 3my $foo = class Foo { }; class Bar is7⏏5 $foo { }» | ||
ChoHag | That one. Why does that one not work. Is is a compile-time only directive? How do I make it otherwise? | ||
19:28
domidumont left
|
|||
dalek | kudo/nom: ed6ec7a | lizmat++ | src/core/CompUnit/RepositoryRegistry.pm: Remove something that doesn't work anymore |
19:29 | |
RabidGravy | m: constant Batty = class Foo { }; class Bar is Batty { } | ||
camelia | ( no output ) | ||
19:29
Gruber joined
|
|||
El_Che | Today, the fosdem mails to the speakers are going out. People here planning on attending | 19:30 | |
perl5 and perl6 allaround :) | |||
19:30
[particle]1 joined
|
|||
ChoHag | That's fine, but $foo is not Foo but mocked(Foo), using Test::Mock. | 19:31 | |
tadzik | I'm surprised to see the "Perl 6 is killing Perl 5" still going strong :| | ||
19:31
mattp__ joined,
advwp left
|
|||
lizmat | tadzik: did you actually read xdg's blog post ? | 19:32 | |
19:32
spider-mario joined,
mephinet- joined
|
|||
ChoHag | tadzik: Well perl 5 should try adapting to modern development methodologies. | 19:32 | |
Oh it did, and they called it perl 6... | |||
lizmat | tadzik: I think the post is rather more refined than that | ||
El_Che | tadzik: why? I haven't that many negative posts | ||
tadzik | lizmat: no, I only saw the twitter | ||
El_Che | haven't seen | ||
lucasb | ChoHag: I think declarative you can't create a class like that, but maybe programmatically (using the MOP) you can. (someone correct me if I'm wrong) | ||
tadzik | twitter.com/OvidPerl/status/685009540979412992 this convo | 19:33 | |
RabidGravy | yes you can | ||
lizmat | www.dagolden.com/index.php/2589/per...l-enemies/ # tadzik: then I suggest you actually read it :-) | ||
tadzik | thanks, will do :) | ||
ChoHag | Bollocks. | ||
tadzik | I didn't know there is one :) | ||
ChoHag | Perl 5 and perl 6 are mortal enemies in the same way the Welsh and the Scottish are mortal enemies. | ||
ie. They are until the English show up. | |||
mspo | Zoffix: even getting all of those characters seen is going to be tough | ||
19:33
siriu5b_ joined,
siriu5b_ left,
siriu5b_ joined,
gregf joined
|
|||
lucasb | RabidGravy: do you mean something like 'class C is generate-some-class() {}' ? | 19:33 | |
19:33
chewie_2082 joined
|
|||
ChoHag | But please ignore me. I'm enjoying my second round of Christmas Spirits, and they're a lot of fun. | 19:35 | |
19:35
abraxxa joined,
mort96_ joined
|
|||
mspo | Zoffix: I have a solution for .*, though ;) | 19:35 | |
tadzik | lizmat: alright, I see more now. His twitter tweets made it seem like he's negative about the whole thing | ||
perigrin | ChoHag: I'm going to assume that Perl5 are the scottish in this analogy because they're enemies with _everyone_ until the English show up. | ||
lizmat | tadzik: worried would be a better description, I think | ||
ChoHag | Sounds about right. | ||
mst | and then the english paid the scots to fight the other scots | 19:36 | |
El_Che | tadzik: his twitter remarks are indeed very different than his post | ||
ChoHag | Let's not talk about what happens when the French get involved. | ||
mspo | Zoffix: .. is weird because I can't tell if the browser is changing the paths or what | ||
El_Che | tadzik: probably his post was after he calmed down | ||
19:36
ilbelkyr_ joined
|
|||
tadzik | possibly | 19:36 | |
ChoHag | lucasb: Using the MOP is too much for now. | ||
mspo | Zoffix: www.gothamunion.com/foo/.* | ||
flussence | mspo: I think .. gets special treatment on *both* sides... | 19:37 | |
19:37
Cabanoss- joined,
hacst_ joined
|
|||
mspo | flussence: yeah it's nasty | 19:37 | |
ChoHag | So curse you. I finally got my child to give me some coding space and then you go and tell me what I want to do can't be done (in my current mental state). | ||
El_Che will try to by a police baton before FOSDEM. If perl 5 and 6 devs don't get along, they get the stick | |||
perigrin | ChoHag: one of my favorite days in Scotland was walking to the office when the 6 Nations final was playing in town. The English vs the French. If the English won then Scotland had enough points to take the cup. If the French won then ... well the English lost and that was reason enough to celebrate. | 19:38 | |
19:38
vike1 joined
|
|||
perigrin | They turned up in _droves_ | 19:38 | |
19:38
roguelazer_ joined
19:39
lostinfog left,
mattp_ left,
ugexe left,
Zoffix left,
gregf_ left,
Cabanossi left,
ilbelkyr left,
mephinet left,
[particle] left,
siriu5b left,
vike left,
hacst left,
leat left,
Mouq left,
petercommand left,
mort96 left,
Grrrr left,
AW3i left,
roguelazer left,
raydiak left,
chewie_1982 left,
Cabanoss- is now known as Cabanossi,
hacst_ is now known as hacst
|
|||
flussence | mspo: yep, just tested it on one of my own servers via curl. It interprets it specially up to $document_root. | 19:39 | |
19:39
mort96_ is now known as mort96,
roguelazer_ is now known as roguelazer,
Quom__ joined
|
|||
ChoHag | I can't think of a more Scottish occasion that that. | 19:39 | |
RabidGravy | lucasb, at this point I would probably go in with " my $class = Metamodel::ClassHOW.new_type(name => $class_name); $class.^add_parent($other-class); $class.^compose;" | ||
TimToady | well, land area is much more of a zero-sum game than computer languages, unless you live in Hawaii | ||
ChoHag | TimToady++ | ||
19:39
Zoffix joined
|
|||
ChoHag | I don't get why people get so wound up about this stuff. | 19:39 | |
RabidGravy | or the Isle of Wight | 19:40 | |
ChoHag | I think PHP is just about the worst language since INTERCAL, but my derision is not making it go anywhere. | ||
perigrin | ChoHag: the question isn't about quality of the language | ||
19:40
ugexe joined
|
|||
vendethiel | ChoHag: then you havn't seen many languages ;-) | 19:40 | |
ChoHag | Even Ruby and Python have finally irreversibly forced themselves onto my servers. | ||
abraxxa | Skarsnik: i've rewritten 99-common.pl6 as Test::DBDish and it works fine | ||
19:41
petercommand joined
|
|||
ChoHag | And they're both just perl-lite. | 19:41 | |
Skarsnik | Wow nice | ||
abraxxa | pushing in a moment | ||
mspo | Zoffix: gist.github.com/msporleder/1bf264c3e5e8e3939586 | ||
19:41
lostinfog joined,
M-matthew left
|
|||
abraxxa | was quite easy | 19:41 | |
ChoHag | Where lite means things I'm not allowed to say. | ||
19:41
raydiak joined
|
|||
TimToady | thank you for keeping this a relatively PG-rated channel :) | 19:42 | |
[Coke] | ok, the crontab for generating docs is: | ||
*/5 * * * * flock -n ~/update.lock -c ./doc/util/update-and-sync > update.log 2>&1 | |||
19:43
AW3i joined
|
|||
Zoffix | mspo, that still doesn't solve the fact that / is an invalid filename character on *nix and thus our / and // operators do not have a generated page. | 19:43 | |
The issue is in what makes those pages, not in how Apache is displaying them | |||
Skarsnik | should it be the url encoded name? | ||
for stuff like that? | |||
Zoffix | That's what I proposed an hour or so ago. | ||
I don't know if that catches all the "bad" characters tho | |||
ChoHag | It should be saved as %2f | 19:44 | |
%-escaping, whatever RFC it's described in, was basically created to export unix filesystsems over HTTP. | |||
lucasb | every time I try to click on a build.log file the doc site, my browser asks me if I want to download. can someone configure some plain text header for that? or maybe change the extension to .txt ? | ||
Zoffix | nope, it doesn't | ||
. is not encoded, so we'd still have issue with ".." | 19:45 | ||
mspo | Zoffix: well it's both since apache won't serve .. without .html | ||
flussence | Zoffix: maybe the pages should be named "&infix:<..>" | ||
ChoHag | In terms of *creating* urls, there are two characters which need to be escaped - / and \000. | 19:46 | |
Everything else is a valid filename. | |||
perigrin | & isn't valid in a URL. | ||
mspo | a ? is difficult too | ||
perigrin | or rather they're both interpreted specially | ||
also # | |||
:) | |||
mspo | # indeed | ||
lucasb | also "%" itself :D | 19:47 | |
ChoHag | The point is, there needs to be a url-to-filename conversion. | ||
mspo | is % an issue? | ||
flussence | I thought & was only special after the ?, and even then only when the server-side code parses it that way | ||
ChoHag | What happens when there's two files called %26 and & is the next problem. | ||
Zoffix | lucasb, done | ||
19:48
advwp joined
|
|||
lucasb | Zoffix: what did you do? :) | 19:48 | |
ChoHag | flussence: Technically, I think that's the case. | ||
lucasb | *exactly | ||
Zoffix | lucasb, RE: <lucasb> every time I try to click on a build.log file the doc site, | ||
mspo | www.gothamunion.com/foo/& | ||
ChoHag | In the second part of a url, ie. after the proto://server/, only the ? is special. After the ?, all bets are off. | ||
[Coke] | the goal for those file names should be to have a web app, not a generated site, IMO. | 19:49 | |
ChoHag | That's the rule of thumb I live by, anyway. | ||
mspo | ChoHag: # is also special | ||
19:49
muraiki joined
|
|||
ChoHag | mspo: In the path-part of a URL? | 19:49 | |
lucasb | firefox still asks me if I want to download those .log files, but now apache listing shows a text icon for then. maybe it's that Content-disposition header, idk | ||
mspo | ChoHag: it ends the path part, just like ? | ||
ChoHag | Well typical. | ||
19:50
M-matthew1 joined
|
|||
mspo | ChoHag: that's why so many javascript-powered sites are foo.com/#s=hithere | 19:50 | |
ChoHag | Oh yes it does. Anchors. | ||
mspo | like this one: www.google.com/#q=hithere | ||
Zoffix | lucasb, which file are you viewing exactly? | ||
perigrin | ChoHag: www.rfc-editor.org/rfc/rfc1738.txt is probably useful :) | ||
lucasb | Zoffix: for example: doc.perl6.org/build-log/build-2016-...0+0000.log | ||
flussence | lucasb: might be a stale browser cache? | ||
it's sending that as text/plain for me... | 19:51 | ||
lucasb | flussence: nope, tried ctrl-R and ctrl-f5 to refresh and still happens :) | ||
ChoHag | Anyway, the doc generator _must_ generate %XX files, to accomodate /, so because / isn't the only filename unix can't handle there needs to be both a means of determining which pages to generate with html-encoding and which not, and a means of determining what to do when both escaped and non-escaped files are present. | ||
perigrin | mspo: that's because everything after the # isn't sent to the server (in most browsers) so the server can send a single (massive) application to handle all the routing locally. | 19:52 | |
Zoffix | lucasb, this is all the headers that get sent. It should display it in-browser: gist.github.com/zoffixznet/c08368a67246fad659cb . You may have told your browser to always download .log files (Preferences->Applications) | ||
perigrin | but tht can be cached locally too | ||
mspo | I think the pages themselves need to url-encode links when they are rendered/generated | ||
perigrin: yes | |||
RabidGravy wonders why someone has sent me a PR for JSON::Infer to s/JSON::Fast/JSON::Tiny/ without any further explanation | |||
lucasb | Zoffix, flussence: ok, I'll take a look at my browsers setting. It was just a minor thing anyway, I can save to disk and read after this. Thanks, Zoffix++! | 19:53 | |
19:54
yurivish left
|
|||
ChoHag | perigrin: I know that doc. I just ... it's Christmas. | 19:54 | |
[Coke] | Zoffix++ (line 432, should have listened to you. :) | ||
ChoHag | I'm on bottle no. 3. | ||
perigrin | It's nearly three kings day | ||
Zoffix | heh | ||
19:55
hankache joined
|
|||
ChoHag | З Різдвом Український! | 19:55 | |
[Coke] | ah, I think Zoffix might'a borked the build. | 19:56 | |
hankache | hello * | ||
[Coke] | (inadvertently) | 19:57 | |
ChoHag | If the question is still relevant/interesting, I suggest encoding a list of chars (starting with </ ? & #>) on the filesystem and the incoming URL, and simply 404ing on any other combination. | ||
Zoffix | :( | ||
[Coke], when? | |||
[Coke] | with d9305216e0dd3c1b8bf6a5961946eb9884d6cdfe | ||
gfldex | hankache: i wonder if the intro should talk about hash adverbs | ||
[Coke] | testing a fix... | ||
ChoHag | If someone tries requesting %3x (<) or forcing a # into the GET line, sod 'em. | ||
19:58
pmqs joined
|
|||
Zoffix | Yeah, that was my original hunch | 19:58 | |
19:58
eternaleye left
|
|||
ChoHag | Make the list of escaped/ing characters adjustable and we're golden. | 19:58 | |
hankache | gfldex hash adverbs? | ||
[Coke] | nope, still broken, doing a bisect.. | 19:59 | |
gfldex | m: my %h = a => 1; say so %h<a>:exists; # hankache | ||
camelia | rakudo-moar ed6ec7: OUTPUT«True» | ||
20:00
leat joined
|
|||
hankache | gfldex ah ok. | 20:00 | |
gfldex why not then | |||
20:00
yurivish joined
|
|||
[Coke] | (crontab, rebuilds, doc) I was basically searching for something based on what I expected to be failing originally. bad coke, no donut. | 20:02 | |
hankache | gfldex the problem is i don't know them. | ||
gfldex I know :D :U for scalars | |||
20:02
M-matthew1 left
|
|||
hankache | gfldex what adverbs can I use for hashes ? | 20:02 | |
lucasb | talking about happy faces... | 20:03 | |
m: Hash.push; Hash.append; say 'hi' | |||
camelia | rakudo-moar ed6ec7: OUTPUT«hi» | ||
gfldex | hankache: :k - key, :v - value, :p - pair, :exists - key exists | ||
lucasb | ^^ Hash could use some happy faces there | ||
ChoHag | Well that's my solitary hour of coding wasted. | 20:04 | |
Time for bed. | |||
Zoffix | \o | ||
lichtkind_ | o/ | ||
20:04
lichtkind_ is now known as lichkind
|
|||
hankache | gfldex thanks | 20:04 | |
gfldex i think we need to talk about all adverbs | 20:06 | ||
dalek | c: 7f0e077 | coke++ | doc/Language/modules.pod: Revert "Add index flag for EXPORT" This reverts commit d9305216e0dd3c1b8bf6a5961946eb9884d6cdfe. This breaks the build. |
||
[Coke] | ^^ Zoffix I tried to make it look like the others there by changing it to X<|EXPORT> but that failed differently. | ||
so I reverted it. doc site should be updated in about 90m. :| | |||
hankache | gfldex i am just wondering if we do it in a separate section called adverbs, or write about each adverb in its relevant section ? | 20:07 | |
20:07
M-eternaleye joined
|
|||
El_Che | there should certainly be an adverb chapter in the tutorials | 20:08 | |
hoelzro | agreed | ||
gfldex | hankache: it's an intro after all, i would go light on it | ||
hankache | gfldex indeed. | 20:10 | |
El_Che | I still find them sowhat strange :) | ||
are there other languages out there that use adverbs? | 20:11 | ||
hankache | gfldex if you have something in mind feel free to send a PR | ||
[Coke] | We should have some sort of status page for when cronjobs are failing unexpectedly. | 20:12 | |
lucasb | not exactly adverbs, but the idea can be somewhat simliar to keywords in Common Lisp/Clojure and Symbols in ruby | ||
RabidGravy | "X::IO::Mkdir exception produced no message", er that's special | 20:13 | |
TimToady | see S02:Adverbial_Pair_forms for a general pair syntax discussion, some of which is actually true | 20:14 | |
RabidGravy | ah, bad programmer no cookie | ||
20:14
yqt joined
|
|||
hankache | hiya TimToady | 20:15 | |
FROGGS | tadzik: when I bootstrap panda, shouldnt it install its deps too? | 20:16 | |
tadzik | FROGGS: it should | 20:17 | |
FROGGS | tadzik: does not work when I bootstrap panda in my star hackery | ||
and I wonder why | |||
tadzik | huh | 20:18 | |
20:18
M-matthew1 joined
|
|||
pmqs | Hey folks quick question. If $fh is an open filehandle should I be able to read a block at a time like this? for $fh.read(1024) -> $block { say $block.elems } | 20:18 | |
it seem to read a byte at a time | |||
20:19
M-eternaleye left
|
|||
FROGGS | pmqs: is $block a string or a buf? | 20:20 | |
TimToady | m: for $*IN.read(1024) -> $block { say $block.elems } | ||
camelia | rakudo-moar ed6ec7: OUTPUT«1111111111111111111111111111111111111111111111111111111111111111…» | ||
FROGGS | m: for $*IN.read(1024) -> $block { say $block; last } | ||
camelia | rakudo-moar ed6ec7: OUTPUT«67» | ||
diakopter | m: for $*IN.read(Inf) -> $block { say $block.elems } | ||
camelia | rakudo-moar ed6ec7: OUTPUT«This type cannot unbox to a native integer in block <unit> at /tmp/LIbR96dgyM line 1» | ||
nine | FROGGS: #perl6-toolchain in case you're interested | 20:21 | |
pmqs | froggs: didn't declare $block it at all, so whatever it default to I suppose | ||
diakopter | m: for $*IN.read(99**99) -> $block { say $block.elems } | ||
camelia | rakudo-moar ed6ec7: OUTPUT«Cannot unbox 657 bit wide bigint into native integer in block <unit> at /tmp/j3rBHDmWne line 1» | ||
diakopter | m: for $*IN.read(9**99) -> $block { say $block.elems } | ||
camelia | rakudo-moar ed6ec7: OUTPUT«Cannot unbox 314 bit wide bigint into native integer in block <unit> at /tmp/DInU0RZe9Q line 1» | ||
diakopter | m: for $*IN.read(9**9) -> $block { say $block.elems } | ||
camelia | rakudo-moar ed6ec7: OUTPUT«Out of range: attempted to read 387420489 bytes from filehandle in block <unit> at /tmp/K8OnoRXr_q line 1» | ||
diakopter | sigh | ||
20:21
M-eternaleye joined
|
|||
FROGGS | pmqs: dunno why it gets a byte at a time... | 20:22 | |
RabidGravy | I thought it was more | ||
m: while not $*IN.eof { say $*IN.read(1024) } | 20:23 | ||
camelia | rakudo-moar ed6ec7: OUTPUT«Buf[uint8]:0x<43 c3 a9 61 64 20 73 6c c3 a1 6e 20 61 67 20 73 6c c3 a9 69 62 68 74 65 20 6d 61 6f 72 67 61 20 43 68 6f 6e 74 61 65 20 44 68 c3 ba 6e 20 6e 61 20 6e 47 61 6c 6c 0a 41 67 75 73 20 64 68 c3 a1 20 63 68 c3 a9 61 64 20 73 6c c3 a1 6e 20 61 67 20…» | ||
TimToady | perhaps the handle needs to be set to 'binary' somehow | ||
20:23
cpage_ left
|
|||
TimToady | I think used to force a binary interpretation of a filehandle, but maybe that broke | 20:24 | |
20:24
darutoko left
|
|||
TimToady | *read used to | 20:24 | |
pmqs | also with a file containing "abcdefg", if I run this for $fh.read(1024) -> $block { say $block } | 20:25 | |
I get | |||
97 | |||
98 | |||
99 | |||
100 | |||
101 | |||
102 | |||
103 | |||
Zoffix | pmqs, how do you open that file? | 20:26 | |
pmqs, try adding :bin to it | |||
pmqs | already has :bin | ||
my $fh = open($filename, :r, :bin); | |||
[Tux] | lizmat, github.com/Tux/CSV/commit/54f4a965...469705b038 | ||
All tests successful. | |||
Files=27, Tests=22028, 36 wallclock secs ( 2.94 usr 0.15 sys + 87.87 cusr 1.76 csys = 92.72 CPU) | |||
RabidGravy | I just assumed read didn't work like that, you just read while you haven't got eof | 20:27 | |
Zoffix | pmqs, no idea. it's likely be a bug | ||
huggable, rakudobug | |||
huggable | Zoffix, [email@hidden.address] or use perl6 query on rt.perl.org ; see github.com/rakudo/rakudo/#reporting-bugs | ||
RabidGravy | it clearly doesn't just get 1 byte as evidenced above | ||
it's something that the foar is doing | 20:28 | ||
for | |||
Zoffix | Ah | ||
pmqs | I'll raise an issue to track it | ||
20:29
nige1 joined
|
|||
Zoffix | m: my $x = Blob.new: |^10; for $x -> $y { say $y } | 20:29 | |
RabidGravy | pmqs, in the meanwhile "while not $fh.eof { my $block = $fh.read(1024) }" definitely works as expected | ||
camelia | rakudo-moar ed6ec7: OUTPUT«Blob:0x<00 01 02 03 04 05 06 07 08 09>» | ||
pmqs | radidgravy: yes, eof is what I'm using as a workaround | 20:30 | |
TimToady | m: for ($*IN.read(1024),) -> $block { say $block.WHAT } | ||
camelia | rakudo-moar ed6ec7: OUTPUT«(Buf[uint8])» | ||
TimToady | it's calling .list on the buf | ||
RabidGravy | ha! | ||
pmqs | aaah | ||
[Tux] | csv-ip5xs 50000 17.818 17.704 | ||
test 50000 23.087 22.972 | |||
test-t 50000 12.462 12.348 | |||
csv-parser 50000 51.424 51.309 | |||
diakopter | boy that 50000 number is pretty constant! | 20:31 | |
Zoffix | :) | ||
[Tux] | 50000 is just an indication of correctness: the total number of fields parsed | ||
lizmat | [Tux]++ | 20:32 | |
[Tux] | 12.462 however is pretty neat | ||
TimToady | m: while $*IN.read(1024) -> $block { say $block.WHAT } | ||
camelia | rakudo-moar ed6ec7: OUTPUT«(Buf[uint8])(Buf[uint8])» | ||
TimToady | m: while $*IN.read(1024) -> $block { say $block.WHAT } | ||
camelia | rakudo-moar ed6ec7: OUTPUT«(Buf[uint8])(Buf[uint8])» | ||
20:32
M-eternaleye left
|
|||
TimToady | just use while instead of for | 20:33 | |
20:34
lucasb left,
luiz_lha left
|
|||
RabidGravy | TimToady++ :) | 20:35 | |
TimToady | let's see, how could we make that sentence more confusing...we already have 'use', 'while', 'of', and 'for' keywords, now we just need to make 'just' and 'instead' mean something | ||
20:35
luiz_lha joined
|
|||
RabidGravy | works for me | 20:35 | |
20:35
luiz_lha is now known as Guest82811
|
|||
Zoffix | m: sub foo ($name = &?ROUTINE){ say $name.^methods }; foo | 20:36 | |
camelia | rakudo-moar ed6ec7: OUTPUT«(<anon> <anon> <anon> <anon> <anon> <anon> arity count signature outer static_id file line of returns ACCEPTS Str new)» | ||
pmqs | while is better | ||
Zoffix | m: sub foo ($name = &?ROUTINE){ say $name.name }; foo | ||
camelia | rakudo-moar ed6ec7: OUTPUT«» | ||
Zoffix | How come name is callable even though it's not in that ^methods list? | ||
20:36
iml_ joined
|
|||
RabidGravy | role Weirder {}; my Int $a = 1 just Weirder; | 20:36 | |
Zoffix | And nother question: how can I get the name of my sub? | ||
FROGGS | Zoffix: &?ROUTINE.name | ||
TimToady | m: sub foo ($name = &?ROUTINE){ say $name.^methods(:all) }; foo | ||
camelia | rakudo-moar ed6ec7: OUTPUT«(<anon> <anon> <anon> <anon> <anon> <anon> arity count signature outer static_id file line of returns ACCEPTS Str new Method+{<anon|77435888>}.new Method+{<anon|77435888>}.new Method+{<anon|77435888>}.new iterator Method+{<anon|77435888>}.new Method+{<anon…» | ||
RabidGravy | that's a use for 'just' | 20:37 | |
Zoffix | m: sub foo ($name = &?ROUTINE){ say &?ROUTINE.name }; foo | ||
camelia | rakudo-moar ed6ec7: OUTPUT«foo» | ||
Zoffix | Ah, you just can't use it in a sig | ||
20:37
M-eternaleye joined
|
|||
Zoffix | (or rather, it has a different value) | 20:37 | |
TimToady | arguably a buglet | 20:38 | |
[Coke] | ah, travis already had perl6/doc figured out. :| | ||
Zoffix reports it | |||
20:38
leont joined
|
|||
RabidGravy | stick a trait_mod:sym<just> in the grammar and we're good | 20:39 | |
20:39
ribasushi left,
lostinfog left
|
|||
TimToady | make 'just' an alias to 'only', and 'instead' and alias to 'supersede' | 20:39 | |
Zoffix | Done: rt.perl.org/Ticket/Display.html?id=127203 | 20:41 | |
dalek | c: 68ae004 | coke++ | .travis.yml: Notify IRC channel when build breaks. |
||
20:42
TEttinger joined
|
|||
Zoffix | m: sub foo (|c) { bar 52, @|c}; sub bar (Str $z, Int $one, Str $two) {say "$z $one $two"}; foo (42, "43") | 20:44 | |
camelia | rakudo-moar ed6ec7: OUTPUT«Too few positionals passed; expected 3 arguments but got 2 in sub bar at /tmp/Gi9Zsr39ix line 1 in sub foo at /tmp/Gi9Zsr39ix line 1 in block <unit> at /tmp/Gi9Zsr39ix line 1» | ||
Zoffix | hm | ||
uvtc | Is it a primary goal moving forward to keep the Synopses up to date with Roast (future versions of the language (6.d, 6.e, etc.))? | 20:45 | |
diakopter doubts it. probably the Programming Perl monograph will continue that tradition, leaving Synopses to rot with the Apocalypses and Exegeses | 20:46 | ||
*Programming Perl 6 | |||
Zoffix | How do I use the |c thing? | ||
MadcapJake | anyone know where --gen-nqp and --gen-moar place the binaries? I'm in a unique OS (Solus Project) and make install only seems to install perl6 binaries (not moar/nqp ones) | 20:47 | |
diakopter | should've been in teh same place as prefix | 20:48 | |
uvtc | thanks, diakopter. | ||
alpha123 | MadcapJake: if it's not /usr/local/bin or equivalent then something weird happened | ||
20:48
M-matthew1 left,
yurivis__ joined
|
|||
Zoffix | m: sub foo (|c) { bar "42", |c}; sub bar (Str $z, Int $one, Str $two) {say "$z $one $two"}; foo (42, "43") | 20:48 | |
camelia | rakudo-moar ed6ec7: OUTPUT«Too few positionals passed; expected 3 arguments but got 2 in sub bar at /tmp/QIIQBzLemb line 1 in sub foo at /tmp/QIIQBzLemb line 1 in block <unit> at /tmp/QIIQBzLemb line 1» | ||
MadcapJake | alpha123, yeah something weird happened then :P | ||
Zoffix | Seems this should work based on what I see here, but it doesn't github.com/rakudo/rakudo/blob/nom/...ol.pm#L106 | 20:49 | |
20:49
M-Illandan left,
yurivish left
|
|||
MadcapJake | i think my best bet would be to *not* specify a prefix and just move them all by hand | 20:49 | |
20:50
travis-ci joined
|
|||
travis-ci | Doc build errored. Will "Coke" Coleda 'Notify IRC channel when build breaks.' | 20:50 | |
travis-ci.org/perl6/doc/builds/100913518 github.com/perl6/doc/compare/7f0e0...ae004e48b3 | |||
20:50
travis-ci left
|
|||
diakopter | giggle | 20:50 | |
uvtc | diakopter: re. a Programming Perl 6 book. Has there been any public movement on that? | 20:51 | |
20:51
M-eternaleye left
|
|||
diakopter kicks TimToady | 20:51 | ||
TimToady kicks back | |||
pmqs | created #127204 to the fh.read issue | ||
TimToady has a start on a book, when he's not kicking back | |||
its current state is an outline plus a number of chapter intros | 20:53 | ||
colomon | TimToady++ | ||
uvtc | TimToady: ooh! »ö« Thanks. | ||
diakopter | are you using quotes from the Fire and Ice series this time? or Hunger Games? or Harry Potter? | ||
TimToady | the only example so far is a program that prints out the 12 Days of Christmas lyrics | 20:54 | |
uvtc | I always thought HHGttG went well with Perl. (Maybe more Perl 5 than 6 though?) | ||
TimToady | what will 7-year-old girls be watching next year? | 20:55 | |
hankache | no idea | 20:56 | |
TimToady | that's about when we want to get them interested in programming | ||
hankache | kim kardashian? | ||
:( | |||
diakopter | instagram, twitter, vine, facebook video snippets. attention span = less than a second | ||
uvtc | Aside: my 13yo daughter doesn't program, but loves the Perl 6 logo. | ||
hankache | yeah camelia is a great logo | 20:57 | |
Util | m: my $foo = 3; if $foo = 4 { say 'overwrote!' }; say $foo; | ||
camelia | rakudo-moar ed6ec7: OUTPUT«overwrote!4» | ||
Util | In Perl 5, with warnings enabled, I would have been warned: | ||
TimToady | we have to get both boys and girls interested before it becomes all hormone related | ||
Util | Found = in conditional, should be == at ... | ||
Rakudo does not give this warning. Is this just NYI, or deliberate? | |||
flussence | m: say '🙋🗺' # we're already twitter-compliant :D | 20:58 | |
camelia | rakudo-moar ed6ec7: OUTPUT«🙋🗺» | ||
TimToady | deliberate | ||
diakopter | I would think it should warn if it's a constant being assigned, but not otherwise | ||
non-True constant | |||
20:58
ribasushi joined
|
|||
diakopter | *True constant | 20:59 | |
ribasushi: I saw you in Hamburg! | |||
TimToady | yes, we could warn if the RHS is constant | ||
Util | TimToady: The lack of warning surprised me. I am following up for a member of Atlanta.pm, who was bitten by this change during early Perl 6 experimenting. | ||
uvtc | I see that `some-method $x: 1` is the same as `$x.some-method(1)`. Is this "indirect method call syntax"? Not complaining, but what is the rationale for that? | 21:01 | |
Or, appears to be the same as. | |||
TimToady finds the spurious warning to be irritating on something like: while $this = getnextone() { ... } | |||
though there's less excuse for that construct in Perl 6 than in Perl 5 | |||
since we can write: while getnextone() -> $this { ... } | 21:02 | ||
Util | TimToady: but you have given us: while getnextone() -> $this { ... } | ||
(out-typed!) | |||
TimToady | otoh, what if you want the final $this after the loop? | ||
and the failure mode of 'always true' is usually pretty obvious | 21:03 | ||
21:03
colomon left
|
|||
muraiki | I thought I remembered there being some variable that's an implicit state variable in every sub call. does anyone know what this is? or maybe I'm hallucinating | 21:03 | |
TimToady | so I tend to approach this one from the side of "don't rule out valid code" | ||
Util | 'always false' looks obvious too | ||
FROGGS | muraiki: $ ? | 21:04 | |
21:04
iml_ left
|
|||
TimToady | but there's not a single "implicit state variable", you can have as many anonymous state variables as you like | 21:05 | |
muraiki | m: sub foo {$.say}; foo(); foo(); | ||
camelia | rakudo-moar ed6ec7: OUTPUT«5===SORRY!5=== Error while compiling /tmp/4Cl197cd1MVariable $.say used where no 'self' is availableat /tmp/4Cl197cd1M:1------> 3sub foo {$.say7⏏5}; foo(); foo(); expecting any of: term» | ||
muraiki | hmm | ||
Util | +1 on "don't rule out valid code". "warn if the RHS is constant" would catch many errors. | ||
TimToady | use ($).say for that | ||
but you'll get Any | |||
muraiki | thanks! | ||
Zoffix | Is there anything wrong with this line? I'm getting "Cannot convert string to number: base-10 number must begin with valid digits or '.' in '⏏is'" even though my small testcase works gist.github.com/zoffixznet/6a95646...pm6-L6-L65 | ||
m: use Test; my $sub = 'is'; &::($sub)(42, 43) | |||
camelia | rakudo-moar ed6ec7: OUTPUT«not ok 1 - # Failed test at /tmp/Y75547GXb0 line 1# expected: '43'# got: '42'» | ||
muraiki | m: sub foo {($++).say}; foo(); foo(); | 21:06 | |
camelia | rakudo-moar ed6ec7: OUTPUT«01» | ||
TimToady | Zoffix: shell quoting? | ||
uvtc | Ok. Found a little about it just under <design.perl6.org/S12.html#Methods>; "indirect object notation". Is it just for improved readability in some cases? | ||
21:06
M-Illandan joined,
bpetering joined
|
|||
Zoffix | TimToady, huh? | 21:06 | |
TimToady | well, I just saw the single quotes, so I wondered | 21:07 | |
Zoffix | No, it's a test file with this in it: output-is { say 42; note 'warning!'; say "After warning"; }, "42\nwarning!\nAfter warning\n"; | ||
mst | /msg tony-o please do make sure to join us in #perl6-toolchain | ||
Zoffix | That I run as perl6 t/01-stdout.t | ||
mst | gah | ||
there | |||
Zoffix | mst, lulzyan00b :P | ||
mst, also: xchat | |||
^_^ | |||
mst | Zoffix: eat an entire trout.me.uk/hopper.jpg | 21:08 | |
Zoffix | >_< | ||
21:08
jeek left
|
|||
[Coke] | nerdist.com/fisher-price-code-a-pil...o-program/ | 21:09 | |
21:10
atweiden joined
|
|||
Zoffix | Oooop | 21:11 | |
*ooooh | |||
21:11
kaare_ left
|
|||
Zoffix | m: 'foo' == 42 | 21:11 | |
camelia | rakudo-moar ed6ec7: OUTPUT«WARNINGS for /tmp/yY5LfBJctM:Useless use of "==" in expression "'foo' == 42" in sink context (line 1)Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5foo' (indicated by ⏏) in block <unit> at /tmp/y…» | ||
Zoffix | m: say so 'foo' == 42 | ||
camelia | rakudo-moar ed6ec7: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5foo' (indicated by ⏏) in block <unit> at /tmp/TMnTe4ubGR line 1Actually thrown at: in block <unit> at /tmp/TMnTe4ubGR line 1» | ||
skids | uvtc: Indirect object notation is mainly a readability thing, and if you don't have it you'll get constant questions like "why can I call say 1, 2 but not .map: { ... }" from users of a few other languages. | ||
Zoffix | ^ that's my error | ||
21:11
molaf left
|
|||
masak | "I can't think of a scenario where Perl 6 grows *and* Perl 5 grows." -- that, in my mind, sums up www.dagolden.com/index.php/2589/per...l-enemies/ quite well | 21:11 | |
dagolden is unable to imagine a thing, and he wrote a post about that | 21:12 | ||
Zoffix | masak, that's a good summary. | ||
bpetering | masak: my thoughts exactly, and I'm happy you're already on it | 21:13 | |
lichkind | rakudobrw no version set, what does that mean? | ||
bpetering | I have enough thoughts (and polemic) for a full-length rebuttal, but it may be more beneficial coming from someone with a higher profile | 21:14 | |
skids | to be fair I think he probably meant something more like no such scenario seems likely according to his ability to estimate. | 21:15 | |
Zoffix | But I can give a different summary: "Perl 5 is in trouble and I'm afraid Perl 6 will make it worse" | ||
bpetering | Zoffix: that sounds about right | 21:16 | |
uvtc | skids, thanks, sounds good, though I don't get your example. I'm also trying to understand what the [colon on the *inside*](github.com/perl6/roast/blob/master...ion.t#L44) means). | ||
PerlJam | you guys should all write your own post "rebutting" his thought experiment | ||
:) | |||
TimToady | I dunno, sometimes these things are just a distraction | 21:17 | |
Juerd | masak: I'm similarly unable to imagine the same thing but I no longer really care. | ||
FROGGS | uvtc: the colon is (as elsewhere) the invocant marker | ||
abraxxa | Skarsnik: can you give a quick guide what I need to do to run the PostgreSQL tests? | ||
masak | my likely scenario: many Perl 5 people will largely ignore Perl 6, or be slightly annoyed by it. a very small amount of people will try Perl 6 and write blogs saying "hey, Perl 6 is not teh sux". Perl 6 will putter ahead along some trajectory. so will Perl 5. | ||
TimToady | .oO(Someone is wrong about Perl 6 on the Internet!) |
||
Skarsnik | abraxxa, no idea, look at the travis.yml? | 21:18 | |
Zoffix | PerlJam, I don't have a rebuttal :) | ||
masak | there, I imagined a non-zero-sum game. wasn't hard. | ||
Juerd | I will probably forever remain convinced that it "would have been" better to rename Perl 6. But it's there now, and I love it regardless of its name :) | ||
dalek | kudo/nom: 023b6c3 | lizmat++ | src/core/CompUnit/RepositoryRegistry.pm: We no longer support config files So we don't need to check for it |
||
skids | uvtc: as far as the example, often you do something like $mylist .= grep: { big multiline block it would such to have to remember to put a parenthesis after } | ||
Zoffix | masak, that ignores the fact that P5 is in trouble :D | ||
bpetering | TimToady: fair, and I have an XKCD in my head :o) | ||
FROGGS | uvtc: so, a(b: c) compiles to b.a(c) | ||
TimToady | we'd've had many more fights before now if we'd named it something else, in my estimation | ||
21:19
P6Test left,
yurivis__ left
|
|||
Zoffix | TimToady, agreed. And confusion too... "It's FooBarBer... also, it used to be named Perl 6" | 21:19 | |
Juerd | Zoffix: Well, "they" could rewrite the entire language to fix those issues. Oh, wait. :P | ||
TimToady | and it wouldn't change the fact that I'm basically leading people away from Perl 5 | ||
(gently) | |||
21:19
domidumont joined
|
|||
masak | Zoffix: there's a difference between "Perl 5 will not evolve significantly" (probably true) and "Perl 5 will stop being useful to many people" (likely false) | 21:19 | |
PerlJam | Zoffix: neither do I. I don't think there's anything to rebut really. (You can't really debug other people's brains) | ||
Juerd | TimToady: It doesn't matter anymore, anyway :) | ||
abraxxa | Skarsnik: LOL. just reading README.Debian.gz and the first line goes: PostgreSQL is the successor to Postgres95, which in turn succeeded POSTGRES. | ||
and I think: WTF 9.4 is the successor of 9.5 which was just released? | 21:20 | ||
TimToady | besides Perl already has an entry in the OED, and I didn't want to waste it :) | ||
uvtc | skids: Ah, interesting (re the `.=` usage). Thanks. | ||
Juerd | masak: I heard too many hackers talk about efforts to remove Perl [5] from standard Linux distributions, after the anti-Perl talk at 32C3 | ||
Skarsnik | POSTGRES is an old thing probably x) | ||
Juerd | masak: If this happens, Perl 5 is dead. | ||
Zoffix | masak, there's a difference between "being useful" and "requiring a screenful of `use` statements to be useful" | ||
bpetering | TimToady: that's the best argument I've heard :) | ||
dalek | kudo/nom: f1dd491 | lizmat++ | src/core/CompUnit/RepositoryRegistry.pm: Fix one %*ENV straggler |
21:21 | |
masak | Juerd: "anti-Perl talk at 32C3"? this is news to me. | ||
Juerd | TimToady: Haha. Nice one :) | ||
uvtc | FROGGS: Ah, ok. Thanks! Will have to try some examples to find the cases where it reads better that way. | ||
bpetering | anyway, I probably won't write about this, I'd rather get the ecosystem X% closer to people getting paid for Perl 6 work | ||
Juerd | masak: Titled "Perl Jam 2", after the 2014 talk "Perl Jam". Both are a bunch of FUD with very little substance, but to an audience that increasingly doesn't know Perl, it all sounds very scary. | ||
masak | Zoffix: "screenful of `use` statements" is an argument against Perl 5, yes. but a weak and largely self-defeating one. those `use` statements are largely of modules from CPAN, honed to perfection to solve people's problems and keep Perl 5 relevant. | 21:22 | |
Skarsnik | bpetering, I kind of break your PR in GPTrixie x) | ||
bpetering | Juerd: that CCC talk was a whole bunch of bullshit | ||
21:22
iml_ joined
|
|||
TimToady | Now is not the time to let the bastards start wearing us down. :) | 21:22 | |
masak | who's being worn down? :) | ||
I'm just worning up! :D | 21:23 | ||
bpetering | TimToady: yes. enough politicking, more hacking! | ||
masak .oO( this is your final worning ) | |||
Juerd | This time the speaker actually did find a dangerous thing in the language itself, namely the whole ARGV thing with 2-arg open. There's a workaround in recent Perls but that doesn't fix the language because the insecure stuff is still there, still enabled by default, easier to type, in numerous documents, and in numerous programs. But an entire talk, with "STOP USING PERL" as the main message (screenshots of that slide were retweeted probably more than ... | ||
21:23
geraud joined,
WAAQAFP joined
|
|||
Juerd | ... TimToady's Perl 6 announcement), about a single security issue, seems a bit much. | 21:23 | |
bpetering: There was this one non-bullshit thing, but that real problem didn't get the attention it deserved, because he kept ranting about actual bullshit. | 21:24 | ||
bpetering | Skarsnik: that's fine, I offer it in the spirit of "maybe you were going to write this eventually" | ||
Skarsnik | Yes It was planned x) | ||
Juerd | TimToady: If now is not the time, then when is? ;) | ||
skids | uvtc: the "meth obj: args" form is documented design.perl6.org/S03.html#Invocant_marker and it is basically sugar for the fp oriented AFAICT. | ||
Zoffix | masak, it's not a weak argument if (a) Language XYZ already provides that stuff without `use` statements; and most importantly (b) where there's a gazillion of modules to choose from and it's hard to make a correct choice. Especially when the author may turn out to be insane | ||
21:25
M-Illandan left
|
|||
Juerd | Zoffix: I like insane authors | 21:25 | |
skids | uvtc: seems to visually violate the non-exported barrier but oh well. | ||
masak | yes, it's a weak argument. I'd rather take Perl 5's dozen `use` statements over Java's feeble inexpressivity or C++'s crazy syntax and semantics. | ||
sivoais | strcat(3) still exists in C. Source of buffer overflows. Guess we should all stop using C. (All this assumes we don't have linters.) | 21:26 | |
21:26
thzre joined
|
|||
Zoffix | masak, but what about Perl 6? | 21:26 | |
masak | all languages have weaknesses. you can complain that you have to keep a boilerplate header of 12 `use` statements, but there's worse than that. | ||
Zoffix: I prefer to code in Perl 6, if that's what you're asking. | |||
I wouldn't argue against Perl 5 by complaining against all the things you can `use` in it ;) | 21:27 | ||
21:27
M-eternaleye joined
|
|||
masak | complaining about* | 21:27 | |
Zoffix | heh | ||
Juerd | masak: About this hypothetical boilerplate, I find that I usually have no more than about 5 or 6 use statements, excluding strict and warnings. | ||
masak | *nod* | 21:28 | |
Skarsnik | bpetering, on a bright side, it's 50 times faster on some part x) | ||
uvtc | skids: thanks for the link! | ||
masak | Juerd: clearly you're not tchrist, then :P | ||
Juerd | But then, I do write my own sub read_file { local (@ARGV, $/) = shift; <> } instead of use File::Slurp qw(read_file); | ||
Zoffix | which is broken | ||
Juerd | Which one is? | 21:29 | |
Zoffix | the module | ||
masak | Juerd: see this answer: stackoverflow.com/a/6163129 | ||
bpetering | Skarsnik: nice work :) it's already speeding up my nativecall stuff sooo much | ||
Juerd | Again? | ||
mst | masak: plus my Import::Into module makes it trivial to turn it into a single use statement | ||
Juerd | Glad I don't use it much then :) | ||
skids | uvtc: BTW it is out of date and could use a "port" over to docs/ but www.perlfoundation.org/perl6/index.cgi?witch can find such links for you pretty well. | ||
masak | mst: ooh, nice | ||
bpetering | sivoais: yeah, that seemed to be the speaker's argument | ||
mst | masak: Zoffix has written such things using it :) | ||
Zoffix | :) | 21:30 | |
Juerd | masak: Oh my, I thought *I* was picky about encodings. | ||
21:30
domidumont left
|
|||
Juerd | I don't use most of the unicode features though | 21:30 | |
leont | Juerd: I wrote File::Slurper because File::Slurp is pretty much unfixable | ||
uvtc | skids: nice | 21:31 | |
21:31
yurivish joined
21:32
cognominal left
|
|||
bpetering | Juerd: anyone I've read who knows anything about perl, at all, was quite unimpressed by that guy, legitimate security issues aside | 21:32 | |
leont | Juerd: blogs.perl.org/users/leon_timmerman...wrong.html | 21:33 | |
Juerd | leont: I started reading that blog post just before you mentioned it directly :) | ||
bpetering | Skarsnik: out of curiosity, why "gptrixie"? I can't relate that to any concepts around FFI or nativecall or binding :o) | 21:34 | |
Juerd | bpetering: Yes. But do consider that only a tiny minority of the audience actually knows anything about Perl. | ||
bpetering | Juerd: that's pretty unimpressive for CCC | ||
Zoffix | bpetering, couldn't think of a name, so name it after a pony in My Little Pony | ||
21:34
Tonik left
|
|||
Juerd | bpetering: There are actually thousands of people now who really believe that Perl should never be used. | 21:35 | |
Skarsnik | Well she is a magical unicorn and the program does magic stuff to have NC code! | ||
Zoffix | :D | ||
Juerd | bpetering: And at these conferences, they hugely outnumber the people who've ever used Perl. | ||
bpetering | Hahahaha.... that fits with camelia, I guess? | ||
abraxxa | Skarsnik: pg testing works now too | ||
bpetering | Juerd: I don't respect security types who aren't fluent in at least one language that was created before they were born | 21:36 | |
PerlJam | bpetering: english? ;) | 21:37 | |
bpetering | PerlJam: only if you're Kevin Mitnick :P | 21:38 | |
21:38
nige1 left
21:39
hankache left
|
|||
bpetering | This is getting... odd. Do I really have to go research my little pony now to verify this? | 21:39 | |
Skarsnik | Verify what? x) | 21:40 | |
21:40
M-eternaleye left
|
|||
FROGGS | ***ALL*** - just made an RC0 of rakudo star, as of today's codebase: froggs.de/perl6/rakudo-star-2016.01-RC0.tar.gz | 21:40 | |
Zoffix | LTA error | ||
m: sub foo ( $x where { any <foo bar> }, $y { where 42 } ) { }; | |||
camelia | rakudo-moar f1dd49: OUTPUT«5===SORRY!5===Expression needs parens to avoid gobbling blockat /tmp/zGERsntt2y:1------> 3sub foo ( $x where { any <foo bar> }7⏏5, $y { where 42 } ) { };Missing block (apparently claimed by expression)at /tmp/zGERsntt2y:1------>…» | ||
Zoffix | m: sub foo ( $x where { 42 }, $y { where 42 } ) { }; | ||
camelia | rakudo-moar f1dd49: OUTPUT«5===SORRY!5===Expression needs parens to avoid gobbling blockat /tmp/gSOsYvX4uK:1------> 3sub foo ( $x where { 42 }7⏏5, $y { where 42 } ) { };Missing block (apparently claimed by expression)at /tmp/gSOsYvX4uK:1------> 3sub foo …» | ||
21:41
DrParis_ is now known as DrParis
|
|||
bpetering closes eyes, thinks of England, Googles... | 21:41 | ||
Juerd | bpetering: The point that I was trying to get across, is that not what you and I think, or what the collective Perl community thinks, will determine Perl [5]'s fate. | ||
FROGGS | ***ALL*** - please test it and report bugs to the rakudo/star repository, but keep in mind it is an RC0, so dont update your production servers just now | ||
Juerd | bpetering: It's what most people think, that will eventually determine the outcome. | ||
Zoffix | Reported: rt.perl.org/Ticket/Display.html?id=127205 | 21:42 | |
Juerd | But I personally have already given up on thinking Perl 5 has a future. I'll continue to use it for all the reasons that I've always had for using it, none of which have to do with things like still having a job 10 years from now. | 21:43 | |
And when Perl 6 performs better and a great version of a nice compiler is distributed by Debian, I'll definitely use it for work stuff. | 21:44 | ||
Considering the impressive progress that it's made, I'm convinced that the great minds here will eventually make this happen :) | |||
leont | Juerd: I wish I was more optimistic than you are, but I'm not really :-/ | 21:45 | |
bpetering | Juerd: I'm pretty much in the same boat. Perl 5 is great, but there's a reason Perl 6 started in the first place | ||
Juerd | leont: Then still in the worst possible case, where Perl 6 doesn't gain momentum outside our current community, it will influence future languages. | 21:46 | |
bpetering | Juerd: I for one would be a very happy camper to get to use Perl 6 professionally | ||
[Coke] | FROGGS: thank you so much for putting that out there. | ||
21:47
woolfy joined
|
|||
Juerd | leont: It's a language that just can't be ignored. The compiler? Sure, you can ignore that and just never use Perl 6. But anyone who's serious about programming language design will have to look at Perl 6 and will definitely copy parts of its design. | 21:47 | |
FROGGS | [Coke]: and it feels weird how small the patches were | ||
bpetering | masak: regarding this stuff, I have some thoughts about a killer app for Perl 6 | ||
21:47
woolfy left
|
|||
leont | Agreed. Benefiting from the headstart is the challenge though. | 21:47 | |
21:49
uvtc left
|
|||
Zoffix | A killer app? What, does it have a gun? XD | 21:49 | |
bpetering | Zoffix: a hyper | ||
Juerd | All we need to do is make Perl 6 perform very well and rewrite Mediawiki. Everyone wants a replacement for it. :) | 21:50 | |
21:50
Guest82811 left,
AW3i left,
avenj left,
khw left,
vividsnow left,
brabo left,
solarbunny left,
pnu left,
nowan left
|
|||
bpetering | Juerd: that sounds like a decent idea | 21:50 | |
RabidGravy | I think someone needs to write a mailing list manager, then we'll know the language has arrived | ||
bpetering | RabidGravy: Zawinski's law? :) | ||
Juerd | RabidGravy: Not just 'a' mailing list manager. | 21:51 | |
PerlJam | .oO( All we need to do is make Perl 6 perform very well on problems that have yet to be realized ) |
||
RabidGravy | oh wait, no sorry, someone has to say "I think there should be a mailing list manager" and everyone else has to bike shed it to death | ||
21:51
Guest82811 joined,
AW3i joined,
avenj joined,
khw joined,
vividsnow joined,
brabo joined,
solarbunny joined,
pnu joined,
nowan joined
|
|||
RabidGravy | ;-) | 21:51 | |
Juerd | PerlJam: Well, if we can make it perform well on contrived benchmarks that's a very good start :) | ||
PerlJam: Thus far it's hard to even come up with something where Perl 6 will shine in terms of CPU or memory usage. | 21:52 | ||
Zoffix | PerlJam++ | ||
Juerd | But surely this must be a matter of time | ||
RabidGravy | every once in this while I have this weird idea about implementing MoarVM on an FPGA | ||
[Coke] | ok, that last doc failure was a red herring, rebuilt on travis, it seems fine. At least now we'll get a warning when something breaks the build going forward. | ||
dalek | ar/release: 4e8a9f9 | FROGGS++ | tools/star/Makefile: sine we bootstrap panda, we dont fake its state |
||
Zoffix | [Coke]++ | ||
PerlJam | Juerd: I think so too. | ||
21:52
zwu left
|
|||
bpetering | Juerd: nativecall bindings get you performant code, sysadmin people will appreciate this | 21:52 | |
[Coke] | (note that travis takes about 25m for a build to succeed, compared to 70-80 on hack, but that's probably because we're pygmentizing) | 21:53 | |
bpetering | Juerd: that's where my immediate efforts are going | ||
Juerd | bpetering: Great! | ||
bpetering | BTW, in my immediate hit list are (in order) libsodium, libgit2, libssh | ||
If anyone has ideas, let me know | |||
atweiden | bpetering: argon2 | ||
Juerd | Yesterday I tried to figure out if I could write a faster stringifier for tommath. Python's is very fast. But it turns out I severely lack skill and knowledge to even understand the current code bases sufficiently :) | 21:54 | |
I did find that Python has a special and optimized case for base 10 integers. | |||
bpetering: I'd really love to see an SSL variant of IO::Socket::Async | 21:55 | ||
leont | SSL is a mess, no matter how you implement it :-( | ||
bpetering | Juerd: i appreciated your investigation regardless, and I'm in a similar position regarding Rakudo/Moar internals | ||
TimToady | yes, it's possible to do much better than repeated division when you have a base that is related to 8 and 2 | ||
Juerd | leont: Yes, but it needs to be done, and I can't do it :( | ||
bpetering | Juerd: I'll keep that in mind, but it sure won't be OpenSSL | ||
mspo | Juerd: linux distros should remove perl from base | ||
Juerd | TimToady: They do use repeated division, but apparently by 10**something | ||
FROGGS | bpetering: we've got OpenSSL bindings already, no? | 21:56 | |
mspo | and python and the rest of the things they include and refuse to update | ||
Skarsnik | gnutls is not a replacement for openssl lib? | ||
21:56
lucasb joined
|
|||
Juerd | mspo: Sorry, I can't hear you. The line seems to be breaking up. Do you hear that digital noise in the background too? | 21:56 | |
Zoffix | mspo, and what would power all the system tools? | ||
Juerd | Zoffix: sh of course | ||
leont | gnutls is just as bad, if not worse, from what I've seen | ||
mspo | indeed, the shell | 21:57 | |
leont | libtomcrypt has all primitives one could need for an ssl library, I've wondered how hard it would be to write an ssl library on top of it. | ||
perigrin | Zoffix: obviously they should all be written in Go. | ||
mspo | or awk (which gets fewer updates) | ||
perigrin hides. | |||
Zoffix | :D | ||
bpetering | atweiden: that looks nice, I'll see what I can do | ||
Juerd | bpetering: I don't really care about which ssl library will be used. They all suck :) | ||
lucasb | hey, so... the rakudo star is called 2016.01... but it'll ship with rakudo 2015.12 ? | ||
bpetering | FROGGS: I think so, but OpenSSL arguably provides negative security | 21:58 | |
Juerd | lucasb: My new clock came with expired batteries. So I guess one month is okayish :) | ||
bpetering | FROGGS: it's difficult to put effort into that | ||
FROGGS | lucasb: it is a release candidate of today's rakudo... both 2016.01 and 2015.12 are basically wrong, so dont take the seriously | ||
RabidGravy | can someone write me a time machine, I may want to go and alter the minds of the person who designed the Unix file permissions, testing this is a royal pain | ||
FROGGS | bpetering: true | ||
lucasb | rakudo is all wrong /o\ | ||
TimToady | no, just those two release, on average they're fine :) | 21:59 | |
lucasb | FROGGS++, just kidding. thanks for looking after the star release | ||
FROGGS | lucasb: no, just the RC I made between to compiler releases :o) | ||
RabidGravy | everything is wrong | ||
mspo | RabidGravy: can you think of a better one? | ||
RabidGravy | but FROGGS++ | ||
lucasb | I just think it's interesting that rakudo star 2016.01 will ship *before* the rakudo compiler 2016.01 | 22:00 | |
FROGGS | lucasb: it wont | ||
RabidGravy | mspo, no, it fits nicely in 16 bits | ||
lucasb | ahhh, you will wait | ||
FROGGS | lucasb: star 2016.01 will come afterwards | ||
I just wann get feedback as early as I can | |||
lucasb | moarvm updated libuv, but no nqp bump took place. I guess this will be delayed? | 22:01 | |
TimToady | I thought that was just in a branch... | ||
muraiki | I don't suppose there's any shorthand for @*ARGS[0], is there? heh | ||
lucasb | TimToady: it got merged in moarvm master, I think | 22:02 | |
Juerd | muraiki: You can unpack @*ARGS in the signature of a sub MAIN | ||
muraiki | Juerd: yeah, I'm playing code golf so that would be longer, haha | ||
Juerd | OH wow | 22:03 | |
It comes with a "Usage: ..." error message | |||
♥ ♥ ♥ | |||
This will save so much time | |||
skids | .oO(all the people pidgeon gave greenish username colors are all talking at once.) |
||
muraiki | yeah, the stuff main() does is great | ||
Juerd | Even Bool :$foo does exactly what I would want it to do | 22:04 | |
bpetering | "gptrixie" ~~ "Great and Powerful Trixie" ahhh | ||
TimToady | what it doesn't do well yet is subcommands | ||
muraiki | it's still super awesome though :) | ||
skids | ...and legacy style flags for emulation, but that could be a module. | 22:05 | |
22:06
skids left
|
|||
gfldex | we don't really expain sub MAIN in the docs | 22:06 | |
leont | It's also useful to make MAIN a multi, specially with subcommands | ||
I use this in my scripts for example for a --help option: paste.scsys.co.uk/504088 | 22:07 | ||
It turns the script's POD into text, and displays that to the user | 22:08 | ||
(I'd love to see a Pod::To::ANSI or some such) | |||
[Coke] | FROGGS: please don't cut a star release that isn' 2015.12 | 22:09 | |
Util | TimToady, diakopter: Thanks! Bug filed at rt.perl.org/Public/Bug/Display.html?id=127206 | ||
[Coke] | if I'm reading backscroll correctly. | 22:10 | |
FROGGS | [Coke]: nine and lizmat suggested that we are going to skip a 2015.12 star | ||
[Coke]: otherwise we would have to make a point release | 22:11 | ||
bpetering | Skipping makes sense to me, FWIW | ||
lucasb | leont: I saw in Pod::To::Text's source that it can work together with Terminal::ANSIColor. but idk who it looks like and if that's what you meant. | ||
*idk how | |||
FROGGS | gnight #perl6 | 22:12 | |
[Coke] | ok, so it'll eventually be based on the 2016.01 release? That's fine. But we have lots of decisions to make before then in terms of what goes into that release. (FYI) | ||
Zoffix | night | ||
[Coke] | FROGGS++ for trying to get that going. | 22:13 | |
FROGGS | [Coke]: sure (discussions) | ||
leont | lucasb: Nice! That must be new then. It depending on an environmental variable is stupid though. | ||
22:14
raiph joined
|
|||
nine | Good night all! | 22:14 | |
lizmat | gnight nine | ||
[Coke] wanders away from the keyboard. | 22:15 | ||
22:16
geraud left
22:17
geraud joined
|
|||
muraiki | is there a way to insert a string into a regex in order to create a regex dynamically? something like ('abc', 'def').map: rx/<[$_]>/ | 22:22 | |
masak suppresses the urge to do an over-the-top snarky RT of the "mortal enemies" tweet | |||
dalek | c: 2da299a | (Wenzel P. P. Peppmeyer)++ | doc/Language/functions.pod: begin docing sub MAIN |
||
c: 42d74b4 | (Wenzel P. P. Peppmeyer)++ | doc/Language/functions.pod: Merge pull request #327 from gfldex/master begin docing sub MAIN |
|||
Zoffix | muraiki, definitely is, but I don't know what it is | ||
muraiki | Zoffix: yeah, I figure there must be a way, but I don't know how T_T | 22:23 | |
masak | muraiki: you're almost there | ||
muraiki: just need the braces for the .map | |||
Zoffix | really? 0.o | ||
abraxxa | Skarsnik: MySQL works as well | 22:24 | |
Zoffix | m: my $foo = 'a* bc'; say so 'aaabc' ~~ /$foo/ | ||
camelia | rakudo-moar f1dd49: OUTPUT«False» | ||
masak | m: say so "abc" ~~ $_ for <abc def>.map({ rx/<$_>/ }) | ||
camelia | rakudo-moar f1dd49: OUTPUT«TrueFalse» | ||
lucasb | but... he wants to create a char-class <[abc]> or wants to match the string 'abc'? | ||
masak | muraiki: like that. | ||
Zoffix | masak, hm, how to make it consider special regex chars tho? | ||
muraiki | masak: ah I see, thanks | ||
masak | Zoffix: by magic. | 22:25 | |
Skarsnik | abraxxa, if that make the whole test thing less messy, it's cool x) | ||
Zoffix | :( | ||
abraxxa | Skarsnik: i'm trying to get the current tests working first so I know I don't break something | ||
masak | Zoffix: actually, the `<$str>` version basically parses $str into a regex, compiling it. | ||
gfldex | Zoffix: that would require the regexp to be recompiled | ||
abraxxa | SQLite works as well | ||
masak | Zoffix: does that answer your question? | ||
Zoffix | m: my $foo = 'a* bc'; say so 'aaabc' ~~ /<$foo>/ | 22:26 | |
camelia | rakudo-moar f1dd49: OUTPUT«True» | ||
Zoffix | masak, yes, thanks | ||
22:26
thzre left
|
|||
abraxxa | mysql is missing null handling | 22:26 | |
just fixed that in Pg | |||
masak | Zoffix: sorry I said "magic" ;) | ||
Zoffix | :) | ||
22:26
mcmillhj joined
|
|||
masak | I meant "through a very boring, predictable process" | 22:26 | |
Skarsnik | You can add test for pgarray if you are willing too x) | ||
22:27
Psyche^ joined,
Psyche^_ left
|
|||
Zoffix | I didn't realize < and > were part of it so in my first test above the special chars didn't take | 22:28 | |
abraxxa | mst: does mysql differentiate between '' and NULL? | ||
Zoffix | Yes | ||
masak | Zoffix: `<$str>` means "interpolate string (as a regex)", `$str` means "interpolate string (verbatim)" | ||
abraxxa | yes, from the C lib docs: NULL values in the row are indicated by NULL pointers. | 22:29 | |
22:29
travis-ci joined
|
|||
travis-ci | Doc build errored. Wenzel P. P. Peppmeyer 'Merge pull request #327 from gfldex/master | 22:29 | |
travis-ci.org/perl6/doc/builds/100935357 github.com/perl6/doc/compare/68ae0...d74b474ee1 | |||
22:29
travis-ci left
|
|||
masak | Zoffix: unlike Perl 5, you have to go out of your way a little bit to get the wild and unsafe version | 22:29 | |
abraxxa | how can I detect this with NativeCall? | ||
Skarsnik | abraxxa, I think you get the NULL type for the field | ||
abraxxa | Skarsnik: AH, thanks | 22:30 | |
Zoffix | masak, that's the most common usecase in my code, so I'm glad :) | ||
Skarsnik | and Null ptr are Str or Any | ||
abraxxa | which sucks | ||
lucasb | sorry, to repeat this, but just before rakudo 2016.01 ships, it will bump nqp version to use nqp 2016.01. so basically, you're letting for the last day to test the libuv update. that's why I'm asking: can nqp in rakudo be bumped *now*? | ||
abraxxa | because if the column is a float column I want to return a Rat type object so I need to know the type | ||
Skarsnik | ? | 22:31 | |
Oh I see | |||
abraxxa | Skarsnik: we've discussed this already and the consensus was to return a type object | ||
but we might need to change that | |||
Skarsnik | for null value? | ||
abraxxa | because you don't know the type in NULL cases for some RDBMSes | 22:32 | |
Skarsnik | hm wait, you will get the type on the field since it's a function you can call before grabbing the value | ||
abraxxa | in Oracle for example a calculated column which isn't based on a table column does return both zero for the digits before and after the comma | 22:33 | |
Skarsnik | I think drivers need to tell their features | ||
lizmat | lucasb: is the MOARVM of nqp already bumped ? | ||
masak | m: my $x = q[<$x>]; say so "foo" ~~ / <$x> / | 22:34 | |
camelia | rakudo-moar f1dd49: OUTPUT«5===SORRY!5=== Error while compiling /home/camelia/EVAL_0Prohibited regex interpolation (use MONKEY-SEE-NO-EVAL to override,but only if you're VERY sure your data contains no injection attacks)at /home/camelia/EVAL_0:1------> 3anon regex {…» | ||
Skarsnik | especially since I am very tempted to return Date/DateTime object when possible | ||
since they are some sql type | |||
muraiki | m: @*ARGS=["a"]; say ("ab", "cd").first({@*ARGS ~~ rx/<[$_]>/}, :k) | ||
camelia | rakudo-moar f1dd49: OUTPUT«Nil» | ||
lucasb | lizmat: yes, I think moarvm was already bumped in nqp | ||
masak | m: use MONKEY-SEE-NO-EVAL; my $x = q[<$x>]; say so "foo" ~~ / <$x> / | ||
abraxxa | Skarsnik: sure, that's the next step | 22:35 | |
lizmat | lucasb: also with the gc fix of the past week ? | ||
camelia | rakudo-moar f1dd49: OUTPUT«(timeout)» | ||
lucasb | lizmat: yes, I think it was bumped because of this gc fix | ||
abraxxa | so how can I test if the returned value is a NULL Pointer? | ||
Skarsnik | compare Str or Any | ||
abraxxa | should a Pointer or CPointer type object get returned from NativeCall? | ||
lizmat | [Coke]: you ok with me bumping NQP_REVISION to get the latest Moar ? | 22:36 | |
muraiki | m: @*ARGS=["a"]; say ("ab", "cd").first({@*ARGS ~~ rx/<[<$_>]>/}, :k) | ||
camelia | rakudo-moar f1dd49: OUTPUT«Nil» | ||
Skarsnik | m: my Str $foo; say $foo === Str; | 22:37 | |
camelia | rakudo-moar f1dd49: OUTPUT«True» | ||
Skarsnik | m: my Str $foo; say $foo === Any; | ||
camelia | rakudo-moar f1dd49: OUTPUT«False» | ||
masak | muraiki: I'm not sure you can use `<$_>` like that, inside of a char class | 22:38 | |
muraiki | doh | 22:39 | |
gfldex | where can i find how rakudo constructs a sub? | 22:40 | |
diakopter | .... many places ^_^ | ||
gfldex | just one will do | ||
lizmat | sub a { } | ||
?? | |||
TimToady | mostly src/Perl6/Actions.nqp | 22:41 | |
and src/Perl6/World.nqp | |||
with honorable mention going to src/Perl6/Grammar.nqp | |||
diakopter | "here's 4500 LoC" | 22:42 | |
abraxxa | WTF doc.perl6.org/type/Hash#%3Aexists | ||
i can't see the usage of :exists and :p there | |||
gfldex | it's 9559 LoC actually | ||
TimToady | where can I found out how sausage is constructed? | ||
where can I find out how laws are made? | 22:43 | ||
diakopter | strictly, the intestines. | ||
your favorite, the colon. | |||
gfldex | TimToady: there you go en.wikipedia.org/wiki/Main_Page | ||
abraxxa | no, google! | ||
Zoffix | gfldex, rakudo uses nqp BTW | 22:44 | |
TimToady | .oO(no guts, no glory) |
||
Zoffix | under the hood, maybe that's where you should look | ||
gfldex | i guessed as much | ||
diakopter | the cacophany of noodles | ||
gfldex | found it! github.com/rakudo/rakudo/blob/nom/....nqp#L3267 | ||
TimToady | hehe | 22:45 | |
_Dave_ | Remember, Google returns different results to different people | ||
lucasb | gfldex: github.com/perl6/doc/commit/a7e005...7afdc37649 # <-- forgot to add the :exists and :p adverbs? | ||
diakopter | who blogged www.dagolden.com/index.php/2589/per...l-enemies/ | ||
lizmat | xdg | ||
Zoffix | xdg | ||
Juerd | diakopter: dagolden did | 22:46 | |
Zoffix | diakopter, metacpan.org/author/DAGOLDEN | ||
RabidGravy | xdg done a job on me, now I am a real sickie | ||
Zoffix | *sigh* I'm like a slow kid :) | ||
Juerd | Zoffix: No, your response contains more information so it's only logical that it would take longer :) | ||
gfldex | lucasb: they are there | 22:47 | |
abraxxa | _Dave_: I use DuckDuckGo anyway | ||
lucasb | gfldex: in the code block? | ||
_Dave_ | me too lol | ||
gfldex | lucasb: you are right | 22:48 | |
_Dave_ | these days, if I really want to find something I either a) use both or b) endure the geek angst and ask the question anyway | ||
Juerd | I think it's unfortunate that dagolden doesn't allow on-site comments | ||
RabidGravy | that's actually a well balanced blog post compared to a lot of the stuff out there | 22:49 | |
gfldex | m: my %h = a => 1; dd %h; %h<a>:delete; dd %h | ||
camelia | rakudo-moar f1dd49: OUTPUT«Hash %h = {:a(1)}Hash %h = {}» | ||
diakopter | I suppose all of those scenarios have already been hashed here | ||
but I'm wretchedly averse to take a look at the irc log | 22:50 | ||
TimToady | there was some discussion, yes | ||
RabidGravy | dave golden from what I know of him is not given to dramatics | ||
Juerd | diakopter: What's your take? | ||
TimToady | my suggestion is that overreacting is a more worrisome risk than underreacting | 22:51 | |
Juerd | Determining the right amount of reacting is hard though :) | 22:52 | |
_Dave_ | how about pro-acting? :) | ||
perigrin | RabidGravy: he isn't which is why that is better balanced than a lot of the stuff out there :) | ||
That doesn't mean he didn't react from the place that a low level Perl + C developer who sees something else that may challenge his ability to get future work doing similar stuff to the work he _currently_ enjoys ... would. | 22:53 | ||
dalek | c: 2791bbc | (Wenzel P. P. Peppmeyer)++ | doc/Type/Hash.pod: fix :exists example |
||
c: a124b91 | (Wenzel P. P. Peppmeyer)++ | doc/Type/Hash.pod: add :delete to Hash |
|||
c: 409f9ed | (Wenzel P. P. Peppmeyer)++ | /: Merge remote-tracking branch 'upstream/master' |
|||
c: fd6293b | (Wenzel P. P. Peppmeyer)++ | doc/Type/Hash.pod: Merge pull request #328 from gfldex/master fix :exists example | add :delete to Hash |
|||
diakopter | Juerd: #2 for 2 more years, #3 for 2 years, then #2 for 4 years, then ... I don't know | ||
22:54
cognominal joined
|
|||
abraxxa | Skarsnik: i've pushed all my code changes | 22:54 | |
Skarsnik | in your fork? | ||
diakopter | I'm not ruling out #1, but not before 6-8 years from now, and not before gigantic shifts occur on modulecounts.com | 22:55 | |
abraxxa | yes | ||
i hope we can rebase the main repo to it soon | |||
hoelzro is pretty ok with #3 | 22:56 | ||
Skarsnik | I think a release should be tagged for Star for DBIish | ||
hoelzro | but I wouldn't mind #1 ;) | ||
gfldex | FROGGS: on a non clean install with --prefix=$HOME/local I got: | ||
t/spec/S17-lowlevel/lock.t (Wstat: 256 Tests: 23 Failed: 1) Failed test: 15 | |||
Skarsnik | before doing even more change on it | ||
diakopter | at some point the lingua franca becomes English, and then maybe French again | ||
well. Frankish. | 22:57 | ||
perigrin | diakopter: I don't think you need a gigantic shift, just a single order of magnitude really | ||
RabidGravy | Franglish | ||
abraxxa | Skarsnik: not sure if it's better to delay such large changes | ||
timotimo | "They compete for scarce resources to grow – in the form of volunteers who will contribute time and treasure." - i harshly disagree. a whole lot of contributions have come from people who otherwise weren't interested in perl5 at all | ||
leont | I think all languages that got popular existed for like 5+ years before they did. Java and .Net were a bit younger, but had massive corporate weight behind them. | ||
timotimo | am i wrong in that interpretation? | 22:58 | |
lucasb | gfldex++, thanks for the doc update. (only the :p adverb is missing now) | ||
flussence | .oO( modulecounts.com will be seen in a different light once someone figures out having the internet precariously balanced on a million barely-QAed node libraries isn't such a hot idea ) |
||
hoelzro | timotimo: I would say that's correct | ||
leont | timotimo: there is some overlap, but it's fairly small | ||
hoelzro | it assumes that everyone working on Perl 6 is a person who would put just as much time and energy into Perl 5 were 6 not to exist | ||
Skarsnik | abraxxa, I am not sure to get your change on 99? did you just rewrite the test? | 22:59 | |
Juerd | I'll admit that I'd have continued to put energy into Perl 5 if it were not for Perl 6. It is at least partly true. | ||
perigrin | hoelzro, timotimo: not exactly ... | ||
Juerd | Not sure if my involvement with either project makes a difference though :) | ||
abraxxa | Skarsnik: haven't pushed that so far | ||
timotimo | "First, a postulate: given the language similarities, the people that will find it easiest to learn Perl 6 are today's Perl 5 developers." - i also disagree harshly with this. i found perl6 nice to learn, but i would never touch perl 5 with a 10-foot-pole from where i stand right now | 23:00 | |
PerlJam | Juerd: feather made a *huge* difference IMHO :) | ||
diakopter | timotimo++ I harshly agree with your last | ||
gfldex | lucasb: some day i will get them all right at the same time :) | ||
hoelzro | perigrin: could you elaborate? | ||
Juerd | PerlJam: Thanks. To be honest I already sort of forgot about feather... :) | ||
diakopter | timotimo: you are extremely correct; JavaScript is much closer to Perl 5 than Perl 6 is close to Perl 5 | ||
perigrin | hoelzro: I"m not sure it'd be welcome with the harsh disagreements and agreements :) | ||
hoelzro | =) | 23:01 | |
well, feel free to elaborate if you like; if not, that's ok too | |||
RabidGravy | yeah, I've been doing Perl for 20+ years and I'm sure I'll being doing Perl 5 again in the future, but hey I may be doing Javascript or Erlang in six months if people want to pay me for it | 23:02 | |
perigrin | hoelzro: suffice it to say I (less harshly) disagree with his postulate but if you take it as axiomatic and then read his statments following less as absolutes than as "tendancies" ... | ||
Skarsnik | abraxxa, I am not fan of Rat for float. Rat seems more complex that just a value with float. I think people use Num for float in lot of case x) | ||
diakopter | I frankly see almost no similarity between Perl 5 and 6, both from implementor's perspective and.... is there another perspective? | ||
hoelzro | perigrin: he eqv xdg? | ||
perigrin | hoelzro: yes. | ||
abraxxa | Skarsnik: it's Perl 6's default | ||
hoelzro | *nod* | ||
TEttinger | I think the people that will find it easiest to learn perl 6 are people who were recently laid off from a polyglot software development job and so have a lot of free time and JUST WISH all those other languages had all their features IN ONE PLACE! | 23:03 | |
hoelzro | fair point | ||
perigrin | diakopter: I frankly don't think you're in a position to comment accurately anymore than xdg is. | ||
leont | diakopter: I see lots of similarity, but it's mainly on a philosophical level | ||
Skarsnik | my Num $a = 4.5; say $a; | ||
abraxxa digs Perl 6 for async + threading features | |||
Skarsnik | m: my Num $a = 4.5; say $a; | ||
camelia | rakudo-moar f1dd49: OUTPUT«5===SORRY!5=== Error while compiling /tmp/jtf8eB42cXCannot assign a literal of type Rat (4.5e0) to a variable of type Num. You can declare the variable to be of type Real, or try to coerce the value with 4.5e0.Num or Num(4.5e0), or just write the va…» | ||
perigrin | I'd give leont a better benefit of the doubt than either of you :) | ||
diakopter | perigrin: do you see some similarity between Perl 6 and 5? | ||
abraxxa | m: my $foo = 4.5; say $foo; | ||
camelia | rakudo-moar f1dd49: OUTPUT«4.5» | ||
hoelzro | also, I have the bias that I'm looking at the point from the view of someone who has contributed directly to the compiler | ||
PerlJam | diakopter: about 4 characters worth | ||
;) | |||
perigrin | diakopter: I'm not qualified to comment either ... I don't know perl6 well enough. | ||
abraxxa | m: my $foo = 4.5; say $foo.^name; | 23:04 | |
camelia | rakudo-moar f1dd49: OUTPUT«Rat» | ||
lucasb | diakopter: it's almost like one language has sigils and the doesn't | ||
abraxxa | that's what I mean by default | ||
hoelzro | whereas my P5 core contributions sum to a documentation change and a helper script | ||
lucasb | *the other | ||
dalek | osystem: 11089d4 | (Zoffix Znet)++ | META.list: Add Test::Output to Ecosystem Test the output to STDOUT and STDERR your program generates: github.com/zoffixznet/perl6-Test-Output |
||
23:04
muraiki left,
zwu joined
|
|||
hoelzro | thinking about it as mindshare and people working on the ecosystem frames it differently | 23:04 | |
abraxxa | Skarsnik: but that's something time will tell I guess | ||
perigrin | hoelzro: also is Perl6's current _need_ right now more core hackers? | 23:05 | |
diakopter | perigrin: you don't think I've contributed enough to implementing Perl 6? | ||
hoelzro | perigrin: not really | ||
lucasb | (I was joking. Of course P5 and P6 has similarities! Otherwise P6 wouldn't call Perl) | ||
perigrin | diakopter: I don't think you've contributed enough to core parts of perl5 | ||
Skarsnik | need are in the core and 'basic' module I think | ||
hoelzro | Skarsnik: agreed | 23:06 | |
perigrin | diakopter: which may be an uninformed opinon on my part. | ||
23:07
yurivish left
|
|||
Juerd | Is there a type for "a number"? Something that will accept Num, Int, Rat, uint8, etc, but not a string? | 23:07 | |
leont | Numish | ||
I think | |||
lucasb | Numericish | ||
23:07
pdcawley_ joined
|
|||
diakopter | perigrin: from *any* perspective, do you see any similarity between Perl 5 and 6? | 23:07 | |
leont | Numeric? | 23:08 | |
Quom__ | We certainly have many more modules that are 'translations' from Perl 5, although I wonder if those attempts shouldn't too try to branch out to other languages | ||
leont | m: Numeric $a = 1 | ||
camelia | rakudo-moar f1dd49: OUTPUT«5===SORRY!5=== Error while compiling /tmp/W9aMZsrmtHTwo terms in a rowat /tmp/W9aMZsrmtH:1------> 3Numeric7⏏5 $a = 1 expecting any of: infix infix stopper statement end statement modifier …» | ||
leont | m: Numish $a = 1 | ||
camelia | rakudo-moar f1dd49: OUTPUT«5===SORRY!5=== Error while compiling /tmp/1y51_BYNcCVariable '$a' is not declaredat /tmp/1y51_BYNcC:1------> 3Numish 7⏏5$a = 1» | ||
leont | m: my Numeric $a = 1 | ||
camelia | ( no output ) | ||
perigrin | diakopter: I see quite a bit from my "haven't really used Perl6 much" standing point. The syntax of both flows from a simlar mind. | ||
hoelzro | Quom__: I think taking inspiration from other languages would be a step in the right direction | ||
Juerd | Numeric. Thanks! :) | ||
perigrin | The object systems (if you accept Moose) are somewhat similar in a cursory way ... | ||
timotimo | leont: Numeric or Real, the former will also accept Complex, but Real will not | ||
Juerd | Oh, I think I want Real. | 23:15 | |
Thank you too | |||
leont still thinks Real is the wrong name | |||
timotimo | :) | ||
leont: why? | |||
Quom__ | hoelzro: I'm certainly working on P6 related Rust things right now, but I don't know if that will go anywhere… certainly not in the 'translation' direction! | ||
hoelzro | interesting | ||
lucasb | It would be cool if literal numbers were 'polymorphic constants' like in Haskell, this way you would be able to assign an integer-looking literal to Num variables | ||
leont | In many languages, real means float | ||
Quom__ | lucasb: There are some issues related to that still today… | ||
m: my Int $a = Inf | |||
camelia | rakudo-moar f1dd49: OUTPUT«===SORRY!===Cannot find method 'value'» | ||
diakopter | buggo | ||
23:15
pdcawley left
|
|||
Juerd | leont: I'd have liked Num to be called Float, and Real Num, but the language is now out there so it doesn't matter anymore :) | 23:15 | |
Quom__ | I don't remember what the verdict for that was | ||
perigrin | diakopter: If nothing else I'd argue that p6's objects and Moose are closer than JS and Moose. :) | ||
23:15
rindolf left
|
|||
Juerd keeps forgetting "my" when declaring typed variables. | 23:15 | ||
hoelzro | hah, I do that too! | ||
Juerd | I haven't done much C or C++ but apparently this did stick :) | ||
lucasb | well, one could argue that Inf and NaN should only be assignable to Nums. so I think an error 'Cannot assign a literal of type Num to a variable of type Int' would be the right outcome | ||
diakopter too | |||
RabidGravy | This beer has been sitting in the kitchen scaring me since before christmas : "Beavertown Moose Fang, Armagnac Barrel Aged Imperial Brown Ale" | ||
leont | Yeah, me too, but that may be $day-job being C++ | ||
Juerd | hoelzro: Apparently leont makes the same mistake. At least once, that is :) | ||
Ah, more than once | |||
hoelzro | I thought about making a rakudo error to say "did you mean my Type $var?" | ||
RabidGravy | so now it's time | ||
Juerd | hoelzro: That would be a good move! | ||
hoelzro | but, like many things I think up, it remains NYI =/ | ||
stmuk__ | RabidGravy: Dryuary? | ||
dalek | c: 53cfbdf | (Wenzel P. P. Peppmeyer)++ | doc/Type/Hash.pod: fix Hash adverb examples |
||
c: 40e0d21 | (Wenzel P. P. Peppmeyer)++ | /: Merge remote-tracking branch 'upstream/master' |
|||
c: 4fce87f | (Wenzel P. P. Peppmeyer)++ | doc/Type/Hash.pod: Merge pull request #329 from gfldex/master fix Hash adverb examples |
|||
RabidGravy | stmuk__, don't be silly now | ||
Zoffix | m: my Num $a = 42; say $a.Int | ||
camelia | rakudo-moar f1dd49: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Z2z2ivfbtxCannot assign a literal of type Int (42) to a variable of type Num. You can declare the variable to be of type Real, or try to coerce the value with 42.Num or Num(42), or just write the value as 42…» | ||
Skarsnik | Int is not a subtype of Num? | ||
leont | Nope | ||
timotimo | that would be super weird | 23:16 | |
don't forget your liskov | |||
lucasb | lizmat: I was waiting [Coke] to say 'sure, go ahead and bump nqp' :) but I think he is AFK. but thanks for listening to me. maybe later you will bump nqp. | ||
Juerd | Int could be a subtype of Rat, I think, but that's not the case either | ||
Zoffix | Reported (Cannot find method 'value'») : rt.perl.org/Ticket/Display.html?id=127207 | ||
Juerd | Skarsnik: Num, being floating point, is a lossy container type. | ||
Skarsnik | How many bug did you found today Zoffix? | ||
my Real $a = 42; | |||
m: my Real $a = 42; | 23:17 | ||
camelia | ( no output ) | ||
23:17
CurtisOvidPoe joined
|
|||
Zoffix | Skarsnik, if RT didn't have such a POS of a user interface, I'd tell you :) | 23:17 | |
Skarsnik, probably 3-6 | |||
abraxxa | thanks Wenzel! | ||
lucasb | huggable: how many bugs Zoffix found? | ||
huggable | lucasb, nothing found | ||
CurtisOvidPoe | p6: my @primes = grep { .is-prime }, 1 .. *; my @p = gather for 4000, 5, 100, 2000 -> $n { take start { @primes[$n] }; }; .say for await @p; | ||
camelia | rakudo-moar f1dd49: OUTPUT«No such method 'is-prime' for invocant of type 'Any' in block <unit> at /tmp/tmpfile line 1» | ||
Zoffix hugs huggable | |||
leont | Zoffix: it sends you emails, that way you can easily count | ||
lucasb | Zoffix++ just kidding :) | ||
Zoffix | leont, I delete those :) | ||
abraxxa | Skarsnik: and exactly that (Int not subtype of Num) made me not choosing Num | ||
Juerd | Hi CurtisOvidPoe | ||
CurtisOvidPoe | That segfaulted on my OS X El Capitan box. | ||
leont | There are two kinds of ticket systems, those that suck at web and those that suck at email | ||
23:17
_nadim left
|
|||
CurtisOvidPoe | Hi Juerd! | 23:17 | |
Skarsnik | abraxxa, notice that I used Real originaly in Pg I think xD | 23:18 | |
23:18
travis-ci joined
|
|||
travis-ci | Doc build passed. Wenzel P. P. Peppmeyer 'Merge pull request #328 from gfldex/master | 23:18 | |
travis-ci.org/perl6/doc/builds/100941713 github.com/perl6/doc/compare/42d74...6293b5e506 | |||
23:18
travis-ci left
|
|||
gfldex | \o/ | 23:18 | |
lizmat | m: my @primes := grep { .is-prime }, 1 .. *; my @p = gather for 4000, 5, 100, 2000 -> $n { take start { @primes[$n] }; }; .say for await @p; | ||
camelia | rakudo-moar f1dd49: OUTPUT«Type check failed in binding; expected Positional but got Seq in block <unit> at /tmp/0Rmih6sVXJ line 1» | ||
Juerd | leont: These days, I favor those that suck at email but have a nice web interface. Used to be the other way around but I got more comfortable using web stuff since web interfaces improved. | ||
abraxxa | Skarsnik: gah! why is it 'user' and not 'username' in mysql? | ||
Juerd | Why does Seq not do Positional? | ||
leont | Because it's an iterator, essentially | 23:19 | |
CurtisOvidPoe | And now I’m getting “This Seq has already been iterated, and its values consumed” | ||
lizmat | Juerd: what leont said | ||
Juerd | I see | ||
Skarsnik | abraxxa, No idea, ask the original author of dbiish or minidbiish x) | ||
abraxxa | we will normalise that too | 23:20 | |
Skarsnik | tricky, we will need to keep username too | ||
Zoffix | my @primes = grep { .is-prime }, 1 .. 1000_0; my @p = gather for 4000, 5, 100, 2000 -> $n { take start { @primes[$n] }; }; .say for await @p; | ||
m: my @primes = grep { .is-prime }, 1 .. 1000_0; my @p = gather for 4000, 5, 100, 2000 -> $n { take start { @primes[$n] }; }; .say for await @p; | |||
camelia | rakudo-moar f1dd49: OUTPUT«(Any)13547(Any)» | ||
Skarsnik | I mean the other | ||
Zoffix | I get "(Any) Cannot invoke this object (REPR: Null)" on my box | ||
diakopter | that's a new one | 23:21 | |
oh, nm | |||
Zoffix | :S which doesn't happen on repeat attempts | ||
leont | Thread-safety is hard :-( | 23:22 | |
timotimo | Zoffix: yeah, iterating over the same list from multiple threads at the same time is not going to be a good idea | ||
Zoffix | :( | ||
CurtisOvidPoe | I also get “/bin/bash: line 1: 95489 Segmentation fault: 11 perl6 int.p6” and “moar(95508,0x700000393000) malloc: *** error for object 0x7f94b6ad1400: double free” for the same code, depending on when I’ve run it. | ||
timotimo | Zoffix: were you expecting rakudo to do locking for you in that case? | 23:23 | |
CurtisOvidPoe | timotimo: if the list was changing, yeah, but since there’s nothing changing it, I was curious about what would happen. | ||
lizmat | good night, #perl6! | ||
timotimo | ah, i didn't see it's your code | ||
leont | Nothing is changing on the outside | ||
CurtisOvidPoe | night, lizmat! | ||
timotimo | the list is resizing, which causes a realloc to happen | ||
leont | Given it's lazily calculated, it's definitely changing on the inside | ||
CurtisOvidPoe | It’s a weird case where one process might be trying to access a value that’s not yet been computed. | ||
So it would be nice to have something that’s not a segfault there :) | 23:24 | ||
timotimo | our threading model is "if you do that, you'll get burned. so don't do that." | ||
diakopter | CurtisOvidPoe: email to rakudobug? | ||
timotimo | at least i think so. | ||
diakopter | oh, nm | ||
Zoffix | timotimo, I'm expecting to think as little as possible about doing things and instead wish to just receive results :) | 23:25 | |
timotimo | mhm | ||
i think jnthn had been wanting to put an improvement into our arrays so that it might be possible to perhaps have concurrent access not die, but i may be misremembering | |||
Zoffix | lucasb, I reported 27 bugs in total... 5 yesterday, 5 today :) | 23:26 | |
CurtisOvidPoe | p6: class Foo { subset Limit of Rat where -10 .. 10; has Limit $.x is rw }; Foo.new( x => 15.0 ); | ||
camelia | rakudo-moar f1dd49: OUTPUT«Type check failed in assignment to $!x; expected Foo::Limit but got Rat in block <unit> at /tmp/tmpfile line 1» | ||
abraxxa | Skarsnik: almost there | ||
Skarsnik | where is the weekly that happend every 15 days? x) | ||
CurtisOvidPoe | That’s one where I would hope for a somewhat better error message :) | ||
abraxxa | Skarsnik: do you know whatfor the post-connect-callback for Pg is? | ||
timotimo | Skarsnik: next monday | ||
diakopter | I mean, there should be no penalty for such data structures to fall back to more heavyweight, fully-locking, or even optimized lock-free versions of themselves... when accessed from more than one thread. Jnthn & I talked through such things a few years ago........ | ||
timotimo | the thing is that we don't want to pessimize all arrays everywhere to make concurrent resizing work out fine | ||
diakopter | see above ^ | ||
abraxxa | Skarsnik: SET client_min_messages = warning | ||
diakopter | you don't have to pessimize in teh single thread case | ||
23:26
cpage left
|
|||
leont | There's a reason why we have Supplies and Promises, those are actually thread-safe | 23:27 | |
timotimo | right | ||
yes, indeed | |||
Zoffix | CurtisOvidPoe, IIRC the issue there is not being able to do it at compile time. | ||
diakopter | yes it adds a check per call, but it's _tiny_ compared to everything else it does | ||
leont | OO:Monitor and OO::Actor can be quite useful too in some cases | ||
Skarsnik | abraxxa, no idea, sorry x) | ||
Zoffix | m: class Foo { has Rat $.x where -10 .. 10 }; Foo.new: :x(15.0); | ||
camelia | rakudo-moar f1dd49: OUTPUT«Type check failed in assignment to $!x; expected <anon> but got Rat in block <unit> at /tmp/_LdyDiJnuE line 1» | ||
Zoffix | Same here. | ||
lucasb | Zoffix++ I appreciate your work finding bugs. | 23:28 | |
diakopter | CurtisOvidPoe: I agree it shouldn't segfault, at least. | ||
JVM's exception is ConcurrentModificationException | |||
or something like that | |||
23:29
Zoffix left,
pochi_ joined,
pochi left
|
|||
timotimo | the JVM has a crazy amount of awesomeness when it comes to "lock elision" | 23:34 | |
23:34
cdg joined
|
|||
timotimo | if i understand it correctly, that's the reason why they can have locking everywhere for safety, but still have good performance | 23:35 | |
CurtisOvidPoe | Night all. | 23:37 | |
23:37
CurtisOvidPoe left
|
|||
timotimo | the cross-thread-write log thing moar has probably catches that error | 23:38 | |
23:38
travis-ci joined
|
|||
travis-ci | Doc build passed. Wenzel P. P. Peppmeyer 'Merge pull request #329 from gfldex/master | 23:38 | |
travis-ci.org/perl6/doc/builds/100946004 github.com/perl6/doc/compare/fd629...ce87f4f19f | |||
23:38
travis-ci left
|
|||
abraxxa | Skarsnik: pushed! | 23:38 | |
23:40
vendethiel left,
skids joined,
cdg_ joined,
spider-mario left
23:41
ilbelkyr_ is now known as ilbelkyr
23:42
raiph left
23:44
cdg left,
M-eternaleye joined,
cdg_ left
23:45
cdg joined
23:51
cdg_ joined
|
|||
abraxxa | Skarsnik: going to bed now, ping me when you've looked at my work | 23:51 | |
23:51
cdg_ left
|
|||
Skarsnik | same. Good night #perl6 | 23:52 | |
23:52
cdg_ joined,
kid51 joined,
M-matthew joined,
M-Illandan joined
|
|||
abraxxa | bye! | 23:53 | |
23:54
lucasb left,
cdg left
|
|||
zengargoyle | m: ((1..69).pick(5).sort, (1..26).pick).say; | 23:55 | |
camelia | rakudo-moar f1dd49: OUTPUT«((10 58 61 62 64) 7)» | ||
23:56
cdg_ left
|