»ö« 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! | Rakudo Star Released!
Set by diakopter on 6 September 2010.
dalek rixel: cb3f96a | diakopter++ | sprixel/lib/PublicDomain. (3 files):
add snapshot of PublicDomain.dll from codeplex (outercurve?)
03:14
rixel: bdccb38 | diakopter++ | / (24 files):
POC of some integration wireup with perl.exe running viv's STD.
diakopter .u TEARDROP 03:35
phenny U+273B TEARDROP-SPOKED ASTERISK (✻)
diakopter .u SPOKED 03:37
phenny U+2733 EIGHT SPOKED ASTERISK (✳)
diakopter .u CLUB-SPOKED 03:38
phenny U+2725 FOUR CLUB-SPOKED ASTERISK (✥)
mfollett What's the Perl 6 equivalent of /[^a]at/, e.g. 'bat' ~~ /[^a]at/ would match 04:58
mfollett rakudo: say 'bat' ~~ /[^a]at/ 04:59
p6eval rakudo 5d23e3: OUTPUT«␤»
diakopter std: say 'bat' ~~ /[^a]at/ 05:04
p6eval std 263c207: OUTPUT«Potential difficulties:␤ [^a] appears to be an old-school character class; please use <-[a]> if you mean a character class at /tmp/787MVCwzBG line 1:␤------> say 'bat' ~~ /[^a]⏏at/␤ok 00:01 118m␤»
diakopter :) 05:05
mfollett diakopter: thanks! 05:12
sorear good * #perl6 05:17
mberends commute & 05:22
masak good late morning, #perl6 08:55
moritz_ oh hi masak 08:55
sorear hello masak and moritz 08:56
masak hi moritz_ and sorear
m_ hell oo 10:10
moritz_ hell is object oriented? :-) 10:11
masak that's a bit harsh :) 10:12
but yes, that sounds likely.
Juerd Would it have roles?
Inheritance seems somewhat unlikely 10:13
moritz_ I've once read something, I think it was on perlmonks, "the real world is not object oriented" 10:14
it talked about gradual changes
is dusk an object?
m__ hell oo 10:21
masak the real world isn't object-oriented. people's models of it often are. 10:21
but even the models break down at some point.
m__ why oo? 10:22
suck paradigm
masak the challenge is to make the OO design out of models that break down far enough from the "interesting" parts of the application.
m__: I understand from your locutions that you don't like OO. that's fine. there are other ways to program. 10:23
m__ interesting parts?
i dont like oo but need to use oo for some 10:24
masak yes, the parts that the user finds useful in the application.
m__: you're in good company. ALexander Stepanov doesn't like OO either: secure.wikimedia.org/wikipedia/en/...r_Stepanov 10:25
er, non-"secure" URL: en.wikipedia.org/wiki/Alexander_Stepanov
dunno why ddg has started giving me the https ones. 10:26
m_ perl6 feature 10:30
m_ perl6 covers oo paradigm? 10:35
m_ anybody here? 10:41
m_ hell o 10:50
somebody can answer my questions 10:51
can't u? 10:52
daxim yes, you can program OO in perl6, if you want to 10:53
like its predecessor, it's multi-paradigm 10:54
m_ howto quite hard?
daxim sorry, I cannot parse that
m_ not hard? 10:55
daxim not hard if you already know the fundamentals of programming
m_ how good for perl6? 10:56
daxim I can't say for certain, why don't you read some documentation and see how far it takes you? 10:57
you can always ask for help on specific topics
perl6.org/documentation/ 10:58
m_ can u tell the difference between perl5 and perl6 11:00
frettled m_: Try reading this article: en.wikipedia.org/wiki/Perl_6 11:02
(and maybe someone here will update it if it's wrong in some respects)
m_ what you want perl6 goes 11:08
m_ less modules on perl6 11:15
m_ how perl6 goes in the future? 11:18
frettled That grasshopper was not very patient. 11:20
masak language barrier was high, too. 11:35
takadonet morning all 11:52
masak takadonet: \o
masak colomon++ # blogging about challenge.greplin.com/ solved in Perl 6 12:37
colomon I still haven't gotten around to putting up the 2nd challenge, which is a shame, because the code is pretty. :) 12:38
moritz_ my code is ugly, short and works :-) 12:39
oh, martian fluxx :-) 12:40
takadonet working code > fast code > pretty code
moritz_ bought that too, and also python fluxx
colomon I may exaggerate the prettiness of my code, I haven't looked at it since I wrote it at 3am. ;)
I just remember looking at the comments (on hacker news) of the python guys who were so pleased with themselves for having some quick matrix solution to Fibonacci numbers and thinking how much lovelier the p6 sequence was... 12:41
takadonet colomon: url? 12:42
colomon takadonet: errr... hard drive of my big linux box? ;) 12:42
gist.github.com/623953 12:43
not as pretty as I thought in the cold light of day.
but I think it will clean up nicely.
moritz_ have you tried the dynamic programming approach that a commenter left on your blog? 12:44
colomon moritz_: nope, but I'm excited about it. 12:45
colomon I think my spare time has been too occupied trying to build a colony ship in Lacuna Expanse 12:45
moritz_ :-) 12:46
nopaste.snit.ch/24373 that's my solution
colomon what challenge two really made me want to do is a prime number module for p6. 12:47
moritz_ too
I was close to writing one, actually :-)
colomon something that reasonably efficiently generates the list of them.
me too.
moritz_ :-) 12:48
colomon my best schemes seemed to involve an infinite sequence whose generator looked at the already generated elements.
Math::Prime, do you reckon? 12:49
moritz_
.oO( write a fast-ish C function, use it via NativeCall.pm)
colomon we should do it both ways. :) 12:51
moritz_ and with rabin-miller statistical tests for big numbers 12:52
erm, forgot that we don't have big ints yet :-)
masak what would it take for Rakudo to have big ints? 12:57
moritz_ that's a good question 13:01
in first approximation, a bigint type, and mapping integer overflows to that type
but I fear that in the end that's not practical - rakudo goes through get_integer vtables, and those require us to return native ints 13:02
which are non-big
masak a bigint type could be written today.
but yes, the other problems sound non-trivial. :/
moritz_ maybe I should write a mail to parrot-dev 13:03
frettled \o/
_someone_ doing IPv6 stuff might be happy 13:04
(128-bit yummies)
moritz_ frettled: there's a patch for both parrot adn rakudo ipv6 support in trac/rt 13:05
masak we already have 128 bit native ints in the spec, IIRC.
moritz_ frettled: it just needs test
frettled moritz_: aha!
masak: yep, IIRC, there's int32, int64 and int128, or somesuch 13:06
masak yep.
colomon we talked about bigints at YAPC::NA, seems Parrot already has (had?) some sort of support for it. 13:10
moritz_ yes; I think there' a bigint pmc if you have libgmp available, or so 13:11
but I don't see how that's usable as "the" Int type for a HLL 13:12
moritz_ btw I've been wishing for an 'identity' function or method a few times 13:16
moritz_ probably all the use cases were rather bad, but I had surprisingly many of them during the last few weeks 13:17
somthing like:
masak rakudo: my &id = method { self }; say 42.&id()
p6eval rakudo 5d23e3: OUTPUT«42␤»
masak voilà. 13:18
moritz_ rakudo: my @f = -> $x { $x }, *+2, * * 2; for @f -> &f { .say for map &f, 1..5 }
p6eval rakudo 5d23e3: OUTPUT«1␤2␤3␤4␤5␤3␤4␤5␤6␤7␤2␤4␤6␤8␤10␤»
masak maybe term:<*> could be used for that... 13:19
moritz_ on one hand, I like the idea; otoh I'm not sure it's good to overload * even more 13:20
masak same here. 13:21
just throwing it out because it seems an "obvious" solution.
moritz_ another would be augment class Mu { method id() is export { self } } 13:22
rakudo: my $f = method a() { self }; say $f(42) 13:23
p6eval rakudo 5d23e3: OUTPUT«Useless declaration of has-scoped Method in a module; add our or my to install it in the lexpad or namespace␤Suba (subid "72_1286974775.88871") has no $!llsig and no $!lazysig␤ in main program body at line 7257:CORE.setting␤»
moritz_ should that work? :-)
rakudo: my $f = my method a() { self }; say $f(42) 13:24
p6eval rakudo 5d23e3: OUTPUT«42␤»
moritz_ o/
masak moritz_: if you name a method outside of a class, you must use 'my' or 'our', IIUC. 13:25
moritz_: because the default is 'has', and it doesn't apply outside of a class/role body.
moritz_ rakudo: my $f = method () { self }; say $f(42)
p6eval rakudo 5d23e3: OUTPUT«42␤»
masak the threads p6l email thread looks like something that partially intersects jnthn++'s work with 6model. 13:34
takadonet everything intersects jnthn work 13:36
masak well, yes and no.
he's working on the carpet that's to be put in place when the current carpet gets pulled out from under us. 13:37
PerlJam But I want tile! 13:38
and maybe a throw rug.
PerlJam timbunce_: I was just reading your posts to p6l and about to generally timbunce++ you for it. 13:44
colomon rakudo: my @fib := (1, 1, *+* ... *); say (@fib ... { $^a > 227000 && $a %% 2 })[*-1] 13:49
p6eval rakudo 5d23e3: OUTPUT«832040␤»
colomon rakudo: my @fib := (1, 1, *+* ... *); say (@fib ... { $^a > 227000 && !($a %% 2) })[*-1] 13:50
p6eval rakudo 5d23e3: OUTPUT«317811␤»
colomon woah, can rewrite the challenge two script with about 1/3rd the lines.
masak rakudo: sub evapo($b, @coeffs) { [+] (1, $b * * ... *)[^@coeffs] >>*<< @coeffs }; say evapo(10, [1, 4, 6, 7]) # inspired by www.schnada.de/hylin/tao.html 13:54
p6eval rakudo 5d23e3: OUTPUT«7641␤» 13:55
masak can anyone think of a slightly nicer way to write that?
preferably without the slicing of the infinite sequence.
colomon what's wrong with the slicing? it seems very tidy 13:57
masak sure, but I had hoped there would be some hyperop that would do it implicitly for me.
colomon oh, I was reading it wrongly. 13:58
rakudo: sub evapo($b, @coeffs) { [+] (1, $b * * ... *) Z* @coeffs }; say evapo(10, [1, 4, 6, 7])
p6eval rakudo 5d23e3: OUTPUT«7641␤»
colomon how's that? 13:59
masak colomon++
clearly, I need to get into the Z mindset more.
colomon gist.github.com/624075 is my shorter (but still not really pretty) version of prime challenge 14:00
Zop is very cool, but them I'm biased. :-)
*then
moritz_ rakudo: sub evapo($b, @coeffs) { [+] @coeffs.kv.map: { .key * $b * .value } }; evapo(10, [1, 4, 6, 7])
p6eval rakudo 5d23e3: OUTPUT«Method 'key' not found for invocant of class 'Int'␤ in <anon> at line 22:/tmp/dNeVPUMiH2␤ in 'List::Bool' at line 1␤ in 'prefix:<!>' at line 434:CORE.setting␤ in 'reducewith' at line 317:CORE.setting␤ in 'evapo' at line 1␤ in main program body at line
..22:/tmp/dNeVPUMiH2␤»
moritz_ rakudo: sub evapo($b, @coeffs) { [+] @coeffs.pairs.map: { .key * $b * .value } }; evapo(10, [1, 4, 6, 7]) 14:01
masak "Be clear about the difference between your role as a programmer and as a tester. The tester in you must be suspicious, uncompromising, hostile, and compulsively obsessed with destroying, utterly destroying, the programmer's software." # also www.schnada.de/hylin/tao.html
thought it was just me :)
p6eval rakudo 5d23e3: ( no output )
moritz_ rakudo: sub evapo($b, @coeffs) { [+] @coeffs.pairs.map: { .key * $b * .value } }; say evapo(10, [1, 4, 6, 7])
p6eval rakudo 5d23e3: OUTPUT«370␤»
masak moritz_: need to multiply one more $b each time around.
colomon isn't it $b ** .key ?
moritz_ right 14:02
masak but that's slower.
moritz_ rakudo: sub evapo($b, @coeffs) { [+] @coeffs.pairs.map: { .b ** .key * .value } }; say evapo(10, [1, 4, 6, 7])
p6eval rakudo 5d23e3: OUTPUT«Method 'b' not found for invocant of class 'Pair'␤ in <anon> at line 22:/tmp/tPPf3Nq4_W␤ in 'List::Bool' at line 1␤ in 'prefix:<!>' at line 434:CORE.setting␤ in 'reducewith' at line 317:CORE.setting␤ in 'evapo' at line 1␤ in main program body at line 22:/tmp/tPPf3Nq4_W␤»
moritz_ rakudo: sub evapo($b, @coeffs) { [+] @coeffs.pairs.map: { $b ** .key * .value } }; say evapo(10, [1, 4, 6, 7])
p6eval rakudo 5d23e3: OUTPUT«7641␤» 14:02
moritz_ masak: I believe it when I see benchmarks :-)
masak doesn't need benchmarks, he has O() theory :) 14:03
moritz_ rakudo: sub evapo($b, @coeffs) { [+] @coeffs.kv.map: { $b ** $^k * $^v } }; say evapo(10, [1, 4, 6, 7])
p6eval rakudo 5d23e3: OUTPUT«7641␤»
moritz_ masak: O() theory requires you to identify the cost of primitives first. Have fun doing that for p6 :-) 14:04
masak true, true.
anyway, it's not really the Horner scheme anymore if you do the exponentiation.
moritz_ likes the .kv version
true, true
masak the whole point of it is to do the multiplication cumulatively.
moritz_ then Z* is exceedingly elegant 14:05
timbunce PerlJam: thanks! 14:11
masak Rosetta Code already has one: rosettacode.org/wiki/Horner's_rule_...ion#Perl_6 14:13
I think I like that version better, although I miss the sequence operator :) 14:14
is the semicolon really needed in rosettacode.org/wiki/Empty_program#Perl_6 ? 14:16
seems if one strives to write the shortest valid program one ought to avoid it...
moritz_ well, the empty string is still a valid perl 6 program 14:16
moritz_ if executed with a 'perl6' executable 14:17
masak you sure the empty string isn't a valid Perl 5 program in that case?
(see clarification in that article)
moritz_ yes; the defaulting to p5 only applies in some cases... 14:17
let me re-check S01
"Also, a file with a .p6 extension may be taken as indicative, as may any other extension containing the digit 6, such as p6l or p6m or pl6 or pm6" 14:18
so, an empty .p6 file is taken as Perl 6 code. 14:19
masak very well.
moritz_ std: v6; 14:20
p6eval std 263c207: OUTPUT«ok 00:01 114m␤»
moritz_ std: v6; $x = 1
p6eval std 263c207: OUTPUT«===SORRY!===␤Variable $x is not predeclared at /tmp/ivC0IJ1opK line 1:␤------> v6; $x⏏ = 1␤Check failed␤FAILED 00:01 117m␤»
moritz_ S01 lists that as valid *shudder*
masak it's just a sinked literal.
moritz_ S01 on strictness: ". But it should be easy to relax with -e or a bare version number" 14:21
moritz_ thinks the bare version number is a bad idea for relaxing
ruoso haha... Unicode 6.0 now includes all playing cards 14:24
moritz_ sees new possibilities for golfing the poker-with-meta-operators thing :-) 14:25
ruoso 1F0A1..1F0DF
masak maybe someone needs to tell them that they can stop adding symbols now. 14:26
moritz_ finds it funny 14:26
ruoso nothingmuch will like 1F450 OPEN HANDS SIGN 14:28
haehaehae
colomon masak: (finally catching up) I think the sequence operator version may be more clear to people who are not reduce-lovers. but the reduce version is very, very elegant, for sure.
ruoso 1F4A9 PILE OF POO
Juerd ruoso: Do they have traffic signs yet? 14:29
ruoso hmm... I'm going through the changes, haven't seen them as new
Juerd Okay 14:30
Too bad. Those would actually be useful for me
ruoso \o_ and \o/ got encoded
Juerd lol
ruoso 1F64B and 1F64C
HAPPY PERSON RAISING ONE HAND
PERSON RAISING BOTH HANDS IN CELEBRATION 14:31
the latter has "banzai" as a comment
1F6A6 🚦 VERTICAL TRAFFIC LIGHT 14:32
Juerd, ^
Juerd lol 14:33
Monochrome traffic lights are probably the least useful kind
ruoso I think they meant it as for the traffic sign that tells you there's a traffic light ahead of you
Juerd ruoso: In .nl, that's just a triangle sign with three circles in it :) 14:40
Three dots
ruoso oh... interesting
Juerd nl.wikipedia.org/wiki/Bestand:Neder...rd_J32.svg 14:41
That's the new one
The old one didn't have the black background shield behind the coloured dots
Oh, someone here tells me I'm wrong, and I was 14:42
But apparently the black paint wasn't any good and faded away on many signs.
ruoso that reminds me a funny video about the design of the stop sign
and how the customer blows it up
Juerd heh 14:43
I've seen that one
tadzik o/ 15:17
masak tadzik! \o/
tadzik www.reddit.com/r/programming/commen...6_grammar/ -- hmm, is it official and not complete, or neither official nor complete? 15:20
moritz_ it is an official release, in the sense that we officially say it's a rakudo release 15:21
but it's not a perl 6.0.0 complete, official release in the sense that it passes the whole test suite, and TimToady++ put his 'official' seal on it 15:22
masak weighed in 15:27
frettled masak: how much? :) 15:30
PerlJam still boggles at what magic people ascribe to "1.0"
frettled Magic 1.0.
masak PerlJam: me too. I'm not sure what they conceive is at the end of that rainbow. 15:30
frettled: about 47%, as it were. 15:31
frettled hee-hee
Someone with a Reddit account should respond to mcspiff and note that you hope he never had to use software depending on OpenSSL before June 1st this year. 15:32
moritz_ does
frettled Hah, another response from him which is off the mark. 15:40
OpenSSL is _not_ feature complete. :)
masak frettled: do you have any source to back this up?
if you do, I can reply to him. 15:41
frettled For FIPS: www.openssl.org/docs/fips/fipsnotes.html
masak I don't understand what that page is saying :/ 15:42
masak I'll let someone who does reply. 15:42
takadonet thanks for the defence guys!
frettled masak: I'm also looking to see what there is. I know that 0.9.7 wasn't feature complete in terms of some certificates, and ISTR that there are still some issues with strong crypto 15:44
frettled Hmm, it appears that the caveats are gone from the OpenSSL site. I really should check in more often than every few years. 15:48
Anyway, the question to him was more on the general note that from his point of view, OpenSSL was not production ready until this year, yet he probably had been using it (more or less wittingly) for many years before that. 15:51
…and OpenSSL is hardly the only such software — software with versions below 1.0.0 — in regular use.
takadonet Perl5 Moose is a very good example 15:54
masak we are technically right... but there's a point at which our arguments to prove our point start to sound like elaborate excuses for Perl 6 not being 1.0 yet. :/ 15:59
frettled yup 16:00
moritz_ .u diameter 16:43
phenny U+2300 DIAMETER SIGN (⌀) 16:43
daxim ⌀⃠ VERBOTEN 16:44
sorear good * #perl6 17:41
takadonet sorear: yo 17:46
sorear takadonet: Moose actually hit 1.00 recently 17:48
it was the 100th release, and a nice celebration :)
timbunce++ # Sensible handling of the threads discussion 17:49
skids waits for alester's perbuzz post to comment on threads. 18:09
takadonet sorear: backlogging. Ya they did but people were heavily using it before 1.00 18:36
alester skids: I need someone to be point of contact 18:56
and no one has stepped forward.
sorear alester: do you think I should plug Niecza's low level OS thread binding as a point to build off of? 18:59
alester I don't know what any of what you just said refers to.
but that's OK
All I need is someone in Perl 6 world to be a point of contact to collect whatever people want to say about Perl 6 threads.
sorear My implementation of Perl 6 has OS thread support (only) 19:00
Thread.new({ ... }); my $m = Monitor.new; $m.lock; $m.unlock;
alester sorear: Stop
sorear actually it's a wrapper around .NET threads
alester I don't care about threads.
I am just trying to get people with ideas together with the people designing.
dalek ecza/master: edd85a2 | sorear++ | v6/STD.pm6:
Work around lack of m// and s///
19:08
ecza/master: 12c3adc | sorear++ | / (8 files):
Assorted aggregate type improvements

This patch adds &unshift, &keys, &values, Hash iteration, Hash.LISTSTORE, Hash.kv, :exists, :delete, and &invert.
sorear timbunce: do you think I should plug Niecza's low level OS thread binding as a point to build off of? 19:46
timbunce sorear: no idea, sorry. I'm fairly clueless on the current state of things (eg I've no idea what "Niecza's low level OS thread binding" is). I just have opinions on where I'd like it to end up :) 19:50
sorear timbunce: I've got a very thin layer over .NET threads, mostly for bragging rights (MY IMPL HAS THREADS!) 19:51
skids alester: if it's only for a week or so to read irc backlogs and post them on the PerlBuzz comments I could do that. Can't promise to be especially prompt about it, but I can try for once a day. 20:10
alester I want an email address that people can send to.
I think if it requires logging in and making a comment on Perlbu, people won't do it.
skids Ah, my email's a bit dicey. I'm not on p6l either. (I meant, I could read backlogs here and post a summary to the perlbuzz comments.) 20:11
alester Here's what I need. "Perl 6 people are asking about threads stuff. We are looking for information about blah blah. If you have input, please email [email@hidden.address] 20:12
Who is the [email@hidden.address]
shortcircuit alester: It's completely not written (and not even started), but there was a concept spec I wrote for cross-channel monitoring you might abuse for the purpose. mmol-6453.livejournal.com/213900.html 20:13
No good at summarization, I'm afraid, but it might be useful for keyword triggering for shorter relavent logs. 20:14
skids Yeah, I greylist, so it doesn't play nice with some people's systems. Usually not a problem but with a bunch of new people mailing I wouldn't want to be bouncing hard-written comments. Sorry.
shortcircuit doesn't think he'll ever have time to get around to writing nexusbot, though. 20:15
alester Here's what I think we actually need for this to be useful: "I'd love to get that input. Have them send comments to me!" When that person steps forward, we can run with it.
skids will certainly send input to said person, though :-) 20:16
sorear #p5p is talking about stealing CATCH. hmm. 21:16
diakopter alester: I suspect sorear wasn't intending to address your call for help when mentioning niecza 21:22
PhatEddy When make spectest_smolder runs t/harness the Makefile ignores the return code from t/harness. 21:34
I think this is a mistake because t/harness doesn't build the archive until it's done and returns 0 even if tests fail. Any thoughts on fixing that?
dalek ecza/master: ea8058e | sorear++ | / (4 files):
Add leg et al, &grep, &map, infix:<x>
22:30
ecza/master: 9f1bf0e | sorear++ | / (5 files):
Implement &sort