Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-03-12

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:02 johndau joined #perl6
00:02 cdg joined #perl6
00:15 TreyHarr2 joined #perl6
00:28 telex joined #perl6
00:29 timotimo i should head to bed
00:30 cpage_ joined #perl6
00:45 perlpilot_ joined #perl6
00:48 Sgeo joined #perl6
00:53 cajone left #perl6
00:56 wamba joined #perl6
01:34 silug joined #perl6
01:36 dalek rakudo-star-daily: b11617e | coke++ | log/ (9 files):
01:36 dalek rakudo-star-daily: today (automated commit)
01:36 dalek rakudo-star-daily: review: https://github.com/coke/rakudo-star-daily/commit/b11617ef7a
01:55 Herby_ joined #perl6
01:55 Herby_ Evening, everyone!
01:56 Herby_ \o
02:01 Herby_ o/
02:11 kalkin-__ joined #perl6
02:18 kalkin- joined #perl6
02:38 grondilu I was kind of hoping that ($a..$b).max was $b even if $a < $b.  Turns out it's the case.  Not sure if it will always be.
02:38 grondilu m: say (2..1).max;
02:38 camelia rakudo-moar 845a95: OUTPUT«1␤»
02:39 grondilu that matches the semantics of what I was trying to do, but I'm not sure I can rely on it.
02:39 Sqirrel joined #perl6
02:41 grondilu FYI I was coding a range of altitude values taken by my KSP spaceship during a descent.  For instance 1000..100 meant a fall from 1000m to 100m.  I meant max not as in "max value" but as "last value".
02:41 grondilu sorry I meant $a > $b earlier.
02:47 TEttinger perlbal space program
02:51 Herby_ ksp a pretty fun game?
02:51 molaf_ joined #perl6
02:54 grondilu I've discovered the KOS addon lately and I've been obsessed
02:54 grondilu with writing a script to land in a single burn at full throttle.
02:55 grondilu I'm making a draft in Perl 6.
02:56 vendethiel joined #perl6
02:57 Herby_ hmmm
02:57 Herby_ i'll have to check that out
02:59 grondilu if you're curious here's what I got so far:  https://gist.github.com/grondilu/011df8d34834a804ba18
03:04 jameslenz joined #perl6
03:05 grondilu although frankly I had already written a draft in kerboscript but launching KSP to test and debug it was quite a hassle so I translated into something equivalent in Perl 6 to do the tests.
03:23 SCHAAP137 joined #perl6
03:35 kaare_ joined #perl6
03:36 allbery joined #perl6
03:37 geekosaur joined #perl6
03:41 noganex_ joined #perl6
04:02 ggoebel16 joined #perl6
04:05 johndau` joined #perl6
04:10 BenGoldberg joined #perl6
04:12 johndau joined #perl6
05:14 keix joined #perl6
05:21 agent008 joined #perl6
05:24 keix joined #perl6
05:49 geekosaur joined #perl6
05:51 geekosaur joined #perl6
05:53 Cabanossi joined #perl6
06:42 buharin joined #perl6
06:42 timotimo o/
06:43 CIAvash joined #perl6
06:43 timotimo m: say (2...1).max
06:43 camelia rakudo-moar 845a95: OUTPUT«2␤»
06:43 timotimo m: say (1...2).max
06:43 camelia rakudo-moar 845a95: OUTPUT«2␤»
06:43 timotimo grondilu: ^ ... does what you want
07:13 perlawhirl joined #perl6
07:25 sena_kun joined #perl6
07:25 sena_kun left #perl6
07:26 bpmedley joined #perl6
07:39 domidumont joined #perl6
07:41 stmuk_ joined #perl6
07:44 domidumont joined #perl6
07:46 stmuk joined #perl6
07:47 agent008 joined #perl6
07:51 stmuk joined #perl6
07:56 FROGGS[mobile] joined #perl6
07:57 FROGGS[mobile] o/
07:57 timotimo ho-hum. it's already 9am, and i still have those 2.5h of driving in front of me
07:58 vendethiel joined #perl6
08:00 FROGGS[mobile] uhh
08:01 FROGGS[mobile] are you still comming?
08:01 timotimo yeah
08:01 timotimo is that bad?
08:01 FROGGS[mobile] hehe, no :o)
08:04 FROGGS[mobile] but better hurry up :o)
08:05 timotimo i intend to
08:10 sno joined #perl6
08:12 darutoko joined #perl6
08:20 agent008 joined #perl6
08:24 FROGGS[mobile] okay, I think I am a little bit early at the hackathon
08:25 FROGGS[mobile] moritz: you are not there yet, right?
08:33 stmuk_ joined #perl6
08:35 buharin joined #perl6
08:38 FROGGS joined #perl6
08:45 timotimo starts at 10 officially
08:45 timotimo in the car now
08:49 nadim morning, what's the adverb to return a result from a regex substitution rather than doing the substitution in place?
08:50 firstdayonthejob joined #perl6
08:52 rindolf joined #perl6
08:54 Timbus nadim, can't use $str.subst ?
08:56 nadim I can! I just confused subst with in-place subst. thank you
08:57 pdcawley joined #perl6
08:58 nadim although I'd prefer an adverb to s/// to do the same thing
09:02 jack_rabbit joined #perl6
09:02 moritz \o from the Hackathon at GPW2016
09:02 lizmat moritz o/
09:03 * lizmat is looking forward to seeing a lot of commits when she's online again
09:03 lizmat happy hacking!
09:03 lizmat commute&
09:03 jjido joined #perl6
09:04 maybekoo2 joined #perl6
09:05 FROGGS joined #perl6
09:06 cyberviking joined #perl6
09:13 moritz m: my %h = 'foo' => [1,2,3], 'bar' => [4,5,6]; say %h{*}».[1]
09:13 camelia rakudo-moar 845a95: OUTPUT«(5 2)␤»
09:13 moritz m: my %h = 'foo' => [1,2,3], 'bar' => [4,5,6]; say %h{*}»[1]
09:13 camelia rakudo-moar 845a95: OUTPUT«(5 2)␤»
09:13 moritz that's RT#64768
09:18 labster joined #perl6
09:21 dalek roast: 5c4dafa | moritz++ | S32-hash/slice.t:
09:21 dalek roast: RT #64768: Tests
09:21 dalek roast:
09:21 dalek roast: Whatever-Slicing plus hyperop array indexing
09:21 dalek roast: review: https://github.com/perl6/roast/commit/5c4dafa3ab
09:29 labster joined #perl6
09:31 FROGGS joined #perl6
09:33 klapperl_ joined #perl6
09:39 Actualeyes joined #perl6
09:41 Mouq joined #perl6
09:44 pdcawley joined #perl6
09:53 timotimo I'm about half way to the city, will take a little break from driving though
09:55 cyberviking joined #perl6
09:56 tadzik don't irc and drive! :P
09:57 nadim tadzik++
09:58 mst otherwise you might get into a bash.org
09:58 tadzik hah
10:06 mst best line from a debugging article ever: "Up to this point, I am on the right track. That will not last long."
10:06 mst https://ianthehenry.com/2016/3/9/lazy-io/
10:13 moritz lol
10:16 arnsholt I quite liked "If you have any significant Haskell experience, the answer is probably obvious. Stay with me! It’s going to get a lot worse before it gets any better." as well
10:17 RabidGravy joined #perl6
10:23 abaugher joined #perl6
10:23 dalek doc: a0fd237 | paultcochrane++ | doc/Language/testing.pod:
10:23 dalek doc: Document the does-ok() test function
10:23 dalek doc: review: https://github.com/perl6/doc/commit/a0fd237080
10:24 FROGGS hmmm, can I create a new subroutine from a given Signature object?
10:27 RabidGravy I don't think so, but I've wanted that several times
10:28 nine You people have weird needs
10:28 llfourn you need to call stuff on $*W but you can do it :P
10:29 llfourn $*W.create_code_object($qast,'Sub',nqp::decont($sig)); # I have some code like this
10:30 FROGGS ohh, but this is QAST :/
10:30 llfourn yeah you need to write QAST =(
10:32 llfourn I've been in situations where you want to specify a signature for some code but in the body all you want to do is take a capture and pass it on somewhere
10:32 llfourn so it would be nice to take a singuture and code block and merge them
10:34 FROGGS m: use nqp; my &r = nqp::create(Routine); nqp::bindattr(nqp::decont(&r), Code, '$!signature', :(--> int32)); say &r.signature
10:34 camelia rakudo-moar 845a95: OUTPUT«( --> int32)␤»
10:34 FROGGS I think that's good enough for me
10:34 RabidGravy yeah, I think I wanted it to be able to create a multi based on some configuration for "dispatch purposes"
10:35 moritz but how do you write a code block that references parameters without having the parameters?
10:35 llfourn moritz: you have a magic capture variable
10:35 FROGGS I just need something for NativeCall, so the routine does not even have to have a code object
10:35 moritz FROGGS: makes sense in your use case
10:35 moritz and I guess all the other crazy use cases that need it also make sense on some level :-)
10:35 FROGGS hehe
10:37 huf joined #perl6
10:38 spider-mario joined #perl6
10:38 kalkin- I have a grammar, which hangs up rakudo: https://gist.github.com/kalkin/f0a64ff21cfbf7310d3d
10:39 kalkin- the part which hangsup is line 8 the asterisk (*) neojdomg [<element>]
10:39 kalkin- s/neojdomg/behind
10:41 kalkin- Or am I doing something wrong?
10:41 jjido joined #perl6
10:41 moritz kalkin-: you shouldn't quantify something with * or + that might match zero characters
10:42 kalkin- 1) I always thought * is zero or more.
10:42 kalkin- 2) + means 1 or more?
10:43 kalkin- moritz: Did I misunderstood you?
10:43 RabidGravy no, that's right
10:43 labster joined #perl6
10:44 llfourn kalkin-: I think what he's saying is like doing <token>* where token can match 0 characters means that it will be an infinite loop
10:44 RabidGravy but if you quantify as "zero or more" something that itself may match zero items then bad happens
10:44 moritz kalkin-: but <element> can match zero characters
10:45 moritz kalkin-: so it does, and then it tries, at the same position, to match again
10:45 kalkin- moritz: Ahh I think I understand now. I must fix the rule element
10:45 moritz kalkin-: and it matches zero characters again
10:45 moritz kalkin-: correct
10:46 kalkin- Thank you for the hint moritz & RabidGravy
10:47 moritz kalkin-: you're very welcome
10:47 RabidGravy it's all good fun
10:50 dalek rakudo/nom: 3a050fb | moritz++ | src/core/Buf.pm:
10:50 dalek rakudo/nom: #127642: Fix blob eqv Blob
10:50 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/3a050fb7ec
10:54 dalek roast: 524d930 | moritz++ | S03-operators/buf.t:
10:54 dalek roast: RT#127642: Fix for Blob eqv Blob
10:54 dalek roast: review: https://github.com/perl6/roast/commit/524d930d8a
10:57 timotimo what button do i press to ring the right doorbell?
10:57 timotimo noris network?
10:58 moritz timotimo: you're at the wrong entry
10:58 timotimo oh, ok
10:58 timotimo which way to the right one?
10:58 moritz timotimo: you should go to the left entry
10:58 timotimo left on the inside?
10:59 moritz wait a sec, I'm coming out
11:06 timotimo i has a seat \o/
11:10 maybekoo2 joined #perl6
11:32 timotimo it's annoying that we can get NaN values in the profiler :\
11:34 azawawi joined #perl6
11:34 azawawi hi
11:34 timotimo hello azawawi!
11:34 azawawi Got the following error message "Type check failed in assignment to $archive; expected NativeCall::Types::Pointer[LibZip::NativeCall::zip] but got NativeCall::Types::Po..."
11:34 azawawi why are we truncating error messages?
11:34 timotimo huh?
11:34 timotimo i wonder what is responsible for cutting that off
11:34 timotimo i'm not aware that's happening anywhere
11:35 moritz azawawi: from plain rakudo?
11:35 azawawi at first i thought it was atom that was truncating output and then i checked command line
11:35 azawawi 2016.02
11:36 timotimo huh!
11:37 timotimo huh, indeed
11:37 timotimo X::TypeCheck does that
11:38 dalek rakudo/nom: 5221023 | FROGGS++ | / (2 files):
11:38 dalek rakudo/nom: let nativecast take signatures instead of routine targets
11:38 dalek rakudo/nom:
11:38 dalek rakudo/nom: timotimo++
11:38 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/52210231f3
11:38 timotimo https://github.com/rakudo/rakudo/blob/nom/src/core/Exception.pm#L1827
11:39 sjn_phone joined #perl6
11:39 jolts joined #perl6
11:39 moritz ah, that's because it's .perl output, and that can be, like, very long
11:39 moritz several pages long, in fact
11:40 dalek doc: 92d34a1 | FROGGS++ | doc/Language/nativecall.pod:
11:40 dalek doc: state that nativecast will take signatures now
11:40 dalek doc: review: https://github.com/perl6/doc/commit/92d34a1ea0
11:40 sjn_phone moritz: hey, I'm downstairs and the doorbell doesn't seem to work
11:40 azawawi so i caught a semi-bug
11:40 azawawi :)
11:40 azawawi while being annoyed
11:40 moritz sjn_phone: you probably took the left entry; please use the right one instead
11:40 jolts joined #perl6
11:40 azawawi so what do i get the got ... part :)
11:41 moritz sjn_phone: or simply walk through to the data center; I'm coming out
11:42 mst moritz: /alias entry say $0: you probably took the left entry; please use the right one instead
11:42 mst moritz: /entry sjn_phone
11:42 mst since you've already had to say that twice, clearly it deserves an irssi alias
11:42 timotimo i'm surprised that was wrong. i went to the left, but not left enough
11:43 timotimo so if sjn went too far to the left ... :|
11:43 mst /alias entry say $0: YOU WENT TOO FAR TO THE LEEEEEEFT
11:45 moritz I already put a sign on the right entry pointing to the left one
11:45 moritz and I wasn't allowed to take and publish photos of the entries, for "security" reasons
11:46 mst LOL
11:46 mst what about a three quarters perspective sketch done in pencil?
11:46 mst makes it easier to eat if you're worried they're going to take you alive
11:47 * sjn is slowly turning right
11:48 timotimo :)
11:48 sjn why not just call it "the wrong entry" since the other one obviously is the right one?
11:49 timotimo what do i hack on now? :S
11:52 azawawi Expected: NativeCall::Types::Pointer[LibZip::NativeCall::zip], Got: NativeCall::Types::Pointer[LibZip::NativeCall::zip].new(55436656)   # huh?
11:53 azawawi Shouldnt be the same?
11:53 azawawi Shouldnt they be the same?
11:54 timotimo can you inspect the $expected.^of (or what it's called) and the $got.^of?
11:55 timotimo it's just .of
11:55 timotimo and see if they =:= or eqv or whatever?
11:55 azawawi https://github.com/azawawi/perl6-libzip/blob/master/examples/02-create-zip-archive.pl6#L17
11:55 arnsholt Parametric types are a bit special. IIRC there's some extra legwork that needs to be done to get that to work properly, and it might be that NativeCall doesn't do it
11:56 RabidGravy azawawi, yeah, I took a lot of those out, it did work somewhat at some point before Christmas then stopped working again
11:56 timotimo ho-hum
11:57 azawawi :)
11:57 azawawi so basically forget about error checking
11:57 azawawi when nativecall types are involved
11:58 agent008 joined #perl6
11:58 RabidGravy it works in some places, I think parameter type constraints is one place it doesn't
11:58 azawawi now here is the fun thing
11:58 timotimo i wonder if we ought to use parametric 6model extensions thingies
11:58 azawawi https://github.com/azawawi/perl6-libzip/blob/master/examples/01-create-zip-archive.pl6#L15  # working here
11:59 azawawi but failing in OO sugar https://github.com/azawawi/perl6-libzip/blob/master/lib/LibZip.pm6#L12
11:59 timotimo well, a Pointer is just as good as any Pointer[foo]
12:00 arnsholt timotimo: Yeah, that's the extra legwork that needs to be done
12:00 azawawi meanwhile could we increase this to a reasonable value https://github.com/rakudo/rakudo/blob/nom/src/core/Exception.pm#L1827
12:01 azawawi 24 character length is too short
12:01 timotimo up it to ~4kb :)
12:01 azawawi 24 is a magic value also :)
12:02 azawawi timotimo: why not 8k? :)
12:03 azawawi RabidGravy: current streak (aka steak) is 45 days :)
12:03 firstdayonthejob joined #perl6
12:03 RabidGravy I'm at 1
12:04 RabidGravy I've been working on a branch of a fork
12:04 azawawi i wanted to stop today but then i said to myself i need to break the 60 day barrier :)
12:05 RabidGravy but I did have a revelation when I was in the shower and we may be able to input audio data from jack after all
12:05 timotimo you are "at 1"?
12:06 azawawi RabidGravy: checkout this https://www.pjrc.com/store/teensy32.html :)
12:06 RabidGravy yeah they're good
12:06 RabidGravy funny firmware license though if you care about such things
12:07 RabidGravy timotimo, actually apparently "2" https://github.com/jonathanstowe
12:07 kalkin- say i have tokens A & B. My language grammar specifies that a valid word is a word consisting of a string of Bs, which might have up to one A on any position.
12:07 timotimo ah, streaks
12:07 timotimo i see
12:07 kalkin- how can i express it in a new token
12:07 * azawawi off to enjoy a Spring sunny walk. Have fun :)
12:07 moritz m: my \a = gather { for 1..3 { take $_; say a.cache.perl } }
12:07 camelia rakudo-moar 522102: ( no output )
12:07 timotimo kalkin-: you can match Bs until the end or an A followed only by Bs
12:07 moritz m: my \a = gather { for 1..3 { take $_; say a.cache.perl } }; 1 for a
12:07 camelia rakudo-moar 522102: OUTPUT«WARNINGS for /tmp/TlNpGFipsI:␤Useless use of constant integer 1 in sink context (use Nil instead to suppress this warning) (line 1)␤===SORRY!===␤This Seq has already been iterated, and its values consumed␤(you might solve this by adding .cache on u…»
12:08 moritz m: my \a = gather { for 1..3 { take $_; say a.cache.perl } }; say a.perl
12:08 camelia rakudo-moar 522102: OUTPUT«List_54742512␤List_54742512␤List_54742512␤(my \List_54742512 = (1, 2, 3)).Seq␤»
12:08 timotimo so it's like B+ A? B*
12:08 kalkin- no A could also be on the first position
12:08 timotimo OK, then it'd just be B* A? B*
12:09 kalkin- valid words: ABBB, BBA BBBAB, BBBA, BBB...
12:09 RabidGravy right off out to get vegetables
12:09 kalkin- timotimo: hmm it's simpler than i thought, thanks
12:09 cpage_ joined #perl6
12:10 kalkin- timotimo: no, it would be B*A*B*, but this also would match empty tokens
12:11 kalkin- [B*A*B*]{1,} ?
12:12 timotimo wait, i think i misunderstood your idea
12:12 perlawhirl joined #perl6
12:12 timotimo it's either only Bs or it begins with an A and then only Bs?
12:12 timotimo i thought you meant Bs until the end or until an A and then Bs until the end
12:13 kalkin- I'm trying to parse haml. In haml an html element might have one id (A) and as many classes as you like (B) which are concated in form like: #id.foo .foo#id.bar and so on
12:14 kalkin- i have to match .foo, #bar, #bar.foo, .buz#bar.foo, .buz.foo#bar and so on..
12:14 kalkin- and of course .foo.buz
12:15 AlexDaniel joined #perl6
12:16 timotimo ah
12:16 timotimo well, in that case it's like i described. any amount of classes is fine. any amount of classes followed by an id is fine. any amount of classes followed by an id and then any amount of classes is also fine
12:17 timotimo you can write it as an alteration of those cases if you like, or collapse two fo those together
12:18 kalkin- you mean like [B*A?B*] | B+ ?
12:18 kalkin- no more like [B*A?B*] | B+ | A
12:22 timotimo in the firstmost version you'll want to have A instead of A?
12:22 timotimo and then the last alternative is superfluous
12:23 kalkin- i got it
12:24 kalkin- my token css-id-combination { <css-class>* <id>+ <css-class>* | <id> | <css-class>+ }
12:24 timotimo no need for the one in the middle, and the + after <id> is wrong
12:25 kalkin- oh you are right
12:25 kalkin- timotimo: thank you
12:25 timotimo you're welcome :)
12:32 BenGoldberg joined #perl6
12:33 dalek doc: be1f0cc | (Siavash Askari Nasr)++ | doc/Language/testing.pod:
12:33 dalek doc: Add missing commas for can-ok
12:33 dalek doc: review: https://github.com/perl6/doc/commit/be1f0cca42
12:37 kid51 joined #perl6
12:40 SCHAAP137 joined #perl6
12:40 moritz m: grammar A { token TOP { <so> }; token so { 'foo' | 'bar' } }; say A.parse('foo')
12:40 camelia rakudo-moar 522102: OUTPUT«Too many positionals passed; expected 1 argument but got 2␤  in regex so at /tmp/xV8XBdhiFd line 1␤  in regex TOP at /tmp/xV8XBdhiFd line 1␤  in block <unit> at /tmp/xV8XBdhiFd line 1␤␤»
12:45 AlexDaniel m: my $x = ‘abc’; say S/b/z/ with $x; say $x
12:45 camelia rakudo-moar 522102: OUTPUT«azc␤abc␤»
12:45 AlexDaniel nadim: ↑
12:48 AlexDaniel perhaps it is time to make a list of underrated perl 6 features
12:50 timotimo :)
12:53 AlexDaniel m: say exp 2, 8
12:53 camelia rakudo-moar 522102: OUTPUT«64␤»
12:53 AlexDaniel m: say exp 2: 8 # ;)
12:53 camelia rakudo-moar 522102: OUTPUT«64␤»
12:56 moritz m: my $c; my $name; BEGIN { $c = { say "OH HAI $name" } }; $name = "masak"; $c()
12:56 camelia rakudo-moar 522102: OUTPUT«Use of uninitialized value $name of type Any in string context␤Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed.  in block  at /tmp/qxYfuY_Rl0 line 1␤OH HAI ␤»
13:12 Ben_Goldberg joined #perl6
13:20 moritz m: my uint8 $x = 255; print $x, " -> "; $x = $x + 1; say $x;
13:20 camelia rakudo-moar 522102: OUTPUT«255 -> 0␤»
13:21 moritz m: my uint8 $x = 255; print $x, " -> "; $x++; say $x;
13:21 camelia rakudo-moar 522102: OUTPUT«255 -> 256␤»
13:21 moritz (RT#127144)
13:24 pmurias joined #perl6
13:24 Juerd joined #perl6
13:25 Juerd joined #perl6
13:26 moritz http://www.users.globalnet.co.uk/~loxias/harry_potter.htm # for the hackathon participants
13:29 moritz m: say &die ~~ Callable
13:29 camelia rakudo-moar 522102: OUTPUT«True␤»
13:32 moritz m: say so 'xyzabcde' !~~ /[ ab | abc ]: de/
13:32 camelia rakudo-moar 522102: OUTPUT«False␤»
13:32 moritz m: say so 'xyzabcde' ~~ /[ ab | abc ]: de/
13:32 camelia rakudo-moar 522102: OUTPUT«True␤»
13:33 moritz this looks correct to me
13:33 moritz https://rt.perl.org/Ticket/Display.html?id=121307 complains about it
13:33 moritz m: say so 'xyzabcde' ~~ /[ ab || abc ]: de/
13:33 camelia rakudo-moar 522102: OUTPUT«True␤»
13:33 moritz dunno if that is correct though
13:34 aborazmeh joined #perl6
13:34 aborazmeh joined #perl6
13:38 moritz m: say uniname("\x[80]")
13:38 camelia rakudo-moar 522102: OUTPUT«␤»
13:40 RabidGravy joined #perl6
13:41 dalek rakudo/distribution: df9bf6b | FROGGS++ | src/ (4 files):
13:41 dalek rakudo/distribution: implement and expose $?DISTRIBUTION
13:41 dalek rakudo/distribution: review: https://github.com/rakudo/rakudo/commit/df9bf6b4e4
13:47 Ben_Goldberg joined #perl6
13:49 [Tux] test            22.221
13:49 [Tux] test-t          14.360
13:49 [Tux] csv-parser      51.160
13:49 [Tux] OOPS?
13:50 jnthn [Tux]: Hm, that's a good bit slower than yesterday?
13:53 musiKk_ joined #perl6
13:54 * jnthn wonders if it'd not be worth setting something up to run the thing that gets those numbers on every commit so we can easily figure out what caused such slowdowns :)
13:55 timotimo it's quite a bit slower :\
13:55 llfourn that would be pretty cool. Each commit on the X axis
13:56 llfourn (of the charts http://tux.nl/Talks/CSV6/speed4.html )
13:56 [Tux] all timing is available in the git repo
13:56 [Tux] I just run make tt
13:57 llfourn [Tux]: so you do it manually? are the charts done manually too?
13:57 [Tux] no, that is done semi-automatically
13:58 [Tux] the moment I run 'make tt' it writes the results into a log file after which the graphs are generated
13:58 llfourn ah ok. using the github API to subscribe to commits would be neat.
13:59 llfourn where would one put a server to collect build stats if one were so inclined?
14:00 llfourn I guess making it part of travis wouldn't work out because the performance of the machine may vary
14:01 jnthn If you want a machine-independent-er measure (but it'll be slow) then recording instructions retired using callgrind or something would be one way
14:01 jnthn Though it doesn't account for all slowdowns
14:04 llfourn having travis always report some callgrind stats to irc might be worth it. But might get spammy.
14:05 jnthn Yeah
14:06 llfourn wasn't moritz++ saying something about he has infinite VMs from work or something :)?
14:06 RabidGravy if the general trend is faster then finding what made that 25% slower might be a big win
14:07 moritz llfourn: not infinite, but elastic :-)
14:07 moritz llfourn: ... and only for the next half year
14:07 AlexDaniel moritz: that's good enough
14:08 llfourn moritz: ^ we need infinite and forever
14:11 llfourn I agree. What [Tux]++ is already doing is awesome. But having a bunch of speed tests that are auto-run for every moar,nqp,rakudo commmit would be pretty valuable. And a nice way to display them.
14:11 buharin joined #perl6
14:12 RabidGravy I really should do "nuke rakudo and test all my modules" more often, already found one unstated dependency
14:14 sena_kun joined #perl6
14:14 sena_kun left #perl6
14:17 Ben_Goldberg joined #perl6
14:21 moritz m: sub a($x is rw) { $x; }; { a 42 }()
14:21 camelia rakudo-moar 522102: OUTPUT«Parameter '$x' expected a writable container, but got Int value␤  in sub a at /tmp/vL_bQs_DZb line 1␤  in block <unit> at /tmp/vL_bQs_DZb line 1␤␤»
14:23 BenGoldberg m: sub a($x is raw) { $x; } { a 42 }()
14:23 camelia rakudo-moar 522102: OUTPUT«5===SORRY!5=== Error while compiling /tmp/nXFKZOCSsG␤Unexpected block in infix position (missing statement control word before the expression?)␤at /tmp/nXFKZOCSsG:1␤------> 3sub a($x is raw) { $x; }7⏏5 { a 42 }()␤    expecting any of:␤ …»
14:23 BenGoldberg m: sub a($x is raw) { $x; } { a 42 }
14:23 camelia rakudo-moar 522102: OUTPUT«5===SORRY!5=== Error while compiling /tmp/1kKgw30044␤Unexpected block in infix position (missing statement control word before the expression?)␤at /tmp/1kKgw30044:1␤------> 3sub a($x is raw) { $x; }7⏏5 { a 42 }␤    expecting any of:␤   …»
14:23 BenGoldberg m: sub a($x is raw) { $x; }; { a 42 }
14:23 camelia rakudo-moar 522102: ( no output )
14:23 BenGoldberg m: sub a($x is raw) { $x; }; { a 42 }()
14:23 camelia rakudo-moar 522102: ( no output )
14:23 rindolf Hi all. With latest rakudobrew, this self-contained program gives 594452426380733382 instead of 605857431263981935 (which is what perl 5 gives and is the correct solution ). This is Euler #288 - http://paste.debian.net/414557/
14:27 rindolf can anyone verify?
14:28 llfourn Solution == 594452426380733382 # :)
14:30 moritz rindolf: might be easier if you supplied the p5 version as well
14:30 BenGoldberg m: https://gist.github.com/BenGoldberg1/41fdc9880eaab9ea8847
14:30 camelia rakudo-moar 522102: OUTPUT«Solution == 594452426380733382␤»
14:31 rindolf moritz: see https://github.com/shlomif/project-euler/blob/master/project-euler/288/euler-288-v1.pl
14:34 moritz rindolf: Can't locate Euler288.pm in @INC
14:34 rindolf moritz: it's in the same directory.
14:35 rindolf moritz: wait a sec - i can generate a perl 5 version as well.
14:36 moritz rindolf: don't bother, I have it now
14:36 dalek nqp: 3106f89 | jnthn++ | src/ (4 files):
14:36 dalek nqp: Prepare for supporting different kinds of profile.
14:36 dalek nqp: review: https://github.com/perl6/nqp/commit/3106f89599
14:38 FROGGS[mobile] joined #perl6
14:39 rindolf moritz: here you go - http://paste.debian.net/414563/
14:41 rindolf moritz: what do you get when you run the p6 program?
14:42 moritz rindolf: I'm pretty confident that the problem is in your use of [+] (somelist), $another_value
14:42 moritz rindolf: which coerces (somelist) into numerical context, using the number of elements
14:44 moritz rindolf: when I fix that, I get 605857431263981935
14:44 moritz [+] flat(...) instead of [+] (...)
14:44 rindolf moritz: ah.
14:52 jnthn Hmm...Rakudo HEAD is busted for me?
14:53 jnthn C:\consulting\MoarVM\install\bin\moar --libpath="C:\consulting\MoarVM\install\share\nqp\lib" perl6.moarvm --target=mbc --ll-exception --output=RESTRICTED.setting.moarvm src/RESTRICTED.setting
14:53 jnthn Cannot invoke this object
14:53 jnthn at gen/moar/m-CORE.setting:26470  (./CORE.setting.moarvm:val:150)
14:54 moritz hm, all fine for me on last recompile
14:54 RabidGravy I rebuilt at around 11ish and have re-tested all my modules
14:54 jnthn The val call in question is: %ENV{$key} = val(nqp::p6box_s(nqp::iterval($envelem)));
14:54 FROGGS[mobile] m: class Foo { has &.bar:(--> int32); } # jnthn: that would be the desired syntax for function pointer members, right?
14:54 camelia rakudo-moar 522102: OUTPUT«5===SORRY!5=== Error while compiling /tmp/BubQqaAJRt␤You can't adverb has &.bar␤at /tmp/BubQqaAJRt:1␤------> 3class Foo { has &.bar:(--> int32)7⏏5; } # jnthn: that would be the desired s␤»
14:54 moritz (though not on MOAR HEAD, just on the recommended revision)
14:55 FROGGS[mobile] jnthn: ups, I added that
14:55 jnthn FROGGS[mobile]: I'm guessing val is fragile in some way that something in my environment hits
14:55 FROGGS[mobile] hmmm, let's fix that
14:56 captain-adequate joined #perl6
14:56 FROGGS[mobile] sadly I've not enough battery power to power up my windows vm
14:57 jnthn Well, if I can get the value, it may be reproducable platform-independent
14:59 moritz just print $key before this line?
15:00 moritz or nqp::p6box_s(nqp::iterval($envelem))
15:00 jnthn m: say val('10.00.30319.01')
15:00 camelia rakudo-moar 522102: OUTPUT«10.00.30319.01␤»
15:01 jnthn hm, that was the last one
15:02 jnthn m: say val('')
15:02 camelia rakudo-moar 522102: OUTPUT«␤»
15:02 jnthn m: say val(Str)
15:02 camelia rakudo-moar 522102: OUTPUT«Value of type Str uselessly passed to val()  in block <unit> at /tmp/33TESslLwY line 1␤(Str)␤»
15:02 jnthn hmm
15:02 wamba joined #perl6
15:06 jnthn OK, got the key, it's whatever is in MAKEFLAGS that seems to upset it
15:07 CIAvash joined #perl6
15:08 jnthn Which is only defined when under make. Hm
15:09 Ben_Goldberg joined #perl6
15:09 FROGGS[mobile] maybe it tries to use a type that is not available that early?
15:10 jnthn But it's not in compilation, it's at setting loading time
15:10 jnthn It happens when compiling restricted setting
15:11 FROGGS[mobile] but yeah, dumping the value as moritz said might give us a better hint
15:11 jnthn m: val(' ')
15:11 camelia rakudo-moar 522102: OUTPUT«Cannot invoke this object␤  in block <unit> at /tmp/f_yrJyKsrU line 1␤␤»
15:11 jnthn There you go :)
15:12 jnthn m: val('                  ')
15:12 camelia rakudo-moar 522102: OUTPUT«Cannot invoke this object␤  in block <unit> at /tmp/1rKKnLb4h1 line 1␤␤»
15:12 jnthn It's actually 18 empty spaces
15:12 FROGGS[mobile] space?
15:12 jnthn Yes!
15:12 FROGGS[mobile] -.-
15:12 jnthn I was darn confused, though it was the empty string...but spaces
15:13 RabidGravy computers are evil like that
15:17 nadim For those interested in the Dumper I have been posting about (and asking a lot for help, with great answers), I added the ability to diff two structures. it's just a little beta so far http://imgur.com/xQZkgJx
15:19 FROGGS[mobile] that looks nice!
15:19 FROGGS[mobile] nadim++
15:19 nadim the diff-glyph column will probably be removed or optional
15:19 llfourn nadim: nice :)
15:20 FROGGS[mobile] bbl &
15:20 timotimo cool
15:21 nadim I am open to suggestions. right now everything that is in the dumper is still there, filtering, custom type handles, ... so, normally, it should be easy to take a large dump, filter it out and diff with another output
15:24 nadim option I am thinking about are: custom diff glyph, mine are helpful but make it harder to read, display diff onlly, custom matcher for containers (allow second entry in one to match fifth in the other), and since DDT is also a Data::Visitor I think it will be easy to say "here are two structs, callme back for the elements that are different".
15:25 moritz m: my $promise = start { fail 42 }; await $promise; say $promise.status
15:25 camelia rakudo-moar 522102: OUTPUT«42␤  in block <unit> at /tmp/CggkgQIwd7 line 1␤␤»
15:25 skids joined #perl6
15:25 moritz m: my $promise = start { fail 42 }; await $promise; say 'alive'
15:25 camelia rakudo-moar 522102: OUTPUT«42␤  in block <unit> at /tmp/ArNDKZ38hL line 1␤␤»
15:25 moritz m: my $promise = start { die 42 }; await $promise; say 'alive'
15:25 camelia rakudo-moar 522102: OUTPUT«42␤  in block <unit> at /tmp/12MUZwUahS line 1␤␤»
15:26 jnthn await rethrows exceptions
15:26 moritz ok, so that's "worked as designed"
15:26 jnthn aye
15:26 moritz m: my $promise = start { fail 42 }; say (await $promise).^name
15:26 camelia rakudo-moar 522102: OUTPUT«42␤  in block <unit> at /tmp/4g6jFVZp_t line 1␤␤»
15:26 pyrimidi_ joined #perl6
15:26 moritz that makes https://rt.perl.org/Ticket/Display.html?id=123204 closable
15:26 jnthn The fail turns into a die
15:26 jnthn Because there's no handler available
15:26 moritz m: my $promise = start { fail 42 }; say ($promise.result).^name
15:26 camelia rakudo-moar 522102: OUTPUT«42␤  in block <unit> at /tmp/cvlmPMwZ5o line 1␤␤»
15:27 moritz that OTOH surprises me
15:27 pdcawley_ joined #perl6
15:27 havenn joined #perl6
15:27 moritz ah well
15:27 jnthn Arguably we could make start blocks handle failures, but then we'd also be making them ahndle return
15:27 moritz maybe it's for the best
15:27 jnthn That may or may not be clever :)
15:27 BenGoldberg_ joined #perl6
15:27 moritz m: my $p = start { return 42 }; say $p.result
15:27 camelia rakudo-moar 522102: OUTPUT«Attempt to return outside of any Routine␤  in block <unit> at /tmp/h_oYypC6Y_ line 1␤␤»
15:27 jnthn It's one of those ones where I'd want to know what TimToady thinks 'cus I can't do a good enough simulation of what he'd think :)
15:28 Skarsnik joined #perl6
15:28 moritz m: sub f { my $p = start { return 42 }; $p.result }; say f()
15:28 camelia rakudo-moar 522102: OUTPUT«Internal error: Unwound entire stack and missed handler␤»
15:28 moritz jnthn: uhm, better to make it handle returns than throwing internal errors :-)
15:29 jnthn moritz: Well, or to give a good "can't use return here" but yeah, it's tempting to make it DWIM
15:29 jnthn I'm fine with us saying that a start block's block is routine-y
15:30 jnthn Though it brings up all the fun questions like "should be define &?ROUTINE in it", "so then should it being of type Routine", etc. :)
15:31 brabo joined #perl6
15:31 jolts joined #perl6
15:31 shmibs joined #perl6
15:32 jolts joined #perl6
15:33 jolts joined #perl6
15:33 arnsholt jnthn: For a custom parametric type (like Pointer and friends in NativeCall), is it enough to do a custom nqp::setparameterizer() on them, or are there a few more hoops at the Perl 6 level?
15:34 jnthn arnsholt: See things like CoercionHOW and shaped arrays for examples, but it's basically that, yeah
15:35 jnthn arnsholt: Though I'd prefer it if you were to add to src/core/Metamodel/Primitives.pm support for parametric stuff
15:35 jnthn And then use that from NativeCall
15:36 dalek roast: f87e7b4 | moritz++ | S17-promise/start.t:
15:36 dalek roast: Tests for RT #123204
15:36 dalek roast: review: https://github.com/perl6/roast/commit/f87e7b421e
15:36 jolts joined #perl6
15:36 musiKk_ joined #perl6
15:36 jolts joined #perl6
15:36 skids m: (0..^4000000).first(:end).say; say now - BEGIN now; # mini-optimization LHF.
15:36 camelia rakudo-moar 522102: OUTPUT«3999999␤1.37532110␤»
15:37 jolts joined #perl6
15:39 moritz m: say 09
15:39 camelia rakudo-moar 522102: OUTPUT«Potential difficulties:␤    Leading 0 does not indicate octal in Perl 6.␤    Please use 0o9 if you mean that.␤    at /tmp/e8qzgM9ho6:1␤    ------> 3say 097⏏5<EOL>␤9␤»
15:40 skids That one was a funny ticket.
15:40 agentzh joined #perl6
15:40 agentzh joined #perl6
15:40 moritz and it's still open, because we don't have tests for it yet
15:41 jolts joined #perl6
15:41 moritz m: my ($x0, \x1) = (1, 2); say $x0; say x1
15:41 camelia rakudo-moar 522102: OUTPUT«1␤2␤»
15:41 kalkin- joined #perl6
15:42 raydiak_ joined #perl6
15:43 moritz m: my (\x1) = 1; say x1
15:43 camelia rakudo-moar 522102: OUTPUT«1␤»
15:45 charsbar____ joined #perl6
15:46 moritz m: sub postfix:<^^^>($a) is looser(&infix:<+>) { $a; 77 }; say +6^^^ +8^^^
15:46 camelia rakudo-moar 522102: OUTPUT«5===SORRY!5=== Error while compiling /tmp/XxDlILWbKU␤Variable '&prefix:<^^^>' is not declared␤at /tmp/XxDlILWbKU:1␤------> 3is looser(&infix:<+>) { $a; 77 }; say +67⏏5^^^ +8^^^␤»
15:48 jnthn o.O
15:48 moritz that's already in RT
15:48 kid51 I have a question re use of ':exists' adverb on hashes
15:48 kid51 suppose I have %capitals
15:48 moritz with a patch by FROGGS++, and a comment that he doesn't know if it's the right fix
15:48 kid51 Missouri => Jefferson City, New York => Albany, Slovakia => Bratislava, UK => London
15:50 kid51 I tried: say %capitals{'New York'}:exists
15:50 kid51 Got:  (False False)
15:50 kid51 What am I doing wrong?  (Am working thru http://www.jnthn.net/papers/2015-spw-perl6-course.pdf)
15:50 skids m: my %c = Missouri => Jefferson City, New York => Albany, Slovakia => Bratislava, UK => London; say %c{'New York'}:exists
15:50 camelia rakudo-moar 522102: OUTPUT«5===SORRY!5=== Error while compiling /tmp/E76vpblgxd␤Undeclared names:␤    Albany used at line 1␤    Bratislava used at line 1␤    City used at line 1␤    Jefferson used at line 1␤    London used at line 1␤    New used at line 1␤␤»
15:51 moritz need quotes
15:51 skids m: my %c = Missouri => Jefferson City, "New York" => Albany, Slovakia => Bratislava, UK => London; say %c{'New York'}:exists
15:51 camelia rakudo-moar 522102: OUTPUT«5===SORRY!5=== Error while compiling /tmp/FRYNsrcNPS␤Undeclared names:␤    Albany used at line 1␤    Bratislava used at line 1␤    City used at line 1␤    Jefferson used at line 1␤    London used at line 1␤␤»
15:51 jnthn And on the values :)
15:51 llfourn mo quotes
15:51 skids oh right. all of the values
15:52 skids m: my %c = Missouri => "Jefferson City", "New York" => "Albany", Slovakia => "Bratislava", UK => "London"; say %c{'New York'}:exists
15:52 camelia rakudo-moar 522102: OUTPUT«True␤»
15:52 jnthn kid51: Did you do %capitals<New York>:exists by any chance, instead of %capitals{'New York'}:exists?
15:52 llfourn my %c = Missouri => "Jefferson City", "New York" => "Albany", Slovakia => "Bratislava", UK =>  "London"; say %c{'New York'}:exists
15:53 jnthn kid51: If so, <...> is  quote words
15:53 llfourn m: my %c = Missouri => "Jefferson City", "New York" => "Albany", Slovakia => "Bratislava", UK =>  "London"; say %c<New York>:exists # oops
15:53 camelia rakudo-moar 522102: OUTPUT«(False False)␤»
15:53 jnthn m: say <New York>.perl
15:53 camelia rakudo-moar 522102: OUTPUT«("New", "York")␤»
15:53 kid51 say %capitals{'New York'}:exists      works  (True)
15:54 kid51 say %capitals{<New York>}:exists   does not work   (False False)
15:54 jnthn Right, 'cus that's actually doing a slice
15:54 arnsholt That's because <New York> is a list of two elements
15:54 Juerd <New York> is 'New', 'York'
15:54 skids It works, it just does not mean what you think it does.
15:54 jnthn It's like...is it qw(...) in Perl 5?
15:55 arnsholt Yeah, qw//
15:56 kid51 So, is there any circumstance where I would use '<' and '>' in %capitals...:exists ?
15:56 skids When you are working with a has where you know the keys don't have spaces in them.
15:56 llfourn kid51: when your data doesn't have spaces in the keys :)
15:57 kid51 k. thx
15:57 moritz well, <...> is *only* for literals
15:57 moritz and you always know if a literal contains a space or not. You see it right there
15:58 moritz %hash<$key>  is like %hash{'$key'}, not like %hash{$key}
15:58 dalek nqp: 0ccafe5 | timotimo++ | / (2 files):
15:58 dalek nqp: bump MOAR and map "setdebugtypename"
15:58 dalek nqp: review: https://github.com/perl6/nqp/commit/0ccafe5955
15:58 skids moritz: right.
15:58 dalek rakudo/nom: e00046b | timotimo++ | / (2 files):
15:58 dalek rakudo/nom: bump nqp and use setdebugtypename in ClassHOW.
15:58 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/e00046b35c
15:59 skids moritz: as long as you haven't found some contorted reason to EVAL.
16:01 arcetera joined #perl6
16:01 arcetera I'm trying to build Rakudo 2016.01 but it errors out
16:01 arcetera http://sprunge.us/QVTX
16:01 arcetera ^ error log
16:01 arcetera rakudo pkgfile: http://sprunge.us/QBdi
16:02 arcetera nqp pkgfile: http://sprunge.us/cbfb
16:02 arcetera moarvm pkgfile: http://sprunge.us/AhDg
16:02 timotimo that looks really strange
16:03 timotimo what's causing the build to think it failed?
16:03 moritz cd rakudo && make install
16:03 moritz == Installing modules for MoarVM
16:03 moritz is that a star installation?
16:03 arcetera yes
16:03 moritz ah
16:03 timotimo is this running in parallel or something?
16:03 moritz and are you running that with a make that parallelizes build steps?
16:04 arcetera should I try building with `make -j1`
16:04 arcetera as my MAKEFLAGS are set to -j5
16:04 moritz unset that variable please
16:04 arcetera yeah lemme try that
16:05 arcetera moritz: just using -j1 in the pkgfile should do it
16:05 moritz R* is known not to work well with parallel builds
16:05 arcetera ah
16:05 moritz arcetera: even for recursively called makes?
16:05 arcetera yes
16:05 timotimo we're leaving the venue now-ish
16:07 arcetera yeppers looks like that did it
16:07 arcetera or not
16:07 arcetera hold on
16:09 arcetera as MAKEFLAGS is just a var set in /etc/pkgmk.conf, and pkgmk is a shell script
16:09 arcetera tryna do a hacky workaround to do MAKEFLAGS="" in the Pkgfile
16:10 bhm joined #perl6
16:10 rhr__ joined #perl6
16:10 arcetera wtf
16:10 arcetera lemme sprunge this
16:10 john51_ joined #perl6
16:11 bbkr joined #perl6
16:11 cosimo_ joined #perl6
16:12 robins joined #perl6
16:12 [particle]1 joined #perl6
16:12 mkz__ joined #perl6
16:12 jnap joined #perl6
16:12 Praise- joined #perl6
16:12 Praise- joined #perl6
16:12 arcetera oh dear
16:12 jnap joined #perl6
16:12 [ptc] joined #perl6
16:12 xiaomiao joined #perl6
16:13 arcetera http://sprunge.us/dZQE error log
16:13 mtj_ joined #perl6
16:13 arcetera new pkgfile http://sprunge.us/QeJK
16:15 khw joined #perl6
16:16 kipd joined #perl6
16:16 FROGGS joined #perl6
16:17 BenGoldberg .seen zoffix
16:17 yoleaux I saw Zoffix 26 Jan 2016 10:53 EST in #perl6: <Zoffix> m: class Bar does Associative { has $.foo = 42; method AT-KEY($key) { self."$key"() } }; Bar.new<foo>.say
16:18 FROGGS jnthn: from reading the logs I dont see if you attempt to fix val(' ')... do you?
16:19 llfourn .seen ZoffixWin
16:19 yoleaux I saw ZoffixWin 20 Feb 2016 00:42Z in #perl6: <ZoffixWin> \o
16:20 jnthn FROGGS: No, didn't
16:20 jnthn FROGGS: Working on some other stuff
16:20 FROGGS jnthn: k, that's what I wanted to hear :o)
16:20 arcetera any ideas?
16:26 llfourn arcetera: where does this line come from: cd modules/panda && /home/arc/src/crux/rakudo/work/pkg/usr/bin/perl6-m bootstrap.pl
16:26 MilkmanDan joined #perl6
16:27 BenGoldberg .tell Zoffix In your design notes for perl6-IRC-Client-Plugin-Factoid, you say that the plugin must handle "addressed, notice, and private message requests and respond using the same method" ... if one follows the IRC RFCs, all bots should *never* respond to a "notice" message with another message, and bots *should* use "notice" to reply to messages they got via "privmsg".
16:27 yoleaux BenGoldberg: I'll pass your message to Zoffix.
16:30 FROGGS jnthn: got a patch... was a stupid error :o)
16:30 arcetera llfourn: no ide
16:30 arcetera a
16:30 geekosaur BenGoldberg, I've seen exactly one irc bot that followed that rule re privmsg, and people complained until it was "fixed".
16:30 geekosaur (most bots I'm aware of just ignore notice entirely...)
16:31 rudi_s Are there any code coverage tools available for perl6?
16:32 jnthn rudi_s: Haven't seen any...in theory someone could build one using the instrumented profiling data
16:33 jnthn rudi_s: Though it'd only have block accuracy
16:33 agent008 joined #perl6
16:34 llfourn arcetera: It's a little perplexing but it seems home/arc/src/crux/rakudo/work/pkg/usr/bin/perl6-m thinks it's .moarvm is in /usr/share where as it's meant to be in the build dir.
16:35 rudi_s jnthn: Ok, thanks.
16:35 arcetera i do have moar installed
16:35 arcetera that's a seperate port
16:36 llfourn arcetera: right but perl6.moarvm is perl6 compiled as moarvm bytecode which is what it's getting confused about :S
16:36 dalek rakudo/nom: 7358690 | FROGGS++ | src/core/allomorphs.pm:
16:36 dalek rakudo/nom: fix val(" ")
16:36 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/7358690294
16:36 arcetera so what do i do
16:36 arcetera is there anything i can do
16:36 arcetera for that matter
16:37 GlitchMr joined #perl6
16:37 llfourn I'm not that familiar with the build process unfortunetly
16:41 FROGGS[mobile] joined #perl6
16:55 pseydtonne joined #perl6
16:55 pseydtonne left #perl6
17:02 BenGoldberg geekosaur, Don't nickserv and chanserv use notice messages?
17:03 SCHAAP137 joined #perl6
17:03 SCHAAP137 joined #perl6
17:06 Skarsnik They are server bots
17:08 TreyHarris joined #perl6
17:09 Begi joined #perl6
17:16 awwaiid in the operators doc it has "X  Sequencer         <==, ==>, <<==, ==>>" . Elsewhere these are called "Feed Operators". Is there a preference? I'm tempted to remove the reference to "Sequencer" in the docs and consistently use "Feed"
17:18 jnthn awwaiid: Those operators are called feed operators, the precedence level they are at is called sequencer precedence, which is probably where that naming came from.
17:18 jnthn awwaiid: So unless the context is precedence levels, I'd stick with feed
17:24 zakharyas joined #perl6
17:25 woodruffw joined #perl6
17:25 woodruffw joined #perl6
17:30 awwaiid It is both contexts, so that helps, thanks
17:35 lsm-desktop joined #perl6
17:46 CIAvash joined #perl6
17:46 sufrostico joined #perl6
18:00 ugexe is there a concise way to do `my @arr = 1,2,3; while @arr.pop { once { @arr.push(1) }; say $_ } # 1 2 3` where only unique values are pop'd from @arr?
18:01 BenGoldberg What do you mean unique?
18:02 llfourn ugexe: make it a .Set?
18:02 ugexe as if the first line was `state %again; next unless %again{$_}++`
18:02 llfourn m: my $a = <1 2 3 1 1>.Set; say $a.perl
18:02 camelia rakudo-moar 735869: OUTPUT«set(IntStr.new(1, "1"),IntStr.new(2, "2"),IntStr.new(3, "3"))␤»
18:03 ugexe im not sure how to use that in a loop that will add values back into the set
18:04 BenGoldberg m: my %a := set <1 2 3 1 1>; say %a.keys
18:04 camelia rakudo-moar 735869: OUTPUT«(1 2 3)␤»
18:04 llfourn hrm
18:04 BenGoldberg m: my %a := set <1 2 3 1 1>; say %a.kv
18:04 camelia rakudo-moar 735869: OUTPUT«(1 True 2 True 3 True)␤»
18:05 llfourn there's .unique
18:05 llfourn maybe it's lazy?
18:06 llfourn m: my @a = <1 2 3>; for @a.unique { @a.push(4) when 2; .say }
18:06 camelia rakudo-moar 735869: OUTPUT«1␤2␤3␤4␤»
18:06 * llfourn wins the game
18:06 llfourn lazy-iterators++
18:06 ugexe but i need a while and a mutable array
18:06 ugexe i think
18:07 BenGoldberg What exactly are you doing, anyway?
18:07 BenGoldberg Making a web spider?
18:07 ugexe trying to avoid recursion
18:07 llfourn m: my @a = <1 2 3>; my $iter = @a.unique while $iter.pop { @a.push(4) when 2; .say }
18:07 camelia rakudo-moar 735869: OUTPUT«5===SORRY!5=== Error while compiling /tmp/MfUUZ91Dgd␤Unexpected block in infix position (missing statement control word before the expression?)␤at /tmp/MfUUZ91Dgd:1␤------> 3>; my $iter = @a.unique while $iter.pop7⏏5 { @a.push(4) when 2; .…»
18:07 BenGoldberg What would be the recursive solution, then we'll help you with a non-recursive one.
18:07 ugexe building dependency chains
18:08 llfourn m: my @a = <1 2 3>; my $iter = @a.unique; while $iter.pop -> $_ { @a.push(4) when 2; .say }
18:08 camelia rakudo-moar 735869: OUTPUT«Method 'pop' not found for invocant of class 'Seq'␤  in block <unit> at /tmp/DZ5kga5Htl line 1␤␤»
18:08 llfourn how do you get the next thing from a Seq?
18:08 llfourn m: my @a = <1 2 3>; my $iter = @a.unique; while $iter.pull-one -> $_ { @a.push(4) when 2; .say }
18:08 camelia rakudo-moar 735869: OUTPUT«Method 'pull-one' not found for invocant of class 'Seq'␤  in block <unit> at /tmp/uQkPlpk9hn line 1␤␤»
18:09 ugexe https://github.com/ugexe/zef/blob/master/lib/Zef/Client.pm6#L112 this is what im trying to replace
18:10 llfourn m: my @a = <1 2 3>; my $iter = @a.unique.iterator; while $iter.pull-one -> $_ { @a.push(4) when 2; .say }
18:10 camelia rakudo-moar 735869: OUTPUT«1␤2␤3␤4␤X::Multi::NoMatch exception produced no message␤  in block <unit> at /tmp/yurYQXBvdq line 1␤␤»
18:11 llfourn I don't really get the while loop requirement. You can add more stuff on with for loops as shown above :S
18:12 llfourn I'm not sure how
18:12 llfourn to iterate a Seq in a while loop
18:12 ugexe im not sure if i can use a for loop or not, i know i played with the idea at one time
18:13 llfourn the @wants.append thing will work with a for loop
18:13 iH2O joined #perl6
18:13 llfourn it's one of my favourite p6 features
18:13 llfourn maybe splice is not lazy?
18:14 llfourn what is splice with no args anyway
18:14 ugexe .splice is not lazy no
18:14 llfourn m: <one two three>.splice.say
18:14 camelia rakudo-moar 735869: OUTPUT«Method 'splice' not found for invocant of class 'List'␤  in block <unit> at /tmp/IY1OEbPs7M line 1␤␤»
18:14 ugexe it used to be .splice(0) which *is* lazy
18:14 ugexe but thats also broken
18:14 llfourn m: my @a = <one two three>; @a.splice.say
18:14 camelia rakudo-moar 735869: OUTPUT«[one two three]␤»
18:14 ugexe m: my @a = 1,2,3,4; @a[2]:delete; say @a.splice
18:14 camelia rakudo-moar 735869: OUTPUT«[1 2 (Any) 4]␤»
18:14 ugexe m: my @a = 1,2,3,4; @a[2]:delete; say @a.splice(0)
18:14 camelia rakudo-moar 735869: OUTPUT«[1 2]␤»
18:15 BenGoldberg splice with no arguments causes an array to become empty, and returns what previously had been in it.
18:15 llfourn ah I see
18:15 ugexe broken further down to
18:15 iH2O left #perl6
18:15 ugexe m: my @a = 1,2,3,4; @a[2]:delete; say @a[0..*]
18:15 camelia rakudo-moar 735869: OUTPUT«(1 2)␤»
18:15 ugexe m: my @a = 1,2,3,4; @a[2]:delete; say @a[lazy 0..3]
18:15 camelia rakudo-moar 735869: OUTPUT«(1 2)␤»
18:15 llfourn yeah I rkn try changing it to a for loop should work imo :)
18:16 ugexe m: my @a = 1,2,3,4; @a[2]:delete; say @a[3]
18:16 camelia rakudo-moar 735869: OUTPUT«4␤»
18:16 BenGoldberg It could have been written as: while( @wants ) { @wanted = @wants; @wants = (); @wanted .= grep(*.defined) or last; ...
18:17 ugexe oh i remember why i used a while @wants.splice. i want all the elements in @wants that i can get
18:17 ugexe so i can search for them all at once, instead of searching for each one individually
18:17 ugexe batching i guess
18:17 llfourn oic
18:17 BenGoldberg Well, there's that @wants.append inside, too.
18:18 ugexe yeah. all of those can be fetched at once in the next iteration
18:18 ugexe er, s/fetched/processed/
18:22 BenGoldberg So inside that loop, I see, my @todo = @wanted.grep(...).grep(...).unique;  Wouldn't that be more efficient as @todo = @wanted.unique.grep(...).grep(...) ?
18:25 ugexe yep. the entire method is a mess
18:25 BenGoldberg It
18:25 BenGoldberg It's too long ... it makes my brain hurt ;)
18:27 ugexe agree. it handles finding all the dependencies recursively itself, so im trying to split that functionality out into a different area
18:28 ugexe it ended up that way because searching p6c ecosystem is different than searching metacpan (one has the entire package index, the other needs to do a web search each time a module needs to be looked up and each time for each dependency it must find)
18:29 TreyHarr1 joined #perl6
18:31 ugexe (the web requests is why i want to make sure the values are unique *before* processing. otherwise it would make web requests to search for identities it already processed)
18:33 ugexe i suppose i could use a Supply to emit only unique values
18:41 Actualeyes left #perl6
18:50 kapouik_ joined #perl6
18:53 sortiz joined #perl6
18:53 sortiz \o #oerl6
18:55 RabidGravy erp
19:02 sjn o/
19:07 sortiz For Perl6 objects associated to native allocated resources, I've thinking in the Disposable pattern, a la C#. There is any established/planned nomenclature about a perl6 'Disposable' role?
19:07 firstdayonthejob joined #perl6
19:17 buharin joined #perl6
19:21 sortiz Now I'm using variants of 'with Foo.new  {  LEAVE { $_.free } ... }' to guaranty the proper deallocation of the resourses, but can be nice some syntax sugar when Foo does Disposable, for example a 'using Foo.new { ... } ' that desugared to the previous.
19:25 Woodi sortiz: I think for now such thing are internal/hidden becouse Perl do this automatically... about C# you should ask jnthn++  and what means "native" ? NC ?
19:25 sortiz And that needs, at least, a consensus about the name of the method: 'free', 'finalize', 'dispose'.
19:26 Woodi sortiz: generally discusion is about topic not yet (definitive) resolved in industry :)
19:26 sortiz Woodi, Yes, native in this context is a NC allocated resource, for example a DB connection in DBDish.
19:28 Woodi sortiz: so, for now, I didn't saw better thing then LEAVE for things allocated on Perl6 side
19:29 arc___ joined #perl6
19:30 Woodi sortiz: btw. I just two days ago learned about "Lease" pattern and minutes ago that MS call it Dispose :)
19:30 arcetera joined #perl6
19:30 sortiz Woodi, Yes, Perl internally does for some, via its REPRs, but there are lots of other cases when naming conventions can be useful for the future.
19:31 Woodi sortiz: i think problem isn't about syntax, many more layers of things adds problems to such nice feature :)
19:32 sortiz I'm asking about previous art in Perl6, to avoid reinventing the hot water. :)
19:33 lichtkind_ joined #perl6
19:37 RabidGravy I'd go with "dispose", it is more "I'm done with this now, do what you will with it".
19:39 Woodi sortiz: https://doc.perl6.org/type/Metamodel::Finalization   but probably it calls .free at GC time and sometimes not...
19:39 arcetera i still haven't gotten rakudo to compile
19:39 * Woodi likes lexical scope LEAVE
19:40 arcetera it appears to be looking for a file which isn't existent
19:40 arcetera because i'm writing a port
19:40 Woodi arcetera: that's strange... from where you got sources ?
19:40 arcetera the official rakudo site
19:40 arcetera rakudo.org
19:40 arcetera rakudo star
19:40 arcetera i'm trying to write a crux port and that appears to be the issue
19:41 arcetera here's the Pkgfile http://sprunge.us/OCjb
19:41 sortiz RabidGravy, that's the idea. I'll go for "dispose" then.
19:41 Woodi arcetera: crux ?
19:41 arcetera and currently it's compiling with stderr piped to sprunge so let me upload that
19:41 arcetera Woodi: yes that's my distro
19:41 Woodi arcetera: Linux or other os ? :)
19:42 arcetera linux
19:42 arcetera it compiles fine outside the port itself
19:42 arcetera but i get this when i try to compile through the Pkgfile and pkgmk http://sprunge.us/WgCR
19:42 arcetera the actual issue appears to be around "Unhandled exception: While looking for '/usr/share/perl6/runtime/perl6.moarvm': no such file or directory"
19:43 arcetera which obviously doesn't exist because it's not installed yet
19:44 Woodi you tried: cd rakudo && make && make install  maybe ?
19:44 Woodi I know it should be automatic...
19:45 El_Che it's weird
19:46 arcetera Woodi: the thing is
19:46 arcetera this is not me compiling manually
19:46 El_Che I had something similar while trying (and failing) to build it on Solaris. libuv built fine?
19:46 arcetera this is in the package
19:46 arcetera and it doesn't like that
19:46 arcetera it expects that i'm compiling directly
19:47 RabidGravy it is  "installing" stuff into /home/arc/src/crux/rakudo/work/pkg/usr/share/ but is adjusting the wrappers for /usr/share
19:47 arcetera exactly
19:47 arcetera how do I make it stop that
19:47 RabidGravy er which one don't you want?
19:48 arcetera adjusting the wrappers for /usr/share/
19:48 Woodi arcetera: maybe that: you compiling rakudo which gets Moar from sources ? better first create and install moar as package
19:48 arcetera i did
19:48 arcetera otherwise it'd error out earlier
19:48 arcetera i also packaged nqp
19:48 RabidGravy there is probably some option to configure
19:49 arcetera there's --sdkroot and --sysroot
19:49 arcetera ergh
19:50 arcetera the rakudo port in crux's repos at the moment is from 2014 and still uses parrotvm
19:50 Woodi right. but at the top of log there is problem with configure...
19:50 arcetera that doesn't seem to be the problem
19:50 yqt joined #perl6
19:50 arcetera hmm
19:51 Woodi "wrappers" works via links ?
19:52 RabidGravy no it makes "perl6"  as a script that does /foo/bar/baz/moar /blah/blag/perl6.moarvm .,...
19:52 arcetera oh hold on
19:52 arcetera lemme try this
19:52 arcetera tryna do --sysroot="$PKG"
19:53 arcetera hopefully that doesn't cause problems later
19:53 wamba joined #perl6
19:53 RabidGravy you might also want to check the #perl6-toolchain channel
19:53 arcetera the (serverely outdated) existing rakudo port doesn't work either so
19:53 Woodi arcetera: btw. Rakudo build system is mark for rewrite if I remember corectly...
19:53 arcetera ┐('~'; )┌
19:54 arcetera Woodi: thank GOD
19:54 arcetera nope that didn't do it
19:54 atweiden joined #perl6
19:54 Woodi arcetera: I install things into /opt/lib/graft/star-201601/... then link everything into /opt and it works...
19:55 arcetera see that isn't the problem
19:55 arcetera that's a hacky workaround
19:56 atweiden m: my FatRat $f = FatRat(989898988898989898980909090939838302233848473393040383234234509484.3489523478234723847238432423); say $f eqv FatRat(989898988898989898980909090939838302233848473393040383234234509484.3489523478234723847238432423); say $f eqv FatRat(989898988898989940247844191134641988224436627880004840480824357399.83933482381524942767485346932);
19:56 camelia rakudo-moar 735869: OUTPUT«True␤True␤»
19:57 RabidGravy arcetera, I think you need to find the part in the Configure.pl where it makes the lines for "tools/build/create-moar-runner.pl ..." which generates the wrappers and determine how to influence the bahviour
19:57 arcetera oh boy i gotta write a diff bois
19:58 RabidGravy but if I understand you are trying to package this so "install" to a staging location, you will need to rewrite the wrappers for perl6 etc before the final installation
19:59 arcetera yeah i don't really feel like this right now
19:59 arcetera especially because i've never touched perl5 and i'm only trying to learn perl6 for fun
20:00 El_Che arcetera: domidumont ins #perl6-toolschain is the Debian perl packager
20:00 RabidGravy but the #perl6-toolchain (or whatever it's called) is probably the best place to ask
20:00 arcetera lel
20:00 arcetera i've already asked in #perl6-toolchain
20:00 arcetera crux ports are a *lot* easier to write than debian packages
20:01 arcetera so hopefully i'll find something there
20:04 RabidGravy also PERL6_LANG_DIR
20:04 El_Che looking at the the homepage of crux. Any relation with slackware (maybe philosophical)?
20:05 RabidGravy appears to influence where the create-moar-runner.pl expects the stuff to be
20:05 arcetera it's similar to slackware in a few aspects
20:10 pmurias_ joined #perl6
20:17 atweiden arcetera: are you looking to package p6 modules for crux?
20:21 FROGGS[tab] joined #perl6
20:25 jjido joined #perl6
20:28 arnsholt .tell azawawi Is there some code I could look at for your NativeCall type mismatch? I didn't manage to reproduce it initially, so I suspect it interacts with something a bit deeper
20:28 yoleaux arnsholt: I'll pass your message to azawawi.
20:30 arcetera atweiden: i'm looking to package the compiler
20:30 arcetera rakudo
20:30 atweiden is there any issue with crux?
20:30 arcetera the issue is that it's trying to look for files in a directory that doesn't exist
20:30 arcetera namely in /usr/share rather than $PKG/usr/share
20:31 atweiden are you packaging moarvm and nqp separate from rakudo?
20:31 arcetera yes.
20:32 arcetera here's the log http://sprunge.us/WgCR
20:32 Woodi arcetera: but eg. moar -h works ?
20:32 arcetera and here's the Pkgfile http://sprunge.us/JiUA
20:32 arcetera Woodi: yes.
20:32 arcetera moar and nqp are packaged properly
20:33 atweiden rakudo-star then
20:34 Woodi atweiden:  http://sprunge.us/JiUA
20:34 arcetera rakudo-star is the package
20:34 Woodi ... is strange
20:34 arcetera Woodi: thing is
20:34 arcetera that's the same way you'd compile it
20:34 arcetera in the build() function
20:35 Woodi arcetera: prefix without $PKG and no --backends=moar
20:35 atweiden arcetera: it looks to be a problem with panda bootstrap.pl ?
20:35 arcetera if I don't use make DESTDIR="$PKG" then it installs to / not the package
20:36 atweiden also, you're building rakudo-star 2016.01
20:36 arcetera yes i am
20:36 arcetera that's the latest
20:36 atweiden i wonder if anything has changed since 01 and 02
20:36 atweiden with precompilation
20:36 arcetera ah
20:36 arcetera as i have nqp/moar 02
20:36 atweiden does rakudo (non-star) build?
20:38 arcetera atweiden: havne't tried
20:38 arcetera agh, shitty ssh connection to the vps i use irc on
20:40 jjido joined #perl6
20:41 atweiden arcetera: you should be able to build rakudo and install p6 modules through your crux's pkg manager
20:42 atweiden not star but it will be the same result
20:42 arcetera got it
20:42 arcetera i'll focus on rakudo itself then
20:42 arcetera where can i get a release tarball for non-star
20:42 atweiden github.com/rakudo/rakudo/releases
20:42 arcetera thanx
20:42 atweiden see also: https://aur.archlinux.org/packages/?K=perl6
20:43 arcetera atweiden: next time please use http/s://
20:43 arcetera otherwise my url handler doesn't pick it up :P
20:43 atweiden sry
20:46 arcetera it's fine
20:46 arcetera now i'm tryna compile just rakudo
20:47 arcetera aight that worked
20:47 arcetera now what other shit do i need to actually get up and running with perl 6
20:48 arcetera do we have a repl? we have a repl!!!!
20:51 arcetera rather than packaging modules i'm just gonna package panda
20:52 Woodi arcetera: did perl ./Configure.pl finished without errors in last build ?
20:52 arcetera yes
20:52 arcetera we have a repl
20:52 Woodi ah, ok :)
20:55 espadrine joined #perl6
20:58 arcetera packaging panda was much less painless
20:58 awwaiid I see that rakudo is in debian unstable! sweet!
20:58 arcetera aight
20:58 awwaiid (er, updated 2016.02 version)
20:59 arcetera to the five people who use crux
20:59 arcetera you can now use my package for an updated ver of rakudo
20:59 awwaiid arcetera: nice
20:59 maybekoo2 joined #perl6
21:09 arcetera well shit
21:11 arcetera panda reports this error post-install http://sprunge.us/gFLS
21:11 arcetera here's the Pkgfile http://sprunge.us/DHVE
21:11 arcetera the problem is it installs the required libs in /usr/lib not /usr/share/perl6
21:12 spebern joined #perl6
21:13 arcetera better yet
21:13 arcetera it installs a WHOLE LOTTA JUNK
21:13 arcetera here's the footprint http://sprunge.us/VRjj
21:16 arcetera lemme look at the AUR PKGBUILD
21:18 Woodi arcetera: actually this is our newest design ;)
21:19 arcetera oh god i've had to do something oh so very unholy
21:23 Vitrifur joined #perl6
21:27 arcetera i give up on panda
21:45 cdg joined #perl6
21:48 RabidGravy psch, I can get a reasonable facsimile of a sine out of Audio::PortAudio now, considerable cheating by precomputing cycle frames * buffer length and creating the CArrays up front
21:49 RabidGravy couldn't find anything that was fast enough to fill the buffer in the required time
21:53 arcetera aight, now to learn perl6
21:53 arcetera I've never used Perl 5 so this'll be interesting
21:56 geekosaur perl6 is sufficiently different from perl5 that not knowing perl5 should not matter
21:58 geekosaur the concepts are the same, but perl5 was an agglomeration of decades of special cases and cruft. perl 6 chucked it and started over.
21:59 TEttinger joined #perl6
22:13 musiKk_ joined #perl6
22:17 nowan joined #perl6
22:19 nine arcetera: you still here?
22:19 nine arcetera: you posted something on #perl6-toolchain but then left
22:27 arcetera nine: i fixed it
22:33 tmch joined #perl6
22:37 tmch joined #perl6
23:06 Mouq joined #perl6
23:15 SCHAAP137 joined #perl6
23:37 labster joined #perl6
23:56 johndau` joined #perl6
23:59 johndau joined #perl6

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

Perl 6 | Reference Documentation | Rakudo