»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg camelia perl6: ... | irclog: irc.perl6.org | UTF-8 is our friend! Set by sorear on 25 June 2013. |
|||
00:02
Radvendii left
00:31
stevan_ left
00:32
stevan_ joined
|
|||
timotimo | i'm now comparing run times for my brownian tree among jakudo and parakudo. even though those are both heavily RNG-dependent in run time, perhaps there will be a huge difference? i should probably run them at least thrice each, but they take upwards of 5 minutes | 00:36 | |
i'll get memory usage stats from them, though, which is nice. | |||
00:36
btyler left
00:37
betterworld left
00:43
betterworld joined
|
|||
timotimo | okay, the parrot version has now been running for 15 minutes, whereas the jvm version only took 6 | 00:48 | |
5:25 vs 18:07, but interestingly parakudo only took 0.5x the memory; it's probably some "start with a gig of ram allocated" flag in the jvm-rakudo launch script? | 00:51 | ||
no, it is not. it starts with 100m. | 00:52 | ||
that's kinda crazy :| | |||
timotimo runs a less random-influenced bit of code | 00:53 | ||
on my galton box code (pretty console-output-heavy), the jvm version takes 1 second longer, uses almost 2x as much ram. | 00:54 | ||
when taking out the actual output, but not the creation of the parts of the string that's to be output, as well as upping the loop count by a third, the jvm beats parrot 25 seconds to 28.6; takes almost 2x as much ram again, though. | 00:57 | ||
00:58
lue left
00:59
betterworld left
|
|||
[Coke] | labster: rt id? | 01:02 | |
01:02
TimToady left,
berekuk_ joined,
TimToady joined,
xilo joined
|
|||
timotimo | ah yes. galton box with 40 coins instead of 30 gives me 28s for jvm and 38s for parrot | 01:02 | |
01:03
Shozan joined
01:04
scottp_ joined,
ugexe_ joined
|
|||
timotimo | 31s vs 49s at 50 coins, interesting. | 01:04 | |
01:04
betterworld joined
|
|||
timotimo plots | 01:04 | ||
01:05
gabriel_ joined,
itz_ joined,
Kelder joined
|
|||
[Coke] | timotimo: are you using the eval server? | 01:07 | |
01:07
simcop2387_ joined,
FROGGS_ joined
|
|||
timotimo | no | 01:09 | |
but the loops are inside the script | |||
so there's only one warmup and one startup for the jvm | 01:10 | ||
01:10
PZt left,
imarcusthis- left,
lue joined,
_jaldhar joined,
berekuk left,
ugexe left,
scottp left,
Ayiko left,
SHODAN left,
simcop2387_ is now known as simcop2387
01:11
xilo left,
FROGGS left,
berekuk_ left,
jaldhar left,
sitaktif left,
genehack left,
mangala left,
genehack joined,
imarcusthis- joined
01:12
mangala joined,
jfried left
|
|||
colomon | hmmm, nap-jvm passes make test under my new OS X. | 01:12 | |
timotimo | with increasing coin count, jvm approaches and perhaps even surpasses 2x as fast | ||
timotimo runs 200 coins | 01:13 | ||
01:13
jfried joined,
ruoso_ left
01:14
TimToady left,
ruoso joined,
TimToady joined
|
|||
timotimo | jvm is 1s faster for 200 coins than parrot is for 100 coins :) | 01:15 | |
01:16
Pleiades` left
01:17
betterworld left,
sitaktif joined
01:18
masak left,
masak joined
01:19
xilo joined
|
|||
timotimo | imgur.com/16DfDbh - super scientific! | 01:20 | |
01:20
xilo_ joined
|
|||
colomon | and rakudo-jvm passes its tests! \o/ | 01:20 | |
timotimo | (lack of axis labels makesit even more scientific!) | ||
01:20
Pleiades` joined
|
|||
benabik | Parrot is beating the JVM! Yay! | 01:21 | |
It has bigger numbers. Bigger is better. ;-) | 01:22 | ||
timotimo | benabik: unfortunately, Y is "seconds taken, less is better" | ||
benabik | timotimo: I know. | ||
colomon | not if you're trying to warm your house with the exhaust from your computer! | ||
timotimo | ;) | ||
colomon actually did that (by accident) back ten or so years ago | 01:25 | ||
timotimo wonders what the time-of-implementation on slurp and MAIN will turn out to be | 01:26 | ||
colomon | I'd be surprised if slurp took long at all | 01:28 | |
dunno what will be involved with MAIN | 01:29 | ||
01:30
betterworld joined
|
|||
timotimo | "Callframe is NYI" | 01:31 | |
01:33
stevan_ left
01:34
stevan_ joined
01:37
_jaldhar left
|
|||
[Coke] | several spectests are blocked on that failure | 01:37 | |
01:42
SamuraiJack_ joined
01:43
btyler joined
01:45
berekuk joined
|
|||
labster | [Coke]: it's labster, unsurprisingly. | 01:46 | |
01:56
SamuraiJack_ left
01:57
SamuraiJack joined
|
|||
[Coke] | done | 02:11 | |
timotimo | wait ... done what? | ||
dalek | kudo/nom: c83b634 | (Solomon Foster)++ | src/core/Str.pm: Switch from sprintf to p6 interpolation. Don't use sprintf (which doesn't work well yet in JVM) for something we can do with good old interpolation. |
02:14 | |
labster | rt.perl.org/rt3/Ticket/Display.html?id=118545 Resolved my first ticket! | 02:15 | |
colomon | \o/ | 02:16 | |
timotimo | good! :) | 02:17 | |
02:17
_jaldhar joined
|
|||
timotimo | ah, that's what you've done i suppose | 02:19 | |
good * #perl6! | |||
labster | hi timotimo | 02:24 | |
JimmyZ | Good morning, #perl6 | 02:32 | |
colomon | o/ | 02:33 | |
02:53
prevost joined
|
|||
TimToady | I have some good news: my PSA reading is off the low end of the scale, so looks like I don't need any radiation or chemo, at least for now | 02:55 | |
now I just have to keep it that way for five years or so... | 02:56 | ||
I realize this increases my chances of being run over by a bus... :) | 02:58 | ||
colomon | \o/ | 03:01 | |
(well, not the bus bit.) | |||
That's great news! | 03:03 | ||
03:08
salv0 left
03:10
ugexe_ is now known as ugexe
03:11
atroxaper joined
|
|||
dalek | d: 85cf51d | larry++ | STD.pm6: simplify message on undef (also revert =:= patch) |
03:14 | |
03:14
btyler left
|
|||
labster | oh, that's really good news. (that 0.1mm)++ | 03:18 | |
03:20
benabik left
|
|||
TimToady | well, there could still be a singular cell or two that will eventually be bad news, but the odds seem to be in my favor at the moment | 03:20 | |
course, it's still 50/50 :) | |||
or 100/0 | 03:21 | ||
or 0/100 | |||
but I'm pretty happy tonight :) | |||
03:25
salv0 joined
|
|||
sorear | good * #perl6 | 03:34 | |
yoleaux | 2 Jul 2013 18:37Z <raiph> sorear: is niecza's gather/take lazy? | ||
2 Jul 2013 22:23Z <raiph> sorear: is niecza's gather/take batched, or 100% lazy? | |||
sorear | .tell raiph I have never heard of a perl6 implementation without 100% lazy gather/take. Your questions are weird. | 03:35 | |
yoleaux | sorear: I'll pass your message to raiph. | ||
03:37
PZt joined
03:38
gdey joined
03:40
gdey left,
gdey joined
03:49
preflex_ joined,
ChanServ sets mode: +v preflex_,
preflex left,
preflex_ is now known as preflex
03:51
Chillance left
03:56
jeffreykegler joined
|
|||
jeffreykegler | Just popped in to say how that I am very happy to hear Larry's good news | 03:57 | |
TimToady | :) | 04:00 | |
04:00
mtk left
|
|||
PerlJam | TimToady: What's the good news? (I'm on vacation and have been away from the internet for several days) | 04:08 | |
TimToady: Are you one of the lucky 12% or whatever it was from your talk? | |||
ah ... (just read the scrollback) Congrats TimToady!! | 04:09 | ||
04:10
jeffreykegler left
|
|||
sorear | Congrats! | 04:10 | |
04:15
benabik joined
04:17
BenGoldberg left
04:22
arlinius left
|
|||
Woodi | hallo | 04:36 | |
sorear | o/ Woodi | 04:37 | |
Woodi | TimToady: it's St. Paul dillema but all will be good :) | ||
TimToady | well, St Paul was a much better apostle to the gentiles than I've been to the hackers, but I feel privileged to have had the opportunity to try :) | 04:39 | |
04:43
fridim__ joined
04:46
birdwindupbird joined
04:50
telex left
04:51
telex joined
04:53
xinming left
04:55
prevost left,
xinming joined
|
|||
sorear | what is St Paul's dilemma? my ddg-fu is failing me | 04:58 | |
Woodi | sorear: St. Paul was apostole and he for some time expected to be sentenced to dr | 05:00 | |
...to death. | |||
but he belived that haven is better place so he wanted go there but staying HERE was good work for him and for others :) | 05:01 | ||
so we realy hope TimToady will help us with all that specifications :) | 05:02 | ||
TimToady | www.biblegateway.com/passage/?searc...ersion=NIV is the specific passage in question | 05:04 | |
Woodi | r: sub basket( Str $f ) { my %fruits = ('apples', '4'); return %fruits{ $f } }; say basket( 'noexiranges' ); | 05:05 | |
camelia | rakudo c83b63: OUTPUT«(Any)» | ||
Woodi | Any not Nil returned ? | ||
TimToady | well, Any is the default default, but lizmat++ is working on the ability to set other defaults | 05:07 | |
Woodi | but Nil means "there is no value here"... | 05:08 | |
05:08
prevost joined
|
|||
TimToady | well, but a default means "assume this value is there if there isn't one" :) | 05:09 | |
arguably Nil would be a good default default too | 05:10 | ||
05:11
fgomez joined
|
|||
TimToady | at the moment, however, we're leaning away from letting you put such "concepts" into array elements by default | 05:11 | |
so we limit elements to type Any for now | 05:12 | ||
(by default | |||
) | |||
05:13
fridim__ is now known as fridim_
|
|||
Woodi | r: sub basket( Str $f ) returns Int { my %fruits = ('apples', '4'); return %fruits{ $f } }; say basket( 'noexiranges' ); | 05:18 | |
camelia | rakudo c83b63: OUTPUT«Type check failed for return value; expected 'Int' but got 'Any' in sub basket at /tmp/9M8i3Wf8kE:1 in block at /tmp/9M8i3Wf8kE:1» | ||
05:25
xinming left,
raiph left,
xinming joined
|
|||
moritz | \o | 05:31 | |
sorear | o/ moritz | ||
05:33
FROGGS_ left
05:42
prevost left,
fgomez left
05:49
xinming left
05:50
konundra left
|
|||
FROGGS[mobile] | o/ | 05:52 | |
05:52
xinming joined
05:53
Shozan left
05:55
SHODAN joined
06:01
xilo_ left
|
|||
dalek | p: 56f116f | sorear++ | src/vm/jvm/runtime/org/perl6/nqp/ (5 files): Add a JavaWrap representation and associated code |
06:04 | |
p: 32c67cd | sorear++ | src/vm/jvm/QAST/Compiler.nqp: stub jvmbootinterop access |
|||
06:05
ecocode joined
06:12
PacoAir joined
06:14
FROGGS joined
06:16
havenwood joined
06:19
ztt joined
06:25
iSlug joined
06:30
PacoAir left
06:32
kaleem joined
07:01
Rotwang joined,
Rotwang left,
Rotwang joined,
GlitchMr joined
07:05
ztt left
07:20
dmol joined
07:32
domidumont joined
07:34
domidumont left
07:36
iSlug left
07:39
havenwood left
07:44
Rotwang left
07:56
woosley joined
|
|||
woosley | rakudo: my $a = [1,2,4]; $a.delete(1);say $a; say $a.elems | 07:56 | |
camelia | rakudo c83b63: OUTPUT«1 Nil 43» | ||
woosley | r: my $a = [1,2,4]; $a.delete(2);say $a; say $a.elems | 07:57 | |
camelia | rakudo c83b63: OUTPUT«1 22» | ||
FROGGS | use splice if you want to remove from the middle | 07:58 | |
r: my $a = [1,2,4]; $a.splice(1,1); say $a; say $a.elems | |||
camelia | rakudo c83b63: OUTPUT«1 42» | ||
woosley | ah, I thought I could always delete at every position | 07:59 | |
Woodi | aren't delete for hashes only ? | 08:07 | |
08:08
dayangkun left,
dayangkun joined
|
|||
moritz | github.com/blog/1547-release-your-software # looks like this might be interesting for rakudo and star releases | 08:10 | |
08:11
grondilu joined,
markov left
|
|||
grondilu | "CallCapture representation does not implement cloning" | 08:11 | |
^ while trying to compile rakudo on JVM | 08:12 | ||
in (src/gen/BOOTSTRAP.nqp:1072) | |||
<-- $capture := nqp::clone($capture); | 08:14 | ||
paste.siduction.org/20130703081552 <- full error log | 08:16 | ||
08:25
markov joined
08:31
dakkar joined
|
|||
mathw | Good morning! | 08:40 | |
dalek | kudo/nom: c929f04 | (Brent Laabs)++ | / (4 files): Add IO::Spec::QNX to make Unix more efficient to penalize every other unix with extra operations in canonpath. Plus it was never tested on qnx so it didn't even work... now fixed Seriously, what bozo implemented this in the first place? |
08:43 | |
kudo/nom: 827bcc4 | (Brent Laabs)++ | src/core/IO (2 files): Implement :parent for path cleanup (except Win). Add IO::Path::QNX IO::Path::Unix and IO::Spec::Unix -- which magically makes Cygwin and QNX work too. Physical cleanup (resolve) still NYI. |
|||
kudo/nom: 174bf4f | (Brent Laabs)++ | / (7 files): Merge branch 'nom' of github.com:rakudo/rakudo into nom |
|||
labster | good morning, * | 08:44 | |
mathw | hi labster | ||
08:45
cognominal joined
|
|||
masak | good morning, #perl6 | 08:46 | |
moritz | \o | 08:47 | |
mathw | \o/ | 08:50 | |
masak | labster: have you discovered the full awesomeness of rebasing? they help reduce the number of zero-info merges like that last one. | 08:54 | |
labster | apparently not :P | 08:55 | |
masak | labster: in this particular case, it'd have been a question of 'git pull --rebase' instead of just 'git pull'. | ||
nwc10 | would be nice if github discovred the full awesomeness of rebasing too | ||
timotimo | TimToady: (good news)++ | 08:56 | |
masak | labster: and if you notice that the pull actually did a merge, you can quickly get back to pre-pull by doing 'git reset --hard HEAD{1}' and then do the 'git pull --rebase' | ||
mathw likes rebasing | |||
masak | labster: or, even better if you ask me, 'git config --global --add merge.ff=only' and then pull will refuse to add merges | 08:57 | |
mathw uses rebasing more often than is healthy | |||
labster | sweet. will do so from now on. | ||
masak | TimToady: I'm very relieved about the news. here's to a long life, though maybe not as long as TheDamian suggests ;) | ||
colomon | masak: my git required that be 'git config --global --add merge.ff only' | 08:58 | |
but definitely masak++ if that works! | 08:59 | ||
09:01
xinming left
|
|||
dalek | ecs: 2a08d8c | (Brent Laabs)++ | S99-glossary.pod: [S99] define thinko, request MRO |
09:01 | |
09:01
fhelmberger joined
09:02
xinming joined
|
|||
masak | oh, ok. yeah, sorry, I wrote that from memory :) | 09:03 | |
it definitely works, to the point that it prevents you from doing local merges too if they produce a merge commit! | 09:04 | ||
colomon | just went and added it to my linux box, too. | 09:06 | |
09:10
daxim joined
|
|||
mathw | I had a weird thing with git the other day, where 'git commit -a' didn't add any new files, but I'm sure that's what it's supposed to do. Am I wrong? | 09:10 | |
09:10
dmol1 joined,
dmol left
|
|||
hoelzro | git commit -a doesn't add new files | 09:10 | |
it commits all changes in any files already being tracked | 09:11 | ||
git add -A will find new files | |||
mathw | I'm wrong. Good. | 09:12 | |
I wouldn't like to think they'd changed something like that. | |||
timotimo | "one of the major changes in this new git release is that mathw is no longer wrong"; < mathw> oh damn it! | 09:13 | |
mathw | immortality in git release notes | 09:14 | |
I could live with that | |||
masak read that as "immutability" and went, "well, duh" | 09:17 | ||
jnthn | morning o/ | ||
nwc10 | jnthn++ # bloggage | ||
jnthn | grondilu: It means your NQP build is out of date. | ||
mathw | jnthn: nice interview | ||
jnthn | grondilu: For now, NQP HEAD is always assumed for Rakudo on JVM. | 09:18 | |
masak | I really like how the model of git shows how immutable objects (commits) can be useful in a way that mutable objects can't. and how you're still not restricted in any significant way. | ||
JimmyZ | TimToady: good news | ||
jnthn | TimToady: Happy to hear the good news \o/ | ||
mathw | masak: I'm writing Haskell again. Immutability rocks. | 09:19 | |
JimmyZ | jnthn++ # blog and interview | ||
masak | mathw: yes. but it's not just Haskell. I do a fair bit of immutability in my Perl 6 code. | 09:21 | |
jnthn | Immutability is one of the unchanging goodnesses. :) | ||
colomon | There are some good uses in p6 for mutability, though. I find myself making most, but definitely not all, classes immutable. | 09:22 | |
masak .oO( "immutability was good, is good, and will stay good until the end of time, forever and ever. amen." ) | |||
yes, there are definitely good uses for mutability. | 09:23 | ||
mathw | it's nice to have a lagnuage that supports immutability | ||
it's one of the things that annoys me about C# | |||
masak | I guess the point is that immutability subsumes it. you can fake mutability with immutability, but not really the other way around. and that's an interesting result because you'd expect kinda the opposite. | ||
mathw | I can make an immutable class, but I can't make a method that declares "I will not mutate 'this'" | ||
etc. etc. | 09:24 | ||
jnthn | mathw: One of the simplest things they could do is provide "let" outside of linq expressions. | ||
mathw | and immutability in C# is a convention, not something you can declare in the type system | ||
jnthn | mathw: So you have a way to do single static assignment and the reader can know, "this thing won't be updated". Granted it'd only be "skin deep", but still... :) | ||
mathw | yeah it'd be nice | ||
it's something I miss from C++ | |||
jnthn | Should be easy too. :) | ||
mathw | really need to write some C++ again, after I've finished with my writing some Haskell again thing | 09:25 | |
jnthn has managed to escape C++ so far. :) | |||
mathw | I do find myself using a lot of readonly member variables in C# | ||
but that just means you can't change the reference | |||
jnthn | The C++ teacher at $dayjob has told me some horror stories, though. :) | ||
mathw | the object itself can be mutated however it supports | ||
heh there is some serious evil in C++ | |||
but I want to write something using all the new C++11 shiny move semantics and smart pointers and things | |||
nwc10 | have the C++ compilers caught up yet? | 09:26 | |
JimmyZ doesn't want to touch C++ | |||
colomon | gcc has, I think | 09:27 | |
mathw | g++ has support for most of it | 09:29 | |
09:29
domidumont joined
|
|||
mathw | including some of the really scary stuff like variadic templates | 09:29 | |
I haven't really tried to comprehend those yet | |||
btw jnthn awesome work on Rakudo/JVM | 09:30 | ||
jnthn | It's not just me :) | 09:32 | |
mathw | yeah but you're the person I know to point the finger at because you blogged it | 09:34 | |
everyone else who contributed: awesome work on Rakudo/JVM | |||
nwc10 | I blame TimToady. He started it, after all. | ||
mathw | I'm looking forward to deliberately constructing a project that requires me to use Perl 6 to call a library written in Clojure | 09:35 | |
Because it's bound to be fiddly and awkward but it'll be awesome to see it work | |||
JimmyZ | mathw: This's the start? github.com/perl6/nqp/commit/32c67c...bfd8addc63 | 09:44 | |
masak .oO( "interop ops"... "Bootstrap's bootstraps"... ) | |||
tadzik | I see what you did there | 09:48 | |
jnthn | :P | ||
JimmyZ: Yes, that looks to me very much like a start on Java object interop :) | 09:49 | ||
tadzik | now I feel like some Hans Zimmer | ||
timotimo | .o( Hansi Hinterzimmer, tee hee ) | 09:50 | |
09:51
cognominal left
09:55
cognominal joined
|
|||
woosley | what is the method to check if a element is in an Array in Perl 6? | 09:58 | |
masak | r: my @a = 1, [2, 3], 4; say $_ ~~ Array for @a | 09:59 | |
camelia | rakudo 174bf4: OUTPUT«FalseTrueFalse» | ||
masak | oh! *in* an array. sorry. | ||
jnthn | mathw: in! | ||
timotimo | hehe | ||
jnthn | oops, masak | ||
masak | r: my @a = 1, [2, 3], 4; say so 4 ~~ any(@a) | ||
camelia | rakudo 174bf4: OUTPUT«True» | ||
timotimo | r: my @a = <a b c foo dog>; say any(@a) eq "dog"; | ||
camelia | rakudo 174bf4: OUTPUT«any(False, False, False, False, True)» | ||
timotimo | yeah | ||
JimmyZ | :D | ||
timotimo | should have so'd that | ||
jnthn | You so shoulda | 10:00 | |
masak | you so should... damn :) | ||
JimmyZ decommutes | |||
mathw | JimmyZ: jnthn: that's why I love #perl6. | 10:03 | |
wish I had time to contribute :( | |||
Other stuff to do first | |||
10:03
domidumont left
|
|||
mathw | along with $dayjob and teaching small children to beat each other up | 10:03 | |
10:03
crab2313 joined
10:04
domidumont joined
|
|||
colomon | woosley: alternatively, | 10:04 | |
r: my @a = <a b c foo dog>; say "dog" (elem) @a; | 10:05 | ||
camelia | rakudo 174bf4: OUTPUT«True» | ||
colomon | more elegantly (but doesn't work on Rakudo) | ||
n: my @a = <a b c foo dog>; say "dog" ∈ @a; | |||
camelia | niecza v24-86-g39ab531: OUTPUT«True» | ||
masak | \o/ | ||
10:05
cognominal left
|
|||
woosley | crazy stuff !! | 10:05 | |
masak | that's a really neat fall-out side effect of set ops :) | ||
hadn't thought of that. colomon++ | 10:06 | ||
colomon | no idea whether this is more efficient than so any(@a) eq "dog", mind you | ||
masak | "efficient"? hahaha :) | ||
jnthn | If it constructs a set, possibly not. | ||
If it's optimized to skip that, maybe it's faster. | |||
colomon | it definitely constructs a set | ||
jnthn | OK, then it's probably slower. :) | ||
masak | maybe some far-future optimizer could efficientize it. | ||
jnthn | Why does everyone assume optimizer stuff has to be in the far future? :) | 10:07 | |
masak | that's just the Baysean prior since it's never happened yet :) | ||
jnthn | :P | ||
colomon | jnthn: at the speed you work, everyone assumes the far future is sometime next year? ;) | ||
jnthn | :P | ||
masak | ok, that is now officially my favorite way to check array membership. | ||
mathw | mine too | ||
masak | n: my %h = 1..6; say 3 ∈ %h; say 4 ∈ %h | 10:08 | |
jnthn | I wonder if Rakudo on JVM is free of the epic parsing slowdown that happens if we use operators in the setting that are outside of Latin-1... | ||
camelia | niecza v24-86-g39ab531: OUTPUT«TrueFalse» | ||
jnthn | It really should be. | ||
mathw | well, to find out you first need to make it capable of compiling the setting | 10:09 | |
simple, right? a morning's work? :) | |||
jnthn | It's been capable of that for ages. :) | ||
colomon | masak: as you probably realize, if you construct a Set from a hash, it uses the keys only | ||
jnthn | "ages" :) | ||
mathw | five minutes? | ||
jnthn | Reached compiling most of the setting around late May. Of course, most of that compiled output didn't actually work :P | 10:10 | |
woosley | r: my @a=[1,3,4]; say @a.push(<a b>); say @a[-1] | ||
camelia | rakudo 174bf4: OUTPUT«1 3 4 a bCannot use negative index -1 on Array in method gist at src/gen/CORE.setting:10476 in method gist at src/gen/CORE.setting:913 in sub say at src/gen/CORE.setting:11377 in block at /tmp/JIpQo3Ar0X:1» | ||
jnthn | *-1 | ||
colomon | r: my @a=[1,3,4]; say @a.push(<a b>); say @a[*-1] | ||
camelia | rakudo 174bf4: OUTPUT«1 3 4 a bb» | ||
masak | colomon: right. | ||
woosley | this syntax is a bit strange | 10:11 | |
masak | what syntax? | 10:12 | |
woosley | *-1 | ||
colomon | r: my @a=[1,3,4]; say @a.push(<a b>); say @a[*/2] | ||
camelia | rakudo 174bf4: OUTPUT«1 3 4 a ba» | ||
masak | woosley: -1 didn't work in the rest of the design in Perl 6. | ||
woosley: -1 means "the index minus one" in Perl 6, not "one from the end". | |||
woosley: I think you'd agree that's at least more consistent :P | |||
jnthn | s/index/elems/ | 10:13 | |
Note that *-1 is more general syntax | |||
r: my $x = *-1; say $x(3) | |||
camelia | rakudo 174bf4: OUTPUT«2» | ||
jnthn | And so is passing a closure to an indexer | ||
woosley | Ah, I think I get it, and suddenly it looks beautiful :) | ||
jnthn | r: my @a = 1..5; say @a[-> $elems { $elems - 2 }] | ||
camelia | rakudo 174bf4: OUTPUT«4» | ||
10:15
atroxaper left
|
|||
masak | jnthn: no, "-1" in a .[] in Perl 6 means "the *index* [that is] minus one" | 10:15 | |
woosley | r: say [1,2,['a', 'b']] | ||
camelia | rakudo 174bf4: OUTPUT«1 2 a b» | ||
jnthn | masak: oh, I thought you were talking about what gets passed to the closure...sorry. | ||
masak | right. | 10:16 | |
no, I was talking about the reasons it can't be "-1" in Perl 6. | |||
when someone says "*-1" is ugly, you have to start by explaining why "-1" won't cut it. | |||
woosley | wondering why the output is flattened? expecting something like 1,2, ["a", "b"] | ||
masak | woosley: no, then that'd be "[1, 2, [a, b]]" | 10:17 | |
timotimo | because it gistifies when you call say on it | ||
r: print [1,2,['a', 'b']] | |||
camelia | rakudo 174bf4: OUTPUT«1 2 a b» | ||
timotimo | r: print [1,2,['a', 'b']].perl | ||
camelia | rakudo 174bf4: OUTPUT«[1, 2, ["a", "b"]]» | ||
masak | woosley: because what timotimo said. arrays don't generally have a printed output, that'd be terribly distracting in most output. | ||
woosley: "what are those brackets doing in my salary report! get them outta there right away!" | |||
woosley | \o/ | 10:18 | |
masak | it's like printing a string doesn't usually surround the printed string with "" quotes ;) | ||
same thing. | |||
woosley | well, I have to say for string you will not get an "string inside string", but for a list, there is "list inside list". | 10:22 | |
mathw | this is true | 10:23 | |
10:24
cognominal joined
|
|||
jnthn | Well, it's easy to write something that will dump with your desired structure | 10:24 | |
r: multi d(@a) { '(' ~ @a.map(&d) ~ ')' }; multi d($x) { $x }; say d [1, 2, [3, 4, [5]]] | 10:26 | ||
camelia | rakudo 174bf4: OUTPUT«(1 2 (3 4 (5)))» | ||
10:27
cognominal left
10:28
cognominal joined
10:42
stevan_ left
10:43
woosley left
|
|||
lizmat | good *, #perl6! | 10:44 | |
r: say 1.uniq # should this work? | |||
camelia | rakudo 174bf4: OUTPUT«1» | ||
moritz | yes | ||
jnthn | *, lizmat. Yes, scalars can happily pun as a single element list on demand. :) | 10:45 | |
lizmat then adapts some tests in uniq.t | |||
10:46
mtk joined
10:58
domidumont left
|
|||
dalek | ast: abe3272 | (Elizabeth Mattijsen)++ | S32-list/uniq.t: cleanup in "uniq" tests |
10:59 | |
ast: 9885e8d | (Elizabeth Mattijsen)++ | S32-list/squish.t: Copy of "uniq" tests for "squish" |
|||
grondilu | jnthn: I still get "CallCapture representation does not implement cloning", and yet I'm pretty sure I have the latest nqp (2013.06) | 11:03 | |
jnthn | grondilu: I meant latest as in, HEAD of the NQP repo | 11:04 | |
tadzik | heh, python's range() doesn't work for strings. Maybe they should have strange() | ||
jnthn | :D | ||
grondilu | I don't know git very well, do you mean I must run "git pull origin HEAD" in the nqp directory? | 11:05 | |
dalek | ast: 98b0260 | (Elizabeth Mattijsen)++ | S32-list/squish.t: Transmogrified "uniq" tests to "squish" |
11:06 | |
jnthn | git checkout master && git pull # should do it | 11:07 | |
dalek | kudo/nom: f069282 | (Elizabeth Mattijsen)++ | / (3 files): Implement squish() and .squish(), as per S32/Containers |
11:08 | |
lizmat | .oO{ one less LHF } | ||
11:09
crab2313 left
|
|||
colomon goes to look in S32-containers.... | 11:09 | ||
lizmat | it was pretty much a no-brainer | 11:10 | |
with "uniq" as the template :-) | |||
colomon | why @secret? | ||
lizmat | to make sure that the first test *never* matches | 11:12 | |
Mu / Any / Nil would not work, if the first element would be Mu / Any / Nil | |||
@secret can never be the first element, as it is secret :-) | 11:15 | ||
colomon | r: sub colomon-squish(@a) { my $last; gather sink for @a { FIRST { $last = $_; next; }; take $_ if $_ !=== $last; $last = $_; }; say colomon-squish(<a a b c d d a e>) | ||
camelia | rakudo 174bf4: OUTPUT«===SORRY!===Unable to parse expression in block; couldn't find final '}'at /tmp/INkPTn4EAR:1------> }; say colomon-squish(<a a b c d d a e>)⏏<EOL> expecting any of: postfix statement end statement … | ||
colomon | r: sub colomon-squish(@a) { my $last; gather sink for @a { FIRST { $last = $_; next; }; take $_ if $_ !=== $last; $last = $_; };}; say colomon-squish(<a a b c d d a e>) | ||
camelia | rakudo 174bf4: OUTPUT«b c d a e» | ||
11:16
pmurias joined
|
|||
lizmat | huh? | 11:16 | |
rakudobug? | |||
colomon | no, colomonbug | 11:17 | |
pmurias | what does localifetime do? | ||
colomon | r: sub colomon-squish(@a) { my $last; gather sink for @a { FIRST { take $_; $last = $_; next; }; take $_ if $_ !=== $last; $last = $_; };}; say colomon-squish(<a a b c d d a e>) | ||
camelia | rakudo 174bf4: OUTPUT«===SORRY!===Two terms in a rowat /tmp/wJT4zzUqqp:1------> or @a { FIRST { take $_; $last = $_; nex⏏t; }; take $_ if $_ !=== $last; $last = expecting any of: argument list postfix infix stopper … | ||
colomon | that might be a rakudo bug? but I've got to run to the car dealership to get my VW's breaks worked on. | 11:18 | |
11:19
arnsholt joined,
FROGGS[mobile] left
11:20
mstefanko left
|
|||
arnsholt | jnthn: Is it ok to add non-op functions to Ops.java, or should I factor those into a separate static class for native-related code reuse? | 11:20 | |
jnthn | arnsholt: Ops.java is getting kinda big. I'd put 'em elsewhere. Note that we can register nqp:: things that point to other classes too :) | 11:22 | |
arnsholt | Oh, right. I'll just put all the NativeCall things in a separate class, in that case | 11:23 | |
Relatedly, how does box_target stuff work on JVM? | 11:24 | ||
pmurias | jnthn: what doe localifetime do? | ||
arnsholt | On Parrot, we call box_funcs->get_boxed_ref to get the NativeCall thing, but I can't find an obvious counterpart to that on JVM | ||
11:25
mstefanko joined
|
|||
colomon | arnsholt: There's been a single failing test in NativeCall under parakudo for the last couple of weeks. Of course, that breaks at least a dozen other modules in the ecosystem. Any chance you could take a look at that sometime? | 11:27 | |
afk # to bay city | 11:29 | ||
11:29
colomon left
|
|||
arnsholt | *grumblegrumble* | 11:30 | |
Could you submit an issue on it? | |||
lizmat | jnthn: I guess phasers don't work yet when src/core/List is added to settings ? | 11:36 | |
rewrite of squish using FIRST and NEXT fails with gist.github.com/lizmat/5917225 | 11:41 | ||
it works fine if written like that in another module on an installed rakudo | |||
so I guess we can't use phasers that early in the game, right? | 11:42 | ||
jnthn | pmurias: Not sure exactly, but you can ignore it and just compile the 0th child of the node and things work. It's purely an optimization. | ||
lizmat: No, don't use phasers in the setting, aside from BEGIN... | |||
11:43
Radvendii joined
|
|||
lizmat | too bad… :-) I guess we're back to using @secret to skip the first check | 11:43 | |
jnthn | I don't know exactly why it doesn't work, but I don't much care for making it do so either. It'll most likely be slower than the alternatives. | ||
arnsholt: There's no direct equivalent of that yet | |||
lizmat | I thought "method squish() { my $last; gather sink for @.list { FIRST next; take $_ if $_ !=== $last; NEXT $last = $_ } } was rather elegant, colomon++ for inspiration | 11:44 | |
arnsholt | Right. I'll leave that as a stub, then | 11:45 | |
jnthn | lizmat: Yes, but when you're writing CORE.setting elegance is NOT your first priority!! | 11:49 | |
Your priority is "implement this so it'll be efficient". | 11:50 | ||
11:50
pmurias left
|
|||
jnthn | Using gather/take in the setting when it's not needed is a huge performance no-no. | 11:50 | |
lizmat | well, I was just replicating what "uniq" was doing, really | ||
so you'd rather just have it do a map ? | |||
jnthn | Yes, well, maybe uniq could benefit from some speedup too ;-) | ||
lizmat: Yes :) | 11:51 | ||
lizmat | ok, will do | ||
jnthn | lizmat++ | ||
lizmat | grep actually, of course :-) | 11:53 | |
11:56
arnsholt left
|
|||
jnthn | :) | 11:57 | |
JimmyZ | Good evening | 11:58 | |
11:58
woosley1 joined
12:02
Radvendii left
12:07
stevan_ joined
12:08
colomon joined
|
|||
colomon | o/ | 12:09 | |
12:11
skids left
|
|||
dalek | kudo/nom: d2ee950 | (Elizabeth Mattijsen)++ | src/core/List.pm: Streamline "uniq" and "squish", suggested by jnthn++ See irclog.perlgeek.de/perl6/2013-07-03#i_7284148 |
12:12 | |
colomon | grep makes sense with uniq, but it makes my head hurt for squish | ||
ooo, code! | |||
arg, VW dealership wi-fi will not let me look at github. | |||
solution: use my phone. ;) | |||
lizmat | colomon: basically "grep { $grepped = $_ !=== $last; $last = $_; $grepped }, @.list;" | 12:13 | |
colomon | lizmat: oh, I can imagine it, I just think grep with side-effects borders on abomination. ;) | ||
lizmat | "[13:50:01] <jnthn> Your priority is "implement this so it'll be efficient"." | 12:14 | |
colomon | Yes, I saw (in backlog) | ||
12:15
chayin joined,
chayin_ left
|
|||
jnthn | Well, grep is really just a nice way to write a loop and an if statement ;) | 12:16 | |
lizmat | but there is no performance penalty, I would hope? | ||
jnthn | Should be pretty efficient. | ||
Better than gather/take :) | 12:17 | ||
lizmat | pick / roll also use gather / take | ||
optimize? | 12:18 | ||
colomon | can you, there? | 12:19 | |
those have to be lazy | |||
and they're not returning elements in order | |||
12:19
stevan_ left
|
|||
lizmat keeps her hands off pick / roll :-) | 12:20 | ||
JimmyZ | gather mostly meanst it's lazy | ||
*means | |||
colomon is having a hard time getting used to using irssi this morning. | 12:21 | ||
lizmat | "method pop() is rw" is rw, does that make sense? I mean, this is about using .pop as a left value, no? | 12:22 | |
JimmyZ | r: (1..60000000000000000000).pick.say | 12:23 | |
camelia | rakudo f06928: OUTPUT«48815951219828953769» | ||
JimmyZ | it's fast! | ||
colomon | lizmat: method pop changes the array it's called on, right? | ||
tadzik | I optimized that :) | ||
may have been my first contribution | |||
JimmyZ | :P | ||
tadzik | I was furious that (1..100).pick was a bottleneck of my toy program | 12:24 | |
colomon | tadzik++ | ||
12:25
atroxaper joined
|
|||
colomon | rn: say "this is A test".tclc | 12:25 | |
camelia | rakudo f06928, niecza v24-86-g39ab531: OUTPUT«This is a test» | ||
colomon | when do we get a camelia for jakudo? | ||
p6eval, I mean | |||
JimmyZ | r: (1..60000000000000000000).pick(10).say | 12:26 | |
camelia | rakudo f06928: OUTPUT«28487812125826846065 41742209814531995164 53207098133441548403 18843020627099168440 31025068939550976321 35864436322923804035 16164864358354258087 39209912430275720740 56666890291364813086 40325031511429966569» | ||
tadzik | rakudo-jvm: say 1 | ||
not sure if doesn't exist, or just slow | |||
lizmat | r: my @a=1,2,3; @a.pop = 4; say @a | ||
camelia | rakudo f06928: OUTPUT«1 2» | ||
jnthn | Doesn't exist, afaik | ||
masak | no, don't think it does. | 12:27 | |
lizmat | r: my @a=1,2,3; my $b = @a.pop = 4; say @a; say $b | ||
camelia | rakudo f06928: OUTPUT«1 24» | ||
lizmat | I guess it makes *some* kind of sense | ||
but it feels more like an error to me that remains silent | 12:28 | ||
colomon | lizmat: insane and wrong in my book | ||
masak | correct in my book, but for obscure reasons. | ||
it's the container/decont thing. | 12:29 | ||
lizmat | S12:564 says: Methods (and subs) may be declared as lvalues with C<is rw>. | 12:31 | |
pop() is not an lvalue? | 12:32 | ||
masak | I'm trying to think of a reason .pop *should* be lvalue and not rvalue. | ||
haven't found any yet. but that doesn't mean there isn't one. | |||
my suggestion: make it an rvalue and see if any spectests fail. | |||
lizmat is already running spectest with pop() without "is rw" | |||
colomon | seems like it is a thinko for "pop modifies the method it is called on" | ||
lizmat | back in ~ 7 minutes | 12:33 | |
colomon wonders if it might be one of his own mistakes from years ago... | |||
12:33
pmurias joined
|
|||
masak | lizmat++ | 12:33 | |
colomon | lizmat++ indeed! | ||
I'm looking at wordcase. tclc works, so it seems like it must be subst or matching that isn't working? | 12:36 | ||
anyone have a notion what / [<:L> \w* ] +% <['\-]> / is supposed to do? | 12:42 | ||
12:43
cognominal left,
cognominal joined
|
|||
masak | yes. | 12:48 | |
the fact that '+%' is a confusing way to write two operators aside... | |||
it means this: "a letter followed by zero or more word characters (letter, digit, underscore). make that into a group. accept one or more of that group, separated by single apostrophes or dashes." | 12:49 | ||
colomon | "accept one or more of that group" is completely unnecessary, no? | 12:50 | |
moritz | no | ||
not with the delimiter | |||
colomon | moritz++ | 12:51 | |
moritz | [<:L> \w*] matches 'A222' for example | ||
repetition + delimiter make it also match A222-Bx'c3 | |||
colomon | the capitalize.t tests are thoroughly insufficient to test this stuff, as far as I can see. | 12:52 | |
colomon replaced that whole mess with w+ and it passes the same tests as the other one does. | 12:53 | ||
moritz | <:L> doesn't match digits and _ | 12:54 | |
yes, the tests aren't that thorough | |||
colomon | moritz: no, I understand that. and I mean the entire regex, so that internal - and ' weren't allowed any more. | 12:55 | |
No tests failed. | |||
[<:L> \w*]+ % <[ \- ' ]> doesn't actually work on JVM | |||
dunno why | |||
nor [<:L> \w* ] +% <['\-]> | 12:56 | ||
well, I can guess it might be the :L? | |||
moritz | you can easily check that | 12:58 | |
colomon | just did, and it is | ||
moritz | unicode properties might win us a few houndred to a few thousand tests :-) | 13:00 | |
jnthn | We already have them besides the derived. | ||
colomon | huh | 13:01 | |
> "a" ~~ / <:L> / | |||
「a」 | |||
now I'm really confused | |||
> "this is a test".subst(:g, / [<:L> \w*]+ % <[ \- ' ]> /, "---") | 13:02 | ||
dalek | p: c8a6c01 | (Pawel Murias)++ | docs/serialization_format.markdown: Document what a variant 12 means in the serialization format. |
||
colomon | this is a test | ||
masak | I'm confused too. | ||
pmurias hopes he didn't break rakudo with his nqp commit ;) | |||
13:03
xinming left,
konundra joined
13:04
xinming joined
|
|||
FROGGS | pmurias: I'm running the stresstest just to be sure :P | 13:04 | |
colomon | I am completely mystified by this | ||
... and I cannot post gists here at the dealership. :( | |||
oh! | 13:05 | ||
> "this is a test" ~~ / [<:L> \w*]+ % <[ \- ' ]> / | |||
「t」 | |||
[Coke] | minor update to gist.github.com/coke/5879701 which includes some commits from yesterday. | ||
colomon | rn: say "this is a test" ~~ / [<:L> \w*]+ % <[ \- ' ]> / | ||
camelia | rakudo f06928, niecza v24-86-g39ab531: OUTPUT«「this」» | 13:06 | |
lizmat | seems .pop needs to be "is rw" because of unshift | ||
colomon | lizmat: huh? | 13:07 | |
lizmat | while @elems { nqp::unshift($!items, @elems.pop) } | ||
apparently the pushed element is not rw | |||
13:07
benabik left
|
|||
lizmat | *unshifter | 13:07 | |
RT #69548 | 13:08 | ||
masak | lizmat: that... feels like a weird reason. | 13:09 | |
colomon | what masak said | ||
masak | lizmat: my initial reaction is that that's not pop's fault. it's the fault of whatever happens before you pass the thing into unshift. | ||
colomon | > "this is a test" ~~ / <:L> \w+ / | 13:10 | |
Nil | |||
> "this is a test" ~~ / <:L> \w* / | |||
「t」 | |||
rn: say "this is a test" ~~ / <:L> \w+ / | |||
lizmat | oddly enough, I get some todo's passed with this change | ||
camelia | rakudo f06928, niecza v24-86-g39ab531: OUTPUT«「this」» | ||
masak isn't sure whether to submit a rakudobug :/ | |||
colomon | jnthn: ^^^^^ | ||
13:11
PacoAir joined,
not_gerd joined
|
|||
not_gerd | o/ | 13:11 | |
FROGGS: gist.github.com/FROGGS/836912b4855...ent-855950 | 13:12 | ||
jnthn | colomon: uh...wow, wtf... :) | ||
Nice golf. | |||
masak | colomon++ | ||
lizmat | r: sub MAIN( $a = nosuchsub()) { }; sub USAGE { say 42 } | 13:15 | |
camelia | rakudo d2ee95: OUTPUT«===SORRY!===Cannot assign a non-Perl 6 value to a Perl 6 container» | ||
jnthn | wat | 13:16 | |
masak submits rakudobug | |||
lizmat | not sure if this is .pop is rw related | 13:17 | |
FROGGS | not_gerd: I answered :o) | 13:18 | |
masak tests locally | |||
lizmat: I can't reproduce your bug here. | |||
but I have an old rakudo. pulling and rebuilding. | |||
someone else is free to test locally, too. | |||
13:19
ajr joined
|
|||
lizmat | this is probably just noise | 13:19 | |
13:19
ajr is now known as Guest86710
|
|||
lizmat | remaking without .pop change, and testing again | 13:19 | |
masak | who wants to release the Rakudo compiler in August? | 13:20 | |
I'll make the usual trade -- if someone claims August, I will claim September :) | |||
not_gerd | FROGGS: I've got a patch ready that does +1/shift/-1 that passes your test | ||
moritz | masak: ok, I'll do August | ||
not_gerd | shall I push that? | ||
masak | moritz: shall I add you, or are you already on it? | 13:22 | |
lizmat | t/spec/S06-other/main-usage.t fails, test #3 | ||
apparently caused by something committed already | 13:23 | ||
FROGGS | not_gerd: push if it does not break spectests | ||
dalek | kudo/nom: 5230d5a | masak++ | docs/release_guide.pod: [docs/release_guide.pod] add moritz and me for Aug/Sep |
13:24 | |
masak | moritz++ | ||
lizmat | rerunning full spectest, just to be sure | ||
13:25
Chillance joined
|
|||
lizmat | r: Module.new | 13:27 | |
camelia | rakudo d2ee95: OUTPUT«===SORRY!===Cannot assign a non-Perl 6 value to a Perl 6 container» | ||
lizmat | huh? | ||
did I break that? | |||
FROGGS | lizmat: locally I get: "undeclared name Module used" | 13:28 | |
but my rakudo is about 6 hours old | |||
This is perl6 version 2013.06-111-g54b7dd5 built on parrot 5.5.0 revision RELEASE_5_5_0 | 13:29 | ||
lizmat | so it must have been something I did | ||
not_gerd | Is it just me, or has Rakudo/Parrot performance regressed since March? | ||
FROGGS | ohh, mine is a day old | 13:30 | |
lizmat | yup, it is my uniq/grep optimization that makes things fail | 13:32 | |
13:33
kaare_ joined
|
|||
not_gerd | yep, there's a massive slowdown in stage parse... | 13:33 | |
lizmat | that could be because there is more code to parse ? | ||
13:34
Guest86710 is now known as ajr_
|
|||
[Coke] | not_gerd: is this during the build of ./perl6, or running arbitrary code? | 13:34 | |
FROGGS | yes, like IO::Spec and several other things | ||
not_gerd | [Coke]: both | ||
CORE.setting from ~100s to 140s | |||
a test script I use to keep track of this went from 1.3s to 2s | 13:35 | ||
moritz | that's not good :( | ||
13:35
bluescreen10 joined
|
|||
not_gerd | note that I don't know yet if it's a change in Parrot or Rakudo that's responsible | 13:36 | |
heck, I even updated my gcc since then ;) | |||
lizmat hopes it's not her hash/array slice adverb code that's to blame | |||
jnthn | So much has happened since March, it could be a combination of many things rather than any one big thing. | 13:37 | |
For compile time, it's also possible it's a change in NQP too. | 13:38 | ||
moritz finds it hilarious and sad that bugs.otrs.org is powered by bugzilla, not otrs | 13:39 | ||
tadzik | bootstraping problem? :P | ||
13:40
estrabd joined,
colomon left
|
|||
moritz | hardly | 13:40 | |
nwc10 | moritz: that's, just, um, what's the point of the product then? | 13:46 | |
it's a pretty good "we don't think our product is good enough" anti-advert | 13:47 | ||
moritz | nwc10: aye | ||
dalek | kudo/nom: ce8b5f6 | (Elizabeth Mattijsen)++ | src/core/List.pm: Restore "uniq" to unstreamlined form, it messes up odd things |
13:48 | |
13:49
skids joined
|
|||
lizmat | afk for a few hours& | 13:50 | |
dalek | : 2965c89 | (Tobias Leich)++ | / (2 files): fixed warn/die, added directive "s" to pack/unpack |
13:58 | |
: 8105c22 | (Tobias Leich)++ | rakudo.patch: update rakudo-patch |
|||
14:05
btyler joined
|
|||
masak | lizmat: with Poznan-128-g5230d5a, I get your error locally. | 14:05 | |
ah, but there's a new commit ;) | |||
14:09
fridim_ left
14:23
colomon joined
14:28
xilo_ joined
|
|||
dalek | p: bfe5c17 | (Gerhard R)++ | src/vm/parrot/ops/nqp_bigint.ops: Simplify conversion from sign-manitude to two's complement in nqp_bigint_shr() |
14:29 | |
14:33
rindolf joined
14:36
kaleem left
|
|||
Util | rn: my %b = z => 26; my $b = %b; my @a = $b; say @a.perl; | 14:41 | |
camelia | niecza v24-86-g39ab531: OUTPUT«[{"z" => 26}].list» | ||
..rakudo ce8b5f: OUTPUT«Array.new({"z" => 26})» | |||
Util | rn: my %b = z => 26; my @a = item %b; say @a.perl; | ||
camelia | rakudo ce8b5f: OUTPUT«Array.new("z" => 26)» | 14:42 | |
..niecza v24-86-g39ab531: OUTPUT«[{"z" => 26}].list» | |||
Util | I expect the output to be identical. In Niecza, they match, but in Rakudo, item() is unwinding the hash into its .pairs . | ||
Is this a bug in Rakudo, or am I misunderstanding the C<item> contextualizer? | |||
moritz | rakudobug | 14:43 | |
(and known by RT) | 14:44 | ||
14:44
birdwindupbird left
|
|||
Util | moritz: Thanks | 14:45 | |
moritz | (and fixes would be very welcome indeed) | 14:46 | |
r: my %h = (z => 26); my $s = %h; my @a = $s; say @a.perl | 14:47 | ||
camelia | rakudo ce8b5f: OUTPUT«Array.new({"z" => 26})» | ||
moritz | oh, I think the problem might be that this | ||
r: sub f(*@a) { say @a.perl }; f my % = a => 2 | 14:48 | ||
camelia | rakudo ce8b5f: OUTPUT«Array.new("a" => 2)» | ||
moritz | I wonder if sub item can simply have the signature \a or so | ||
14:53
FROGGS left,
woosley1 left
14:59
xilo_ left
15:00
notjack joined
|
|||
colomon | hmmm, zavolaj is failing very badly on OS X | 15:13 | |
15:16
pmurias left
|
|||
masak | thought you were gonna say it's failing very badly on the JVM... :) | 15:16 | |
15:17
not_gerd left
15:19
ecocode left
|
|||
colomon | nope, that's parakudo | 15:25 | |
wouldn't be surprised if it has something to do with changing the compiler and OS version yesterday, mind you. | 15:27 | ||
15:28
SamuraiJack left
|
|||
geekosaur | OS version will definitely break stuff | 15:29 | |
15:29
vk joined
|
|||
colomon | ugh, issues building parakudo from scratch :\ | 15:35 | |
15:37
dmol1 left
|
|||
dalek | kudo-js: 964b229 | (Pawel Murias)++ | src/QAST/Compiler/JavaScript.nqp: Insert vim folds into the output for easier debugging of the compiler. |
15:37 | |
kudo-js: a4dbf65 | (Pawel Murias)++ | src/QAST/Compiler/JavaScript.nqp: Igonre localife time |
|||
kudo-js: 4437535 | (Pawel Murias)++ | runtime/serialization.js: Fix typo in comment. |
|||
kudo-js: 3c0edb1 | (Pawel Murias)++ | runtime/serialization.js: Remove dead code. |
|||
15:38
stevan_ joined
|
|||
colomon | how did perlbrew get in /opt/local ?!? | 15:41 | |
15:43
stevan_ left
15:46
benabik joined
|
|||
colomon | installed new perlbrew, hopefully actually local to my user id; now installing new perl on it. | 15:48 | |
pmichaud | TimToady++ # excellent news from the test results. | 15:52 | |
lizmat | is that public already? | 15:53 | |
pmichaud | I saw it in the scrollback, I believe | ||
moritz | irclog.perlgeek.de/perl6/2013-07-03#i_7283130 | ||
15:53
daxim left
|
|||
moritz | aye, TimToady++ | 15:53 | |
lizmat | indeed, must catch up on today's backlog | 15:54 | |
indeed, TimToady++ | 15:58 | ||
TimToady | well, it's not like I did anything, other than believe the doctor when he said "You have to have that out ASAP." | 16:04 | |
16:07
fhelmberger left
|
|||
TimToady wonders if we'd still have Steve Jobs if he'd let the doctors treat him earlier... | 16:07 | ||
timotimo | many people who are opposed to the kind of treatment he got are - or at least seem to be - certain of that | 16:09 | |
16:11
kaleem joined,
grondilu left
|
|||
TimToady | I can guarantee to you that certainty is overrated. | 16:13 | |
timotimo | for sure. | ||
colomon made the mistake of clicking the new "All My Files" in Finder hoping it was the way to get to his home directory. It's now trying to (slowly) build a convenient list of all 1,000,000+ files on my system. How clever, Apple! | 16:17 | ||
16:18
kaleem left
|
|||
TimToady | timotimo: anyway, in my experience, the quacks err on the side of certainty much more often than the non-quacks | 16:27 | |
timotimo | they are probably all very, very convinced in the magical-healing-ability-du-joure(sp?) of their ... thing | 16:28 | |
TimToady | but alas, the medical profession is not the only profession in which people peddle certainty to people who crave certainty | ||
16:29
xilo_ joined
|
|||
timotimo | when somebody needs a cure and there is apparently none (yet), they'll turn to anything that gives them hope and i certainly can't blame them. | 16:29 | |
also, i don't feel i should continue talking about this; i've never had anything remotely life-threatening happen to me afaict | 16:30 | ||
TimToady | sure, people will spend fortunes on slim chances, though usually we call this a gambling addiction | 16:34 | |
timotimo | hadn't thought of it that way | ||
16:34
vk left
|
|||
timotimo | but i'd really rather blame the quacks than those who get tricked by them | 16:34 | |
i suppose - without having any clue how it actually feels - that such life threatening situations can very well blow any last bit of capability for rational thought out of one's head | 16:35 | ||
TimToady | there are far too many people in the world who are willing to collect blood money, and who work very hard to convince themselves that they aren't | 16:36 | |
well, I suppose this is all rather OT here, where we only have the best of intentions :) | 16:38 | ||
perigrin | timotimo: you're also arguing that rational thought is possible in a system riddled with unknowns. | ||
timotimo | perigrin: to me, it seems like a not completely unimportant piece of the puzzle is vastly overestimating the powers of things that science deems "not yet fully understood" | ||
perigrin | science vastly overestimates what it understands quite a lot of the time. | 16:39 | |
this is why it's constantly surprising and amazing. | |||
And disappointing to many. | |||
timotimo | "asian wasabi-coated nuts are not fully understood by science! so it's only sensible to believe this guy who claims it can cure baldness when snorted!" | ||
TimToady | yes, but science also believes in falsifying itself when necessary | ||
perigrin | TimToady: yeah, it sucks but not as much as all the alternatives I think is a fair description of my relationship with science. :) | 16:40 | |
timotimo | i think i need only point at the success of the anti-vaccination crowd to make clear that even if science is sufficiently sure about something, that doesn't matter to people who are scared. | ||
TimToady | "Fear is the mind-killer." | ||
timotimo | i think the instinctive drowning response or what it's called is a good example of "fear is the mind-killer", but it may be too literal ;) | 16:41 | |
perigrin | Science isn't sufficiently sure about the thing they're afraid of though. | 16:42 | |
timotimo | right, but that doesn't excuse going off into the craziest directions in the name of "hope that science is fundamentally wrong about moon light" | ||
but yeah, this is OT and we're all nice people who don't, at all, work on a secret healing product that's supposed to cure us and others of all ills ;) | 16:43 | ||
well, i suppose at least we're not charging people obscene amounts of money | |||
perigrin | speak for yourself, I'm a consultant. | ||
timotimo | :D | ||
perigrin | (one who probably should charge more though) | 16:44 | |
16:46
ajr_ left
16:52
dakkar left
16:55
denny joined,
denny left
17:10
atroxaper left,
notjack left
17:11
FROGGS[mobile] joined
17:13
vk joined
|
|||
sorear | o/ in passing | 17:14 | |
17:19
spider-mario joined
|
|||
lizmat | sorear! | 17:20 | |
colomon | \o | 17:22 | |
17:22
pmurias joined
17:24
arnsholt joined
17:25
Moukeddar joined,
Moukeddar left
17:28
ajr joined,
ajr is now known as Guest66657
|
|||
pmurias | pmichaud: I got confused and thought the parrot weekly report was due by today instead of yesterday :( | 17:29 | |
s/parrot/gsoc/ | 17:30 | ||
arnsholt | Looks like my IRC machine should be more or less back now \o/ | ||
colomon | \o/ | 17:32 | |
arnsholt: I should have said that the zavolaj bug I reported doesn't look to be a crazy c-side one. It's something going wrong on the p6 side. | |||
arnsholt | Oh, goody! | 17:33 | |
That should make it a bit easier to nail down | |||
Thanks for the issue, I'll look into it as soon as I can | |||
Somewhat relatedly, have any people found any good workflows for having a working Parrot Rakudo while also hacking on the JVM stuff? | 17:34 | ||
17:34
Guest66657 is now known as ajr_,
not_gerd joined
|
|||
colomon | arnsholt: I've just made separate rakudo and rakudo-jvm directories on my Linux box. | 17:34 | |
arnsholt | Makes sense, I guess | 17:35 | |
colomon | It's less than perfect, though, because you can't easily spectest changes on both without pushing to github. | ||
so I guess maybe I haven't found a good workflow. | 17:36 | ||
17:37
berekuk left
|
|||
colomon | And I have yet to successfully build both parakudo and jakudo my OS X box at the same time. :\ | 17:37 | |
jnthn | You can always have a local bare copy of the repos and clone from those, then you can push between 'em. | ||
17:38
snoopy left
|
|||
jnthn | Then push up to github when ready | 17:38 | |
not_gerd | what's the etiquette for adding test files that fail in Niecza due to lack of native types? | ||
do I need to add some magic comments to gist.github.com/gerdr/5920705 ? | |||
colomon | well, it's nice to fudge them: #?niecza skip "Native types NYI" | ||
TimToady | well, that one is a bit more complicated | 17:39 | |
needs a multipler on the check routine | |||
*plier | |||
arnsholt | jnthn: Yeah, that's probably the sanest way to go | 17:41 | |
TimToady | so needs a #?DOES 10 or some such on the check sub def | ||
plus a #?niecza skip on the calls to check | 17:42 | ||
benabik is just using git clone -s rakudo rakudo.jvm. | |||
colomon | benabik: -s ? | ||
benabik | colomon: --shared. It adds the original repository to the alternates list for the second, so it will search for objects in the original repository. | 17:43 | |
arnsholt | Oooh, neat | ||
TimToady | The main problem with git is that there are these concepts, and there are these commands, and they seem to have very little to do with each other. :) | ||
not_gerd | TimToady: thanks | ||
arnsholt | Git leaks abstractions all over the UI, sadly | 17:44 | |
benabik | colomon: There are warnings about rebasing/deleting branches/etc, but mostly rakudo.jvm is a throw-away since I don't (currently) plan on doing much dev there. | ||
not_gerd | I'll see if they can split check into regular + native | ||
17:44
vk left
|
|||
TimToady | not_gerd: for additional background, see README in roast | 17:44 | |
fudge is one of the most useful utter hacks in existence :) | 17:45 | ||
benabik | Hm. Also need a nqp.jvm, I guess? | 17:46 | |
not_gerd | reading README before committing to a public repository: whoever heard of such a ludicrous thing ;) | ||
masak | timotimo: well, I don't know about you, but I've been snorting wasabi for decades and I have lots of hair. | ||
benabik | I'm going to guess that trying to have a nqp.parrot and nqp.jvm both installed is going to fail miserably. | ||
masak | timotimo: :P | 17:47 | |
timotimo | :) | ||
perigrin | TimToady: I didn't realize there was that much milk in fudge ... | ||
17:47
arnsholt_ joined,
arnsholt_ left
|
|||
TimToady | query: how do you *not* snort wasabi, other than not eating it? | 17:47 | |
colomon | benabik: clone it in the rakudo.jvm directory, install it into the rakudo.jvm directory. see README | ||
benabik | colomon: README? Bah. :-D | ||
masak | TimToady: point. | 17:48 | |
jnthn | TimToady: tbh, I was kinda stuck on how to snort nuts...they seem a bit big for snorting... | ||
TimToady wonders if naming it DON'T-README would cause more people to read it... | |||
perigrin | jnthn: depends on the size of your nostrils ... also I point out that you can do anything potentially fatal at least once. | 17:49 | |
timotimo | commit a symbolic link to the readme file, commit "hopefully the people who don't read the readme read the don't-readme." | ||
lizmat | .oO{ reminds me of that text-file called "secret", with as only contents the line "Access Denied" } | ||
17:50
grondilu joined
|
|||
TimToady | in the old days, Configure might've said, "Hi, I see you've never accessed the README. Let me just pop it up for you now." :) | 17:51 | |
then again, it might not've. | |||
timotimo | aaw, that's awfully cute | 17:52 | |
what happens on noatime systems? :) | |||
TimToady believes that's the first time he's ever seen the word "not've". | |||
masak .oO( I'd've'nt ) | |||
timotimo | i'd'ven'n ... yeah | ||
perigrin | I'd've'nt Calendar. | 17:53 | |
timotimo imagines the perl6 advent calendar will be even more exciting this year | |||
TimToady | maybe that's our problem, we keep counting up, when we should be counting down... | ||
timotimo | afk& | ||
TimToady has the problem of reading that as a'f'k now... | 17:54 | ||
17:57
not_gerd left
18:02
grondilu left
|
|||
TimToady | Fear may be the mind-killer, but lack of fear is the brain-killer. | 18:02 | |
18:02
Timbus left
18:04
Timbus joined
|
|||
[Coke] | Only I will remain. | 18:04 | |
TimToady | [Coke] is it! | ||
[Coke] | *bow* | 18:05 | |
TimToady | [Coke] is the real thing, it the back of your mind-killer. | ||
*in | |||
18:10
raiph joined
|
|||
benabik | Parsing takes 1/5th the time on JVM as on Parrot? | 18:10 | |
ls | |||
[Coke] | I am not looking forward to changing autounfudge to understand vm backends. | 18:11 | |
segomos | anyone know github::supernovus ? | 18:14 | |
timotimo | he's on this channel every once in a while i believe | ||
segomos | thanks, i'll keep an eye out for him | ||
[Coke] | LHF? test if things that are skipped to null PMC errors work on parrot.jvm and skip only the parrot version. | ||
timotimo | last time on 2013-05-31 | ||
raiph | I'm being asked if gather/take is built on continuations, coroutines, or threads. I'm thinking coros for niecza and parakudo, and jakudo will use continuations. I'm poking around source, commits, irc logs, etc. But would really appreciate answers from others... | 18:16 | |
yoleaux | 03:35Z <sorear> raiph: I have never heard of a perl6 implementation without 100% lazy gather/take. Your questions are weird. | ||
jnthn | raiph: I believe Niecza does continuations, at lesat if sorear++ did them similar there to on Rakudo JVM. Rakudo Parrot uses coroutines. | 18:17 | |
raiph | .tell sorear I'm being harassed about P6. Fwiw I meant strictly lazy (100%) vs mostly lazy (batched). | ||
yoleaux | raiph: I'll pass your message to sorear. | ||
jnthn | raiph: The spec doesn't, iirc, mandate approach. | ||
timotimo | harassed in a bad way or by friends who are interested to learn more? | ||
jnthn | raiph: Which is a good thing imho, as it means different targets can pick the appropriate solution. | 18:18 | |
raiph | jnthn: right. but i'm trying to state which is currently being used by various implementations. | ||
timotimo | what's the plan for gather/take on moarvm? | 18:19 | |
raiph | timotimo: it's being asked in a hostile way, but i want to give friendly answers | ||
jnthn | timotimo: I'm inclined to supply the same nqp:: ops that sorear implemented on JVM. | 18:20 | |
18:20
Rotwang joined
|
|||
jnthn | timotimo: Though they can be implemented in a more efficient way in MoarVM. :) | 18:20 | |
pmurias | raiph: I have experimented with partialy implementing the ops required for gather/take on node.js with threads | ||
jnthn | pmurias: OS threads or green threads? | 18:21 | |
pmurias | pthreads | ||
I played with using the fibers node module | |||
which implement coroutines with pthreads and a lot of locks | |||
* implements | |||
raiph | jnthn, pmurias: thanks! :) | 18:23 | |
timotimo | raiph: good approach (kill them with kindness!) | ||
jnthn | So, what shall I work on tonight... :) | 18:26 | |
timotimo | jnthn: can you get "callframe nyi" done easily? it seems to block a big amount of tests and it would make MAIN work :) | 18:28 | |
jnthn | ergh | ||
maybe | |||
timotimo | just a suggestion | ||
otherwise, get "shell" running? that ought to be much easier /s | 18:29 | ||
jnthn | Well, the main tests may well go on to block on shell... | ||
Depends how they're done I guess | |||
Util | r: .say for <abc def ghi>.map({ ~$/[0] if /.(.)./ }); # 1. RE in-lined | ||
camelia | rakudo ce8b5f: OUTPUT«beh» | ||
Util | r: my $re = rx {.(.).}; .say for <abc def ghi>.map({ ~$/[0] if /<$re>/ }); # 2. RE in separate var | 18:30 | |
camelia | rakudo ce8b5f: OUTPUT«use of uninitialized value of type Any in string context in block at /tmp/MkDfBQtl6f:1use of uninitialized value of type Any in string context in block at /tmp/MkDfBQtl6f:1use of uninitialized value of type Any in string context in block at /tmp/MkDfBQtl6… | ||
Util | r: my $re = rx {.(.).}; .say for <abc def ghi>.map({ ~$/<X>[0] if /$<X>=<$re>/ }); # 3. Work-around for broken #2. | ||
camelia | rakudo ce8b5f: OUTPUT«beh» | ||
Util | 1. Shouldn't the second version work, according to S05? | ||
2. Is there a better work-around than #3? | |||
jnthn | Util: You didn't capture anything in the second one | ||
(<$re>) would work | |||
<X=$re> is probably a neater way to do 3 | 18:31 | ||
timotimo | jnthn: you're probably right about the shell blocking; no use implementing something that won't give a boost in test results immediately! ;) | 18:32 | |
jnthn | Well, it will make callframe pass ;) | ||
jnthn had hoped to troll sorear++ into doing shell :D | |||
timotimo | :D | 18:33 | |
18:34
berekuk joined
|
|||
jnthn | oh...maybe CallFrame can be implemented with cunning use of what already exists... | 18:35 | |
Util | jnthn: I would think that #2 would capture, because the referenced RE has a capture in it. | 18:37 | |
Even if that is wrong, then how do I navigate to the data element (middle character) captured in $re ? | |||
r: my $re = rx {.(.).}; .say for <abc def ghi>.map({ ~$/[0][0] if /(<$re>)/ }); # 4. Capturing #2 | |||
camelia | rakudo ce8b5f: OUTPUT«use of uninitialized value of type Any in string context in block at /tmp/U2BFmTRBba:1use of uninitialized value of type Any in string context in block at /tmp/U2BFmTRBba:1use of uninitialized value of type Any in string context in block at /tmp/U2BFmTRBb… | ||
jnthn | r: my $re = rx {.(.).}; say 'abc' ~~ /(<$re>)/ | 18:42 | |
camelia | rakudo ce8b5f: OUTPUT«「abc」 0 => 「abc」» | ||
jnthn | Um. What happened to the inner match... | ||
masak submits rakudobug | 18:43 | ||
r: say 'abc' ~~ /(.(.).)/ | 18:46 | ||
camelia | rakudo ce8b5f: OUTPUT«「abc」 0 => 「abc」 0 => 「b」» | ||
colomon | errr…. 0 both times? | 18:48 | |
masak | yes. | ||
nested. | |||
jnthn | Note the extra indentation on the second | ||
masak | $/[0] and $/[0][0] | ||
colomon | It doesn't really show up in my IRC client | ||
masak | does here. | 18:52 | |
timotimo | does here, too. but it's just 1 space fo rthe outer and 2 spaces for the inner match | 18:53 | |
dalek | kudo/nom: f60a2c1 | (Elizabeth Mattijsen)++ | src/core/List.pm: Optimize lexical out of hot loop in "uniq" And I've now given up on using grep{} in uniq(), the tests succeeed, but strange unrelated things change, like giving the wrong error message: $ perl6 -e 'Module.new' ===SORRY!=== Cannot assign a non-Perl 6 value to a Perl 6 container |
18:59 | |
TimToady | the problem with /(<$re>)/ is that the <> is still going to throw away the captured material inside because it doesn't start with alpha | ||
jnthn | oh! | 19:00 | |
TimToady | r: my $re = rx {.(.).}; say 'abc' ~~ /<0=$re>/ | ||
camelia | rakudo ce8b5f: OUTPUT«===SORRY!===Unrecognized regex metacharacter < (must be quoted to match literally)at /tmp/oELPklkKhF:1------> my $re = rx {.(.).}; say 'abc' ~~ /<⏏0=$re>/Regex not terminatedat /tmp/oELPklkKhF:1------> my $re = rx {.(… | ||
pmurias | jnthn: how can I determin if a lexical is stored (and more importantly serialized) as a native int/str/num? | ||
TimToady | hah | ||
r: my $re = rx {.(.).}; say 'abc' ~~ /$0=<$re>/ | |||
camelia | rakudo ce8b5f: OUTPUT«「abc」 0 => 「abc」 0 => 「b」» | ||
masak | \o/ | ||
TimToady: so the rakudobug is a dud? | |||
TimToady | arguably <0= should work | ||
/(<$re>)/ is behaving correctly | 19:01 | ||
jnthn | pmurias: The static info associated with the lexical scope in question has that info. | ||
masak marks the rakudobug 'rejected' | |||
TimToady | n: my $re = rx {.(.).}; say 'abc' ~~ /<0=$re>/ | ||
camelia | niecza v24-86-g39ab531: OUTPUT«===SORRY!===Unrecognized regex assertion at /tmp/QWC1fmcv4d line 1:------> my $re = rx {.(.).}; say 'abc' ~~ /<⏏0=$re>/Parse failed» | ||
pmurias | jnthn: and in the QAST it's determined by the .returns on QAST::Var? | 19:02 | |
TimToady ponders making that work | |||
jnthn | pmurias: Same thing that is used to implement nqp::lexprimspec(), fwiw | ||
pmurias: Yes | |||
dalek | rl6-roast-data: 995b704 | coke++ | / (5 files): today (automated commit) |
||
jnthn | pmurias: Using nqp::objprimspec on what's in .returns | 19:03 | |
masak | std: my $re = rx {.(.).}; say 'abc' ~~ /<0=$re>/ | ||
camelia | std 85cf51d: OUTPUT«===SORRY!===Unrecognized regex assertion at /tmp/6nyYNWTxAa line 1:------> my $re = rx {.(.).}; say 'abc' ~~ /<⏏0=$re>/ expecting assertionParse failedFAILED 00:00 45m» | ||
jnthn | [Coke]++ | ||
yay, we gained 69 tests :) | |||
masak | '0=' feels a bit less clear to me than '$0='. but beyond that I'm not vested either way. | 19:04 | |
lizmat continues "what if Nil inherits from Mu" scenario | 19:05 | ||
pmurias | jnthn: thanks | ||
colomon | \o/ | 19:06 | |
lizmat | looking for feedback: gist.github.com/lizmat/5921809 | 19:12 | |
jnthn | timotimo: Think I may have got a CallFrame that works :) | ||
jnthn pops it into the setting and tries to build it | |||
19:13
snoopy joined
|
|||
jnthn | timotimo: oh, it did help those two MAIN tests :) | 19:17 | |
[Coke] | jnthn++ | ||
19:18
dmol joined
|
|||
masak | lizmat: looking at f60a2c1, I'm wondering if it's not a bit of a zero-sum thing. | 19:20 | |
timotimo didn't even see the commit that did anything | |||
oh, that's because you didn't commit it yet! never mind :) | |||
cool beans! :) | |||
lizmat | masak: you mean it doesn't matter if the lexical gets created again and again inside the loop, or only once outside ? | 19:21 | |
masak | lizmat: yes, you save a lexical sitting in the pad of the loop body... but now the var lookup has to do an OUTER lookup with each access instead. | ||
timotimo | huh? perl6-bench has niecza in the nqp list. does that even make sense? | ||
dalek | kudo/nom: 2208156 | jnthn++ | src/core/CallFrame.pm: Implement CallFrame. Seems line number is off by one, but works otherwise. Unbusts 3 test files, two of which pass in full, one with one failure. |
19:22 | |
masak | lizmat: a properly optimizing compiler, and maybe we even do this already, should realize that it can re-use the memory of the pad of the last loop iteration. | ||
lizmat | $ time perl6 -e 'my $a; for ^1000000 { $a = 1 }' | ||
real0m3.515s | |||
user0m3.052s | |||
19:22
not_gerd joined
|
|||
lizmat | $ time perl6 -e 'for ^1000000 { my $a = 1 }' | 19:22 | |
real0m4.491s | |||
user0m3.990s | |||
masak | ok, fair enough. that's a data point I can accept. :) | ||
jnthn | Walking a frame up is not costly. :) | 19:23 | |
lizmat | once we're there, we can fix it, but as jnthn said earlier today | ||
masak | ok. | ||
lizmat | it better be fast if its in the setting | ||
masak | aye. | ||
timotimo tries to set up perl6-bench to clone and properly make rakudo-jvm | |||
lizmat | but for the life of it, I still don't understand why I can't implement "uniq" with a grep instead of gather / take | 19:24 | |
19:24
dmol left
|
|||
jnthn | lizmat: I suspect changing Nil first depends on finding places Nil is used in ways incompatible with its new meaning... | 19:24 | |
lizmat | ok, I'll just search for Nil and make changes :-) | 19:25 | |
19:25
vk joined
|
|||
not_gerd | question about Int semantics: should 17 +< -3 end up as 17 +> 3? | 19:25 | |
masak | not_gerd: the only two reasonable semantics I can think of are: (a) what you suggest, or (b) max($rhs, 0) | 19:27 | |
[Coke] | If you can't trick sorear into doing shell, I may be able to, depending on how tricky java makes it. | ||
not_gerd | masak: Parrot does the former with its INTVAL type (and Rakudo will do the same after I'll submit a patch), whereas Niecza does the latter | 19:29 | |
TimToady has put Nil outside of Any in niecza and is now testing to see if there are any regressions | 19:31 | ||
(but niecza does dispatch to === differently, so is perhaps less sensitive to the change) | |||
lizmat | TimToady: rakduo can't make settings with Nil in Mu | ||
pmurias | jnthn: if I access a non static lexical from a code refs, that is declared in a scope which hasn't been initialized yet, what should happen? | ||
TimToady | lizmat: well, so far it appears that niecza can :) | 19:32 | |
lizmat | grrrrrrrrrr :-) | ||
masak | pmurias: Any. | 19:33 | |
pmurias: I've managed to create a few such situations. they're fun. | |||
19:33
dmol joined
|
|||
masak | r: class Z { method foo { my $x = 42; method bar { say $x } } }; Z.new.bar | 19:34 | |
camelia | rakudo f60a2c: OUTPUT«(Any)» | ||
masak | pmurias: like that, you mean? | ||
TimToady wonders if a method defined inside another routine should be considered a method on the routine rather than on the outer class... | 19:35 | ||
benabik | That's... curious. | ||
jnthn | TimToady: Ouch!!! | 19:36 | |
benabik | Does that code replace bar every time foo is called? | ||
masak | TimToady: that's... a bit too cute... | ||
benabik: let's find out! | |||
benabik | .oO( 1... 2... 3... *segfault* ) |
||
masak | r: class Z { method foo { method bar { state $x = 0; say ++$x } } }; given Z.new { .bar; .foo; .bar } | 19:37 | |
camelia | rakudo f60a2c: OUTPUT«12» | ||
masak | benabik: ...no. | ||
jnthn | pmurias: I think it ends up doing something auto-closely... | ||
*closey | |||
Which means it gets the static lexicals | |||
Or something like that :) | |||
masak | aye. | 19:38 | |
arnsholt | [Coke]: Continuing from #parrot, there was a blog post from one of the JRuby folks about the pains of implementing Ruby subprocess stuff on JVM | ||
masak | that's what happens in the first case above. | ||
benabik | r: class Z { method foo { my $x = 42; method bar { say $x } } }; my $_=Z.new; .bar; .foo; .bar | ||
camelia | rakudo f60a2c: OUTPUT«Potential difficulties: Redeclaration of symbol $_ at /tmp/YpC8rIQHNf:1 ------> x = 42; method bar { say $x } } }; my $_⏏=Z.new; .bar; .foo; .bar(Any)42» | ||
jnthn | masak: No, it won't replace the method every time. Once you install something in the meta-object, it stays there. And it happens at compile time. | ||
masak | benabik: you don't do 'my $_' | ||
benabik | arnsholt: Ah, yes, that was what I was thinking of. | ||
r: class Z { method foo { my $x = 42; method bar { say $x } } };$_=Z.new; .bar; .foo; .bar | |||
camelia | rakudo f60a2c: OUTPUT«(Any)42» | ||
masak | jnthn: right. | ||
jnthn: that makes a whole lot of sense. | |||
benabik | That one confuses me. Does it just reassign the outer context of bar every time foo is called? | 19:39 | |
jnthn kills the "Too late to set file handle encoding" error | |||
arnsholt | benabik: Might be, yeah | ||
jnthn | benabik: Think that's what it does at the moment, at least. | 19:40 | |
benabik | n: class Z { method foo { my $x = 42; method bar { say $x } } };$_=Z.new; .bar; .foo; .bar | ||
camelia | niecza v24-86-g39ab531: OUTPUT«===SORRY!===Methods must be used in some kind of package at /tmp/wqxyqrjm2F line 1:------> Z { method foo { my $x = 42; method bar ⏏{ say $x } } };$_=Z.new; .bar; .foo; .baUnhandled exception: Check failed at /h… | ||
benabik | Well, niecza's response is unsurprising at least. :-) | ||
jnthn | In Rakudo, the current package is $*PACKAGE, so it really doesn't care what your nesting level is :) | 19:41 | |
lizmat | jnthn: I think I have the pb golfed down: | ||
$ perl6 -e 'sub a { say @_ }; a(Nil)' | |||
===SORRY!=== | |||
Odd number of elements found where hash expected | |||
jnthn | (at compile time, that is) | ||
lizmat: If the setting won't start, doesn't everything fail with that? :) | |||
r: sub a { say @_ }; a(Nil) | |||
camelia | rakudo f60a2c: OUTPUT«» | ||
TimToady | looks like that wants to be () rather than Nil | 19:42 | |
lizmat | but there are many places in the setting where Nil is passed as a parameter | ||
TimToady | which if fine as an item, but not fine when it wants to mean () | 19:43 | |
lizmat | something like: nqp::ifnull($coro($block), Nil); | ||
or: my $parcel := &RETURN-PARCEL(nqp::p6parcel(nqp::p6argvmarray(), Nil)); | 19:44 | ||
masak | r: class Z { method x { my $x = "a man"; say $x; method y { my $y = "with a plan"; say "$x $y"; method z { my $z = "for a canal"; say "$x $y $z" } } } }; given Z.new { .x; .y; .z } | 19:45 | |
camelia | rakudo f60a2c: OUTPUT«a mana man with a plana man with a plan for a canal» | ||
masak | :D | ||
pmurias | masak: yes | 19:46 | |
lizmat | or: THROW(Nil, nqp::const::CONTROL_PROCEED) | ||
jnthn | r: say "amanaplanacanalpanama".flip # :P | ||
camelia | rakudo f60a2c: OUTPUT«amanaplanacanalpanama» | ||
timotimo | hm, the lack of make install is turning out to be a little obstacle. | ||
pmurias | jnthn,masak: shouldn't that be an error? | ||
jnthn | pmurias: What about it are you thinking should be one? | 19:48 | |
19:48
gudahtt joined
|
|||
masak | I also don't follow. | 19:50 | |
dalek | p: f8409e7 | jnthn++ | src/vm/jvm/runtime/org/perl6/nqp/ (2 files): Fix spurious "too late to set encoding" errors. |
19:51 | |
masak | the nearest thing we have to "the lexpad of this slot was never even incarnated!" is... "(Any)" | ||
not_gerd | TimToady: FROGGS and me are currently implementing numeric shift of Int with two's complement semantics (but generalized to arbitrary precision) | ||
shifty by negative amount end up as shifts in opposite direction | |||
should that be spec? | 19:52 | ||
masak | r: for ^0 { my $x = 42; our sub foo { say $x } }; our &foo; foo() | ||
camelia | rakudo f60a2c: OUTPUT«No such method 'Any' for invocant of type 'Parcel' in block at /tmp/0Pv3NsZCbd:1» | ||
masak | hrm. | ||
r: for ^1 { my $x = 42; our sub foo { say $x } }; our &foo; foo() | |||
camelia | rakudo f60a2c: OUTPUT«No such method 'Any' for invocant of type 'Parcel' in block at /tmp/Iqu1jPs7PZ:1» | ||
timotimo | ooooh! good one, jnthn. does that make open/slurp/... work? | 19:53 | |
masak | seems to me 'our' grows more useless by the month. | ||
jnthn | timotimo: Yes, slurp now works :) | ||
Except the Buf case | |||
timotimo | that's pretty excellent! :) | ||
not_gerd | TimToady: Rakudo used to implement sign-magnitude semantics, and Niecza uses C# semantics (with 32-bit overflow weirdness) | 19:54 | |
19:54
kaare_ left
|
|||
pmurias | jnthn: accessing a non existing variable | 19:55 | |
19:55
stevan_ joined
|
|||
jnthn | pmurias: Variable declarations are compile time, so it must at some level exist. | 19:57 | |
timotimo | i'm amused that the latest rakudo commit has 0815 in the first few hex-characters | 19:58 | |
(and is otherwise digit-only for quite a bit) | 19:59 | ||
masak | pmurias: what jnthn said. you essentially can't "fall out into the void". the worst thing that can ever happen is that you get a static lexpad. | 20:00 | |
timotimo | it seems like perl6-bench doesn't have a way to do cd at all in the build steps :o | 20:01 | |
Ulti | huwah www.rakudo.com | 20:02 | |
o___O | |||
timotimo | tee hee | ||
Util | Thank you, to all who worked on /$re/ above. The <X=$re> and /$0=<$re>/ alternatives are both very helpful for my code today. | 20:05 | |
Still, this leaves me worried. In Perl 5, a simple swap of a long inline /RE/ for /$re/ is a common use case. | |||
Do I understand correctly, that to do such a swap in Perl 6, one must either (a) rework the RE into a grammar (so <alpha> works), | |||
or (b) rework every access of a captured datum (e.g. $1 becomes $0.[1]) ? | |||
lue | hello world o/ | 20:06 | |
masak | I'm also surprised at whatever rule makes it not a clean substitution. | ||
seems to work against refactorability. | |||
Util | masak: Yes, exactly | 20:07 | |
20:07
stevan_ left
|
|||
jnthn | Does anybody happen to know where derived unicode char properties like ASCIIHexDigit or IDSBinaryOperator are defined? | 20:07 | |
Whenever I search for them, I find the Perl manpages :P | 20:08 | ||
benabik | jnthn: ftp://www.unicode.org/Public/3.2-Update/DerivedProperties-3.2.0.html ? | 20:09 | |
No, that wasn't the right page. I think they name it something odd. | |||
jnthn | Yeah, already found that one. It doesn't contain the stuff properties-derived.t is testing. | 20:10 | |
benabik | I seem to remember a goodly-sized table on the unicode site with that stuff. | ||
20:11
stevan_ joined
20:12
sftp left
|
|||
jnthn | aha... www.unicode.org/Public/UNIDATA/PropList.txt | 20:12 | |
20:13
sftp joined
|
|||
Util | jnthn: Yes, PropList.txt is copied whole-cloth into Perl 5's lib/unicore/ | 20:13 | |
[Coke] | ew. | 20:14 | |
timotimo | oh wow, i'm getting a segfault in the jvm while building stage1/gen/QAST.nqp | 20:16 | |
JRE version: 7.0_21-b02 - that *is* new enough, yeah? | |||
jnthn | update 21 is typically good :S | 20:17 | |
timotimo | huh, now it's getting past that | ||
should i be worried about my hardware? | |||
[Coke] | jnthn: how evil will it be if we need to use JNI to implement shell() ? | ||
timotimo | anyway, it seems like my efforts to put rakudo-jvm into perl6-bench are going to bear fruit | 20:18 | |
20:19
bruges_ joined
|
|||
jnthn | [Coke]: Sounds...evil. | 20:20 | |
20:21
bruges left
|
|||
pmurias | masak: I understand why that currently works, what I'm worried about is that something that we want to work, that is isn't that just masking an error? | 20:22 | |
timotimo benchmarks rakudo-jvm with japhb++ 's perl6-bench | |||
masak | pmurias: your sentence does not fully parse for me. | 20:25 | |
pmurias: yes, of course it is -- quite literally -- masking an error. | |||
20:26
Moukeddar joined
|
|||
masak | pmurias: what I'm saying is that I prefer an "(Any)" in such a scenario to a Null PMC access. | 20:26 | |
which was very much the norm in the pre-nom days. | |||
(or was it pre-b? I forget.) | |||
20:26
spider-mario left,
vk left
|
|||
pmurias | retyped sentence: I understand why that currently works. What I'm worried about, is that something that we want to work? Isn't that just masking an error? | 20:27 | |
masak: wouldn't an exception be even better? | |||
masak | I dunno -- I think I've made peace with static lexpads. | 20:28 | |
so I don't really see it as "we're hiding an error", even. | |||
just a very wacky case of "oops, you didn't properly initialize that variable! well, here you go, have an (Any)." | |||
Moukeddar | o/ #perl6 | ||
o/ masak | |||
masak | Moukeddar! \o/ | 20:29 | |
Moukeddar | miss you guys | ||
masak | if you were here more often, maybe you'd contribute to Perl 6 -- so we miss you too, I guess ;) | 20:30 | |
pmurias | masak: and what about assignment? | ||
masak | pmurias: you can't assign to the static lexpad. | 20:31 | |
it's static. | |||
20:32
dmol left
|
|||
benabik | r: class Z { method foo { my $x = 0; method bar { $x = 1; say $x } } }; given Z.new { .bar; .foo; .bar } | 20:33 | |
camelia | rakudo 220815: OUTPUT«11» | ||
benabik | :-/ | ||
r: class Z { method foo { my $x = 0; method bar { print $x; $x = 1; say $x } } }; given Z.new { .bar; .foo; .bar } | 20:34 | ||
camelia | rakudo 220815: OUTPUT«use of uninitialized value of type Any in string context in method bar at /tmp/Wzs8sJnda_:1101» | ||
20:34
stevan_ left
|
|||
benabik | Oh, yes. say ≠ print + "\n" | 20:34 | |
masak | no surprises there. | ||
benabik | r: class Z { method foo { my $x = 0; method bar { say $x; $x = 1; say $x } } }; given Z.new { .bar; .foo; .bar } | ||
camelia | rakudo 220815: OUTPUT«(Any)101» | ||
timotimo | such a benchmark run is taking quite a lot of time! i hope i didn't do anything terribly wrong and waste all that time ... | 20:35 | |
benabik | masak: Is that not assigning to the static lexpad? | ||
masak | benabik: no. | 20:36 | |
benabik: what's static about it? | |||
or, hm. | |||
yes, I see what you mean. | |||
jnthn | Note that static lexpad points to a scalar container | ||
Which itself is, well, a container. :) | 20:37 | ||
masak | ok, so it all works out :) | ||
20:37
cognominal left,
drbean left,
lee_ left
20:41
dmol joined
20:42
cognominal joined,
drbean joined,
lee_ joined
20:43
Drone[02] joined,
konundra left
|
|||
Ulti | is there a way to use multi dispatch in a junction sort of way, so if I have for example multi sub factorial (0|1) {1} rather than factorial (0) {1} and factorial (1) {1} | 20:44 | |
jnthn | $ where 0|1 probably works | 20:45 | |
Ulti | aha | ||
benabik | Does multi foo(0|1) only get called via foo(0|1)? | 20:46 | |
Ulti | that's starting to feel like being clever for clever's sake rather than elegance though | ||
benabik it causes a parse error atm | |||
"Missing block" | |||
benabik | ah | ||
Ulti | but yeah that's what I was thinking its a junction literal, so kind of creates a quirky exception to the rule if it worked how I wanted | 20:47 | |
benabik | Depends on how literals in multi sigs match. If they're smart matched, it would make perfect sense. | 20:48 | |
dalek | p: 324f6eb | jnthn++ | src/vm/jvm/runtime/org/perl6/nqp/runtime/Ops.java: Handle a bunch of the derived properties. |
||
Ulti | jnthn: that worked :) | ||
20:49
sdo joined
|
|||
sdo | hello | 20:49 | |
masak | sdo: hello. | ||
sdo | masak: hello | ||
:) | |||
masak | hello. :) | ||
masak peers out of the web browser at sdo | |||
jnthn | .oO( is this IRC or an SMTP handshake? ) |
||
timotimo | jnthn: that really ought to have been a binary search ;) | ||
jnthn | timotimo: Not entirely sure it's worth it :) | 20:50 | |
sdo | Is there a difference wetween my $a=1; and my $b:=2; ? | ||
[Coke] | NAK | ||
Ulti | hmm though I think I'd have to do Int $ where 0|1 to make sure the Int type is enforced, since it was implied with the literal value before | ||
labster | hello? | ||
sdo | Is there a difference between my $a=1; and my $b:=2; ? | ||
timotimo | jnthn: not sure if it's ever not worth it, but what do i know about the jvm? | ||
sdo | sorry about that | ||
masak | sdo: yes, assignment and binding are different. | ||
timotimo | perl6: my $a := 1; $a++; say $a; | ||
camelia | niecza v24-86-g39ab531: OUTPUT«Unhandled exception: Writing to readonly scalar at /tmp/1YR5z5KSFU line 1 (mainline @ 3)  at /home/p6eval/niecza/lib/CORE.setting line 4579 (ANON @ 3)  at /home/p6eval/niecza/lib/CORE.setting line 4580 (module-CORE @ 576)  at /home/p6eval/niecza/li… | ||
..rakudo 220815: OUTPUT«Cannot modify an immutable value in sub postfix:<++> at src/gen/CORE.setting:3613 in sub postfix:<++> at src/gen/CORE.setting:2064 in block at /tmp/QsYyem6Maq:1» | |||
timotimo | perl6: my $a = 1; $a++; say $a; | ||
camelia | rakudo 220815, niecza v24-86-g39ab531: OUTPUT«2» | ||
masak | what timotimo said. | ||
jnthn | timotimo: It may be more efficient, but otoh the lists of numbers ain't that long. | ||
timotimo | the last one is pretty huge | 20:51 | |
masak | sdo: it's the different between assignment's "here, let's put this value in this container pointed to by this variable" and bindings "here, let's *bind* this variable directly to this value" | ||
jnthn | Unfortunately, this still doesn't quite nail properties-derived.t | 20:52 | |
sdo | yes I guess it is kinda constant then.? | ||
timotimo | but a few tests now pass, right? | ||
jnthn | Gets us to 204 out of 256 though... | 20:53 | |
timotimo | sounds great! it was 0 before? | ||
masak | sdo: yes. they fill different purposes. | ||
jnthn | timotimo: yeah | ||
masak | sdo: binding is the "unusual" one. but it turns up in routine signatures, for example. | ||
sdo | masak: thanx a lot | ||
[Coke] | timotimo: github.com/coke/perl6-roast-data/b...y.out#L661 | ||
masak | sdo: yw | ||
you'll find we're helpful here ;) | 20:54 | ||
timotimo | awesome! :) | ||
masak | and a bit funny... :) | ||
jnthn | Though of the non-skipped just need Math, ID_Start and ID_Continue | ||
20:55
sdo left
20:57
skids left
|
|||
TimToady | masak: the P5ish refactoring of regexen via variables depends crucially on the misfeature of treating regexes as strings. In P6 this would be more in the province of textual macros. | 20:58 | |
timotimo | does turning $foo++ into ++$foo if the previous value was never used make sense as an optimization at the QAST level? | ||
TimToady | what, he want to know sink context at *compile* time? horrors... | 20:59 | |
timotimo | oh, sink context ... | ||
TimToady | P5 does precisely that optimization | 21:00 | |
only, of course, it's called void context there :) | |||
timotimo | i thought it might be enough to check if the var that gets created to hold the temporary value gets used somewhere | ||
but yeah ... | |||
dalek | p: 56e602e | jnthn++ | src/vm/jvm/runtime/org/perl6/nqp/runtime/Ops.java: The rest we need for properties-derived.t. |
21:05 | |
jnthn | OK, there's one more test file :) | ||
nwc10 | what were the most recent numbers for passing? and how many hours out of date are they? :-) | 21:06 | |
jnthn | The last run was before any of my work this evening. | 21:07 | |
[Coke] | I will probably not be updating anything else this evening. | 21:08 | |
jnthn | That's fine :) | ||
[Coke] | but I am about to hit a 4 day weekend, which hopefully will have some hacking time. | ||
21:08
sdo joined
|
|||
[Coke] | >> commute | 21:08 | |
jnthn | o/ | ||
nwc10: grr, getting timeouts from github, so can't tell you the number :( | |||
sdo | hello all my apologies for being rude with you :-( | 21:09 | |
timotimo | i had them open a few moments ago; it was like 92.58% or something | ||
lizmat | 92.55% | ||
jnthn | There we go. | ||
timotimo | and both rakudo and rakudo-jvm went up ~100 tests since yesterday | ||
lizmat | my make spectest is hanging on github | ||
timotimo | 160? | ||
TimToady | not_gerd: yes, negative shifts should probably be spec | ||
tadzik | masak: something for you: twitter.com/brucel/status/352398305113817088 | 21:10 | |
21:10
benabik left
|
|||
colomon | lizmat: I'm having trouble with github as well | 21:10 | |
masak | tadzik: hehe. | 21:11 | |
tadzik: not an autopun, though. just a pun. :) | |||
timotimo | just 9 benchmarks to go until i have some results for rakudo-jvm ... and then i'll need to do rakudo.parrot to compare :| | 21:12 | |
jnthn | tadzik: lol! | ||
21:12
sdo left
|
|||
lizmat | (spectest running now after timeout) | 21:12 | |
jnthn | masak: Not an autopun, but I have no beef with it :P | ||
tadzik | masak: yep :) | ||
timotimo | "We are currently investigating problems accessing a number of GitHub services. We will update with more information as soon as we have it. | ||
masak | tadzik: I'm smiling because I'm imagining that tweet being read to me in your amused voice, though :) | 21:15 | |
colomon | git pull just worked for me. | ||
timotimo | The sites appear to have recovered from an upstream network outage. We will keep this status event open while we continue to investigate. | 21:16 | |
tadzik | :D | ||
timotimo | okay, now that slurp and probably a few other open related things work ... how long until panda? tadzik? :) | ||
masak .oO( "we have panda minus two days, three hours, thirty minutes" ) | 21:17 | ||
Ulti | how do you define the precedence of your own operators? | ||
jnthn | is prec(...) | ||
Ulti | thanks | ||
jnthn | Or is tighter/is looser/is equiv is more convenient. | ||
Ulti | take it thats not in S03 :S | ||
masak | I would recommend the latter. | 21:18 | |
jnthn | S06 iirc | ||
Ulti | k k | ||
Ulti reads | |||
cool thanks | |||
this is easily becoming the most convoluted implementation of factorial :/ | |||
jnthn | r: sub postfix:<!>($n) { [*] 1..$n }; say 10! | 21:19 | |
:P | |||
camelia | rakudo 220815: OUTPUT«3628800» | ||
tadzik | timotimo: how long until panda what? :) | ||
I know, I know | |||
I plan to take a Free Friday, so I may do some hacking | |||
masak | r: sub p { [*] 1..$^n }; say p 10 | ||
camelia | rakudo 220815: OUTPUT«3628800» | ||
lizmat | jnthn: it seems that .pop needs to be "is rw" because of .unshift: nqp::unshift($!items, @elems.pop) | 21:20 | |
would it make sense to fix that, if so how? | |||
timotimo | Useless use of "+" in expression "$i + $j" in sink context (lines 1, 1, 1, 1) - oh my | ||
ah | 21:21 | ||
yes, indeed | |||
is there a form of # OK that i can put in -e properly? | |||
jnthn | lizmat: Why does that require it to be "is rw"? | 21:22 | |
lizmat | let me put it this way: if .pop is not marked "is rw", any unshifted values are ro | ||
jnthn | r: my @a = 1,2,3; my @b; @b.unshift(@a); say @a; say @b; | ||
camelia | rakudo 220815: OUTPUT«1 2 31 2 3» | ||
jnthn | r: my @a = 1,2,3; my @b; @b.unshift(@a); @a[2] = 4; say @a; say @b; | 21:23 | |
camelia | rakudo 220815: OUTPUT«1 2 41 2 3» | ||
jnthn | *phew* | ||
21:23
stevan_ joined
|
|||
lizmat | indeed, that;s because I didn't commit the change yet | 21:24 | |
jnthn | lizmat: oh, I guess it's relying on .pop making containers for the things that get shoved into $!item | ||
lizmat | yup | ||
masak | that just feels like wrong reasoning to me. | ||
colomon | +1 | ||
masak | for some reason. | ||
jnthn | masak: What is? | ||
masak | "because unshift" but it's not because of unshift. | 21:25 | |
I'm not criticizing lizmat++ by the way. only the previous reasoning that led someone to believe unshift was involved. | |||
jnthn | masak: unshift relies on .pop returning something with a scalar container; if .pop doesn't do that, unshift needs tweaking. | 21:26 | |
lizmat | no, unshift is relying on the "is rw" behavior of .pop | ||
masak | r: my @a; @a.unshift(5); @a[0] = 77; say @a.perl | ||
camelia | rakudo 220815: OUTPUT«Array.new(77)» | ||
jnthn | masak: I'm not saying pop is the way it is because of unshift, just that unshift has a dependency on the way pop currently is. | ||
masak | there, I just unshifted something decontainerized, no? | ||
it works. | 21:27 | ||
lizmat | not if you take away "is rw" ffrom .pop | ||
jnthn | multi method unshift(List:D: *@elems) { | ||
masak | lizmat: I didn't even use pop! | ||
I just unshifted a 5 | |||
lizmat | you did, because unshift uses that | ||
jnthn | masak: The IMPLEMENTATION of unshift uses .pop | ||
masak | oh! | ||
ok, now I'm with you. | |||
jnthn | :) | ||
lizmat | *phew* :-) | ||
masak | why the heck does unshift use pop?! :) | 21:28 | |
jnthn | while @elems { | ||
nqp::unshift($!items, @elems.pop) | |||
} | |||
colomon | and doesn't just use .pop, but requires a weird version of .pop | ||
masak | unshift and pop seem equally primitive to me. | ||
jnthn | It's 'cus you can unshift multiple items. | ||
masak | right. *that's* what's wrong. | ||
what colomon said. | |||
jnthn | Note it's a slurpy. | ||
Yeah | |||
masak | if unshift is the only thing that wants pop to be 'is rw', then unshift is weird and wrong. | 21:29 | |
lizmat | so far, that seems the only place | ||
jnthn | Note that shift is also marked as "is rw" | ||
So it's not a weird accident just for pop. | |||
colomon | what about something like for @elems.reverse { nap::unshift($!items, $_) } ? | ||
timotimo | aaw, i get some stack overflow errors in the benchmarking and rc-forest-fire is dieing from not being able to call Numeric on something (perhaps in the MAIN?) | 21:30 | |
21:30
konundra joined
|
|||
masak | colomon: looks much saner to me. | 21:30 | |
jnthn | r: my @a = 1,2,3; my $x := @a.shift; $x = 4; say $x; say @a; | 21:31 | |
camelia | rakudo 220815: OUTPUT«42 3» | ||
jnthn | Does the spec rule either way on the above? | ||
lizmat | r: my @a=1,2,3; my $b= @a.pop = 4; say $b | ||
camelia | rakudo 220815: OUTPUT«4» | ||
21:31
Rotwang left,
PacoAir left
|
|||
lizmat | r: my @a=1,2,3; my $b= @a.pop = 4; say $b; say @a | 21:31 | |
camelia | rakudo 220815: OUTPUT«41 2» | ||
jnthn | If we're gonna go changing pop, we'd better change shift too... | 21:32 | |
lizmat | doing some tests now | ||
jnthn | TimToady: Opinion? :) | ||
dalek | ast: c39a7ca | (Brent Laabs)++ | S (2 files): add canonpath :parent tests for unix |
||
lizmat | jnthn: wouldn't nqp::pop() as an alternative to .pop be sufficient ? | 21:34 | |
fg | |||
oops, ww | 21:35 | ||
jnthn | lizmat: No, 'cus we have a Perl 6 array | ||
colomon | Trying to think like TimToady: why just shift and pop? | 21:37 | |
21:37
census joined
|
|||
masak | census! \o/ | 21:37 | |
census | hi masak! :) | 21:38 | |
thanks for the friendly greeting :) | |||
colomon | r: my @a = 1,2,3; my $x := @a.first(* %% 2); $x = 4; | ||
21:38
pmurias left
|
|||
camelia | rakudo 220815: OUTPUT«Cannot assign to a readonly variable or a value in block at /tmp/ZPjiZIbKd5:1» | 21:38 | |
colomon | r: my @a = 1,2,3; my $x := @a.pop; $x = 4; | 21:39 | |
camelia | rakudo 220815: ( no output ) | ||
21:41
dmol left
|
|||
masak | colomon: right. good one. | 21:41 | |
I'd expect, intuitively, the .pop case to be equally as wrong as the .first case. | |||
colomon | n: my @a = 1,2,3; my $x := @a.pop; $x = 4; | 21:42 | |
camelia | niecza v24-86-g39ab531: ( no output ) | ||
colomon | n: my @a = 1,2,3; my $x := @a.first(* %% 2); $x = 4; | ||
camelia | niecza v24-86-g39ab531: ( no output ) | ||
colomon | on niecza it works in either case, I guess. | ||
hmm | 21:45 | ||
rn: my $x := 4; $x = 5; say $x | |||
camelia | niecza v24-86-g39ab531: OUTPUT«Unhandled exception: Writing to readonly scalar at /tmp/qOAoZOVLFn line 1 (mainline @ 3)  at /home/p6eval/niecza/lib/CORE.setting line 4579 (ANON @ 3)  at /home/p6eval/niecza/lib/CORE.setting line 4580 (module-CORE @ 576)  at /home/p6eval/niecza/li… | ||
..rakudo 220815: OUTPUT«Cannot modify an immutable value in block at /tmp/eOH3POeSPr:1» | |||
21:51
btyler_ joined
21:54
btyler left
|
|||
lizmat | running spectest with a fix for .unshift | 21:54 | |
colomon | my test run just now shows an additional 220 tests passing since my last run 19 hours ago. that actually sounds low to me... | ||
hmmm… 169 passing tests from S05-mass/properties-derived.t. Maybe it is right. | 21:56 | ||
lizmat | I've added some tests for squish(), but that really shouldn't make that much of a difference | ||
21:56
BooK left,
bluescreen10 left
|
|||
colomon | ah, lots of skips in S05-mass/properties-derived.t | 21:56 | |
21:59
berekuk left
22:01
berekuk joined,
dmol joined
22:03
rindolf left
22:08
pochi left,
pochi joined
22:15
tomyan joined
22:16
tomyan left
|
|||
lizmat | what are the thoughts of unshifting or pushing an infinite list to an array? | 22:19 | |
should that work assuming the reificiation will stop at some point? | 22:20 | ||
masak | I don't see anything wrong with it. | ||
timotimo | i made a comparison of perl5, rakudo and rakudo-jvm based on japhb's test suite | ||
er benchmark suite | |||
masak | except that you'll never be able to .gimme the .push'd things because they are after infinitely many other things. | ||
lizmat | masak: so it's ok that a program hangs until it has eaten all of memory? | 22:21 | |
masak | but that's a minor detail. | ||
lizmat: oh, I was assuming a model that doesn't hang on just pushing to an infinite list. | |||
lizmat | r: my @a; @a.unshift( 1..Inf ) # is what I'm talking about | ||
masak | doesn't look obviously hanging to me. | ||
camelia | rakudo 220815: OUTPUT«(timeout)» | ||
lizmat | (it does) :-) | 22:22 | |
masak | sure, but that's just by current implementation. | ||
lizmat: you know as well as anyone that preventing all such hangs is a fool's errand. :) | |||
22:22
Moukeddar left
|
|||
lizmat | I'm just thinking the obvious ones | 22:23 | |
masak | that's probably fine. | ||
but again, I don't see why .unshift( 1..Inf ) would be automatically outlawed. | |||
timotimo throws nqp and nqp-jvm into the mix of benchmarked things | 22:25 | ||
TimToady | a couple years ago we decided that push had to be eager or it would violate the expectations of P5 programmers | ||
22:25
Radvendii joined
|
|||
TimToady | that's why there's supposed to be a .plan that is not eager | 22:25 | |
masak | right, but this is about pushing an infinite list, not pushing *to* an infinite list. | ||
but maybe that's what you mean, too. hm. | 22:26 | ||
lizmat | r: my @a=1..Inf; push @a, 1 # teh latter is already outlawed | 22:27 | |
camelia | rakudo 220815: OUTPUT«Cannot .push to an infinite listcurrent instr.: 'throw' pc 367293 (src/gen/CORE.setting.pir:158222) (src/gen/CORE.setting:9211)called from Sub 'sink' pc 400882 (src/gen/CORE.setting.pir:171118) (src/gen/CORE.setting:10496)called from Sub 'MAIN' pc 396 (src/gen/p… | ||
lizmat | r: my @a; @a.push( 1.. Inf ) # should this fail in a similar manner? | ||
jnthn | timotimo: Results anywhere? | ||
camelia | rakudo 220815: OUTPUT«(timeout)» | 22:28 | |
timotimo | jnthn: i can surely upload the current results, hold on | ||
colomon | TimToady: @a.plan is like @a.push but just adds the iterator it is passed to the end of @a's iterator, or something along those lines? | 22:30 | |
timotimo | t.h8.lv/p6bench/p5-rp-rj.html - there you go | ||
in a tight loop in NQP, wouldn't nqp::push(@a, $i) be a couple times faster than @a.push: $i? | 22:32 | ||
er, @a.push($i) rather | |||
lizmat | timotimo: does nqp::push now about infinite arrays ? | 22:33 | |
masak | lizmat: the thing with outlawing the obvious cases is -- well, now you've forbidden something that is obviously stupid. | 22:34 | |
lizmat: the subtly stupid things are still allowed. | |||
jnthn | timotimo: yes | 22:35 | |
timotimo | i wonder if i should change the microbenchmark in japhb's perl6-bench suite to reflect that? | ||
jnthn | timotimo: uh, I mean, thanks :) | ||
dalek | p: 0ed0a48 | (Gerhard R)++ | src/vm/parrot/ops/nqp_bigint.ops: Unify shift ops. Shifting by negative amounts flips direction. |
||
lizmat | so, is it the overhead of the extra check that you're worried about? letting all suffer for those few dumbo's that might do something wrong ? | ||
jnthn | oh wait, I meant yes too :) | ||
hah ) | 22:36 | ||
timotimo | :) | ||
masak | lizmat: well, no, because it could be a compile-time check. | ||
lizmat: I'm just saying that while it'd be useful, it would have a very restricted use. | |||
lizmat: a bit like "oh, you tried to divide by the constant 0 here. that's not possible!" | |||
lizmat | not really, as that will bomb immediately | 22:37 | |
masak | (which gets a little better with constant folding, granted, but I don't see constant folding giving us infinite lists to the same degree) | ||
dalek | ast: 4c4395d | (Gerhard R)++ | S03-operators/numeric-shift.t: Check numeric shifts for two's complement semantics. |
||
lizmat | these cases will eat up all resources that they can | ||
masak | I guess what I'm saying is I don't know exactly what windmill it is you're trying to topple here, and why. | 22:38 | |
22:38
xilo_ left
|
|||
lizmat | well, I'm not sure anymore either: I just found some checks for infinite lists in the pop/push/shift/unshift area | 22:38 | |
and realised there were 2 checks missing in the unshift/push case | 22:39 | ||
BTW: t/spec/S16-unfiled/rebindstdhandles.t seems to be failing now, unrelated to my changes afaics | |||
seems jnthn's last commit is to blame ? | 22:40 | ||
22:40
snoopy left
22:41
not_gerd left
|
|||
jnthn | lizmat: My last commit? Implementing CallFrame support for JVM? | 22:41 | |
lizmat | ok, then it was my code, doublechecking | ||
jnthn | I mean, it's possible, just feels...weird. :) | ||
lizmat | Cannot use bind operator with this left-hand side | 22:42 | |
Radvendii | hey, sorry to bother y'all, but I have a question that doesn't appear to be answered online | ||
can I disable necesity of declaring variables? I want to type '$var="foo"' without the 'my | 22:43 | ||
' | |||
lizmat | seems labster uncommented the fudge for that error today | 22:44 | |
masak | Radvendii: I believe Niecza supports that. | ||
n: 6; $var = 'foo'; say $var | |||
camelia | niecza v24-86-g39ab531: OUTPUT«===SORRY!===Variable $var is not predeclared at /tmp/SlGEgHd7IP line 1:------> 6; ⏏$var = 'foo'; say $varVariable $var is not predeclared at /tmp/SlGEgHd7IP line 1:------> 6; $var = 'foo'; say ⏏$var… | ||
jnthn | Rakudo doesn't; I guess it's "no strict;" though. | ||
masak | n: no strict; $var = 'foo'; say $var | 22:45 | |
camelia | niecza v24-86-g39ab531: OUTPUT«Unhandled exception: System.NullReferenceException: Object reference not set to an instance of an object at Niecza.StashCursor.Core (System.String key, Boolean final, Niecza.StashCursor& sc, Niecza.Variable& v, Niecza.Variable bind_to) [0x00000] in <file… | ||
masak | huh. | ||
lizmat | no strict is NYI , isn''t it ? | ||
jnthn | lizmat: In Rakudo it's NYI. I thought Niecza had it... | ||
lizmat | .oO{ triple negation, wow} | ||
masak | ISTR Niecza had it at some point... | ||
Radvendii | Okay... I guess I'll wait for it. Funny though "no" is supposed to be *not* including a module. I would expect no strict to be implemented before use strict... | 22:46 | |
timotimo | t.h8.lv/p6bench/p5-rp-rj-np.html <- added nqp-parrot, nqp-jvm coming up some time after that | ||
(this is before the nqp::push replacement was made) | 22:48 | ||
labster | oh, sorry about rebindstdhandles.t, that was a git thinko | ||
dalek | ast: 6ef8223 | (Elizabeth Mattijsen)++ | S16-unfiled/rebindstdhandles.t: Restore fudge for binding to $:ERR |
||
masak | Radvendii: it's historical reasons. 'use strict' needs to be switched on in Perl 5. in Perl 6 it's "on by default". | ||
lizmat | labster: ok, it just threw me off for a bit | 22:49 | |
Radvendii | masak: okay, thanks. | 22:50 | |
masak | 'night, #perl6 | ||
lizmat | night masak! | ||
timotimo | night masak! | ||
labster | night masak!! | 22:51 | |
22:51
BenGoldberg joined
|
|||
dalek | kudo/nom: 25e2f6b | (Elizabeth Mattijsen)++ | src/core/List.pm: Add some checks for dumbo's trying to unshift/push infinite lists |
22:51 | |
22:54
Radvendii left
|
|||
lizmat | goodnight #perl6! sleep& | 22:58 | |
jnthn | Think I'll get some rest also. 'night, #perl6 | ||
timotimo | aaw | 23:00 | |
was just about to post the results with nqp-jvm thrown into the mix | |||
(doing forest fire right now) | 23:01 | ||
23:02
BooK joined
|
|||
timotimo | t.h8.lv/p6bench/p5-rp-rj-np-nj.html - here we go. benchmarks with rakudo-{parrot,jvm}, nqp-{parrot,jvm} and perl5 | 23:04 | |
23:09
Khisanth left
|
|||
timotimo | t.h8.lv/p6bench/nqppush_fixed.html - this is with @a.push replaced with nqp::push(@a...) in the nqp microbenchmarks "while_push" and "while_push_join" | 23:15 | |
the difference is noticable. | 23:16 | ||
labster | It looks like P6 on most of these tasks are only O(100) times slower than P5 now. | 23:18 | |
timotimo | hm ... hooray? | 23:20 | |
it is pretty cool that nqp-jvm beats perl5 at forest fire at the very highest number of iterations | |||
23:21
ajr_ left
23:23
census left,
Khisanth joined
|
|||
timotimo | ah, the forest fire might suffer from use of junctions | 23:23 | |
nope, that's not it. | 23:25 | ||
hm, is === faster than == when comparing items from an enum? | 23:27 | ||
23:33
dmol left
23:39
pochi left
23:40
arnsholt left,
arnsholt joined
|
|||
timotimo is not able to get faster code out of the forest fire | 23:41 | ||
or maybe i *am*! | 23:42 | ||
23:42
Chillance left
23:43
Woodi left,
Woodi joined
23:44
ajr joined,
ajr is now known as Guest39241,
frettled left
23:45
frettled joined
23:46
pochi joined,
Guest39241 left
|
|||
timotimo | nope. nothing i can do here :| | 23:46 | |
23:49
Chillance joined
23:58
btyler_ left
23:59
xilo_ joined
|