»ö« 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.
perlawhirl how can i round down to a unit? ... 00:40
m: 3650.round(1000) # i want 3000
camelia ( no output )
perlawhirl m: say 3650.round(1000) # i want 3000
camelia rakudo-moar 4a0ba7: OUTPUT«4000␤»
perlawhirl i guess i could... 00:41
perlawhirl m: say (3650 / 1000).floor * 1000 00:41
camelia rakudo-moar 4a0ba7: OUTPUT«3000␤»
geekosaur subtract 1000 (or 100 * signum if you need negative numbers) then round to 1000? 00:42
er 1000 * .signum
AlexDaniel perlawhirl: so .floor should accept a unit just like .round does? This makes sense 00:43
geekosaur actually I meant 500 not 1000 00:44
wheee
geekosaur is probably too tired for this kind of thing
perlawhirl AlexDaniel: it does not :( it was the first thing i tried
geekosaur right, they're taking it as a proposal
it was the first thing I thought of and checked too :p 00:45
perlawhirl geekosaur: the minus 500 thing makes more sense then my divisin/multiplication dance... thanks 00:46
geekosaur bit of a rabbit hole though, do you want round-to-nearest, round-down, round-up, round-to-zero[, round-to-nearest-infinity]?
perlawhirl i don't need negatives 00:47
well... maybe just some :down and :up attribute... eg: 3650.round(1000, :down) 00:48
that's nice without being too obtrusive
because it's named, it also reads niceey as 3650.round(:down, 1000) 00:49
canw Hello 00:50
AlexDaniel hoelzro: февраль :) 00:51
hoelzro: ь missing
timotimo greetings canw 00:53
=
er
AlexDaniel hoelzro: it seems like you didn't provide any links to produced stats. Was it intended? 00:54
canw_ d:\shell>panda install HTTP::UserAgent ==> HTTP::UserAgent depends on DateTime::Parse, Encode, IO::Capture::Simple ==> Fetching DateTime::Parse ==> Building DateTime::Parse ==> Testing DateTime::Parse no such file or directory in sub run-and-gather-output at C:\rakudo\share\perl6\site\sources\5AEF9DA5AE15E5AB5CB2ADB58A455E007FA7839E line 85 in block at C:\rakudo\share\perl6\site\sources\FB10E7A100D50F6DB505EC4DC538BEAB5154DED3 line 00:56
What's wrong? 00:57
timotimo i don't know :( 01:12
i'm not on windows
canw_ d:\shell\panda>panda --notests install HTTP::UserAgent 01:20
add --notests option ok
timotimo mhm 01:28
canw_ thanks 01:31
Herby_ Evening, everyone! 02:00
\o
o/ 02:02
timotimo good night, Herby_ 02:06
Herby_ Good night, sweet prince! 02:07
timotimo see you, space cowpeople
Hotkeys m: my $foo = (1..4) ==> sum; say $foo 02:14
camelia rakudo-moar 4a0ba7: OUTPUT«1..4␤»
Hotkeys Am I misunderstanding pipe
timotimo m: my $foo = (1..4) ==> sum ==> say; say $foo
camelia rakudo-moar 4a0ba7: OUTPUT«5===SORRY!5=== Error while compiling /tmp/id9xSRjxI1␤Preceding context expects a term, but found infix ==> instead␤at /tmp/id9xSRjxI1:1␤------> 3my $foo = (1..4) ==> sum ==>7⏏5 say; say $foo␤»
timotimo m: my $foo = (1..4) ==> sum() ==> say; say $foo 02:15
camelia rakudo-moar 4a0ba7: OUTPUT«5===SORRY!5=== Error while compiling /tmp/RRRfvGv4cj␤Unsupported use of bare "say"; in Perl 6 please use .say if you meant $_, or use an explicit invocant or argument, or use &say to refer to the function as a noun␤at /tmp/RRRfvGv4cj:1␤------> 3…»
timotimo m: my $foo = (1..4) ==> sum() ==> say(); say $foo
camelia rakudo-moar 4a0ba7: OUTPUT«10␤1..4␤»
timotimo i think this is actually (my $foo = (1..4)) ==> sum; that you executed
Hotkeys Oh
Weird
timotimo m: my $foo <== sum() <== (1..4); say $foo
camelia rakudo-moar 4a0ba7: OUTPUT«[10]␤»
timotimo ^- do note that feeds are about lists, so you'll end up with a list here 02:16
Hotkeys Right
skids feeds should not be expected to be a particularly stable API. 02:16
timotimo skids: well, in 6.c they can be expected to be that 02:17
stable, that is
timotimo heads off to bed
skids I think they may have been on the list of features specially called out as incomplete.
timotimo hm. could be
but if we didn't throw out the spec tests ... dunno 02:18
skids tries to find the "nope" gist
Hotkeys Oh I see
So if I wanted to do it my way
I'd have to put it in parens
Hotkeys just looked at s06 02:19
skids Hotkeys: also you'd want &sum I think. 02:19
Hotkeys Right 02:20
sum() works too
skids Shouldn't? 02:21
Like, how would that work, syntactically?
Hotkeys m: (1..4) ==> sum() ==> my @sum; say @sum
camelia rakudo-moar 4a0ba7: OUTPUT«[10]␤»
skids weird. 02:22
OIC it's the external slurpy syntactical thing.
Ben_Goldberg m: (1..4) => sum() => print(); 02:55
camelia rakudo-moar 4a0ba7: OUTPUT«WARNINGS for /tmp/XTqSnENcnr:␤Useless use of "=>" in expression "(1..4) => sum() =>" in sink context (line 1)␤»
Ben_Goldberg m: (1..4) ==> sum() ==> print(); 02:56
camelia rakudo-moar 4a0ba7: OUTPUT«10»
hoelzro .tell AlexDaniel ах, спасибо! Я всегда забаваю мягкий знак =/ 03:31
yoleaux hoelzro: I'll pass your message to AlexDaniel.
hoelzro .tell AlexDaniel I only included stats for single letters to show that my data was consistent with known frequencies; maybe I should've published the rest 03:33
yoleaux hoelzro: I'll pass your message to AlexDaniel.
TEttinger hoelzro: is this russian scrabble or some other word-game thing? 03:48
Гыпогозуск, глынуск сид фавуриджйглътод 03:49
I hope that isn't a swear
it's pseudo-random text gen 03:50
hoelzro none of those words look familiar to me =/
TEttinger because they ain't dictionary words!
hoelzro heh 03:51
TEttinger if it makes a word something very rare happened!
it's for generating gibberish for game-like stuff, for situations like "you wander out of your homeland and don't speak the language"
hoelzro ahhh 03:53
BenGoldberg_ So it's like simlish, but with cryllic letters? 04:02
awwaiid TEttinger: I need to remember to tell people that Perl6 has Dependent Types :) 04:04
TEttinger yep! perl 6 has many features that are rare, and it's inspiring to see how many new things are here. I may make the effort to learn p6 fully when performance is better 04:06
awwaiid I'm still trying to learn it minimally :) . I'm still trying to figure out the axioms.
Hotkeys What are dependent types in perl 6 04:28
is that the 'where' pattern
awwaiid: 04:29
awwaiid ya 04:51
sjn TEttinger: If I were you, I'd start learning Perl 6 now, and when you're comfortable with it (after enough coding) chances are that much of the performance you're looking for now will be there :) 04:57
TEttinger: and if it's not, or you find some things are less performant than you'd like, while you're learning and experimenting, then you'd be giving useful feedback here about what would be useful to make faster :D 04:58
TEttinger mostly I have stuff people depend on me for now, and that's currently java code. I'd like to rewrite another version of this game lib someday, but I doubt that would be a good use for perl 6 05:00
sjn sure
in the meantime, play around, learn the different bits of it :)
perlawhirl hi perlers 06:05
halp
hastebin.com/ubupetipez.perl 06:06
i've never written one of these udp thingys... the perl one works perfectly, but now i'm trying to write the listener in perl6 and i'm failing hard
perlawhirl i'm pretty much copy/pasting exsamples from the docs, so mabe those examples don't exactly map to the write solution. anyone point me in the right direction 06:07
ermm... s/write/right/
jdv79 did you look at the tests? (S32-io/IO-Socket-Async-UDP.t) 06:13
jdv79 perlawhirl: seems to work - gist.github.com/anonymous/e82c7c424cb49e4ee6b5 06:24
perlawhirl i'm looking at them now... i'm still struggling to get a working example. different machines
oh thanks... i will have a look
jdv79 nite
Timbus yeah the async one you pasted works for me =/ 06:26
perlawhirl it's still not working for me. my sender and recever are different machines. sender is p5. i'll keep poking at it and see what... 06:27
oh
it works for you? which version of rakudo?
Timbus This is Rakudo version 2016.02-72-g50a4df3 built on MoarVM version 2016.02
perlawhirl This is Rakudo version 2016.02 built on MoarVM version 2016.02
Timbus so, at most a few weeks there. should be working then =/ 06:28
how bout a localhost test 06:29
perlawhirl yeah, i'll keep poking and prodding
perlawhirl ideally i need it working from a separate machine, and sender is one of our old solaris boxes i do not have admin on, so i need it to work with p5 sender 06:30
Timbus that's fair
but if it works locally but not over a host, there might be more involved...
perlawhirl thanks Timbus, good point... i will try a local p5->p6 implementaion first and see if i can get that working 06:31
gotta go now... feel free to provide extra help if you want! :D i'll check the logs later
Timbus just use the netcat example aaa he's gone 06:31
_nadim Good morning. 07:43
given a string to be split in chuncks of , say, 5 characters, what would be the cleanest way to do it? subst? split? comp? 07:44
comb
masak comb, I'd say 07:47
what do you want to happen at the end of the string, if there's < 5 characters left? 07:48
m: .say for "abcdefghijkl".comb(/. ** 1..5/)
camelia rakudo-moar 4a0ba7: OUTPUT«abcde␤fghij␤kl␤»
_nadim get it back 07:49
masak then the above should do you fine 07:50
_nadim yes it should :)
nine m: dd "foobarbazq".comb(3) 07:51
camelia rakudo-moar 4a0ba7: OUTPUT«("foo", "bar", "baz", "q").Seq␤»
nine _nadim: ^^^ 07:52
_nadim even better
masak ooh, didn't know about that one
_nadim P6 code can get "dangerously compact when one takes time
Hotkeys check out this wonderful compactness I made today for codegolf 07:58
{[»+«](@^a Z»*»@^b) »/»sum @b}
Finds center of mass given a list of points and a list of their respective masses
m: my &CoM = {[»+«](@^a Z»*»@^b) »/»sum @b}; say CoM([[0,2],[3,4],[0,1],[1,1]],[2,6,2,10]); say CoM([[3,1],[0,0],[1,4]],[2,4,1]) 07:59
camelia rakudo-moar 4a0ba7: OUTPUT«[1.4 2]␤[1 0.857143]␤»
Hotkeys _nadim:
masak it's so good to see the new generation discover these little things <3
Hotkeys new generation? 08:00
masak Hotkeys: I'm sorry, maybe I misremember. maybe you've been here for years and years and I forgot 08:02
Hotkeys oh
I haven't been here that long
only a few months
masak pleased to meet you
been here since 2005 ;)
Hotkeys ah
it seems I am new generation 08:03
:p
in 2005 I was barely a person
masak heh
Hotkeys (are 8 year olds people?)
tweakism yes, terrible ones. 08:04
Hotkeys okay
in 2005 I was a terrible person
tweakism a terrible, little, dirty, person who needed constant supervision.
…it's probably a good thing that I don't have kids. 08:05
moritz ah well, even those of us how are kids are terrible persons :-) 08:14
[Tux] test 21.657 08:18
test-t 12.648
csv-parser 51.950
lizmat clickbaits the Perl 6 Weekly again: p6weekly.wordpress.com/2016/03/07/...-enchante/ 08:19
moritz reddit'ed 08:23
moritz lizmat++ 08:24
_nadim is there any ETA for private multi? 08:40
masak no
tadzik yay, p6weekly 08:41
yoleaux 5 Mar 2016 11:14Z <azawawi> tadzik: please enable Travis CI / App
_nadim and a reason why they are not supported, technical that is not because of time.
yoleaux 5 Mar 2016 11:14Z <azawawi> tadzik: please enable Travis CI / AppVeyor support. See github.com/tadzik/Shell-Command/pull/10
tadzik oh gawd
tadzik hides
masak tadzik! \o/ 08:42
tadzik funny how github notifies me of changes in ingy's mo-pm, but not in my own Shell-Command
masak! \o/ 08:43
masak: in Germany already?
masak tadzik: no, but will be this evening 08:43
tadzik ossum
me and sergot land at 18-ish
tadzik azawawi: thanks for the PR, I'll get it somewhere today/tomorrow, since it requires digging into panda's dependencies, bootstrap etc 08:44
masak _nadim: I don't have the whole story, but... private methods are actually not late-bound. in that sense, they are more like subs than like methods. 08:45
_nadim: naively one would think that the solution would then look like multisubs. but I don't know if it's that easy.
RabidGravy yeah, I've actually done something using multi subs that gives the effect of private multi methods, can't remember what it is in though 08:50
masak seems to me you could emulate it easily by turning `multi method !foo($x, $y)` into `multi sub foo($self, $x, $y)` 08:51
_nadim: would that be an option for you?
moritz the difference is that you can't declare trusts, and that you don't get access to it when augmenting the class
masak troo 08:52
there's probably a workaround for the trusts thing, too (using composition, say) -- but it'd be slightly more involved
moritz you could always have method !wrapper(|c) { callthesub(|c) } 08:53
RabidGravy oh yeah there are reasons they would be good things but there are ways of working round the common case so I'm relaxed about it
DrForr lucs: I'm around now. 09:01
(not that you are, but at least it serves notice :) ) 09:02
lizmat afk for a few hours& 09:05
ab6tract o/ #perl6 09:21
DrForr \o 09:22
DrForr \m/ # as well... Changing sound streams to suit. 09:22
ab6tract DrForr: :D 09:23
RabidGravy harr!
ab6tract m: my %h = x => 'y'; say %h.invert{'y'}; say %h.invert.Hash{'v'} 09:24
camelia rakudo-moar 4a0ba7: OUTPUT«Type Seq does not support associative indexing.␤ in block <unit> at /tmp/PbmqQlSHnY line 1␤␤Actually thrown at:␤ in block <unit> at /tmp/PbmqQlSHnY line 1␤␤»
RabidGravy Ooh didn't know there was a docker image for informix
ab6tract i was curious whether this feels weird to anyone else
DrForr (Motõrhead covering /Enter Sandman/ in this case.) 09:25
ab6tract i understand the Seq not doing assoc indexing, but it also seems to make things cluttered
RabidGravy It's .hash not .Hash 09:27
ooh no it's both 09:28
ab6tract RabidGravy: any hash constructor/coercer will work 09:33
RabidGravy the only time I've use invert I've assigned it straight to another hash
ab6tract m: my %h = x => 'y'; say %h.invert{'y'}; say %(%h.invert){'v'} 09:34
camelia rakudo-moar 4a0ba7: OUTPUT«Type Seq does not support associative indexing.␤ in block <unit> at /tmp/1xA5hJF2kW line 1␤␤Actually thrown at:␤ in block <unit> at /tmp/1xA5hJF2kW line 1␤␤»
ab6tract m: my %h = x => 'y'; say %(%h.invert){'v'}
camelia rakudo-moar 4a0ba7: OUTPUT«(Any)␤»
ab6tract m: my %h = x => 'y'; say %(%h.invert){'y'}
camelia rakudo-moar 4a0ba7: OUTPUT«x␤»
moritz ab6tract: invert returns a Seq (or List or whatever), because hash values aren't always unique
ab6tract moritz: that's fair i suppose 09:35
moritz: i thought that used to work though, but i take your point 09:36
RabidGravy There "IBM Informix Dynamic Server Version 12.10.FC6IE -- On-Line -- Up 00:04:45 -- 156276 Kbytes" gigantic image though 09:50
timotimo o/ 10:12
donaldh o/ 10:17
RabidGravy right off out for a bit 10:49
toodles
nine OT but fun: aadrake.com/command-line-tools-can-...uster.html 11:28
timotimo yeah
"we've reached 2 gigabytes of data, we can't solve our problems without Big Data applications now!"
arnsholt Indeed. Big data proper is more in the terabyte neck of the woods than gigabytes 11:29
timotimo yeah. if it fits in your ram, it's definitely not big data
if it fits on an SSD, it's probably also not big data yet 11:30
nine SSDs are now larger than HDDs
timotimo amazingly, yeah
but also quite expensive :D
ilmari if it fits on one server, it's not big data 12:04
timotimo unless it's a big server :P 12:10
llfourn nine: that was a great article thanks 12:21
fireartist nine: thanks for that link - I had no idea about xargs -n flag! 12:30
xargs -I str # who knew? that's awesome! 12:31
timotimo xargs has a really, really long synopsis section in its manpage 12:32
fireartist I had never before looked at its manpage! :-| 12:33
timotimo i use xargs extremely rarely
i should obviously reconsider
fireartist the number of times I've wished I could use xargs with the piped args not at the end of the arguments list, and ended up writing intermediary scripts... 12:34
xiaomiao arnsholt: terabyte is still not big data 12:35
xiaomiao around 1PB I would consider calling it 'big', and even then ... that's easy to store 12:35
nine xargs is one of the best parallelization tools ever 12:56
tweakism I wish there was some way with xargs -I to not force-imply -n 1, something that might work similar to to find's -exec {} + 12:58
I dunno if there's some technical reason it can't have that, or it just doesn't happen to have ever been added, or I just don't know how to do it. 12:59
fireartist looks like you can pipe 2 xargs to get the same affect: | xargs -n 2 | xargs -I {} ... 13:11
tweakism that combines pairs of input files into single arguments 13:18
printf 'one\ntwo\nthree\nfour\n' | xargs -n 2 | xargs -I {} printf '[%s]\n' {} 13:19
[one two]
[three four]
perlawhirl hi perlers 13:31
ummm... how do i turn a unicode codepoint into a char?
in perl
tweakism chr() ? 13:32
perlawhirl umm... what format should the code point be in 13:33
tweakism a number.
nine is on a train :)
perlawhirl lets use pi as an example... how would one turn 03C0 into the pi symbol
m: say chr(03C0); say chr('03C0') 13:34
camelia rakudo-moar 4a0ba7: OUTPUT«5===SORRY!5===␤Unable to parse expression in argument list; couldn't find final ')' ␤at /tmp/wKyz1NutiG:1␤------> 3say chr(037⏏5C0); say chr('03C0')␤ expecting any of:␤ whitespace␤Other potential difficulties:␤ Leading …»
tweakism m: say chr(0x03c0)
camelia rakudo-moar 4a0ba7: OUTPUT«π␤»
perlawhirl ahhhh
ok 0x
tweakism for hex
perlawhirl that's what i need to know
thanks
riiight
i'm just a caveman... your unicode frightens and confuses me 13:35
nine m: say chr 0x3c0
camelia rakudo-moar 4a0ba7: OUTPUT«π␤»
tweakism m: say chr(960)
camelia rakudo-moar 4a0ba7: OUTPUT«π␤»
tweakism m: say ord('π') 13:35
camelia rakudo-moar 4a0ba7: OUTPUT«960␤»
perlawhirl ta, lads
tweakism perlawhirl: I'm sure there's an escape sequence (probs \u or \U) for use in strings, too. 13:36
perlawhirl i tried \U, i think 13:39
jnthn m: say "\x3c0"
camelia rakudo-moar 4a0ba7: OUTPUT«π␤»
perlawhirl yeah, unrecognised
all good, the chars are in 'U03C0' format... so i'm just doing chr $foo.subst(/U/,'0x') 13:40
m: my $foo = 'U03C0'; say chr( $foo.subst('U', '0x') ); 13:42
camelia rakudo-moar 4a0ba7: OUTPUT«π␤»
dalek osystem: 61f0f36 | donaldh++ | META.list:
Add RPi::GpioDirect to ecosystem

See github.com/donaldh/Perl6-RPi-GpioDirect
13:51
pmurias hi 13:52
donaldh is using NativeCall CArray for GPIO bit twiddling :) ^^^ 13:53
donaldh Is there any way to uninstall precompiled modules? 13:57
donaldh is guessing that cleaning out install/share/perl6/site is the brute-force way 14:00
hoelzro o/ #perl6 14:43
pmurias hoelzro: \o 14:44
the rakudo-js grant has been approved :) 14:46
donaldh pmurias++
jnthn pmurias++
llfourn \o/ # pmurias++ 14:47
rudi_s I have a simple class which contains a few instance variables which are all read-only. How can I create a copy of it with a few modified values? Foo.new( <- all variables here + the ones I want to update). 14:49
sjn pmurias++ # sweet JSus, what have you done? :D
pmurias sjn: the grant work still needs to be done ;) 14:50
sjn rudi_s: you can add an "is copy" trait to the variables, iirc
moritz rudi_s: $instnance.clone(newattr => 1, newattr2 => 2)
donaldh how often does the ecosystem modules.json update? 14:50
moritz donaldh: at least hourly
sjn rudi_s: or just listen to moritz :)
hoelzro o/ pmurias 14:51
\o/
that's great news!
pmurias++
donaldh moritz: thanks, it just updated as I asked the question :) 14:52
jnthn m: class A { has $.x; has $.y; }; my $a = A.new(x => 1, y => 2); my $b = $a.clone(x => 4); say $a; say $b
camelia rakudo-moar 4a0ba7: OUTPUT«A.new(x => 1, y => 2)␤A.new(x => 4, y => 2)␤»
jnthn rudi_s: ^^
hoelzro m: if False { my $ln = require Linenoise; } # is this a rakudobug?
camelia rakudo-moar 4a0ba7: OUTPUT«5===SORRY!5=== Error while compiling /tmp/yCykytdxbT␤Undeclared name:␤ Linenoise used at line 1␤Undeclared routine:␤ require used at line 1␤␤»
hoelzro that shouldn't error out, should it? 14:53
jnthn m: if False { my $ln = do require Linenoise; }
camelia ( no output )
jnthn hoelzro: It's a statement
hoelzro ahhh
so why does `my $ln = require Linenoise` parse?
hoelzro oh, I think I know the answer to my own question 14:54
tadzik anyone planning on a pre-conf beer at GPW? 14:55
rudi_s sjn: moritz: jnthn: Thank you!
hoelzro is that an error message we can improve? The initial approach I can think of is naïve and would probably considerably slow down the compiler, which is even LTA than the error message
sjn is just next to the GPW pre-conf pub right now, actually
tadzik: if you're around, I'm at a cafe called "Black Bean" just sround the corner from Barfuß 14:56
tadzik sjn: I'll arrive around 18-ish to NUE 14:57
to it'll be a while prolly
japhb Congrats, pmurias++ ! 15:10
Ven jnthn++ # nice thread memory size savings 15:11
RabidGravy boom 15:16
llfourn has anyone else been experiencing race conditions with locks in precomp recently? 15:31
perlpilot reads scrollback to find out why japhb is congratulating pmurias 15:48
ah rakudo-js ... Good luck pmurias :)
(and congrats of course) 15:49
Hotkeys Is there any support for STM in p6? Or is it planned? 16:10
I was considering taking on the task of attempting to implement it
pmurias there was STM support in pugs 16:15
RabidGravy I take it you mean "software transactional memory" and none of the other billion possible expansions 16:16
Ven pmurias: ooooh, did your grant get accepted? 16:18
RabidGravy: yes :P
RabidGravy I actually wanted object level transactions the other day
perlpilot Hotkeys: see 6guts.wordpress.com/2014/04/17/rac...ess-leads/ 16:20
(that's the only rakudo reference to STM that I remember. Perl 6 has bounced around STM for 10 years or so, but I don't know that anyone is doing anything about it now) 16:22
pmurias Ven: yes 16:23
Anyone wants to be suggested as grant manager for the rakudo-js grant? 16:24
Ven is very excited
this is an astounding news, I'm gonna share it to a few people :D.
pmurias there should be an official TPF blog post in a couple days 16:26
DrForr I'm working with Tom Hukins.
timotimo pmurias++ 16:27
dalek p: 66d0ca2 | (Pawel Murias)++ | src/vm/js/ (4 files):
[js] Implement nqp::setmessage, nqp::setpayload, nqp::getpayload, nqp::throw and VMException REPR.
16:28
p: 431361b | (Pawel Murias)++ | src/vm/js/ (3 files):
[js] Implement nqp::newexception.

Needs to be integrated with HLL support.
p: d8953b6 | (Pawel Murias)++ | t/nqp/44-try-catch.t:
Test nqp::newexception, nqp::throw, nqp::setpayload, nqp::getpayload, nqp::setmessage, nqp::getmessage.
ugexe pmurias++ # great news 16:42
[Coke] pmurias++ 16:50
[Coke] I can be a GM if you need. 16:51
timotimo coke the dungeon master
pmurias [Coke]: thank you, I'll suggest you then ;) 16:52
Skarsnik ++ for perl6 in js :) 16:53
[Coke] pmurias: so, start planning your first blog post. :) 16:54
[Coke] ingy++ # vroom 17:14
[Coke] puts together a slide deck at a company that is known for powerpoint presentations about git using vroom. whee.
Skarsnik How do I skip a whenever block? I mean to say "do nothing/skip" like 17:42
timotimo you can just "next" it
Skarsnik thx :) 17:46
timotimo and when you're done with the whenever's job, you can "last" out of it 17:50
ingy [Coke]: :) 17:59
kaare_ How would you define a native call where the argument is a pointer to "a fixed size buffer"? 18:14
arnsholt CArray[int8], or similar 18:17
kaare_ OK? But the buffer size is system defined, I think. 18:19
timotimo CPointer would also do it, and you can always NativeCast. though if the buffer is supposedly a "buffer of bytes", CArray[int8] is likely a better choice
kaare_ OK, I'll try. Thankx 18:20
timotimo you have to get the size of the buffer somehow in any case
the C ABI doesn't have anything standardized for sized buffers
DrForr Something recently (haven't updated rakudobrew for a few days) just sent performance through the floor. 19:47
[Coke] DrForr: you going to bisect? 19:48
And/Or do you have a small benchmark that shows it?
and how are you running rakudobrew? 19:49
DrForr No, because I'm afraid I wouldn't be able to run a single test. 19:50
[Coke] What are you seeing a performance problem on? 19:51
DrForr 'use Test' pretty much kills the VM. I'll completely delete .rakudobrew and reinstall. 19:54
80% drive usage, load average hit about 5 when trying to run a test script.. 19:55
[Coke] so just perl6 -e 'use Test;' is causing you trouble? 19:56
(first run, or future runs?)
"make test" which uses Test, seems like it's about the same. (fast on everythign but nativecall) 19:57
DrForr It could be something odd in Crust, but its internal tests seemed to rn, I didn't take notice of the actual time because I don't expect much of VM performance.
[Coke] you said VM - you have a small CPU/mem limit on the VM, OOC? 19:58
DrForr 2GiB, I haven't changed the setup in about 6 months, so that shouldn't be a factor.
Running internally on MoarVM, I just blew away .rakudobrew and recloned. 20:00
dalek osystem: a55512d | RabidGravy++ | META.list:
Add Audio::Hydrogen

see github.com/jonathanstowe/Audio-Hydrogen
20:02
RabidGravy who was it that said they'd be interested in that? 20:04
DrForr Also, should I still be doing 'rakudobrew build panda' to get Panda running, or is there a more recommended method? 20:07
pyrimidine . o O ( realized I need to set up some NativeCall bindings for bioinformatics ) 20:08
RabidGravy anyway another one off the yak listing 20:14
DrForr Chromium may also have been partially at fault, I'll see in a moment. 20:21
DrForr Sigh. It appears actually to be a recursive loop when a module attempts to 'use' itself. Admittedly a boneheaded move on my part, but I'll confirm ad file a bug. 20:24
RabidGravy I thought that went away ages ago 20:26
DrForr So did I, which was probaby partially why I overlooked it. 20:27
Actually this isn't 'unit class Foo; use Foo;' but just 'use Foo;' in file Foo.pm6.
ugexe are any other processes running that would try to be using the precomp'd Foo.pm6? 20:31
DrForr Only perl6 and that's not running. 20:32
dalek p: 24db816 | (Pawel Murias)++ | src/vm/js/nqp-runtime/core.js:
[js] Fix stuff found by "make js-lint".
22:02
timotimo hmm 22:14
Skarsnik timotimo, I get a next without loop construct for next in a whenever block 22:15
timotimo oh? :o
Skarsnik m: react { whenever Supply.Interval(2) { next ; } }; 22:17
camelia rakudo-moar 4a0ba7: OUTPUT«No such method 'Interval' for invocant of type 'Supply'␤ in block <unit> at /tmp/1Aw0ihenjE line 1␤␤»
Skarsnik m: react { whenever Supply.interval(2) { next ; } };
camelia rakudo-moar 4a0ba7: OUTPUT«===SORRY!===␤next without loop construct␤»
Skarsnik m: react { whenever Supply.interval(2) { return ; say "hello"} }; 22:18
camelia rakudo-moar 4a0ba7: OUTPUT«Attempt to return outside of any Routine␤ in block <unit> at /tmp/CLiyML6Zfj line 1␤␤»
timotimo is that just an oversight?
i mean, you can still justt put your stuff into a n if statement to get what you want, but i'd really have expected next to work 22:19
Skarsnik Yes, I put a if False {} around the code inside
but meh
RabidGravy I'm not sure 'next' makes sense, 'next' what? 22:20
tweakism Does anyone here have (purchased) PragmataPro 0.821 ? I need to confirm their md5sums. 22:20
timotimo RabidGravy: "continue whenever the next thing appears" 22:21
RabidGravy but it does anyway
timotimo what does what anyway? 22:22
donaldh doc.perl6.org/language/control#next
RabidGravy the whenever block is just a fancy tap some default done/quit things not a loop 22:24
timotimo but it is very much like a loop
dalek c: 77a45e6 | coke++ | doc/Language/control.pod:
add whitespace to code sample
perlpilot a whenever block is quite like a loop that iterates the supply.
timotimo and you can already "last" inside a whatever loop to close your tap on the supply
so why wouldn't it allow to skip the rest of the current iteration with "next"? 22:25
for what it's worth, a "for" loop is just a map call, not a loop.
RabidGravy if that makes sense to you
timotimo it absolutely makes sense to me
perlpilot That's pretty much how we're going to explain it to people so ... ;) 22:27
RabidGravy y'see it doesn't make sense to me 22:29
perlpilot for iterates things that come from a list; whenever iterates things that come from a supply. What doesn't make sense? 22:35
timotimo i don't understand why it doesn't make sense to you :) 22:37
RabidGravy because I don't see the iteration 22:41
it could be thought of as doing that sure, but you could think of a subroutine as iterating over its callers too 22:42
timotimo that's true 22:50
but subroutine calls don't get invoked with a word starting in "wh", like "while" or "whenever" :)
Skarsnik But having a word to skip this execution could be nice x) 22:51
ugexe m: sub foo { supply { emit($_) for 1..10; }; }; react { whenever foo() { next if $_ > 3; say $_; }; }; 22:57
camelia rakudo-moar 4a0ba7: OUTPUT«1␤2␤3␤»
timotimo i think that only works "by accident" :)
ugexe we call those happy accidents 22:59
RabidGravy well possibly the next straight in there is afflicted similarly to done not work under the same circumstance 23:00
timotimo i'd even say that the next in that example ugexe put is a bug 23:03
because anything after the emit would also be skipped (if it were still in that for loop) 23:04
ugexe m: sub foo { supply { for 1..10 { emit($_); say "HONK"; }; }; }; react { whenever foo() { next if $_ > 3; say $_; }; }; # this? 23:09
camelia rakudo-moar 4a0ba7: OUTPUT«1␤HONK␤2␤HONK␤3␤HONK␤»
ridthyself Greetings! I've installed rakudo and am playing around with the REPL. How do I import a .p6 file? 23:10
timotimo with "use lib '.'" (or -I. as a commandline switch) you can tell rakudo to look in the current folder for things, and then you can "use TheThing" 23:11
ridthyself Wonderful! thanks! 23:12
ugexe -I doesnt work with the REPL though 23:13
hoelzro it doesn't?
interesting 23:14
timotimo damn 23:16
but at least it'll be visibly absent in the list of things looked at