Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2012-09-24

Perl 6 | Reference Documentation | Rakudo

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:07 cognominal__ joined #perl6
00:09 whiteknight hello MikeFair
00:12 cognominal_ joined #perl6
00:12 dalek niecza: 55f5b8a | (Solomon Foster)++ | lib/CORE.setting:
00:12 dalek niecza: Implement masak's proposed Hash comparison.
00:12 dalek niecza: review: https://github.com/sorear/niecza/commit/55f5b8a406
00:13 Circlepuller_ joined #perl6
00:14 tokuhiro_ joined #perl6
00:33 dayangkun joined #perl6
00:52 Circlepuller_ joined #perl6
00:56 sorear MikeFair:
00:56 sorear n: (2 ** 1000 / 43).ln.say
00:56 p6eval niecza v21-23-gd8852de: OUTPUT«689.3859804442518␤»
00:56 sorear n: (2 ** 10000 / 43).ln.say
00:56 p6eval niecza v21-23-gd8852de: OUTPUT«Inf␤»
00:59 colomon .... that's expected, no?
01:00 colomon n: (2 ** 10000).ln.say
01:00 p6eval niecza v21-23-gd8852de: OUTPUT«6931.4718055994526␤»
01:01 sorear colomon: MikeFair asked for small projects so I told him Rat.ln is less than awesome in Niecza
01:01 colomon ah
01:02 colomon n: say (2 ** 10000 / 43).WHAT
01:02 p6eval niecza v21-24-g55f5b8a: OUTPUT«Rat()␤»
01:02 anuby joined #perl6
01:04 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␤␤»
01:04 colomon ouch
01:04 colomon r: (2 ** 10000 / 43).log.say
01:04 p6eval rakudo 7d6aa0: OUTPUT«Inf␤»
01:05 colomon right, perl6 isn't supposed to have ln
01:06 sorear can common logarithms just die already
01:06 sorear o/ anuby
01:08 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:14 Tanktalus joined #perl6
01:19 colomon sorear: why do you need Func<Constants,Variable,Variable,Variable,Variable> for a function which takes three variables
01:19 colomon ?
01:21 sorear takes three variables, returns one variable, and also needs a reference to something that can be used to fetch JunctionMO
01:22 colomon ah, I see.  makes sense, somehow I missed adding the Variable when I added the Variable, if you know what I mean.  :)
01:24 hypolin joined #perl6
01:30 dalek niecza: f357a5a | (Solomon Foster)++ | lib/ (2 files):
01:30 dalek niecza: Replace expmod with a call to BigInteger.ModPow.
01:30 dalek niecza: review: https://github.com/sorear/niecza/commit/f357a5aa10
01:31 * colomon hopes that will help TimToady out.
01:32 * colomon wonders if he can pound out an improved .rand before the release.
01:36 FROGGS_ joined #perl6
01:41 flightrecorder joined #perl6
01:49 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
01:50 colomon I see a BigInteger.genRandomBits online, but apparently it's not in "our" BigInteger?
01:52 colomon Random.NextBytes?
01:52 colomon is RNGCryptoServiceProvider.GetBytes available to us?
01:55 sorear colomon: anything which is listed as being part of the .NET framework version 2.0 is available
01:56 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
01:57 colomon ah
01:58 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?
01:59 sorear right
01:59 sorear http://msdn.microsoft.com/en-us/library/system.random.nextbytes.aspx fwiw
01:59 colomon yep
02:00 sorear methinks perl 6 should offer crypto randomness somehow
02:01 sorear and modern crypto RNGs are fast enough that it might not kill us to us them everywhere
02:01 sorear one of my previous projects was an online game
02:01 sorear open-source
02:02 sorear 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
02:02 sorear the response was to switch all game logic to use a crypto RNG, it... worked suprisingly well
02:04 sorear but we weren't using a system-provided RNG anyway, so I have no idea how fast the standard RNGCryptoServiceProvider impl is
02:05 gootle joined #perl6
02:06 Circlepuller joined #perl6
02:08 colomon n: say 3.log(2)
02:08 p6eval niecza v21-25-gf357a5a: OUTPUT«1.5849625007211563␤»
02:11 colomon sorear: is there a standard Niecza Random out there, or should I just generate a fresh one?
02:16 HarryS joined #perl6
02:18 sorear colomon: Buildins.rng I think?  there's also a locking protocol in use
02:21 colomon okay, will test it with regular random and then look at switching.
02:33 colomon sorear: https://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:36 jferrero /leave
02:36 jferrero left #perl6
02:39 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:40 colomon oh, switch is just 2 ** (bits % 8) - 1, isn't it?
02:41 cognominal joined #perl6
02:41 sorear also
02:41 sorear I mean yes
02:41 sorear 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
02:42 colomon sigh, of course.  I'm slow on the uptake tonight.
02:42 sorear mostly I'm just interested in avoiding division
02:42 colomon actually, the number one problem is that it doesn't work -- there's a weird array bounds error in the BigNumber constructor sometimes.
02:43 sorear since that's a slow operation with our bigint library (and in general, but especially so for us)
02:43 colomon division?
02:43 sorear as in /
02:43 colomon that's on an int
02:43 colomon though I guess it could just be bits >> 4
02:44 colomon C# int, I mean
02:44 sorear moritz' original algorithm used bigint division
02:44 sorear yours doesn't
02:44 colomon ah
02:45 * 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.
02:45 colomon o/
02:45 sorear good night
02:51 gootle joined #perl6
02:53 gootle joined #perl6
02:56 gootle joined #perl6
03:01 gootle joined #perl6
03:01 Circlepuller_ joined #perl6
03:30 cibs joined #perl6
03:45 moss joined #perl6
04:11 orafu joined #perl6
04:19 cognominal_ joined #perl6
04:21 telex joined #perl6
04:29 chinaxing joined #perl6
04:35 gootle joined #perl6
04:35 redpig315 joined #perl6
04:35 telex joined #perl6
04:36 redpig315 hello, i'm first in this place
04:36 sorear joined #perl6
04:37 sorear oops
04:38 sorear redpig315: greetings.  welcome to #perl6.
04:38 sorear redpig315: what brings you here?
04:39 redpig315 i see a blog introduce this  , from  site  come here
04:39 sorear cool.  which blog?
04:41 redpig315 site is :www.php-oa.com
04:46 chinaxing joined #perl6
04:48 sorear is 扶凯 / Fu Kai one of us?
04:48 Manu joined #perl6
04:48 cognominal_ joined #perl6
04:50 REPLeffect joined #perl6
05:05 tokuhiro_ joined #perl6
05:15 Tanktalus joined #perl6
05:16 kaleem joined #perl6
05:24 birdwindupbird joined #perl6
05:28 chinaxing joined #perl6
05:34 kurahaupo n: ((2 ** 10000).ln - 43.ln).say
05:34 p6eval niecza v21-25-gf357a5a: OUTPUT«6927.7106054837586␤»
05:38 kurahaupo n: (2 ** 10000/43).ln.say
05:38 p6eval niecza v21-25-gf357a5a: OUTPUT«Inf␤»
05:40 kurahaupo n: (2 ** 10000/43).perl.say
05:40 p6eval niecza v21-25-gf357a5a: OUTPUT«<199506311688075838488374216268358508382349683188619245485200894985294388302219466319199616840361945978993311294232091242715564913494137811175937859320963239578557300467937945267652465512660598955205500869181933115425086084606181046855090748660896248880904…
05:51 flussence joined #perl6
05:51 cognominal_ joined #perl6
06:01 wtw joined #perl6
06:07 larks joined #perl6
06:21 Tanktalus joined #perl6
06:42 flightrecorder joined #perl6
06:43 moritz good morning
06:45 sorear o/ moritz
06:47 FROGGS_ joined #perl6
06:58 wamba joined #perl6
07:16 tadzik good mirning #perl6
07:16 moritz \i tadzik
07:17 tadzik :)
07:33 Psyche^ joined #perl6
07:43 mucker joined #perl6
07:47 stepnem joined #perl6
07:47 am0c joined #perl6
07:55 kresike joined #perl6
07:55 kresike good morning all you happy perl6 people
07:56 dalek Perlito: 66a00a2 | (Flavio Glock)++ | misc/iterator_engine/iterator_engine (13 files):
07:56 dalek Perlito: Perlito6 - add misc/iterator_engine - the compiler before MiniPerl6 (from 2006)
07:56 dalek Perlito: review: https://github.com/fglock/Perlito/commit/66a00a2462
07:57 Tanktalus joined #perl6
08:05 xinming joined #perl6
08:08 cognominal_ joined #perl6
08:37 leont joined #perl6
08:39 cognominal joined #perl6
08:40 Tanktalus joined #perl6
08:54 dakkar joined #perl6
08:56 dalek niecza: 1f74b89 | sorear++ | lib/Builtins.cs:
08:56 dalek niecza: Top removal: cps methods in Builtins
08:56 dalek niecza: review: https://github.com/sorear/niecza/commit/1f74b89e9f
08:56 dalek niecza: c7d9a56 | sorear++ | lib/ (2 files):
08:56 dalek niecza: Top removal: codegen
08:56 dalek niecza: review: https://github.com/sorear/niecza/commit/c7d9a563d5
08:56 dalek niecza: 3a38229 | sorear++ | lib/ (3 files):
08:56 dalek niecza: Top removal: CLR binding
08:56 dalek niecza: review: https://github.com/sorear/niecza/commit/3a38229fe6
08:56 fhelmberger joined #perl6
08:58 dalek Perlito: 6350da9 | (Flavio S. Glock)++ | / (2 files):
08:58 dalek Perlito: Perlito5 - js3: use more lvalues
08:58 dalek Perlito: review: https://github.com/fglock/Perlito/commit/6350da957b
08:58 sorear sleep&
09:00 felher good morning people, good night sorear :)
09:01 sisar joined #perl6
09:05 tadzik hello kresike, felher
09:13 Tanktalus joined #perl6
09:35 ServerSage joined #perl6
09:46 dalek Perlito: be26903 | (Flavio S. Glock)++ | / (2 files):
09:46 dalek Perlito: Perlito5 - js3: use more lvalues
09:46 dalek Perlito: review: https://github.com/fglock/Perlito/commit/be26903009
09:46 dalek Perlito: 0513305 | (Flavio S. Glock)++ | / (3 files):
09:46 dalek Perlito: Perlito5 - js3: autovivify at runtime only
09:46 dalek Perlito: review: https://github.com/fglock/Perlito/commit/051330579f
09:48 Circlepuller joined #perl6
09:49 kresike hello tadzik, felher o/ :)
09:52 Circlepuller joined #perl6
10:18 ServerSage joined #perl6
10:26 jerome joined #perl6
10:28 am0c joined #perl6
10:28 dju joined #perl6
10:35 ServerSage joined #perl6
10:40 Tanktalus joined #perl6
10:51 dlin joined #perl6
10:53 Ulti pwd
10:53 Ulti lol woops!
10:54 cognominal pwc
10:54 cognominal #perl6
10:55 daxim joined #perl6
10:55 Ulti :)
10:56 Ulti 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:57 dlin joined #perl6
10:57 dlin hi
10:57 dlin https://gist.github.com/3775433
10:57 Ulti so something like  =begin DATA    and then say @=DATA;
10:57 birdwindupbird joined #perl6
10:58 dlin LWP::Simple install error message.
10:58 dlin need help.
10:59 kurahaupo joined #perl6
11:02 moritz dlin: the pod reflection stuff isn't quite there yet, sorry
11:02 moritz as for the LWP errors, I think I've seen those before
11:02 GlitchMr joined #perl6
11:02 moritz I'll build a new rakudo and try it; but it'll take some time (slow machine)
11:03 dlin moritz: thanks.
11:05 Su-Shee_ joined #perl6
11:09 ServerSage joined #perl6
11:14 kenjiskywalker joined #perl6
11:18 tadzik Ulti: you can do =begin code\nblablabla\n=end code, and then $=pod[$n] will give you a Pod::Code block
11:18 tadzik which is a raw, non-processed data
11:18 Ulti awesome
11:18 Ulti thanks tadzik
11:19 tadzik do you know how those $=pod array works?
11:19 Ulti nope?
11:19 tadzik well, it's just an array of pod blocks :)
11:19 tadzik but you have to be aware that indexes will change if you move stuff around
11:19 Ulti that's ok
11:19 tadzik so if you put two blocks like this, you'll have them as $=pow[0] and $=pod[1], depending on the ordering
11:20 Ulti easier than if I had external files and moved them around
11:20 tadzik sure :)
11:20 ServerSage joined #perl6
11:20 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
11:20 Ulti so I can rely on it?
11:20 Ulti ok
11:20 tadzik well
11:20 tadzik spectests rely on it
11:20 Ulti "rely"
11:20 Ulti I can just add a string to the top so I know which is which
11:20 mucker joined #perl6
11:21 tadzik see https://github.com/perl6/roast/blob/master/S26-documentation/01-delimited.t for example
11:21 Ulti perfect thank you
11:21 tadzik you're welcome
11:22 kurahaupo joined #perl6
11:24 Ulti oh you can just use .name to find the right section
11:25 tadzik ...the spec says so, yes...
11:25 tadzik I work on Pod far less than I should these days
11:26 kenjiskywalker joined #perl6
11:29 Ulti tadzik: looks quite functional to me!
11:29 tadzik huh, it works? :P
11:29 tadzik I mean, .name?
11:29 Ulti yeah
11:29 mtk joined #perl6
11:29 * moritz thought .name just reported the name
11:29 tadzik O_o I don't remember implementing that...
11:29 tadzik the name from :name<foo>?
11:30 Ulti yeah it reports just the name, so finding the right section by name is quite easy
11:30 tadzik ok, cool
11:30 moritz tadzik: I think that  =begin code ... =end code makes .name eq 'code'
11:30 tadzik shouldn't be too hard to make $=pod associative too then
11:30 tadzik ah, that's right
11:30 tadzik so it comes from Pod::Block::Named
11:30 tadzik or so
11:31 Ulti yeah thats what I see
11:31 Ulti now thats done, LUNCH!
11:31 Ulti :) thanks
11:33 yarp joined #perl6
11:37 masak morning, #perl6 :)
11:38 moritz dlin: I've reproduced your issue with LWP::Simple and opened a ticket at https://github.com/cosimo/perl6-lwp-simple/issues/19
11:38 moritz dlin: I'm afraid I don't have an easy fix though :(
11:38 dlin moritz: thanks
11:38 moritz good UTC morning, masak
11:39 moritz the parse_chunks methods is... not the most readable one I've encountered so far
11:39 tadzik masak! \o/
11:40 wamba joined #perl6
11:41 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:42 kenjiskywalker joined #perl6
11:44 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"␤»
11:44 daxim rakudo: <1 2 3 4 5 1 2 2 2 2>.map(-> $_ { $_ => "x$_" }).uniq.sort.say
11:44 p6eval rakudo 7d6aa0: OUTPUT«"1" => "x1" "2" => "x2" "3" => "x3" "4" => "x4" "5" => "x5"␤»
11:45 daxim wheeee
11:45 daxim scala looks like that all the time
11:48 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"␤»
11:49 daxim is a named variable strictly needed for hyper ops?
11:53 moritz well, you can always cheat
11:54 moritz 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"␤»
11:54 moritz 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 ") }"␤»
11:54 moritz 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«1 x1 2    x2 3    x3 4    x4 5    x5␤»
11:54 kenjiskywalker joined #perl6
11:54 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␤»
11:58 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"␤»
11:58 moritz r: say (<1 2 3 4 5 1 2 2 2 2> Xxx 2).map(* => 'x' ~ *).uniq.sort
11:58 p6eval rakudo 7d6aa0: OUTPUT«"1" => "x1" "2" => "x2" "3" => "x3" "4" => "x4" "5" => "x5"␤»
11:59 daxim neat
12:00 daxim although I can foresee a blog post in the future: "40 uses of »*« (you didn't know about)"
12:00 daxim 9 uses of {} is p5 is confusing enough
12:01 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"␤»
12:01 p6eval ..niecza v21-28-g3a38229: OUTPUT«val("1") => "x1" val("2") => "x2" val("3") => "x3" val("4") => "x4" val("5") => "x5"␤»
12:02 colomon oh, Xxx 2 !  sneaky
12:02 moritz could have written >>xx>> 2  too :-)
12:03 snearch joined #perl6
12:03 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?
12:03 moritz yes
12:03 moritz (though rakudo might need {; $_ => "x$_" } to not make it a hash)
12:15 benabik joined #perl6
12:35 benabik joined #perl6
12:53 Tanktalus joined #perl6
13:03 pmurias joined #perl6
13:03 pmurias sorear: re predicting the seed, what game was that?
13:18 atrodo joined #perl6
13:21 PacoAir joined #perl6
13:25 daxim pmurias, last link in http://nethackwiki.com/wiki/Random_number_generator
13:25 PacoAir joined #perl6
13:28 tokuhiro_ joined #perl6
13:34 skids joined #perl6
13:38 Tanktalus joined #perl6
13:40 dayangkun joined #perl6
13:53 stopbit joined #perl6
13:54 Exodist joined #perl6
14:03 flightrecorder joined #perl6
14:12 sctt joined #perl6
14:15 FROGGS_ joined #perl6
14:16 cognominal joined #perl6
14:17 * 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:20 moritz colomon: that sounds very XKCD random :-)
14:20 dalek Perlito: e9bb73a | (Flavio S. Glock)++ | / (3 files):
14:20 dalek Perlito: Revert "Perlito5 - js3: autovivify at runtime only"
14:20 dalek Perlito:
14:20 dalek Perlito: This reverts commit 051330579fa45a7e3805eac530fede1688c502ae.
14:20 dalek Perlito: review: https://github.com/fglock/Perlito/commit/e9bb73a3b4
14:20 dalek Perlito: 0aabeec | (Flavio S. Glock)++ | / (2 files):
14:20 dalek Perlito: Revert "Perlito5 - js3: use more lvalues"
14:20 dalek Perlito:
14:20 dalek Perlito: This reverts commit be269030092f47a4bac6f600e8f032e44b231e1f.
14:20 dalek Perlito: review: https://github.com/fglock/Perlito/commit/0aabeec64c
14:20 dalek Perlito: 4ee7aa4 | (Flavio S. Glock)++ | / (2 files):
14:20 dalek Perlito: Revert "Perlito5 - js3: use more lvalues"
14:20 dalek Perlito:
14:20 dalek Perlito: This reverts commit 6350da957b557bdf3fc7bb7cbf42d67a1de53dd5.
14:20 dalek Perlito: review: https://github.com/fglock/Perlito/commit/4ee7aa4174
14:20 dalek Perlito: de8dc24 | (Flavio S. Glock)++ | / (3 files):
14:20 dalek Perlito: Perlito5 - js3: implement "lvalue"; fix incr/decr
14:20 dalek Perlito: review: https://github.com/fglock/Perlito/commit/de8dc246ad
14:21 flussence star: use Grammar::Debugger; grammar blargh { }
14:21 p6eval star 2012.07:  ( no output )
14:21 flussence it barfs with "Invalid BUILDALLPLAN" locally :/
14:27 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:28 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
14:28 colomon right
14:29 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 #perl6
14:29 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.
14:30 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
14:30 spacebat_ it pulls the docstring of the object (which may be a module) and formats it nicely
14:31 tadzik we could write that
14:31 Su-Shee spacebat_: what's the difference to pydoc if I may ask stupidly?
14:31 spacebat_ help is available at the python repl
14:31 spacebat_ I'm no python expert - haven't used it a long time - perl5 is my dayjob
14:32 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 :)
14:32 spacebat_ ok so perl6doc and perl6 --doc seem like pydoc for scripts and modules
14:32 colomon r: &say.WHY
14:32 p6eval rakudo 7d6aa0:  ( no output )
14:32 moritz most of the infrastructure for that is in place, but some pieces are still missing
14:32 colomon r: say &say.WHY
14:33 p6eval rakudo 7d6aa0: OUTPUT«Any()␤»
14:33 spacebat_ I'm just playing around, got an IO::Path object, wondered what I can do with it
14:33 moritz in particular the link between the perl6/doc repo and $obj.WHY is still missing
14:33 moritz spacebat_: I think that's described in S32::IO
14:34 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.
14:34 phenny colomon: I'll pass that on when sorear is around.
14:41 pmurias #= for inline POD is implemented?
14:41 sisar joined #perl6
14:41 moritz yes, I think so
14:41 moritz not for every object type though
14:41 moritz but it should work for subs
14:43 tadzik subs, classes, methods
14:43 tadzik not for variables though
14:43 tadzik last time I tried it was segfaulting :)
14:43 tadzik but that was long ago, could be differentnow
14:43 tadzik also module, package etc
14:45 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
14:45 hoelzro $obj.^methods
14:45 hoelzro (iirc)
14:45 spacebat_ thanks :)
14:45 hoelzro =)
14:46 sisar Null PMC access error: https://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
14:46 p6eval niecza v21-28-g3a38229: OUTPUT«1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000…
14:46 p6eval ..rakudo 7d6aa0: OUTPUT«1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000…
14:47 bluescreen10 joined #perl6
14:48 moritz sisar: at least I am aware of this error
14:49 colomon rn: say (10 ** 1000).rand
14:49 p6eval rakudo 7d6aa0, niecza v21-28-g3a38229: OUTPUT«Inf␤»
14:50 spider-mario joined #perl6
14:51 kaare_ joined #perl6
14:52 sisar moritz: do you know what the actual error is ? I'm unable to golf it further.
14:55 mucker joined #perl6
14:58 moritz r: (-> { .say }).()
14:58 p6eval rakudo 7d6aa0: OUTPUT«Any()␤»
14:58 moritz r: (-> $n { .say }).($n)
14:58 p6eval rakudo 7d6aa0: OUTPUT«===SORRY!===␤Variable $n is not declared␤at /tmp/HVDgHIqTTY:1␤»
14:58 Su-Shee NOW if THAT isn't the best hug-related image EVER then I don't know! :) http://0.asset.soup.io/asset/3782/2416_3a53.jpeg
14:59 moritz r: (-> $n { .say }).(2)
14:59 p6eval rakudo 7d6aa0: OUTPUT«Any()␤»
15:02 [Coke] Su-Shee++
15:07 moritz r: for 1 -> $n { .say }
15:07 p6eval rakudo 7d6aa0: OUTPUT«Any()␤»
15:07 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…
15:07 moritz r: if 1 -> $n { if 1 { .say } }
15:07 p6eval rakudo 7d6aa0: OUTPUT«Any()␤»
15:07 moritz sisar: seems to require an 'if' inside a 'for'
15:09 sisar moritz: hmm. Does this look similar: https://rt.perl.org/rt3/Ticket/Display.html?id=113904 ?
15:11 * sisar afk
15:13 moritz sisar: yes, same problem
15:14 cognominal hum. nqp has a sort function that use a comparator, bt apparently non <=> or cmp
15:17 colomon is it just me, or are the S32-list/pick.t tests starting at line 108 or so really, really broken?
15:18 colomon oh, not broken, just weird
15:18 colomon I guess written without uniq
15:20 Chillance joined #perl6
15:26 dalek roast: 2d6c012 | (Solomon Foster)++ | S32-list/ (2 files):
15:26 dalek roast: Add tests for roll and pick given a huge integer range.
15:26 dalek roast: review: https://github.com/perl6/roast/commit/2d6c0122c6
15:27 colomon those probably need fudging for rakudo.  don't work in niecza yet, either.
15:30 * colomon is currently spectesting a patch for it.
15:35 tokuhiro_ joined #perl6
15:46 * colomon 's spectest run is not going to finish before he has to go fetch his son from preschool.  :(
15:54 Circlepuller_ joined #perl6
16:00 kresike bye folks
16:06 MayDaniel joined #perl6
16:19 dalek niecza: e3c9e71 | (Solomon Foster)++ | lib/ (3 files):
16:19 dalek niecza: 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 dalek niecza: review: https://github.com/sorear/niecza/commit/e3c9e7117d
16:24 dalek niecza: 5626cc3 | (Solomon Foster)++ | lib/Builtins.cs:
16:24 dalek niecza: Use Niecza's standard Random number generator instead of creating a fresh one just for bigrand.
16:24 dalek niecza: review: https://github.com/sorear/niecza/commit/5626cc314c
16:26 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 sirrobert are there other effects of using $.foo that I should know about?
16:26 sirrobert (besides creating meta methods)
16:26 tadzik probably. IIRC $.foo declares a multi method anyway
16:26 colomon n: say 1
16:26 p6eval niecza v21-28-g3a38229: OUTPUT«1␤»
16:27 tadzik sirrobert: $! is probably the way to go
16:27 sirrobert ok, thanks
16:28 colomon evalbot: rebuild niecza
16:28 colomon p6eval: rebuild niecza
16:28 tadzik evalbot rebuild niecza
16:28 p6eval OK (started asynchronously)
16:29 colomon tadzik++
16:29 * tadzik bows
16:34 colomon n: say 1
16:34 p6eval niecza v21-30-g5626cc3: OUTPUT«1␤»
16:34 colomon n: say (1..10**1000).pick(3)
16:34 p6eval niecza v21-30-g5626cc3: OUTPUT«8352343316367051719535682886505684717364232081454091004608011832671811437135322363635737089230612143341797556189319616076667164518861164658605022207595578853580162174086748553659887834144464471190386311711860238404045877380277115192134737186223384038784034…
16:38 cognominal joined #perl6
16:39 Tanktalus joined #perl6
16:40 telex joined #perl6
16:46 cognominal joined #perl6
16:50 colomon n: say (1..10**1000).pick(3).map(*.log)
16:50 p6eval niecza v21-30-g5626cc3: OUTPUT«2300.5410696508461 2302.2650395859964 2300.7792676594859␤»
16:50 colomon n: say (1..10**1000).pick(3).map(*.log10)
16:50 p6eval niecza v21-30-g5626cc3: OUTPUT«999.93091873202661 999.6052140959921 999.92102784624421␤»
16:51 colomon :)
16:52 [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…
16:52 [Coke] yah, I wonder what I was thinking there, p6eval.
16:54 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␤»
16:55 colomon n: say (2**1345-1).is-prime
16:55 p6eval niecza v21-30-g5626cc3: OUTPUT«False␤»
16:55 colomon n: say (1, 2, 4 ... *).grep(*.is-prime)[^100]
16:55 colomon whopos
16:56 p6eval niecza v21-30-g5626cc3: OUTPUT«(timeout)»
16:56 colomon n: say (1, 2, 4 ... *).grep({ ($_-1).is-prime })[^50]
16:56 p6eval niecza v21-30-g5626cc3: OUTPUT«(timeout)»
16:56 benabik joined #perl6
16:57 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␤»
16:57 colomon n: say (1..*).map(* ** 2).grep(*.is-prime)[^10]
16:58 p6eval niecza v21-30-g5626cc3: OUTPUT«(timeout)»
16:58 spider-mario whoa, .is-prime is built-in?
16:58 [Coke] as of a week or so ago, yes.
16:58 spider-mario n: (1 .. 20).grep: *.is-prime
16:58 p6eval niecza v21-30-g5626cc3:  ( no output )
16:58 spider-mario n: (1 .. 20).grep(*.is-prime).say
16:58 p6eval niecza v21-30-g5626cc3: OUTPUT«2 3 5 7 11 13 17 19␤»
16:58 spider-mario not bad :|
16:59 colomon n: say (1..*).map(* ** 2).grep(*.is-prime)[^4]
16:59 p6eval niecza v21-30-g5626cc3: OUTPUT«(timeout)»
16:59 colomon that should not be slow.  :(
17:00 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)
17:00 [Coke] colomon: something too eager?
17:00 p6eval niecza v21-30-g5626cc3: OUTPUT«␤»
17:00 colomon must be
17:00 colomon n: say (1..4).map(* ** 2 - 1).grep(*.is-prime)
17:00 p6eval niecza v21-30-g5626cc3: OUTPUT«3␤»
17:00 [Coke] or what moritz said!
17:00 colomon oh, duh!~
17:00 colomon moritz++
17:00 [Coke] moritz++
17:00 colomon n: say (1..*).map(* ** 2 - 1).grep(*.is-prime)[^4]
17:01 p6eval niecza v21-30-g5626cc3: OUTPUT«(timeout)»
17:01 moritz r: say (1..*).map(* ** 2 - 1).grep(*.is-prime)[^4]
17:01 p6eval rakudo 7d6aa0: OUTPUT«(timeout)»
17:01 moritz r: say (1..*).map(* ** 2 - 1).grep(*.is-prime)[0]
17:01 p6eval rakudo 7d6aa0: OUTPUT«3␤»
17:01 moritz r: say (1..*).map(* ** 2 - 1).grep(*.is-prime)[^2]
17:01 colomon n: say (1..100).map(* ** 2 - 1).grep(*.is-prime)[^4]
17:01 p6eval rakudo 7d6aa0: OUTPUT«(timeout)»
17:01 p6eval niecza v21-30-g5626cc3: OUTPUT«3 Any() Any() Any()␤»
17:02 moritz .oO( ... )
17:02 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…
17:02 colomon dang it, backwards again
17:02 colomon n: say (1..100).map(2 ** * - 1).grep(*.is-prime)[^4]
17:02 p6eval niecza v21-30-g5626cc3: OUTPUT«3 7 31 127␤»
17:02 colomon n: say (1..100).map(2 ** * - 1).grep(*.is-prime)[^10]
17:02 p6eval niecza v21-30-g5626cc3: OUTPUT«3 7 31 127 8191 131071 524287 2147483647 2305843009213693951 618970019642690137449562111␤»
17:03 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␤»
17:03 colomon n: say (1..100).map(2 ** * - 1).grep(*.is-prime)[20]
17:03 p6eval niecza v21-30-g5626cc3: OUTPUT«Any()␤»
17:03 colomon n: say (1..*).map(2 ** * - 1).grep(*.is-prime)[20]
17:03 p6eval niecza v21-30-g5626cc3: OUTPUT«(timeout)»
17:05 colomon n: say (1..*).map(2 ** * - 1).grep(*.is-prime)[11]
17:05 p6eval niecza v21-30-g5626cc3: OUTPUT«170141183460469231731687303715884105727␤»
17:05 colomon n: say (1..*).map(2 ** * - 1).grep(*.is-prime)[12]
17:05 p6eval niecza v21-30-g5626cc3: OUTPUT«(timeout)»
17:06 moritz r: say (1..*).map(2 ** * - 1).grep(*.is-prime)[11]
17:06 p6eval rakudo 7d6aa0: OUTPUT«170141183460469231731687303715884105727␤»
17:06 moritz r: say (1..*).map(2 ** * - 1).grep(*.is-prime)[12]
17:06 p6eval rakudo 7d6aa0: OUTPUT«6864797660130609714981900799081393217269435300143305409394463459185543183397656052122559640661454554977296311391480858037121987999716643812574028291115057151␤»
17:06 moritz r: say (1..*).map(2 ** * - 1).grep(*.is-prime)[13]
17:06 p6eval rakudo 7d6aa0: OUTPUT«531137992816767098689588206552468627329593117727031923199444138200403559860852242739162502265229285668889329486246501015346579337652707239409519978766587351943831270835393219031728127␤»
17:06 moritz r: say (1..*).map(2 ** * - 1).grep(*.is-prime)[15]
17:06 colomon libtommath++
17:06 p6eval rakudo 7d6aa0: OUTPUT«1475979915214180235084898622737381736312066145333169775147771216478570297878078949377407337049389289382748507531496480477281264838760259191814463365330269540496961201113430156902396093989090226259326935025281409614983499388222831448598601834318536230923772641390209…
17:07 moritz r: say (1..*).map(2 ** * - 1).grep(*.is-prime)[16]
17:07 p6eval rakudo 7d6aa0: OUTPUT«(timeout)»
17:09 moritz wasn't the supposed formula for primes 2 ** (2 ** $_) - 1 ?
17:11 colomon moritz: depends on what you mean by "supposed"
17:11 colomon http://primes.utm.edu/mersenne/
17:12 colomon the [^10] calculation both niecza and rakudo do easily took 300 years of math to establish!
17:14 colomon n: say (1..258).map(-> $n { $n => 2 ** $n - 1).grep(*.value.is-prime)[12]
17:14 p6eval niecza v21-30-g5626cc3: OUTPUT«[31m===[0mSORRY![31m===[0m��Unable to parse block at /tmp/JJwyGDD4U6 line 1:�------> [32msay (1..258).map(-> $n {[33m�[31m $n => 2 ** $n - 1).grep(*.value.is-prim[0m�Couldn't find final '}'; gave up at /tmp/JJwyGDD4U6 line 1:�------> [32my (1..258…
17:14 colomon n: say (1..258).map(-> $n { $n => 2 ** $n - 1}).grep(*.value.is-prime)[12]
17:14 p6eval niecza v21-30-g5626cc3: OUTPUT«Any()␤»
17:14 colomon n: say (1..258).map(-> $n { $n => 2 ** $n - 1}).grep(*.value.is-prime)
17:14 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 #perl6
17:21 jaldhar_ joined #perl6
17:21 * colomon is starting to wonder to what extent libtommath is cheating...
17:23 stopbit joined #perl6
17:23 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] } }
17:23 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:…
17:23 [Coke] Can someone sixify that more?
17:24 [Coke] 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 ;)
17:25 [Coke] (of course, that was 20 years ago.)
17:25 [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 kurahaupo joined #perl6
17:25 colomon List::Utils sliding-window.  ;)
17:27 colomon r: say (1..*).grep(-> $n { $n.is-prime && ($n + 2).is-prime }).map(-> $n { $n ~ " : " ~ $n + 2 })
17:27 colomon whoops
17:27 sisar joined #perl6
17:27 p6eval rakudo 7d6aa0: OUTPUT«(timeout)»
17:28 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 #perl6
17:28 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 :…
17:29 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 : …
17:29 colomon rn: say (1..*).grep(-> $n { $n.is-prime && ($n + 2).is-prime }).map(-> $n { $n ~ " : " ~ $n + 2 })[^200]
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 : …
17:29 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 :…
17:30 [Coke] colomon++
17:30 colomon of course, this version takes twice as long
17:33 FROGGS joined #perl6
17:33 flightrecorder joined #perl6
17:43 colomon_ am I still on here?
17:43 colomon \o/
17:47 benabik_ joined #perl6
17:59 thou joined #perl6
18:17 [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…
18:17 [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
18:18 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. ;)
18:18 GlitchMr I've made a completely pointless task at Rosetta Code
18:18 GlitchMr http://rosettacode.org/wiki/Detect_input_coming_from_tty
18:19 GlitchMr 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
18:19 colomon there are a LOT of prime numbers.
18:19 GlitchMr Why not?
18:19 GlitchMr oh, ok
18:20 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...
18:20 colomon TimToady: more than a LOT?  prove it!
18:20 colomon ;)
18:20 TimToady I don't want to prove it, which is why I said "I suspect"
18:21 * colomon is eager to hear if the latest niecza helps on the rc prime chain problem....
18:22 colomon though I guess we wouldn't know the answer for hours even if you started now, right?
18:24 * [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 [Coke] range of 10 billion numbers"
18:24 cognominal joined #perl6
18:24 [Coke] I am tempted to kick off that line to see how long it takes rakudo on feather.
18:27 [Coke] (http://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:28 * colomon just started attempting to find all the primes to 10000000000 under niecza.
18:28 * colomon suspects it will take a while
18:29 * FROGGS .oO( perhaps more than a while? )
18:30 tadzik I'm not sure I understand why is-prime is core
18:30 tadzik I find it hard to imagine a program, whose the purpose is something else than calculating primes, to make use of it
18:31 flussence +1
18:31 colomon tadzik: crypto
18:31 tadzik well, ok. Are gonna push RSA into core as well?
18:31 tadzik s/Are/Are we/
18:32 tadzik 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:33 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 tadzik ok, I'm shutting up again
18:33 colomon tadzik: the thing is, it's hard for a module to do well
18:34 colomon that is, rakudo is calling straight into its underlying bignum library, and niecza is doing the same for the expmod portion.
18:34 colomon maybe when the module ecosystem is more developed, it will be easier to move them out to a module...
18:34 FROGGS there should be a way to do that in a module though
18:35 PerlJam FROGGS++ (assuming that really was meant as humor :)
18:36 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 FROGGS for performance reasons for example
18:37 imarcusthis- joined #perl6
18:37 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 GlitchMr42 joined #perl6
18:37 daniel-s_ joined #perl6
18:38 FROGGS basically you just can have submodules you load when detecting the right system
18:38 FROGGS like File::Spec doesnt load ::Win32 stuff on linux (because Win32 might include Win32 modules that cant be installed on other systems)
18:39 FROGGS I dont think there will be some magic that picks the right system specific code for you out of a bag
18:40 PerlJam FROGGS: as long as we have the same interface no matter the underlying implementations.  That's where the "magic" is
18:41 FROGGS I am talking about not using some sort of interface/layer in between
18:41 FROGGS I know from the work on the SDL module that this won't be enough in every case
18:42 PerlJam FROGGS: not for the every-day programmers, but it'll have to be *somewhere*
18:42 clkao_ joined #perl6
18:43 Circlepuller joined #perl6
18:43 jnthn_ joined #perl6
18:43 masak o/, #perl6
18:44 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 FROGGS hi masak
18:45 xinming_ joined #perl6
18:46 sivoais_ joined #perl6
18:48 spider-mario joined #perl6
18:48 sudokode joined #perl6
18:48 xdbr joined #perl6
18:48 doy joined #perl6
18:48 perigrin joined #perl6
18:48 spacebat_ joined #perl6
18:48 GlitchMr That is fun
18:48 GlitchMr (not really)
18:49 FROGGS GlitchMr: you can talk using statement modifiers like my son does
18:49 FROGGS "That is fun"
18:49 FROGGS ... pause ...
18:49 FROGGS "not"
18:52 masak like Borat.
18:53 moritz ...
18:53 moritz not.
18:53 GlitchMr This is not very interesting
18:53 GlitchMr not
18:54 GlitchMr Double negatives because why not?
18:55 s1n1 joined #perl6
18:55 telex_ joined #perl6
18:55 FROGGS_ joined #perl6
18:55 kaare__ joined #perl6
18:55 d4l3k_ joined #perl6
18:56 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 jaldhar_ joined #perl6
18:57 cognominal there is also the double positive that rings as negative :
18:57 cognominal "yea, right!"
18:57 GlitchMr double positive is double negative except when it isn't
18:57 Celelibi_ joined #perl6
18:58 yves_ joined #perl6
18:58 masak yeah, yeah.
18:58 sirrobert hey moritz:  How do I pass in "NULL" in DBIish?
18:58 sirrobert Nil?
18:59 moritz sirrobert: any undefined value should do. I usually use Any
18:59 sirrobert moritz: ok, thanks
18:59 masak nr: say Nil.defined
18:59 moritz Nil has the habit of vanishing in list context
18:59 p6eval rakudo 7d6aa0, niecza v21-30-g5626cc3: OUTPUT«False␤»
18:59 sirrobert huh
18:59 sirrobert heh
18:59 masak nr: say +(Nil)
18:59 p6eval niecza v21-30-g5626cc3: OUTPUT«0␤»
18:59 p6eval ..rakudo 7d6aa0: OUTPUT«use of uninitialized value of type Nil in numeric context  in block  at /tmp/nceO31LI9D:1␤␤0␤»
19:01 pjcj joined #perl6
19:02 pmichaud joined #perl6
19:02 moritz nr: say +(Nil, )
19:02 p6eval niecza v21-30-g5626cc3: OUTPUT«1␤»
19:02 p6eval ..rakudo 7d6aa0: OUTPUT«0␤»
19:02 * moritz wonders what masak will make of that
19:03 telex joined #perl6
19:03 Targen joined #perl6
19:03 masak a witch!
19:03 masak I mean, a bug!
19:03 cognominal http://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"
19:03 PerlJam cognominal: nah, that was the answer that Feynman gave for stealing a door.
19:04 quietfanatic joined #perl6
19:04 [Coke] joined #perl6
19:04 masak moritz: fwiw, I can't imagine what Niecza thinks is the element there.
19:04 masak Nil, probably.
19:04 moritz masak: Nil :-)
19:04 DarthGandalf joined #perl6
19:04 moritz .oO( Mu )
19:04 masak but isn't that just a case where it should collapse?
19:04 moritz IMHO yes
19:05 masak n: say (Nil, )[0]
19:05 p6eval niecza v21-30-g5626cc3: OUTPUT«Nil␤»
19:05 * masak submits nieczissue
19:05 moritz nr: say (Nil, Nil, Nil).perl
19:05 p6eval rakudo 7d6aa0, niecza v21-30-g5626cc3: OUTPUT«(Nil, Nil, Nil)␤»
19:05 masak o.O
19:05 moritz nr: say (Nil xx 3).perl
19:05 p6eval rakudo 7d6aa0, niecza v21-30-g5626cc3: OUTPUT«().list␤»
19:05 masak huh.
19:05 moritz well, rakudo is consistent.
19:05 masak nr: say "all you ever talk about is ", (Nil, Nil, Nil).perl
19:05 p6eval rakudo 7d6aa0, niecza v21-30-g5626cc3: OUTPUT«all you ever talk about is (Nil, Nil, Nil)␤»
19:06 moritz nr: say (Nil xx 3).elems
19:06 p6eval niecza v21-30-g5626cc3: OUTPUT«3␤»
19:06 p6eval ..rakudo 7d6aa0: OUTPUT«0␤»
19:07 masak nr: say Nil.perl.subst(/i/, 'ie').subst(/l/, 'ls Bohr')
19:07 p6eval rakudo 7d6aa0, niecza v21-30-g5626cc3: OUTPUT«Niels Bohr␤»
19:07 masak \o/
19:07 * moritz chuckles
19:08 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}␤»
19:08 sirrobert r: use Test; my Str $str; is_deeply {a=>$str, b=>2}, {a=>$str, b=>2}, "wat";
19:08 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␤»
19:09 sirrobert It can handle the sad path ok, but not the happy?
19:09 cognominal_ joined #perl6
19:11 masak it definitely shouldn't emit a warning from within is_deeply like that.
19:11 masak please submit a rakudobug.
19:11 sirrobert that's what I thought =)
19:11 sftp_ joined #perl6
19:11 sirrobert wilco
19:12 lumi__ joined #perl6
19:12 PerlPilot joined #perl6
19:12 orafu joined #perl6
19:12 cognominal_ much ado about nothing^WNil
19:12 clkao joined #perl6
19:13 phenny joined #perl6
19:13 snarkyboojum_ joined #perl6
19:13 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␤»
19:13 moritz that's where the warning comes from
19:14 * moritz tries a patch
19:14 moritz r: say Int eqv Int
19:14 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␤␤»
19:21 moritz ok, warnings are gone, now I need to wait for the spectest to finish
19:22 moritz eqv.rakudo passed, that's good :-)
19:24 masak moritz++ # untiring LHF picker
19:26 moritz masak: it's good that you have that impression, because I feel my contributions have decreased these past weeks
19:27 masak well, my perception may be somewhat coloured by not being around a lot in the past week or so.
19:29 birdwindupbird joined #perl6
19:29 krunen joined #perl6
19:40 xinming joined #perl6
19:40 imarcusthis joined #perl6
19:40 [particle] left #perl6
19:43 * PerlJam wonders what color masak's perception actually is ...
19:51 sirrobert dang, I know I've asked this before but ...   How do I merge two hashes?
19:52 sirrobert (don't care about priority)
19:53 sftp joined #perl6
19:53 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␤»
19:53 PerlJam sirrobert: what do you mean by "merge"?  Perhaps you want %hash.push ?
19:54 sirrobert PerlJam:  I think masak's solution might be sufficient.  Maybe I do want %hash.push... playing now =)_
19:54 sirrobert it's such a simple operation I keep forgetting it
19:55 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  :)
19:56 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
19:56 masak r: my %h1 = foo => 2; my %h2 = bar => 5; my %h = %h1, baz => 42, %h2; say %h.perl
19:56 p6eval rakudo 7d6aa0: OUTPUT«("foo" => 2, "baz" => 42, "bar" => 5).hash␤»
19:56 masak case in point.
19:57 masak flussence: yeahbut. mutability. eww! :P
19:59 sirrobert r: my %h; %h ,= a=>1, {b=>2}; say %h;
19:59 p6eval rakudo 7d6aa0: OUTPUT«("a" => 1).hash␤»
19:59 sirrobert is there a way to modify ,= to get the b=>2 added in?
20:03 rindolf joined #perl6
20:03 rindolf Hi all.
20:04 rindolf Oh, fglock is not here. :-(
20:04 sirrobert \o
20:04 moritz r: my %h; %h ,= (a=>1, {b=>2}); say %h
20:04 p6eval rakudo 7d6aa0: OUTPUT«("a" => 1, "b" => 2).hash␤»
20:04 sirrobert ok, explicit parcelization
20:05 moritz just precedence
20:05 sirrobert I feel like something like ....  %h ,=: would be cool
20:05 dalek Perlito: 3b60516 | (Flavio S. Glock)++ | / (2 files):
20:05 dalek Perlito: Perlito5 - js3 - proxy objects
20:05 dalek Perlito: review: https://github.com/fglock/Perlito/commit/3b6051620a
20:09 dalek rakudo/nom: 16f22b8 | moritz++ | src/core/ (3 files):
20:09 dalek rakudo/nom: avoid undef warnings in infix:<eqv>
20:09 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/16f22b86b1
20:11 dalek roast: 3ec12fb | moritz++ | S32- (2 files):
20:11 dalek roast: rakudofudge new tests
20:11 dalek roast: review: https://github.com/perl6/roast/commit/3ec12fbb4d
20:16 sivoais joined #perl6
20:17 kenjiskywalker joined #perl6
20:18 kevin_ joined #perl6
20:30 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:36 yarp joined #perl6
20:36 sirrobert joined #perl6
20:37 sirrobert What's the name of that site where I read some ... sort of zen meditation stories about codestuff?
20:37 sirrobert they were written in the style of ancient japan, sort of
20:37 sirrobert koans, maybe
20:38 arnsholt http://thecodelesscode.com/contents perhaps?
20:38 sirrobert looking ...
20:38 sirrobert yep, thanks!
20:40 tadzik joined #perl6
20:41 colomon n: say (10**200).rand
20:41 p6eval niecza v21-30-g5626cc3: OUTPUT«1.9789294907725088E+199␤»
20:41 colomon n: say (^10**200).roll
20:41 p6eval niecza v21-30-g5626cc3: OUTPUT«3730272213122800372038597066590769473588052458040457760369967781397527398858884683666092323458521639921390133782509837155048810748495044452957574041583858513499136076213452595064559232184559620069132␤»
20:46 colomon r: say (^10**200).roll
20:46 p6eval rakudo 7d6aa0: OUTPUT«73106935604391846709646637334391297033075072750660509583045411849926913306228805242955261659345982704104376311048852855326591615968251842470610764545921208760514261773484120965830550780545292849643520␤»
20:47 sorear "eek, it's not consistent with rakudo"
20:49 masak sorear! \o/
20:50 masak well, sorear is here. time for me to go to bed. :P
20:50 masak 'night, #perl6
20:50 sorear knight, masak.
20:54 Gruber joined #perl6
20:55 kcwu_ joined #perl6
20:55 DrEeevil joined #perl6
20:56 __sri joined #perl6
20:56 risou_ joined #perl6
20:57 mathw_ joined #perl6
20:57 betterwo1ld joined #perl6
20:57 au__ joined #perl6
20:57 diakopte1 joined #perl6
20:57 estrai joined #perl6
20:57 literal_ joined #perl6
20:59 yeltzooo joined #perl6
20:59 kurahaupo joined #perl6
21:00 p6eval joined #perl6
21:00 aloha joined #perl6
21:01 takesako_ joined #perl6
21:01 groky joined #perl6
21:04 Yappocall joined #perl6
21:04 awwaiid joined #perl6
21:04 mst joined #perl6
21:04 TimToady joined #perl6
21:04 cotto joined #perl6
21:04 yeltzooo joined #perl6
21:08 MikeFair_ joined #perl6
21:08 yves__ joined #perl6
21:09 bonsaikitten joined #perl6
21:09 mikemol joined #perl6
21:09 MayDaniel joined #perl6
21:12 fgomez joined #perl6
21:14 [particle]1 joined #perl6
21:16 huf_ joined #perl6
21:17 ivan`` joined #perl6
21:18 japhb_ joined #perl6
21:20 dalek niecza: f982881 | sorear++ | / (3 files):
21:20 dalek niecza: Inject references into CompilerBlob in a way that still works to fix the bootstrap
21:20 dalek niecza: review: https://github.com/sorear/niecza/commit/f982881cc8
21:20 dalek niecza: 3b04575 | sorear++ | docs/announce.v22:
21:20 dalek niecza: Draft v22 announcement
21:20 dalek niecza: review: https://github.com/sorear/niecza/commit/3b04575626
21:21 kurahaupo joined #perl6
21:23 broquain1 joined #perl6
21:23 cggoebel joined #perl6
21:25 orafu joined #perl6
21:26 Bucciarati joined #perl6
21:26 cognominal joined #perl6
21:31 sftp_ joined #perl6
21:31 xinming_ joined #perl6
21:31 d4l3k_ joined #perl6
21:32 rhr_ joined #perl6
21:32 markov1 joined #perl6
21:33 pmichaud joined #perl6
21:33 PacoAir joined #perl6
21:35 kurahaupo joined #perl6
21:35 tokuhiro_ joined #perl6
21:43 baest_ joined #perl6
21:44 yarp joined #perl6
21:47 eiro__ joined #perl6
21:47 patspam_ joined #perl6
21:48 diakopte1 joined #perl6
21:50 domidumont joined #perl6
21:53 patspam joined #perl6
21:56 geekosaur joined #perl6
22:04 d4l3k_ joined #perl6
22:06 DrEeevil joined #perl6
22:07 japhb__ joined #perl6
22:07 tadzik1 joined #perl6
22:07 _jaldhar_ joined #perl6
22:08 PerlPilot joined #perl6
22:09 snarkyboojum joined #perl6
22:09 Psyche^ joined #perl6
22:10 p6eval joined #perl6
22:10 aloha joined #perl6
22:10 mtk joined #perl6
22:15 d4l3k_ joined #perl6
22:16 mikemol_ joined #perl6
22:17 au___ joined #perl6
22:18 doy_ joined #perl6
22:20 justAShortLook joined #perl6
22:25 ranguard_ joined #perl6
22:34 immortal joined #perl6
22:34 immortal joined #perl6
22:35 Chillance joined #perl6
22:38 simcop2387 joined #perl6
22:43 snearch joined #perl6
22:44 sorear spectest run finished
22:44 sorear colomon: ping
22:49 sorear colomon: deping, my fault
22:50 doy_ joined #perl6
22:50 sorear looks like no real failures
22:50 ranguard joined #perl6
22:56 colomon sorear: yeah, I don't know what's up with the transient failures
22:58 sorear colomon: one set of failures was version skew, I was trying to test your new pick.t without your pick patches
22:58 sorear (apparently this causes the test to go into an infinite loop which I killed after 90m)
22:59 sorear the chdir.t tests, I blame the fact that I was doing funny things with the t/ dir and symlinks
22:59 sorear some other failures were caused by TEST_JOBS=3 and niecza's dislike of concurrent access to the module cache
23:00 sorear the quoting.t stuff is a mono bug which I reported a few weeks ago but nothing has been done with
23:00 sorear (OSX-specific)
23:00 sorear which just leaves a TODO pass in eqv.t :D
23:01 benabik joined #perl6
23:01 sorear so all I'm waiting for now is a +1 on the announcement itself
23:04 skids joined #perl6
23:10 whiteknight joined #perl6
23:11 PerlJam joined #perl6
23:11 ranguard_ joined #perl6
23:13 groky joined #perl6
23:16 Circlepuller_ joined #perl6
23:21 doy_ joined #perl6
23:21 36DAB587W joined #perl6
23:21 jnthn joined #perl6
23:29 integral_ joined #perl6
23:29 integral_ joined #perl6
23:29 mj41 joined #perl6
23:33 colomon +1 on the announcement
23:33 colomon sorear: ^^
23:33 colomon 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.
23:34 colomon but they always are fine when I test them by themselves.
23:34 colomon that's on both OS X and Linux.
23:34 bruges_ joined #perl6
23:35 daniel-s__ joined #perl6
23:35 sorear colomon: do you run the spectest with TEST_JOBS?
23:35 sorear I think it's relevant that those are two very early tests
23:36 sorear I think they're failing because of contention on the module cache
23:45 benabik joined #perl6
23:46 colomon yes, that's runs with TEST_JOBS=4
23:50 dayangkun joined #perl6
23:58 kid51 joined #perl6

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

Perl 6 | Reference Documentation | Rakudo