»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend!
Set by sorear on 4 February 2011.
00:00 MikeFair left 00:01 MikeFair_ joined
jnthn 'night, #perl6 00:03
00:08 slavik1 left 00:10 slavik1 joined, sivoais left, sivoais joined 00:36 benabik left 00:46 pmurias left 00:48 gry joined 00:49 perlhelp joined
perlhelp HI! 00:49
I'm back :)
Who's still here? 00:50
01:05 am0c joined
perlhelp Hi am0c! 01:05
gry perlhelp: what's up? 01:06
perlhelp perl!
:)
we were talking in freenode! :)
may i pleaes speak with you bout perl5 ? 01:07
am0c perlhelp: Hi!
gry perlhelp: Afraid not, this channel is about perl6.
01:10 benabik joined
am0c perlhelp: if it's also related to perl6, you can tell here, if not #perl channel is for you. 01:15
perlhelp i am blocked from perl 01:17
geekosaur this does not mean you can claim #perl6 01:19
01:35 jeffreykegler joined
perlhelp hi jeffrey! 01:35
01:36 jeffreykegler left 01:37 thou left
[Coke] perlhelp: what irc client are you using, and what channel are you trying to chat in that isn't the one you were blocked from? 01:42
perlhelp perl5 01:43
here
or just plain perl
[Coke] perlhelp: what irc client are you using?
perlhelp i don't know 01:51
gry he's using webchat; don't worry, we're in /msg 01:53
diakopter I was cursing at myself for not figuring it out more quickly 01:54
um, ww 01:55
02:07 FROGGS left
[Coke] boingboing.net/2013/02/11/regular-e...sword.html 02:18
perlhelp Coke: I do not know 02:19
02:20 FROGGS joined 02:30 jaldhar joined 02:45 jaldhar left 02:49 jaldhar joined 02:53 perlhelp left 02:55 arlinius left 03:02 swarley| joined 03:09 arlinius joined 03:13 lue left 03:20 swarley| left, swarley- joined 03:23 vitaminmoo joined 03:30 japhb_ left 03:31 Gruber joined 03:34 s0rear joined 03:35 s1n1 joined 03:39 sorear left, Grrrr left, s1n left 03:41 s0rear is now known as sorear 03:42 uvtc joined
uvtc Ah ha! Re. my question at irclog.perlgeek.de/perl6/2013-02-06#i_6420596 . The term I was looking for "the Osbourne effect". Yes, that's "the osbourne effect". Ooh, so sorry. Thank you (me!) for playing. You're leaving with some lovely parting gifts. Let's bring out the next contestant. 03:46
chromatic used it in a reply to Ovid's wrap-up "Perl 7 - Final thoughts" post. 03:47
03:47 cibs left
uvtc TimToady: looks like I never replied to your suggestion at that time, but yes, getting a head-start is a fine idea. :) 03:50
s/looks/Oh, sorry, looks/ :) 03:57
TimToady :) 04:00
uvtc In case that bit of late-night (EST) humor was too off the wall, I was poking fun at myself for not remembering the term. Nothing to do with Perl 6.
04:01 Targen left 04:02 cibs joined 04:05 Targen joined 04:36 uvtc left 04:43 Targen left 04:45 telex left 04:46 telex joined 04:47 daniel-s joined 04:51 Targen joined 04:55 preflex left 04:56 preflex_ joined 04:57 preflex_ is now known as preflex 05:03 SamuraiJack joined 05:12 quester joined 05:17 xinming joined 05:18 xinming_ left 05:53 perlhelp joined
perlhelp hello? 05:53
how do i get a list of rooms with perl
-/msge *alias help perl ? 05:54
sorear /join #perl 05:55
05:57 perlhelp left, thou joined 06:04 FROGGS left 06:07 lue joined 06:13 dayangkun joined 06:15 SamuraiJack_ joined
TimToady rosettacode.org/wiki/Set_Puzzle#Perl_6 06:17
up to 510 now
06:20 geekosaur left
TimToady with another 15 or so we can catch up to BBC BASIC, Haskell, and Perl 06:20
moritz \o 06:22
06:22 SamuraiJack left
TimToady o/ 06:22
sorear o/ 06:23
06:24 dayangkun left, geekosaur joined 06:27 kaleem joined, FROGGS joined
quester Is anyone else having problems building Rakudo today? I'm getting an error in the nqp make, "repr_registry.c:237:9: error: implicit declaration of function ‘NFA_initialize’ [-Werror=implicit-function-declaration]" 06:36
... along with another error in the same line for "nested extern declaration of ‘NFA_initialize’" and several dozen warnings. 06:37
FROGGS quester: I'd say you use the wrong parrot version... 06:38
I'm using parrot 4.10.0, my nqp HEAD is about a week old 06:39
06:40 domidumont joined
quester I thought it might be something like like, but I rm -rf'ed rakudo and started from scratch. A quick rakudo/parrot/parrot --version says that it's 4.10.0-devel. 06:41
FROGGS uhh 06:42
looks like jnthn made changes to NFA stuff: github.com/perl6/nqp/commit/029bf5...9ca95fa80c 06:43
9 hours ago
quester Ah, so. 06:44
FROGGS I'm not sure what parrot you need for this
quester: is you just want to get pack to a working rakudo you might want to checkout 2013.01 for both nqp and rakudo 06:46
06:47 am0c left 06:52 domidumont left, domidumont joined
quester Thanks... I have a copy of Rakudo-Star 2013.01, but I was going to try to grok Set, which didn't quite make it into the January release. Oh, well... 06:55
r: <a b c>.set (|) <d e f>.set 06:56
p6eval rakudo a3869a: ( no output )
quester Err... well, it was something like that...
benabik r: say <a b c>.set (|) <d e f>.set 06:57
p6eval rakudo a3869a: OUTPUT«set(a, b, c, d, e, f)␤»
benabik quester: p6eval isn't like the REPL, you have to tell it to output.
quester Oh... thank you.
07:06 wk joined
TimToady r: say <a b c> (|) <d e f> 07:06
p6eval rakudo a3869a: OUTPUT«set(a, b, c, d, e, f)␤»
TimToady note that (|) already coerces to set
much as == coerces to numeric 07:07
07:07 b1rkh0ff left 07:09 thou left 07:16 gry left, gry joined 07:18 b1rkh0ff joined
quester phenny: tell jnthn I think that the change to src/6model/repr_registry.c in commit f5d0a8bb2c8465dd38443b4a10bd4a59ac49046f may need one line added to src/6model/repr_registry.h: "REPROps * NFA_initialize (PARROT_INTERP);" 07:29
phenny quester: I'll pass that on when jnthn is around.
quester And thanks to FROGGS++, benabik++, and TimToady++ 07:31
07:42 kst joined 07:43 pupoque joined 07:44 pupoque left 07:46 domidumont left, domidumont joined 08:03 quester left 08:10 domidumont left 08:12 wk left
arnsholt It's alive! 08:15
But then it died
timotimo: I've pushed some test scripts to the repo 08:18
It seems to work at least part of the time =)
08:35 domidumont joined
sorear seen in another channel, highly relevant to our needs: github.com/ccurtsinger/stabilizer 08:41
for jnthn in particular 08:42
note: I have not tried this, no clue if it works
08:57 Gwyxx joined 08:58 sevin joined 09:05 fhelmberger joined 09:07 hoelzro|away is now known as hoelzro 09:13 domidumont left 09:15 domidumont joined 09:27 alec__ left 09:36 alec__ joined 09:42 sevin left 09:45 avar joined 09:51 domidumont left 09:57 kivutar joined 09:59 sqirrel joined, ObseLeTe joined
jnthn morning o/ 10:02
phenny jnthn: 07:29Z <quester> tell jnthn I think that the change to src/6model/repr_registry.c in commit f5d0a8bb2c8465dd38443b4a10bd4a59ac49046f may need one line added to src/6model/repr_registry.h: "REPROps * NFA_initialize (PARROT_INTERP);"
nwc10 \o
FROGGS hi jnthn, hi nwc10
nwc10 free advice you didn't ask for - (1) experimental things shouldn't be on by default 10:03
(2) they need a lifetime - if they aren't promoted to non-experimental within $timespan, they get the chop
if you want to last longer than Perl 5, you'll need this
dalek p: c41c8f4 | jnthn++ | src/6model/repr_registry.c:
Missing #include; quester++.
10:07
10:07 wk joined
moritz
.oO( (??{ ... }) )
10:07
nwc10 oh no, not that
Dave took a year, but fixed that
well, *that* is the ultimate example 10:08
but there are a bazillion (well, probably >30) other things marked experiemental that aren't finished
FROGGS moritz: what's that?
nwc10 and the original author goes away before they are really finished
so I think it's needed as a social contract
1) you can't have this on by default. (so no-one downstream inadvertently comes to rely on it) 10:09
2) if you don't finish it, it will be for nothing. You can't rely on it
moritz FROGGS: that's a syntax for Perl 5 regex assertions that has been marked as experimental sind 5.8.8 at least 10:11
FROGGS ahh 10:12
nwc10 probably since something like 5.005
FROGGS nice
nwc10 IIRC it's likely to be from no later than 1999
jnthn sorear: Thanks for the link...yes, that looks interesting.
nwc10 there are lessons to be learned in "how not to become a hairball"
nwc10 is also interested, but doesn't (yet) want to build a new toolchain to play
had enough fun building clang a few months ago 10:13
gcc/ELF/ld.so/Linux/glibc-- # no, not all the world is a VAX
sorear nwc10: was this prompted by something on p5p?
nwc10 although in this case, the problem was not gcc or ld.so or Linux or glibc permissiveness 10:14
but bugs in gcc hiding bugs in glibc headers
sorear: no. but only because I've not written the e-mail yet :-/
sorear let us know when it shows up on nntp.p.o 10:15
nwc10 it's prompted by someone writing the infrastructure I could see would be useful. But figuring out that it's not useful for this other related thing. *And* that hunks of it are (correctly then, not correctly now) marked as experimental. And that likely no-one is using it for what it was intended for. (Even "me")
sorear: it won't be showing up as a rant :-)
moritz nwc10: but you can be sure that Abigail uses the feature for something it wasn't intended for, and loudly rejects its removal 10:18
nwc10 that's not fair. You need to be writing XS to use this one. *And* the feature in question, I don't want to remove
Abgail is not one of the real problems. 10:19
moritz ok, I should shut up, I think
nwc10 well, I'm not going to bitch about the *who* on a logged channel
and in this case, there is no *who* to bitch about. The author of the feature was doing exactly what was wanted.
it's a nuclear reactor problem 10:20
anti-bikesheds go in (in this case, a well written one)
but if the anti-bikeshed is incomplete, underdocumented, or simply to obscure for most people to use, it's just part of the 1%
in the context of (roughly), you can agree which 90% of Perl 5 is sane 10:21
but a lot of things you end up depending on on CPAN use 90%+1
and none agree on the +1%
credit davem for that.
Stevan already found this when thinking about Moe 10:22
10:22 swarley- left
nwc10 prototypes - hate 'em? want to kill 'em? 10:22
oops, there goes Test::More and Test::Simple
huf indirect notation - oops, print dun work 10:23
nwc10 thanks, yes, that's another good example 10:24
typeglobs - oh dear, there goes Exporter and every variant
huf i dont mind protos, i just wish we could keep newbies off of them :)
nwc10 most everything ugly is serving a purpose. Sure, they are abused 10:25
huf but indirect notation is awful
nwc10 but if you want to kill them, you need to figure out what alternative syntax you need to provide to implement the legitimate uses (legitimate, because there is no other way to do it)
and, down this road leads madness 10:26
and, out the other side of madness you find Perl 6.
whether you like it or not :-)
huf i still think there's room for throwing old crap out of p5 10:27
moritz but really only small-scale stuff
you can deprecated 'reset STRING' 10:28
huf or at least making them non-default if a high enough version is declared. but keeping so many things in core is expensive tuit-wise
moritz but what do you gain?
nwc10 removing them actually costs more
huf true.
masak good forenoon, #perl6
huf moritz: not much point to that, reset() bothers people a _lot_ less than indirect notation 10:29
or even protos
nwc10 (My understanding is that) Stevan is trying to figure this stuff out with Moe
huf and if it wasnt so morning, i'd probably be able to think up a few more awful features :)
moritz huf: indirect notation and protos bothers people BECAUSE PEOPLE USE THEM
huf: and you can't remove features from Perl 5 that are widely used 10:30
huf moritz: no. indirect notation causes code that should not compile to silently do the wrong thing
moritz sorry for shouting :-)
huf and that's pretty damn painful :)
moritz: but yeah
moritz yes, I know
still, far too much use of it in the wild
10:30 alec__1 joined 10:31 wk_ joined
huf use v5.LOTS; _could_ do no indirect qw/FATAL/; behind the scenes... dont know if that'd help.. 10:31
arnsholt sorear: Ooooh, that's awfully clever (stabilizer) 10:36
10:37 wk left, alec__ left, daxim joined
arnsholt Especially the point about normally distributed run-times. While interning at Opera someone explained the horrors of performance testing (and distributions without a mean) to me 10:37
10:38 dakkar joined
masak I guess the question is, would you still use a Perl 5 without indirect notation? I would. 10:42
huf i'd be happier to use it ;)
jnthn masak: Even if you couldn't use any modules that (directly or indirectly) depend on it? :) 10:43
nwc10 jnthn++ # faster than I am
(At typing)
huf codepad.org/mkXYsmeQ
^ :(
masak jnthn: um oh. :( 10:44
jnthn: yes, that makes it worse.
huf isnt the fix mostly syntactical and quick?
it's still a _lot_ of work, but...
but yeah, once the cat's out of the bag, it's like herding cats. 10:45
nwc10 it's still a _lot_ of work, and as soon as you want to install code from CPAN, that's code that you don't own
10:47 perlhelp joined
masak perlhelp: welcome back. 10:49
perlhelp thnk you 10:51
i'm so stressed out
daxim use perl5i; # includes "no indirect", so that won't work anymore
moritz the German phone area codes can be compiled to a regex with 8895 characters :-) 10:52
daxim my boilerplate to make perl5 taste half-way like 6: paste.scsys.co.uk/228303 10:56
masak moritz: there must be a name for the psychological quirk that makes people look at big regexes with half-fear, half-admiration :)
daxim includes also MXMS (yay signatures) 10:57
masak ;)
moritz masak: awe-shock?
(for the record, it's automatically created with Regexp::List) 10:58
daxim there are at least 4 modules similar to that on cpan
notably list2re in p3rl.org/Data::Munge 10:59
masak moritz: I'm fine with the awe-shock, until people draw the conclusion "AND HENCE REGEXES ARE EEEVIL". yeah, well, if statements are evil too, if you chain a thousand and five of them on top of each other.
10:59 ashish joined
ashish jnan 11:00
masak "Too much of a good thing can be wonderful." -- Mae West, unsourced 11:01
this rule doesn't hold for programming features. :)
ashish rite
11:02 domidumont joined 11:03 ashish left 11:05 ObseLeTe left 11:08 perlhelp_ joined 11:09 perlhelp__ joined
moritz daxim: it seems that Data::Munge::list2re doesn't do any kind of optimization 11:09
11:10 perlhelp left
daxim luckily, perl 5.10 already does 11:10
moritz it produces simple | alternations, which amount to 27k chars instead of 9k
daxim: yes, but it matters when I store the stuff
daxim aha
moritz and I don't need a module for join '|', @list 11:11
daxim the other module is p3rl.org/Regexp::Assemble::Compressed
anyone spare a tuit for neilb to review and compare? 11:12
moritz who or what is neilb?
11:12 perlhelp_ left
daxim g neilb review 11:13
moritz Regexp::Assemble::Compressed also simplifies ranges in charclasses 11:14
[134567] -> [13-7] 11:15
6.1k characters
so the best so far :-)
11:16 Targen left
masak it's a nice problem, regex compression. 11:17
maybe can be used in a future p6cc... :) 11:18
nwc10: I like the idea of giving experimental features sunset dates. 11:20
TimToady: would rosettacode.org/wiki/Set_Puzzle#Perl_6 be clearer with the bitmasks specified in hex, you think? 11:21
11:37 daniel-s_ joined 11:38 daniel-s_ left, daniel-s_ joined 11:41 daniel-s left 11:48 kaleem left 11:49 LordV joined, arlinius left, spanner_ joined, LordVorp left, mehwork left, spanner left, mehwork joined, xinming left, jerome left 11:50 jerome joined 11:51 xinming joined 11:58 perlhelp__ left 11:59 perlhelp joined 12:11 perlhelp left 12:15 bbkr joined 12:18 arlinius joined
bbkr what is the replacement for system() command from P5? 12:18
jnthn run, iirc 12:22
moritz run/shell
bbkr thanks 12:33
12:33 bbkr left 12:42 benabik left
arnsholt jnthn: I'm halfway tempted to kill of the CArray class entirely and replace it with Buf 13:06
FROGGS arnsholt: fwiw, sounds good to me
13:07 jaldhar left
masak +1 13:10
arnsholt++ # working on zavolaj
arnsholt Not so much working as philosophising at the present stage, but thanks for the karma anyways =) 13:17
The ZMQ work has highlighted that string/blob handling is something of a pain point as well
For example sending a message "æa" in the current incarnation of the bindings will give you "æ" at the other end 13:18
FROGGS why that?
\0 ? 13:19
arnsholt Not quite
felher What is ZMQ?
arnsholt The C API can handle arbitrary byte sequences in a message (as any good library should)
So the function signature is essentially send(char *bytes, size_t length) 13:20
The Zavoalj wrapping I have ATM is invoked as send($message, $message.chars)
But chars and bytes aren't the same =)
felher: Message queue library thing
FROGGS r: say "æa".encode.bytes
p6eval rakudo a3869a: OUTPUT«3␤»
felher arnsholt: ah, okay, thanks :) 13:21
arnsholt timotimo++ wants to use it to make a Perl 6 backend for ipython, and I want to use Mongrel 2
FROGGS: Yeah, that's what I have to do. But Str.encode returns a Buf, which Zavolaj doesn't know how to marshal
jnthn arnsholt: We need something with the CArray REPR, though? Also, to know what type of thing is in it... 13:22
FROGGS well, what about send( $str, str.encode.bytes ) ?
r: say "æa".encode.decode('binary').chars 13:23
p6eval rakudo a3869a: OUTPUT«3␤»
FROGGS :o)
binary strings
I did that for IO::Socket::INET
arnsholt jnthn: Buf can be CArray REPRd I think. From what I saw in one of the S-es last night should provide storage of native types in a contiguous chunk of memory, so I think Buf can just use the REPR instead 13:28
The guarantees for Buf[NotNative] 13:29
are a lot more lax
(premature CR)
Of course, we still need a solution for arrays of CStruct/CPointer/CArray, and it might not be the best idea to use Buf directly (now that I think about it) 13:31
Heh. Always funny how actually talking about your ideas shakes lots more stuff out
jnthn Yeah, I think it may be challenging to do. 13:32
13:32 kaleem joined, arlinius left
jnthn Passing a Buf off to C-land seems sane. 13:33
arnsholt Yeah, that's where the idea originally came from
jnthn As in, supporting doing so.
arnsholt It'll probably be stored in the correct format anyways 13:34
13:37 PacoAir joined
FROGGS IMO you need a way to unpack a retrieved Buf (from C land) to a perl class/struct 13:40
[Coke] waves blearily over his coffee.
pmichaud good morning, #perl6 13:41
jnthn FROGGS: You just write the struct in Perl in the first place :)
FROGGS .oO( my MyStruct $obj = $buf.unpack("UUUSSV*") )
jnthn: of course
jnthn o/ pmichaud
arnsholt What jnthn said, but there's also github.com/jnthn/zavolaj/issues/13
FROGGS hi pmichaud
jnthn arnsholt: Yes, something like that would be very useful. 13:42
arnsholt I suspect there may be cases where pointer casting is required, but actually implementing it is pretty far down on my list of things to do
jnthn *nod*
[Coke] ticks off a record number of pmichaud good mornings in a row! ;) 13:43
arnsholt Although it should be relatively simple to implement should it become pressing. Most of the machinery is already in place
FROGGS right, just not accessible from a user point of view
pmichaud jnthn: (cursor_start) I think my plan last summer was going to be to use the $!shared object to pass the multiple values back and forth, instead of packing/unpacking an array
arnsholt Yeah, there are functions in NQP that take a pointer and a type and create a 6model object of the appropriate type from the pointer 13:44
jnthn pmichaud: Hmm.
arnsholt It's mostly a) deciding on the Perl 6 API for it, and b) implementing the nqp::op to drive it
pmichaud certainly $!shared already has $!target 13:45
jnthn pmichaud: cursor class has a different lifetime to $!shared, mind...
Yes, that is true
otoh, so does $!cursor ;)
It did occur to me that we could always just pull target and pos straight out of the Cursor itself. 13:46
pmichaud much of the multi-return aspect was simply because passing values was (supposedly) faster than attribute lookup in long-ago versions of parrot
13:46 benabik joined
jnthn Array lookup is still a (little) faster 13:46
pmichaud well, Cursor shouldn't have/need $!target at all, it can get it from $!shared
jnthn Oh, wait, yes, it is all in $!shared...
er, $!target is I mean.
pmichaud anyway, that was my plan from last summer, which I never got around to executing. 13:47
jnthn *nod*
tmtowtdi, which various trade-offs :)
pmichaud it doesn't need to change now, either; just that I was thinking that one could simply return the cursor and then grab the needed values from the cursor/shared attrs
jnthn Yeah, it's the cursor class that is a bit trickier.
pmichaud I was going to have a slot in shared for that 13:48
jnthn Could work
pmichaud not clean, but it'd work
jnthn I guess it only needs updating on language switches...
pmichaud well, or it could be set in !cursor_start and then unpacked by the caller 13:49
jnthn Yeah, that's the safe wya ;)
pmichaud i.e., it's only good immediately following a cursor_start call
jnthn *way
pmichaud anyway, if array create/unpack is faster, we can go with that too.
jnthn Well, the array I have now has that constraint too
pmichaud that's clean also
jnthn It doesn't allocate it each time, it just packs one it keeps around.
pmichaud oh, so it's about the same then :-)
jnthn Yeah, apart from $!pos ends up getting boxed... 13:50
So maybe I should pull that out of there.
pmichaud oh, definitely
grab that from the cursor attr
jnthn I did a "does this slow things down" test and it kinda didn't.
But I think I may tweak that before I go porting :)
pmichaud well, even the multi-return was effectively creating an aggregate PMC these days to hold the return values (which didn't used to be the case when I first came up with the approach :-) 13:51
jnthn True
Porting ouch: I discovered EXPR is still in PIR.
I guess I kinda knew...just didn't think about it until recently :)
nwc10 EXPR?
jnthn nwc10: OPP 13:52
Uh, that was terse :)
The operator precedence parser
I guess it's only so much PIR, and we have native lexicals in NQP now too.
So it's not so bad to switch over.
nwc10 put it as a quest on play-perl.org and see who bites? :-) 13:53
arnsholt I came across another chunk of Q:PIR the other day, I didn't quite get around to fixing it (and was a bit reluctant to, since it's likely not very well covered by tests) 13:54
masak actually, it sounds like a fun task.
are there tests explicitly for EXPR somewhere?
arnsholt Well, there's NQP and there's Rakudo O:) 13:55
jnthn masak: No, but if you break it you'll know very quickly ;)
pmichaud note that EXPR in pir is derived from EXPR in STD.pm :-)
er, STD.pm6
jnthn Yes, that makes me think it shouldn't be too bad to port :) 13:56
Anyway, I won't hit that for a week or so, I doubt.
Next up is to get NFA and Cursor to cross-compile and then do QAST::Regex code-gen... 13:57
nwc10 well volonteered masak? :-) 13:58
jnthn :D
13:59 kivutar left
nwc10 and then a pony? [inna lasagne? :-)] 13:59
jnthn
.oO( Low in fat, high in Shergar )
14:02
nwc10 groans
14:03 _ilbot left, _ilbot joined
masak :P 14:05
nwc10: yes, I just might give it a try.
arnsholt I was just looking at the code as well =) 14:07
There are three big chunks of PIR (O, EXPR, EXPR_reduce), and four small ones (starter, stopper, MARKER, MARKED) 14:08
masak hm, what do the last two do?
I can imagine uses for the other five. 14:09
14:09 _ilbot left
arnsholt I'm not entirely sure =) 14:09
14:09 _ilbot joined, arlinius joined
arnsholt I've seen it sprinkled around the Rakudo grammar, though 14:09
moritz masak: an optimization for caching <.ws> matches 14:10
iirc
arnsholt I think it's used to do things like requiring ; or newline after a block for example
Oh, and in ws, yeah
jnthn Yeah, basically you mark the position where a certian properly was true.
MARKER marks it, MARKED checks if the current position is marked in the expected way 14:11
masak ah. 14:12
14:13 kaare_ joined
pmichaud it serves a role similar to @*MEMOS in STD.pm6 14:17
14:21 Psyche^ joined 14:23 uvtc joined 14:25 Patterner left, Psyche^ is now known as Patterner
uvtc TimToady: in the latest Rosetta Code example, thanks for specifying the Rakudo version via the datestring. :) 14:25
14:33 _ilbot left, _ilbot joined 14:34 _ilbot left, _ilbot joined
uvtc Anyone know the status or location of the pygments highlighter that hoelzro created? 14:35
hoelzro I do!
I haven't found time to work on it lately =)
uvtc Ah.
hoelzro it's located here: bitbucket.org/hoelzro/pygments-main
14:35 _ilbot left 14:36 _ilbot joined
hoelzro I wouldn't mind having some help with the project either ;) 14:36
FROGGS who is github/kboga?
uvtc hoelzro: What is this "bitbucket" of which you speak?
hoelzro: how far along did you get with it? 14:37
FROGGS its like github AFAIK
hoelzro pretty far
14:37 Gwyxx left
hoelzro I put it on BB because pygments is on BB 14:37
uvtc Sorry. I need to learn more emoticons for subtle jesting.
hoelzro uvtc: it should work for almost all Perl 6 code
uvtc: this e-mail details what it doesn't do yet: www.nntp.perl.org/group/perl.perl6....g1655.html 14:38
everything else *should* work; if not, please let me know 14:39
[Coke] another reminder to Perl 6 people - no Perl grant requests -at all- were received for this quarter. If anyone has a project that a little bit of grant funding would help them help the community, please submit a grant request to the grants committee. (Doesn't have to be through the Hague process)
hoelzro I've found time to add fixes for small things, but I haven't sat down to work on one of these issues
uvtc hoelzro: I generally use Pandoc for any doc processing, and it does its syntax highlighting via Kate syntax highlighting files. I don't think it can use pygments. I was sorta curious to see how different the pygments files are from the XML ones Kate uses. 14:40
hoelzro pygments files are just Python code
FROGGS [Coke]: I'd need funding _and_ time... So I'll have just a bit in my spare time like I already do 14:41
hoelzro if you'd like to take the Python I've written for pygments and convert it for Kate, that would be cool
masak someone apply for a grant to implement LWP::UserAgent in Perl 6 :)
hoelzro but I had to pull out all the stops to parse Perl 6 correctly
FROGGS arnsholt/jnthn: seen that comment to the pull request? github.com/perl6/nqp/pull/45
uvtc hoelzro: hehe 14:42
jnthn FROGGS: Ohh!! 14:43
14:43 wk_ left
jnthn Thanks you :) 14:43
arnsholt Neat indeed!
jnthn will look thorugh that later :)
[Coke] masak: Yes, things like that, please.
also, play-perl.org looks neatish. 14:44
FROGGS masak: and someone needs to do SOAP, ya, SOAP is awful, but some ppl need it :(
pmichaud FROGGS++
maybe also add some native typing to some of those lexicals, though.
($opassoc and $key, for example)
arnsholt SOAP blocks on XML though, doesn't it?
nwc10 sticking it on play-perl.org doesn't have to wait 3 months for the next grant cycle 14:45
FROGGS arnsholt: right
nwc10 (I should figure out login on rants.perl.org, and add that to Alberto's post)
FROGGS pmichaud: you are talking to me? dont know what you mean by $opassoc... 14:46
arnsholt Mostly to jnthn I think
FROGGS k
puhhh
:o)
pmichaud two whoever is working on nqp #45
*to
+ my $opassoc := ~%opO<assoc>;
needs to be my str $opassoc 14:47
jnthn pmichaud: The PR was submitted about 8 months ago, so I think this wasn't an option back then. But yes, it should be done that way now. :)
pmichaud jnthn: right
but EXPR is the core of all code parsing, so it really needs to be fast :) 14:48
jnthn Indeed.
pmichaud as in, it might even be worth writing things like
my %opO := %opOPER<O> 14:49
to instead be
my %opO := nqp::atkey(%opOPER, 'O')
depending on how the translation actually takes place.
(and to avoid any non-existence checks) 14:50
mainly, EXPR is just about the hottest path in the parser there is. :-)
masak where's the "we need this" list? I should add LWP::UserAgent if it's not already there. 14:51
nwc10 make it work, then make it work fast?
FROGGS pmichaud: I added that to the pull request
masak: github.com/japhb/perl6-most-wanted 14:52
pmichaud nwc10: sure, make it work comes first, definitely. but also just be aware that if it's not fast enough, it's hard to switch over without adversely impacting Rakudo.
nwc10 agree 14:53
but there might be a factor of 8 headroom
good news: levenstein on JVM was again about 8 times faster
bad news: I do not know why, but Perl 5 was 100 times faster than JVM
jnthn nwc10: Well, but we're changing it in the (common, shared) NQP so it would impact Parrot too 14:54
pmichaud well, if parsing slows down by more than about 20%, that'll be a pain point
nwc10 jnthn: good point
uvtc masak: didn't someone recently make a "Perl 6 most wanted" github project...? Where was that...
colomon uvtc: github location is about ten lines back
moritz 15:52 < FROGGS> masak: github.com/japhb/perl6-most-wanted 14:55
uvtc {sigh} thanks. :)
jnthn nwc10: Interesting datapoint.
colomon should "format" be added to text processing?
jnthn nwc10: Any futher analysis on that would be very helpful (like, where is the pain point). 14:56
14:58 stopbit joined
[Coke] TimToady: play-perl.org/quest/5119f9743a5ec3040700002c - you might be interested in that quest. 14:59
nwc10 jnthn: I didn't have any good idea how to profile NQP (on either platform)
jnthn nwc10: OK. Maybe pastebin me the code you ran (so we're looking at the same thing) and maybe I'll have a play :) 15:01
pmichaud (profiling) seems like we ought to be able to do something about that.
masak FROGGS, uvtc: thank you. 15:05
says "LWP or modern equivalent". 15:06
does that cover LWP::UserAgent
masak <== fairly unknowledgeable about these matters
15:06 kaleem left
nwc10 pasta.test-smoke.org/439 # NQP, 177.77699995040894 15:06
moritz masak: yes 15:07
Mojo::UserAgent might be worth stealing from
nwc10 pasta.test-smoke.org/440 # Perl 5, 1.98732399940491
that's NQP-JVM
you can probably brew tea and drink it in the time that Parrot takes 15:08
masak well, the one who implements LWP::UserAgent will have to decide to what extent to make a faithful impl, or to improve it in the process.
pmichaud I wonder if it's the return handling causing the slowdown 15:09
(wild guess)
jnthn pmichaud: Mebbe, but I already optimized that some
15:10 kivutar joined
pmichaud easy check: try running nwc10++'s fibonacci benchmark with a 'return' included. 15:10
i.e., change
$n < 2 ?? $n !! fib($n-1) + fib($n - 2);
nwc10 it's not *my* benchmark. It's the benchmark from either Rakudo or Parrot
pmichaud to have a 'return' in front of it, and see if it's slower. (The 'return' might be optimized out, but if not, we'd see a slowdown.) 15:11
nwc10: okay, I should say "run a modified fibonacci benchmark on nwc10++'s machine" :)
nwc10 "my" machine?
it's the hot backup perl 5 dev server :-) 15:12
pmichaud whatever machine you used to do the original run
I'd do it, but I don't have nqp-jvm on my system yet. (I plan to fix that this week, but won't have time this morning, sadly)
nwc10 why shouldn't I subvert things?
jnthn Hm, it is a slowdown. 15:13
pmichaud how much of one?
jnthn moment, need to get sane results
(my rough guess includes cross-comp time) 15:14
pmichaud I know that return handling in parrot is expensive. I don't know what it's like in jvm yet.
nwc10 [nicholas@dromedary nqp-jvm-prep]$ nqp nqp-jvm-cc.nqp ~/Perl/rakudo/nqp/examples/fib.nqp
fib(29) = 514229
time = 0.3899998664855957
[nicholas@dromedary nqp-jvm-prep]$ nqp nqp-jvm-cc.nqp ~/test/fib-return.nqpfib(29) = 514229
time = 0.8299999237060547
15:14 FROGGS left
nwc10 so, factor of 2 slowdown by adding a return 15:14
pmichaud okay, so that explains a tiny bit of slowdown but not a huge amount 15:15
nwc10 factor of 50 left :-(
jnthn 0.368 vs 1.95 in a "do 10 million calls" benchmark.
(e.g. while loop calling foo())
nwc10 factor of 20 left
jnthn Where foo is sub foo() { 1 } in the first case and sub foo() { return 1 } in the second. 15:16
nwc10 and here I was thinking that it was Perl 5 that was reckoned to have the lousy call overhead :-)
so I should call in Perl 6, and return in Perl 5?
pmichaud sounds waterbed-y :-) 15:17
geekosaur it took years for perl5 to lose the overhead of saying "return x" instead of just "x" :)
jnthn Well, this is kinda the cost of exceptions for stack unwinds, it seems.
geekosaur actually that's a lie; it took perl*3* years... 15:18
15:19 ObseLeTe joined
pmichaud I'm afk for likely the rest of the day; hopefully bbt 15:28
jnthn o/ pm 15:30
mls return handling in parrot is not really expensive 15:33
return handling in nqp/rakudo is expensive because you don't use the return continuation that already exists 15:34
I patched that a long time ago but you (pmichaud) didn't accept the patch... 15:35
masak pmichaud sometimes doesn't accept patches.
usually there's a very good reason having to do with the Rakudo architecture. 15:36
mls But then he shouldn't complain that return is slow ;)
masak speed is important, but not painting yourself into a corner design-wise is important, too. 15:37
if indeed that was the reason this time.
15:45 Gwyxx joined
TimToady uvtc: Um...I've been using date versioning on RC for the last several hundred examples or so... :) 15:47
and fixing other people's code to use dates too
15:49 kivutar left, brrt joined
uvtc TimToady: And I thought it'd been long enough that you should finally get some recognition! :) (Heh. I should probably do more digging before commenting.) 15:53
TimToady :) 15:56
masak: yes, though octal would be even better than hex 15:59
16:02 brrt left, perlhelp joined
perlhelp hi! 16:02
16:02 brrt joined 16:05 domidumont left 16:06 Gwyxx left
masak perlhelp: hi, welcome back :) 16:07
perlhelp how are yo?
masak within one standard deviation of my own peculiar little average. :) 16:09
masak .oO( yessss ) 16:10
moritz masak++ :-) 16:13
16:14 FROGGS joined, mehwork left
FROGGS jnthn / moritz: if you have time, can you look at gist.github.com/FROGGS/666966d963bb26011115 ? 16:22
jnthn / moritz: I'm trying to make this work: say "foobar" ~~ /@(<f ba o>)/ # "fooba" 16:23
16:24 ObseLeTe left
FROGGS err: say "foobar" ~~ /@(<f ba o>)+/ 16:24
16:27 thou joined 16:28 SamuraiJack_ left 16:35 Gwyxx joined 16:36 brrt left, sivoais left, Timbus left 16:38 am0c joined, sivoais joined, Timbus joined 16:39 perlhelp left 16:40 Gwyxx left 16:41 domidumont joined 16:48 sivoais left
moritz FROGGS: I'm out of my league there, and distracted. So I fear I won't be of much help right now 16:48
16:49 sivoais joined 16:56 hoelzro is now known as hoelzro|away 17:00 domidumont left
FROGGS moritz: no problem 17:04
17:07 daniel-s__ joined 17:10 daniel-s_ left 17:14 SunilJoshi joined 17:18 SunilJoshi left, SunilJoshi1 joined 17:22 Chillance joined 17:23 kaleem joined 17:36 spider-mario joined 17:38 kivutar joined 17:42 kivutar left 17:49 kaleem left
PerlJam FROGGS: should that work? 17:52
nwc10 (lack of) reuse of return continuations doesn't explain time differences on NQP-JVM, does it? 17:55
FROGGS PerlJam: well, It doesnt right now, but I hope it will in near future 17:58
atrodo if I run "make spectest" what should I expect? 17:59
should I expect all test successful?
moritz atrodo: yes
FROGGS nqp: my @a := <f o b>; say("foobar" ~~ /@a/); # like that
p6eval nqp: OUTPUT«f␤»
FROGGS nqp: my @a := <f o b>; say("foobar" ~~ /@a+/); # like that
p6eval nqp: OUTPUT«foob␤» 18:00
FROGGS nqp: my @a := <f o ba>; say("foobar" ~~ /@a/); # dunno if this should match "ba" though 18:01
p6eval nqp: OUTPUT«f␤»
18:03 daxim left 18:04 FROGGS left 18:07 FROGGS[mobile] joined
dalek rl6-roast-data: 045b7bd | coke++ | / (4 files):
today (automated commit)
18:11
rl6-roast-data: 962a2e1 | coke++ | / (3 files):
today (automated commit)
rl6-roast-data: 97fb2a9 | coke++ | / (4 files):
today (automated commit)
rl6-roast-data: 1f3451d | coke++ | / (4 files):
today (automated commit)
rl6-roast-data: e45dc6c | coke++ | / (3 files):
today (automated commit)
rl6-roast-data: 14ffcf0 | coke++ | / (4 files):
today (automated commit)
18:11 perlhelp joined
perlhelp hey! 18:11
[Coke] ... wow. apparently forgot to do that for a while.
Apologies. 18:12
PerlJam FROGGS: but /@(<...>)/ is different from /@a/ and I was wondering if the former should really work.
jnthn The thing that's hard about it is 'a' | @foo | \w+ 18:13
The things in @foo need to be folded into the NFA. 18:14
That's really darn hard.
18:14 wk joined
perlhelp hey y'alls :) 18:16
japhb masak, moritz: FWIW The LWP::* v. Mojo::* v. Some other HTTP framework issue is indeed what I was thinking of when I said LWP or modern equivalent.
masak japhb: ah. 18:17
japhb Also note that there is a *bunch* more work to be done in perl6-most-wanted. I've only really begun the task of groveling through source-data/* to fill in the most-wanted/*
18:18 zby_home_ joined
FROGGS[mobile] PerlJam: but @( ) should be an array contextualizer, no? so it should work just like @a 18:18
japhb Of course, anyone interested in helping with perl6-most-wanted is ... well, most wanted. :-) 18:20
I wonder if I should just push the repo to the Perl 6 org
PerlJam FROGGS[mobile]: I dunno ... I would expect the innards of @() to be arbitrary perl code (just like it can be outside of regex), and it feels weird to have code without {} (maybe I'm just too conservative on this point) 18:21
nwc10 the NQP version in Rakudo isn't new enough 18:24
I'm not sure what the correct answer is
FROGGS[mobile] n: say "foobar" ~~ /$( "foo" ~ "bar" )/
p6eval niecza v24-23-g0520c7c: OUTPUT«「foobar」␤␤»
nwc10 OK. c41c8f46da6b8062112774938e26ebb8bff963f6
given that c41c8f46da6b8062112774938e26ebb8bff963f6^ is the current
FROGGS[mobile] PerlJam: like that
PerlJam Does the spec actually mention $(), @(), and %() in regex, or are they just inferred? 18:26
FROGGS[mobile] PerlJam: you can put code in regexes using { } but it wont match, you have to use <{ }>. but how to tell it that it should be treated as array?
it is specced, yes 18:27
but I cant tell where right now
perlhelp is anybody fmlir with removing white space in perl 5?
PerlJam perlhelp: try #perl or #perlhelp or #perl-help on the varioius IRC networks. 18:28
perlhelp I cannot gt to #perl
or irc
masak perlhelp: it's not a good idea to keep asking Perl 5 questions here, even if people are friendly. 18:29
nwc10 this is so bad, #perl6 deserves it:
18:26 <@jjl> stop buying boloneighs?
masak perlhelp: frankly, if you can't get on an IRC where Perl 5 is on-topic, that's solely your problem.
perlhelp: and you should focus on solving it.
uvtc japhb: One thing which might benefit the p6mw (Perl 6 Most Wanted) is having indicators throughout which ... indicate (A) does the module need to be ported? (B) is it at modules.perl6.org? (C) has the module been made part of R*? (D) is someone currently working on it? If so, who? 18:33
[Coke] guys, what's a decent perl5 help channel? Perhaps we can hand perlhelp a URL to hit. 18:34
masak I hear good things about #perl-help on irc.perl.org 18:35
japhb uvtc, I was definitely planning that, for the phase of work after groveling through the source-data/ to produce raw lists of most-wanted/ stuff.
uvtc perlhelp: how about webchat.freenode.net/?channels=perl&nick= ?
Is there an "irc chat in your browser" for channels at irc.perl.org? 18:36
FROGGS[mobile] mibbit? 18:37
18:38 FROGGS joined
geekosaur www.irc.lc/magnet 18:39
uvtc japhb: I've recently heard about play-perl.org/welcome though have not tried it. Makes me wonder if that could be used for p6mw. 18:40
japhb uvtc, I'd certainly consider it, once p6mw is in better shape.
I expect p6mw is going to have some *long* lists. 18:41
uvtc geekosaur: Do you know if that web interface be used to access #perl-help at irc.perl.org?
japhb (Which is to say, until play-perl gets a little more populated, I'm not sure we want to just dump a huge list of quests into it.)
FROGGS jnthn: btw, this part already does work when hardcoding it: gist.github.com/FROGGS/666966d963b...pl-L28-L33 18:42
jnthn: I just need to do that at runtime :/
geekosaur uvtc: www.irc.lc/magnet/perl-help seems to work 18:43
uvtc perlhelp: ^^
18:45 SunilJoshi1 left
uvtc japhb: another idea: if you're interested in seeing what folks think are most wanted, what do you think of inviting them to add a checkmark or ✯ or something next to items they deem important? 18:45
FROGGS PerlJam: looks like I cant find a reliable source for @( ) inside a regex 18:47
18:48 EDWIN joined
FROGGS PerlJam: I believe rt.perl.org/rt3/Ticket/Display.html?id=115298 tricked me 18:50
though RT doesnt like me right now, cant open that page
phenny: ask TimToady what @( code ) is supposed to do inside regexes (if it should do anything at all)
phenny FROGGS: I'll pass that on when TimToady is around.
18:51 FROGGS left 18:52 sftp left
masak isn't @( code ) just a variable interpolation, following the same rules as @array? 18:54
18:55 proller joined
FROGGS[mobile] masak: exactly what i think 18:56
[Coke] play-perl is not yet ready for lists of things you want other people to touch. 18:58
it's (today) a list of things YOU are working on.
PerlJam (or want to work on) 18:59
[Coke] er, yah. but it's quests for you, not for others. (though the main dev has a quest to allow that to change.)
19:04 perlhelp left 19:06 b1rkh0ff left 19:16 benabik_ joined, benabik left, benabik_ is now known as benabik 19:21 Chillance left 19:22 autumn left, Chillance joined 19:23 Targen joined 19:24 Timbus left, sivoais left 19:26 MayDaniel joined
japhb uvtc, I'm wary of recreating (part of) play-perl's functionality outside of play-perl. But as [Coke]++ points out, play-perl isn't quite ready for p6mw, so we might want something like that in the interim. 19:27
uvtc japhb: another idea --- if you're looking for contributions from folks not on github --- is using the wiki. 19:28
FROGGS[mobile] what exactly is play-perl? 19:29
19:29 benabik left 19:30 benabik joined
PerlJam FROGGS: play-perl.org/ 19:30
people assert a "quest" that they want to work on. Others "vote" on that quest by liking it and they can comment on it.
japhb uvtc, The p6wm page on the wiki wasn't really cohesive and complete enough to help us figure out how to build Star (or some other distro release) in detail, so I don't think it's the way to go moving forward. But I did use it as a data source. 19:31
Besides, at this point you're at a huge disadvantage when contributing to the Perl 6 ecosystem without github access, so I'm (for now) just leaving it as assumed. 19:32
(Though of course people are willing to make suggestions other ways.)
s/willing/welcome/
19:32 fhelmberger left 19:33 am0c left 19:34 sftp joined
uvtc japhb: possibly of interest, Python has a "most wanted" poll at python.org (right side). 19:38
japhb The Python 3 poll? 19:39
uvtc Yes. 19:41
Seems like a Perl 6 analogue might serve to provide input to p6mw. 19:42
japhb Sure. I don't have the tuits to set that up (I'd rather concentrate on the data sources I already have first), but I'd be very happy to see someone set up something like that. 19:43
uvtc++ # lots of good ideas for p6wm 19:45
er p6mw
19:46 am0c joined
masak uvtc++ 19:46
uvtc :)
19:47 b1rkh0ff joined 19:55 bluescreen10 joined 20:05 thou left 20:07 dukeleto joined 20:18 benabik left 20:23 jdv79 left 20:26 fhelmberger joined 20:27 perlhelp joined 20:36 arnsholt left 20:40 arnsholt joined, zby_home_ left 20:41 arnsholt_ joined 20:42 arnsholt_ left 20:43 Timbus joined 20:51 ObseLeTe joined 21:02 wk left 21:08 kivutar joined
uvtc Ooh, ucfirst renamed to tc. Nice. 21:16
masak yeah. took a couple iterations :) 21:17
uvtc "Perl: Sanding down the rough edges"
And that's only *one* of my prospective entries in the Perl 6 slogan contest ... which has yet to be created. 21:19
masak "Perl: it knows which language you're currently parsing" 21:20
moritz r: for (42 => 24, a => 'b') -> $ (:$key) { say $key } 21:21
p6eval rakudo a3869a: OUTPUT«Unexpected named parameter 'value' passed in sub-signature␤current instr.: '' pc 178 ((file unknown):140617967) (/tmp/jk39jrEyGD:1)␤called from Sub '' pc 256091 (src/gen/CORE.setting.pir:116240) (src/gen/CORE.setting:5590)␤called from Sub 'reify' pc 255106 (src/gen…
moritz r: for (42 => 24, a => 'b') -> $ (:$key, *%) { say $key }
p6eval rakudo a3869a: OUTPUT«42␤a␤»
21:22 fhelmberger left 21:23 fhelmberger joined
uvtc r: my @a = <foo bar baz>; map {tc $_} @a; 21:26
p6eval rakudo a3869a: OUTPUT«===SORRY!===␤Two terms in a row␤at /tmp/SKB8aG7MJC:1␤------> my @a = <foo bar baz>; map {tc $_} ⏏@a;␤ expecting any of:␤ postfix␤ infix or meta-infix␤ infix stopper␤ statement end␤ statement…
uvtc r: my @a = <foo bar baz>; map {tc $_}, @a;
p6eval rakudo a3869a: OUTPUT«===SORRY!===␤Undeclared routine:␤ tc used at line 1. Did you mean '&lc', '&uc'?␤␤»
moritz rakudo doesn't implement tc yet :( 21:27
just tclc
uvtc r: my @a = <foo bar baz>; map {uc $_} @a;
p6eval rakudo a3869a: OUTPUT«===SORRY!===␤Two terms in a row␤at /tmp/c7_TcEnBEP:1␤------> my @a = <foo bar baz>; map {uc $_} ⏏@a;␤ expecting any of:␤ postfix␤ infix or meta-infix␤ infix stopper␤ statement end␤ statement…
uvtc r: my @a = <foo bar baz>; map {uc $_}, @a;
p6eval rakudo a3869a: ( no output )
moritz and you need to produce output with print or say
:-)
uvtc Oh, right. :)
21:28 fhelmberger left
uvtc r: my @a = <foo bar baz>; map {uc $_}, @a; say @a; 21:28
p6eval rakudo a3869a: OUTPUT«foo bar baz␤»
uvtc r: my @a = <foo bar baz>; @a = map {uc $_}, @a; say @a;
p6eval rakudo a3869a: OUTPUT«FOO BAR BAZ␤»
uvtc thanks
Needs the comma in Perl 6.
moritz though of course you can shorten it a bit 21:29
geekosaur also, ideally probably $_.uc
or even just .uc
moritz r: say map &uc, <foo bar baz>;
p6eval rakudo a3869a: OUTPUT«FOO BAR BAZ␤»
moritz r: say map &tclc, <foo bar baz>;
p6eval rakudo a3869a: OUTPUT«Foo Bar Baz␤»
moritz r: say map &tclc, <foo bar BAZ>;
p6eval rakudo a3869a: OUTPUT«Foo Bar Baz␤»
uvtc r: my @a = <foo bar baz>; map( s/a/A/, @a ); say @a; 21:31
p6eval rakudo a3869a: OUTPUT«No such method 'subst' for invocant of type 'Any'␤ in block at /tmp/pUdoYjPeUG:1␤␤»
uvtc r: my @a = <foo bar baz>; map( { s/a/A/ }, @a ); say @a;
p6eval rakudo a3869a: OUTPUT«foo bar baz␤»
uvtc Hm. Was expecting foo bAr bAz there.
swarley Woo, even more is getting done 21:32
uvtc In Perl 5, if I put an s/// inside a `map`, it modifies the items in the array. Does Perl 6 behave the same way?
moritz n: my @a = <foo bar baz>; map( { s/a/A/ }, @a ); say @a; 21:33
p6eval niecza v24-23-g0520c7c: OUTPUT«foo bAr bAz␤»
moritz uvtc: I think it's a bug in rakudo 21:34
masak submits rakudobug
moritz somwhere the rw-ness of $_ gets lost
uvtc Thanks!
colomon huh, I would have thought that was a nieczabug
swarley I can't help but wonder what I should do now, I have a feeling like I knew what I was going to do a minute ago
uvtc Why does s/// inside the `map` change the original array? Is it because that's what most commonly wanted in that situation? 21:35
colomon r: my @a = <foo bar baz>; say map( { s/a/A/ }, @a ); say @a;
p6eval rakudo a3869a: OUTPUT«foo bAr bAz␤foo bar baz␤»
masak it's because $_ is bound rw.
uvtc It would seem to me that if I want to change the array, I'd use a `for` loop. Whereas, `map` would be used exclusively for creating new arrays.
masak as in <-> $_ { ... }
moritz uvtc: map and for loops are really the same in Perl 6 21:36
uvtc Ah. Ok. Thanks.
moritz blug: perlgeek.de/blog-en/perl-6/2013-pat...ching.html 21:38
swarley paste.awesom.eu/epN starting to come together nicely :)
uvtc `uc $_` returns a new string. `s///` changes $_. What other Perl 6 functions change $_? 21:39
Hm. Warning: It's possible that question doesn't make sense. 21:40
moritz uvtc: I can't think of any. Usually you use .=method to modify the $_ variable
21:40 stopbit left
moritz uvtc: so you'd use .=uc as a shortcut for $_ = $_.uc or $_ = .uc 21:40
uvtc r: my @a = <foo bar baz>; map( {$_ .= uc }, @a ); say @a;
p6eval rakudo a3869a: OUTPUT«foo bar baz␤»
moritz stuff in Perl 6 is designed to seldomly update a variable, unless it's very explicit 21:41
oh, tr///, but that's NYI in rakudo
masak moritz++ # blug
moritz: one thing I learned recently-ish is that multi invocation is covariant (as opposed to only invocation, which is contravariant) 21:42
uvtc r: my @a = <foo bar baz>; map( {$_ = $_.uc }, @a ); say @a;
p6eval rakudo a3869a: OUTPUT«foo bar baz␤»
uvtc Hm.
21:43 imarcusthis left
masak hm, I did something nice with expression trees and subsignature pattern matching, IIRC... 21:43
moritz masak: if you find it, I'll link to it. 21:44
uvtc r: my @a = <foo bar baz>; map( { $_ = 'hi' }, @a ); say @a; 21:45
p6eval rakudo a3869a: OUTPUT«foo bar baz␤»
masak ah, here: gist.github.com/masak/ca5a82ae76951cc387cc 21:46
I like it. even 5 months later ;)
21:47 perlhelp left
uvtc Pfft. 21:47
21:47 imarcusthis joined
uvtc Oh. Wait. I don't think I meant that the way Bill meant that. 21:48
swarley: how is your port going? 21:51
n: my @a = <foo bar baz>; map( { $_ = 'hi' }, @a ); say @a; 21:53
p6eval niecza v24-23-g0520c7c: OUTPUT«hi hi hi␤»
uvtc Right. Same reason as pointed out above.
Thanks.
swarley uvtc; pretty good, I'm just about to work on adding in serialization before I go any further 21:54
uvtc swarley: looks like you're cruisin'. I haven't used Go. 21:56
moritz thinks this is an excellent excuse to learn go :-) 21:58
21:59 PacoAir left 22:00 alester joined 22:02 pmurias joined
swarley It's actually enjoyable to code in once you get past the initial stage 22:02
It is very helpful to have ++jnthn's nqp-jvm code as a reference however
moritz that's the feeling that several blog posts convey
but so far I lacked a project
swarley At first it's pretty terrible
moritz and without a project I simply cannot learn a language
swarley Because you get the feeling like you can't do anything with it
Because the standard library is all technical documentation and no examples 22:03
So you don't see anything in use
And it's not the easiest thing to search for
googling, "go maps"
not the most helpful
moritz :-) 22:04
swarley "golang maps" is a little more helpful, but still
This might be the most actual Go code I've done so far by the time I finish SerializationReader
So far it's mostly just a bunch of class declarations and throwing back errors 22:05
japhb moritz, typo '$x' in first code sample of blog 22:06
typo 'sigle' in first sub-signature intro paragraph 22:07
alester Howdy Parrot/Perl 6 folks: A general question from me as the Perlbuzz guy (and also Gabor as Perl Weekly guy by proxy). Is there anything I can help you with amidst all this turmoil about dead(?) projects and the future and blah blah blah? Messaging? Blog posts? Tweets? Is there something people should know about How Things Are Going that isn't getting out there? 22:08
japhb alester++ # for even asking
alester :-) Thanks.
japhb That's a very helpful offer.
22:09 ObseLeTe left
masak alester++ 22:09
alester You know I used to do TPF PR, right? But I figured I could get more done outside the constraints of TPF.
japhb I would believe that. :-)
alester What do people need to know? What does the death(?) of Parrot mean to Perl 6, for example?
japhb Oddly, declaring it dead has brought more life to it than I've seen in ages. 22:10
PerlJam heh, that's true
but that's probably just the "last gasp"
japhb Perhaps. It's still interesting how taking off the shackles and going "no sacred cows" as allison++ put it brought back a fair number of people who had lost interest previously. 22:11
masak alester: I don't perceive a lot of shock in here that Parrot is dying. 22:12
alester: it's been... in the air for a while.
alester I had no idea.
japhb It's not something we wanted to go shouting to the heavens.
alester The air that you and parrot share is a small room.
PerlJam yeah, I don't think the death of Parrot means much of anything to Perl 6 (Rakudo)
alester Why is that?
I thnk THAT is something that is worth saying.
japhb nqp is getting ported to a wide array of VMs, actively. 22:13
masak alester: the JVM port is coming along nicely.
alester: put it like this: why do you think it got started in the first place? :)
and the foundations for it got started *long* ago...
jnthn alester: Perl 6 hasn't been tied to Parrot for quite a while (see Pugs, Niecza). Rakudo is working towards running on the JVM and is architecturally in a better place than it's ever been.
uvtc PerlJam: From what I've seen on #parrot, it seems like more than a "last gasp".
japhb The most active public ports are JVM, JS, and Go.
22:13 Guest8979 is now known as ponbiki
alester jnthn: All of this is news to me. 22:14
the Perl 6 / Parrot disassociation.
And I'm guessing that the world in general doesn't know about it either.
masak alester: shouting it out earlier than this point would've been... bad. 22:15
alester: and now might still be a bit too early, I dunno.
japhb alester, There's very active work (almost entirely by jnthn++, who is also heading the JVM port) to make the last remaining parts of NQP that are still Parrot-bound completely VM-portable.
alester I don't think you need to talk about Parrot dying, but the move to JVM is pretty huge I'd think.
japhb I don't think most of us would even be saying this out loud now if not for the last week of storm in the inter-project-relations arena.
PerlJam japhb: probably 22:16
alester Maybe it's a good thing.
japhb
.oO( Someone tapped on the flask containing the super-saturated solution, and now there's massive precipitation afoot. )
22:17
jnthn alester: The important message I want people to hear is, "Rakudo is a compiler capable of targeting multiple backends". Just as GCC can target x86, Arm, etc. It's *not* about a move from Parrot to JVM, it's that the JVM is the first thing Rakudo will run on besides Parrot.
alester And that's a great message too. 22:18
Because unless I'm under a rock, nobody else knows that Perl 6 is aiming at JVM first.
masak getting the right message out there is tricky, even on days with good weather conditions.
alester I admit it's possible I've been sub-lithic lately.
masak: Understood, and I guess tha'ts part of what I'm offering. 22:19
jnthn I kinda don't want people to get the idea that Rakudo = Perl 6 on the JVM and that's all we intend it to be, that's all :)
alester Writing, strategy, whateve.r
PerlJam alester: Are you doing to draft a post or did you want one of us to?
masak alester: yes. 's cool.
alester PerlJam: I can't draft a post on my own because I don't know what to write.
But I would be more than happy to work/brainstorm w/you guys and write something as a draft.
To start some traction.
uvtc alester: my limited understanding is that it's not actually Rakudo per se being ported to other back-ends, but nqp. jnthn is currently working on nqp-jvm. I wonder if the one that works with parrot should be renamed nqp-parrot? 22:20
alester I also have the benefit of being from the outside.
uvtc jnthn: Please let me know if that's incorrect. :)
alester and so when you guys go "blah balh NQP" I can say "NQP needs an explanation" 22:21
Right now, you know what I see out there? Or at least in /r/perl on Reddit?
Muntz-level "HA HA HA"
masak alester: I have talked to people (at pre-conf pub evenings, and such) who are similarly not-involved-every-day. they have shown similar surprise at me saying that we're looking beyond Parrot.
pmichaud my @a = <foo bar baz>; for @a { s/a/A/ }; say @a # RT #116731 22:22
r: my @a = <foo bar baz>; for @a { s/a/A/ }; say @a # RT #116731
masak it seems to be something that's plain to us but not to people sufficiently outside.
p6eval rakudo a3869a: OUTPUT«foo bAr bAz␤»
alester Right. ANd I'm glad to be the Sufficiently Otuside.
22:22 grondilu joined
pmichaud looks to me as though there's something wrong with .map 22:22
or map as a function call, or *@slurpy argument handling 22:23
since the block is correctly getting the rw-ness of $_
pmichaud reads backscroll
geekosaur don't we already know map has an issue with that?
pmichaud well, since 'for' uses 'map' internally, it's not exactly a problem with "map", or there's something more subtle going on 22:24
18:13 <jnthn> The thing that's hard about it is 'a' | @foo | \w+ 22:27
18:14 <jnthn> The things in @foo need to be folded into the NFA.
jnthn: only if @foo is a constant at compile-time
(unless the spec changed again)
masak no, I don't think it changed. 22:28
jnthn Ah...
masak does that mean that there are two code paths for something like that?
jnthn So what does it really mean
a | @a | \w+
Is really
alester So does anyone want to take this ball?
jnthn a | \w+ || @a
alester Or should I just leave it with "I'm here for you guys"
pmichaud jnthn: I don't know... the spec doesn't quite say what to do there 22:29
22:29 thou joined
pmichaud although the spec actually says "external longest token matching", which might mean that it's LTM internally to the regex, but not externally to other regexes 22:30
so it might still need to be put into the NFA engine
masak alester: hm, here's a draft: "Perl 6 is doing fine. Rakudo is targeting the JVM, and has been for quite a while. If anything, the work towards targeting the JVM is going better than expected. (See jnthn's posts.)"
pmichaud S05:1296 22:31
reading backscroll some more
jnthn *working towards targetting
Otherwise it sounds like "we're there already"
jnthn is trying to make that the case :)
alester masak: That's a start. And then I'll need to talk with someone who knows what's what for me to ask the questions that I need to write the rest.
uvtc jnthn: do you like the idea of having nqp-jvm, nqp-this, nqp-that? Is that the idea for supporting multiple backends?
japhb masak, That leaves out the key part that it's not merely a conversion to JVM, it's a portability play, with JVM being the second target (after parrot), and leading the effort to root out portability problems. 22:32
alester "See jnthn's posts" isn't useful because The General Public won't grok them.
masak alester: I'll be going to bed soon. I'll be here tomorrow, though.
alester k
masak japhb: aye. good feedback, thanks.
japhb And the JS and Go efforts are taking advantage of the portability-rooting from jnthn's JVM-port work.
masak all of these things need to be explained well in a post.
I'd be happy to flesh it out in a gist... tomorrow.
jnthn uvtc: I'm expecting large parts of the NQP code-base will be shared amongst them. 22:33
FROGGS[mobile] and careful
PerlJam masak: I may write a little something tonight and see where it leads me.
PerlJam afk &
alester masak: Tell ya what. Let me start with what you have and come up with questions that I think need to be answered for it. 22:34
and then we can go from there tomorrow.
What's yr email?
jnthn away for a bit
pmichaud will also help with the "Perl 6 on multi-vm post"
japhb alester: can we keep it in gist or something with an URL, so we on the channel can comment too?
pmichaud gist +1 22:35
alester That's fine, and I still need to tell you "OK, I've got my first draft"
of questions.
japhb nodnod
masak privmsg'd alester his email 22:39
yes, I will throw things up as a gist when we get far enough.
22:40 jdv79 joined
jdv79 does SUPER, or something like it, work in a method that comes from a role? 22:41
alester masak: Why hide your email from the channel? 22:42
Doesn't everone know you're [email@hidden.address]
masak jdv79: no, because methods flatten into the class.
jdv79: so there's no such relationship between the role and the class.
jdv79: there is, however, if you mix in the role.
alester: :P
(everyone else: please don't spam whoever has that address) :P 22:43
alester Come on, fess up, your'e still 4359,382@compuserve.com
masak too young for compuserve, I'm afraid.
jdv79 so if i mix role R1 into class C2 which is a subclass of C1 calling SUPER in a method in R1 will call the copy in C1? 22:44
pmichaud had a compu$erve account, once.
jdv79: ENOSUPER
alester I had an AOL account, but only to pick the ladieez.
22:44 kaare_ left
japhb I remember feeling snobby as a Compuserve user about that upstart AOL. 22:44
pmichaud jdv79: there's not really a SUPER in Perl 6 22:45
FROGGS[mobile] pmichaud: was it nextsame?
jdv79 i don't know the model at all - just wanted to know if one could do something like that 22:46
pmichaud nextsame dispatches to the next candidate using the same arguments
22:46 MayDaniel left
pmichaud but yes, nextsame, callsame, nextwith, callwith, etc. are the typical "dispatch to the next level" calls 22:46
FROGGS[mobile] so that might do the trick
k
22:47 spider-mario left
jdv79 thanks 22:47
doc'd somewhere?
pmichaud jdv79: S06, probably
masak r: class C { method foo { say "hi from the class!" }; role R { method foo { say "hi from the role!"; nextsame } }; (C.new but R).foo
p6eval rakudo a3869a: OUTPUT«===SORRY!===␤Unable to parse expression in block; couldn't find final '}'␤at /tmp/tn1drQ4vS3:1␤------> role!"; nextsame } }; (C.new but R).foo⏏<EOL>␤ expecting any of:␤ method arguments␤ postfix␤ infix o…
masak oh. 22:48
r: class C { method foo { say "hi from the class!" } }; role R { method foo { say "hi from the role!"; nextsame } }; (C.new but R).foo
22:48 sivoais joined
p6eval rakudo a3869a: OUTPUT«hi from the role!␤hi from the class!␤» 22:48
pmichaud alester/masak: as a datapoint, it might be worth recalling that NQP has had multi-vm backend as one of its goals since 2009.
jdv79 nice
masak jdv79: this is all explained in S12.
jdv79 thanks
masak pmichaud: that's good to know. thanks.
pmichaud: was there anything in particular in 2009 that made that a goal for NQP? 22:49
pmichaud Yes.
but I'm not sure that part is good to air publicly. :-/
swarley Oh my lord, this is a lot of repetitive typing
pmichaud I think I can dig up the announcement, though. 22:50
masak oh, I think I remember that bit now.
swarley pastebin.com/nHHZ8vXc 22:51
pmichaud well, it might be easier to point to the time we switched from nqp-rx to nqp
which I think was jan 2011 22:52
22:54 pmurias left
masak 'night, #perl6 22:55
pmichaud feb 2011 had the README change that explicitly identified multi backend
github.com/perl6/nqp/commit/4933c8...2f8a#L0R81
22:56 Chillance left
japhb o/ masak 22:57
swarley bah. I'm not sure how to even test that these work yet 23:05
23:05 dakkar left 23:08 bluescreen10 left
jnthn back for a bit 23:11
colomon \o 23:12
sorear o/ 23:19
23:19 kivutar left 23:20 Rix left 23:29 krunen left 23:34 Rix joined, autumn joined 23:37 thou left 23:38 FROGGS[mobile] left 23:43 perlhelp_ joined
perlhelp_ 2 Easy Perl 5 Questions. Anybody can help? 23:44
gry perlhelp_: /msg apeiron, get back in that channel please :) 23:46
perlhelp_: oh, and you are already back etc etc, good 23:48
perlhelp_ yes! 23:49
I don't know how or why!
But I am also scared to post there.
gry it's ok, just give much details and folks would help you 23:50
perlhelp_ details of whta?
gry of everything you got: code, what you want, what it does, what you tried to solve the problem, why it didn't work 23:51