»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend!
Set by sorear on 4 February 2011.
00:07 cognominal__ joined 00:08 cognominal_ left
whiteknight hello MikeFair 00:09
00:10 whiteknight left 00:12 cognominal_ joined
dalek ecza: 55f5b8a | (Solomon Foster)++ | lib/CORE.setting:
Implement masak's proposed Hash comparison.
00:12
00:13 Circlepuller_ joined 00:14 tokuhiro_ joined, cognominal__ left 00:16 Circlepuller left 00:17 cognominal_ left 00:33 dayangkun joined 00:39 wamba left 00:44 leont left 00:52 Circlepuller_ left, Circlepuller_ joined
sorear MikeFair: 00:56
n: (2 ** 1000 / 43).ln.say
p6eval niecza v21-23-gd8852de: OUTPUT«689.3859804442518␤»
sorear n: (2 ** 10000 / 43).ln.say
p6eval niecza v21-23-gd8852de: OUTPUT«Inf␤»
colomon .... that's expected, no? 00:59
n: (2 ** 10000).ln.say 01:00
p6eval niecza v21-23-gd8852de: OUTPUT«6931.4718055994526␤»
sorear colomon: MikeFair asked for small projects so I told him Rat.ln is less than awesome in Niecza 01:01
colomon ah
n: say (2 ** 10000 / 43).WHAT 01:02
p6eval niecza v21-24-g55f5b8a: OUTPUT«Rat()␤»
01:02 anuby joined, Tanktalus left
colomon r: (2 ** 10000 / 43).ln.say 01:04
p6eval rakudo 7d6aa0: OUTPUT«No such method 'ln' for invocant of type 'Rat'␤ in block at /tmp/ab72sdhcbN:1␤␤»
colomon ouch
r: (2 ** 10000 / 43).log.say
p6eval rakudo 7d6aa0: OUTPUT«Inf␤»
colomon right, perl6 isn't supposed to have ln 01:05
sorear can common logarithms just die already 01:06
o/ anuby
colomon sorear: in retrospect, I feel very stupid for not handling Rats and FatRats when I did Ints the other day. Wasn't thinking about what it would take to do it.... 01:08
01:14 Tanktalus joined
colomon sorear: why do you need Func<Constants,Variable,Variable,Variable,Variable> for a function which takes three variables 01:19
?
sorear takes three variables, returns one variable, and also needs a reference to something that can be used to fetch JunctionMO 01:21
colomon ah, I see. makes sense, somehow I missed adding the Variable when I added the Variable, if you know what I mean. :) 01:23
01:24 hypolin joined 01:28 tokuhiro_ left
dalek ecza: f357a5a | (Solomon Foster)++ | lib/ (2 files):
Replace expmod with a call to BigInteger.ModPow.
01:30
colomon hopes that will help TimToady out. 01:31
colomon wonders if he can pound out an improved .rand before the release. 01:32
01:36 FROGGS_ joined 01:39 flightrecorder left 01:40 FROGGS left 01:41 flightrecorder joined
sorear colomon: if you don't, I will 01:49
colomon sorear: I understand your basic suggested algorithm, I'm just trying to figure out a graceful way to get the random bits
I see a BigInteger.genRandomBits online, but apparently it's not in "our" BigInteger? 01:50
Random.NextBytes? 01:52
is RNGCryptoServiceProvider.GetBytes available to us?
sorear colomon: anything which is listed as being part of the .NET framework version 2.0 is available 01:55
colomon ooo, so RNGCryptoServiceProvider.GetBytes is! 01:56
sorear "our" BigInteger is a copy of the BSD-licensed System.Numerics.BigInteger from Mono 2.8.x, backported to Mono 2.6 and patched to add bounded serialization
colomon ah 01:57
sorear I'm a little bit ambivalent about using RNGCryptoServiceProvider for this because our existing randomization primitives use the non-crypto System.Random 01:58
colomon it's an easy change either way, right?
sorear right 01:59
msdn.microsoft.com/en-us/library/sy...bytes.aspx fwiw
colomon yep
sorear methinks perl 6 should offer crypto randomness somehow 02:00
and modern crypto RNGs are fast enough that it might not kill us to us them everywhere 02:01
one of my previous projects was an online game
open-source
one of the users cheated by using leaked information to solve for the RNG seed and then predict all game events 02:02
colomon hardcore
sorear the response was to switch all game logic to use a crypto RNG, it... worked suprisingly well
but we weren't using a system-provided RNG anyway, so I have no idea how fast the standard RNGCryptoServiceProvider impl is 02:04
02:05 gootle joined 02:06 Circlepuller joined
colomon n: say 3.log(2) 02:08
p6eval niecza v21-25-gf357a5a: OUTPUT«1.5849625007211563␤»
02:08 Circlepuller_ left
colomon sorear: is there a standard Niecza Random out there, or should I just generate a fresh one? 02:11
02:15 HarryS left 02:16 HarryS joined
sorear colomon: Buildins.rng I think? there's also a locking protocol in use 02:18
colomon okay, will test it with regular random and then look at switching. 02:21
sorear: gist.github.com/3773886 is what I've got so far. It's got at least three issues, I think, but I need to get to bed. Please feel free to hack on it or completely replace it as needed. Or I'll take a look at it again in the morning. 02:33
jferrero /leave 02:36
02:36 jferrero left 02:39 cibs left
sorear colomon: the issues I see are 1. needless switch 2. use of the capitalized name Byte is stylistically inconsistent with other parts of niecza 3. might misbehave with negative numbers 02:39
colomon oh, switch is just 2 ** (bits % 8) - 1, isn't it? 02:40
02:41 cognominal joined
sorear also 02:41
I mean yes
although I'd be more likely to write that 1 << ... 02:42
colomon I'm assuming positive numbers for the input, and added an extra 0 byte to avoid negative numbers
sigh, of course. I'm slow on the uptake tonight.
sorear mostly I'm just interested in avoiding division
colomon actually, the number one problem is that it doesn't work -- there's a weird array bounds error in the BigNumber constructor sometimes.
sorear since that's a slow operation with our bigint library (and in general, but especially so for us) 02:43
colomon division?
sorear as in /
colomon that's on an int
though I guess it could just be bits >> 4
C# int, I mean 02:44
sorear moritz' original algorithm used bigint division
yours doesn't
colomon ah
sorear thinks it's hilarious that GMP uses Newton's method for division in certain cases 02:45
colomon anyway, I should definitely be getting to bed now. apologies for leaving the job unfinished.
o/
sorear good night
02:51 gootle left, gootle joined, gootle left 02:53 gootle joined 02:54 gootle left 02:56 gootle joined 02:59 gootle left 03:01 gootle joined, Circlepuller_ joined 03:02 Circlepuller left 03:30 cibs joined 03:45 moss joined 03:50 REPLeffect left 03:53 moss left 04:11 orafu joined 04:15 telex left 04:19 cognominal_ joined 04:21 cognominal left, telex joined 04:29 chinaxing joined 04:31 telex left 04:33 gootle left 04:35 gootle joined, redpig315 joined, telex joined
redpig315 hello, i'm first in this place 04:36
04:36 sorear joined
sorear oops 04:37
redpig315: greetings. welcome to #perl6. 04:38
redpig315: what brings you here?
redpig315 i see a blog introduce this , from site come here 04:39
sorear cool. which blog?
redpig315 site is :www.php-oa.com 04:41
04:43 redpig315 left, cognominal_ left 04:46 chinaxing left, chinaxing joined
sorear is 扶凯 / Fu Kai one of us? 04:48
04:48 Manu joined, cognominal_ joined, Manu is now known as Guest63777 04:49 Guest63777 left 04:50 REPLeffect joined 05:00 Chillance left 05:01 Tanktalus left 05:05 tokuhiro_ joined 05:07 skids left 05:10 tokuhiro_ left 05:15 Tanktalus joined 05:16 kaleem joined 05:22 chinaxing left 05:24 birdwindupbird joined 05:28 chinaxing joined
kurahaupo n: ((2 ** 10000).ln - 43.ln).say 05:34
p6eval niecza v21-25-gf357a5a: OUTPUT«6927.7106054837586␤»
kurahaupo n: (2 ** 10000/43).ln.say 05:38
p6eval niecza v21-25-gf357a5a: OUTPUT«Inf␤»
kurahaupo n: (2 ** 10000/43).perl.say 05:40
p6eval niecza v21-25-gf357a5a: OUTPUT«<199506311688075838488374216268358508382349683188619245485200894985294388302219466319199616840361945978993311294232091242715564913494137811175937859320963239578557300467937945267652465512660598955205500869181933115425086084606181046855090748660896248880904…
05:44 chinaxing left, cognominal_ left 05:51 flussence left, flussence joined, cognominal_ joined 06:00 odoacre_ is now known as odoacre 06:01 wtw joined 06:07 larks joined, Tanktalus left 06:21 Tanktalus joined 06:33 flightrecorder left 06:34 FROGGS_ left 06:42 Su-Shee_ is now known as Su-Shee, flightrecorder joined
moritz good morning 06:43
sorear o/ moritz 06:45
06:47 FROGGS_ joined 06:58 wamba joined
tadzik good mirning #perl6 07:16
moritz \i tadzik
tadzik :) 07:17
07:33 Psyche^ joined 07:37 Patterner left, Psyche^ is now known as Patterner 07:43 mucker joined, Tanktalus left 07:47 stepnem joined, am0c joined 07:55 kresike joined
kresike good morning all you happy perl6 people 07:55
dalek rlito: 66a00a2 | (Flavio Glock)++ | misc/iterator_engine/iterator_engine (13 files):
Perlito6 - add misc/iterator_engine - the compiler before MiniPerl6 (from 2006)
07:56
07:57 Tanktalus joined 07:59 xinming left 08:03 cognominal_ left 08:05 xinming joined 08:08 cognominal_ joined 08:27 Tanktalus left 08:37 leont joined 08:39 cognominal_ left, cognominal joined 08:40 Tanktalus joined 08:54 dakkar joined
dalek ecza: 1f74b89 | sorear++ | lib/Builtins.cs:
Top removal: cps methods in Builtins
08:56
ecza: c7d9a56 | sorear++ | lib/ (2 files):
Top removal: codegen
ecza: 3a38229 | sorear++ | lib/ (3 files):
Top removal: CLR binding
08:56 fhelmberger joined
dalek rlito: 6350da9 | (Flavio S. Glock)++ | / (2 files):
Perlito5 - js3: use more lvalues
08:58
sorear sleep&
08:59 Tanktalus left
felher good morning people, good night sorear :) 09:00
09:01 sisar joined
tadzik hello kresike, felher 09:05
09:13 kurahaupo left, Tanktalus joined 09:31 ServerSage left 09:33 mucker left 09:35 ServerSage joined
dalek rlito: be26903 | (Flavio S. Glock)++ | / (2 files):
Perlito5 - js3: use more lvalues
09:46
rlito: 0513305 | (Flavio S. Glock)++ | / (3 files):
Perlito5 - js3: autovivify at runtime only
09:48 Circlepuller joined
kresike hello tadzik, felher o/ :) 09:49
09:50 Circlepuller_ left 09:51 Circlepuller left 09:52 Circlepuller joined 10:03 fgomez left 10:05 hypolin left 10:13 ServerSage left 10:18 ServerSage joined 10:26 jerome joined, ServerSage left 10:27 am0c left, Tanktalus left 10:28 am0c joined, dju joined 10:29 birdwindupbird left, leont left 10:35 ServerSage joined 10:40 Tanktalus joined 10:43 anuby left 10:51 dlin joined 10:53 dayangkun left
Ulti pwd 10:53
lol woops!
cognominal pwc 10:54
#perl6
10:55 dlin left, daxim joined
Ulti :) 10:55
btw is there a good way to embed data in Rakudo? I tried doing POD reflection type stuff but it didn't work out. 10:56
10:57 wamba left, dlin joined
dlin hi 10:57
gist.github.com/3775433
Ulti so something like =begin DATA and then say @=DATA;
10:57 birdwindupbird joined
dlin LWP::Simple install error message. 10:58
need help.
10:59 kurahaupo joined
moritz dlin: the pod reflection stuff isn't quite there yet, sorry 11:02
as for the LWP errors, I think I've seen those before
11:02 GlitchMr joined
moritz I'll build a new rakudo and try it; but it'll take some time (slow machine) 11:02
dlin moritz: thanks. 11:03
11:04 ServerSage left 11:05 Su-Shee_ joined 11:07 kurahaupo left, gootle left 11:09 ServerSage joined, Su-Shee left 11:14 Su-Shee_ is now known as Su-Shee, ServerSage left, kenjiskywalker joined
tadzik Ulti: you can do =begin code\nblablabla\n=end code, and then $=pod[$n] will give you a Pod::Code block 11:18
which is a raw, non-processed data
Ulti awesome
thanks tadzik
tadzik do you know how those $=pod array works? 11:19
Ulti nope?
tadzik well, it's just an array of pod blocks :)
but you have to be aware that indexes will change if you move stuff around
Ulti that's ok
tadzik so if you put two blocks like this, you'll have them as $=pow[0] and $=pod[1], depending on the ordering
Ulti easier than if I had external files and moved them around 11:20
tadzik sure :)
11:20 ServerSage joined
Ulti tadzik: is it part of the spec to preserve the indexes based on the ordering in the file? 11:20
tadzik Ulti: I think so
Ulti so I can rely on it?
ok
tadzik well
spectests rely on it
Ulti "rely"
I can just add a string to the top so I know which is which
11:20 mucker joined
tadzik see github.com/perl6/roast/blob/master...elimited.t for example 11:21
Ulti perfect thank you
tadzik you're welcome
11:22 kenjiskywalker left, kurahaupo joined
Ulti oh you can just use .name to find the right section 11:24
tadzik ...the spec says so, yes... 11:25
I work on Pod far less than I should these days
11:26 kenjiskywalker joined
Ulti tadzik: looks quite functional to me! 11:29
tadzik huh, it works? :P
I mean, .name?
Ulti yeah
11:29 mtk joined
moritz thought .name just reported the name 11:29
tadzik O_o I don't remember implementing that...
the name from :name<foo>? 11:30
Ulti yeah it reports just the name, so finding the right section by name is quite easy
tadzik ok, cool
moritz tadzik: I think that =begin code ... =end code makes .name eq 'code'
tadzik shouldn't be too hard to make $=pod associative too then
ah, that's right
so it comes from Pod::Block::Named
or so 11:31
Ulti yeah thats what I see
now thats done, LUNCH!
:) thanks
11:33 yarp joined
masak morning, #perl6 :) 11:37
moritz dlin: I've reproduced your issue with LWP::Simple and opened a ticket at github.com/cosimo/perl6-lwp-simple/issues/19 11:38
dlin: I'm afraid I don't have an easy fix though :(
dlin moritz: thanks
moritz good UTC morning, masak
the parse_chunks methods is... not the most readable one I've encountered so far 11:39
tadzik masak! \o/
11:40 wamba joined 11:41 kenjiskywalker left
moritz note that several socket-related modules have started to show failures, so it might be fallout from the parrot io_cleanup branch, but so far nobody has nailed it down yet 11:41
11:42 kenjiskywalker joined
daxim rakudo: <1 2 3 4 5 1 2 2 2 2>.map(-> _ { _ => "x_" }).uniq.sort.say 11:44
p6eval rakudo 7d6aa0: OUTPUT«===SORRY!===␤Invalid typename in parameter declaration at line 2, near " { _ => \"x"␤»
daxim rakudo: <1 2 3 4 5 1 2 2 2 2>.map(-> $_ { $_ => "x$_" }).uniq.sort.say
p6eval rakudo 7d6aa0: OUTPUT«"1" => "x1" "2" => "x2" "3" => "x3" "4" => "x4" "5" => "x5"␤»
daxim wheeee 11:45
scala looks like that all the time
11:46 wamba left 11:47 kurahaupo left
moritz r: my @a = <1 2 3 4 5 1 2 2 2 2>; say (@a Z=> ('x' X~ @a)).uniq.sort 11:48
p6eval rakudo 7d6aa0: OUTPUT«"1" => "x1" "2" => "x2" "3" => "x3" "4" => "x4" "5" => "x5"␤»
daxim is a named variable strictly needed for hyper ops? 11:49
11:51 kenjiskywalker left
moritz well, you can always cheat 11:53
r: given <1 2 3 4 5 1 2 2 2 2> { say *.list Z=> ( 'x' X~ .list)).uniq.sort) } 11:54
p6eval rakudo 7d6aa0: OUTPUT«===SORRY!===␤Unable to parse blockoid, couldn't find final '}' at line 2, near ").uniq.sor"␤»
moritz r: given <1 2 3 4 5 1 2 2 2 2> { say (.list Z=> ( 'x' X~ .list)).uniq.sort) }
p6eval rakudo 7d6aa0: OUTPUT«===SORRY!===␤Unable to parse blockoid, couldn't find final '}' at line 2, near ") }"␤»
moritz r: given <1 2 3 4 5 1 2 2 2 2> { say (.list Z=> ( 'x' X~ .list).uniq.sort) }
p6eval rakudo 7d6aa0: OUTPUT«1 x1 2 x2 3 x3 4 x4 5 x5␤»
11:54 kenjiskywalker joined
moritz r: given <1 2 3 4 5 1 2 2 2 2> { say (.list Z=> ( 'x' X~ .list).uniq.sort).perl } 11:54
p6eval rakudo 7d6aa0: OUTPUT«("1" => "x1", "2" => "x2", "3" => "x3", "4" => "x4", "5" => "x5").list␤»
moritz r: say (<1 2 3 4 5 1 2 2 2 2> Xxx2).map(* => 'x' ~ *).uniq.sort 11:58
p6eval rakudo 7d6aa0: OUTPUT«===SORRY!===␤Unable to parse postcircumfix:sym<( )>, couldn't find final ')' at line 2, near "<1 2 3 4 5"␤»
moritz r: say (<1 2 3 4 5 1 2 2 2 2> Xxx 2).map(* => 'x' ~ *).uniq.sort
p6eval rakudo 7d6aa0: OUTPUT«"1" => "x1" "2" => "x2" "3" => "x3" "4" => "x4" "5" => "x5"␤»
daxim neat 11:59
although I can foresee a blog post in the future: "40 uses of »*« (you didn't know about)" 12:00
9 uses of {} is p5 is confusing enough
colomon nr: say (<1 2 3 4 5 1 2 2 2 2> Xxx 2).map(* => 'x' ~ *).uniq.sort 12:01
p6eval rakudo 7d6aa0: OUTPUT«"1" => "x1" "2" => "x2" "3" => "x3" "4" => "x4" "5" => "x5"␤»
..niecza v21-28-g3a38229: OUTPUT«val("1") => "x1" val("2") => "x2" val("3") => "x3" val("4") => "x4" val("5") => "x5"␤»
colomon oh, Xxx 2 ! sneaky 12:02
moritz could have written >>xx>> 2 too :-)
12:03 snearch joined
moritz (note that I don't write production p6 code like that, I reserve it for golfing or showing off) 12:03
colomon surely though using .map({ $_ => "x$_"; }) is the cleanest way to do it?
moritz yes
(though rakudo might need {; $_ => "x$_" } to not make it a hash)
12:15 benabik left, benabik joined 12:20 benabik left 12:21 dlin left 12:30 sisar left 12:35 benabik joined 12:41 Tanktalus left 12:53 Tanktalus joined 12:56 benabik left 12:59 jerome left 13:03 pmurias joined
pmurias sorear: re predicting the seed, what game was that? 13:03
13:05 cognominal left 13:18 atrodo joined 13:21 PacoAir joined 13:24 PacoAir left
daxim pmurias, last link in nethackwiki.com/wiki/Random_number_generator 13:25
13:25 PacoAir joined, Tanktalus left 13:28 tokuhiro_ joined 13:34 skids joined 13:38 Tanktalus joined 13:40 dayangkun joined 13:53 stopbit joined 13:54 Exodist joined 13:55 dayangkun left 13:56 mucker left 14:01 kaleem left 14:02 flightrecorder left, FROGGS_ left 14:03 flightrecorder joined 14:12 sctt joined 14:15 FROGGS_ joined 14:16 cognominal joined
colomon 's new rand for Niecza, when given 10.rand, always seems to return "8" or throw an array index is out of range exception. 14:17
moritz colomon: that sounds very XKCD random :-) 14:20
dalek rlito: e9bb73a | (Flavio S. Glock)++ | / (3 files):
Revert "Perlito5 - js3: autovivify at runtime only"

This reverts commit 051330579fa45a7e3805eac530fede1688c502ae.
rlito: 0aabeec | (Flavio S. Glock)++ | / (2 files):
Revert "Perlito5 - js3: use more lvalues"

This reverts commit be269030092f47a4bac6f600e8f032e44b231e1f.
rlito: 4ee7aa4 | (Flavio S. Glock)++ | / (2 files):
Revert "Perlito5 - js3: use more lvalues"

This reverts commit 6350da957b557bdf3fc7bb7cbf42d67a1de53dd5.
rlito: de8dc24 | (Flavio S. Glock)++ | / (3 files):
Perlito5 - js3: implement "lvalue"; fix incr/decr
flussence star: use Grammar::Debugger; grammar blargh { } 14:21
p6eval star 2012.07: ( no output )
flussence it barfs with "Invalid BUILDALLPLAN" locally :/
14:25 wtw left
spacebat_ is there much in the way of introspection in rakudo - such as in python there help(dict) might tell you more than you wanted to know about dictionary types 14:27
colomon spacebat_: I believe rakudo has that, but I don't recall the way to trigger it off the top of my head. 14:28
spacebat_ so, not introspection per se, but inspectable docstrings
colomon right
arnsholt Documentation is a bit of a sore point, IIRC, but introspection via the MOP we have in spades 14:29
colomon (there is real introspection as well)
14:29 sirrobert joined
arnsholt Although the p6doc project is helping on the docs front 14:29
colomon spacebat_: tadzik++ did the work to implement it, I just wasn't paying close enough attention to remember how to do it.
Su-Shee is help() in python a mix of pydoc foo and foo.WHAT so to speak? 14:30
tadzik I dunno what's help() in python
spacebat_ it pulls the docstring of the object (which may be a module) and formats it nicely
tadzik we could write that 14:31
Su-Shee spacebat_: what's the difference to pydoc if I may ask stupidly?
spacebat_ help is available at the python repl
I'm no python expert - haven't used it a long time - perl5 is my dayjob
moritz well, the idea is that you can &foo.WHY and get the Pod back 14:32
Su-Shee spacebat_: oehm then I have no clue :)
spacebat_ ok so perl6doc and perl6 --doc seem like pydoc for scripts and modules
colomon r: &say.WHY
p6eval rakudo 7d6aa0: ( no output )
moritz most of the infrastructure for that is in place, but some pieces are still missing
colomon r: say &say.WHY 14:33
p6eval rakudo 7d6aa0: OUTPUT«Any()␤»
spacebat_ I'm just playing around, got an IO::Path object, wondered what I can do with it
moritz in particular the link between the perl6/doc repo and $obj.WHY is still missing
spacebat_: I think that's described in S32::IO
spacebat_ yup, I just wondered if I was missing out on some self documentation features 14:34
colomon phenny: tell sorear it turns out my array index bound error was a BigInteger bug: sending the constructor the number 0 stored as two or more bytes fails.
phenny colomon: I'll pass that on when sorear is around.
pmurias #= for inline POD is implemented? 14:41
14:41 sisar joined
moritz yes, I think so 14:41
not for every object type though
but it should work for subs
tadzik subs, classes, methods 14:43
not for variables though
last time I tried it was segfaulting :)
but that was long ago, could be differentnow
also module, package etc
spacebat_ so for introspection, say I have an object, what's the best way to list the methods and attributes of the object or its class? 14:45
hoelzro $obj.^attributes
$obj.^methods
(iirc)
spacebat_ thanks :)
hoelzro =)
sisar Null PMC access error: gist.github.com/3776279. I know, line 7 should be "$n.say" instead of ".say", but I was not expecting a Null PMC error. Is this already reported ? 14:46
colomon rn: say 10 ** 10000
p6eval niecza v21-28-g3a38229: OUTPUT«1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000…
..rakudo 7d6aa0: OUTPUT«1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000…
14:47 bluescreen10 joined
moritz sisar: at least I am aware of this error 14:48
colomon rn: say (10 ** 1000).rand 14:49
p6eval rakudo 7d6aa0, niecza v21-28-g3a38229: OUTPUT«Inf␤»
14:50 sctt left, spider-mario joined 14:51 kaare_ joined
sisar moritz: do you know what the actual error is ? I'm unable to golf it further. 14:52
14:55 mucker joined, am0c left 14:57 yarp left
moritz r: (-> { .say }).() 14:58
p6eval rakudo 7d6aa0: OUTPUT«Any()␤»
moritz r: (-> $n { .say }).($n)
p6eval rakudo 7d6aa0: OUTPUT«===SORRY!===␤Variable $n is not declared␤at /tmp/HVDgHIqTTY:1␤»
Su-Shee NOW if THAT isn't the best hug-related image EVER then I don't know! :) 0.asset.soup.io/asset/3782/2416_3a53.jpeg
moritz r: (-> $n { .say }).(2) 14:59
p6eval rakudo 7d6aa0: OUTPUT«Any()␤»
15:01 birdwindupbird left
[Coke] Su-Shee++ 15:02
moritz r: for 1 -> $n { .say } 15:07
p6eval rakudo 7d6aa0: OUTPUT«Any()␤»
15:07 fhelmberger left
moritz r: for 1 -> $n { if 1 { .say } } 15:07
p6eval rakudo 7d6aa0: OUTPUT«Null PMC access in find_method('say')␤ in block at /tmp/dhx0itYLo5:1␤ in method reify at src/gen/CORE.setting:5239␤ in method reify at src/gen/CORE.setting:5141␤ in method reify at src/gen/CORE.setting:5141␤ in method gimme at src/gen/CORE.setting:5519␤ in m…
moritz r: if 1 -> $n { if 1 { .say } }
p6eval rakudo 7d6aa0: OUTPUT«Any()␤»
moritz sisar: seems to require an 'if' inside a 'for'
sisar moritz: hmm. Does this look similar: rt.perl.org/rt3/Ticket/Display.html?id=113904 ? 15:09
sisar afk 15:11
moritz sisar: yes, same problem 15:13
cognominal hum. nqp has a sort function that use a comparator, bt apparently non <=> or cmp 15:14
15:15 sisar left
colomon is it just me, or are the S32-list/pick.t tests starting at line 108 or so really, really broken? 15:17
oh, not broken, just weird 15:18
I guess written without uniq
15:20 Chillance joined 15:25 mucker left
dalek ast: 2d6c012 | (Solomon Foster)++ | S32-list/ (2 files):
Add tests for roll and pick given a huge integer range.
15:26
colomon those probably need fudging for rakudo. don't work in niecza yet, either. 15:27
colomon is currently spectesting a patch for it. 15:30
15:34 tokuhiro_ left 15:35 tokuhiro_ joined 15:39 tokuhiro_ left
colomon 's spectest run is not going to finish before he has to go fetch his son from preschool. :( 15:46
15:52 telex left 15:54 Circlepuller_ joined 15:57 Circlepuller left
kresike bye folks 16:00
16:00 kresike left 16:06 MayDaniel joined 16:14 cognominal left
dalek ecza: e3c9e71 | (Solomon Foster)++ | lib/ (3 files):
Fix bug with large 0 initialization in BigInteger. Add bigrand C# function. Use it to properly implement integer Range.roll (and by extension, Range.pick).
16:19
16:20 Targen left
dalek ecza: 5626cc3 | (Solomon Foster)++ | lib/Builtins.cs:
Use Niecza's standard Random number generator instead of creating a fresh one just for bigrand.
16:24
sirrobert in general if I'm going to write my own accessor for an object property, should I declare the property as $! instead of $. ? 16:26
are there other effects of using $.foo that I should know about?
(besides creating meta methods)
tadzik probably. IIRC $.foo declares a multi method anyway
16:26 Tanktalus left
colomon n: say 1 16:26
p6eval niecza v21-28-g3a38229: OUTPUT«1␤»
tadzik sirrobert: $! is probably the way to go 16:27
sirrobert ok, thanks
colomon evalbot: rebuild niecza 16:28
p6eval: rebuild niecza
tadzik evalbot rebuild niecza
p6eval OK (started asynchronously)
colomon tadzik++ 16:29
tadzik bows
colomon n: say 1 16:34
p6eval niecza v21-30-g5626cc3: OUTPUT«1␤»
colomon n: say (1..10**1000).pick(3)
p6eval niecza v21-30-g5626cc3: OUTPUT«8352343316367051719535682886505684717364232081454091004608011832671811437135322363635737089230612143341797556189319616076667164518861164658605022207595578853580162174086748553659887834144464471190386311711860238404045877380277115192134737186223384038784034…
16:38 cognominal joined 16:39 Tanktalus joined 16:40 telex joined 16:43 cognominal left 16:46 cognominal joined
colomon n: say (1..10**1000).pick(3).map(*.log) 16:50
p6eval niecza v21-30-g5626cc3: OUTPUT«2300.5410696508461 2302.2650395859964 2300.7792676594859␤»
colomon n: say (1..10**1000).pick(3).map(*.log10)
p6eval niecza v21-30-g5626cc3: OUTPUT«999.93091873202661 999.6052140959921 999.92102784624421␤»
16:51 cognominal left
colomon :) 16:51
16:52 flightrecorder left, FROGGS_ left
[Coke] n: say (1, 3, 7 ... * > 10**1000)[12345]; 16:52
p6eval niecza v21-30-g5626cc3: OUTPUT«Unhandled exception: Unable to figure out pattern of series␤ at /home/p6eval/niecza/lib/CORE.setting line 1437 (die @ 5) ␤ at /home/p6eval/niecza/lib/CORE.setting line 3203 (get-next-closure @ 37) ␤ at /home/p6eval/niecza/lib/CORE.setting line 3215 (ANO…
[Coke] yah, I wonder what I was thinking there, p6eval.
colomon n: say (1..10**1000).pick(10).map(*.log10) 16:54
p6eval niecza v21-30-g5626cc3: OUTPUT«999.90048465599386 999.691347113721 999.83381805044053 998.57659083751332 999.65561938205019 999.8384277345109 999.70608497679632 999.84154707939138 999.94576132351165 999.994153811664␤»
colomon n: say (2**1345-1).is-prime 16:55
p6eval niecza v21-30-g5626cc3: OUTPUT«False␤»
colomon n: say (1, 2, 4 ... *).grep(*.is-prime)[^100]
whopos
p6eval niecza v21-30-g5626cc3: OUTPUT«(timeout)» 16:56
colomon n: say (1, 2, 4 ... *).grep({ ($_-1).is-prime })[^50]
p6eval niecza v21-30-g5626cc3: OUTPUT«(timeout)»
16:56 benabik joined
spider-mario n: (1 .. 10 ** 1000).pick(10)».log10.say 16:57
p6eval niecza v21-30-g5626cc3: OUTPUT«999.73396306554241 999.99977216638456 999.81859410595416 998.7289671874878 999.63204745742416 998.46853023643462 999.13214482450564 999.83413333966689 999.7473622348158 999.29581558199072␤»
colomon n: say (1..*).map(* ** 2).grep(*.is-prime)[^10]
p6eval niecza v21-30-g5626cc3: OUTPUT«(timeout)» 16:58
spider-mario whoa, .is-prime is built-in?
[Coke] as of a week or so ago, yes.
spider-mario n: (1 .. 20).grep: *.is-prime
p6eval niecza v21-30-g5626cc3: ( no output )
spider-mario n: (1 .. 20).grep(*.is-prime).say
p6eval niecza v21-30-g5626cc3: OUTPUT«2 3 5 7 11 13 17 19␤»
spider-mario not bad :|
colomon n: say (1..*).map(* ** 2).grep(*.is-prime)[^4] 16:59
p6eval niecza v21-30-g5626cc3: OUTPUT«(timeout)»
colomon that should not be slow. :(
moritz huh? there's no single square number that is also a prime 17:00
colomon n: say (1..4).map(* ** 2).grep(*.is-prime)
[Coke] colomon: something too eager?
p6eval niecza v21-30-g5626cc3: OUTPUT«␤»
colomon must be
n: say (1..4).map(* ** 2 - 1).grep(*.is-prime)
p6eval niecza v21-30-g5626cc3: OUTPUT«3␤»
[Coke] or what moritz said!
colomon oh, duh!~
moritz++
[Coke] moritz++
colomon n: say (1..*).map(* ** 2 - 1).grep(*.is-prime)[^4]
p6eval niecza v21-30-g5626cc3: OUTPUT«(timeout)» 17:01
moritz r: say (1..*).map(* ** 2 - 1).grep(*.is-prime)[^4]
p6eval rakudo 7d6aa0: OUTPUT«(timeout)»
moritz r: say (1..*).map(* ** 2 - 1).grep(*.is-prime)[0]
p6eval rakudo 7d6aa0: OUTPUT«3␤»
moritz r: say (1..*).map(* ** 2 - 1).grep(*.is-prime)[^2]
colomon n: say (1..100).map(* ** 2 - 1).grep(*.is-prime)[^4]
p6eval rakudo 7d6aa0: OUTPUT«(timeout)» 17:02
niecza v21-30-g5626cc3: OUTPUT«3 Any() Any() Any()␤»
moritz
.oO( ... )
17:02 dakkar left
moritz r: say (1..*).map(2 ** $_ - 1).grep(*.is-prime)[^2] 17:02
p6eval rakudo 7d6aa0: OUTPUT«use of uninitialized variable $_ of type Any in numeric context in block at /tmp/kLPii1Yr5U:1␤␤No such method 'count' for invocant of type 'Int'␤ in method reify at src/gen/CORE.setting:5218␤ in method reify at src/gen/CORE.setting:5141␤ in method reify at src…
colomon dang it, backwards again
n: say (1..100).map(2 ** * - 1).grep(*.is-prime)[^4]
p6eval niecza v21-30-g5626cc3: OUTPUT«3 7 31 127␤»
colomon n: say (1..100).map(2 ** * - 1).grep(*.is-prime)[^10]
p6eval niecza v21-30-g5626cc3: OUTPUT«3 7 31 127 8191 131071 524287 2147483647 2305843009213693951 618970019642690137449562111␤»
moritz r: say (1..100).map(2 ** * - 1).grep(*.is-prime)[^10] 17:03
p6eval rakudo 7d6aa0: OUTPUT«3 7 31 127 8191 131071 524287 2147483647 2305843009213693951 618970019642690137449562111␤»
colomon n: say (1..100).map(2 ** * - 1).grep(*.is-prime)[20]
p6eval niecza v21-30-g5626cc3: OUTPUT«Any()␤»
colomon n: say (1..*).map(2 ** * - 1).grep(*.is-prime)[20]
p6eval niecza v21-30-g5626cc3: OUTPUT«(timeout)»
colomon n: say (1..*).map(2 ** * - 1).grep(*.is-prime)[11] 17:05
p6eval niecza v21-30-g5626cc3: OUTPUT«170141183460469231731687303715884105727␤»
colomon n: say (1..*).map(2 ** * - 1).grep(*.is-prime)[12]
p6eval niecza v21-30-g5626cc3: OUTPUT«(timeout)»
moritz r: say (1..*).map(2 ** * - 1).grep(*.is-prime)[11] 17:06
p6eval rakudo 7d6aa0: OUTPUT«170141183460469231731687303715884105727␤»
moritz r: say (1..*).map(2 ** * - 1).grep(*.is-prime)[12]
p6eval rakudo 7d6aa0: OUTPUT«6864797660130609714981900799081393217269435300143305409394463459185543183397656052122559640661454554977296311391480858037121987999716643812574028291115057151␤»
moritz r: say (1..*).map(2 ** * - 1).grep(*.is-prime)[13]
p6eval rakudo 7d6aa0: OUTPUT«531137992816767098689588206552468627329593117727031923199444138200403559860852242739162502265229285668889329486246501015346579337652707239409519978766587351943831270835393219031728127␤»
moritz r: say (1..*).map(2 ** * - 1).grep(*.is-prime)[15]
colomon libtommath++
p6eval rakudo 7d6aa0: OUTPUT«1475979915214180235084898622737381736312066145333169775147771216478570297878078949377407337049389289382748507531496480477281264838760259191814463365330269540496961201113430156902396093989090226259326935025281409614983499388222831448598601834318536230923772641390209…
moritz r: say (1..*).map(2 ** * - 1).grep(*.is-prime)[16] 17:07
p6eval rakudo 7d6aa0: OUTPUT«(timeout)»
moritz wasn't the supposed formula for primes 2 ** (2 ** $_) - 1 ? 17:09
colomon moritz: depends on what you mean by "supposed" 17:11
primes.utm.edu/mersenne/
the [^10] calculation both niecza and rakudo do easily took 300 years of math to establish! 17:12
n: say (1..258).map(-> $n { $n => 2 ** $n - 1).grep(*.value.is-prime)[12] 17:14
p6eval niecza v21-30-g5626cc3: OUTPUT«===SORRY!===␤␤Unable to parse block at /tmp/JJwyGDD4U6 line 1:␤------> say (1..258).map(-> $n {⏏ $n => 2 ** $n - 1).grep(*.value.is-prim␤Couldn't find final '}'; gave up at /tmp/JJwyGDD4U6 line 1:␤------> y (1..258…
colomon n: say (1..258).map(-> $n { $n => 2 ** $n - 1}).grep(*.value.is-prime)[12]
p6eval niecza v21-30-g5626cc3: OUTPUT«Any()␤»
colomon n: say (1..258).map(-> $n { $n => 2 ** $n - 1}).grep(*.value.is-prime)
p6eval niecza v21-30-g5626cc3: OUTPUT«2 => 3 3 => 7 5 => 31 7 => 127 13 => 8191 17 => 131071 19 => 524287 31 => 2147483647 61 => 2305843009213693951 89 => 618970019642690137449562111 107 => 162259276829213363391578010288127 127 => 170141183460469231731687303715884105727␤»
17:20 sisar joined 17:21 jaldhar_ joined
colomon is starting to wonder to what extent libtommath is cheating... 17:21
17:21 _jaldhar left 17:22 stopbit left 17:23 stopbit joined
colomon or if it is cheating, or just optimizing for very large numbers. 17:23
[Coke] r: my $primes := (1..*).grep(*.is-prime); for 1..1000 -> $i { if $primes[$i]+2 == $primes[$i + 1 ] { say $primes[$i] ~ ":" ~ $primes[$i+1] } }
p6eval rakudo 7d6aa0: OUTPUT«3:5␤5:7␤11:13␤17:19␤29:31␤41:43␤59:61␤71:73␤101:103␤107:109␤137:139␤149:151␤179:181␤191:193␤197:199␤227:229␤239:241␤269:271␤281:283␤311:313␤347:349␤419:421␤431:433␤461:463␤521:523␤569:571␤599:601␤617:619␤641:643␤659:661␤809:811␤821:823␤827:829␤857:859␤881:883␤1019:…
[Coke] Can someone sixify that more?
I know a guy who did that as his masters thesis, would love to show him a single line of perl6 for it. :) 17:24
colomon ;)
[Coke] (of course, that was 20 years ago.) 17:25
17:25 sisar left
[Coke] I was trying to think of a nice way to take a series and do a lagging calculation on it, but was stumped. 17:25
17:25 kurahaupo joined
colomon List::Utils sliding-window. ;) 17:25
r: say (1..*).grep(-> $n { $n.is-prime && ($n + 2).is-prime }).map(-> $n { $n ~ " : " ~ $n + 2 }) 17:27
whoops
17:27 sisar joined
p6eval rakudo 7d6aa0: OUTPUT«(timeout)» 17:27
colomon r: say (1..*).grep(-> $n { $n.is-prime && ($n + 2).is-prime }).map(-> $n { $n ~ " : " ~ $n + 2 })[^1000] 17:28
p6eval rakudo 7d6aa0: OUTPUT«(timeout)»
17:28 benabik_ joined
colomon r: say (1..*).grep(-> $n { $n.is-prime && ($n + 2).is-prime }).map(-> $n { $n ~ " : " ~ $n + 2 })[^100] 17:28
p6eval rakudo 7d6aa0: OUTPUT«3 : 5 5 : 7 11 : 13 17 : 19 29 : 31 41 : 43 59 : 61 71 : 73 101 : 103 107 : 109 137 : 139 149 : 151 179 : 181 191 : 193 197 : 199 227 : 229 239 : 241 269 : 271 281 : 283 311 : 313 347 : 349 419 : 421 431 : 433 461 : 463 521 : 523 569 : 571 599 : 601 617 : 619 641 :…
colomon n: say (1..*).grep(-> $n { $n.is-prime && ($n + 2).is-prime }).map(-> $n { $n ~ " : " ~ $n + 2 })[^100] 17:29
p6eval niecza v21-30-g5626cc3: OUTPUT«3 : 5 5 : 7 11 : 13 17 : 19 29 : 31 41 : 43 59 : 61 71 : 73 101 : 103 107 : 109 137 : 139 149 : 151 179 : 181 191 : 193 197 : 199 227 : 229 239 : 241 269 : 271 281 : 283 311 : 313 347 : 349 419 : 421 431 : 433 461 : 463 521 : 523 569 : 571 599 : 601 617 : …
colomon rn: say (1..*).grep(-> $n { $n.is-prime && ($n + 2).is-prime }).map(-> $n { $n ~ " : " ~ $n + 2 })[^200]
p6eval niecza v21-30-g5626cc3: OUTPUT«3 : 5 5 : 7 11 : 13 17 : 19 29 : 31 41 : 43 59 : 61 71 : 73 101 : 103 107 : 109 137 : 139 149 : 151 179 : 181 191 : 193 197 : 199 227 : 229 239 : 241 269 : 271 281 : 283 311 : 313 347 : 349 419 : 421 431 : 433 461 : 463 521 : 523 569 : 571 599 : 601 617 : …
..rakudo 7d6aa0: OUTPUT«3 : 5 5 : 7 11 : 13 17 : 19 29 : 31 41 : 43 59 : 61 71 : 73 101 : 103 107 : 109 137 : 139 149 : 151 179 : 181 191 : 193 197 : 199 227 : 229 239 : 241 269 : 271 281 : 283 311 : 313 347 : 349 419 : 421 431 : 433 461 : 463 521 : 523 569 : 571 599 : 601 617 : 619 641 :…
[Coke] colomon++ 17:30
colomon of course, this version takes twice as long
17:31 benabik left, benabik_ is now known as benabik 17:33 FROGGS joined, flightrecorder joined 17:34 sisar left
colomon_ am I still on here? 17:43
colomon \o/
17:47 benabik_ joined 17:50 benabik left, benabik_ is now known as benabik 17:59 thou joined
[Coke] r: my$p:=(3..*).grep(*.is-prime);(1..*).grep({$p[$_]+2==$p[$_+1]})[^200].map({$p[$_]~":"~$p[$_+1]}).say # this only calcs primality once. 18:17
p6eval rakudo 7d6aa0: OUTPUT«5:7 11:13 17:19 29:31 41:43 59:61 71:73 101:103 107:109 137:139 149:151 179:181 191:193 197:199 227:229 239:241 269:271 281:283 311:313 347:349 419:421 431:433 461:463 521:523 569:571 599:601 617:619 641:643 659:661 809:811 821:823 827:829 857:859 881:883 1019:1021…
[Coke] r: my$p:=(3..*).grep(*.is-prime);(0..*).grep({$p[$_]+2==$p[$_+1]})[^200].map({$p[$_]~":"~$p[$_+1]}).say # this only calcs primality once.... and this one doesn't miss 3:5, whoops
p6eval rakudo 7d6aa0: OUTPUT«3:5 5:7 11:13 17:19 29:31 41:43 59:61 71:73 101:103 107:109 137:139 149:151 179:181 191:193 197:199 227:229 239:241 269:271 281:283 311:313 347:349 419:421 431:433 461:463 521:523 569:571 599:601 617:619 641:643 659:661 809:811 821:823 827:829 857:859 881:883 1019:… 18:18
[Coke] if I squint, that looks like perl. ;)
GlitchMr I've made a completely pointless task at Rosetta Code
rosettacode.org/wiki/Detect_input_c...g_from_tty
Also, shouldn't the primarity be memoized? 18:19
colomon GlitchMr: I was thinking about that, but I'm not sure it's a good idea
there are a LOT of prime numbers.
GlitchMr Why not?
oh, ok
TimToady colomon: no, there are more than that, I suspect 18:20
colomon I guess if the cache was smart enough to drop off older / larger entries...
TimToady: more than a LOT? prove it!
;)
TimToady I don't want to prove it, which is why I said "I suspect"
colomon is eager to hear if the latest niecza helps on the rc prime chain problem.... 18:21
though I guess we wouldn't know the answer for hours even if you started now, right? 18:22
[Coke] finds the original twin primes paper he was referring to, where they say "A client takes an average of 60 minutes to process a 18:24
range of 10 billion numbers"
18:24 cognominal joined
[Coke] I am tempted to kick off that line to see how long it takes rakudo on feather. 18:24
(cgi2.cs.rpi.edu/~szymansk/papers/hpdc.98.pdf in case anyone wants to read it. ... huh. I'm in the Acks at the end. nifty.) 18:27
colomon just started attempting to find all the primes to 10000000000 under niecza. 18:28
colomon suspects it will take a while
FROGGS .oO( perhaps more than a while? ) 18:29
tadzik I'm not sure I understand why is-prime is core 18:30
I find it hard to imagine a program, whose the purpose is something else than calculating primes, to make use of it
flussence +1 18:31
colomon tadzik: crypto
tadzik well, ok. Are gonna push RSA into core as well?
s/Are/Are we/
I think it's just too niche of a usecase to be in core. A module, of course! But core? 18:32
[Coke] "and those shoes!"
18:32 daxim left
tadzik yes, one day we'll be loading all these ondemand. But until this day we'll whimper at how heavy we got from all those features we (almost) never use 18:33
ok, I'm shutting up again
colomon tadzik: the thing is, it's hard for a module to do well
that is, rakudo is calling straight into its underlying bignum library, and niecza is doing the same for the expmod portion. 18:34
maybe when the module ecosystem is more developed, it will be easier to move them out to a module...
FROGGS there should be a way to do that in a module though
PerlJam FROGGS++ (assuming that really was meant as humor :) 18:35
FROGGS no, I know that there are (or better will be) modules that need a bit more hardcore stuff and these modules will need to talk to nqp or mono or whatever 18:36
for performance reasons for example
18:37 imarcusthis- joined
colomon FROGGS: right, but to do it smoothly, we need to be able to create a module which 1) can talk directly to nqp or mono or whatever and 2) do the right thing no matter what system it is using. The ecosystem isn't nearly that well developed yet. 18:37
18:37 GlitchMr42 joined, daniel-s_ joined
FROGGS basically you just can have submodules you load when detecting the right system 18:38
like File::Spec doesnt load ::Win32 stuff on linux (because Win32 might include Win32 modules that cant be installed on other systems)
I dont think there will be some magic that picks the right system specific code for you out of a bag 18:39
18:39 GlitchMr left, GlitchMr42 is now known as GlitchMr
PerlJam FROGGS: as long as we have the same interface no matter the underlying implementations. That's where the "magic" is 18:40
FROGGS I am talking about not using some sort of interface/layer in between 18:41
I know from the work on the SDL module that this won't be enough in every case
PerlJam FROGGS: not for the every-day programmers, but it'll have to be *somewhere* 18:42
18:42 clkao_ joined 18:43 Circlepuller joined, jnthn_ joined, Circlepuller_ left
masak o/, #perl6 18:43
FROGGS I can imagine a module that does the mapping for you though, but I think at the point where the function call to mono differs from the one to parrot of javascript, you cant have a mapping there 18:44
hi masak
18:45 xinming_ joined 18:46 sivoais_ joined 18:47 daniel-s left, imarcusthis left, xinming left, spider-mario left, sivoais left, xdbr left, doy left, rurban left, sudokode left, perigrin left, tadzik left 18:48 spider-mario joined, sudokode joined, xdbr joined, doy joined, perigrin joined, spacebat_ joined
GlitchMr That is fun 18:48
(not really)
FROGGS GlitchMr: you can talk using statement modifiers like my son does 18:49
"That is fun"
... pause ...
"not"
masak like Borat. 18:52
moritz ... 18:53
not.
GlitchMr This is not very interesting
not
Double negatives because why not? 18:54
18:55 s1n1 joined, telex_ joined, FROGGS_ joined, kaare__ joined, d4l3k_ joined
flussence
.oO( I was trying to say something 20 minutes ago, but somehow I've ended up on the wiki page for doorbells instead... )
18:56
18:56 dalek left, s1n left, telex left, FROGGS left, jaldhar_ left, kaare_ left, yves_ left, Celelibi left, jaldhar_ joined 18:57 d4l3k_ is now known as dalek, xinming_ left
cognominal there is also the double positive that rings as negative : 18:57
"yea, right!"
18:57 FROGGS_ is now known as FROGGS
GlitchMr double positive is double negative except when it isn't 18:57
18:57 Celelibi_ joined 18:58 yves_ joined
masak yeah, yeah. 18:58
sirrobert hey moritz: How do I pass in "NULL" in DBIish?
Nil?
moritz sirrobert: any undefined value should do. I usually use Any 18:59
sirrobert moritz: ok, thanks
masak nr: say Nil.defined
moritz Nil has the habit of vanishing in list context
p6eval rakudo 7d6aa0, niecza v21-30-g5626cc3: OUTPUT«False␤»
sirrobert huh
heh
masak nr: say +(Nil)
p6eval niecza v21-30-g5626cc3: OUTPUT«0␤»
..rakudo 7d6aa0: OUTPUT«use of uninitialized value of type Nil in numeric context in block at /tmp/nceO31LI9D:1␤␤0␤»
19:01 phenny left, telex_ left, pjcj left, pjcj joined 19:02 pmichaud left, pmichaud joined
moritz nr: say +(Nil, ) 19:02
p6eval niecza v21-30-g5626cc3: OUTPUT«1␤»
..rakudo 7d6aa0: OUTPUT«0␤»
moritz wonders what masak will make of that
19:03 telex joined, quietfanatic left, Targen joined
masak a witch! 19:03
19:03 [Coke] left
masak I mean, a bug! 19:03
cognominal www.astro.ex.ac.uk/people/mem/quotes.html I thought Feynman was the guy who interrupted the lecture in linguistic with his "yeah, right"
PerlJam cognominal: nah, that was the answer that Feynman gave for stealing a door.
19:03 DarthGandalf left 19:04 quietfanatic joined, [Coke] joined, kurahaupo left
masak moritz: fwiw, I can't imagine what Niecza thinks is the element there. 19:04
Nil, probably.
moritz masak: Nil :-)
19:04 DarthGandalf joined
moritz
.oO( Mu )
19:04
masak but isn't that just a case where it should collapse?
moritz IMHO yes 19:05
masak n: say (Nil, )[0]
p6eval niecza v21-30-g5626cc3: OUTPUT«Nil␤»
masak submits nieczissue
moritz nr: say (Nil, Nil, Nil).perl
p6eval rakudo 7d6aa0, niecza v21-30-g5626cc3: OUTPUT«(Nil, Nil, Nil)␤»
masak o.O
moritz nr: say (Nil xx 3).perl
p6eval rakudo 7d6aa0, niecza v21-30-g5626cc3: OUTPUT«().list␤»
masak huh.
moritz well, rakudo is consistent.
masak nr: say "all you ever talk about is ", (Nil, Nil, Nil).perl
p6eval rakudo 7d6aa0, niecza v21-30-g5626cc3: OUTPUT«all you ever talk about is (Nil, Nil, Nil)␤»
moritz nr: say (Nil xx 3).elems 19:06
p6eval niecza v21-30-g5626cc3: OUTPUT«3␤»
..rakudo 7d6aa0: OUTPUT«0␤»
masak nr: say Nil.perl.subst(/i/, 'ie').subst(/l/, 'ls Bohr') 19:07
p6eval rakudo 7d6aa0, niecza v21-30-g5626cc3: OUTPUT«Niels Bohr␤»
masak \o/
moritz chuckles
sirrobert r: use Test; my Str $str; is_deeply {b=>2}, {a=>$str, b=>2}, "wat"; 19:08
p6eval rakudo 7d6aa0: OUTPUT«not ok 1 - wat␤# got: {"b" => 2}␤# expected: {"a" => Str, "b" => 2}␤»
sirrobert r: use Test; my Str $str; is_deeply {a=>$str, b=>2}, {a=>$str, b=>2}, "wat";
p6eval rakudo 7d6aa0: OUTPUT«use of uninitialized value of type Str in string context in sub is_deeply at lib/Test.pm:217␤␤use of uninitialized value of type Str in string context in sub is_deeply at lib/Test.pm:217␤␤ok 1 - wat␤»
sirrobert It can handle the sad path ok, but not the happy? 19:09
19:09 cognominal_ joined
masak it definitely shouldn't emit a warning from within is_deeply like that. 19:11
please submit a rakudobug.
sirrobert that's what I thought =)
19:11 sftp_ joined
sirrobert wilco 19:11
19:12 orafu left, lumi__ joined, PerlPilot joined, orafu joined
cognominal_ much ado about nothing^WNil 19:12
19:12 clkao joined 19:13 phenny joined, clkao_ left, cognominal left, lumi_ left, sftp left, PerlJam left, snarkyboojum left, snarkyboojum_ joined
moritz r: say { a => Str } eqv { a => Str } 19:13
p6eval rakudo 7d6aa0: OUTPUT«use of uninitialized value of type Str in string context in block at /tmp/NlpxdbePaA:1␤␤use of uninitialized value of type Str in string context in block at /tmp/NlpxdbePaA:1␤␤True␤»
moritz that's where the warning comes from
moritz tries a patch 19:14
r: say Int eqv Int
p6eval rakudo 7d6aa0: OUTPUT«Parameter '' requires an instance, but a type object was passed␤ in method Bridge at src/gen/CORE.setting:2814␤ in sub infix:<cmp> at src/gen/CORE.setting:3047␤ in sub infix:<eqv> at src/gen/CORE.setting:2380␤ in block at /tmp/XiKS_aaeIa:1␤␤»
moritz ok, warnings are gone, now I need to wait for the spectest to finish 19:21
eqv.rakudo passed, that's good :-) 19:22
masak moritz++ # untiring LHF picker 19:24
moritz masak: it's good that you have that impression, because I feel my contributions have decreased these past weeks 19:26
19:26 PerlPilot is now known as PerlJam
masak well, my perception may be somewhat coloured by not being around a lot in the past week or so. 19:27
19:28 krunen left 19:29 birdwindupbird joined, krunen joined 19:37 imarcusthis- left 19:40 xinming joined, imarcusthis joined, [particle] left
PerlJam wonders what color masak's perception actually is ... 19:43
sirrobert dang, I know I've asked this before but ... How do I merge two hashes? 19:51
(don't care about priority) 19:52
19:53 sftp joined, sftp_ left
masak r: my %h1 = foo => 2; my %h2 = bar => 5; my %h = %h1, %h2; say %h.perl 19:53
p6eval rakudo 7d6aa0: OUTPUT«("foo" => 2, "bar" => 5).hash␤»
PerlJam sirrobert: what do you mean by "merge"? Perhaps you want %hash.push ?
sirrobert PerlJam: I think masak's solution might be sufficient. Maybe I do want %hash.push... playing now =)_ 19:54
it's such a simple operation I keep forgetting it
masak I'm kind glad we kept that bit from Perl 5. 19:55
PerlJam sirrobert: I thought you'd want masak's solution too, but I couldn't pass up an opportunity to inject seredipity :)
masak it's like, in the space between arrays and hashes, things are just elements of lists, floating around in the ether. 19:56
flussence %hash.push is probably better for big hashes, since you're not copying both the originals
masak r: my %h1 = foo => 2; my %h2 = bar => 5; my %h = %h1, baz => 42, %h2; say %h.perl
p6eval rakudo 7d6aa0: OUTPUT«("foo" => 2, "baz" => 42, "bar" => 5).hash␤»
masak case in point.
flussence: yeahbut. mutability. eww! :P 19:57
19:57 thou left
sirrobert r: my %h; %h ,= a=>1, {b=>2}; say %h; 19:59
p6eval rakudo 7d6aa0: OUTPUT«("a" => 1).hash␤»
sirrobert is there a way to modify ,= to get the b=>2 added in?
20:03 rindolf joined
rindolf Hi all. 20:03
Oh, fglock is not here. :-( 20:04
sirrobert \o
moritz r: my %h; %h ,= (a=>1, {b=>2}); say %h
p6eval rakudo 7d6aa0: OUTPUT«("a" => 1, "b" => 2).hash␤»
sirrobert ok, explicit parcelization
20:04 GlitchMr left
moritz just precedence 20:05
sirrobert I feel like something like .... %h ,=: would be cool
dalek rlito: 3b60516 | (Flavio S. Glock)++ | / (2 files):
Perlito5 - js3 - proxy objects
kudo/nom: 16f22b8 | moritz++ | src/core/ (3 files):
avoid undef warnings in infix:<eqv>
20:09
ast: 3ec12fb | moritz++ | S32- (2 files):
rakudofudge new tests
20:11
20:14 kenjiskywalker left 20:16 sivoais_ left, sivoais joined 20:17 kenjiskywalker joined 20:18 kevin_ joined 20:29 birdwindupbird left
sorear good * #perl6 20:30
phenny sorear: 14:34Z <colomon> tell sorear it turns out my array index bound error was a BigInteger bug: sending the constructor the number 0 stored as two or more bytes fails.
20:32 sirrobert left, kaare__ left, bluescreen10 left 20:36 yarp joined, sirrobert joined
sirrobert What's the name of that site where I read some ... sort of zen meditation stories about codestuff? 20:37
they were written in the style of ancient japan, sort of
koans, maybe
arnsholt thecodelesscode.com/contents perhaps? 20:38
sirrobert looking ...
yep, thanks!
20:40 tadzik joined
colomon n: say (10**200).rand 20:41
p6eval niecza v21-30-g5626cc3: OUTPUT«1.9789294907725088E+199␤»
colomon n: say (^10**200).roll
p6eval niecza v21-30-g5626cc3: OUTPUT«3730272213122800372038597066590769473588052458040457760369967781397527398858884683666092323458521639921390133782509837155048810748495044452957574041583858513499136076213452595064559232184559620069132␤»
colomon r: say (^10**200).roll 20:46
p6eval rakudo 7d6aa0: OUTPUT«73106935604391846709646637334391297033075072750660509583045411849926913306228805242955261659345982704104376311048852855326591615968251842470610764545921208760514261773484120965830550780545292849643520␤»
sorear "eek, it's not consistent with rakudo" 20:47
masak sorear! \o/ 20:49
well, sorear is here. time for me to go to bed. :P 20:50
'night, #perl6
sorear knight, masak.
20:53 Celelibi_ is now known as Celelibi 20:54 Gruber joined 20:55 kcwu_ joined, DrEeevil joined 20:56 __sri joined, risou_ joined 20:57 mathw_ joined, betterwo1ld joined, au__ joined, diakopte1 joined, estrai joined, literal_ joined 20:59 yeltzooo joined, kurahaupo joined, Yappocall left, awwaiid left, mst left, kcwu left, bonsaikitten left 21:00 aloha left, diakopter left, au left, _sri left, takesako_ left, p6eval joined, ChanServ sets mode: +v p6eval, aloha joined 21:01 takesako_ joined, groky joined 21:02 yarp left, yeltzooo left 21:03 Gruber is now known as Grrrr 21:04 Yappocall joined, awwaiid joined, mst joined, TimToady joined, cotto joined, yeltzooo joined 21:06 flightrecorder left, diakopte1 is now known as diakopter 21:07 kurahaupo left 21:08 MikeFair_ joined, yves__ joined 21:09 FROGGS left, MikeFair left, yves_ left, MayDaniel left, mikemol left, bonsaikitten joined, mikemol joined, MayDaniel joined, benabik left 21:10 DrEeevil left, skids left 21:12 fgomez joined 21:14 [particle]1 joined 21:16 huf_ joined 21:17 ivan`` joined, huf left, ivan``_ left, PacoAir left 21:18 japhb_ joined
dalek ecza: f982881 | sorear++ | / (3 files):
Inject references into CompilerBlob in a way that still works to fix the bootstrap
21:20
ecza: 3b04575 | sorear++ | docs/announce.v22:
Draft v22 announcement
21:21 kurahaupo joined 21:22 cognominal_ left 21:23 broquain1 joined, cggoebel joined 21:24 broquaint left, ggoebel left, Bucciarati left, orafu left 21:25 pmurias left, orafu joined 21:26 Bucciarati joined, cognominal joined 21:31 sftp_ joined, xinming_ joined, d4l3k_ joined 21:32 sftp left, xinming left, dalek left, markov1 left, rhr left, rhr_ joined, pmichaud left, markov1 joined 21:33 pmichaud joined, kurahaupo left, PacoAir joined, d4l3k_ is now known as dalek 21:35 kurahaupo joined, tokuhiro_ joined 21:43 baest_ joined 21:44 yarp joined 21:47 eiro__ joined, patspam_ joined 21:48 diakopte1 joined 21:49 diakopter left 21:50 eiro left, baest left, patspam left, domidumont left, domidumont joined 21:53 patspam joined, patspam_ left 21:56 geekosaur joined 22:04 d4l3k_ joined 22:05 kevin_ left 22:06 stepnem left, DrEeevil joined 22:07 japhb__ joined, tadzik1 joined, _jaldhar_ joined 22:08 PerlPilot joined 22:09 snarkyboojum joined, Psyche^ joined, dalek left, p6eval left, tadzik left, PerlJam left, japhb_ left, jaldhar_ left, Patterner left, bonsaikitten left, snarkyboojum_ left, mtk left, aloha left, Psyche^ is now known as Patterner, d4l3k_ is now known as dalek 22:10 p6eval joined, aloha joined, mtk joined 22:12 ChanServ sets mode: +v p6eval 22:16 d4l3k_ joined, mikemol_ joined 22:17 au___ joined 22:18 doy_ joined, dalek left, mikemol left, au__ left, kcwu_ left, sudokode left, doy left, huf_ is now known as huf, tadzik1 is now known as tadzik 22:19 d4l3k_ is now known as dalek, justAShortLook joined 22:20 justAShortLook left, doy_ is now known as doy 22:21 spider-mario left 22:24 ranguard left, ranguard_ joined 22:29 stopbit left 22:34 PacoAir left, Chillance left, erkan left, immortal joined, immortal left, immortal joined 22:35 Chillance joined 22:37 simcop2387 left, MayDaniel left 22:38 simcop2387 joined 22:40 rindolf left 22:43 snearch left, snearch joined
sorear spectest run finished 22:44
colomon: ping
colomon: deping, my fault 22:49
22:50 doy_ joined
sorear looks like no real failures 22:50
22:50 ranguard_ left, ranguard joined, doy left 22:51 doy_ is now known as doy
colomon sorear: yeah, I don't know what's up with the transient failures 22:56
sorear colomon: one set of failures was version skew, I was trying to test your new pick.t without your pick patches 22:58
(apparently this causes the test to go into an infinite loop which I killed after 90m)
the chdir.t tests, I blame the fact that I was doing funny things with the t/ dir and symlinks 22:59
some other failures were caused by TEST_JOBS=3 and niecza's dislike of concurrent access to the module cache
the quoting.t stuff is a mono bug which I reported a few weeks ago but nothing has been done with 23:00
(OSX-specific)
which just leaves a TODO pass in eqv.t :D
23:01 benabik joined
sorear so all I'm waiting for now is a +1 on the announcement itself 23:01
23:04 skids joined 23:10 whiteknight joined 23:11 PerlJam joined, ranguard_ joined 23:12 ranguard left, PerlPilot left, groky left 23:13 groky joined 23:16 Circlepuller_ joined 23:18 Circlepuller left 23:21 doy_ joined, au___ left, jnthn_ left, doy left, DAB587W joined, jnthn joined, doy_ is now known as doy 23:27 HarryS left 23:29 integral left, mj41_ left 23:30 integral_ joined, integral_ left, integral_ joined, mj41 joined
colomon +1 on the announcement 23:33
sorear: ^^
I'm getting failures in t/spec/integration/lazy-bentley-generator.t and t/spec/integration/lexical-array-in-inner-block.t fairly frequently during the spectest.
but they always are fine when I test them by themselves. 23:34
that's on both OS X and Linux.
23:34 bruges_ joined 23:35 daniel-s__ joined
sorear colomon: do you run the spectest with TEST_JOBS? 23:35
I think it's relevant that those are two very early tests
I think they're failing because of contention on the module cache 23:36
23:36 bruges left, daniel-s_ left 23:37 benabik left, daniel-s__ is now known as daniel-s 23:45 benabik joined
colomon yes, that's runs with TEST_JOBS=4 23:46
23:50 dayangkun joined 23:58 benabik left 23:59 kid51 joined