»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
Set by moritz on 22 December 2015.
00:01 cdg left 00:02 johndau joined, kerframil left, cdg joined 00:05 RabidGravy left 00:07 cdg left 00:10 Crw left 00:15 TreyHarr2 joined 00:21 sufrostico left 00:27 telex left 00:28 telex joined
timotimo i should head to bed 00:29
00:31 cpage_ joined 00:45 perlpilot_ joined 00:48 perlpilot left, Sgeo joined 00:49 Sgeo_ left 00:53 cajone left 00:56 wamba joined 01:02 ely-se left 01:05 spider-mario left 01:32 silug_ left 01:34 silug joined
dalek kudo-star-daily: b11617e | coke++ | log/ (9 files):
today (automated commit)
01:36
01:50 alpha123 left 01:55 Herby_ joined
Herby_ Evening, everyone! 01:55
\o 01:56
o/ 02:01
02:08 Vitrifur left 02:09 Sqirrel left, wamba left 02:11 kalkin-__ joined 02:14 BenGoldberg left, kalkin-_ left 02:18 kalkin-__ left, kalkin- joined 02:25 pdcawley left
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
m: say (2..1).max;
camelia rakudo-moar 845a95: OUTPUT«1␤»
grondilu that matches the semantics of what I was trying to do, but I'm not sure I can rely on it. 02:39
02:39 Sqirrel joined
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
sorry I meant $a > $b earlier.
TEttinger perlbal space program 02:47
Herby_ ksp a pretty fun game? 02:51
02:51 molaf_ joined 02:53 jameslenz left
grondilu I've discovered the KOS addon lately and I've been obsessed 02:54
with writing a script to land in a single burn at full throttle.
I'm making a draft in Perl 6. 02:55
02:55 molaf left 02:56 vendethiel joined
Herby_ hmmm 02:57
i'll have to check that out
grondilu if you're curious here's what I got so far: gist.github.com/grondilu/011df8d34834a804ba18 02:59
03:01 |Sno| left 03:02 kid511 left 03:04 jameslenz joined
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:05
03:10 Herby_ left 03:20 vendethiel left 03:23 SCHAAP137 joined 03:32 keix left 03:35 kaare_ joined 03:36 geekosaur left, allbery joined 03:37 geekosaur joined 03:39 geekosaur left, allbery is now known as geekosaur 03:41 noganex_ joined 03:44 noganex left 04:00 SCHAAP137 left, ggoebel16 left 04:02 ggoebel16 joined 04:05 johndau` joined 04:08 johndau left, geekosaur left 04:10 BenGoldberg joined 04:11 johndau` left 04:12 johndau joined 04:39 AlexDaniel left 04:45 yqt left 05:09 khw left 05:14 keix joined 05:19 agent008 left 05:20 BenGoldberg left 05:21 agent008 joined 05:24 keix left, keix joined 05:33 skids left 05:49 geekosaur joined 05:50 geekosaur left 05:51 geekosaur joined, Cabanossi left 05:53 Cabanossi joined 06:42 buharin joined
timotimo o/ 06:42
06:43 CIAvash joined
timotimo m: say (2...1).max 06:43
camelia rakudo-moar 845a95: OUTPUT«2␤»
timotimo m: say (1...2).max
camelia rakudo-moar 845a95: OUTPUT«2␤»
timotimo grondilu: ^ ... does what you want
06:47 bpmedley left 07:13 perlawhirl joined 07:16 captain-adequate left 07:25 sena_kun joined, sena_kun left 07:26 bpmedley joined 07:36 perlawhirl left 07:39 domidumont joined 07:41 stmuk_ joined 07:43 stmuk left 07:44 domidumont left, domidumont joined 07:45 agent008 left 07:46 stmuk joined 07:47 agent008 joined, stmuk_ left 07:48 molaf_ is now known as molaf 07:50 huf left 07:51 stmuk left, stmuk joined 07:53 zpmorgan left 07:56 FROGGS[mobile] joined
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 08:00 cpage_ left
FROGGS[mobile] uhh 08:00
are you still comming? 08:01
timotimo yeah
is that bad?
FROGGS[mobile] hehe, no :o)
08:03 sortiz left
FROGGS[mobile] but better hurry up :o) 08:04
timotimo i intend to 08:05
08:10 sno joined 08:12 darutoko joined 08:18 agent008 left 08:20 agent008 joined
FROGGS[mobile] okay, I think I am a little bit early at the hackathon 08:24
moritz: you are not there yet, right? 08:25
08:32 buharin left 08:33 stmuk_ joined 08:35 stmuk left, buharin joined 08:38 FROGGS joined, FROGGS[mobile] left 08:42 vendethiel left 08:44 buharin left
timotimo starts at 10 officially 08:45
in the car now
08:45 FROGGS left 08:47 lsm-desktop left
nadim morning, what's the adverb to return a result from a regex substitution rather than doing the substitution in place? 08:49
08:50 firstdayonthejob joined 08:52 rindolf joined
Timbus nadim, can't use $str.subst ? 08:54
nadim I can! I just confused subst with in-place subst. thank you 08:56
08:57 pdcawley joined
nadim although I'd prefer an adverb to s/// to do the same thing 08:58
09:02 jack_rabbit joined
moritz \o from the Hackathon at GPW2016 09:02
lizmat moritz o/
lizmat is looking forward to seeing a lot of commits when she's online again 09:03
happy hacking!
commute&
09:03 lizmat left, jjido joined 09:04 maybekoo2 joined 09:05 FROGGS joined 09:06 cyberviking joined 09:08 jack_rabbit left 09:11 labster left
moritz m: my %h = 'foo' => [1,2,3], 'bar' => [4,5,6]; say %h{*}».[1] 09:13
camelia rakudo-moar 845a95: OUTPUT«(5 2)␤»
moritz m: my %h = 'foo' => [1,2,3], 'bar' => [4,5,6]; say %h{*}»[1]
camelia rakudo-moar 845a95: OUTPUT«(5 2)␤»
09:13 FROGGS left
moritz that's RT#64768 09:13
09:18 labster joined
dalek ast: 5c4dafa | moritz++ | S32-hash/slice.t:
RT #64768: Tests

Whatever-Slicing plus hyperop array indexing
09:21
09:26 labster left 09:29 labster joined 09:31 FROGGS joined 09:33 klapperl_ joined, klapperl left 09:35 Actualeyes left, pdcawley left 09:39 Actualeyes joined 09:41 Mouq joined 09:44 pdcawley joined, firstdayonthejob left 09:49 johndau left
timotimo I'm about half way to the city, will take a little break from driving though 09:53
09:55 cyberviking left, cyberviking joined
tadzik don't irc and drive! :P 09:56
nadim tadzik++ 09:57
mst otherwise you might get into a bash.org 09:58
tadzik hah
10:04 Mouq left
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
ianthehenry.com/2016/3/9/lazy-io/
moritz lol 10:13
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:16
10:17 RabidGravy joined 10:21 cyberviking left, abaugher left 10:23 abaugher joined
dalek c: a0fd237 | paultcochrane++ | doc/Language/testing.pod:
Document the does-ok() test function
10:23
FROGGS hmmm, can I create a new subroutine from a given Signature object? 10:24
RabidGravy I don't think so, but I've wanted that several times 10:27
nine You people have weird needs 10:28
llfourn you need to call stuff on $*W but you can do it :P
$*W.create_code_object($qast,'Sub',nqp::decont($sig)); # I have some code like this 10:29
FROGGS ohh, but this is QAST :/ 10:30
llfourn yeah you need to write QAST =(
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
so it would be nice to take a singuture and code block and merge them
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)␤»
FROGGS I think that's good enough for me
RabidGravy yeah, I think I wanted it to be able to create a multi based on some configuration for "dispatch purposes"
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
FROGGS I just need something for NativeCall, so the routine does not even have to have a code object
moritz FROGGS: makes sense in your use case
and I guess all the other crazy use cases that need it also make sense on some level :-)
FROGGS hehe
10:36 jjido left 10:37 huf joined 10:38 spider-mario joined
kalkin- I have a grammar, which hangs up rakudo: gist.github.com/kalkin/f0a64ff21cfbf7310d3d 10:38
the part which hangsup is line 8 the asterisk (*) neojdomg [<element>] 10:39
s/neojdomg/behind
Or am I doing something wrong? 10:41
10:41 jjido joined
moritz kalkin-: you shouldn't quantify something with * or + that might match zero characters 10:41
kalkin- 1) I always thought * is zero or more. 10:42
2) + means 1 or more?
moritz: Did I misunderstood you? 10:43
RabidGravy no, that's right
10:43 labster left, labster joined
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
moritz kalkin-: but <element> can match zero characters
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
moritz kalkin-: and it matches zero characters again
kalkin-: correct
kalkin- Thank you for the hint moritz & RabidGravy 10:46
moritz kalkin-: you're very welcome 10:47
RabidGravy it's all good fun
dalek kudo/nom: 3a050fb | moritz++ | src/core/Buf.pm:
#127642: Fix blob eqv Blob
10:50
ast: 524d930 | moritz++ | S03-operators/buf.t:
RT#127642: Fix for Blob eqv Blob
10:54
timotimo what button do i press to ring the right doorbell? 10:57
noris network?
moritz timotimo: you're at the wrong entry 10:58
timotimo oh, ok
which way to the right one?
moritz timotimo: you should go to the left entry
timotimo left on the inside?
moritz wait a sec, I'm coming out 10:59
timotimo i has a seat \o/ 11:06
11:08 maybekoo2 left 11:10 maybekoo2 joined
timotimo it's annoying that we can get NaN values in the profiler :\ 11:32
11:34 azawawi joined
azawawi hi 11:34
timotimo hello azawawi!
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..."
why are we truncating error messages?
timotimo huh?
i wonder what is responsible for cutting that off
i'm not aware that's happening anywhere
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
2016.02
timotimo huh! 11:36
huh, indeed 11:37
X::TypeCheck does that
dalek kudo/nom: 5221023 | FROGGS++ | / (2 files):
let nativecast take signatures instead of routine targets

  timotimo++
11:38
timotimo github.com/rakudo/rakudo/blob/nom/...n.pm#L1827
11:39 sjn_phone joined, jolts joined, jolts left
moritz ah, that's because it's .perl output, and that can be, like, very long 11:39
several pages long, in fact
dalek c: 92d34a1 | FROGGS++ | doc/Language/nativecall.pod:
state that nativecast will take signatures now
11:40
sjn_phone moritz: hey, I'm downstairs and the doorbell doesn't seem to work
azawawi so i caught a semi-bug
:)
while being annoyed
moritz sjn_phone: you probably took the left entry; please use the right one instead
11:40 jolts joined
azawawi so what do i get the got ... part :) 11:40
moritz sjn_phone: or simply walk through to the data center; I'm coming out 11:41
mst moritz: /alias entry say $0: you probably took the left entry; please use the right one instead 11:42
moritz: /entry sjn_phone
since you've already had to say that twice, clearly it deserves an irssi alias
timotimo i'm surprised that was wrong. i went to the left, but not left enough
so if sjn went too far to the left ... :| 11:43
mst /alias entry say $0: YOU WENT TOO FAR TO THE LEEEEEEFT
moritz I already put a sign on the right entry pointing to the left one 11:45
and I wasn't allowed to take and publish photos of the entries, for "security" reasons
mst LOL 11:46
what about a three quarters perspective sketch done in pencil?
makes it easier to eat if you're worried they're going to take you alive
11:46 jjido left 11:47 labster left
sjn is slowly turning right 11:47
timotimo :) 11:48
sjn why not just call it "the wrong entry" since the other one obviously is the right one?
timotimo what do i hack on now? :S 11:49
azawawi Expected: NativeCall::Types::Pointer[LibZip::NativeCall::zip], Got: NativeCall::Types::Pointer[LibZip::NativeCall::zip].new(55436656) # huh? 11:52
Shouldnt be the same? 11:53
Shouldnt they be the same?
timotimo can you inspect the $expected.^of (or what it's called) and the $got.^of? 11:54
it's just .of 11:55
and see if they =:= or eqv or whatever?
azawawi github.com/azawawi/perl6-libzip/bl...ve.pl6#L17
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:55 agent008 left
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
azawawi :) 11:57
so basically forget about error checking
when nativecall types are involved
11:58 agent008 joined
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 TEttinger left
timotimo i wonder if we ought to use parametric 6model extensions thingies 11:58
azawawi github.com/azawawi/perl6-libzip/bl...ve.pl6#L15 # working here
but failing in OO sugar github.com/azawawi/perl6-libzip/bl...ip.pm6#L12 11:59
timotimo well, a Pointer is just as good as any Pointer[foo]
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 github.com/rakudo/rakudo/blob/nom/...n.pm#L1827
24 character length is too short 12:01
timotimo up it to ~4kb :)
azawawi 24 is a magic value also :)
timotimo: why not 8k? :) 12:02
RabidGravy: current streak (aka steak) is 45 days :) 12:03
12:03 firstdayonthejob joined
RabidGravy I'm at 1 12:03
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 :)
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"?
azawawi RabidGravy: checkout this www.pjrc.com/store/teensy32.html :) 12:06
RabidGravy yeah they're good
funny firmware license though if you care about such things
timotimo, actually apparently "2" 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.
timotimo ah, streaks
i see
kalkin- how can i express it in a new token
azawawi off to enjoy a Spring sunny walk. Have fun :)
moritz m: my \a = gather { for 1..3 { take $_; say a.cache.perl } }
camelia ( no output )
timotimo kalkin-: you can match Bs until the end or an A followed only by Bs
moritz m: my \a = gather { for 1..3 { take $_; say a.cache.perl } }; 1 for a
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…»
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␤»
timotimo so it's like B+ A? B*
kalkin- no A could also be on the first position
timotimo OK, then it'd just be B* A? B*
kalkin- valid words: ABBB, BBA BBBAB, BBBA, BBB... 12:09
RabidGravy right off out to get vegetables
kalkin- timotimo: hmm it's simpler than i thought, thanks
12:09 cpage_ joined
kalkin- timotimo: no, it would be B*A*B*, but this also would match empty tokens 12:10
[B*A*B*]{1,} ? 12:11
12:12 azawawi left
timotimo wait, i think i misunderstood your idea 12:12
12:12 perlawhirl joined
timotimo it's either only Bs or it begins with an A and then only Bs? 12:12
i thought you meant Bs until the end or until an A and then Bs until the end
12:13 RabidGravy left
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:13
i have to match .foo, #bar, #bar.foo, .buz#bar.foo, .buz.foo#bar and so on.. 12:14
and of course .foo.buz
12:15 AlexDaniel joined
timotimo ah 12:16
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
you can write it as an alteration of those cases if you like, or collapse two fo those together 12:17
kalkin- you mean like [B*A?B*] | B+ ? 12:18
no more like [B*A?B*] | B+ | A
12:20 sjn_phone left
timotimo in the firstmost version you'll want to have A instead of A? 12:22
and then the last alternative is superfluous
kalkin- i got it 12:23
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
kalkin- oh you are right 12:25
timotimo: thank you
timotimo you're welcome :)
12:32 BenGoldberg joined
dalek c: be1f0cc | (Siavash Askari Nasr)++ | doc/Language/testing.pod:
Add missing commas for can-ok
12:33
12:37 kid51 joined 12:40 SCHAAP137 joined
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␤␤»
AlexDaniel m: my $x = ‘abc’; say S/b/z/ with $x; say $x 12:45
camelia rakudo-moar 522102: OUTPUT«azc␤abc␤»
AlexDaniel nadim: ↑
perhaps it is time to make a list of underrated perl 6 features 12:48
timotimo :) 12:50
AlexDaniel m: say exp 2, 8 12:53
camelia rakudo-moar 522102: OUTPUT«64␤»
AlexDaniel m: say exp 2: 8 # ;)
camelia rakudo-moar 522102: OUTPUT«64␤»
12:54 Sqirrel left
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:05 CIAvash left 13:12 Ben_Goldberg joined 13:15 BenGoldberg left
moritz m: my uint8 $x = 255; print $x, " -> "; $x = $x + 1; say $x; 13:20
camelia rakudo-moar 522102: OUTPUT«255 -> 0␤»
moritz m: my uint8 $x = 255; print $x, " -> "; $x++; say $x; 13:21
camelia rakudo-moar 522102: OUTPUT«255 -> 256␤»
moritz (RT#127144)
13:24 pmurias joined, Juerd left, Juerd joined 13:25 Juerd left, Juerd joined
moritz www.users.globalnet.co.uk/~loxias/h...potter.htm # for the hackathon participants 13:26
m: say &die ~~ Callable 13:29
camelia rakudo-moar 522102: OUTPUT«True␤»
moritz m: say so 'xyzabcde' !~~ /[ ab | abc ]: de/ 13:32
camelia rakudo-moar 522102: OUTPUT«False␤»
moritz m: say so 'xyzabcde' ~~ /[ ab | abc ]: de/
camelia rakudo-moar 522102: OUTPUT«True␤»
moritz this looks correct to me 13:33
rt.perl.org/Ticket/Display.html?id=121307 complains about it
m: say so 'xyzabcde' ~~ /[ ab || abc ]: de/
camelia rakudo-moar 522102: OUTPUT«True␤»
moritz dunno if that is correct though
13:34 aborazmeh joined, aborazmeh left, aborazmeh joined
moritz m: say uniname("\x[80]") 13:38
camelia rakudo-moar 522102: OUTPUT«␤» 13:39
13:40 RabidGravy joined 13:41 Ben_Goldberg left
dalek kudo/distribution: df9bf6b | FROGGS++ | src/ (4 files):
implement and expose $?DISTRIBUTION
13:41
13:41 FROGGS left 13:47 Ben_Goldberg joined
[Tux] test 22.221 13:49
test-t 14.360
csv-parser 51.160
OOPS?
jnthn [Tux]: Hm, that's a good bit slower than yesterday? 13:50
13:53 musiKk_ joined
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:54
timotimo it's quite a bit slower :\ 13:55
llfourn that would be pretty cool. Each commit on the X axis
(of the charts tux.nl/Talks/CSV6/speed4.html ) 13:56
[Tux] all timing is available in the git repo
I just run make tt
llfourn [Tux]: so you do it manually? are the charts done manually too? 13:57
[Tux] no, that is done semi-automatically
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.
where would one put a server to collect build stats if one were so inclined? 13:59
I guess making it part of travis wouldn't work out because the performance of the machine may vary 14:00
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
Though it doesn't account for all slowdowns
14:01 musiKk_ left
llfourn having travis always report some callgrind stats to irc might be worth it. But might get spammy. 14:04
jnthn Yeah 14:05
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
moritz llfourn: not infinite, but elastic :-) 14:07
llfourn: ... and only for the next half year
AlexDaniel moritz: that's good enough
llfourn moritz: ^ we need infinite and forever 14:08
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
14:11 buharin joined
RabidGravy I really should do "nuke rakudo and test all my modules" more often, already found one unstated dependency 14:12
14:14 sena_kun joined, sena_kun left 14:16 Ben_Goldberg left 14:17 Ben_Goldberg joined, Ben_Goldberg is now known as BenGoldberg 14:18 aborazmeh left
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␤␤»
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:␤ …»
BenGoldberg m: sub a($x is raw) { $x; } { a 42 }
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:␤ …»
BenGoldberg m: sub a($x is raw) { $x; }; { a 42 }
camelia ( no output )
BenGoldberg m: sub a($x is raw) { $x; }; { a 42 }()
camelia ( no output )
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 - paste.debian.net/414557/
can anyone verify? 14:27
llfourn Solution == 594452426380733382 # :) 14:28
moritz rindolf: might be easier if you supplied the p5 version as well 14:30
BenGoldberg m: gist.github.com/BenGoldberg1/41fdc...aab9ea8847
camelia rakudo-moar 522102: OUTPUT«Solution == 594452426380733382␤»
rindolf moritz: see github.com/shlomif/project-euler/b...-288-v1.pl 14:31
14:33 AlexDaniel left
moritz rindolf: Can't locate Euler288.pm in @INC 14:34
rindolf moritz: it's in the same directory.
moritz: wait a sec - i can generate a perl 5 version as well. 14:35
moritz rindolf: don't bother, I have it now 14:36
dalek p: 3106f89 | jnthn++ | src/ (4 files):
Prepare for supporting different kinds of profile.
14:38 FROGGS[mobile] joined
rindolf moritz: here you go - paste.debian.net/414563/ 14:39
moritz: what do you get when you run the p6 program? 14:41
moritz rindolf: I'm pretty confident that the problem is in your use of [+] (somelist), $another_value 14:42
rindolf: which coerces (somelist) into numerical context, using the number of elements
rindolf: when I fix that, I get 605857431263981935 14:44
[+] flat(...) instead of [+] (...)
rindolf moritz: ah.
jnthn Hmm...Rakudo HEAD is busted for me? 14:52
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
Cannot invoke this object
at gen/moar/m-CORE.setting:26470 (./CORE.setting.moarvm:val:150)
moritz hm, all fine for me on last recompile 14:54
RabidGravy I rebuilt at around 11ish and have re-tested all my modules
jnthn The val call in question is: %ENV{$key} = val(nqp::p6box_s(nqp::iterval($envelem)));
FROGGS[mobile] m: class Foo { has &.bar:(--> int32); } # jnthn: that would be the desired syntax for function pointer members, right?
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␤»
moritz (though not on MOAR HEAD, just on the recommended revision)
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
FROGGS[mobile] hmmm, let's fix that
14:56 captain-adequate joined
FROGGS[mobile] sadly I've not enough battery power to power up my windows vm 14:56
jnthn Well, if I can get the value, it may be reproducable platform-independent 14:57
moritz just print $key before this line? 14:59
or nqp::p6box_s(nqp::iterval($envelem)) 15:00
jnthn m: say val('10.00.30319.01')
camelia rakudo-moar 522102: OUTPUT«10.00.30319.01␤»
jnthn hm, that was the last one 15:01
15:01 perlawhirl left
jnthn m: say val('') 15:02
camelia rakudo-moar 522102: OUTPUT«␤»
jnthn m: say val(Str)
camelia rakudo-moar 522102: OUTPUT«Value of type Str uselessly passed to val() in block <unit> at /tmp/33TESslLwY line 1␤(Str)␤»
jnthn hmm
15:02 wamba joined
jnthn OK, got the key, it's whatever is in MAKEFLAGS that seems to upset it 15:06
15:07 CIAvash joined
jnthn Which is only defined when under make. Hm 15:08
15:09 Ben_Goldberg joined
FROGGS[mobile] maybe it tries to use a type that is not available that early? 15:09
jnthn But it's not in compilation, it's at setting loading time 15:10
It happens when compiling restricted setting
FROGGS[mobile] but yeah, dumping the value as moritz said might give us a better hint 15:11
15:11 BenGoldberg left
jnthn m: val(' ') 15:11
camelia rakudo-moar 522102: OUTPUT«Cannot invoke this object␤ in block <unit> at /tmp/f_yrJyKsrU line 1␤␤»
jnthn There you go :)
m: val(' ') 15:12
camelia rakudo-moar 522102: OUTPUT«Cannot invoke this object␤ in block <unit> at /tmp/1rKKnLb4h1 line 1␤␤»
jnthn It's actually 18 empty spaces
FROGGS[mobile] space?
jnthn Yes!
FROGGS[mobile] -.-
jnthn I was darn confused, though it was the empty string...but spaces
RabidGravy computers are evil like that 15:13
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 imgur.com/xQZkgJx 15:17
FROGGS[mobile] that looks nice! 15:19
nadim++
nadim the diff-glyph column will probably be removed or optional
llfourn nadim: nice :)
FROGGS[mobile] bbl & 15:20
15:20 FROGGS[mobile] left
timotimo cool 15:20
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:21
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:24
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
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␤␤»
moritz m: my $promise = start { die 42 }; await $promise; say 'alive'
camelia rakudo-moar 522102: OUTPUT«42␤ in block <unit> at /tmp/12MUZwUahS line 1␤␤»
jnthn await rethrows exceptions 15:26
moritz ok, so that's "worked as designed"
jnthn aye
moritz m: my $promise = start { fail 42 }; say (await $promise).^name
camelia rakudo-moar 522102: OUTPUT«42␤ in block <unit> at /tmp/4g6jFVZp_t line 1␤␤»
15:26 pyrimidi_ joined
moritz that makes rt.perl.org/Ticket/Display.html?id=123204 closable 15:26
jnthn The fail turns into a die
Because there's no handler available
moritz m: my $promise = start { fail 42 }; say ($promise.result).^name 15:27
camelia rakudo-moar 522102: OUTPUT«42␤ in block <unit> at /tmp/cvlmPMwZ5o line 1␤␤»
moritz that OTOH surprises me
15:27 pdcawley_ joined, havenn joined
moritz ah well 15:27
jnthn Arguably we could make start blocks handle failures, but then we'd also be making them ahndle return
moritz maybe it's for the best
jnthn That may or may not be clever :)
15:27 BenGoldberg_ joined
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␤␤»
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
15:28 Skarsnik joined
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 shmibs left
moritz jnthn: uhm, better to make it handle returns than throwing internal errors :-) 15:28
jnthn moritz: Well, or to give a good "can't use return here" but yeah, it's tempting to make it DWIM 15:29
15:29 pyrimidine left, raydiak_ left, charsbar____ left, agentzh left
jnthn I'm fine with us saying that a start block's block is routine-y 15:29
15:29 Ben_Goldberg left, jolts left, pdcawley left
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:30
15:30 kalkin- left, brabo left, havenwood left, MilkmanDan left, havenn is now known as havenwood 15:31 brabo joined, jolts joined, jolts left, shmibs joined 15:32 jolts joined, jolts left 15:33 jolts joined, jolts left
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:33
jnthn arnsholt: See things like CoercionHOW and shaped arrays for examples, but it's basically that, yeah 15:34
arnsholt: Though I'd prefer it if you were to add to src/core/Metamodel/Primitives.pm support for parametric stuff 15:35
And then use that from NativeCall
dalek ast: f87e7b4 | moritz++ | S17-promise/start.t:
Tests for RT #123204
15:36
15:36 jolts joined, musiKk_ joined, jolts left, jolts joined, jolts left
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, jolts left
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␤»
skids That one was a funny ticket. 15:40
15:40 agentzh joined, agentzh left, agentzh joined
moritz and it's still open, because we don't have tests for it yet 15:40
15:41 jolts joined, jolts left
moritz m: my ($x0, \x1) = (1, 2); say $x0; say x1 15:41
camelia rakudo-moar 522102: OUTPUT«1␤2␤»
15:41 kalkin- joined 15:42 raydiak_ joined
moritz m: my (\x1) = 1; say x1 15:43
camelia rakudo-moar 522102: OUTPUT«1␤»
15:45 charsbar____ joined
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^^^␤»
jnthn o.O 15:48
moritz that's already in RT
kid51 I have a question re use of ':exists' adverb on hashes
suppose I have %capitals
moritz with a patch by FROGGS++, and a comment that he doesn't know if it's the right fix
kid51 Missouri => Jefferson City, New York => Albany, Slovakia => Bratislava, UK => London
I tried: say %capitals{'New York'}:exists 15:50
Got: (False False)
What am I doing wrong? (Am working thru www.jnthn.net/papers/2015-spw-perl6-course.pdf)
skids m: my %c = Missouri => Jefferson City, New York => Albany, Slovakia => Bratislava, UK => London; say %c{'New York'}:exists
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␤␤»
moritz need quotes 15:51
skids m: my %c = Missouri => Jefferson City, "New York" => Albany, Slovakia => Bratislava, UK => London; say %c{'New York'}:exists
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␤␤»
jnthn And on the values :)
llfourn mo quotes
skids oh right. all of the values
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␤»
jnthn kid51: Did you do %capitals<New York>:exists by any chance, instead of %capitals{'New York'}:exists?
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
llfourn m: my %c = Missouri => "Jefferson City", "New York" => "Albany", Slovakia => "Bratislava", UK => "London"; say %c<New York>:exists # oops
camelia rakudo-moar 522102: OUTPUT«(False False)␤»
jnthn m: say <New York>.perl
camelia rakudo-moar 522102: OUTPUT«("New", "York")␤»
15:53 BenGoldberg_ is now known as BenGoldberg
kid51 say %capitals{'New York'}:exists works (True) 15:53
say %capitals{<New York>}:exists does not work (False False) 15:54
jnthn Right, 'cus that's actually doing a slice
arnsholt That's because <New York> is a list of two elements
Juerd <New York> is 'New', 'York'
skids It works, it just does not mean what you think it does.
jnthn It's like...is it qw(...) in Perl 5?
arnsholt Yeah, qw// 15:55
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.
llfourn kid51: when your data doesn't have spaces in the keys :)
kid51 k. thx 15:57
moritz well, <...> is *only* for literals
and you always know if a literal contains a space or not. You see it right there
%hash<$key> is like %hash{'$key'}, not like %hash{$key} 15:58
dalek p: 0ccafe5 | timotimo++ | / (2 files):
bump MOAR and map "setdebugtypename"
skids moritz: right.
dalek kudo/nom: e00046b | timotimo++ | / (2 files):
bump nqp and use setdebugtypename in ClassHOW.
skids moritz: as long as you haven't found some contorted reason to EVAL. 15:59
16:01 arcetera joined
arcetera I'm trying to build Rakudo 2016.01 but it errors out 16:01
sprunge.us/QVTX
^ error log
rakudo pkgfile: sprunge.us/QBdi
nqp pkgfile: sprunge.us/cbfb 16:02
moarvm pkgfile: sprunge.us/AhDg
timotimo that looks really strange
what's causing the build to think it failed? 16:03
moritz cd rakudo && make install
== Installing modules for MoarVM
is that a star installation?
arcetera yes
moritz ah
timotimo is this running in parallel or something?
moritz and are you running that with a make that parallelizes build steps?
arcetera should I try building with `make -j1` 16:04
as my MAKEFLAGS are set to -j5
moritz unset that variable please
arcetera yeah lemme try that
moritz: just using -j1 in the pkgfile should do it 16:05
moritz R* is known not to work well with parallel builds
arcetera ah
moritz arcetera: even for recursively called makes?
arcetera yes
timotimo we're leaving the venue now-ish
arcetera yeppers looks like that did it 16:07
or not
hold on
as MAKEFLAGS is just a var set in /etc/pkgmk.conf, and pkgmk is a shell script 16:09
tryna do a hacky workaround to do MAKEFLAGS="" in the Pkgfile
16:10 bhm joined, rhr__ joined
arcetera wtf 16:10
lemme sprunge this
16:10 john51_ joined 16:11 bbkr joined, cosimo_ joined 16:12 robins joined, [particle]1 joined, mkz__ joined, kipd left, jnap left, bhm_ left, rhr left, [ptc] left, xiaomiao left, [particle] left, cosimo left, bbkr_ left, Praise left, jnap joined, mkz left, robinsmidsrod left, Praise- joined, Praise- left, Praise- joined, mtj_ left
arcetera oh dear 16:12
16:12 jnap left, jnap joined, [ptc] joined, john51 left, xiaomiao joined
arcetera sprunge.us/dZQE error log 16:13
16:13 mtj_ joined
arcetera new pkgfile sprunge.us/QeJK 16:13
16:15 khw joined 16:16 kipd joined, FROGGS joined
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
FROGGS jnthn: from reading the logs I dont see if you attempt to fix val(' ')... do you? 16:18
llfourn .seen ZoffixWin 16:19
yoleaux I saw ZoffixWin 20 Feb 2016 00:42Z in #perl6: <ZoffixWin> \o
jnthn FROGGS: No, didn't 16:20
FROGGS: Working on some other stuff
16:20 skids left
FROGGS jnthn: k, that's what I wanted to hear :o) 16:20
arcetera any ideas?
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
16:26 MilkmanDan joined
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:28 agent008 left
FROGGS jnthn: got a patch... was a stupid error :o) 16:30
arcetera llfourn: no ide
a
geekosaur BenGoldberg, I've seen exactly one irc bot that followed that rule re privmsg, and people complained until it was "fixed".
(most bots I'm aware of just ignore notice entirely...)
rudi_s Are there any code coverage tools available for perl6? 16:31
jnthn rudi_s: Haven't seen any...in theory someone could build one using the instrumented profiling data 16:32
rudi_s: Though it'd only have block accuracy 16:33
16:33 agent008 joined
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:34
rudi_s jnthn: Ok, thanks. 16:35
arcetera i do have moar installed
that's a seperate port
llfourn arcetera: right but perl6.moarvm is perl6 compiled as moarvm bytecode which is what it's getting confused about :S 16:36
dalek kudo/nom: 7358690 | FROGGS++ | src/core/allomorphs.pm:
fix val(" ")
arcetera so what do i do
is there anything i can do
for that matter
16:37 GlitchMr joined
llfourn I'm not that familiar with the build process unfortunetly 16:37
16:39 musiKk_ left, FROGGS left 16:40 GlitchMr left 16:41 FROGGS[mobile] joined 16:52 FROGGS[mobile] left 16:55 pseydtonne joined, pseydtonne left 16:56 wamba left 17:01 SCHAAP137 left
BenGoldberg geekosaur, Don't nickserv and chanserv use notice messages? 17:02
17:03 SCHAAP137 joined, SCHAAP137 left, SCHAAP137 joined
Skarsnik They are server bots 17:06
17:08 TreyHarris joined 17:09 Begi joined 17:11 TreyHarr2 left
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:16
17:17 CIAvash left
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
awwaiid: So unless the context is precedence levels, I'd stick with feed
17:24 zakharyas joined 17:25 woodruffw joined, woodruffw left, woodruffw joined
awwaiid It is both contexts, so that helps, thanks 17:30
17:35 lsm-desktop joined 17:46 CIAvash joined, sufrostico joined 18:00 sufrostico left
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:00
BenGoldberg What do you mean unique? 18:01
llfourn ugexe: make it a .Set? 18:02
ugexe as if the first line was `state %again; next unless %again{$_}++`
llfourn m: my $a = <1 2 3 1 1>.Set; say $a.perl
camelia rakudo-moar 735869: OUTPUT«set(IntStr.new(1, "1"),IntStr.new(2, "2"),IntStr.new(3, "3"))␤»
ugexe im not sure how to use that in a loop that will add values back into the set 18:03
BenGoldberg m: my %a := set <1 2 3 1 1>; say %a.keys 18:04
camelia rakudo-moar 735869: OUTPUT«(1 2 3)␤»
llfourn hrm
BenGoldberg m: my %a := set <1 2 3 1 1>; say %a.kv
camelia rakudo-moar 735869: OUTPUT«(1 True 2 True 3 True)␤»
llfourn there's .unique 18:05
maybe it's lazy?
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␤»
llfourn wins the game
lazy-iterators++
ugexe but i need a while and a mutable array
i think
BenGoldberg What exactly are you doing, anyway? 18:07
Making a web spider?
ugexe trying to avoid recursion
llfourn m: my @a = <1 2 3>; my $iter = @a.unique while $iter.pop { @a.push(4) when 2; .say }
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␤------> 033>; my $iter = @a.unique while $iter.pop7⏏5 { @a.push(4) when 2; .…»
BenGoldberg What would be the recursive solution, then we'll help you with a non-recursive one.
ugexe building dependency chains
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␤␤»
llfourn how do you get the next thing from a Seq?
m: my @a = <1 2 3>; my $iter = @a.unique; while $iter.pull-one -> $_ { @a.push(4) when 2; .say }
camelia rakudo-moar 735869: OUTPUT«Method 'pull-one' not found for invocant of class 'Seq'␤ in block <unit> at /tmp/uQkPlpk9hn line 1␤␤»
ugexe github.com/ugexe/zef/blob/master/l...t.pm6#L112 this is what im trying to replace 18:09
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␤␤»
llfourn I don't really get the while loop requirement. You can add more stuff on with for loops as shown above :S 18:11
I'm not sure how 18:12
to iterate a Seq in a while loop
ugexe im not sure if i can use a for loop or not, i know i played with the idea at one time
llfourn the @wants.append thing will work with a for loop 18:13
18:13 iH2O joined
llfourn it's one of my favourite p6 features 18:13
maybe splice is not lazy?
what is splice with no args anyway 18:14
ugexe .splice is not lazy no
llfourn m: <one two three>.splice.say
camelia rakudo-moar 735869: OUTPUT«Method 'splice' not found for invocant of class 'List'␤ in block <unit> at /tmp/IY1OEbPs7M line 1␤␤»
ugexe it used to be .splice(0) which *is* lazy
but thats also broken
llfourn m: my @a = <one two three>; @a.splice.say
camelia rakudo-moar 735869: OUTPUT«[one two three]␤»
ugexe m: my @a = 1,2,3,4; @a[2]:delete; say @a.splice
camelia rakudo-moar 735869: OUTPUT«[1 2 (Any) 4]␤»
ugexe m: my @a = 1,2,3,4; @a[2]:delete; say @a.splice(0)
camelia rakudo-moar 735869: OUTPUT«[1 2]␤»
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
ugexe broken further down to
18:15 iH2O left
ugexe m: my @a = 1,2,3,4; @a[2]:delete; say @a[0..*] 18:15
camelia rakudo-moar 735869: OUTPUT«(1 2)␤»
ugexe m: my @a = 1,2,3,4; @a[2]:delete; say @a[lazy 0..3]
camelia rakudo-moar 735869: OUTPUT«(1 2)␤»
llfourn yeah I rkn try changing it to a for loop should work imo :)
ugexe m: my @a = 1,2,3,4; @a[2]:delete; say @a[3] 18:16
camelia rakudo-moar 735869: OUTPUT«4␤»
BenGoldberg It could have been written as: while( @wants ) { @wanted = @wants; @wants = (); @wanted .= grep(*.defined) or last; ...
ugexe oh i remember why i used a while @wants.splice. i want all the elements in @wants that i can get 18:17
so i can search for them all at once, instead of searching for each one individually
batching i guess
llfourn oic
BenGoldberg Well, there's that @wants.append inside, too.
18:18 buharin left
ugexe yeah. all of those can be fetched at once in the next iteration 18:18
er, s/fetched/processed/
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:22
18:25 firstdayonthejob left
ugexe yep. the entire method is a mess 18:25
18:25 zakharyas left
BenGoldberg It 18:25
It's too long ... it makes my brain hurt ;)
ugexe agree. it handles finding all the dependencies recursively itself, so im trying to split that functionality out into a different area 18:27
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:28
18:29 TreyHarr1 joined
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:31
18:31 TreyHarris left
ugexe i suppose i could use a Supply to emit only unique values 18:33
18:41 Actualeyes left 18:43 maybekoo2 left 18:50 TreyHarr1 is now known as TreyHarris, kapouik_ joined 18:53 sortiz joined
sortiz \o #oerl6 18:53
RabidGravy erp 18:55
sjn o/ 19:02
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
19:08 firstdayonthejob joined 19:17 buharin joined
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:21
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'.
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 Praise- is now known as Praise
Woodi sortiz: so, for now, I didn't saw better thing then LEAVE for things allocated on Perl6 side 19:28
19:28 arcetera left 19:29 arc___ joined
Woodi sortiz: btw. I just two days ago learned about "Lease" pattern and minutes ago that MS call it Dispose :) 19:30
19:30 arc___ is now known as arcetera, arcetera left, arcetera joined
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:30
Woodi sortiz: i think problem isn't about syntax, many more layers of things adds problems to such nice feature :) 19:31
sortiz I'm asking about previous art in Perl6, to avoid reinventing the hot water. :) 19:32
19:33 lichtkind_ joined
RabidGravy I'd go with "dispose", it is more "I'm done with this now, do what you will with it". 19:37
19:37 lichtkind left
Woodi sortiz: 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
Woodi likes lexical scope LEAVE
arcetera it appears to be looking for a file which isn't existent 19:40
because i'm writing a port
Woodi arcetera: that's strange... from where you got sources ?
arcetera the official rakudo site
rakudo.org
rakudo star
i'm trying to write a crux port and that appears to be the issue
here's the Pkgfile sprunge.us/OCjb 19:41
sortiz RabidGravy, that's the idea. I'll go for "dispose" then.
Woodi arcetera: crux ?
arcetera and currently it's compiling with stderr piped to sprunge so let me upload that
Woodi: yes that's my distro
Woodi arcetera: Linux or other os ? :)
arcetera linux 19:42
it compiles fine outside the port itself
but i get this when i try to compile through the Pkgfile and pkgmk sprunge.us/WgCR
the actual issue appears to be around "Unhandled exception: While looking for '/usr/share/perl6/runtime/perl6.moarvm': no such file or directory"
which obviously doesn't exist because it's not installed yet 19:43
Woodi you tried: cd rakudo && make && make install maybe ? 19:44
I know it should be automatic...
El_Che it's weird 19:45
arcetera Woodi: the thing is 19:46
this is not me compiling manually
El_Che I had something similar while trying (and failing) to build it on Solaris. libuv built fine?
arcetera this is in the package
and it doesn't like that
it expects that i'm compiling directly
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
how do I make it stop that
RabidGravy er which one don't you want?
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
arcetera i did
otherwise it'd error out earlier
i also packaged nqp
RabidGravy there is probably some option to configure
arcetera there's --sdkroot and --sysroot 19:49
ergh
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...
arcetera that doesn't seem to be the problem
19:50 yqt joined
arcetera hmm 19:50
Woodi "wrappers" works via links ? 19:51
RabidGravy no it makes "perl6" as a script that does /foo/bar/baz/moar /blah/blag/perl6.moarvm .,... 19:52
arcetera oh hold on
lemme try this
tryna do --sysroot="$PKG"
hopefully that doesn't cause problems later 19:53
19:53 wamba joined
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
Woodi arcetera: btw. Rakudo build system is mark for rewrite if I remember corectly...
arcetera ┐('~'; )┌
Woodi: thank GOD 19:54
nope that didn't do it
19:54 atweiden joined
Woodi arcetera: I install things into /opt/lib/graft/star-201601/... then link everything into /opt and it works... 19:54
arcetera see that isn't the problem 19:55
that's a hacky workaround
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␤»
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
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:58
arcetera yeah i don't really feel like this right now 19:59
especially because i've never touched perl5 and i'm only trying to learn perl6 for fun
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
arcetera lel
i've already asked in #perl6-toolchain
crux ports are a *lot* easier to write than debian packages
so hopefully i'll find something there 20:01
RabidGravy also PERL6_LANG_DIR 20:04
El_Che looking at the the homepage of crux. Any relation with slackware (maybe philosophical)?
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 20:12 pmurias left 20:15 darutoko left
atweiden arcetera: are you looking to package p6 modules for crux? 20:17
20:21 FROGGS[tab] joined 20:25 jjido joined
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.
arcetera atweiden: i'm looking to package the compiler 20:30
rakudo
atweiden is there any issue with crux?
arcetera the issue is that it's trying to look for files in a directory that doesn't exist
namely in /usr/share rather than $PKG/usr/share
atweiden are you packaging moarvm and nqp separate from rakudo? 20:31
arcetera yes.
here's the log sprunge.us/WgCR 20:32
Woodi arcetera: but eg. moar -h works ?
arcetera and here's the Pkgfile sprunge.us/JiUA
Woodi: yes.
moar and nqp are packaged properly
atweiden rakudo-star then 20:33
Woodi atweiden: sprunge.us/JiUA 20:34
arcetera rakudo-star is the package
Woodi ... is strange
20:34 buharin left
arcetera Woodi: thing is 20:34
that's the same way you'd compile it
in the build() function
Woodi arcetera: prefix without $PKG and no --backends=moar 20:35
atweiden arcetera: it looks to be a problem with panda bootstrap.pl ?
arcetera if I don't use make DESTDIR="$PKG" then it installs to / not the package
atweiden also, you're building rakudo-star 2016.01 20:36
arcetera yes i am
that's the latest
atweiden i wonder if anything has changed since 01 and 02
with precompilation
arcetera ah
as i have nqp/moar 02
atweiden does rakudo (non-star) build?
20:37 domidumont left
arcetera atweiden: havne't tried 20:38
20:38 jjido left
arcetera agh, shitty ssh connection to the vps i use irc on 20:38
20:40 jjido joined 20:41 jjido left
atweiden arcetera: you should be able to build rakudo and install p6 modules through your crux's pkg manager 20:41
not star but it will be the same result 20:42
arcetera got it
i'll focus on rakudo itself then
where can i get a release tarball for non-star
atweiden github.com/rakudo/rakudo/releases
arcetera thanx
atweiden see also: aur.archlinux.org/packages/?K=perl6
arcetera atweiden: next time please use http/s:// 20:43
otherwise my url handler doesn't pick it up :P
atweiden sry
20:43 SCHAAP137 left
arcetera it's fine 20:46
now i'm tryna compile just rakudo
aight that worked 20:47
now what other shit do i need to actually get up and running with perl 6
do we have a repl? we have a repl!!!! 20:48
rather than packaging modules i'm just gonna package panda 20:51
Woodi arcetera: did perl ./Configure.pl finished without errors in last build ? 20:52
arcetera yes
we have a repl
Woodi ah, ok :)
20:55 espadrine joined
arcetera packaging panda was much less painless 20:58
awwaiid I see that rakudo is in debian unstable! sweet!
arcetera aight
awwaiid (er, updated 2016.02 version)
arcetera to the five people who use crux 20:59
you can now use my package for an updated ver of rakudo
awwaiid arcetera: nice
20:59 maybekoo2 joined 21:05 pmurias_ left, atweiden left 21:07 Begi left
arcetera well shit 21:09
panda reports this error post-install sprunge.us/gFLS 21:11
here's the Pkgfile sprunge.us/DHVE
the problem is it installs the required libs in /usr/lib not /usr/share/perl6
21:12 spebern joined
arcetera better yet 21:13
it installs a WHOLE LOTTA JUNK
here's the footprint sprunge.us/VRjj
lemme look at the AUR PKGBUILD 21:16
Woodi arcetera: actually this is our newest design ;) 21:18
arcetera oh god i've had to do something oh so very unholy 21:19
21:20 FROGGS[tab] left 21:23 Vitrifur joined, CIAvash left
arcetera i give up on panda 21:27
21:37 nowan_ left 21:45 cdg joined
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:48
couldn't find anything that was fast enough to fill the buffer in the required time 21:49
arcetera aight, now to learn perl6 21:53
I've never used Perl 5 so this'll be interesting
geekosaur perl6 is sufficiently different from perl5 that not knowing perl5 should not matter 21:56
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:58
21:59 TEttinger joined 22:05 robins is now known as robinsmidsrod, kaare_ left 22:11 parisba_ is now known as parisba 22:13 musiKk_ joined 22:17 nowan joined
nine arcetera: you still here? 22:19
arcetera: you posted something on #perl6-toolchain but then left
arcetera nine: i fixed it 22:27
22:33 tmch joined 22:37 tmch left, tmch joined 22:58 rindolf left 23:04 Skarsnik left 23:06 Mouq joined 23:15 SCHAAP137 joined 23:35 grassass left, cdg left 23:37 labster joined 23:50 musiKk_ left 23:56 johndau` joined 23:58 johndau` left 23:59 johndau joined, spebern left