Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2015-01-03

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:12 BigBear joined #perl6
00:23 adu joined #perl6
00:28 adu what's the best way to loop over an integer range?
00:32 TimToady depends on what you're gonna do with it
01:11 Ven joined #perl6
01:21 japhb .oO( What's the best way to skin^Wpet a cat? )
01:51 adu joined #perl6
01:55 abraxxa joined #perl6
02:03 colomon joined #perl6
02:15 raydiak .oO( either way, any<food catnip tranquilizers> would cut it )
02:21 raydiak .oO( s/\</ </ )
02:23 rmgk_ joined #perl6
02:45 labster joined #perl6
02:55 dalek nqp: 9675236 | (Geoffrey Broadwell)++ | t/concurrency/01-thread.t:
02:55 dalek nqp: First concurrency test file, including basic thread tests.  Note: hangs on nqp-m (works fine on nqp-j), so not adding to standard test list yet.
02:55 dalek nqp: review: https://github.com/perl6/nqp/commit/96752368eb
02:59 adu joined #perl6
03:00 adu TimToady: iterate over two lists of the same size
03:06 sirdancealot joined #perl6
03:08 raydiak the ^$n syntax is nice for 0..$n-1, but you don't really need that to iterate over 2 lists of the same size
03:09 raydiak m: my @a = <a b c>; my @b = <x y z>; for @a Z @b -> $a, $b {say "$a,$b"}
03:09 camelia rakudo-moar 80b912: OUTPUT«a,x␤b,y␤c,z␤»
03:15 khisanth_ joined #perl6
03:19 japhb .tell jnthn There's a hang on nqp-m (but not nqp-j) on the threading test I just added to NQP.  See https://github.com/perl6/nqp/commit/96752368eb .
03:19 yoleaux japhb: I'll pass your message to jnthn.
03:29 xinming joined #perl6
03:40 noganex joined #perl6
04:08 dalek nqp: ad5d59e | (Geoffrey Broadwell)++ | t/concurrency/02-lock.t:
04:08 dalek nqp: Second concurrency test file, including basic lock and condvar tests.  Works fine on nqp-m and nqp-j, though the lock effectiveness test is a bit slow on nqp-j, and may be too fast on nqp-m.
04:08 dalek nqp: review: https://github.com/perl6/nqp/commit/ad5d59e202
04:15 raiph joined #perl6
04:18 japhb Is there a convention for indicating testing todo's in the NQP repo?  If I $*RL intervenes before I finish all the NQP concurrency tests, I'd like the next person to know what's left to cover ....
04:18 japhb s/ I / /;
04:24 telex joined #perl6
04:54 TimToady http://rosettacode.org/wiki/Penney%27s_game#Perl_6
04:56 TimToady (Friday Night Fun!)
05:04 Mso150 joined #perl6
05:07 adu raydiak: just Z?
05:08 adu where is that defined and/or documented?
05:08 ugexe http://doc.perl6.org/language/operators#infix_Z
05:12 adu ugexe: sweet, thanks
05:14 dalek nqp: 8dfb270 | (Geoffrey Broadwell)++ | README.pod:
05:14 dalek nqp: Update copyright date to 2015, since we've got 2015 commits
05:14 dalek nqp: review: https://github.com/perl6/nqp/commit/8dfb270bbd
05:27 dalek nqp: 92e4dcc | (Geoffrey Broadwell)++ | t/concurrency/TODO:
05:27 dalek nqp: Add a TODO for t/concurrency to track untested bits
05:27 dalek nqp: review: https://github.com/perl6/nqp/commit/92e4dcca1c
05:27 TimToady r: say «Foo Bar Baz "Some Stuff"»[0]
05:27 camelia rakudo-{parrot,moar} 80b912: OUTPUT«Foo Bar Baz␤»
05:27 TimToady this looks like a bug
05:39 TimToady jnthn: ^^^ your quotewords code?
05:51 adu r: [1] + [2, 3, 4]
05:51 camelia rakudo-{parrot,moar} 80b912: ( no output )
05:52 adu r: [1] ~ [2, 3, 4]
05:52 camelia rakudo-{parrot,moar} 80b912: ( no output )
05:52 adu r: say [1] ~ [2, 3, 4]
05:52 camelia rakudo-{parrot,moar} 80b912: OUTPUT«12 3 4␤»
05:52 adu r: say [1] + [2, 3, 4]
05:52 camelia rakudo-{parrot,moar} 80b912: OUTPUT«4␤»
05:54 adu r: say [1].push([2, 3, 4])
05:54 camelia rakudo-{parrot,moar} 80b912: OUTPUT«1 2 3 4␤»
05:54 adu r: say ([1].push([2, 3, 4])).perl
05:54 camelia rakudo-{parrot,moar} 80b912: OUTPUT«Array.new(1, [2, 3, 4])␤»
05:55 adu say {my $x = [2, 3, 4]; $x.push(1); $x}
05:55 adu r: say {my $x = [2, 3, 4]; $x.push(1); $x}
05:55 camelia rakudo-parrot 80b912: OUTPUT«-> ($_? is parcel) { #`(Block|-443205019655573644) ... }␤»
05:55 camelia ..rakudo-moar 80b912: OUTPUT«-> ($_? is parcel) { #`(Block|56118656) ... }␤»
05:57 adu r: my $x = [2, 3, 4]; $x.push(1); say $x.perl
05:57 camelia rakudo-{parrot,moar} 80b912: OUTPUT«[2, 3, 4, 1]␤»
05:58 adu r: my $x = [2, 3, 4]; $x.unshift(1); say $x.perl
05:58 camelia rakudo-{parrot,moar} 80b912: OUTPUT«[1, 2, 3, 4]␤»
05:58 adu finally
05:59 adu why is the prepend method called unshift?
06:06 jack13 joined #perl6
06:09 ugexe i think unshift has been so common for so long it would be strange to call it anything else
06:10 ugexe same meaning across many languages, just like shift push pop
06:10 ugexe otherwise it might make sense to call it something else
06:43 jack13 joined #perl6
06:43 mr-foobar joined #perl6
07:08 raydiak adu: the idea is basically that you shift an element off the top of an array...and all the elements under it shift up to remove the gap....
07:08 raydiak so unshift is the opposite
07:08 adu raydiak: I just figured out something for debugging
07:08 raydiak yeah?
07:09 adu so the statement "say $x.perl" is recursive
07:09 adu and I changed "<operands=inclusive-or-expression>" to "<operands=.inclusive-or-expression>" and the print output finished in 10% of the the first time
07:10 adu because it was printing log(n) fewer lines
07:10 pjablons adu: One warning about say $x.perl: If you've got circular references, it'll infinite loop.
07:11 adu I'll try to do as little debugging as possible then
07:11 raydiak yeah I actually had something started to fix that, but it's still wildly experimental and so only exists on my own hard drive
07:12 adu raydiak: it's not so much a bug as an O(n) problem
07:13 adu there are like 20 precedence levels in C, and if each level was assigning 4 members on the match object, then that's 4^20 times as many things to print
07:14 adu well, I might have overexaggerated
07:14 raydiak ah yeah I could see that becoming problematic
07:14 adu so now I'm just assigning 2: $operator, and @operands
07:15 adu so now it's 2^20
07:15 adu well, 20
07:15 adu anyways
07:15 adu forget the math
07:15 raydiak exponentially less, yes
07:16 adu I guess the general rule is not to alias
07:17 raydiak for printing it all out, I guess...maybe just better to be more selective about what you print for debugging?
07:18 adu When I have the AST working, I can see that being a possibility, like only structs or only functions
07:19 adu also, I'm wondering if there's a way to have multiple parser actions
07:20 raydiak like to accomplish what?
07:20 adu like can you have parser actions that get run after the grammar is parsed and after the AST actions have completed?
07:21 adu like lots of AST libraries use the visitor pattern
07:21 adu like visit_Expression, visit_IfStatement, etc.
07:21 adu and you implement those if you are interested to get that info
07:22 JimmyZ didn't we have method sym:<if> { ...  } ?
07:23 JimmyZ method EXPR() { }
07:23 * raydiak is reading http://en.wikipedia.org/wiki/Visitor_pattern and hoping to catch up :)
07:23 adu JimmyZ: yes, but I'm currently using that for building the AST, but what about AST consumers?
07:25 adu JimmyZ: C11Lexer is a grammar, C11Parser is a grammar that inherits C11Lexer ("is" in Perl6 speak), CAST is a bunch of classes for representing C source, and CASTActions is a class which can be passed to the parse() grammar method, but there doesn't seem to be a place for AST consumers to go in the Perl6 grammar model
07:25 TimToady http://rosettacode.org/wiki/Heronian_triangles
07:27 * TimToady thinks the Perl 6 solution is rather more readable than the Python solution, but it is possible he is slightly prejudiced in the matter...
07:32 Woodi joined #perl6
07:37 raydiak adu: perhaps something you could implement as a separate module? you are right that I don't think we have a "grep the tree you made with actions" construct, per se
07:37 raydiak if I follow correctly
07:37 adu yeah, certainly possible to hack something up
07:37 xfix joined #perl6
07:38 kaare__ joined #perl6
07:38 adu I think the way Python does it is getattr(self, 'visit_' + typename)
07:39 raydiak oh we certainly support dynamicisim of that kind, if that's all it requires
07:40 xfix Why this Perl 6 solution uses "sort *.fmt('%05d')"?
07:40 xfix For me it looks like some sort of hack.
07:42 raydiak xfix: not sure what you mean...what is wrong with it?
07:43 xfix Why is a number changed into a string in order to sort it?
07:43 raydiak to change how it sorts
07:44 raydiak oh you mean because it should work without it?
07:44 xfix (well, ok, it's list, but still)
07:45 TimToady yes, that's a hack, because it's not (yet) smart enough to figure out when sorting arrays that the individual columns are numeric
07:46 TimToady I thought it used to do that, but perhaps I'm confabulating
07:46 xfix So, it's not implemented.
07:47 xfix In Python, i can write sorted([(1, 10), (1, 9)]), and get [(1, 9), (1, 10)].
07:47 TimToady supposed to work that way here too
07:47 TimToady maybe I'm remembering it working in niecza
07:48 * raydiak sees time, goes to make some meaningless commit for the github streak...why?  not sure...
07:50 TimToady p6: say ([1,10], [1,9]).sort
07:50 camelia rakudo-{parrot,moar} 80b912: OUTPUT«1 10 1 9␤»
07:50 TimToady n: say ([1,10], [1,9]).sort
07:50 camelia niecza v24-109-g48a8de3: OUTPUT«(signal ABRT)Stacktrace:␤␤  at <unknown> <0xffffffff>␤  at (wrapper managed-to-native) object.__icall_wrapper_mono_gc_alloc_string (intptr,intptr,int) <0xffffffff>␤  at (wrapper alloc) object.AllocString (intptr,int) <0xffffffff>␤  at string…»
07:50 TimToady oh, yeah, it's busticated
07:51 raydiak now 1 year and 1 day since last niecza commit...about to be 2 days
07:57 TimToady m: say [1,10] cmp [1,9]
07:57 camelia rakudo-moar 80b912: OUTPUT«Less␤»
07:57 * raydiak tries the heronian triangles example...after a couple minutes of waiting, wonders what kind of a machine TimToady was running this on
07:57 TimToady that's the basic problem
07:57 TimToady no list version of cmp
07:58 TimToady odd omission
07:58 raydiak oh there it came back...nicely formatted, TimToady++
08:00 raydiak heh now I see why you were comparing it to python...those are the only two solutions so far
08:04 raydiak m: say [1,2] cmp [1,1]
08:04 camelia rakudo-moar 80b912: OUTPUT«More␤»
08:04 raydiak m: say [1,1] cmp [1,2]
08:04 camelia rakudo-moar 80b912: OUTPUT«Less␤»
08:04 raydiak m: say [1,1] cmp [1,1]
08:04 camelia rakudo-moar 80b912: OUTPUT«Same␤»
08:05 raydiak hrm seems right
08:05 xfix raydiak, that's because it stringifies them to "1 1" and "1 2".
08:05 raydiak oh
08:05 Timbus its comparing the elements string-wise i think
08:05 Timbus ah. beaten
08:07 raydiak m: my $a = 0 but '9'; [1,$a] cmp [1,1];
08:07 camelia rakudo-moar 80b912: ( no output )
08:07 raydiak m: my $a = 0 but '9'; say [1,$a] cmp [1,1];
08:07 camelia rakudo-moar 80b912: OUTPUT«More␤»
08:07 raydiak yeah I don't even know what that *should* do :)
08:09 TimToady > say [1,10] cmp [1,9]
08:09 TimToady More
08:11 TimToady spectesting...
08:11 Timbus he did it :o
08:14 darutoko joined #perl6
08:17 TimToady m: multi sub infix:<cmp>(@a, @b) { (@a Zcmp @b).first(&prefix:<?>) || @a <=> @b }; say [1,10] cmp [1,9]
08:17 camelia rakudo-moar 80b912: OUTPUT«More␤»
08:32 dalek roast: 53ec502 | TimToady++ | S03-operators/cmp.t:
08:32 dalek roast: some tests for cmp of numeric lists
08:32 dalek roast: review: https://github.com/perl6/roast/commit/53ec5029e9
08:32 dalek rakudo/nom: e4e9cf8 | TimToady++ | src/core/List.pm:
08:32 dalek rakudo/nom: cmp on lists should distribute to columns
08:32 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/e4e9cf86f7
08:32 dalek rakudo/nom: 167f5f4 | TimToady++ | src/core/List.pm:
08:32 dalek rakudo/nom: oops, <=> can already return Same
08:32 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/167f5f4230
08:36 Timbus hmm. would it be more correct to compare by length first?
08:37 ribasushi joined #perl6
08:37 Timbus no
08:37 TimToady I don't think so
08:37 TimToady m: say "ac" leg "abd"
08:37 camelia rakudo-moar 80b912: OUTPUT«More␤»
08:37 Timbus pity, because that would be a lot faster :p
08:37 TimToady not if one of the lists is huge :)
08:38 raydiak or infinite
08:38 TimToady that's a kind of huge :)
08:39 TimToady where it gets a little weird is here:
08:39 TimToady m: say [1,10] cmp [1,10,-12345]
08:39 camelia rakudo-moar 80b912: OUTPUT«Less␤»
08:40 Timbus well, that was my initial thought, but its much the same thing in your abc example
08:40 TimToady but I think that's put-uppable-with
08:41 raydiak I agree with it as is, though can't say why
08:41 Timbus well its not the same but. ugh. i mean the wierdness
08:42 TimToady well, currently it's getting the right answer for the wrong reason
08:42 TimToady but it'll get the same right answer after recompile
08:42 TimToady what you want is some way of adding 0 xx * to the shorter one sometimes
08:43 TimToady but only if you know you're doing numeric comparisons
08:44 TimToady anyway, I've updated the RC entry to remove the hack now :)
08:44 TimToady xfix++ for prodding me to fix it
08:45 * raydiak considers that his instinctual reaction may be due to thinking of this list elements like digits of numbers, which is a flawed comparison since there are no numerals < 0
08:46 Timbus .floor == .ceiling ?? .floor !! 0
08:46 Timbus what
08:46 Timbus oh its an int check
08:46 Timbus .. what
08:47 Timbus .floor == .ceiling ?? $_ !! 0
08:47 xfix I probably would write it as $_ %% 1, but that's just me.
08:47 Timbus $_.Int == $_ ?? $_ !! 0
08:47 xfix (there is more than one way to do it)
08:48 xfix $_ %% 1 ?? $_ !! 0
08:48 Timbus i just dont like the method calls
08:49 xfix Well, .Int is method call.
08:49 * raydiak is almost surprised we don't have methods for super-common things like integer value checks
08:49 JimmyZ m: say (Int) '3x'
08:49 camelia rakudo-moar 80b912: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/5ahtVTiw26â�¤Two terms in a rowâ�¤at /tmp/5ahtVTiw26:1â�¤------> [32msay (Int) [33mâ��[31m'3x'[0mâ�¤    expecting any of:â�¤        infix stopperâ�¤        infix or meta-infixâ�¤        postfix…»
08:50 xfix This is not C language.
08:50 JimmyZ m: say (Int)'3x'
08:50 camelia rakudo-moar 80b912: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/7KCT6Wnw4Yâ�¤Two terms in a rowâ�¤at /tmp/7KCT6Wnw4Y:1â�¤------> [32msay (Int)[33mâ��[31m'3x'[0mâ�¤    expecting any of:â�¤        infix stopperâ�¤        infix or meta-infixâ�¤        postfix…»
08:50 Timbus I think you want Int()
08:52 moritz m: say '3x'.Int
08:52 camelia rakudo-moar 80b912: OUTPUT«Cannot convert string to number: trailing characters after number in '3⏏x' (indicated by ⏏)␤  in method Int at src/gen/m-CORE.setting:13863␤  in method Int at src/gen/m-CORE.setting:6193␤  in block <unit> at /tmp/vDtBKntvlS:1␤␤»
08:53 isBEKaml joined #perl6
08:53 xfix m: 0.;
08:53 camelia rakudo-moar 80b912: OUTPUT«[31m===[0mSORRY![31m===[0m�Decimal point must be followed by digit�at /tmp/nMWMrwxDri:1�------> [32m0.[33m�[31m;[0m�Missing semicolon.�at /tmp/nMWMrwxDri:1�------> [32m0.[33m�[31m;[0m��»
08:53 * TimToady is actually a bit surprised that sqrt seems to return an exact integer result under floating point
08:53 xfix Why it tells "Missing semicolon" when it's right here?
08:53 TimToady std: 0.;
08:53 camelia std f9b7f55: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Decimal point must be followed by digit at /tmp/hWLlqCYscn line 1:â�¤------> [32m0.[33mâ��[31m;[0mâ�¤Confused at /tmp/hWLlqCYscn line 1:â�¤------> [32m0.[33mâ��[31m;[0mâ�¤    expecting any of:â�¤        dotty method or postfixâ�¤â€¦Â»
08:54 TimToady STD is better at getting confused :)
08:54 rindolf joined #perl6
08:55 TimToady it's also a lot better at saying what it was expecting
08:56 xfix TimToady, IEEE 754 standard requires correct rounding when the result of sqrt is integer as long the square root value isn't huge enough to overflow.
08:56 * TimToady is probably remember some pre-IEEE implementations :)
08:56 TimToady *ing
08:57 TimToady I don't think a Cray-1 guaranteed that, for instance
08:58 TimToady not that I ever programmed one...
08:58 xfix IEEE actually requires that addition, subtraction, multiplication, division, and square root must work identically on every implementation (it even gives algorithm for these).
09:00 TimToady and Perl 6's hypers are really in there for Cray vector processing, in my mind :)
09:01 TimToady and a Cray might even have enough memory to run Perl 6...
09:02 TimToady and when I say Cray, I mean Cray-1, or possibly a Cray-2 :)
09:02 Timbus or a Cray-Z
09:02 timotimo it's amazing that anything has enough memory to run perl 6 nowadays :P
09:03 xfix How much memory is needed?
09:03 JimmyZ Crazy
09:03 TimToady all of it!
09:04 xfix I've ancient phone with 120MB of RAM (not used by the operating system). Is it enough?
09:04 TimToady actually, Cray-1 only had like 8 megawords
09:04 timotimo xfix: that's enough for a hello world
09:05 Timbus someone in here tried to compile perl6 on his phone. a nexus 4
09:05 Timbus that was a no-go
09:05 xfix (my phone is more ancient than that)
09:05 timotimo we have moarvm itself run on a jolla phone, but compiling rakudo takes a whole lot more ram
09:05 Timbus yeah, 160mb is like HTC magic or palm pre
09:06 xfix Obviously I wouldn't want to compile Rakudo right on my phone, way too slow for that.
09:06 timotimo hmm. a hello world takes 0.2 seconds nowadays? wasn't that number lower at some point?
09:06 TimToady when we had the setting set a little too lazy, I think
09:07 xfix That panda didn't work.
09:07 xfix But I wonder why it didn't...
09:07 JimmyZ and too lazy serialization ...
09:08 xfix The ideal would be Perl 6 running in 0 seconds, but that may be impossible.
09:08 xfix (after rounding to hundrenth of seconds, of course)
09:09 xfix Perl 5 on my computers starts in 0.004 seconds (after caching Perl 5 into RAM).
09:09 xfix my computer*
09:09 JimmyZ m: say floor(0.3), 'seconds'
09:09 camelia rakudo-moar 80b912: OUTPUT«0seconds␤»
09:11 JimmyZ m: say Int(0.3)
09:11 camelia rakudo-moar 80b912: OUTPUT«0␤»
09:19 TimToady zzz &
09:20 JimmyZ good night
09:38 rurban joined #perl6
09:53 rindolf TimToady: night.
10:06 pjablons I'm sure this is a stupid question, but can anyone give me a quick overview of actually using blobs?  I can't figure out how to modify them or really do much of anything with them.  Of course, I could be being an idiot and using the wrong class to begin with
10:07 [TuxCM] joined #perl6
10:09 FROGGS_ m: my $b = buf8.new; $b[0] = 42; say $b; say $b ~~ Blob
10:09 camelia rakudo-moar 80b912: OUTPUT«Buf[uint8]:0x<2a>␤True␤»
10:09 FROGGS_ pjablons: Blobs are immutable, but you can use a buf*
10:10 FROGGS_ masak / moritz / whoever is here: I am reading this http://perl6maven.com/tutorial/running-external-commands-from-perl6
10:11 pjablons Huh.  Now I'm curious as to the purpose, other than that it's just nice to have an immutable object sometimes
10:11 FROGGS_ masak / moritz / whoever is here: and the first thing that comes to my mind is, why don't we throw exceptions when shell/run/pipe fails?
10:12 FROGGS_ pjablons: Blob is just a role that is just used by buf types
10:12 pjablons that actually makes perfect sense
10:12 FROGGS_ pjablons: it just implements functionality, and one should not use it directly I guess
10:14 Ven joined #perl6
10:20 LLamaRider joined #perl6
10:21 masak good antenoon, #perl6
10:22 masak FROGGS_: yes, maybe we should.
10:22 masak FROGGS_: makes sense -- it would be propagating an outright error from a sub-something.
10:24 virtualsue joined #perl6
10:24 masak FROGGS_: and it seems to me to be a "logical extension" of making `EVAL` transparent to exceptions.
10:25 masak (I haven't read the post)
10:27 FROGGS_ k
10:28 FROGGS_ I'll think about a possible shell/run/pipe api
10:28 sqirrel_ joined #perl6
10:29 moritz FROGGS_: we should throw an exception
10:30 moritz pjablons: http://doc.perl6.org/type/Blob
10:30 FROGGS_ that also saves the .status != 0 check the user would have to add every time
10:31 moritz hm
10:31 moritz we should throw an exception when the pipe can't launch the command
10:32 moritz not sure if we should if status != 0
10:32 FROGGS_ we could have X::Exec::Spawn and X::Exec::Run or so
10:32 FROGGS_ well, we have to make sure that we actually know what failed...
10:32 FROGGS_ but I think we have that under control at the vm level
10:36 Ven o/, #perl6
10:37 masak what moritz++ said.
10:37 masak status != 0 is not an exceptional condition -- that's a process completing normally, but indicating that it wasn't too pleased with something.
10:39 molaf joined #perl6
10:40 JimmyZ z  same as z  # http://doc.perl6.org/type/Blob#method_unpack
10:40 JimmyZ typo?
10:40 masak haha
10:40 * masak hopes so
10:40 masak I mean, it's not *wrong*, but... :P
10:40 JimmyZ :)
10:41 * masak .oO( https://xkcd.com/703/ )
10:43 JimmyZ http://xkcd.com/1386/
10:51 dalek doc: a5f256e | moritz++ | lib/Type/Blob.pod:
10:51 dalek doc: [Blob] fix typo/think, JimmyZ++
10:51 dalek doc: review: https://github.com/perl6/doc/commit/a5f256e37f
10:51 masak having said that, there should probably be an easy/idiomatic way to promote a nonzero status to an exception...
10:52 moritz :assert(*.status == 0)
10:52 moritz though that probably would give crappy exceptions
10:58 moritz maybe :expected-status(0)
10:58 moritz and if the exit status deviates from the expectation (if set), an exception is raised
11:00 moritz on a completely unrelated note, I've recently been thinking about "enterprise" applications
11:01 moritz and IME, the main difference between "enterprise" and "normal" applications is that the former often need to integrate with far more other systems
11:01 anaeem1 joined #perl6
11:01 moritz and thus need lots of features like pluggable authentication, integration with CRMs, billing apps etc.
11:02 moritz and often multitenancy, role-based authorization, audit trails etc
11:02 moritz it would be very nice to have some kind of framework/library that would make it very easy to add such features to an application
11:03 moritz though I have no idea how such a thing would look like, arechitecture-wise
11:03 moritz is there any prior art for that?
11:04 moritz (I know there are modules for talking to LDAP, and for logging etc., but I'm aiming for a higher level)
11:20 pecastro joined #perl6
11:25 masak moritz: I have no answers right away. but it's a very interesting question.
11:25 masak it made me think of (the near miss, I guess) http://www.amazon.com/Perl-Medic-Transforming-Legacy-Code-ebook/dp/B00EPFBSXE
11:28 masak but yeah, "enterprise" is in the same tag cloud as "legacy" (because there's existing code, not always of good quality), "integrate" (because you have to talk to data sources, not always your own), and "anti-corruption layer" (because you may have integrity demands the rest of the world doesn't).
11:30 xiaomiao hrm, doesn't enterprise just mean "horribly bad code that costs tons of money" ?
11:30 * xiaomiao remembers one vendors' documentation suggesting to unconditionally open port 22 on the firewall (nope) and using password authentication (nope nope nope)
11:34 masak xiaomiao: I think there's a lot of scorn out there on the Intertubes about enterprise.
11:34 xiaomiao masak: mostly because it's rare that one sees 'enterprise' stuff that works
11:34 masak but the fact remains that it's a real thing with real problems and needs, and not something we *can* dismiss as a culture.
11:34 xiaomiao I mean, we had a ~300kEur SAN that needed EVERY disk reflashed because of a vendor error
11:34 xiaomiao so one admin spent most of a weekend in the datacenter manually flipping disks
11:34 masak I'm not disputing that a lot of enterprise stuff is mind-numbingly stupid.
11:35 xiaomiao or the HA router that couldn't handle the packet load ... wtf?
11:35 masak but it's not a point I find especially thrilling either.
11:35 xiaomiao well, why would I spend lots of money if it fails harder than the 'cheap' alternatives?
11:35 masak there's so much in terms of possible improvements we could focus on.
11:35 FROGGS_ we've got SAP at work :D
11:35 masak and I bet the Venn diagram of that and enterprise doesn't have an empty interspection.
11:36 xiaomiao yes, and closed-source blackboxen are not the way forward
11:36 FROGGS_ and also stuff from other vendors that "work nicely" with SAP
11:36 xiaomiao FROGGS_: augh
11:36 masak the only way open source can win is to provide decent, workable alternatives to closed-source blackboxen.
11:36 xiaomiao FROGGS_: I am 'downstream' of two SAP deployments, which means that I had to adapt our mail filtering because they generate bad emails
11:37 masak I wish I could say the open-source world has been stellar in this regard so far.
11:37 xiaomiao FROGGS_: and it's not fixable, so EVERY downstream customer gets to fix their setup to fix the shitcrap that SAP barfs around
11:37 * masak is currently making his way through http://queue.acm.org/detail.cfm?id=2349257
11:37 xiaomiao masak: that means we also need proper investment
11:37 xiaomiao I mean, everyone who uses opensource should donate a tiny bit every year ...
11:37 * xiaomiao donates tons of time
11:40 rurban joined #perl6
11:46 perl007 joined #perl6
11:46 perl007 p6: say test;
11:46 camelia rakudo-{parrot,moar} 80b912: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tmpfileâ�¤Undeclared routine:â�¤    test used at line 1â�¤â�¤Â»
11:46 perl007 p6: say 'test';
11:46 camelia rakudo-{parrot,moar} 80b912: OUTPUT«test␤»
11:47 perl007 p6: say 'adfdfadf' ~~ /adf/;
11:47 camelia rakudo-{parrot,moar} 80b912: OUTPUT«「adf」␤␤»
11:47 perl007 p6: say 'adfdfadf' ~~ m:g/adf/;
11:47 camelia rakudo-{parrot,moar} 80b912: OUTPUT«「adf」␤ 「adf」␤␤»
11:48 perl007 rakudo: say 'adfdfadf' ~~ m:g/adf/;
11:48 camelia rakudo-{parrot,moar} 80b912: OUTPUT«「adf」␤ 「adf」␤␤»
11:51 moritz xiaomiao: there's lots of shitty code everywhere, not jst in enterprise
11:51 xiaomiao moritz: indeed, but open stuff I can fix
11:52 xiaomiao or I can hire someone to fix it
11:52 xiaomiao all a matter of control, I don't like depending on moody people ;)
11:53 moritz xiaomiao: well, often enough, enterprise software is developed in-house, so "you" (as the company using it) can stil fix it
11:53 xfix But... Windows 95 server running our COBOL server software still works for us... There is risk in updating the software, why do so, when the current one works.
11:54 moritz also, open source enterprise software also exists
11:54 moritz maybe we have different ideas what "enterprise" means
11:54 xiaomiao moritz: hahahaha
11:54 xiaomiao moritz: that was funny
11:55 xiaomiao if I could fix our inhouse software ... I guess I'd be busy for years, but that would make life so much less aargh
11:55 jluis joined #perl6
11:56 moritz xiaomiao: well, I'm employed to develop/maintain/enhance inhouse software (some of it based off open source products, others built with open source tools)
11:57 FROGGS_ I did that just recently... I made an app that replaces an SAP addition from another vendor that is 'about to be done' since about four years
11:58 xiaomiao I'd be happy if the hardware we had were kinda ... sane
11:58 FROGGS_ and we pay consultants and that vendor these four years of course, and also some of our ppl spend a lot of their time
11:58 xiaomiao but once bought it's hard to just replace it because "it's ugly"
11:58 xiaomiao FROGGS_: project management fail? I mean - payment tied either to deliverables, deadlines, or some other progress
11:58 sqirrel_ joined #perl6
11:59 FROGGS_ xiaomiao: one or two bad decisions five or six years ago...
11:59 FROGGS_ I dunno what the payment is tied to actually
11:59 xiaomiao FROGGS_: plus no proper project management since then ;)
11:59 FROGGS_ exactly
11:59 * xiaomiao is usually janitor - clean up other people's mistakes
12:00 FROGGS_ there is no person that is responsible for the entire system
12:00 xiaomiao can make one a leeeeeeettle bit cynical and grumpy
12:00 xiaomiao ... why not?
12:00 moritz xiaomiao: me too, but I also leave mistakes behind for others to clean up, I guess
12:00 FROGGS_ xiaomiao: probably nobody of the higher ppl wanted to do the job...
12:01 FROGGS_ there are only partial responsibilities... like managing that an interface from SAP to another system is implemented
12:01 moritz FROGGS_: apply for the job of responsibility for the total system; demand more pay :-)
12:01 FROGGS_ and like three or four similar positions, but since there is no coordination in between these ppl, there is not much happening
12:02 FROGGS_ moritz: err no, I like my job too much :o)
12:02 moritz FROGGS_: ah, I know that :-)
12:02 FROGGS_ and I don't like that system to get in place, because what it can potentially do is crap
12:03 moritz FROGGS_: at $work, nobody feels responsible for the collection of usage/traffic data, and I'd likely be one of the most qualified people to take responsibility, but then it would eat too much of my programming time, so I don't
12:03 FROGGS_ it just could do 10% of what our self made system can...
12:06 pyrimidi_ joined #perl6
12:07 denis_boyun_ joined #perl6
12:08 jack13 joined #perl6
12:10 xiaomiao usually I am root
12:11 xiaomiao so I have an indirect responsibility for making things work
12:11 xiaomiao "I'll be the stone in your shoe ... " :D
12:25 Woodi hallo today :)
12:26 FROGGS_ hi Woodi
12:26 * masak .oO( usually I am Groot )
12:26 FROGGS_ masak++
12:26 rindolf Woodi: hi.
12:26 rindolf Woodi: what's new?
12:27 FROGGS_ rindolf: the year :D
12:27 rindolf FROGGS_: true that.
12:27 rindolf What's new with you.
12:28 FROGGS_ I've no idea
12:28 Woodi moritz: I think Open-Source-world didn'd discovered Kerberos... unfortunatly Microsoft did, they married it to the LDAP server and got "domain" stuff... I realy wish something like that done from scratch (not connected to MS architecture)
12:29 masak hi rindolf -- haven't seen one of your awkward IRC greetings since last year ;)
12:29 Woodi rindolf: latest news is that I (nearly) finished 2014 raports :)
12:29 rindolf Woodi: what are raports?
12:29 masak typo of "reports".
12:29 masak maybe means bookkeeping.
12:31 Woodi rindolf: online translator call it "stacktaking". you know, bakery ingradients from 2014 :)
12:31 rindolf Woodi: stacktaking?
12:31 rindolf Woodi: and I don't know what you mean.
12:32 * masak is confused, too
12:32 Woodi yes :) mandatory thing :)
12:32 masak "taking stock"?
12:32 masak as in, going through your inventory and counting things?
12:33 Woodi yes :) boring thing
12:33 Woodi I wonder do camera with edge detection can automate it :)
12:33 * masak .oO( "taking stack" must be a LIFO process, as opposed to "taking queue"... )
12:34 Woodi also: is Kerberos safe thing in XXI century ?
12:34 moritz Woodi: I heard nothing negative about it (security wise), which is a rather good sign :-)
12:35 Woodi same. and this in some % worry me.
12:36 masak it sometimes amuses me how close Polish culture is to Roman culture. ("XXI century"). I guess it's because the Catholic church is a big things in .pl
12:37 Woodi masak: I was sure XXI have science-fiction origin, not Roman, even European...
12:38 masak Woodi: well, then you are wrong ;)
12:38 masak Woodi: https://en.wikipedia.org/wiki/Roman_numerals
12:38 Woodi masak: and I would be happy to Catholic church be a bigger thing everywhere :) becouse it menans "good" for me :)
12:38 masak there's no accounting for taste.
12:39 Woodi ah, notation
12:42 masak it's pre-positional numerals.
12:42 masak very low-tech.
12:45 Woodi do we want something like GIO in Gnome or KIO in KDE ?  http://en.wikipedia.org/wiki/GIO_%28software%29
12:45 Woodi with channels and async stuff
12:47 xiaomiao Woodi: if ldap were less horrible I might even almost agree with you
12:48 Woodi xiaomiao: why horrible ? :) I like it
12:48 xiaomiao Woodi: the idea is kinda neat, but the implementations ... teh zomg wtf ur has wriet codez?!??!
12:49 xiaomiao openldap for example is just like, I have no idea what to do, let's throw paper airplanes
12:49 nine Woodi: I liked LDAP until I tried storing our employee's date of birth in our LDAP server.
12:49 xiaomiao errors? eh? uhm ... you mean warning? maybe?
12:49 Woodi xiaomiao: which LDAP ?  OpenLDAP, Fedora, ActiveDirectory, ... ?
12:50 xiaomiao Woodi: AD is off limits ;) and openldap is just really bad badness
12:50 xiaomiao Woodi: no idea what you mean with "Fedora", but e.g. "389 directory server" or what it was called had dependencies that made me nope away very fast
12:51 Woodi xiaomiao: LDAP is just pre-XML, object-like database for READs :)
12:51 pmurias joined #perl6
12:51 xiaomiao Woodi: wrong, it's hierarchic DB
12:52 pmurias hi
12:52 Woodi 389 was Netscape then Sun probably :) but performance wise it is good
12:52 pmurias what is redpanda?
12:52 xiaomiao which is awesome, but no one made a sane implementation yet (well duh, ASN.1 etc?)
12:52 Woodi xiaomiao: yes, and hierarchical :) ldif format is object like
12:53 Woodi xiaomiao: also it is OSI DAP adopted to TCP, it cannot be simple :) exactly like certificates we use
12:54 xiaomiao some days I wonder how expensive it would be to hire a dozen smart people and rebuild such infrastructure components
13:00 Woodi xiaomiao: as opensource project with voluntiers ? could be cheap initially :)
13:01 pmurias how can I switch which backend is used for perl6?
13:01 Woodi I sometimes wonder: can security live without ASN.1 ?
13:02 xiaomiao Woodi: well, you'd need to hire at least one fulltime project manager, and one or two developers to keep things going
13:02 FROGGS_ pmurias: do 'make m-runner-default-install' for moarvm for example in the rakudo build dir
13:07 pmurias nine: how should I obtain a suitable python for use with Inline-Python?
13:08 pmurias FROGGS_: any idea what redpanda is?
13:10 FROGGS_ pmurias: it was intended to be like cpanminus
13:12 nine pmurias: on openSUSE I just install the python and python-devel packages.
13:14 pmurias nine: the debian one doesn't work...
13:14 nine pmurias: need more info
13:15 pmurias it's lacking the -fpic flag
13:15 pmurias -fPIC flag
13:15 pmurias I'm setting up pyenv but I'm not sure if it will build one with the -fPIC?
13:19 nine pmurias: I'm sure there's an easier way. Perl 5's Inline::Python has the same requirement and I have cpantesters reports from Debian boxes where it works: http://www.cpantesters.org/cpan/report/b42230fc-7f32-11e4-9696-c7ea56d63282
13:20 denis_boyun_ joined #perl6
13:20 nine pmurias: you do have the python-dev package installed?
13:21 pmurias nine: yes
13:21 pmurias the package claims to contain header files and static library
13:23 nine pmurias: which package does your libpython2.7.so come from?
13:26 nine Seems like there is a libpython2.7 package on debian.
13:29 pmurias I have that package installed
13:33 pmurias nine: there is one from libpython-2.7 and libpython-2.7-dev
13:34 pyrimidine joined #perl6
13:35 nine pmurias: what Debian version do you use?
13:35 pmurias jessie
13:41 nine pmurias: I'm sorry, I'm a bit at a loss. I've never used Debian myself.
13:42 nine pmurias: maybe people in #python can help you?
13:47 moritz masak: my random musings on enterprise software: https://gist.github.com/moritz/d086a8372adf69cd8b65
13:48 raiph joined #perl6
13:48 nine Did the push URL for dalek change?
13:50 nine Ah found it in the IRC log
13:55 pmurias pyenv solved the problem
13:56 pmurias shouldn't rakudo avoid using color when piped into a file?
13:57 FROGGS_ yes, it should
13:58 Woodi pmurias: what pyenv is ?
13:58 pmurias something like perlbrew for python
13:59 pmurias nine: http://pastie.org/981096
13:59 pmurias nine: the tests fail with this error message
14:01 nine Sorry, there is no pastie #981096 or it has been removed.
14:02 dalek Heuristic branch merge: pushed 43 commits to rakudo/newio by lizmat
14:02 pmurias nine: http://pastie.org/9810925
14:04 nine pmurias: I guess you're on a current rakudo? I'm still on 2014.11-27-ga3cf223, so something may have changed in the mean time and I need to update Inline::Python.
14:05 pmurias I'm on a newer one
14:07 pmurias would it be possible to have panda use some service on p6c.org instead of parsing a json file?
14:08 FROGGS_ what's the difference?
14:10 Ven joined #perl6
14:11 Mso150 joined #perl6
14:12 Ven joined #perl6
14:12 Woodi moritz: lets create something what UBL was meant to be :)  http://en.wikipedia.org/wiki/Universal_Business_Language  UE was trying to do this some years ago. now they are trying more from-the-top approach :)  http://www.peppol.eu/news/ec-directive-on-e-invoicing-in-public-procurement
14:13 pmurias FROGGS_: parsing a big json file everytime is slow
14:13 pmurias FROGGS_: panda help takes over 3 seconds
14:13 FROGGS_ but making hundreds of queries to reduce the json file(s) will be slower
14:14 FROGGS_ well, ideally we don't need to parse that json file at all for displaying the help msg
14:15 nine Is http://hack.p6c.org/dalek?t=freenode,perl6 the current github webhook url?
14:17 Woodi FROGGS_, pmurias: maybe debian approach: download files with updates, parse and put into database
14:17 dalek roast: 9b2d779 | lizmat++ | S10-packages/precompilation.t:
14:17 dalek roast: Should work with just @*INC
14:17 dalek roast: review: https://github.com/perl6/roast/commit/9b2d779d6e
14:18 pmurias Woodi: the cpanm approach of just quering a service seems better
14:19 FROGGS_ pmurias: feel free to fork panda, and open PRs one you have something that works (better)
14:19 dalek Heuristic branch merge: pushed 29 commits to roast/newio by lizmat
14:20 kjs_ joined #perl6
14:22 dalek Inline-Python: c1cf331 | (Stefan Seifert)++ | lib/Inline/Python.pm6:
14:22 dalek Inline-Python: Stop Python preventing Ctrl+C from killing the process
14:22 dalek Inline-Python: review: https://github.com/niner/Inline-Python/commit/c1cf331ac1
14:23 lizmat nine: are you aware that Inline::Perl5 currently doesn't build on rakudo ?
14:24 nine lizmat: no. But I suspect it will be the same problem pmurias just told me about in Inline::Python
14:25 * lizmat hopes so
14:30 dalek Inline-Python: 82cab41 | (Stefan Seifert)++ | / (3 files):
14:30 dalek Inline-Python: Make Perl subclasses more transparent to Python
14:30 dalek Inline-Python:
14:30 dalek Inline-Python: Python's Qt bindings use some kind of low level introspection to find out
14:30 dalek Inline-Python: what methods a Python subclass of a Qt class overrides. So in order to have
14:30 dalek Inline-Python: it call the methods of a Perl 6 subclass of a Qt class, we'd have to hook
14:30 dalek Inline-Python: into this mechanism. Unfortunately there doesn't seem to be a way to do that.
14:30 dalek Inline-Python:
14:30 dalek Inline-Python: So instead, I now create a Python class for every Perl 6 class inheriting
14:30 dalek Inline-Python: from Python classes. This generated class uses the standard Python
14:30 dalek Inline-Python: inheritance mechanism and has proxy methods for all methods the Perl 6
14:30 dalek Inline-Python: subclass provides.
14:30 dalek Inline-Python:
14:30 dalek Inline-Python: This way even PyQt's low level mingling finds all the information it needs
14:30 dalek Inline-Python: and we can write programs using PyQt in Perl 6 :)
14:30 dalek Inline-Python: review: https://github.com/niner/Inline-Python/commit/82cab4181d
14:31 dalek Inline-Python: b484a91 | (Stefan Seifert)++ | pyhelper.c:
14:31 dalek Inline-Python: Avoid causing another failure if we cannot find the class name for generating exception messages.
14:31 dalek Inline-Python: review: https://github.com/niner/Inline-Python/commit/b484a91e8c
14:39 pmurias nine: I managed to fix the error, should I fork on github and make a pull request?
14:40 nine pmurias: oh that would be nice!
14:40 * nine is currently upgrading his rakudo
14:41 dalek rakudo/newio: e4e9cf8 | TimToady++ | src/core/List.pm:
14:41 dalek rakudo/newio: cmp on lists should distribute to columns
14:41 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/e4e9cf86f7
14:41 dalek rakudo/newio: 167f5f4 | TimToady++ | src/core/List.pm:
14:41 dalek rakudo/newio: oops, <=> can already return Same
14:41 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/167f5f4230
14:41 dalek rakudo/newio: f3f6641 | lizmat++ | src/core/CompUnit.pm:
14:41 dalek rakudo/newio: Fix brokennes due to merge failure
14:41 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/f3f6641c4c
14:41 dalek rakudo/newio: 44cb1d7 | lizmat++ | src/core/CompUnitRepo.pm:
14:41 dalek rakudo/newio: Directories in newio always have a trailing /
14:41 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/44cb1d7869
14:41 dalek rakudo/newio: 0ae5d10 | lizmat++ | src/core/List.pm:
14:41 dalek rakudo/newio: Merge branch 'nom' into newio
14:41 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/0ae5d10e31
14:45 pmurias nine: made a pull request
14:49 dalek Inline-Python: 1e5a4cb | (Pawel Murias)++ | lib/Inline/Python.pm6:
14:49 dalek Inline-Python: Fix to work on current rakudo.
14:49 dalek Inline-Python: review: https://github.com/niner/Inline-Python/commit/1e5a4cb41b
14:50 dalek Inline-Perl5: 5a1b1ea | (Stefan Seifert)++ | lib/Inline/Perl5.pm6:
14:50 dalek Inline-Perl5: Fix "Shape declaration with () is reserved" on current Rakudo
14:50 dalek Inline-Perl5: review: https://github.com/niner/Inline-Perl5/commit/5a1b1ea538
14:50 nine I still get "Missing serialize REPR function for REPR ReentrantMutex" in precomp.t in both Inline::Perl5 and Inline::Python
14:51 dalek rakudo/newio: f52e0fc | lizmat++ | src/core/Deprecations.pm:
14:51 dalek rakudo/newio: Fix another merge gone wrong
14:51 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/f52e0fcf33
14:57 nine But I cannot see where I'm at fault here. Neither Inline::Perl5 nor Inline::Python do much when just being use'd and precomp.t does just that.
14:59 H2O1 joined #perl6
15:03 Rounin joined #perl6
15:03 FROGGS_ nine: I have the same problem in v5
15:03 FROGGS_ nine: problem is (I think) that CompUnit.load_module uses a Lock, and when you load a module at BEGIN/EXPORT time, then you run into trouble
15:05 H2O1 left #perl6
15:06 Mso150 joined #perl6
15:06 FROGGS_ this one I think: https://github.com/rakudo/rakudo/blob/nom/src/core/CompUnitRepo.pm#L34
15:07 FROGGS_ hmmm, is it possible that both Inline::Python and v5 are affected since June? See https://github.com/rakudo/rakudo/commit/9ccf3a987bf5614c4e568c74d4c46bce973991cc
15:08 nine FROGGS_: Inline::Python has not existed yet in June. And on Rakduo 2014.11-27-ga3cf223 it worked for me.
15:08 FROGGS_ hmmmm
15:08 FROGGS_ then we should bisect the problem I fear
15:13 lizmat FROGGS_: I don't think "load_module" is actually used ?
15:13 lizmat but if it is, don't we want to be sure only one thread is loading a specific module at a time ?
15:14 FROGGS_ lizmat: I think it is used because we replace the current module loader at setting's end, and yes, we only want to load one module at a time
15:14 FROGGS_ but... something wants to serialize that Lock, and that's just weird and needs to be tracked down
15:15 lizmat welcome to my world for the past N months  :-)
15:15 FROGGS_ and it is good to know that 2014.11-27 worked
15:15 FROGGS_ :o)
15:16 lizmat FROGGS_ nine most likely 003b35850d8873d0d5076d71b329c9e4c3107e15 is to blame
15:16 lizmat please note the commit message  :-)
15:17 FROGGS_ no, I had problems more than 22 hours ago I think
15:17 lizmat ah, ok
15:18 FROGGS_ my rakudo is two days old
15:18 FROGGS_ This is perl6 version 2014.12-74-g8f173a0 built on MoarVM version 2014.12-3-g8cfefcb
15:19 sirdancealot joined #perl6
15:25 dalek rakudo/newio: 2854ea5 | lizmat++ | src/core/I (2 files):
15:25 dalek rakudo/newio: Eradicate IO::Path.new-from-absolute-path
15:25 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/2854ea5016
15:40 masak moritz: re https://gist.github.com/moritz/d086a8372adf69cd8b65 -- interesting reading.
15:41 masak moritz: "That's a tough one." -- indicates to me we should find someone who is (a) really in the middle of all this enterprise stuff, and (b) open to discussing what works and what doesn't in his environment, with an eye to improving stuff.
15:41 masak basically, a domain expert where the domain is an enterprise environment.
15:41 arnsholt Indeed
15:41 masak anyway, moritz++ for thinking about this.
15:42 masak everybody else: we are now looking for such a domain expert. any ideas?
15:42 arnsholt A uniform Auth/Authz module sounds intriguing in general too, especially something able to cope with the trickier stuff like roles
15:45 mst I think that would be a terrible idea
15:46 mst some sort of API ala Authen::Passphrase is a good thing
15:46 mst but do NOT mix authen and authz in the same thing
15:46 mst because what happens then is that if you need wildly different authen, you can't use the authz
15:47 mst and basically authz is mostly local policy, and any attempt to generalise it tends to be a footgun
15:47 arnsholt Point
15:47 mst so you end up either making your authen code useless
15:47 mst or people just drag the authz around as baggage they have to ignore
15:48 mst also, IME, authz tends to be best baked into the domain
15:48 mst DBIx::Class::Schema::RestrictWithObject was one experiment I did in that respect
15:49 mst but I really like being in a situation where e.g. rather than testing 'does this user have permission to view this post'
15:49 zakharyas joined #perl6
15:49 mst you do 'my $post = $user->visible_posts->by_id($id);'
15:50 mst and I've found that attempts at authz libraries tend to promote the opposite pattern
15:50 mst which is often kinda icky
15:50 pmurias nine: t/precomp.t works for me
15:50 mst arnsholt: hopefully that makes some sort of sense
15:50 arnsholt mst: A lot of sense, TBH
15:50 arnsholt Being an academic, this isn't a space I've much practical knowledge about
15:51 arnsholt Mostly limited to the horror stories (temporal logics with dicontinuous intervals... ugh) my consultant friend tells me
15:51 mst I've spent the past ten years or so running a consultancy technical team
15:52 arnsholt Indeed. Which makes me prone to believe you know a thing or three about this =)
15:52 lizmat pmurias: on Moar ?
15:52 lizmat fwiw, it doesn't for me
15:52 mst I'm not sure I know a good general way of doing authz right, but I certainly know a thing or three about ways of doing it wrong :)
15:53 arnsholt That's half the battle though, isn't it. Knowing what doesn't work? =)
15:54 pmurias lizmat: yes
15:54 dalek rakudo/nom: 6e35d1d | lizmat++ | src/core/CompUnitRepo.pm:
15:54 dalek rakudo/nom: Don't bind the lock
15:54 dalek rakudo/nom:
15:54 dalek rakudo/nom: This does not fix the precomp problem for me, but it was the *only* occurrence
15:54 dalek rakudo/nom: of binding the lock in the settings, so I thought it'd be best to be at least
15:54 dalek rakudo/nom: consistent.
15:54 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/6e35d1d2b2
15:55 lizmat pmurias: weird
16:00 pmurias perl6 -o precomped.moarvm ...filename.p6... should precompile?
16:00 dalek roast: da2561a | usev6++ | S03-metaops/reverse.t:
16:00 dalek roast: Add test for RT #118793
16:00 dalek roast: review: https://github.com/perl6/roast/commit/da2561a8b6
16:00 synopsebot Link: https://rt.perl.org/rt3//Public/Bug/Display.html?id=118793
16:01 lizmat pmurias: the problem occurs when there is a -use- statement in the code being compiled
16:02 lizmat such as in t/spec/packages/Example/A.pm
16:02 pmurias how do I precompile stuff?
16:03 moritz perl6-m --target=mbc -o Module.pm6.moarvm Module.pm6
16:03 nine git bisect bad 167f5f423024fc7d64520d301482b2f990c63099
16:06 pmurias I get a "Cannot dump this object; no dump method"
16:06 lizmat pmurias: alternately, without having to know backends and extensions:
16:06 lizmat CompUnit.new('Module.pm6').precomp
16:07 Alina-malina joined #perl6
16:07 pmurias moritz: -o doesn't work, --output does
16:08 pmurias is 'moar foo.moar' supposed to work?
16:12 pmurias is there a rakudo manual?
16:13 moritz pmurias: precompiling scripts doesn't work, just modules
16:13 moritz pmurias: and you just have to look into rakudo's makefile how it precompiles Test.pm and lib.pm, and do it the same
16:16 pmurias that's not exactly user friendly
16:18 lizmat pmurias moritz : that's why I implemented a CompUnit object with a "precomp" method
16:18 lizmat it takes all of the nitty gritty out of that
16:18 moritz pmurias: docs/running.pod also has a man page for the compiler itself, but I don't know how much it goes into detail on precompilation
16:19 pmurias it seems to be a parrot relict
16:21 pmurias fork and make a pull request is the recommended way for rakudo fixes?
16:21 moritz pmurias: yes; though I'm working on updating the man page
16:25 FROGGS_ pmurias: perl6-m -Mfoo -e1 would work, instead of 'moar foo.moar'
16:27 dalek rakudo/nom: 8587c4e | moritz++ | docs/running.pod:
16:27 dalek rakudo/nom: Update manpage, pmurias++
16:27 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/8587c4ef61
16:30 ka05 joined #perl6
16:30 rurban joined #perl6
16:35 KCL_ joined #perl6
16:35 dalek rakudo/newio: c3394cb | lizmat++ | src/core/Str.pm:
16:35 dalek rakudo/newio: We no longer need to predeclare IO::Path
16:35 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/c3394cb20a
16:35 dalek rakudo/newio: 74b4be7 | lizmat++ | src/core/Process.pm:
16:35 dalek rakudo/newio: Eradicate IO::Path some more
16:35 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/74b4be776b
16:38 telex joined #perl6
16:39 pmurias moritz: docs.perl6.org should point to the new running page in some manner
16:42 masak mst: it might be a complete mis-association, but what you said about 'my $post = $user->visible_posts->by_id($id);' sounds structurally like FP's dictum "operate on lists when you can -- abstract away the mechanics of looping and just compose functions"
16:42 ka05 joined #perl6
16:43 masak mst: or, put differently, maybe the mistake authz libraries tend to make is to push the library user into a trap of not being able to compose functions like that.
16:43 masak has to suck the information through a very thin straw.
16:43 * masak .oO( the von Authzmann bottleneck )
16:43 Ven joined #perl6
16:44 Ven Isn't IO::Path#e documented?
16:44 mst masak: the real problem, I think, is that authz is a cross cutting concern
16:45 mst you almost want AOP
16:45 mst except AOP tends to be heinously confusing
16:47 TimToady call it DI instead, that'll fix All The Things
16:48 lizmat Ven: not sure it;s worth the trouble at the moment
16:50 TimToady mix a little IOC in there too, and you can have DIAIOCOP or so
16:51 Ven method IO doesn't appear in Str or w/e, it's surprising
16:51 Ven (I found it in Cool)
16:52 lizmat Ven: it's in Cool so that you can also do "3.IO"
16:52 lizmat if you have a file that's just called "3"
16:52 rindolf TimToady: hi, sup?
16:52 TimToady to early for that, haven't even had breakfast :)
16:53 TimToady *too
16:53 lizmat *soup ?
16:53 TimToady two early too speel to
16:53 TimToady *urly
16:53 Ven lizmat: yeah, but it's not listed in Str's doc
16:59 jack13 joined #perl6
17:00 lizmat afk&
17:01 masak heh. privmsg fail ;)
17:01 lizmat :-)
17:01 * masak looks around for stray wits, which must be lying around somewhere
17:01 lizmat sleep deprivation will do that to you
17:01 masak moritz: if there is some irclog magic you can do to scrub things, feel free :)
17:02 lizmat looking for wits where there aren't any
17:02 lizmat masak: congrats!
17:02 masak anyway, guess it's official now.
17:02 masak thanks.
17:02 dj_goku joined #perl6
17:02 dj_goku joined #perl6
17:02 moritz masak: uhm, what needs to be scrubbed?
17:02 masak moritz: the '/me' above should've been a '/msg'
17:03 masak that's all; the fallout can be left intact for people who like detective work.
17:03 nine lizmat: 003b35850d8873d0d5076d71b329c9e4c3107e15 is the first bad commit "Allow specification of @*INC in CompUnit.precomp"
17:04 lizmat nine: so that breaks Inline::Perl5 at the moment?
17:04 nine lizmat: and Inline::Python, yes
17:04 lizmat .oO( here goes another piece of work down the drain )
17:05 moritz masak: line deleted from DB, should be gone in the next(ish) refresh
17:05 masak moritz: thank you.
17:05 masak moritz: yeah, 'tis gone.
17:05 moritz masak: you're welcome
17:06 masak what's left is almost like http://cm.bell-labs.com/who/ken/trust.html ;)
17:06 dalek rakudo/nom: 43b724e | lizmat++ | src/core/CompUnit.pm:
17:06 dalek rakudo/nom: Revert "Allow specification of @*INC in CompUnit.precomp"
17:06 dalek rakudo/nom:
17:06 dalek rakudo/nom: Alas, this breaks Inline::Perl5, so reverted until further notice.
17:06 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/43b724e210
17:06 * FROGGS_ tries
17:07 FROGGS_ it is possible that I was on that commit, and just did no reconfigure
17:08 lizmat nine: confirmed
17:08 lizmat *sigh*
17:09 nine lizmat: yes, both Inline::Perl5 and Inline::Python pass their tests now.
17:12 lizmat really afk now&
17:14 nine .tell lizmat maybe having a look at Inline::Perl5's t/precomp.t would be a good idea. It's very simple, but maybe it's just doing something wrong. Or maybe it can at least give you a hint why your commit doesn't work.
17:14 yoleaux nine: I'll pass your message to lizmat.
17:16 FROGGS_ sadly it does not help v5:
17:16 FROGGS_ Compiling (7) if to mbc
17:16 FROGGS_ ===SORRY!===
17:16 FROGGS_ Missing serialize REPR function for REPR ReentrantMutex
17:18 nine .tell lizmat precomp.t assigns to %*ENV<PERL6LIB> _after_ loading Inline::Perl5. Maybe that's messing up precomp?
17:18 yoleaux nine: I'll pass your message to lizmat.
17:19 FROGGS_ I'm doing similar things in v5
17:19 FROGGS_ (it has its own ModuleLoader)
17:20 virtualsue joined #perl6
17:21 nine Moving the assignment to the top of the file does not help.
17:24 ugexe if you're getting the ReentrantMutex error then you are getting the same error any code on MoarVM would get
17:25 ugexe lizmat mentioned it builds correctly on parrot (i think) and gives a better exception error on jvm
17:25 ugexe something about moarvm not unserializing a lock
17:29 TimToady Timbus, xfix: that integer check is now:  $_ when Int given hero($a, $b, $c).narrow;
17:31 xfix TimToady, oh, neat, didn't know about .narrow method.
17:31 xfix In that case, I probably would have written .narrow ~~ Int.
17:31 TimToady but I don't want to return a floater
17:31 TimToady so topicalizing the integer allows me to return it easily
17:32 xfix Yes, this looks better than what I would write.
17:32 TimToady without reconverting
17:33 TimToady m: say <1+0i>.narrow
17:33 camelia rakudo-moar 80b912: OUTPUT«No such method 'narrow' for invocant of type 'Str'␤  in block <unit> at /tmp/eAC9s1XCPT:1␤␤»
17:33 TimToady right, gotta fix those val things
17:34 japhb Dear heavens yes, replace hack-val(), PLEASE.
17:34 xfix <3> should be Int.
17:34 xfix But it still isn't in Rakudo.
17:35 japhb IntStr, no?
17:35 xfix I guess, I haven't been here for a long time.
17:35 TimToady if there's only one, and no spaces, it should leave out the Str
17:35 TimToady but only in angles
17:35 xfix IntStr is a thing?
17:35 TimToady supposed to be
17:36 TimToady but the <> notation is more for Rat and Complex
17:36 xfix Last time I was here, <> wasn't returning IntStr.
17:36 TimToady still isn't
17:36 xfix <1/2> was Rat, not some random RatStr.
17:37 TimToady m: say <1/2>.WHAT
17:37 camelia rakudo-moar 80b912: OUTPUT«(Str)␤»
17:37 TimToady maybe you're thinking of niecza++ (RIP)
17:37 xfix Yes, in Niecza.
17:37 xfix n: say <1/2>.WHAT
17:37 camelia niecza v24-109-g48a8de3: OUTPUT«(signal ABRT)Stacktrace:␤␤  at <unknown> <0xffffffff>␤  at (wrapper managed-to-native) object.__icall_wrapper_mono_gc_alloc_string (intptr,intptr,int) <0xffffffff>␤  at (wrapper alloc) object.AllocString (intptr,int) <0xffffffff>␤  at string…»
17:37 xfix ... right.
17:37 xfix So not only it wasn't updated for a year, but it's also broken in camelia.
17:38 TimToady just needs some tender lovin' and carin'
17:39 xfix Niecza was neat. It was once a neat Perl 6 compiler supporting features that Rakudo didn't (like custom operators, and more STD.pm6-like parser).
17:39 xfix But well, now it's behind.
17:39 TimToady except on val :)
17:40 xfix So, currently Rakudo is the only still updated Perl 6 implementation?
17:41 TimToady well, except that it's 3 implementations :)
17:41 xfix (I don't consider STD.pm6 to be Perl 6 implementation)
17:41 xfix Yes, but they run mostly the same NQP code.
17:42 masak Niecza's falling-behind is (a) an example of bus number in action -- though not literally, thankfully -- and (b) a kind of vindication of the nom/6model refactor (which made Rakudo overtake Niecza and leave it in the dust, spectest-wise).
17:42 TimToady well, viv could be considered an implementation of a subset of Perl 6, that works by translating to Perl 5
17:42 xfix I guess.
17:42 xfix Perlito still gets improvements, but they are practically Perl 5 improvements.
17:43 TimToady in fact, it was precisely the refactoring problem that was cited by sorear++ as a major reason for abandonment
17:44 TimToady (well, and the fact that some of those refactors were in support of features sorear++ wasn't sure he agreed with :)
17:45 TimToady so the way forward is probably just to write a .NET backend for rakudo now
17:45 psch joined #perl6
17:46 TimToady that, and fix val :)
17:46 xfix I once have used Niecza, because Rakudo refused to work for me on Windows. But from what I see, Rakudo now works better on Windows (but not that I even care by now, because I use Linux now).
17:46 psch hi #perl6 \o
17:46 ajr joined #perl6
17:46 xfix Hi, psch.
17:47 TimToady o/
17:47 japhb ++(.NET backend for rakudo)
17:47 xfix I wonder about removing Niecza from main page of perl6.org. It's not really relevant by now, and it's more of a historical compiler (like Pugs).
17:48 xfix But at the same time, section header is "Compilers".
17:48 TimToady we still want to think of it as plural, even if there's really only one currently
17:48 TimToady it only takes one fork to make two :)
17:51 TimToady and, in fact, the newio branch seems to be a rather persistent fork :P
17:53 moritz persistent forks are fine, as long as we don't advertise them as The Next Big Thing
17:55 nwc10 commit 4e459090fd1f1da89e41568787a70e38cb4560fc
17:55 nwc10 Author: Elizabeth Mattijsen <liz@dijkmat.nl>
17:55 nwc10 Date:   Tue Nov 11 15:43:17 2014 +0100
17:55 nwc10 I think that that's where it starts
17:58 xfix I find it interesting that in COBOL you can write `IF result = this OR that`. Feels like Perl 6 junctions, even.
17:58 xfix (I wonder why syntax like that doesn't exist in many programming languages)
18:00 geekosaur mostly because nesting is difficult
18:00 geekosaur icon has an interesting solution to it
18:00 ugexe then you have to solve if result = this OR result2 = that
18:01 geekosaur actually icon's is for x < y < z type things. the COBOL example has the problem of whether it means IF x = y OR x = Z, or is the start of writing that out longhand
18:01 geekosaur plus little niggles like whether you have a boolean type that would make that expression ambiguous
18:03 xfix I guess. COBOL didn't have booleans until 2002 (and they work around this shortened syntax by doing type checking in grammar).
18:04 xfix (but a different operator could be used for junctions than usual "or" operator)
18:04 xfix In Perl 6, || and | are different.
18:04 * TimToady thinks icon's approach is kind of a hack that destroys the symmetry of the semantics
18:05 xfix Alternatively, there is possibility of using function call for junctions. In SQL, you can write code like SELECT name FROM users WHERE userid = ANY(3, 5).
18:05 dyas joined #perl6
18:05 xfix Although, in that specific case, userid IN (3, 5) is usually more common.
18:05 TimToady gee, maybe we should put that into Perl 6 too
18:06 ugexe lol
18:11 TimToady m: say "Yeah!" if (1,2,3).&$_ == (^10).pick given any(&any, &all, &one, &none)
18:11 camelia rakudo-moar 80b912: OUTPUT«Type check failed in binding &call; expected 'Callable' but got 'Method+{<anon>}'␤  in method AUTOTHREAD at src/gen/m-CORE.setting:3799␤  in block <unit> at /tmp/4nzDD3sT9T:1␤␤»
18:12 nwc10 r: say "Yeah!" if (1,2,3).&$_ == (^10).pick given any(&any, &all, &one, &none)
18:12 camelia rakudo-moar 80b912: OUTPUT«Type check failed in binding &call; expected 'Callable' but got 'Method+{<anon>}'␤  in method AUTOTHREAD at src/gen/m-CORE.setting:3799␤  in block <unit> at /tmp/tmpfile:1␤␤»
18:12 camelia ..rakudo-parrot 80b912: OUTPUT«Type check failed in binding &call; expected 'Callable' but got 'Method+{<anon>}'␤  in method AUTOTHREAD at gen/parrot/CORE.setting:3803␤  in sub AUTOTHREAD at gen/parrot/CORE.setting:3881␤  in block <unit> at /tmp/tmpfile:1␤␤»
18:12 nwc10 consistent, which is good
18:12 nwc10 (dear JVM, please try to keep up)
18:12 nwc10 j: say "Hi"
18:12 camelia rakudo-jvm 80b912: OUTPUT«Can't open perl script "/home/camelia/jvm-rakudo/eval-client.pl": No such file or directory␤»
18:12 FROGGS__ joined #perl6
18:13 nwc10 I assume that that's a "bug" but I have no idea how to fix it, or even who to ask about it
18:13 TimToady must be a Perl 5 bug :)
18:14 nwc10 quite probably. IIRC there are at least as many open Perl 5 bugs as Rakudo :-)
18:18 Alina-malina joined #perl6
18:18 TimToady there's only one Rakudo, unless there's three...
18:20 ggoebel111111117 joined #perl6
18:20 abraxxa joined #perl6
18:21 dalek nqp: e0c77b9 | peschwa++ | src/vm/jvm/runtime/org/perl6/nqp/runtime/BootJavaInterop.java:
18:21 dalek nqp: Add support for loading .class files from $CLASSPATH.
18:21 dalek nqp: review: https://github.com/perl6/nqp/commit/e0c77b9cd9
18:21 dalek nqp: b2f2f4f | peschwa++ | src/vm/jvm/runtime/org/perl6/nqp/runtime/BootJavaInterop.java:
18:21 dalek nqp: Increase visibility of some inner classes.
18:21 dalek nqp: review: https://github.com/perl6/nqp/commit/b2f2f4fc19
18:21 dalek nqp: d33918a | peschwa++ | src/vm/jvm/runtime/org/perl6/nqp/sixmodel/SixModelObject.java:
18:21 dalek nqp: Correct an error message - bind_pos_boxed_native does not even make sense.
18:21 dalek nqp: review: https://github.com/perl6/nqp/commit/d33918a3cd
18:21 dalek nqp: e6b1788 | moritz++ | src/vm/jvm/runtime/org/perl6/nqp/ (2 files):
18:21 dalek nqp: Merge pull request #215 from peschwa/jvm-easier-debugging
18:21 dalek nqp:
18:21 dalek nqp: Add support for loading bare .class files and increase visibility for a few BootJavaInterop fields and inner class constructors.
18:21 dalek nqp: review: https://github.com/perl6/nqp/commit/e6b1788845
18:21 TimToady Eggnog flavored coffee isn't...terrible...
18:23 Alina-malina joined #perl6
18:24 Ven amazing PR from peschwa++
18:24 vike joined #perl6
18:25 psch Ven: https://github.com/rakudo/rakudo/pull/344 has the real features ;)
18:25 Ven psch: that's the one I'm talking about
18:25 psch Ven: oh, alright.  i was thinking you're referencing the one published by dalek :)
18:26 psch Ven: still, thanks :)
18:27 Ven psch: you have no idea how many people I know have been waiting for that to jump in ;-)
18:27 psch i'm wondering if i should amend the advent post
18:27 japhb psch: Yes.
18:28 psch Ven: there's still a few things missing, though.  most obvious is fields accessors
18:28 Ven please do amend :)
18:28 psch not before it's merged though i guess?
18:28 japhb psch: Nothing says you can't amend again after implementing that.  :-)
18:28 japhb psch: Right, after the merge.
18:28 b2gills joined #perl6
18:29 Ven psch: are you going to work on field accessors as well?
18:29 psch Ven: i don't really have an idea how to implement them at the moment
18:30 Ven alright, noted
18:30 Ven I'll blindly guess there's no typechecking involved ("calling java methods from perl6 with invalid arguments fails at compile-time")
18:30 Ven (which would imply inspecting bytecode I guess)
18:31 psch Ven: the only thing close to a workable idea i have is creating a getter and setter in the adaptor class and fiddling with the JavaHOW to wrap those in a Proxy.  the problem is that the HOW doesn't really know about the methods currently...
18:31 psch Ven: well, dispatch works by inspecting the arguments at the callsite at runtime...
18:32 Ven psch: I don't see a clean way to do it, tbh :p
18:34 psch Ven: for typechecking?  i don't really think we can do that at compile time, considering we could have something happening to the Perl 6 arguments at runtime that allows or prohibits dispatch to some handle...
18:35 psch but then i'm not really knowledgeable about type theory in general, fwiw :)
18:40 Ven hm, where were the benchmarks uploaded?
18:42 Mso150_w joined #perl6
18:51 moritz psch: I've given you commit access to perl6/nqp
18:52 psch moritz: thanks
18:56 zakharyas joined #perl6
18:58 japhb Ven: Which benchmarks
18:58 japhb ?
18:59 Ven japhb: rakudo benchmarks, i.e. against perl5 or against last year's
19:08 japhb timotimo++ sometimes uploads his runs, but you can do your own using https://github.com/rakudo/rakudo/pull/344
19:08 japhb Gah, wrong paste
19:08 japhb https://github.com/japhb/perl6-bench
19:09 japhb (I really hate that Macs select without saving into the paste buffer.)
19:16 bartolin r: my %h = %("a" => "1"); say %h.{"a"}
19:16 camelia rakudo-{parrot,moar} 80b912: OUTPUT«1␤»
19:16 bartolin r: my %h = %("a" => "1"); say %h.postcircumfix:<{ }>.("a")
19:16 camelia rakudo-{parrot,moar} 80b912: OUTPUT«No such method 'postcircumfix:<{ }>' for invocant of type 'Hash'␤  in block <unit> at /tmp/tmpfile:1␤␤»
19:16 pmqs joined #perl6
19:16 bartolin shouldn't the second command work as well?
19:17 masak japhb: I have this thing (on Linux Mint) where I can Ctrl+C in Chrome, and then Alt-Tab to another application, if I Alt-Tab too quickly, the copy doesn't "take". hilarity can ensue from that. :/
19:18 masak bartolin: I think they are subs these days.
19:18 masak bartolin: a quick scan through the setting seems to bear this out.
19:19 bartolin masak: oh. that would explain the error message. thanks!
19:23 japhb masak: Ewww.
19:24 Ven they're definitely subs
19:24 Ven because it's easier to decide which candidate we want at compile-time
19:24 Ven timotimo: ping, maybe?
19:27 bartolin Ven: I see, thanks. I stumbled upon the above command in an old ticket (RT #117935). back then they were still methods, obviously.
19:27 synopsebot Link: https://rt.perl.org/rt3//Public/Bug/Display.html?id=117935
19:27 japhb Is there a rule for whether .perl should escape strings?  (This thought brought on by e12b86b107042f38105b4ae3341876bff5ba3816)
19:28 denis_boyun_ joined #perl6
19:35 dj_goku joined #perl6
19:38 timotimo Ven: what's wrong?
19:38 moritz japhb: always when necessary; otherwise only if it makes things more robust
19:38 moritz (like newlines in strings)
19:38 Ven timotimo: o/. nothing wrong. wondering if you still have benchs up somewhere?
19:40 moritz people could run benchmarks on hack.p6c.org (just sayin')
19:44 raydiak I bet Pray would be several times faster on hack than I've ever ran it before...would that be a gratuitous waste?
19:46 japhb moritz: I thought someone was planning to do regular benchmarking there, just like [Coke]++'s spectesting.  Or was that just me wishing really hard?
19:49 LAsse__ joined #perl6
19:51 timotimo Ven: i do, but the last bench is quite old by now
19:51 TimToady http://rosettacode.org/wiki/Solve_the_no_connection_puzzle#Perl_6
19:51 timotimo my desktop computer isn't up at the moment, so i can't make "compatible" benchmarks right now
19:59 FROGGS__ weird... the first thing that I mess up when I switch between P5 and P6 in either way is the ternary...
20:00 anaeem1_ joined #perl6
20:01 raydiak do we put apps in the ecosystem too? Pray is very limited as a module, but it's fairly usable as a command-line app
20:02 timotimo there's an App:: namespace
20:02 timotimo and panda is in there, too
20:02 FROGGS__ sure
20:02 timotimo as is farabi
20:03 raydiak cool, ought to put it in there today, then
20:04 timotimo neat
20:05 raydiak haven't worked on it in a long time, it's been usable-ish for like a year, I just never added it to the ecosystem
20:05 moritz japhb: iirc jnthn mentioned he might look into it
20:09 raydiak oh nice, I can get 100+ pixels/second on hack in the first example scene...that's like double anything I've ever seen iirc
20:11 moritz \o/
20:11 moritz is that with moarvm? or jvm?
20:11 raydiak moar I think
20:12 raydiak haven't actually tried jvm in a long time to be honest, would be good to compare
20:12 moritz a year ago, moar didn't have a JIT compiler :-)
20:12 raydiak oh yeah
20:13 raydiak rakudobrewing jvm, we'll see what it does
20:15 raydiak am looking forward to the concurrency branch of Pray becoming stable eventually
20:16 raydiak also looking forward to being able to auto-generate big chunks of it at panda build time using Math::Symbolic
20:18 mr-foobar joined #perl6
20:22 * raydiak is now thinking about writing a blog post at some point about how much faster rakudo has gotten since I started, with pray as a benchmark against a few historical versions and latest jitted moar
20:22 xfix Hm, so we have lots of solutions on Rosetta Code and codegolf.se.
20:22 xfix Nice.
20:23 Celelibi joined #perl6
20:24 TimToady though, actually, Perl 6 is a bit anti-golf in its design
20:26 * raydiak guesses the ultimate golfing language kinda *has* to look like human-unfriendly line noise
20:31 raydiak ew can't bootstrap panda on jvm...trying to compile json::tiny gives "java.lang.IllegalThreadStateException: process hasn't exited"
20:33 * raydiak is trying 1 more time before reporting
20:34 raydiak impressive...this time I got the same error but on File::Find
20:35 raydiak is anyone really using jvm any more?  we still smoke it, right?
20:35 TimToady for a while there it was a lifeline for the OSx fokes
20:37 bartolin raydiak: yes, there are daily spectest runs for jvm (at least by [Coke]++ and me)
20:37 El_Che is this the latest info to setup a p6 smoke test setup? https://perl6advent.wordpress.com/2014/12/21/day-21-community-smoke-testing/
20:37 * lizmat is back from dinner which accidentally had too much sauce of 357K on the Scoville scale
20:37 yoleaux 17:14Z <nine> lizmat: maybe having a look at Inline::Perl5's t/precomp.t would be a good idea. It's very simple, but maybe it's just doing something wrong. Or maybe it can at least give you a hint why your commit doesn't work.
20:37 yoleaux 17:18Z <nine> lizmat: precomp.t assigns to %*ENV<PERL6LIB> _after_ loading Inline::Perl5. Maybe that's messing up precomp?
20:37 El_Che I would like to try to set something up on solaris
20:39 bartolin El_Che: I just started a daily panda smoke the day before yesterday. basically I do 'PANDA_SUBMIT_TESTREPORTS=1 panda smoke' (as described in the advent post)
20:40 El_Che bartolin: I'll start with that. Solaris is not that exotic, but it may be interesting running stuff there next to the Linux
20:40 El_Che (I am living in future! It used to be the other way around :) )
20:41 bartolin El_Che: cool. my tests run on freebsd, btw
20:41 Mso150_w joined #perl6
20:42 El_Che bartolin++
20:42 bartolin ++El_Che :D
20:43 TimToady lizmat: about ⅓ of my sauces are hotter than that, but yeah, one doesn't use quite as much in that case
20:43 El_Che although I no longer use Solaris on my new job, I still have access to Solaris hardware through OpenCSW community project (we pkg FOSS for Solaris)
20:43 lizmat TimToady: it was too hot for us, and as a precaution I drank 1l of milk after that
20:44 * lizmat is feeling a bit better now
20:44 lizmat it was overdosed by a factor of 10 or so
20:45 bartolin El_Che: in case you're interested: here are the scripts I use for my daily runs: https://github.com/usev6/perl6-roast-data/tree/master/bin
20:46 dalek rakudo/newio: 6e35d1d | lizmat++ | src/core/CompUnitRepo.pm:
20:46 dalek rakudo/newio: Don't bind the lock
20:46 dalek rakudo/newio:
20:46 dalek rakudo/newio: This does not fix the precomp problem for me, but it was the *only* occurrence
20:46 dalek rakudo/newio: of binding the lock in the settings, so I thought it'd be best to be at least
20:46 dalek rakudo/newio: consistent.
20:46 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/6e35d1d2b2
20:46 dalek rakudo/newio: 8587c4e | moritz++ | docs/running.pod:
20:46 dalek rakudo/newio: Update manpage, pmurias++
20:46 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/8587c4ef61
20:46 dalek rakudo/newio: 43b724e | lizmat++ | src/core/CompUnit.pm:
20:46 bartolin El_Che: they're based on [Coke]++'s stuff. if you only want to smoke panda you could leave the spectests out.
20:46 dalek rakudo/newio: Revert "Allow specification of @*INC in CompUnit.precomp"
20:46 dalek rakudo/newio:
20:46 dalek rakudo/newio: Alas, this breaks Inline::Perl5, so reverted until further notice.
20:46 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/43b724e210
20:46 dalek rakudo/newio: 89a90bf | lizmat++ | / (3 files):
20:46 dalek rakudo/newio: Merge branch 'nom' into newio
20:46 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/89a90bf5cd
20:46 dalek rakudo/newio: bbbcc36 | lizmat++ | src/core/CompUnit.pm:
20:46 dalek rakudo/newio: Implement allowing of setting :INC again
20:46 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/bbbcc36f71
20:50 El_Che bartolin: I "watched" the repo. Thx
20:52 bartolin El_Che: you're welcome. (though in that repo is mostly noise through the daily spectest commits.)
20:55 El_Che I saw on twitter that RubySpec has thrown the towel.
20:57 raydiak result, after hackign around not being able to build panda: r-m runs the most basic Pray example scene about 50% faster than r-j
20:59 FROGGS__ El_Che: that explains it: http://rubini.us/2014/12/31/matz-s-ruby-developers-don-t-use-rubyspec/
21:00 El_Che FROGGS__: "Ruby Is What Ruby Does" ;)
21:03 moritz after merging psch++'s rakudo-jvm-interop branch, I got test failures in t/spec/S10-packages/precompilation.rakudo.jvm
21:03 moritz does that fail before too?
21:03 lizmat moritz: I think that fails everywhere at the moment
21:03 moritz lizmat: ok, thanks
21:03 lizmat let me double check
21:03 adu joined #perl6
21:03 moritz (tests 3-6 and 15-16 fail here)
21:04 lizmat yeah, that looks familiar  (and on moar, I assume)
21:04 bartolin moritz: it didn't fail in my daily spectest last night.
21:04 lizmat if you try running the .rakudo.moar test file directly, you probably see something about ReentrantMutex
21:04 moritz bartolin: yes, but lizmat++ reverted some precomp-related test today
21:05 bartolin moritz: ok, just wanted to give another data point ;-)
21:06 moritz on the JVM, I get Could not find Example::C in any of: /home/moritz/p6/rakudo, /home/moritz/p6/rakudo/blib, /home/moritz/p6/rakudo/install/languages/nqp/lib
21:06 moritz (for example)
21:07 lizmat ah, I think why that is
21:07 masak RubySpec has thrown in the towel? that's sad.
21:07 masak I mean, that's saddening.
21:07 rurban joined #perl6
21:07 dalek roast: 700e0a5 | lizmat++ | S10-packages/precompilation.t:
21:08 dalek roast: Revert "Should work with just @*INC"
21:08 dalek roast:
21:08 dalek roast: This reverts commit 9b2d779d6ed66d0ef5974ba5e41a88bde19f4906.
21:08 dalek roast: review: https://github.com/perl6/roast/commit/700e0a5a6e
21:08 lizmat moritz: could you try again?
21:09 masak TimToady or someone: s/appr<(ao)>ch/oa/ at http://rosettacode.org/wiki/Solve_a_Hidato_puzzle#Perl_6
21:09 Mso150_w_j joined #perl6
21:10 b2gills joined #perl6
21:10 moritz lizmat: trying...
21:12 Sqirrel joined #perl6
21:12 moritz looks better (but it's sloooow ...)
21:16 lizmat well, shelling out is extra slow on the JVM, I guess
21:17 FROGGS__ ...and when that involves spawning a perl6-j it takes about 5gig RAM on my box, and will fail in case my firefox is running...
21:17 FROGGS__ (I only have 8gig of RAM)
21:18 moritz FROGGS__: which is why I ran the tests on hack.p6c.org :-)
21:19 FROGGS__ :o)
21:19 TimToady masak: thanks
21:19 dalek nqp/parrot-rpa: 0ff1898 | lizmat++ | tools/build/MOAR_REVISION:
21:19 dalek nqp/parrot-rpa: Bump MOAR_REVISION to release 2014.12
21:19 dalek nqp/parrot-rpa: review: https://github.com/perl6/nqp/commit/0ff1898080
21:19 dalek nqp/parrot-rpa: 10198a0 | lizmat++ | VERSION:
21:19 dalek nqp/parrot-rpa: bump VERSION to 2014.12
21:19 dalek nqp/parrot-rpa: review: https://github.com/perl6/nqp/commit/10198a0a0c
21:19 dalek nqp/parrot-rpa: cd8f6b2 | lizmat++ | README.pod:
21:19 dalek nqp/parrot-rpa: Add my fix to building on OS X
21:19 dalek nqp/parrot-rpa:
21:19 dalek nqp/parrot-rpa: In the hope it will be helpful.  I don't see another fix yet.  And I'm
21:19 dalek nqp/parrot-rpa: apparently the only person suffering from this (so far)
21:19 dalek nqp/parrot-rpa: review: https://github.com/perl6/nqp/commit/cd8f6b2cba
21:19 dalek nqp/parrot-rpa: b4752c8 | moritz++ | docs/release_guide.pod:
21:19 dalek nqp/parrot-rpa: release guide: update the list of known uploaders
21:19 dalek nqp/parrot-rpa: review: https://github.com/perl6/nqp/commit/b4752c8fb9
21:19 dalek nqp/parrot-rpa: 7b881b2 | moritz++ | docs/release_guide.pod:
21:19 dalek nqp/parrot-rpa: Oops, no need to list FROGGS twice
21:19 dalek nqp/parrot-rpa: review: https://github.com/perl6/nqp/commit/7b881b2b90
21:19 dalek nqp/parrot-rpa: c9147fd | rurban++ | src/vm/parrot/ops/nqp_dyncall.ops:
21:19 dalek nqp/parrot-rpa: nqp_dyncall.ops: fix one more compiler warning
21:19 dalek nqp/parrot-rpa:
21:19 dalek nqp/parrot-rpa: warning: passing argument 2 of ‘dcbNewCallback’ from incompatible pointer type
21:19 dalek nqp/parrot-rpa: Note: this uses a register for the userdata, which is needed to work on the stack
21:19 dalek nqp/parrot-rpa: var anyway, the same code is generated.
21:19 dalek nqp/parrot-rpa: review: https://github.com/perl6/nqp/commit/c9147fd137
21:19 lizmat ah, branches  :-)
21:19 FROGGS__ sheesh, that's not translated within five minutes: http://cpansearch.perl.org/src/MIYAGAWA/IDNA-Punycode-0.02/lib/IDNA/Punycode.pm
21:20 * FROGGS__ .oO( ahh, branes! )
21:21 moritz FROGGS__: I've looked at punycode before, thought "should I implement that for Perl 6?" and then decided to let somebody else do it :-)
21:21 FROGGS__ moritz: well, I've waited about ten months now... but nobody did it :o)
21:22 dalek nqp/parrot-rpa: 24a3c2a | rurban++ | / (7 files):
21:22 dalek nqp/parrot-rpa: Replace unneeded QRPA with ResizablePMCArray
21:22 dalek nqp/parrot-rpa: review: https://github.com/perl6/nqp/commit/24a3c2a7f4
21:22 dalek nqp/parrot-rpa: 0b15ee9 | rurban++ | tools/build/Makefile-Parrot.in:
21:22 dalek nqp/parrot-rpa: Makefile-Parrot: simplify ops2c rule, no chdir needed
21:22 FROGGS__ ohh, now I understand this:
21:22 FROGGS__ while ($h < @input) {
21:22 FROGGS__ my $m = min(grep { $_ >= $n } map ord, @input);
21:22 dalek joined #perl6
21:24 FROGGS__ should translate to:
21:24 FROGGS__ while $h < @input.elems {
21:24 FROGGS__ my $m = @input.ords.grep(* >= $n).min;
21:25 moritz not quite
21:25 moritz @input>>.ord
21:25 moritz @input.ords would stringify @input, and then do .ords on that string
21:26 moritz and thus insert lots of unwanted spaces
21:26 FROGGS__ ohh
21:26 FROGGS__ thanls
21:26 FROGGS__ thanks
21:27 FROGGS__ well, I can use $input, the string... I don't need to create an array of its chars anyway...
21:28 bartolin m: my %h; %h<a>=1; %h<a>:delete(0); say %h
21:28 camelia rakudo-moar 80b912: OUTPUT«"a" => 1␤»
21:28 bartolin m: my %h; %h<a>=1; say %h<a>:p(0)
21:28 camelia rakudo-moar 80b912: OUTPUT«"a" => 1␤»
21:28 bartolin lizmat: I saw that you worked on hash stuff last year. I looked at RT #117935 and saw that using :delete(0) works now. but :p(0) doesn't work, yet.
21:28 synopsebot Link: https://rt.perl.org/rt3//Public/Bug/Display.html?id=117935
21:29 bartolin lizmat: I tried to modify src/core/Any.pm to make the basic example above work. Could you have a look at the following gist and comment whether those changes make sense to you: https://gist.github.com/usev6/3c5d27e558160c152358
21:29 bartolin lizmat: (though with my changes I get two spectest failures in S32-array/delete-adverb.t and S32-array/delete-adverb-native.t, but those tests look kinde of questionable to me:)
21:29 bartolin m: my @a is default(42); say @a[0]:!p   ## why not ""?
21:29 camelia rakudo-moar 80b912: OUTPUT«0 => 42␤»
21:31 lizmat bartolin: looks sane at first sight
21:32 bartolin lizmat: thanks for looking! than I'll dig a bit deeper and try to make it work not only for this basic case.
21:32 lizmat hmmm....
21:42 lizmat bartolin: I just commented on your gist
21:42 lizmat I think the other cases need closer scrutiny as well
21:43 lizmat bartolin++ for picking this up
21:44 bartolin lizmat: okay, now I've an idea how to proceed. lizmat++  # various reasons :)
21:46 bartolin lizmat: one last question regarding the last example above: the output "0 => 42" seems wrong, doesn't it?
21:46 lizmat bartolin: I think the tests are indeed bogus
21:47 bartolin lizmat: okay, maybe I'll start there ;-)
21:48 bartolin g'night, #perl6
21:49 lizmat gnight bartolin++
21:53 FROGGS__ moritz: encode_punycode already works
21:57 psch seems to me jvm rakudo doesn't wait on IO::Handle.close, in contrast to moar, which explains raydiak++'s panda bug
21:58 psch reproduceable with 'my $h = pipe("sleep 10", :r); $h.close.status.say'
21:58 psch takes ~10 seconds on moar, dies on jvm
22:08 moritz psch++ # JVM work
22:09 ugexe yeah the jvm handle close on jvm has been around for months
22:10 ugexe ./on jvm/on pipe/
22:11 psch well if blocking is fine i have a patch
22:21 anaeem___ joined #perl6
22:24 denis_boyun_ joined #perl6
22:25 * masak feels a little bad when writing @array[$from..*] instead of @array[$from..*-1], but doesn't really know why
22:27 masak what's the idiomatic way to die without a stacktrace, again? I forget.
22:27 lizmat exit ?
22:27 masak define your own subroutine that does a `warn` and then `exit`?
22:28 * masak names is "conk" :)
22:28 masak it*
22:28 lizmat at $work, I had something similar (for tests) called "urgh"
22:29 masak :)
22:29 masak "urgh" is fine for its connotations, but not verb-y enough for me.
22:29 masak bleh, even `warn` prints line-and-file these days.
22:30 masak fine, $*ERR.say it is.
22:32 psch $*ERR.say is note
22:32 masak oh, right.
22:32 masak that's what I wanted.
22:32 masak psch++
22:32 lizmat m: note
22:32 camelia rakudo-moar 80b912: OUTPUT«Noted␤»
22:32 lizmat :-)
22:33 masak m: note xx 13
22:33 camelia rakudo-moar 80b912: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/L4f3gp_9Ztâ�¤Undeclared routine:â�¤    xx used at line 1â�¤â�¤Â»
22:33 masak m: note() xx 13
22:33 camelia rakudo-moar 80b912: OUTPUT«Noted␤Noted␤Noted␤Noted␤Noted␤Noted␤Noted␤Noted␤Noted␤Noted␤Noted␤Noted␤Noted␤»
22:52 dalek specs/newio: 715ca5c | lizmat++ | S16-io.pod:
22:52 dalek specs/newio: Initial batch of reworked S16 for newio branch
22:52 dalek specs/newio: review: https://github.com/perl6/specs/commit/715ca5c5a8
22:53 lizmat ^^^^  didn't make it to a advent blog post, so I thought about forking the spec for this
22:53 andreoss joined #perl6
22:54 andreoss is if statement inside given block intended to make it falling through?
22:55 andreoss if it's so. 'if * > 0' doesn't work, while 'when * > 0' does
23:00 Ven lizmat: sorry for advent post robbery :P
23:00 lizmat Ven: no robbery took place, I wasn't ready  :-)
23:01 psch andreoss: <given "something"> sets $_ = "something" for the following block.  <when> is special and takes * to mean $_, if doesn't
23:02 psch m: given 6 { if $_ > 4 { say "$_ is greater than 4" }; when 6 { say "it's 6!" } }
23:02 camelia rakudo-moar 80b912: OUTPUT«6 is greater than 4␤it's 6!␤»
23:02 * lizmat gets some shuteye
23:02 andreoss psch: as i thought, * is special for when, but not for if.
23:03 psch andreoss: arguably * is less special for when than for everything else :)
23:04 andreoss what's the proper name of *?
23:04 psch m: *.WHAT.say
23:04 camelia rakudo-moar 80b912: OUTPUT«(Whatever)␤»
23:05 andreoss m: $_.WHAT.say
23:05 camelia rakudo-moar 80b912: OUTPUT«Nil␤»
23:08 raiph joined #perl6
23:09 kjs_ joined #perl6
23:09 raiph andreoss: i think the fall thru effect is because you used when; the * is irrelevant
23:10 psch m: given 6 { when * > 4 { say "$_ is greater than 4" }; when 6 { say "it's 6!" } }
23:10 camelia rakudo-moar 80b912: OUTPUT«6 is greater than 4␤»
23:12 andreoss raiph: i meant * isn't working with if statement within given block.
23:15 andreoss it'd be good for refactoring purposes, if replacing all 'when's with 'if's in my code will be enough in that case
23:15 psch but if and when don't mean the same thing in a given
23:16 psch consider 'if 6 { }' vs 'when 6 { }'
23:16 psch the former is always true, while the latter is true only for 'given 6 { ... }' (and statements that evaluate to 6)
23:17 raiph also, when is spec'd to break out of the when block; if isn't
23:17 psch or actually and $_ = 6
23:17 psch s/and/any/
23:17 psch m: for 1..10 { when 6 { say "when 6" }; if 6 { say "if 6" } }
23:17 camelia rakudo-moar 80b912: OUTPUT«if 6␤if 6␤if 6␤if 6␤if 6␤when 6␤if 6␤if 6␤if 6␤if 6␤»
23:19 psch what raiph++ said is another good point
23:19 raiph m: given 6 { when 6 { say "when" }; if 6 { say "if" } } # when breaks out of the when block
23:19 camelia rakudo-moar 80b912: OUTPUT«when␤»
23:19 raiph m: given 6 { if 6 { say "if" }; when 6 { say "when" }; } # if doesn't
23:19 camelia rakudo-moar 80b912: OUTPUT«if␤when␤»
23:20 andreoss psch: what should i use for correct falling-through in a given block?
23:21 andreoss perl5 had a special option for Switch for this
23:21 psch you can use if for that, but note that you have to explicitly compare to $_, instead of getting smartmatch against $_ for free as with given
23:21 raiph m: given 6 { when 6 { say "when"; continue }; if 6 { say "if" } } # when breaks out of the when block ... unless told not to?
23:21 camelia rakudo-moar 80b912: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/30O8OrZNEMâ�¤Undeclared routine:â�¤    continue used at line 1â�¤â�¤Â»
23:22 psch m: given 5 { if $_ > 2 { say "greater 2" }; if $_ > 4 { say "greater 4" } } # this is possible, but more explicit than given
23:22 camelia rakudo-moar 80b912: OUTPUT«greater 2␤greater 4␤»
23:22 psch or maybe even verbose
23:23 andreoss psch: that's nothing new, but whole point of given block is missing
23:24 andreoss i want 'given ... is fall-though { ... }'
23:24 raiph m: given 6 { when 6 { say "when"; proceed }; if 6 { say "if" } } # when breaks out of the when block ... unless told to proceed
23:24 camelia rakudo-moar 80b912: OUTPUT«when␤if␤»
23:24 psch oh
23:24 psch yeah
23:25 psch i just found that in specs as well :)
23:25 psch raiph++
23:25 18VABTXR8 joined #perl6
23:26 psch S04:1000
23:26 synopsebot Link: http://perlcabal.org/syn/S04.html#line_1000
23:26 psch andreoss: it's documented around there ^^^
23:26 timotimo we don't do very clever stuff with given/when yet in the optimizer ...
23:28 sirdancealot joined #perl6
23:28 andreoss psch: thanks.
23:39 virtualsue joined #perl6

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

Perl 6 | Reference Documentation | Rakudo