»ö« 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:08 vmspb left 00:11 Tene_ joined, Tene_ left, Tene_ joined 00:12 Tene_ left 00:20 cognominal left 00:22 cognominal joined 00:27 mstwu00 joined 00:30 cognominal left 00:32 cognominal joined 00:35 benabik left 00:38 Vlavv_ left 00:39 benabik joined 00:41 crab2313 joined 00:46 mstwu00 left 00:51 Vlavv_ joined 00:52 BenGoldberg joined 01:03 xinming left 01:04 xinming joined 01:13 benabik left 01:14 arcterus joined, benabik joined 01:20 arcterus left, arcterus joined 01:22 simcop2387 left 01:23 simcop2387 joined 01:24 btyler left 01:27 arcterus left 01:29 crazedpsyc left 01:36 aindilis joined
timotimo bleh. can't sleep. 01:40
i wonder how much performance can be gained by making sure 'sub foo returns Int { 1 }; sub yoink returns Int { foo() }; my Int $a = yoink()' will only typecheck once (well, in this case it could just typecheck at compile-time, but you know what i mean ...) 01:41
and i wonder how hard it is to optimize away return type checks in things like 'sub foo returns Int { my Int $a = something; return $a }; because there's crazy things like CALLER::return or something? not quite sure about that. 01:42
colomon worrying about things like that disturbs your sleep, yup. 01:43
timotimo yeah, it does, doesn't it :|
also, how much sense does it make to consider making the optimizer add "returns Foo" to subs at optimize-time? 01:44
colomon I was having that problem a few days when I was up north fishing, discovered reading a couple of chapters of Les Miz before bed turned off the busy part of my brain and let me sleep. :)
timotimo :) 01:45
01:52 btyler joined 01:53 arcterus joined 01:58 kingbeast joined 01:59 arcterus left 02:06 btyler left 02:26 mikemol joined 02:42 fgomez joined, fgomez left 02:43 fgomez joined 02:48 btyler joined 03:05 raiph joined 03:26 preflex_ joined, ChanServ sets mode: +v preflex_ 03:28 preflex_ is now known as preflex 03:29 BenGoldberg left 03:35 btyler left 03:45 crab2313 left 03:48 btyler joined 04:02 SamuraiJack joined 04:03 xilo left 04:04 cognominal left 04:05 cognominal joined 04:08 pupoque_ joined 04:09 uvtc joined
uvtc Wow. Exciting doings lately in the Perl 6 world. MoarVM sounds amazing enough, and then I read about plans for Perl 5 integration. 04:10
Great name too (MoarVM). 04:12
TimToady we're all pretty jazzed 04:13
04:15 raiph left, SamuraiJack left
uvtc Of course, this is stating the obvious, but it's going to be a major coup when you can demo a Perl 6 program that can make use of a Perl 5 cpan module. 04:17
Folks are gonna go bananas. 04:18
IMO
:) 04:20
mst I'll go even more bananas when it works vice versa 04:23
being able to write one class inside a perl5 program in perl6 would be very interesting as a means to experiment 04:24
bonsaikitten mst: you sick puppy :D
mst is hoping we'll get MoarVM as a CPAN module for that purpose
diakopter yah 04:26
see my hague grant proposal for that 04:27
oh wait, that's what you're talking about..
uvtc diakopter++ # epic grant proposal
diakopter well, to be fair, pugs could do a lot of it
04:28 crazedpsyc joined
diakopter mst: hrm, now I'm having trouble remembering where I detailed the .. oh yeah, my lightning talk at oscon last week 04:31
it was quite ... lightning-y 04:32
mst I remember us chatting about it in person
diakopter my memory is so poor :(
mst or possibly in /msg which I regard as mostly similar
I ... don't really care if you remember when we had the conversation, the important thing is that I enjoyed said conversation and it seemed to be productive 04:33
uvtc diakopter, is there a video of your lightning talk anywhere?
(A bunch of those oscon 2013 talks went up very quickly on youtube. High-quality video too.) 04:34
diakopter well, no one was recording them I think 04:36
(same for Larry's SotO)
there was an empty O'Reilly tripod in the center aisle
mst assuming larry's was what he presented at ::NA it got videod there 04:37
diakopter there was a bit of overlap
TimToady it wasn't really the same talk, though there was overlap
but you'll probably hear the new one in Kiev
diakopter goes to get plane tickets 04:38
uvtc Oh! I'd heard that there was a SotO. AFAIK, there hasn't been one of those in quite a while (?). Is there a transcript of it anywhere? Failing that, are there any slides available? 04:39
TimToady there's been one every year, but not all of them are the sort you put up, live demos and such...
diakopter finally thought of Perl 6's killer app 04:40
uvtc diakopter: Whaddya think? 04:42
TimToady a program for murderers?
diakopter er 04:45
oh, I get it.
*headdesk*
uvtc took me a minute too. :)
04:48 fridim_ left, birdwindupbird joined 04:53 JimmyZ joined
uvtc FWIW, I'm more interested in seeing a substantial tutorial than a "killer app". I'd think a "killer app" would come later. 04:54
04:56 uvtc left 05:11 abnorman left 05:19 lestrrat joined
lizmat good *, #perl6! finally a night below 20 degrees (celsius) 05:19
lizmat likes shivering for a change, instead of sweating
JimmyZ good morning, lizmat
lizmat but later this week, this year's second heatwave :-( 05:20
mst it's briefly hot stupidly hot here too
bonsaikitten I've been slowly roasted over the last week or two
diakopter there's zero things you can append to any list of computer-y things: off-by-one errors 05:22
05:29 abnorman joined
diakopter search for dead on act.yapc.eu/ye2013/schedule 05:34
also the one below that one... 05:35
and the one above it also
3 GFY Perl 6 talks
JimmyZ act.yapc.eu/ye2013/user/1174 \o/ 05:40
diakopter heh 480 minute talk.
JimmyZ 3 talks and 1 hackathon‎
diakopter lots o words
JimmyZ Nicholas Clark will attend the hackathon 05:41
05:50 rindolf joined
diakopter heh SFO direct to Paris 05:56
TimToady $ moarvm /dev/tty 06:01
Could not map file into memory '/dev/tty': Invalid argument
hah
diakopter: that's 'cause nobody in their right mind flies through CDG :) 06:06
expect to accidentally end up outside security at least once
lizmat are things better at LHR ?
TimToady dunno 06:07
bonsaikitten TimToady: CDG is the better one in Paris
TimToady that's...not a high recommendation for the other one :)
lizmat at least at CDG, I can always dream I'm in an Alan Parsons Project album
TimToady CDG has millions of signs, none of which tell you what you want to know... 06:08
diakopter TimToady: lolz mmap
you want to type bytecode?
TimToady sure, I'm an old-school hacker :) 06:09
lizmat en.wikipedia.org/wiki/I_Robot_(album) "The album cover photo of the band members is of the criss-crossing escalator tubes in the circular Terminal 1 building of Charles de Gaulle airport outside Paris."
06:10 btyler left
bonsaikitten TimToady: Orly ... it's ... special 06:10
lizmat remembers the time she typed in 8086 code by hand
TimToady one of those escalators silently takes you out of security--I know :)
bonsaikitten triggers me into full angry german mode so easily!
arnsholt CDG is a terrible, terrible (terrible!) airport, indeed 06:17
But the Alan Parson album is very cool
06:19 FROGGS[mobile] joined
FROGGS[mobile] o/ 06:19
lizmat FROGGS /o 06:22
dalek kudo/nom: 45e8c45 | (Elizabeth Mattijsen)++ | src/core/Hash.pm:
Implement multi-level Hash.categorize, as per spec
06:27
lizmat on to write more tests 06:28
06:29 iSlug joined 06:37 dmol joined 06:39 raiph joined 06:42 FROGGS[mobile] left, FROGGS joined
FROGGS hi lizmat 06:43
lizmat hi FROGGS!
dalek ast: 408587e | (Elizabeth Mattijsen)++ | S32-list/classify.t:
Added multi-level classify test
06:49
06:52 sqirrel joined
moritz \o 06:53
yoleaux 29 Jul 2013 21:45Z <lizmat> moritz: 50% of the $*W & $/ problem solved
lizmat moritz o/
FROGGS morning moritz
lizmat moritz: $*W is already exposed in Perl6 space
moritz lizmat: because it's a dynamic variable 06:55
06:55 ecocode joined
lizmat an unspecced, implementation dependent one, so I missed it before :-) 06:57
06:57 ecocode left
dalek ast: e67cf45 | (Elizabeth Mattijsen)++ | S32-list/c (2 files):
Add multi-level categorize test
07:01
lizmat breakfast&
labster o/ #perl6 07:13
FROGGS hi labster
labster: how are you?
labster I'm confused... lost in $dayjob code. 07:14
FROGGS lost.... ohh dear
labster Not lost in any particular way, but well, the main object has 350 attributes in the $self hash. At least it's a round number :) 07:16
bonsaikitten at least it's not php ;)
labster And thank goodness for that.
FROGGS at least you dont have 350 misnamed variables for that 07:17
FROGGS hopes the attributes are well named
labster they're reasonably well named. It's a megaclass, for sure, but things are reasonably compartmentalized so I'm not too lost. 07:22
mst labster: I tend to try and break things like that out into specific-purpose objects with delegation to maintain the old API 07:24
07:31 kaleem joined 07:44 effbiai joined 07:48 crab2313 joined
masak mornin', #perl6 07:51
mst: sounds like the Facade pattern.
lizmat morning masak!
labster hi masak! 07:52
hi lizmat!
lizmat hi labster!
07:53 sqirrel left
labster While I've been distracted, my emails tell me that lizmat++ has been making a million commits lately. 07:53
lizmat the last 30 or so are mine, yes
several var traits workish now, once blocks, push slightly faster, classify/categorize much faster and expanded 07:54
improved error messages
weeding of now unspecced features 07:55
that's what I remember :)
masak <diakopter> 3 GFY Perl 6 talks 08:01
this may (or may not) mean that p5 people are largely done laughing at us, and are ready to fight us for a while.
of course, you can't really fight people who hug you back all the time :P 08:02
hoelzro morning #perl6
masak hoelzro! \o/ 08:03
labster Well, if they're fighting us, it means they're taking us seriously, which is in a strange way a good sign.
masak labster: that's what I was (obliquely) referring to. 08:04
lizmat www.goodreads.com/quotes/4694-first...-then-they # must be close to christmas
labster is uncultured.
hoelzro so I have some...interesting code I would like to get working (based on my experiences with my coursera matrix course): gist.github.com/hoelzro/6111122 08:05
masak labster: "First they ignore you. Then they ridicule you. And then they attack you and want to burn you. And then they build monuments to you."
hoelzro I feel like this can be made to work in Perl 6
but my knowledge of sub circumfix:<...> and such is limited
masak labster: apparently that is the real quote (according to wikiquote), and it was said by Nicholas Klein in 1918, not Gandhi.
moritz =begin END 08:06
with that code, it'll compile :-)
JimmyZ masak: Do you say Jesus?
lizmat gist.github.com/lizmat/6111140 # could someone explain me why that optree is not returning the value of the block ?
hoelzro moritz: heh
effbiai masak: i'm "p5 people" and have never laught at you :) 08:07
masak hoelzro: why use commas when you're switching modes completely anyway?
hoelzro masak: oh, those are left over from an experiment I did
lizmat FROGGS? moritz?
masak effbiai: so that smiley right there, what was that? :P
hoelzro I would like to remove them if possible =)
masak effbiai: alternatively, "then you're behind the curve, dude" :P 08:08
hoelzro: it's possible.
hoelzro cool =)
lizmat context: Actions.nqp, lines 1232 and following
effbiai well.. i've always wondered when p6 will be released and take over for p5 :)
hoelzro I was thinking of using circumfix for the |-like characters
effbiai but then p5 guys started backporting features.. :)
masak effbiai: d'oh! they shouldn't have done that! :P 08:09
effbiai: now there's less reason to switch...
hoelzro but then I have the problem of "Two terms in a row" when I have a sequence of matrix rows
masak we should have, I dunno, taken a patent or something.
effbiai hehe
a GPL patent! :>
labster yes, more software patents are always the solution XD
effbiai anyway.. is there a roadmap for the p6? 08:10
moritz lizmat: does p6store return the stored value? or void?
lizmat I have *no* idea, I cat-licensed the code from the former START phaser 08:11
labster did that roadmap that we ever talked about at YAPC:NA ever make it online?
moritz well, a way to find out is to look at the op definition of p6store, and see if the return value is 'v' or 'p'
lizmat moritz++
effbiai labster: oh, you p6 guys also do yet another perl conference? :) shouldn't it be YAP6C? ;) 08:12
moritz effbiai: YAAPC, Yet Another Another Perl Conference :-)
labster TIMTOWTDYAPC.
effbiai hehe, that's right
what i'd like to see (even if it's nearly impossible) is a module/script/program to translate p5 modules to p6 modules. the biggest reason to stick with p5 is the huge amount of modules 08:14
08:14 salv0 joined
labster The short of what I remember was: get the JVM working (which it does for the most part), and start getting threads flushed out. And then buffers, and sockets. While working towards an actual 6.0.0 spec. 08:14
mst effbiai: MoarVM should do interop
labster I don't know that a full translator will be possible, but through the 'v5' module, you can embed (non-XS) P5 code in Perl 6.
mst effbiai: which honestly I think is more interesting than translation 08:15
moritz effbiai: that's very utopic. It's much more viable to embed a Perl 5 interpreter in a Perl 6 runtime/compiler
labster and MoarVM uses libperl and does XS.
moritz should blog about why automatic translation isn't viable
mst I don't even see it as desirable
an idiomatic perl6 implementation is likely to be noticeably different anyway
masak aye. 08:16
that said, translation would certainly be *possible*, just like PPI is possible.
effbiai with a p5 interpreter in p6. does that mean p6 will be "backwards compatible"?
08:16 dakkar joined
masak it just doesn't have a champion. 08:16
effbiai: no, just that it can do interop :)
effbiai en.wikipedia.org/wiki/Interpreter_(computing) 08:17
roger1 :)
s/1/!
moritz masak: I doubt that any translation (which isn't a compilation to perl 6 backend) will be correct enough to be useful
how would you even start to translate code that uses wantarray()? 08:18
masak you would flag it and say "here, fix this" and give lots of links to how. :) 08:19
FROGGS moritz / lizmat: IMO p6store does not return the value 08:20
moritz then it explains why the block doesn't return a value 08:21
FROGGS moritz / lizmat: that should do gist.github.com/FROGGS/6111211
lizmat checking 08:23
FROGGS lizmat: check the braces, I think I lost one before the QAST::Var that will be returned 08:25
lizmat it compiled so far :-) 08:26
alas: Error while compiling block (source text: "{ once { $var += $x } }"): Error while compiling op p6typecheckrv: Error while compiling op lexotic: Error while compiling op p6decontrv: Can only use get_how on a SixModelObject 08:34
FROGGS lizmat: and the QAST::Var.new( :name($sym), :scope('lexical') ) is the last arg to QAST::Stmts and not to the if, right? 08:36
08:37 sqirrel joined
FROGGS opens a proper editor 08:37
lizmat the if takes 2, right? the p6stateinit and the p6store one
so yes, it is the last one 08:38
(i think)
FROGGS right, p6stateinit is the condition, then comes the statement when true, then optionally the else
hoelzro masak: to implement my matrix literal, would I need to use a slang? or would infix:<...> and friends be sufficient?
lizmat (compiling)
FROGGS lizmat: then my gist is wrong, the QAST::Var should be moved one down
sorry for that 08:39
lizmat ok, will try that :-)
masak hoelzro: you would need a slang the size of quoting. 08:41
hoelzro ok
hoelzro needs to learn slangs
masak they are mostly NYI. 08:42
:/
hoelzro =(
masak maybe 2014 will see us getting there.
hoelzro curses 08:43
lizmat don't we consider v5 a slang ?
hoelzro I was hoping that I could show this off to my coursera class =/
JimmyZ use v6;
lizmat hoelzro: seems to me you have an itch :-)
hoelzro lizmat: I have so many itches, but not enough arms to scratch =) 08:44
lizmat :-)
hoelzro honestly, if I get some p6 tuits, they'll probably go into tooling/packaging/docs
masak lizmat: I don't know whether v5 can be (currently) considered a slang. FROGGS may be able to answer that better.
hoelzro there's a lot of talent going into the compiler
masak I haven't looked at how it's all wired up. I suspect I'd find it's too "wired up" to be considered a slang. 08:45
(as in, it requires internals knowledge you shouldn't needdlness of time)
lizmat must admit, to think of Perl 5 as a slang of Perl 6, I like the idea
masak in here, everything is a slang of Perl 6 ;) 08:48
08:48 abnorman left
masak and that's not even us being hubristic -- we're just ambitious. 08:48
FROGGS I think we should discuss how to make slangs properly pluggable in the near future 08:53
v5 is a slang somehow, but it goes pretty deep (it is an NQP module that uses Perl 6 internals) 08:54
raiph aiui, all a slang means is you recurse into a different grammar/actions pair with the same world, right? 08:55
FROGGS and I'd think that slangs should be made possible in Perl 6, but this is a lot of work
raiph and v5 goes beyond just being a slang
FROGGS raiph: that is my understanding too
raiph: no, why?
it is exactly what you said 08:56
raiph k
masak I think what raiph and I means is that 'use v5;' currently is a slang through non-userspace means.
in order for us to "have slangs", we should expose those same mechanisms in userspace. 08:57
FROGGS true
but it feels like a slang :o)
08:58 fgomez left
bonsaikitten do I sense a python module in the near future? ;) 09:02
raiph FROGGS: the slang switch mechanics are pretty much all in github.com/rakudo-p5/v5/blob/maste.../Perl5.nqp right? 09:04
arnsholt tadzik and I mused that an NQP-backed Python would be cool, but I can't think of anyone who'd implement it ATM =)
FROGGS raiph: and in this hack: github.com/rakudo-p5/v5/blob/maste...kudo.patch
raiph: and I'd love to get rid of this hack 09:05
so, to make a slang, you make a grammar (already possible), register it, override $*MAIN (hack needed) and provide the actions as well (TBD, because you cant build QAST's right now) 09:06
09:07 daxim joined
arnsholt Macros need a standardised AST API as well, so I guess slangs could hook into the same API? 09:08
masak indeed.
FROGGS yeah 09:09
lizmat FROGGS: no luck so far, will look at it again when beack from cycling& 09:10
FROGGS lizmat: k, paste a diff if you want us/me to play with it
tadzik arnsholt: surely someone who needs to learn python well, right? :) 09:12
tadzik hides
FROGGS *g* 09:15
masak heh. 09:16
incidentally, I'm putting together a Python course for $dayjob as we speak.
not willing to take on a Python implementation project, though ;)
FROGGS ++masak, well volunteered :o) 09:17
tadzik maybe just implement junctions? 09:18
masak haha
nwc10 which version(s) of Python does $dayjob like to use? 09:25
09:25 fhelmberger joined
raiph masak: does it make sense to port your macro approach to NQP? 09:25
JimmyZ NQP really needs constant 09:27
masak raiph: I'm pretty sure it's possible -- at least I don't see an actual technical blocker. 09:34
raiph: I'm not so sure it's a good idea.
mathw The idea of a Python-on-NQP is interesting, apart from it being Python :) 09:41
Not Quite Python?
tadzik BRACES 09:48
masak I just remembered a stray thought from the hazy hinterland between waking and sleep: we should totally refer to infix:<~> and prefix:<~> as "smooth operator" :P 09:51
arnsholt =D 09:56
09:58 raiph left
mathw heh 10:16
I think my C#
compiler has a time machine in it
masak oh? 10:17
mathw Actually 10:18
I just figured out it doesn't
it's a bug in my code
masak was gonna say.
mathw weird interaction of two routines
masak that sounded like a rather extraordinary claim.
mathw thank goodness for that, I thought my understanding of the C# object model might've been completely wrong
masak now, if you had said "GHC has a time machine in it"... :P
mathw lol 10:19
you'd've believed me
yeah this is an algorithmic problem. The question is... how to fix it
colomon masak++ # smooth 10:28
10:39 crab2313 left 10:45 pupoque_ left 10:46 pupoque_ joined 10:55 SamuraiJack joined 11:03 kingbeast left, SamuraiJack_ joined 11:07 SamuraiJack left 11:18 grondilu joined
grondilu rn: say i**2 11:18
camelia rakudo 45e8c4: OUTPUT«-1+1.22460635382238e-16i␤»
..niecza v24-88-g1f87209: OUTPUT«-1+1.2246063538223773E-16i␤»
grondilu wonders why there is a floating point approximation here :/ 11:19
moritz in case of doubt, read the source 11:21
masak grondilu: because exponentiation of complex numbers is kinda tricky, and even though in this case it could be reduced to repeated multiplication, currently it isn't? 11:22
11:22 SamuraiJack_ left
moritz ah right, it's implemented by going to polar coordinates, doing the exponentation on the magnitude and multiplying the angle, and going back to cartesian coordinates afterwards 11:23
(which is the only sane way to do it in the general case) 11:24
nr: say i * i
grondilu masak, moritz: yes indeed it seems exponentiation is always treated as exp(n*log(x))
camelia rakudo 45e8c4, niecza v24-88-g1f87209: OUTPUT«-1+0i␤»
grondilu multi postfix:<**>(Complex z, Int n) { [*] z xx n } # maybe this would be better? 11:25
masak grondilu: at least up to a certain N.
at least for non-negative $n :) 11:26
moritz grondilu: for small N, and it should use a more clever evaluation scheme
if you do z ** 5, you can implement that as
z2 = z * z; z4 = z2 * z2; z**5 = z4 * z
grondilu indeed
moritz (don't know what it's called in the literature) 11:27
and you have to be careful not to introduce other floating-point inaccuracies
grondilu thinks it's called ethiopian multiplication 11:29
rosettacode.org/wiki/Ethiopian_multiplication
grondilu is not sure it's exactly the same, though.
masak I'm pretty sure Knuth spends some time on this in TAoCP. 11:30
moritz well, Ethopian multiplication uses addition to implement multiplication 11:31
we want the same thing, but using multiplication to implement powers
grondilu call it ethiopian exponentiation, then :-)
masak yeah, see "4.6.3. Evaluation of Powers"
arnsholt My lecturers called it fast exponentiation I think 11:32
masak it's ancient: before A.D. 400, according to Knuth.
grondilu so, would it add more floating-point inaccuracies? 11:33
moritz who knows?
grondilu isn't it discussed in Knuth's book?
arnsholt Off the cuff, I'd argue for less, since there are fewer floating point operations involved
masak grondilu: in your i**2 case above, it would be exact. 11:38
grondilu: in the general case, I don't know.
grondilu I very much think it would be exact for any z = a+b*i where a and b are integers. 11:40
moritz the more interesting question is usually what happens when one of the numbers is small compared to the other 11:41
11:41 pmurias joined
arnsholt Knuth doesn't seem to address the question of precision, nor really consider floating point at all 11:42
AFAICT all of his discussion is for ints
masak arnsholt: Knuth considers precision at length in the first book.
arnsholt Ah, right 11:43
That would explain the absence in the exponentiation bit
grondilu precision is not really the issue here. I mean, there should not be floating point approximation when exponentiation a complex with integer real and imaginary parts, with an integer exponent. We should never have to use floating points for this. 11:44
s/when exponentiation/when exponentiating/ 11:45
grondilu just checked 1i**2 in octave and got an exact -1 11:48
rn: say (7-6i)**5 11:49
camelia niecza v24-88-g1f87209: OUTPUT«-61312.999999999978+26033.999999999993i␤»
..rakudo 45e8c4: OUTPUT«-61313+26034i␤»
11:49 dayangkun joined
grondilu hum, for some reason rakudo gives the exact answer, here. 11:49
11:50 dayangkun left
arnsholt I think we'd have to add an "integral complex" type to be able to make the kind of distinction you want 11:50
Internally, Complex has $.re and $.im, both native nums
moritz grondilu: maybe the stringification just rounds 11:51
r: printf '%25f', ( (7-6i)**5 ).re
camelia rakudo 45e8c4: OUTPUT« -61313.000000»
moritz r: printf '%.25f', ( (7-6i)**5 ).re
camelia rakudo 45e8c4: OUTPUT«-61312.9999999999781721271574497»
moritz there you go 11:52
masak grondilu: Rakudo shows slightly less precision, something like two decimals less. that seems to be the difference here.
grondilu r: printf '%.25f', ( [*] (7-6i) xx 5 ).re
camelia rakudo 45e8c4: OUTPUT«-61313.0000000000000000000000000»
grondilu I don't think the fact that $.im and $.re are natives is to blame. 11:53
moritz no, it's the same thing as before
arnsholt Not the native part, but the num part
It's not possible to tell whether the components are integral or not 11:54
grondilu their value tells it, doesn't it? I mean, I think what screws everything is the systematic use of the logarithm, that's all. 11:55
the z**n = exp(n*log(z)), that is. 11:56
we should not use this when n is integer. Instead use ethiopian exponentiation. It does not have to depend on $.im or $.re being integer or not. 11:57
moritz grondilu: then please write the patch.
grondilu ok I'll try
masak I'm in act.yapc.eu/ye2013/t-shirt/index.html -- the obvious option is "Perl 6", but I'm wondering if I should pick any of the others... :) 11:58
I'm not picking "Perl 7", JFYI.
nwc10 rn: use perl or die;
camelia niecza v24-88-g1f87209: OUTPUT«===SORRY!===␤␤Undeclared routine:␤ 'or' used at line 1␤␤Died␤ at <unknown> line 0 (ExitRunloop @ 0) ␤ at /tmp/1ZWyWNkcGu line 1 (ANON @ 2) ␤ at <unknown> line 0 (ExitRunloop @ 0) at /tmp/1ZWyWNkcGu line 1:␤------> use perl or die…
..rakudo 45e8c4: OUTPUT«===SORRY!===␤␤»
tadzik too many choices
nwc10 it's a syntax error in perl 5 too
tadzik actually, I think I'd prefer a t-shirt with nothing on the back
what3words.com/ is so awesome 11:59
and they have /api too :)
masak goes with an orange "Perl 6" 12:00
huf hm... i'm not sure i find this easier to remember than my actual address
slipped.harder.enhances doesnt exactly roll off the tongue :)
tadzik it assigns shorter words for densely populated areas 12:01
huf oh i got it wrong, it's actually suffix.resting.horizons
i still prefer eromu u :)
tadzik it may be LTA sometimes, consider "slipped" vs "slipping" for example
and explaining to someone on the phone :)
12:02 SamuraiJack_ joined
tadzik gps aren't _that_ precise, so you should be able to pick some easy words from around your location 12:02
esp. since your home is probably more than 9m² :)
12:05 pupoque_ left
grondilu rn: sub f($n is copy where $n > 0) { $n-- }; my $n = 5; f($n); say $n; 12:10
camelia rakudo 45e8c4, niecza v24-88-g1f87209: OUTPUT«5␤»
grondilu oh yeah, please ignore this^ 12:11
masak "[Git]'s an immensely capable tool, but it gives no guidance regarding the *right* way to do things." -- news.ycombinator.com/item?id=4612331 -- I think Perl and Git have this in common: for certain questions, the answer is "let me count the ways", and that really *is* the answer, rather that e.g. Python's "one-- and preferably only one --obvious way to do it".
and that frustrates some people. a lot. 12:12
benabik fish-shell devs linearize history by rebasing all merge requests. Confuses the heck out of me, but it's a perfectly valid way to use git.
FROGGS offering something to choose from is the Best Thing(tm), yeah 12:13
masak FROGGS: I think when just learning something, you don't want The Full Story; you want One Way and simplicity. 12:15
FROGGS: the second or third time one comes back to a topic, one might want The Full Story. so it's slightly more for experts. 12:16
Python is slanted towards beginners. Perl is slanted towards experts.
I often hear people express this as "Perl doesn't sweep complexity under the carpet". I've even said so myself sometimes. 12:17
12:17 pupoque_ joined
FROGGS masak: I'm just thinking about forums where a somebody asks: "how can I do X?", and you dont know if he/she is a n00b or a pro, so you can offer a simple solution, and more advanced ones (and stating them as such) 12:17
masak right. 12:19
and the n00b will take the solution above the fold and stop caring about the rest.
moritz FROGGS: usually (but not always) the style in which the question is asked makes it possible to guess if somebody is familiar with the domain
masak still, such a solution is "best" under some implied set of default assumptions. 12:20
moritz compare "how do I revert a change" to "How do I revert a change that's {only in my private history,been published already}"
or even s:2nd/change/commit/
masak moritz: if you do '!revert' in #git, you get five alternatives. 12:21
12:21 skids left
moritz masak: I know, I'm a #git regular these days 12:22
(and I really wish that channel was properly logged)
pmurias masak: when comparing python/perl aren't a lot of the underlying differences dictated more by backwards compability rather then the zen of the language 12:23
masak: especially perl5 12:24
nwc10 benabik: curiously, for the perl5 core git we're trying to rebase before merging
and *not* doing that confuses me
well, OK, I look at the big tangle of lines in git's graph output and think "this could have been simpler"
and github is an offender here, by making messes easy, and tidiness harder
benabik Rebasing puts conflict solving in the branch, instead of in the merge. Makes it harder to see if someone got the conflicts right. 12:26
moritz nwc10: there's a difference between "rebase before merging" and "only rebasing onto the master branch" 12:27
masak "puts conflict solving in the branch, instead of in the merge"++
benabik++
moritz and I kinda understood "rebasing all merge pull requests" as the latter, though that might be wrong too
12:28 colomon left
moritz github.com/masak/ufo/pull/7.patch 12:28
wouldn't removing the :test(*) be enough? 12:29
then dir() doesn't return . and .. anymore
nwc10 benabik: I don't have enough direct examples to assess that either way, but I'm not convinced. In that, a merge is a single commit. Whereas resoving the conflicts by re-working the branch doesn't lump all the fixup into one place.
arnsholt There was a git-power-tools presentation linked on HN last week or something that started with "Git [...] makes no goddamn sense"
benabik I rebase my own branches a lot. Breaking them into small units, collapsing together bits that fix earlier errors, etc.
nwc10 but, I don't have enough examples/experience to be sure I'm right or wrong.
arnsholt Sums of part of my opinion of Git quite nicely =)
masak pmurias: not sure what you mean by "dictated more by backwards compatibility".
arnsholt: Git makes a whole lot of sense. 12:30
arnsholt: that's not to say that the APIs or porcelain commands are always perfect. but the underlying model pretty much is.
timotimo moritz: i think you're right
benabik nwc10: Rebasing generally involves a lot of automatic conflict resolution, which is less obvious and not always right. Granted, in this particular case there's generally nobody else working on that part of the code.
arnsholt Well, the data model and functionality makes sense, yes. The UI that exposes it is largely a giant mess
nwc10 aha yes, automatic conflict resolution. 12:31
arnsholt It seems we're more or less in agreement =)
pmurias masak: a lot of things in perl5 are the way they are because of compability concerns
moritz it's a jungle of hysterical raisins!
(I meant the git UI, but it also applies to p5 internals :-)
pmurias masak: some of them were introduced when p5 was a different language, other are that way to work better with existing features 12:33
masak moritz: actually, I think the git subcommands and their parameters have evolved quite nicely over the years. there are "old" and sometimes deprecated parameter names, but that's about it.
moritz masak: IMHO they are too implementatio centric (more)
masak pmurias: that's one reason there are many ways -- but I think TIMTOWTDI goes far beyond that reason.
moritz masak: for example new users often expect to change branches with 'git branch' 12:34
pmurias masak: aren't there also many ways in python?
moritz masak: the fact that it's done with 'git checkout' is that happens to modify the working copy -- that's not a very user-centric approach IMHO 12:35
as is the fact that it's the default not to set the upstream when you push a new branch, so the next pull (without arguments) on that branch fails 12:38
12:48 mikemol left
masak pmurias: yes, of course there are many ways. the Zen maxim says "there *should* be one [...] *obvious* way". 12:48
pmurias: meaning the ideal is to factor the language (and libraries, and tutorials, etc) so that the One Way is always close at hand. 12:49
moritz: agreed, on both points.
moritz: 'git branch NEW' should probably have been more like 'git checkout -b NEW' 12:50
12:53 salv0 left
benabik Well, `git branch NEW` is the degenerate case of `git branch NEW commit`. And if that second one did a checkout, that would be annoying. 12:57
grondilu well, since you're talking about git. I've just written a modified version of Complex.pm in a new branch. I've commited it. How can how prepare a patch out of it? I'm not sure how "git format-patch" works :/ 13:00
benabik git format-patch <base commit> 13:01
benabik often does `git format-patch @{u}`
timotimo what does u stand for? "upstream"? 13:02
benabik Yeah.
timotimo cool!
benabik @{u} is a useful new-ish bit of git syntax.
grondilu I get no output when I try git format-patch <commit-number>
benabik It should create 000N-subject.patch files.
grondilu I don't see any such file :-( 13:03
grondilu must have done something wrong 13:04
benabik Oh. Don't give it the SHA of the commit you want a patch of. If you give it one commit, it tries to create patches for everything *after* that commit. (Which is why giving it @{u} is useful
grondilu oh yeah that's what I was just thinking 13:05
benabik That's definitely an odd one. 13:06
13:07 SamuraiJack_ left
grondilu I will test it a bit more before I post it but here is my first attempt for ethiopian exponentiation: 0001-first-attempt-of-ethiopian-exponentiation.patch 13:08
oops
I meant: gist.github.com/grondilu/6112731
moritz grondilu: using lazy lists like this is neat, but probably too slow for the setting 13:10
grondilu yeah but it makes it so much easier to write
moritz I know, but that's not what the setting is optimized for 13:11
grondilu ok
masak ha ha -- Python also has the "not because I have a shotgun meme", but they spell it "We're all consenting adults here" :D 13:14
s/ meme"/" meme/
13:14 PacoAir joined
moritz so they don't welcome teenagers? :-) 13:15
timotimo is unaware of both of these memes 13:16
13:17 pupoque_ left
masak timotimo: you know how Perl 5 object attributes are simply key-value pairs in some blessed hash? 13:19
timotimo mhm
masak timotimo: that makes them very... writable.
timotimo ah, hehe.
masak by strangers.
the two memes are basically saying "we're fine with that, as a community".
timotimo good point 13:20
masak instead of panicking and adding a "private" keyword.
(which by the way doesn't fit very well with that model, of blessed hashes)
timotimo .o(and rakudo has nqp:: ops that let you do such things, too ... :) )
timotimo decided to put a bunch of ;1 into the microbenchmarks that end in for loops 13:21
13:21 pupoque_ joined
masak timotimo: my conclusion from thinking this over the past couple years is that you can *get* completely water-tight privacy, kinda... but despite what people *think* they want, they don't actually *want* that. 13:21
timotimo yeah, that's for very, very, very special cases, i think
like you have to have really tight sandboxing or something? 13:22
that kind of thing
masak it's a constant tension between things like really tight sandboxing and security concerns on the one hand,
13:23 bluescreen10 joined
masak and things like serialization and initializing the bloody thing in the first place on the other. 13:23
there's a p6l thread about this that's actually worth reading.
also, haha:
>>> from __future__ import braces
SyntaxError: not a chance 13:24
moritz just like the in a network, you get the best privacy by cutting that ehthernet cable
grondilu I have two commits now. How can I make a patch, "skipping" one of them?
ah nevermind, I'll send both I guess. 13:25
timotimo moritz: did you see the sponsored OHM ethernet cables with the builtin firewall?
[Coke] I tried to duplicate the zavolaj errors in a standalone copy of rakudo yesterday, same box where the daily star build is happening - all of the tests from jnthn's zavolaj repo passed 100%.
masak grondilu: you rebase interactively.
timotimo grondilu: git rebase -i origin/foo
masak grondilu: or you make a new branch and cherry-pick the second.
timotimo then you can reorder the patches in your text editor, squash them into one or remove one completely
get the previous state back with git reflog
moritz timotimo: www.perlmonks.org/images/userincomi...0708050152
masak wow, and 'import antigravity' opens xkcd.com/353/ in the browser :P
timotimo :D 13:26
grondilu gist.github.com/grondilu/6112872
[Coke] O_o
timotimo *** Error in `perl6': free(): invalid pointer: 0x00000000047da650 *** 13:27
\o/
coming from the nqp bigint ops 13:28
FROGGS :/
moritz that's not too hard to do 13:29
just pass something in which isn't actually a bigint
timotimo hmm
fwiw, "./bench fetch" caused this when fetching perl5
masak grondilu: nice. 13:31
grondilu: I still think there's a danger in allowing arbitrarily large integers there, though.
grondilu: imagine n being 1_000_000_000
oh, I guess the log behavior makes that not as bad... 13:32
grondilu yep, it should be fine as we do successive divisions by two 13:33
should be tried, though.
nobody wants to raise a complex number with integer real or imaginary parts to such a big exponant, anyway. 13:34
timotimo wouldn't that quickly get into a range where floats are really, really imprecise?
rt.perl.org/rt3//Ticket/Display.html?id=115390 - wow, this crash is *weird* 13:36
masak Python's view on operator associativity has no notion of "chaining infix", and yet that's how it's == and < operators behave semantically. 13:39
timotimo ah!
i was able to golf it.
grondilu a slightly shorter version (with $z is copy), and from the nom branch: gist.github.com/grondilu/6112994 13:40
13:40 sqirrel left
timotimo rt.perl.org/rt3/Ticket/Display.html?id=115390 - what thinketh the experts? 13:41
masak grondilu++
grondilu masak: you're right, though. For instance with (0.001+0.002i)**1000, it's definitely better to use exp(n*log(z))
masak timotimo++ # nicely done. 13:42
timotimo r: say (^20).map: { (^10).pick(3).min }
13:42 sqirrel joined
camelia rakudo 45e8c4: OUTPUT«2 4 1 1 1 1 0 1 1 0 1 0 1 0 1 1 2 0 1 1␤» 13:42
masak timotimo: this tells me there's a memory leak/double free in 'but'
timotimo is it in but, though? or maybe someone's being too clever with the Int and trying to treat Int+Bool as Int?
masak maybe. 13:43
timotimo r: for ^30 { 100 but True }
camelia rakudo 45e8c4: ( no output )
masak I'd look at 'but', though :)
timotimo r: for ^30 { 100 but True; 1 }
camelia rakudo 45e8c4: OUTPUT«(signal ABRT)»
timotimo r: for ^30 { 100 but "Hi"; 1 }
camelia rakudo 45e8c4: OUTPUT«(signal SEGV)»
timotimo r: for ^30 { 100 but 100; 1 }
camelia rakudo 45e8c4: OUTPUT«(signal ABRT)»
timotimo r: 100 but "hundred"; 100 but "hundred";100 but "hundred";100 but "hundred";100 but "hundred";100 but "hundred";100 but "hundred";100 but "hundred";100 but "hundred";100 but "hundred";100 but "hundred";
camelia rakudo 45e8c4: ( no output )
timotimo can't seem to get it to crash without a for aroun dit 13:44
GlitchMr but True?
masak timotimo: that also doesn't surprise me.
GlitchMr wow, and I through I won't crash Rakudo so stupidly. 13:45
benabik r: for ^2 { 100 but 100; 1 }
camelia rakudo 45e8c4: ( no output )
timotimo you?
benabik r: for ^7 { 1 but 1; 1 } 13:47
camelia rakudo 45e8c4: ( no output )
benabik r: for ^8 { 1 but 1; 1 }
camelia rakudo 45e8c4: OUTPUT«(signal ABRT)»
grondilu rn: say (1+2*pi/1000*i)**1000
GlitchMr Why I haven't noticed that issue is with 'but'.
camelia niecza v24-88-g1f87209: OUTPUT«1.0199349143075758-8.4329693743204293E-05i␤»
..rakudo 45e8c4: OUTPUT«1.01993491430758-8.43296937432043e-05i␤»
benabik That seems to be the limit. for ^7 succeeds, for ^8 fails. 8 manual iterations still works.
13:48 konundra joined
grondilu masak: (about ethiopian exp) I just checked and it seems to work just as well, actually 13:48
GlitchMr 0 but True is valid Perl, right?
Perl 6*
masak grondilu: \o/ 13:49
FROGGS r: for ^8 { 1 but 1; 1 }
camelia rakudo 45e8c4: ( no output )
masak GlitchMr: yes -- why do you ask?
FROGGS r: for ^8 { 1 but 1; 1 }
camelia rakudo 45e8c4: OUTPUT«(signal SEGV)»
FROGGS weird
GlitchMr I was thinking I perhaps should've used something else while implementing run(), but...
FROGGS a heisenbug -.-
at least something like that
GlitchMr Actually, perhaps that's good. Otherwise, issue with 'but True' would be found way later.
timotimo right. 13:50
i don't think it's your fault at all
masak GlitchMr: see perl6advent.wordpress.com/2010/12/...lse-truth/
GlitchMr: yes, it's good that it was found.
timotimo r: my $i = 0; while $i < 20 { 10 but "ten"; $i++; }
camelia rakudo 45e8c4: OUTPUT«(signal ABRT)»
GlitchMr It looked like "0 but true" (Perl 5) for me, and it worked, so I used it.
masak GlitchMr: no-one is blaming you for using it :) 13:52
GlitchMr I through run() was already fixed, but I guess not. 13:53
masak though I may start to make you personally responsible for misspelling "I thought" as "I through" :( 13:54
timotimo "fixed"? also, run says it's NYI on non-parrot, but shell below is implemented in terms of the new-ish nqp::shell; can that be made to work on jvm, too?
no, probably really shouldn't be9~
GlitchMr I don't understand how Perl 6 and NQP works, but it's surely some lowlevel issue. 13:56
Except double free() would show *glibc detected double free or corruption() * with glibc, so probably not.
timotimo *** Error in `perl6': free(): invalid next size (fast): 0x000000000fea6450 *** - i think it's memory corruption that shines through in a random error further down the line. 13:57
GlitchMr *** glibc detected *** perl6: free(): invalid next size (fast): 0x0d1e1a38 ***
timotimo perhaps casting a value to a wrong type and operating on that?
GlitchMr 08ea6000-0c8ae000 rw-p 00000000 00:00 0 [heap] 13:58
It seems that it always points to heap.
timotimo how is that in that range?
GlitchMr (not that it really matters)
timotimo d comes after c :)
r: say 0x0d1e1a38 ~~ 08ea6000..0c8ae000
camelia rakudo 45e8c4: OUTPUT«===SORRY!===␤Confused␤at /tmp/U7gQCF9cnW:1␤------> say 0x0d1e1a38 ~~ 08⏏ea6000..0c8ae000␤ expecting any of:␤ whitespace␤Other potential difficulties:␤ Leading 0 does not indicate octal in Perl 6; please use 0o8 if y…
GlitchMr Yeah, sorry, pasting different error messages
timotimo er, oops 13:59
r: say 0x0d1e1a38 ~~ 0x08ea6000..0x0c8ae000
FROGGS #0 0x00007ffff7617037 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
camelia rakudo 45e8c4: OUTPUT«False␤»
GlitchMr *** glibc detected *** perl6: free(): invalid next size (fast): 0x0c172a20 ***
08912000-0c322000 rw-p 00000000 00:00 0 [heap]
13:59 skids joined
timotimo that's better 13:59
FROGGS that might be the same heisenbug [Coke] and me discovered in april on feather in S02-types/bool.t
13:59 kaare_ joined
GlitchMr r: for 1..1000 -> $i { say $i; my $error = (my $val = (^10).pick(3).min but !$val); 1 } 14:00
camelia rakudo 45e8c4: OUTPUT«(signal ABRT)1␤2␤3␤4␤5␤6␤7␤»
14:00 dakkar left
FROGGS timotimo: you get a backtrace when you do: gdb --args perl6 -e 'for ^3000 { 1 but 1; 1 }' 14:00
GlitchMr for 1..1000 -> $i { say $i; my $error = (my $val = (^10).pick(3).min but True); 1 }
r: for 1..1000 -> $i { say $i; my $error = (my $val = (^10).pick(3).min but True); 1 }
camelia rakudo 45e8c4: OUTPUT«(signal ABRT)1␤2␤3␤4␤5␤6␤7␤»
GlitchMr r: for 1..1000 -> $i { say $i; my $error = (my $val = (^10).pick(3).min but False); 1 }
camelia rakudo 45e8c4: OUTPUT«(signal ABRT)1␤2␤3␤4␤5␤6␤7␤»
GlitchMr r: for 1..1000 -> $i { say $i; my $error = (my $val = (^10).pick(3).min but "42"); 1 }
camelia rakudo 45e8c4: OUTPUT«(signal ABRT)1␤2␤3␤4␤5␤6␤7␤»
timotimo #5 0x00007ffff03e481f in gc_free (interp=0x60f050, obj=0xeb4e6e0) at P6opaque.c:908
GlitchMr "42" doesn't look like boolean. 14:01
14:01 dakkar joined
GlitchMr r: for 1..1000 -> $i { say $i; my $error = (my $val = (^10).pick(3).min but 88); 1 } 14:01
timotimo so something's incorrectly marked or swept?
camelia rakudo 45e8c4: OUTPUT«(signal SEGV)1␤2␤3␤4␤5␤6␤7␤»
GlitchMr This isn't related to Bool type.
timotimo yeah, seems to be just the but operator
GlitchMr r: for 1..1000 -> $i { say $i; my $error = (my $val = 44 but 88); 1 } 14:02
timotimo perhaps there's a reference to the thing that's but'd, but it's not being made clear to the gc?
camelia rakudo 45e8c4: OUTPUT«(signal ABRT)1␤2␤3␤4␤5␤6␤7␤8␤9␤10␤11␤12␤»
GlitchMr Or even it isn't related to .pick.
timotimo it isn't related to pick, aye
GlitchMr r: for 1..1000 -> $i { say $i; my $val = 44 but 88; 1 }
camelia rakudo 45e8c4: OUTPUT«(signal ABRT)1␤2␤3␤4␤»
timotimo it was to emulate run without running anything
GlitchMr r: for 1..1000 -> $i { say $i; 44 but 88; 1 }
camelia rakudo 45e8c4: OUTPUT«(signal SEGV)1␤2␤3␤4␤»
timotimo but clearly it doesn't have to have any special value at all
GlitchMr It even can be in sink context. 14:03
r: for 1..1000 -> $i { say $i; my @array = 44 but 88; 1 }
camelia rakudo 45e8c4: OUTPUT«(signal SEGV)1␤2␤3␤4␤»
GlitchMr r: for 1..1000 -> $i { say $i; 44 but 88; }
camelia rakudo 45e8c4: OUTPUT«1␤2␤3␤4␤5␤6␤7␤8␤9␤10␤11␤12␤13␤14␤15␤16␤17␤18␤19␤20␤21␤22␤23␤24␤25␤26␤27␤28␤29␤30␤31␤32␤33␤34␤35␤36␤37␤38␤39␤40␤41␤42␤43␤44␤45␤46␤47␤48␤49␤50␤51␤52␤53␤54␤55␤56␤57␤58␤59␤60␤61␤62␤63␤64␤65␤66␤67␤68␤69␤70␤71␤72␤73␤74␤75␤76␤77␤78␤79␤80␤81␤82␤83􏿽xE2
GlitchMr ok
grondilu add written where n > 0: gist.github.com/grondilu/6113160
ahh I meant "had", not "add" 14:04
14:06 pupoque_ is now known as pupoque
GlitchMr I dunno about something else 14:07
r: for 1..1000 -> $i { say $i; for 1 { 44 but 88 }; 1 }
camelia rakudo 45e8c4: OUTPUT«(signal ABRT)1␤2␤3␤4␤5␤6␤7␤8␤9␤10␤11␤»
GlitchMr r: for 1..1000 -> $i { say $i; for 1 { 44 but 88 } }
masak grondilu: does your patch cover the case of n == 0 ? :)
GlitchMr Interesting.
camelia rakudo 45e8c4: OUTPUT«(timeout)1␤2␤3␤4␤5␤6␤7␤8␤9␤10␤11␤12␤13␤14␤15␤16␤17␤18␤19␤20␤21␤22␤23␤24␤25␤26␤27␤28␤29␤30␤31␤32␤33␤34␤35␤36␤37␤38␤39␤40␤41␤42␤43␤44␤45␤46␤47␤48␤49␤50␤51␤52␤53␤54␤55␤56␤57␤58␤59␤60␤61␤62␤63␤64␤65␤66␤67␤68␤69␤70␤71␤72␤73␤74␤75␤76␤77␤78␤79␤80␤81􏿽xE2􏿽x90
masak if not, I have a wonderful optimization to sell you.
FROGGS five euros, that's all 14:08
huf what is 44 but 88 supposed to be?
masak Python also has a .perl equivalent, but it spells it circumfix:<` `> 14:11
PerlJam
.oO( Python will output Perl code?!? )
14:12
good morning all
(or whatever your local daylight/awakedness convention happens to be)
14:13 pmurias left, woosley left
FROGGS hi PerlJam 14:13
[Coke] r: my $a = 44 but 88 ; say $a; say $a/2; 14:14
camelia rakudo 45e8c4: OUTPUT«44␤22␤» 14:15
[Coke] huf: not much, apparently. :)
r: my $a = 44 but "88" ; say $a; say $a/2;
camelia rakudo 45e8c4: OUTPUT«88␤22␤»
masak PerlJam! \o/
PerlJam: I guess I'm getting so used to natural transformations that saying "equivalent" for that one doesn't even feel strange. ;) 14:16
timotimo masak: people will tend to flip out at you if you write it as circumfix:<` `> though
at least IME
masak timotimo: I think it's a wonderful syntax.
14:16 woosley joined
timotimo me, too 14:16
made me quite sad to hear people tell me to never do that again :(
masak timotimo: if I use `...`, people won't know whether to look at the `` or the ...
timotimo: I've never been told that. 14:17
PerlJam timotimo: who are these "people" of which you keep referring?
masak and if I were, I would likely not listen.
FROGGS I understood circumfix:<` `> fwiw :o)
timotimo PerlJam: don't remember who that was, pretty long ago
masak: i meant to say "if you write `foo` instead of repr(foo)" 14:18
masak timotimo: oh! 14:19
timotimo: you were talking about the quotes themselves, not describing them with the 'circumfix:' syntax. 14:20
timotimo: meh -- I don't care about that either.
timotimo yes, i realize now how unclear i was being
masak though maybe to be a functioning member of the Python community you have to listen to all the crap people say about your code.
14:21 shinobicl left
tadzik people are funny 14:22
PerlJam When I hung out on #python regularly a decade or so ago, they were all really reasonable. And oddly (to me), lisp/scheme seemed to have a strong influence there.
But then #python may not have been indicative of the "Python community" either 14:23
masak hard to say. 14:24
hoelzro you know what they say: a few bad apples spoil the bunch.
masak r: sub infix:<is not>($l, $r) { $l !== $r }; say 5 is not 42 14:25
camelia rakudo 45e8c4: OUTPUT«True␤»
masak \o/
infix operators made of multiple words! how appaling! :D
timotimo but "is" is something different from == in python
[Coke] masak;... now extend that to support "5 is not null"! ;)
masak timotimo: aye; just testing.
PerlJam masak: the circumfix of that op is more linquistically interesting :)
(assuming it works)
masak r: sub circumfix:<is not>($x) { $x }; say is 42 not; say "alive" 14:26
camelia rakudo 45e8c4: OUTPUT«42␤alive␤»
masak w... wow.
r: sub infix:<is not>($l, $r) { $l !== $r }; say 5 is␤␤␤␤␤not 42
camelia rakudo 45e8c4: OUTPUT«===SORRY!===␤Two terms in a row␤at /tmp/F53gsZZTEL:1␤------> x:<is not>($l, $r) { $l !== $r }; say 5 ⏏is␤ expecting any of:␤ postfix␤ infix stopper␤ infix or meta-infix␤ statement end␤ state…
timotimo .u ␤ 14:27
yoleaux U+2424 SYMBOL FOR NEWLINE [So] (␤)
masak apparently, arbitrary whitespace doesn't work too well.
[Coke] wouldn't you need to escape it with a \ ?
FROGGS r: sub infix:<is not>($l, $r) { $l !== $r }; say 5 is not 42 # looks like it must match exactly 14:28
camelia rakudo 45e8c4: OUTPUT«===SORRY!===␤Two terms in a row␤at /tmp/_lcw3pFrm2:1␤------> x:<is not>($l, $r) { $l !== $r }; say 5 ⏏is not 42 # looks like it must match ex␤ expecting any of:␤ postfix␤ infix stopper␤ infix or meta-inf…
FROGGS r: sub infix:<is not>($l, $r) { $l !== $r }; say 5 is not 42 # looks like it must match exactly
camelia rakudo 45e8c4: OUTPUT«===SORRY!===␤Two terms in a row␤at /tmp/OqlaZ3pkKe:1␤------> :<is not>($l, $r) { $l !== $r }; say 5 ⏏is not 42 # looks like it must match ex␤ expecting any of:␤ postfix␤ infix stopper␤ infix or meta-inf…
GlitchMr Nope
FROGGS ohh
GlitchMr r: sub infix:<is not>($l, $r) { $l !== $r }; say 5 is not 42
camelia rakudo 45e8c4: OUTPUT«===SORRY!===␤Two terms in a row␤at /tmp/kWAcO43JPJ:1␤------> x:<is not>($l, $r) { $l !== $r }; say 5 ⏏is not 42␤ expecting any of:␤ postfix␤ infix stopper␤ infix or meta-infix␤ sta…
14:28 pupoque left
GlitchMr Actually, that's strange. 14:28
Last time I've done that, it worked.
FROGGS r: sub infix:<is not>($l, $r) { $l !== $r }; say 5 is not 42 # looks like it must match exactly
GlitchMr n: sub infix:<is not>($l, $r) { $l !== $r }; say 5 is not 42
camelia rakudo 45e8c4: OUTPUT«True␤»
niecza v24-88-g1f87209: OUTPUT«True␤»
GlitchMr But perhaps it's because I checked it with Niecza 14:29
FROGGS I believe it splits the name by space when declaring it, and joins it later by one when using it
GlitchMr I know I once implemented <not in> operator in Perl 6, and it worked, even as '$elem not in @array'
masak there's a possible rakudobug in here, methinks. 14:30
what *should* be the expected behavior?
GlitchMr std: sub infix:<is not>($l, $r) { $l !== $r }; say 5 is not 42
camelia std c2215f0: OUTPUT«ok 00:00 48m␤»
GlitchMr STD finds it fine
masak I'm kinda partial to Niecza's behavior.
GlitchMr std: ssay 5 is not 42
camelia std c2215f0: OUTPUT«===SORRY!===␤Two terms in a row at /tmp/QizMY7oTfX line 1:␤------> ssay 5 ⏏is not 42␤ expecting any of:␤ feed_separator␤ infix or meta-infix␤ infixed function␤ statement modifier loop␤Undeclared routine:␤
..'ssay…
GlitchMr std: say 5 is not 42
camelia std c2215f0: OUTPUT«===SORRY!===␤Two terms in a row at /tmp/1rFvv3wCt2 line 1:␤------> say 5 ⏏is not 42␤ expecting any of:␤ feed_separator␤ infix or meta-infix␤ infixed function␤ statement modifier loop␤Parse failed␤FAILED 00:00
..4…
14:30 xilo joined
masak r: sub infix:<is not>($l, $r) { $l !== $r }; say 5 is not 42 14:30
GlitchMr is not is fine in STD
camelia rakudo 45e8c4: OUTPUT«===SORRY!===␤Two terms in a row␤at /tmp/bWaezNw5ua:1␤------> x:<is not>($l, $r) { $l !== $r }; say 5 ⏏is not 42␤ expecting any of:␤ postfix␤ infix stopper␤ infix or meta-infix␤ sta…
masak submits rakudobug
GlitchMr So I assume STD is correct.
14:31 pupoque_ joined
masak yeah, me too. 14:32
GlitchMr I still think that Niecza has better parsers.
(but Rakudo has lots of improvements lately)
14:34 kaleem left
masak GlitchMr: Niecza's parser was closely based on STD.pm6 from the start. 14:35
GlitchMr: Rakudo's parser is older than STD.pm6 -- at least in some sense.
GlitchMr Makes sense. 14:36
masak it has been converging as its grammar engine has evolved to support all the cool things STD.pm6 does.
14:37 Psyche^ joined
dalek atures: 0fd8397 | (Konrad Borowski)++ | features.json:
Rakudo already has threads (but only in JVM)
14:39
grondilu masak: (about the case n==0) No it does not. I assumed it was handled somewhere else.
rn: say 0**0 14:40
camelia rakudo 45e8c4, niecza v24-88-g1f87209: OUTPUT«1␤»
14:40 Psyche^_ left
GlitchMr Why many programming languages define 0**0 to be 1? 14:41
grondilu you think it should be 0? 14:42
GlitchMr What about exception?
benabik Wolfram says (indeterminate)
masak it's not really well-defined, no.
because x**0 and 0**x have different limits.
PerlJam GlitchMr: Because anything raised to the 0th power is 1! ;) 14:43
grondilu Numberphile, "Problems with zero": www.youtube.com/watch?v=BRRolKTlF6Q
GlitchMr en.wikipedia.org/wiki/0%5E0#Zero_to...er_of_zero
Actually, it seems that Wikipedia has some explanation.
PerlJam GlitchMr: also, it's *way* simpler to pull that out than to explain why 0**0 is problematic 14:44
GlitchMr Yeah, I know that 0 ** x = 0, and x ** 0 = 1.
masak likes the set-theoretic one
PerlJam yeah! See? Wikipedia agress with me "interpreting 00 as 1 simplifies formulas and eliminates the need for special cases in theorems"
masak I hadn't heard about that one before.
GlitchMr What about 0**0 == 0&1 in Perl. 14:45
Perl 6*
masak "According to Knuth (1992), it '*has* to be 1'" -- that settles it.
GlitchMr: no.
PerlJam masak++
masak rn: multi infix:<**>(0, 0) { 0 & 1 }; say 0 ** 0 + 5 14:49
camelia rakudo 45e8c4, niecza v24-88-g1f87209: OUTPUT«all(5, 6)␤»
masak GlitchMr: if you want to, you can do that in your own code.
GlitchMr: but I don't see why you went with '0 & 1' instead of, say '0 ^ 1'.
GlitchMr Actually, that's interesting. 14:50
Using multi infix:<**>(0, 0) to define what you want 0 ** 0 to be.
masak that's why Perl 6 includes a pony. 14:51
you get what you wish for.
rn: multi infix:<+>(40, 2) { "SURPRIIIISE!" }; say 40 + 2
camelia rakudo 45e8c4, niecza v24-88-g1f87209: OUTPUT«SURPRIIIISE!␤»
grondilu multi infix:<**>(0, 0) { NaN } # I'd write it like this. 14:52
masak grondilu: but it's two numbers! :P
GlitchMr > multi infix:<**>(0, 0) { "forty two" }
sub infix:<**>(Int , Int ) { ... }
> 0 ** 0
forty two
masak oh, that's where my 42 went...
GlitchMr It's undefined behavior.
(in C)
masak rn: multi infix:<**>(0, 0) { "monkeys fly out GlitchMr's nose!" }; say 0 ** 0 14:53
camelia rakudo 45e8c4, niecza v24-88-g1f87209: OUTPUT«monkeys fly out GlitchMr's nose!␤»
masak sweet.
you're right, that *is* pretty undefined.
GlitchMr So it could as well return pointer to (const char*) "forty two"
Or destroy memory. Or format your harddrive. Or do nothing. 14:54
masak are we still talking about this? monkeys already flew out your nose. 14:55
PerlJam r: multi infix:<**>(0, 0) { 1 but "it's complicated" }; say 0 ** 0;
camelia rakudo 45e8c4: OUTPUT«it's complicated␤»
masak PerlJam: :P
grondilu multi infix:<**>(0, 0) { 0|1 }
:-)
masak neither & | or ^ strike me as more attractive than the others.
GlitchMr r: multi infix:<**>(0, 0) { 0 ** 0 }; say 0 ** 0 14:56
masak junctions are simply the wrong tool here -- *again*.
camelia rakudo 45e8c4: OUTPUT«(timeout)»
masak r: sub term:<⊥>() { ⊥ }; multi infix:<**>(0, 0) { ⊥ }; 0 ** 0 14:57
grondilu seriously though, it should raise an error. Just as with division by zero.
camelia rakudo 45e8c4: OUTPUT«maximum recursion depth exceeded␤current instr.: 'print_exception' pc 105635 (src/gen/CORE.setting.pir:46715) (src/gen/CORE.setting:10075)␤called from Sub 'term:<⊥>' pc 13 ((file unknown):574) (/tmp/GJiSAlO_wC:358)␤called from Sub 'term:<⊥>' pc 32 ((file unknown):5…
masak grondilu: Wikipedia argues otherwise.
GlitchMr NaN? 14:59
grondilu been proposed above but people don't seem to like it 15:00
PerlJam 0 ** 0 == 1 is the most useful interpretation
15:03 konundra left
masak GlitchMr, grondilu: oh, were you under the impression we were still discussing whether to change 0 ** 0 to be something else? sorry about that. 15:07
GlitchMr But even when 0 ** 0 is defined, what about -0e0 ** -0e0?
masak what about it? 15:08
Perl 6 doesn't really have a notion of negative zero.
GlitchMr rn: say -0e0 ** -0e0
camelia rakudo 45e8c4, niecza v24-88-g1f87209: OUTPUT«-1␤»
PerlJam GlitchMr: precedence.
masak rn: say (-0e0) ** -0e0
camelia rakudo 45e8c4, niecza v24-88-g1f87209: OUTPUT«1␤» 15:09
GlitchMr Oh, right
15:10 sqirrel left
PerlJam I have a nice pavlovian response there, but I still can't seem to *anticipate* the precedence problem. Maybe I just need to work with numbers in Perl 6 more. 15:10
15:12 PacoLinux joined
moritz fwiw perl 5 has the same relative precdences in these cases 15:19
grondilu rn: my $n = 5000; say (1+2*pi/$n*i)**$n
camelia niecza v24-88-g1f87209: OUTPUT«1.0039556416172764-3.32041567015014E-06i␤»
..rakudo 45e8c4: OUTPUT«1.00395564161728-3.32041567015014e-06i␤»
15:19 FROGGS left
masak PerlJam: the precedence problem isn't due to wrong design in the precedence table, it's due to conflicting use cases. 15:22
PerlJam aye.
15:26 colomon joined
TimToady blames the mathematicians, and the non-mathematicians 15:32
grondilu made his first pull request on rakudo :-) github.com/rakudo/rakudo/pull/188 15:33
15:34 shinobicl joined
masak grondilu: how about making a new pull request with one commit, instead of a commit and an oops commit? :) 15:38
git makes this quite straightforward, when you know how.
TimToady and quite crookedforward, when you don't :)
masak (basically 'git rebase -i origin/nom', then squash the second commit into the first by changing s/pick/squash/ on the second line) 15:39
arnsholt Or just commit --amend 15:40
grondilu I've been doing this pull request from the github Web interface, for once. So it's different.
(but I guess I can clone it locally now) 15:41
colomon masak: perl 6 certainly does have a notion of negative zero
I had to fix support for it in JVM a few weeks ago. 15:43
rn: say 1 / -Inf 15:44
camelia rakudo 45e8c4: OUTPUT«-0␤»
..niecza v24-88-g1f87209: OUTPUT«0␤»
colomon ugb, nieczabug
ugh
15:44 sidus joined 15:45 kaleem joined
grondilu there is no second line when I run git rebase -i origin/nom. There's only a noop. I don't understand this thing at all :/ 15:47
moritz is your local branch two commits ahead of origin/nom? 15:48
TimToady wonders whether «...» should be taught to recognize embedded [...] for subarrays... 15:51
masak colomon: oh! this is news to me. could you point me to the relevant part of the spec where negative zero is introduced or mentioned? 15:52
15:52 kaleem left
colomon masak: dunno if it's mentioned in the spec at all, but it's part of the ISO standard floating point specification, which Num follows 15:52
it's definitely in roast
masak TimToady: that feels too magical for me. what's your use case?
colomon: ah, yes. 15:53
TimToady support for things like irclog.perlgeek.de/perl6/2013-07-30#i_7387249
only without the commas
masak colomon: IEEE 754.
colomon masak: that's the one
TimToady actually, thinking more like a Q option
masak colomon: then I see what you mean. and yes, then Perl 6 has a notion of negative zero. 15:54
TimToady a literal form for matrices without commas
though I don't think we should reuse the angles for that 15:55
the corner angles, I mean, but I suppose you can say the same for the «...» etc
should probably use the composing square bracket chars instead, starting at U+23A1 15:57
.u ⎡
yoleaux U+23A1 LEFT SQUARE BRACKET UPPER CORNER [Sm] (⎡)
masak /o\ 16:01
TimToady wonders if we can parse them a little like heredocs, to allow expressions containing matrices to continue on the same line
masak IMHO, we're far beyong the line where returns have diminished and Perl 6 shouldn't provide this, modules should. 16:02
beyond*
TimToady sure, just thinking about how it would actually best fit into the language at that point
masak ok, phew.
masak de-panics a bit
TimToady mostly just thinking "are we missing something needed to support such things" 16:03
16:04 pupoque_ left
colomon TimToady: only way to really know is to implement a module and see. ;) 16:04
TimToady the notion of multi-line objects embedded in single lines is...interesting...especially if you allow such an object to protrude in both directions, unlike heredocs, which only protrude downwards 16:05
you'd need specialized characters like ⎡ to introduce such an object unambiguously 16:06
"save this up for the corresponding object located below it"
definition of "corresponding" being somewhat...negotiable... 16:07
16:07 pupoque_ joined
TimToady okay, I've got to the mental position of the mathematician in the burning bed who says "It can be proven" and falls back asleep. :) 16:08
masak :)
for the record, that mathematician is also an idiot...
[Coke] "was"
masak :P 16:09
[Coke] what, I'm agreeing with you! ;)
TimToady
.oO(No programming language ever failed by underestimating the intelligence of the general public of mathematicians...)
masak [Coke]: oh, the ':P' was just "I thought was amusing", not "prrrrrrft!" 16:10
in Python, loops can have 'else' clauses. what were they thinking? 16:11
(the semantics being that if you exit the loop by falling out of the last iteration (rather than 'break'-ing out of the loop earlier), you end up in the 'else' clause.) 16:13
benabik LAST phaser?
masak hm, at first glance, yes.
[Coke] r: for 1..10 -> $a { say $a } else { note "eek" }; 16:14
camelia rakudo 45e8c4: OUTPUT«===SORRY!===␤Confused␤at /tmp/v9aCF7aaOs:1␤------> for 1..10 -> $a { say $a } ⏏else { note "eek" };␤ expecting any of:␤ postfix␤ statement end␤ statement modifier␤ statement modifier loop␤ h…
flussence The one time I've ever found a foreach/else useful is in HTML templates.
[Coke] r: for 1..10 -> $a { say $a } or { note "eek" };
masak rn: for reverse 1..10 { LAST { say "liftoff!" }; .say }
camelia rakudo 45e8c4: OUTPUT«===SORRY!===␤Confused␤at /tmp/iLMUClxBEV:1␤------> for 1..10 -> $a { say $a } ⏏or { note "eek" };␤ expecting any of:␤ postfix␤ statement end␤ statement modifier␤ statement modifier loop␤ hor…
rakudo 45e8c4: OUTPUT«10␤9␤8␤7␤6␤5␤4␤3␤2␤1␤liftoff!␤»
..niecza v24-88-g1f87209: OUTPUT«===SORRY!===␤␤Action method statement_prefix:LAST not yet implemented at /tmp/OHCpwFV1kE line 1:␤------> reverse 1..10 { LAST { say "liftoff!" }⏏; .say }␤␤Unhandled exception: Unable to resolve method statement_level i…
TimToady historically, we do that with 'last OUTERLOOP;'--now is someone would only *implement* that...
masak TimToady: 'OUTERLOOP'?
benabik while/else makes more sense to me than for/else. While/else is just an if that iterates until it hits the else branch. 16:15
TimToady named loops
masak ah.
benabik: troo.
benabik: it even reads well. kinda.
benabik masak: "kinda reads well" sums up a lot of corners of Python 16:16
(IMNSHO)
masak Python: it kinda reads well.
benabik My biggest gripe with working with python was actually that I couldn't use % to jump to the end of blocks in Vim.
(Or to the top from the end. 16:17
masak huh, 'try' has an 'else' too. like our 'default'. 16:18
moritz in a completely unrelated matter, does anybody want a hotkey (like 'l' or 'r') for the "look for new lines" in the IR clogs? 16:19
TimToady you could use 'orelse' on a try
std: try { whatever() } orelse give'em-heck() 16:20
PerlJam moritz: r for "reload" would be nice
camelia std c2215f0: OUTPUT«===SORRY!===␤Undeclared routines:␤ 'give'em-heck' used at line 1␤ 'whatever' used at line 1␤Check failed␤FAILED 00:00 44m␤»
TimToady heh
diakopter TimToady: I was griping the other day when having to use special return values (or special exception values) from subs in order to go to the next iteration of some loop a few calls back in the callstack. is there some other way to "next" to a named loop in the dynamic context?
moritz should "work" the same without curlies, no?
diakopter I've had to do that in every language I've used
moritz huh? perl 5 does that 16:21
diakopter orly
<- pretty uninformed
moritz in "next 'label'", the label is dynamically scoped
diakopter O_O
geekosaur labeled loops, next LABEL;
diakopter same in p6?
16:21 crab2313 joined
moritz I've abused that to emulate non-local reeturns 16:21
TimToady S04:70
synopsebot Link: perlcabal.org/syn/S04.html#line_70
moritz diakopter: I think so, but rakudo doesn't implement it 16:22
grondilu weird:
diakopter ohh
grondilu rn: sub ethiop($z is copy, $n) { [*] gather for $n, * div 2 ...^ 0 { take $z unless $_ %% 2; $z *= $z } }; say ethiop(1i, 2);
camelia niecza v24-88-g1f87209: OUTPUT«1+0i␤»
..rakudo 45e8c4: OUTPUT«-1+0i␤»
diakopter TimToady: okay. actually, I've read this before, but didn't connect it with the actual use case I've needed for some reason. ergh.
TimToady .u ፩ 16:23
yoleaux U+1369 ETHIOPIC DIGIT ONE [No] (፩)
TimToady surely that should be using ethiopic digits...
masak r: constant ፩ = 1; say ፩i
camelia rakudo 45e8c4: OUTPUT«===SORRY!===␤Missing initializer on constant declaration␤at /tmp/o9YjKqe5kq:1␤------> constant ⏏፩ = 1; say ፩i␤ expecting any of:␤ statement list␤ prefix or term␤ prefix or meta-prefix␤»…
masak r: sub term:<፩> { 1 }; say ፩ * i 16:24
camelia rakudo 45e8c4: OUTPUT«0+1i␤»
masak imaginary Ethiopian number.
grondilu rn: sub ethiop($z is copy, $n) { [*] gather for $n, * div 2 ...^ 0 { take $z unless $_ %% 2; $z *= $z } }; say ethiop(1i, 2); # why do niecza return 1 here?
camelia niecza v24-88-g1f87209: OUTPUT«1+0i␤»
..rakudo 45e8c4: OUTPUT«-1+0i␤»
grondilu rn: say 2, * div 2 ...^ 0 16:25
camelia rakudo 45e8c4, niecza v24-88-g1f87209: OUTPUT«2 1␤»
grondilu rn: say [*] -1 16:26
camelia rakudo 45e8c4, niecza v24-88-g1f87209: OUTPUT«-1␤»
grondilu rn: sub ethiop($z is copy, $n) { [*] gather for $n, * div 2 ...^ 0 { say $z; take $z unless $_ %% 2; $z *= $z } }; say ethiop(1i, 2); # why do niecza return 1 here?
camelia niecza v24-88-g1f87209: OUTPUT«0+1i␤-1+0i␤1+0i␤» 16:27
..rakudo 45e8c4: OUTPUT«0+1i␤-1+0i␤-1+0i␤»
16:27 PacoLinux left
moritz grondilu: gather/take is one of the slowest control flow constructs in rakudo, and I'm rather sceptic against its use where it's not really required 16:29
grondilu ok
moritz you can at least make it a grep
or a while/loop 16:30
grondilu is rewriting the thing 16:32
moritz grondilu++ 16:33
PerlJam: 'r' for reload now works (after you've reloaded the page once, to get the new JS)
TimToady 'course, I already have 'r' mapped to reload the whole page; I wonder who will win... 16:34
colomon rn: say 1i * -1
camelia rakudo 45e8c4: OUTPUT«-0-1i␤»
..niecza v24-88-g1f87209: OUTPUT«0-1i␤»
colomon rakudobug
grondilu camelia: rn: gist.github.com/grondilu/6114580
camelia grondilu: niecza v24-88-g1f87209: gist not found
..rakudo 45e8c4: OUTPUT«-1+0i␤»
colomon or at least, rakudoweird 16:35
TimToady say what?
16:35 ggoebel joined
[Coke] r: say 0 * -1; 16:36
camelia rakudo 45e8c4: OUTPUT«0␤»
[Coke] r: say 0+0i * -1;
camelia rakudo 45e8c4: OUTPUT«0+-0i␤»
grondilu rn: sub ethiop($z is copy, $n is copy) { my $p = 1; until $n == 0 { $p *= $z unless $_ %% 2; $z *= $z; $n div=2 }; return $p }; say ethiop(1i, 2); # why do niecza return 1 here?
camelia rakudo 45e8c4: OUTPUT«use of uninitialized value of type Any in numeric context in sub ethiop at /tmp/TRIY5DWKbE:1␤␤use of uninitialized value of type Any in numeric context in sub ethiop at /tmp/TRIY5DWKbE:1␤␤1␤» 16:37
..niecza v24-88-g1f87209: OUTPUT«Use of uninitialized value in numeric context␤ at /home/p6eval/niecza/lib/CORE.setting line 1384 (warn @ 5) ␤ at /home/p6eval/niecza/lib/CORE.setting line 297 (Any.Numeric @ 8) ␤ at <unknown> line 0 (ExitRunloop @ 0) ␤ at /home/p6eval/niecza/lib/CORE.s…
grondilu camelia rn: sub ethiop($z is copy, $n is copy) { my $p = 1; until $n == 0 { $p *= $z unless $_ %% 2; $z *= $z; $n div=2 }; return $p }; say ethiop(1i, 2);
camelia grondilu: rakudo 45e8c4: OUTPUT«use of uninitialized value of type Any in numeric context in sub ethiop at /tmp/buYyNfxWIr:1␤␤use of uninitialized value of type Any in numeric context in sub ethiop at /tmp/buYyNfxWIr:1␤␤1␤»
..niecza v24-88-g1f87209: OUTPUT«Use of uninitialized value in numeric context␤ at /home/p6eval/niecza/lib/CORE.setting line 1384 (warn @ 5) ␤ at /home/p6eval/niecza/lib/CORE.setting line 297 (Any.Numeric @ 8) ␤ at <unknown> line 0 (ExitRunloop @ 0) ␤ at /home/p6eval/niecza/lib/CORE.s…
grondilu sorry, forgot to use /msg
rn: sub ethiop($z is copy, $n is copy) { my $p = 1; until $n == 0 { $p *= $z unless $n %% 2; $z *= $z; $n div=2 }; return $p }; say ethiop(1i, 2); 16:38
camelia rakudo 45e8c4, niecza v24-88-g1f87209: OUTPUT«-1+0i␤»
grondilu that's better
16:39 xinming left
masak submits colomon's rakudoweird 16:40
colomon: hm. wait.
colomon: I don't see anything wrong with it, actually.
oh, yes, I do. 16:41
colomon well, maybe not
masak the -0 makes sense for Num, but not for Int, right?
16:41 xinming joined
colomon masak: it's complex, both parts are num 16:41
masak ok, then no RT ticket.
colomon but yeah, I think it may well be weird but not wrong
masak it most it's a bit ugly.
colomon yeah 16:42
moritz actually -0 makes a lot of sense in rakudo's Int implementation (at least the bigint part) 16:43
16:44 dakkar left
diakopter sigh act.yapc.eu/ye2013/t-shirt/index.html 16:44
moritz as a Perl programmer you need to cope with choice :-) 16:45
16:45 fhelmberger_ joined
masak moritz++ # :) 16:46
diakopter: I see what's happening as simply people getting fed up with waiting. I can understand that. 16:47
diakopter: the "Perl 7" conversation may not be very fulfilling for us, but it's apparently something some people need to get out of their system. 16:48
walk &
16:48 fhelmberger left 16:50 fhelmberger_ left 16:58 hoelzro joined, vk_ joined
grondilu camelia: rn: sub ethiop($z is copy, $n is copy) { my $p = 1; until $n == 0 { $p *= $z unless $n %% 2; $z *= $z; $n div=2 }; return $p }; my $n = 1_000_000; say ethiop((1+2*pi/$n*i)**$n, 2); 16:59
camelia grondilu: niecza v24-88-g1f87209: OUTPUT«1.0000394789777618-1.6537162918112419E-10i␤»
..rakudo 45e8c4: OUTPUT«1.00003947942187-1.65371629254564e-10i␤»
17:00 sqirrel joined 17:01 sqirrel left, konundra joined 17:02 autumn left 17:04 spider-mario joined
grondilu rn: sub ethiop($z is copy, $n is copy) { my $p = 1; until $n == 0 { $p *= $z unless $n %% 2; $z *= $z; $n div=2 }; return $p }; my $n = 1_000_000; my $ethiop = ethiop(1+2*pi/$n*i, $n) ; say (($ethiop - (1+2*pi/$n*i)**$n) / $ethiop).abs 17:05
17:05 autumn joined
camelia rakudo 45e8c4: OUTPUT«1.23246311737701e-10␤» 17:05
..niecza v24-88-g1f87209: OUTPUT«9.8798351056113124E-11␤»
grondilu is not sure this slight difference should matter^ 17:06
17:15 pecastro joined 17:20 birdwindupbird left 17:21 raiph joined 17:34 daxim left
[Coke] man, the jvm run seems slow. :| 17:36
wish I had been timing these. 17:37
grondilu rn: constant n = 1_000_000; say (1+2*355/113/n*i)**n 17:41
camelia rakudo 45e8c4: OUTPUT«1.00001973951597+5.33456224443063e-07i␤»
..niecza v24-88-g1f87209: OUTPUT«1.0000197392939187+5.3345622432461212E-07i␤»
grondilu is trying to compare this to www.wolframalpha.com/input/?i=%281...9**1000000 to see which method is more accurate. It's not obvious. 17:43
rn: constant n = 1_000_000; my $a = 2*pi/n; my $z = cos($a)+sin($a)*i; say $z**n 17:49
camelia niecza v24-88-g1f87209: OUTPUT«1-2.4492127076447545E-16i␤»
..rakudo 45e8c4: OUTPUT«1-2.44921270764475e-16i␤»
grondilu ok, with the ethiopian method I get:
0.999999999990103+2.4980018054066e-16i
and with n=1_000_000_000 I get: 17:52
1.00000004594005-1.38777878078145e-15i
so it really does not seem as stable as using exp(n*log(z)) 17:53
timotimo is it faster though? 18:02
18:05 SamuraiJack_ joined 18:08 gfldex joined 18:12 btyler joined
masak I'd be surprised if it were. 18:16
dalek rl6-roast-data: 3f05e0e | coke++ | / (5 files):
today (automated commit)
18:22
18:22 PacoLinux joined 18:28 lawrmcfa joined
grondilu timotimo: it is quite fast. I haven't noticed much difference. Remember that the loop divides $n by two everytime. 18:31
colomon grondilu: if you haven't benchmarked it, all you're saying is it isn't pathetically slow 18:32
18:32 PacoLinux left
grondilu my $z = rand + rand*i; $z /= $z.abs; say $z**1_000_000_000; 18:32
r: my $z = rand + rand*i; $z /= $z.abs; say $z**1_000_000_000; 18:33
camelia rakudo 45e8c4: OUTPUT«0.780231439064134-0.625490750891914i␤»
grondilu runs time perl6 -e 'my $z = rand + rand*i; $z /= $z.abs; say $z**1_000_000_000;' 18:35
-0.188683823001716+0.982038021554442i
real0m2.991s
user0m2.688s
sys0m0.226s
I can't do the same with nom, as I'd have to recompile
realI0m2.991s is with my local modification.
colomon coerce 1_000_000_000 to Num.
grondilu oh yeay
real0m2.924s
user0m2.658s
sys0m0.201s
colomon but really, you need to do it at least a few hundred times in a loop to get a decent timing,.
grondilu ok
grondilu runs time perl6 -e 'for ^1000 { my $z = rand + rand*i; $z /= $z.abs; say $z**1_000_000_000.Num; }' 18:36
7.679s
grondilu runs time perl6 -e 'for ^1000 { my $z = rand + rand*i; $z /= $z.abs; say $z**1_000_000_000; }'
24.668s You win, guys :) 18:37
TimToady moritz: re irclog.perlgeek.de/perl6/2013-07-30#i_7389078 no, it wouldn't work without the curlies, because try is defined as a statement prefix, and orelse is tighter than that; arguably this could become a FAQ unless we tweak something...
but I suspect any tweaks would just move the wat around 18:38
18:40 SamuraiJack_ left
lizmat is back from cycling, dinner and backlogging 18:45
colomon o/
lizmat Q: I'm looking in Grammar for the place it handles "my Int @a"
suggestions anyone?
or in Actions for that matter 18:48
masak twitter.com/yapcrussia/status/3622...8612199424 twitter.com/yapcrussia/status/3622...4278039554
three other "Perl 6" people and I lost out to "Perl 7" :P 18:49
though if we can claim the "Rakudo Perl" person, it's actually a tie.
and I suspect t's not over yet. 18:50
colomon grondilu: while I don't think I'd seen this exact problem before, I've seen enough of this sort of thing before to have a feel for the performance characteristics. ;)
lizmat masak: since then, at least 2 Perl 6 shirts have been added
which would put it in a tie with Future Perl
18:51 crab2313 left, crab2313 joined
masak lizmat: \o/ 18:53
let's overtake "Future Perl". down with Future Perl! oh wait.
lizmat :-) 18:57
masak .oO( "This, dear grand-daughter, is a 'Perl 7' tee from *2013*." -- "But gramps, how is that possible? lue didn't throw his iPad X against the space elevator until 2040..." )
GlitchMr www.perlmonks.org/?node_id=730203 18:59
And this is from 2008.
PerlJam masak: no, I think it would still be some sort of coffee recepticle, even in 2040 :)
masak PerlJam: clearly you haven't seen the iPad X. 19:01
[Coke] the stim patch is a pretty cool feature. 19:02
diakopter "use perl or die" - "you, use perl now, or else I'll kill you" or "I would die if I couldn't use perl"
GlitchMr irb(main):001:0> use perl or die 19:03
NameError: undefined local variable or method `perl' for main:Object'
I'm not sure whatever Ruby understands that.
masak diakopter: given it's a Russian meme, I always assumed the former. 19:04
diakopter hrm 19:05
masak but reading it as actual Perl code (even though it isn't) would suggest the latter interpretation. 19:07
[Coke] gah, everytime I try to use perlmonks I am reminded why I almost never use perlmonks.
19:12 crab2313 left 19:16 raiph left 19:21 zwut00 joined, zwut00 left, rindolf left
Util_ #ps in 10m 19:22
19:22 rindolf joined, zwut00 joined, zwut00 left 19:23 zwut00 joined, zwut00 left, zwut00 joined
dalek kudo-star-daily: 5832145 | coke++ | log/ (4 files):
today (automated commit)
19:23
19:23 vk_ left
[Coke] no change in any of the failures/missing tests. 19:24
Is anyone planning an R* soon?
moritz tried the last two months, but never found the time to actually do it, and/or deal with the test failures 19:25
19:26 vk_ joined 19:29 aindilis left
[Coke] moritz: I opened tickets with all the failing distros, fwiw. 19:33
19:34 FROGGS joined 19:36 rindolf left 19:37 rindolf joined
labster Where's my Perl 11 T-shirt? 19:38
diakopter Perl 3 was a while ago
labster And before that, Perl <3. 19:39
masak .oO( those who understand binary, 9 other types, and off-by-one errors ) 19:47
dalek kudo/nom: 85971d0 | (Elizabeth Mattijsen)++ | src/core/List.pm:
Restore List.STORE_AT_POS, because apparently LoL.pm needs that

Oddly enough, no tests in the spectest fired because of the absence of this method. Seems LoL is undertested.
19:51
masak time to write more tests! 19:52
frettled masak++ :) 19:53
19:55 kaare_ left, rindolf left, rindolf joined
moritz lizmat: LoL is certainly undertested, because nobody understands it 19:59
lizmat and I thought I was the only one :-)
moritz lizmat: maybe with the exception of TimToady and pmichaud, but I even doubt their interpretations match
timotimo writing code to automate unicode box drawings *and* making sure double and single lines are in makes me very not happy :| 20:05
TimToady LoL may not turn out to be a real type, but it's convenient for talking about the structure of multidimensional slice subscripts
or what gets bound to a ** parameter 20:07
admittedly it's a bit hard to grok, but then, so are surreal numbers, which have a similar structure 20:08
we will see how this all plays out when S09 gets implemented
timotimo finds out he doesn't know anything about LoLs by thinking he knows enough about them and not being confused 20:09
TimToady Ignorance used to be bliss. :)
timotimo "but LoL is just a list of lists! how could it be hard at all?" 20:10
moritz TimToady: I think the "LoL may not turn out to be a real type" is what tripped me so far. It's perfectly find a bind a list of a list to a List, so in the back of my mind I always wondered why we need LoL at all
TimToady implement List[List] and then we'll talk :)
in my mind it's kind of a placeholder, or an alias for List[List] or some such 20:11
moritz but that I don't understand either
I thought that **@a was just like *@a, except it doesn't flatten
but that implies that not every element of @a (in the ** case) needs to be a List 20:12
TimToady it's more like Parcel[Parceloid]
if a Parceloid is anything that can behave as a parcel, including an item
moritz
.oO( a LoL is actually a PoP! )
TimToady I usually think of them as "args"
since one "arg" is what gets bound to one positional 20:13
masak 'night, #perl6
TimToady o/
moritz should follow masak's example
TimToady too, but only for a siesta 20:14
TimToady wonders what "geezer" is in Spanish...
zzz & 20:15
lizmat gnight TimToday, masak! 20:16
PerlJam TimToady: viejo (old man) 20:17
or perhaps "anciano" (ancient man) 20:18
20:27 konundra left
PerlJam my spanish speaking friends sayd "viejito" would be appropriate :) 20:28
20:37 zwut00 left
lizmat looking at BOOTSTRAP, I see that class ObjAt has no parent ?? 20:37
lizmat adds Mu as parent 20:38
20:46 zwut00 joined, zwut00 left
lizmat changes it to Any as parent and spectests again 20:51
20:54 bluescreen100 joined 20:55 bluescreen__ joined 20:56 bluescreen10 left 20:59 bluescreen100 left 21:05 skids left
dalek kudo/nom: d2ae748 | (Elizabeth Mattijsen)++ | src/core/ (23 files):
Copy/Update class and attribute specification in BOOTSTRAP to each module as doc

I hate looking up these things in BOOTSTRAP all the time
21:05
kudo/nom: 92fde30 | (Elizabeth Mattijsen)++ | src/Perl6/Metamodel/BOOTSTRAP.nqp:
Fix some documentation errors / missing documentation
kudo/nom: a7b8f9f | (Elizabeth Mattijsen)++ | src/Perl6/Metamodel/BOOTSTRAP.nqp:
Add missing parent specification for ObjAt (now points to Any)
lizmat and with this, call it a night & 21:06
lizmat just notices that src/core/SubMethod.pm contains the class Submethod (not the lowercase m) 21:13
I can't fix that on my case insensitive but case preserving file system
sleep&
21:18 vk_ left
lue masak: Who decides it's a good idea to give me an Apple®™ product in a space elevator in 2040? 21:27
21:28 iSlug left 21:30 pupoque_ left 21:31 pupoque_ joined 21:41 lawrmcfa left 21:45 PacoAir left 21:46 ecocode joined, spider-mario left 21:51 vk_ joined 22:07 dmol left, BenGoldberg joined 22:19 vk_ left
diakopter masak: rotfl 22:24
22:29 benabik left 22:39 xenoterracide left 22:40 bluescreen__ left 22:45 ecocode left 22:52 benabik joined 22:56 btyler left 22:58 zwut00 joined 23:08 btyler joined, shinobicl left 23:22 xenoterracide joined 23:25 btyler left 23:31 gfldex left, gfldex joined 23:45 sidus left 23:56 sidus joined