»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg camelia perl6: ... | irclog: irc.perl6.org | UTF-8 is our friend!
Set by sorear on 25 June 2013.
00:00 chenryn__ joined 00:01 psch left 00:05 chenryn__ left 00:06 chenryn__ joined 00:15 chenryn__ left, jnap left 00:30 erkan joined 00:33 jnap joined 00:42 chenryn__ joined 00:46 chenryn__ left 00:56 vendethiel left 00:57 vendethiel joined 00:58 BenGoldberg joined 01:00 hoverboard left 01:02 klapperl_ joined 01:06 klapperl left 01:07 Su-Shee left 01:09 Su-Shee joined 01:20 thou joined 01:27 [Sno] left, [Sno] joined 01:39 thou left, thou joined 01:41 Akagi201_ left 01:43 [Sno] left 01:44 colomon_ left 01:46 chenryn__ joined 01:48 colomon joined 01:51 chenryn__ left 01:53 tempire left 01:54 tempire joined, camelia left 01:59 camelia joined 02:01 ChanServ sets mode: +v camelia, Sqirrel left, xiaomiao left, xiaomiao joined 02:07 dayangkun joined, xiaomiao left 02:08 xiaomiao joined 02:13 jnap left 02:18 Sqirrel joined 02:20 vendethiel-- joined 02:21 vendethiel left 02:24 noganex joined 02:27 silug left, noganex_ left 02:39 silug joined 02:40 erkan left 02:47 chenryn joined, chenryn__ joined 02:51 chenryn__ left 02:52 teodozjan joined 02:57 teodozjan left 03:04 chenryn__ joined 03:08 chenryn__ left 03:10 davercc joined
[Coke] . o O (Colorado) 03:14
03:22 mr-fooba_ left, kaare__ joined, mr-foobar joined 03:23 xragnar is now known as Guest10047, xragnar_ joined, Guest10047 left, xragnar_ is now known as xragnar 03:25 davercc left 03:26 davercc joined 03:27 molaf left 03:50 James-YeJ3TE48lO joined
James-YeJ3TE48lO utf8 ทำงานดีไหมครับ 03:52
03:58 Sqirrel left, Sqirrel joined 03:59 Sqirrel_ joined, Sqirrel left 04:02 Sqirrel joined, Sqirrel_ left, Sqirrel_ joined, Sqirrel left 04:03 BenGoldberg left 04:05 ivanshmakov left 04:06 ivanshma` joined 04:09 xenoterracide__ left 04:11 James-YeJ3TE48lO left, cognominal left, lyda_ left, Khisanth left, ggoebel111116 left, MilkmanDan left, Exodist left, japhb_ left, TimToady left, sjohnson left, apejens left, matija left, bloonix left, cosimo left, frettled left, thilp left, robinsmidsrod left, mtj_ left, ChoHag left, raydiak left, mhasch left, Possum left, djanatyn left, perigrin left, ccverg left 04:19 xenoterracide__ joined 04:21 kaare__ left 04:22 cognominal joined, lyda_ joined, Khisanth joined, MilkmanDan joined, Exodist joined, japhb_ joined, TimToady joined, Possum joined, sjohnson joined, apejens joined, matija joined, bloonix joined, ggoebel111116 joined, cosimo joined, frettled joined, thilp joined, robinsmidsrod joined, ChoHag joined, mtj_ joined, raydiak joined, ccverg joined, mhasch joined, djanatyn joined, perigrin joined 04:25 kaleem_ joined 04:27 lyda joined, lyda_ left 04:31 rurban1 left 04:36 chenryn left 04:41 xenoterracide__ left 04:42 chenryn joined
moritz p6: say 'ทำงานดีไหมครับ'.chars 04:48
04:48 kaare__ joined
camelia rakudo-{parrot,jvm,moar} 77024f, niecza v24-109-g48a8de3: OUTPUT«14␤» 04:48
04:53 gfldex joined 05:01 James-YeJ3TE48lO joined 05:02 rurban1 joined 05:05 chenryn__ joined 05:06 rurban1 left, hoverboard joined 05:09 chenryn__ left 05:12 [Sno] joined 05:15 xenoterracide__ joined 05:16 pdcawley left 05:21 James-YeJ3TE48lO left, pdcawley joined 05:22 James-YeJ3TE48lO joined 05:25 kaleem_ left 05:26 xenoterracide__ left 05:32 rurban1 joined 05:36 rindolf joined, rurban1 left 05:41 kaare__ is now known as kaare_ 06:01 hoverboard is now known as moistcherry 06:02 ivanshma` is now known as ivanshmakov, ivanshmakov left, ivanshmakov joined 06:03 thou left 06:05 mutani joined 06:06 chenryn__ joined 06:07 mutani left 06:11 chenryn__ left 06:12 rindolf left 06:14 lizmat joined
lizmat finally made it to Brussels 06:16
06:20 davercc left 06:34 [Sno] left
lizmat .tell vendethiel-- please look at blog.timbunce.org/2010/07/16/java2p...d-whereto/ 06:35
yoleaux lizmat: I'll pass your message to vendethiel--.
06:42 moistcherry is now known as hoverboard 06:43 SamuraiJack joined 06:45 lizmat left 06:50 ingy left 06:51 hoverboard left 07:01 ingy joined 07:03 FROGGS joined
FROGGS o/ 07:06
07:07 chenryn__ joined
tadzik o/ 07:07
FROGGS reads blog.timbunce.org/2010/07/16/java2p...d-whereto/ 07:08
07:10 atroxaper joined 07:11 zakharyas joined, chenryn__ left 07:12 atroxaper left 07:14 sqirrel__ joined
sergot morning o/ 07:14
07:16 virtualsue joined 07:17 teodozjan joined 07:22 darutoko joined, Isp-sec joined 07:24 anaeem1 joined 07:25 chenryn left 07:26 virtualsue left 07:28 anaeem1 left 07:30 virtualsue joined 07:35 rurban1 joined
masak a morn', a morn'! \o/ 07:36
<James-YeJ3TE48lO> utf8 ทำงานดีไหมครับ
why yes, James, it does.
it's our friend :) 07:37
James-YeJ3TE48lO Hehe, thanks. Do you read Thai?
FROGGS sort of... .chars is still wrong :o)
07:39 rurban1 left, anaeem1 joined 07:43 igorsutton joined 07:47 ivanshmakov left
masak James-YeJ3TE48lO: Google Translate is also my friend ;) 07:50
07:50 ivanshmakov joined
James-YeJ3TE48lO Haha, thought as much. :) 07:50
masak "[...] we should note that the proverb about not putting all your eggs in one basket is *not* necessarily a sound engineering principle. The right answer depends on the margin of error and on the per-basket failure rate. It also greatly depends on the chance of correlated, uncorrelated, and anti-correlated basket failures. Sometimes the best way to get your eggs from point A to point B is to put them all in one basket and take really good care of that basket." 07:51
^ a really nice quote I just found at www.av8n.com/computer/htm/secure-random.htm
07:51 anaeem1 left
James-YeJ3TE48lO Yes, it's certainly true of security and crypto primitives. 07:51
07:52 pecastro_ left, dmol joined 07:54 anaeem1 joined 08:00 [Sno] joined
masak James-YeJ3TE48lO: so you're calling in from .th? 08:01
08:04 lelf joined
James-YeJ3TE48lO Yes ใช่ครับ 08:04
08:09 Alina-malina left, Alina-malina joined
masak :) 08:10
08:14 anaeem1 left 08:19 ivanshmakov left, ivanshmakov joined 08:21 brrt joined 08:22 donaldh joined 08:24 anaeem1_ joined
FROGGS jnthn: say we have a C struct that has a void * in it which will be represented as an OpaquePointer - how can we unpack that pointer later using a class? 08:27
08:28 anaeem1_ left
FROGGS it seems we'd need parts of nqp::nativecall($!rettype, self, nqp::getattr(nqp::decont($args), Capture, '$!list')) 08:29
so this could become its own op: result = MVM_nativecall_make_cstruct(tc, res_type, dcCallPointer(vm, body->entry_point)); 08:31
08:31 sqirrel__ left
jnthn FROGGS: I think it'll need some kind of nqp::nativecast or so 08:32
08:32 fhelmberger joined
FROGGS (or the entirem switch statement, including int/Int/wahtever) 08:33
sergot jnthn: what should we do if we have an function inside the struct?
FROGGS .oO( cry? )
sergot :)
jnthn sergot: Not immediately sure how we express that.
FROGGS jnthn: also, I'd like to see that OpaquePointer gistifies to: OpaquePointer<24982734>, so you see its mem address for debugging 08:34
08:35 rurban1 joined
FROGGS okay, who wants to implement nqp::nativecast(OpaquePointer, <Type>) ? :o) 08:35
08:37 anaeem1_ joined 08:38 anaeem1_ left 08:39 rurban1 left 08:40 dakkar joined, dalek joined, ChanServ sets mode: +v dalek 08:43 James-YeJ3TE48lO left, anaeem1 joined, anaeem1 left
arnsholt FROGGS: I don't really have the time to implement that ATM, but it should be pretty straightforward I think 08:44
Mostly a matter of hooking already existing functionality into a new op
FROGGS arnsholt: pssst, I wanna trick sergot in doing it :P 08:46
or I do it, should be a fairly small amount of work for one who has already implemented ops 08:47
arnsholt sergot: If your struct contains a function pointer, you'll have to implement support for function pointers first =) 08:49
FROGGS perhaps something can be stolen from how callbacks work? 08:50
sergot hmmm, I can try :)
arnsholt The existing callback stuff should have a fair amount of what's needed, yeah
But storable function pointers are a bit fiddly, 'cause it's not obvious (to me anyways) what kind of type they should have 08:51
sergot challenge accepted ;))
arnsholt The pointer type fiddling should be pretty straightforward though 08:52
(That's zavolaj #13, BTW =)
teodozjan hi, I would like to ask whether I'm the only person who has error while trying to compile parrot backend :) 09:00
xiaomiao teodozjan: I have encountered an error too 09:01
teodozjan: tried with 6.2-6.5 parrot, they all don't want to cooperate
09:02 pecastro joined 09:03 anaeem1 joined
teodozjan i've bisected it but i'm not sure it is real cause github.com/rakudo/rakudo/commit/f1...nt-6843467 09:03
09:04 anaeem1 left, anaeem1 joined
jnthn That would be a very strange patch to casue such a failure, given it's mostly just adding an extra condition on whether to apply an optimization (and means we apply it *less*) 09:06
09:08 chenryn__ joined 09:09 chenryn joined
teodozjan maybe it triggered something faulty 09:09
09:10 smls joined, Su-Shee left
masak ++sergot # function pointers 09:13
09:13 chenryn__ left
masak a function pointer has type Func[Param1, Param2, RetVal], no? 09:13
at least conceptually.
the same should hold for C. 09:14
smls "<FROGGS> sort of... .chars is still wrong :o)" -- I don't think it is 09:16
ดี and รั are two alphabet characters each: the bottom ones consonants, the top ones the vowels following them. 09:17
(If I remember correctly)
They just happen to be written on top of each other... :) 09:18
ทำ is different: The bottom left part is the consonant, and the right+top parts together are the vowel character. 09:20
FROGGS smls: I just selected the text using firefox, and it looked like as if there where two codepoint pairs that were combined
I counted 12 grapheme clusters by selecting the text
smls Well I don't know how Unicode defined chars, but that's how the Thai alphabet (as taught in Thai kindergarten) separates them 09:21
FROGGS and .chars should tell you the amount of grapheme clusters, which should be identical to the *visible* characters
09:26 silug left, spider-mario joined 09:28 mls_ is now known as mls 09:35 tadzik left 09:36 rurban1 joined 09:37 silug joined 09:40 Possum left, dylanwh left, rurban1 left
vendethiel-- thanks lizmat 09:40
yoleaux 06:35Z <lizmat> vendethiel--: please look at blog.timbunce.org/2010/07/16/java2p...d-whereto/
09:45 teodozjan left 09:46 pecastro left 09:47 teodozjan joined 09:53 denis_boyun joined
vendethiel-- not related though :( 09:55
09:55 vendethiel-- is now known as vendethiel 09:57 brrt left 10:01 pdcawley left 10:03 tadzik joined, pecastro joined 10:09 Isp-sec left
masak likes that today's topic seems to involve the Thai alphabet 10:18
10:18 Sqirrel_ left 10:26 sqirrel joined
masak a good friend of mine turns 32 today. 10:29
I went to Wikipedia and discovered that 32 is a happy number.
naturally, I had to implement a way to show this in Perl 6Ö
naturally, I had to implement a way to show this in Perl 6:
m: sub happy($n is copy) { $n = [+] $n.comb X** 2 until $n == 1 || (my %){$n}++; $n == 1 }; say happy 32
camelia rakudo-moar 77024f: OUTPUT«True␤»
masak it was easier than I thought.
jnthn eww, look at that state :D 10:30
masak note especially that it is *not in a .map* :P 10:31
jnthn :P
masak yes, that's just a matter of taste. 10:32
10:37 rurban1 joined 10:38 kaleem_ joined 10:41 rurban1 left 10:45 grondilu left, psch joined
psch hi #perl6 o/ 10:45
vendethiel: did you see day 03 from the 2013 advent calender? it has an example for calling java.util.zip.CRC32 10:48
vendethiel psch: yeah, I saw it 10:49
10:50 zengargo1le joined
colomon m: gist.github.com/colomon/fea0ec14fbf3ad02c5ed 10:50
camelia rakudo-moar 77024f: OUTPUT«gist not found»
psch vendethiel: but it didn't help? FWIW, the example doesn't even actually work for me.
vendethiel well, I don't even know how to link a jar for example 10:51
colomon masak: gist.github.com/colomon/fea0ec14fbf3ad02c5ed 10:52
10:52 zengargoyle left
vendethiel psch: also, I'm on p62014.03-parrot, sooo... :) 10:54
masak colomon: nice. 10:55
colomon: would 'is cached' work as well, instead of %memory ?
colomon masak: no, because of the %memory{$n} = False line
masak just saw that one.
well, it *feels* like an eminently memoizable problem, except for the fact that it sometimes loops infinitely. 10:56
colomon desperately wanted to make it is cached, mind you.
10:56 pdcawley joined 10:57 anaeem1__ joined
psch vendethiel: clog says you asked about "jvm libs from perl6-jvm" yesterday, that's what I was refering to... :) 10:57
vendethiel I mean, I can't test
10:57 pdcawley left 10:58 pdcawley joined 10:59 anaeem1 left, pdcawley left, pdcawley_ joined 11:00 pdcawley_ left, pdcawley joined
colomon masak: gist.github.com/colomon/adf4d949d1835730ba65 11:03
masak: solutions keep getting longer and slower. time to stop and make breakfast
11:05 lelf left 11:07 SamuraiJack left
psch vendethiel: gist.github.com/peschwa/0158083bc4e5613a6390 # as an example; as it says, it doesn't quite work as-is 11:08
so it's probably not something that should be showed around
I don't understand the jvm compilation process (in general and for rakudo) enough to say why it's not enough to add the correct CLASSPATH 11:09
11:11 erkan joined, erkan left, erkan joined 11:13 amkrankruleuen left 11:14 amkrankruleuen joined
vendethiel m: say 'FOO1;2;3' ~~ / :r ^ 'FOO' $<id>=(\d) ** 3 % ';' $ / 11:18
camelia rakudo-moar 77024f: OUTPUT«「FOO1;2;3」␤ id => 「1」␤ id => 「2」␤ id => 「3」␤␤»
vendethiel m: 'FOO1;2;3' ~~ / :r ^ 'FOO' $<id>=(\d) ** 3 % ';' $ /; say $/<id>.list>>.ast; 11:19
camelia rakudo-moar 77024f: OUTPUT«(Any) (Any) (Any)␤»
11:20 chenryn left
vendethiel >>.Num it is then. 11:23
FROGGS right, there is nothing in the .ast (called .made now), as long as you don't 'make' anything
11:26 vendethiel left 11:27 vendethiel joined 11:30 brrt joined 11:31 chenryn joined 11:37 rurban1 joined
vendethiel m: my ($a, $b, *) = 1..*; say $a 11:38
camelia rakudo-moar 77024f: OUTPUT«===SORRY!=== Error while compiling /tmp/bUXHGDClqu␤Malformed parameter␤at /tmp/bUXHGDClqu:1␤------> my ($a, $b, ⏏*) = 1..*; say $a␤ expecting any of:␤ scoped declarator␤ formal parameter…»
vendethiel m: for ({a => 1}, {a => 50}, {a => 60}) -> $a { say $a } 11:40
camelia rakudo-moar 77024f: OUTPUT«{"a" => 1}␤{"a" => 50}␤{"a" => 60}␤»
vendethiel m: for ({a => 1}, {a => 50}, {a => 60}) -> $a { say $a<a> }
camelia rakudo-moar 77024f: OUTPUT«1␤50␤60␤»
11:40 anaeem1__ left
ChoHag Does calling callsame twice do Bad Things? 11:40
11:40 Alina-malina left 11:42 rurban1 left
moritz I sure hope not 11:43
ChoHag Just checking. 11:44
jnthn really can't remember how stateful iterating the candidate list is...
11:45 chenryn left 11:50 lelf joined
moritz m: class A { method x() { 42 } }; class B is A { method x() { say callsame; say callsame; } }; B.new.x 11:54
camelia rakudo-moar 77024f: OUTPUT«42␤Nil␤»
moritz bug (IMHO)
11:54 LLamaRider joined
jnthn Not sure. 11:55
Can we change that without breaking lastcall?
moritz I have no idea
jnthn Hm, perhaps can 11:57
It'll involve more copying stuff, I guess...
11:57 Alina-malina joined
ChoHag If I wanted to create a magic Int, how would I do it? Class MagicInt is Int { ... }? Then how can I create a MagicInt attribute which coerces an Int to a MagicInt? 12:00
masak submits rakudobug 12:02
12:03 igorsutton left
awwaiid How does one choose between "my $x = {a => 1}" and "my %x = {a => 1}" ? 12:04
12:04 igorsutton joined
awwaiid and is that decision any different for a &x vs $x for storing a lambda? 12:04
moritz awwaiid: there are two answers (for the % case)
the first is that % does a type check, so if you want type checks, go with %
the second is that % flattens, and $ doesn't 12:05
awwaiid right, type check is a clear answer
ok, flatten, right
12:05 virtualsue left
moritz the type check applies also to & variables (which don't flatten) 12:05
awwaiid what is a simple example of that type check happening? 12:06
moritz m: my %h := 42;
camelia rakudo-moar 77024f: OUTPUT«Type check failed in binding; expected 'Associative' but got 'Int'␤ in any bind_error at src/vm/moar/Perl6/Ops.nqp:217␤ in block at /tmp/XKGM0otdkw:1␤␤»
moritz oh, third point
12:06 kaleem_ left
moritz assignment to % variables is coercing 12:07
awwaiid oh yes, I always forget about :=
moritz m: my %h = a => 1, b => 2; say %h.perl; # the RHS is a Parcel, the LHS an array
camelia rakudo-moar 77024f: OUTPUT«("a" => 1, "b" => 2).hash␤»
moritz s/array/hash/
awwaiid ok, that helps. I'm giving my talk on Rakudo tonight, and during prep keep imagining some of these sorts of questions :) 12:08
12:14 virtualsue joined 12:15 chenryn joined 12:19 jnap joined 12:21 prevost joined 12:23 lelf left
masak awwaiid++ 12:31
12:33 ClarusCogitatio left 12:36 guru joined, guru is now known as Guest69569 12:37 Guest69569 is now known as ajr_ 12:38 chenryn left 12:39 kaare_ left 12:40 ClarusCogitatio joined 12:41 vendethiel left, vendethiel joined 12:45 brrt left 12:47 kurahaupo joined 12:49 xenoterracide__ joined 12:54 xenoterracide__ left, xenoterracide__ joined 12:59 fhelmberger_ joined, fhelmberger left 13:00 xenoterracide__ left, zengargo1le left 13:04 brrt joined 13:05 raiph joined 13:06 bluescreen10 joined 13:07 rurban1 joined 13:08 zengargoyle joined 13:10 ajr_ left, virtualsue left 13:16 molaf joined
vendethiel is trying to help his friend play w/ Java interop 13:19
It Works (TM) (but it's a bit ugly :P)
13:21 virtualsue joined 13:24 LLamaRider left 13:30 anaeem1 joined 13:33 lelf joined 13:34 virtualsue left 13:36 virtualsue joined 13:38 rurban1 left, chenryn joined
FROGGS vendethiel: coat it with sugar 13:39
vendethiel well, that's not easy
13:40 anaeem1 left
ChoHag Sugar makes you fat. 13:41
13:42 chenryn left 13:43 sqirrel left
FROGGS ChoHag: there is nothing wrong with being fat 13:44
ChoHag Apart from heart disease.
And never stairs.
13:45 kaare_ joined
ChoHag And summer insulation. 13:45
I tried being fat. Not doing that again. 13:46
13:47 btyler joined
FROGGS :o) 13:48
13:50 James-YeJ3TE48lO joined 13:51 virtualsue left 13:53 treehug88 joined 13:54 James-YeJ3TE48lO left 14:01 woolfy joined 14:04 SamuraiJack joined, vendethiel left 14:06 vendethiel joined, kaleem_ joined
brrt wonders, and has decided not too, discuss the evidence on sugar-making-you-fat 14:12
No! it is not the sugar that is making you fat! You eating it makes you fat! 14:13
tadzik well, the law of energy conservation surely has something to do with getting fat 14:15
masak tadzik: and then there's that group that say "you can't apply *physics* to a biological organism like that!" 14:16
14:16 kaleem_ left
tadzik :) 14:17
masak tadzik: as if physics somehow ceased to apply inside bodies.
14:17 carlin joined, rurban1 joined
tadzik don't forget, there's the spiritual part that science can't explain 14:19
www.youtube.com/watch?v=HhGuXCuDb1U explained here
14:21 kaleem_ joined 14:28 hoverboard joined 14:32 kaare_ left 14:33 dylanwh joined
zengargoyle biology is on a sliding scale. if it were physics E=mc^2 and 1g of food would sustain many lifetimes. :P 14:33
moritz as long as you don't want to build muscles with that energy alone :-) 14:34
then you'd be limited to 1g of new body tissue :-)
zengargoyle if it were calories in vs out it would be easy. but it's also non-energy processes like all that non-calorie water you drink.
so like 1g of calorie food + 1kg of non-calorie water = ~.5kg fat 14:35
*bogus numbers*
14:37 thou joined
brrt tadzik - and i'm with those people 14:39
Ulti plus plenty of stuff is energy dense but humans can't process it, plant fibre we burn it for fuel to heat a home but it does nothing going through you
14:39 chenryn joined
ChoHag Are return signature types implemented? 14:39
moritz m: sub f(--> Int) { "str" }; f() 14:40
camelia rakudo-moar 77024f: OUTPUT«Type check failed for return value; expected 'Int' but got 'Str'␤ in any return_error at src/vm/moar/Perl6/Ops.nqp:598␤ in block at /tmp/HFhuHAVYBJ:1␤␤»
zengargoyle yeah, think it might be along the lines of we can only get energy from low total energy processes
moritz and that's good for us
zengargoyle otherwise we'd be prone to accidental explosion or something. :)
moritz aye
brrt zengargoyle - don't forget that drinking water at 15deg celsius needs to be 'heated' to 37 degrees celsius and thus actually costs energy 14:41
moritz thinks of a rod of burning Magnesia
14:41 James-YeJ3TE48lO joined
zengargoyle maybe that's how vampires work. 14:41
ChoHag Where does the --> go wrt the rest of the signature?
moritz ChoHag: after them
ChoHag No comma?
moritz m: sub f(Int --> Int) { "str" }; f(52)
camelia rakudo-moar 77024f: OUTPUT«Type check failed for return value; expected 'Int' but got 'Str'␤ in any return_error at src/vm/moar/Perl6/Ops.nqp:598␤ in block at /tmp/NSk9TrUs8z:1␤␤»
moritz m: sub f(Int $x --> Int) { say $x; "str" }; f(52) 14:42
camelia rakudo-moar 77024f: OUTPUT«52␤Type check failed for return value; expected 'Int' but got 'Str'␤ in any return_error at src/vm/moar/Perl6/Ops.nqp:598␤ in sub f at /tmp/TqsVTPPQHY:1␤ in block at /tmp/TqsVTPPQHY:1␤␤»
14:44 chenryn left 14:45 dwarring left
mr-foobar hey all, want to try perl6 on the jvm on mac. any star release for it ? 14:45
moritz not yet 14:46
well, the last one contains the code for the JVM, but some of the modules don't work
mr-foobar anything I can do to test ? 14:47
i am interested in calling java from pl6 14:48
moritz I have no idea; I hope somebody else ( FROGGS? [Coke]? ) knows the current state and where to start 14:50
FROGGS there are issues as seen in the daily star build/test reports 14:51
mr-foobar oh, how about moarvm ?
star release ?
FROGGS moarvm is clean and can be released easily
mr-foobar one liner installers ftw ! 14:52
14:59 dylanwh left 15:00 dylanwh joined 15:01 dylanwh left, dylanwh joined 15:04 dylanwh left 15:06 dylanwh joined 15:07 denis_boyun left 15:09 firefish left 15:11 chenryn joined 15:15 dylanwh left 15:16 chenryn left
ChoHag How do I set up a coercion from one type to another? So that my Foo $bar = Baz.new can be made to work? 15:16
15:17 dylanwh joined, dylanwh left 15:18 dylanwh joined 15:20 dylanwh left, dayangkun left, dylanwh joined 15:22 raiph left 15:25 dylanwh left 15:26 dylanwh joined
jnthn ChoHag: The Foo is a type *constraint*. The thing you assign has to match. It's not a coercion request. my Foo() $bar = ...; is the proposed syntax for a type that coerces to Foo. 15:26
15:27 brrt left, [Sno] left 15:30 raiph joined
sjn reminds that YAPC::EU talk submission deadline is July 1st (today) 15:31
jnthn :) 15:32
jnthn submat two talks :)
Only once in the last 9 YAPC::EUs did all my submissions get rejected, so I'm fairly hopeful one will make the cut. :) 15:34
15:35 FROGGS left
masak submat one, ponders whether to do a second 15:36
15:36 zakharyas left
colomon what will you guys' talks be on? (assuming you are allowed to make them) 15:37
ChoHag So if Baz is an existing class, can I create a role Foo which is automatically mixed into any Baz put into $bar? 15:39
Or do I just have to wait for my Foo() $bar to work? 15:40
psch m: class Baz { method baz { "baz" } }; my $bar = Baz.new does role { method foo { "foo" } }; $bar.foo.say # not quite the same 15:42
camelia rakudo-moar 77024f: OUTPUT«foo␤»
psch i don't think you can stick the (in this case anon) role onto the container itself 15:43
mr-foobar "legal issues as per freenode" 15:44
sjn colomon: mine is called "Creative Perlmongership" :) 15:46
colomon sjn++
sjn wonders if he should rather call it "Baeudacious Perlmongitude" or something like that 15:47
15:52 igorsutton left 15:54 cooper_ left, kaare_ joined, kaleem_ left 16:01 FROGGS joined 16:05 sqirrel joined 16:07 teodozjan left, fhelmberger_ left
masak colomon: mine is called "GOTO considered awesome", and is about more or less insane applications of userland CPS transforms. 16:10
16:12 chenryn joined
jnthn ChoHag: Have to wait, I suspect...though I'd also consider whether there's not a more elegant approach to whatever you're trying to achieve... 16:15
ChoHag Well in the immediate case I'm just trying to find new ways of breaking perl so that I can examine the pieces.
16:17 chenryn left
colomon masak++ # awesome 16:18
colomon remembers the bad old days of programming with goto….
jnthn oh, and talks... I submitted one about the performance work in Rakudo and MoarVM (including spesh), and another about the primitives Perl 6 provides for asynchronous programming. 16:19
colomon jnthn++ 16:20
colomon imagines the "jnthn surprise" for performance work could be disturbingly awesome... 16:21
carlin m: use MONKEY_TYPING; augment class Rat { method cieling { die "'i' before 'e' except after 'c', except where the sound is 'ee' and except where it's just plain weird" } }; say 4.2.cieling; 16:24
16:24 erdic left
camelia rakudo-moar 77024f: OUTPUT«'i' before 'e' except after 'c', except where the sound is 'ee' and except where it's just plain weird␤ in method cieling at /tmp/NZpTbe6xYT:1␤ in block at /tmp/NZpTbe6xYT:1␤␤» 16:24
carlin that should be in core
or maybe I should remember how to spell ceiling
16:24 erdic joined
flussence m: say cieling 4.2 16:25
camelia rakudo-moar 77024f: OUTPUT«===SORRY!=== Error while compiling /tmp/AX0X_fzxRf␤Undeclared routine:␤ cieling used at line 1. Did you mean 'ceiling'?␤␤»
flussence it should probably do that for methods...
jnthn m: say 4.2.cieling
camelia rakudo-moar 77024f: OUTPUT«No such method 'cieling' for invocant of type 'Rat'␤ in block at /tmp/FBQC56Hl21:1␤␤»
jnthn Yeah, should be possible
16:27 silug left 16:30 pecastro left 16:37 silug joined 16:38 spider-mario left 16:39 jlaire joined 16:40 brrt joined 16:46 ren1us joined
ren1us out of pure curiosity, is there a particularly reason why lists don't seem to support deleting an element other than at the ends? 16:46
masak ren1us: .splice 16:47
ren1us I'll go back to my cave of being an idiot. Thank you. 16:48
16:48 spider-mario joined
carlin an idiot is someone who doesn't know something you learned yesterday :) 16:50
jnthn carlin: Do you know what I learned yesterday? 16:52
16:53 sqirrel left
.oO( darn, didn't fall for it :) )
16:55 pdcawley left
carlin jnthn: I'll bite, what did you learn yesterday? 16:55
16:55 virtualsue joined
jnthn See, you don't know. :P 16:56
moritz => idiot :-)
jnthn :D
carlin heh
jnthn Sorry, was too good to resist. :)
carlin :) 16:57
16:58 dakkar left
carlin my point was ren1us++ now knows about .splice and is therefore no longer an idiot 16:59
see also: xkcd 1053 17:00
17:00 brrt left, Possum joined 17:05 donaldh left 17:08 SamuraiJack left 17:12 kaleem_ joined 17:13 chenryn joined, telex left 17:14 telex joined 17:17 chenryn left, [Sno] joined 17:18 vendethiel left 17:20 vendethiel joined 17:21 jnap left, rindolf joined 17:23 kaleem_ left 17:28 jnap joined 17:29 erdic left 17:30 pdcawley joined 17:36 erdic joined 17:50 larks left
masak it's the people who never ask probing questions and never get interesting answers we should feel sorry for ;) 17:55
17:55 itz_ joined 18:00 pdcawley left
FROGGS jnthn: there? 18:00
18:01 xinming_ joined
FROGGS jnthn: the nativecast thingy works for some things now and I wonder... should that be available as a method on OpaquePointer? 18:02
like .cast-to(MyClass) ?
18:04 xinming left 18:05 brrt joined 18:06 Sqirrel joined 18:07 virtualsue left 18:10 raiph left
masak m: sub happy($n is copy) { $n = [+] $n.comb X** 2 until $n == 1 || (my %){$n}++; $n == 1 }; say happy 32 18:11
camelia rakudo-moar 77024f: OUTPUT«True␤»
masak m: say (sort gather for 2..8 -> $x { for $x..8 -> $y { take $x ** $y + $y ** $x } })[^10] 18:12
camelia rakudo-moar 77024f: OUTPUT«8 17 32 54 57 100 145 177 320 368␤»
masak ...I'm a little bothered by the two 8s in that code.
they're the lowest constant I can put there to get the right first 10 terms, but I found that through trial and error.
maybe someone can think of some code that doesn't involve them? :) 18:13
18:14 chenryn joined
.oO( 2..^9 )
masak actually, this reminds me of strangelyconsistent.org/blog/t2-sums-of-cubes
also, this could probably find quite an elegant (if longer) solution using Supplies. 18:15
18:15 lizmat joined 18:18 ren1us left 18:19 chenryn left 18:25 virtualsue joined 18:40 denis_boyun joined
dalek kudo/nom: e371c34 | (Elizabeth Mattijsen)++ | src/core/Method.pm:
Implement "is cached" on methods properly
lizmat is sorta back, but at the NLPM meeting
masak lizmat++ # 'is cached' on methods 18:44
colomon I dunno if I agree that's a proper fix or not. 18:45
was there more discussion on it on IRC after the initial disucssion yesterday? 18:46
masak oh, I didn't check the patch. 18:47
masak does so
using $self.WHICH is what I'd do, too.
so +1 on that.
the question I *didn't* ask yesterday -- but do now -- is: why are we not using .WHICH for all the parameters? 18:48
colomon If I understand it correctly, now it caches on WHICH instead of the value of the attributes of self
masak we should be using .WHICH for all kinds of hashing, right? and caching does hashing.
I don't think .gist is up to the task in general.
18:50 Isp-sec joined
colomon masak: it seems to me (re self) there are two cases: 18:51
1) The object is immutable. In this case using .WHICH means we don't get possible caching when two different objects of the type have the same attribute values. 18:52
2) The object is mutable. In this case, using only .WHICH means we don't even notice when the values of the attributres have changed. 18:53
…. errrr .... 18:55
but wait, immutable objects with the same attributes are supposed to have the same WHICH, aren't they?
18:56 teodozjan joined
colomon So my objection #1 goes away 18:56
lizmat I was actually thinking about .WHICH as well, but that would have meant a recursive .WHICH implementation 18:57
18:59 virtualsue left
lizmat is not completely clear yet: sleep depravation does that to you 19:01
lizmat also wonders whether she missed TimToady's ruling on the behaviour of: 19:03
my %hash = { a => 1 };
being the same as:
my %hash = ( a => 1 );
19:03 treehug88 left
lizmat (which I think is wrong) 19:03
19:04 prevost left
masak colomon: IMO, people shouldn't do 'is cached' on functions which take mutable arguments. 19:06
colomon masak: including classes which are mutable?
masak well, 'self' may be the exception here. haven't thought about it. 19:08
colomon self is what I'm talking about.
masak but I really don't think so.
if 'self' is an object which mutates, then we're in the same kind of trouble as if other params mutate.
lizmat ah, that would be the reason I used .gist :-) 19:09
masak IMO it's a case of "things *may* come out right, but really all bets are off if you have mutability"
lizmat supposedly, the .gist should reflect any changes to self
colomon right, if you don't care about mutable things, then .gist is maybe better than .WHiCH
masak so I vote for using .WHICH throughout and then conditioning users to dislike combining 'is cached' (or really any kind of hashing) with mutability. 19:10
colomon er,, or am I thinking about that backwards
masak that's really the only long-term sane option.
using .gist is going down the wrong road, trying to compensate for insanity which can't really be compensated for.
19:12 kurahaupo left
lizmat S06:2121: A given C<Capture> would always calculate the same return value. That is, there is no state hidden within the dynamic scope of the call. 19:12
synopsebot Link: perlcabal.org/syn/S06.html#line_2121
rurban src/gen/p-CORE.setting.pir:147823 fails with parrot (handler.'handle_types'(.CONTROL_LOOP_LAST) since some time. 19:13
19:13 darutoko left
rurban looks like the .CONTROL_LOOP_LAST nqp-p constants are gone on 19:14
19:14 denis_boyun left
lizmat actually, the spec indicates that we don't need special handling for "is cached" for methods 19:14
anyway, that's how I read it 19:15
FROGGS rurban: the constants were removed?
19:15 denis_boyun__ joined
rurban I see them in nqp, but rakudo doesn't see them. 19:15
nqp/install/bin/parrot -o CORE.setting.pbc src/gen/p-CORE.setting.pir 19:16
error:imcc:syntax error, unexpected DOT, expecting '(' ('.')
in file 'src/gen/p-CORE.setting.pir' line 147823
FROGGS that sounds more like there is something bogus before that line
rurban It worked a week before YAPC
colomon masak: I think the biggest problem I'm having with your logic is I see .WHICH as a way of tracking mutable objects, whereas here you want to switch to using it while culturally banning using it in this context with mutable objects. 19:18
lizmat well, maybe we need a clearer spec, then :-) 19:20
colomon lizmat: I'd argue the specs there say we *have* to pay attention to mutable state.
or maybe not. 19:21
clearer spec++
lizmat is too tired to think straight about this right now
m: class A { has $.foo }; A.new(:foo<bar>).gist.say # makes me think a separate "is cached" for methods is wrong 19:28
camelia rakudo-moar 77024f: OUTPUT«A.new(foo => "bar")␤»
lizmat is going to revert 19:29
dalek kudo/nom: 71eab81 | (Elizabeth Mattijsen)++ | src/core/Method.pm:
Only implement things when sufficiently awake

This reverts commit e371c34206800c777fb7e06e11427acbd492a0f5.
colomon is not sure he understands lizmat++'s reasoning there
lizmat masak used the example with class A {} and two A.new's
TimToady .WHICH should never change on a mutable container, because it's container identity, not contents 19:31
lizmat if there are no attributes, the class A is in fact value based, as you the two objects have identical behaviour
rurban FROGGS: It's a problem in your 196b4ff55e "implement labeled loops and throwing of labels as payload"
lizmat TimToady: agree 19:32
19:33 kolbe joined
colomon it seems to me that "is cached" should indeed be for logically non-mutable things. but … it's not clear me that set of things is the same as the set of things with stable WHICH 19:33
19:33 kolbe left
TimToady possibly 'is cached' should decontainerize, then it can base itself off of value identities 19:33
FROGGS rurban: ohh... but that was applied way earlier... 19:34
FROGGS looks
TimToady much like we can test a value for boolean without losing the object: if $x -> $obj { ... }
lizmat TimToady: do you mean on methods? or on subs? or both? 19:35
TimToady on any parameter that gets a mutable container rather than an imutable object
that is, 'is cached' should perhaps try for 'eqv' semantics, snapshotting the current value of containers 19:36
FROGGS rurban: is that a problem? handler.'handle_types'(.CONTROL_LOOP_LAST, .CONTROL_LOOP_NEXT, .CONTROL_LOOP_REDO, 512, 513, 514)
TimToady to put it another way, 'is cached' should probably pretend everything is passed by value rather than by reference
lizmat which is in a way what .gist in practice usually does ? 19:37
TimToady .gist should be considered completely unreliable for identity
"gist" means a summary
19:38 xenowoolfy joined
FROGGS but in a way .gist is also more about values 19:38
TimToady gist is designed to allow information loss, unlike .Str
lizmat so, more like .perl then :-)