Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-03-08

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:04 skids joined #perl6
00:16 [particle] joined #perl6
00:21 themonkeybob11 joined #perl6
00:24 johndau joined #perl6
00:38 perlawhirl joined #perl6
00:40 perlawhirl how can i round down to a unit? ...
00:40 perlawhirl m: 3650.round(1000) # i want 3000
00:40 camelia rakudo-moar 4a0ba7: ( no output )
00:40 perlawhirl m: say 3650.round(1000) # i want 3000
00:40 camelia rakudo-moar 4a0ba7: OUTPUT«4000␤»
00:41 perlawhirl i guess i could...
00:41 perlawhirl m: say (3650 / 1000).floor * 1000
00:41 camelia rakudo-moar 4a0ba7: OUTPUT«3000␤»
00:42 geekosaur subtract 1000 (or 100 * signum if you need negative numbers) then round to 1000?
00:42 geekosaur er 1000 * .signum
00:43 AlexDaniel perlawhirl: so .floor should accept a unit just like .round does? This makes sense
00:44 geekosaur actually I meant 500 not 1000
00:44 geekosaur wheee
00:44 * geekosaur is probably too tired for this kind of thing
00:44 perlawhirl AlexDaniel: it does not :( it was the first thing i tried
00:44 geekosaur right, they're taking it as a proposal
00:44 geekosaur it was the first thing I thought of and checked too :p
00:46 petercommand joined #perl6
00:46 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]?
00:46 perlawhirl i don't need negatives
00:48 perlawhirl well... maybe just some :down and :up attribute... eg: 3650.round(1000, :down)
00:48 perlawhirl that's nice without being too obtrusive
00:49 perlawhirl because it's named, it also reads niceey as 3650.round(:down, 1000)
00:49 canw joined #perl6
00:50 canw Hello
00:51 AlexDaniel hoelzro: февраль :)
00:51 AlexDaniel hoelzro: ь missing
00:53 timotimo greetings canw
00:53 timotimo =
00:53 timotimo er
00:54 AlexDaniel hoelzro: it seems like you didn't provide any links to produced stats. Was it intended?
00:56 canw_ joined #perl6
00:56 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 lin
00:56 canw_ What's wrong?
01:05 BenGoldberg joined #perl6
01:12 timotimo i don't know :(
01:12 timotimo i'm not on windows
01:12 idiosyncrat_ joined #perl6
01:20 canw_ d:\shell\panda>panda --notests install HTTP::UserAgent
01:20 canw_ add --notests option ok
01:26 araujo joined #perl6
01:28 araujo joined #perl6
01:28 timotimo mhm
01:31 canw_ thanks
01:32 perlawhirl joined #perl6
01:45 perlawhirl joined #perl6
01:55 zpmorgan joined #perl6
01:59 Herby_ joined #perl6
02:00 Herby_ Evening, everyone!
02:00 Herby_ \o
02:02 Herby_ o/
02:06 timotimo good night, Herby_
02:07 Herby_ Good night, sweet prince!
02:07 timotimo see you, space cowpeople
02:14 Hotkeys m: my $foo = (1..4) ==> sum; say $foo
02:14 camelia rakudo-moar 4a0ba7: OUTPUT«1..4␤»
02:14 Hotkeys Am I misunderstanding pipe
02:14 timotimo m: my $foo = (1..4) ==> sum ==> say; say $foo
02:14 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␤»
02:15 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…»
02:15 timotimo m: my $foo = (1..4) ==> sum() ==> say(); say $foo
02:15 camelia rakudo-moar 4a0ba7: OUTPUT«10␤1..4␤»
02:15 timotimo i think this is actually (my $foo = (1..4)) ==> sum; that you executed
02:15 Hotkeys Oh
02:15 Hotkeys Weird
02:15 timotimo m: my $foo <== sum() <== (1..4); say $foo
02:15 camelia rakudo-moar 4a0ba7: OUTPUT«[10]␤»
02:16 timotimo ^- do note that feeds are about lists, so you'll end up with a list here
02:16 Hotkeys Right
02:16 kalkin--- joined #perl6
02:16 skids feeds should not be expected to be a particularly stable API.
02:17 timotimo skids: well, in 6.c they can be expected to be that
02:17 timotimo stable, that is
02:17 * timotimo heads off to bed
02:17 skids I think they may have been on the list of features specially called out as incomplete.
02:17 timotimo hm. could be
02:18 timotimo but if we didn't throw out the spec tests ... dunno
02:18 * skids tries to find the "nope" gist
02:18 Hotkeys Oh I see
02:18 Hotkeys So if I wanted to do it my way
02:18 Hotkeys I'd have to put it in parens
02:19 * Hotkeys just looked at s06
02:19 skids Hotkeys: also you'd want &sum I think.
02:20 Actualeyes joined #perl6
02:20 Hotkeys Right
02:20 Hotkeys sum() works too
02:21 skids Shouldn't?
02:21 skids Like, how would that work, syntactically?
02:21 Hotkeys m: (1..4) ==> sum() ==> my @sum; say @sum
02:21 camelia rakudo-moar 4a0ba7: OUTPUT«[10]␤»
02:22 skids weird.
02:22 skids OIC it's the external slurpy syntactical thing.
02:37 BenGoldberg joined #perl6
02:39 Ben_Goldberg joined #perl6
02:55 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)␤»
02:56 Ben_Goldberg m: (1..4) ==> sum() ==> print();
02:56 camelia rakudo-moar 4a0ba7: OUTPUT«10»
03:16 noganex joined #perl6
03:17 perlawhirl joined #perl6
03:31 hoelzro .tell AlexDaniel ах, спасибо! Я всегда забаваю мягкий знак =/
03:31 yoleaux hoelzro: I'll pass your message to AlexDaniel.
03:31 BenGoldberg_ joined #perl6
03:33 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.
03:45 noganex_ joined #perl6
03:48 TEttinger hoelzro: is this russian scrabble or some other word-game thing?
03:49 TEttinger Гыпогозуск, глынуск сид фавуриджйглътод
03:49 TEttinger I hope that isn't a swear
03:50 TEttinger it's pseudo-random text gen
03:50 hoelzro none of those words look familiar to me =/
03:50 TEttinger because they ain't dictionary words!
03:51 hoelzro heh
03:51 TEttinger if it makes a word something very rare happened!
03:51 TEttinger it's for generating gibberish for game-like stuff, for situations like "you wander out of your homeland and don't speak the language"
03:53 hoelzro ahhh
04:02 BenGoldberg_ So it's like simlish, but with cryllic letters?
04:03 molaf joined #perl6
04:04 awwaiid TEttinger: I need to remember to tell people that Perl6 has Dependent Types :)
04:06 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.
04:28 Hotkeys What are dependent types in perl 6
04:28 Hotkeys is that the 'where' pattern
04:29 Hotkeys awwaiid:
04:33 jack_rabbit joined #perl6
04:42 vendethiel joined #perl6
04:44 clayton_ joined #perl6
04:51 awwaiid ya
04:57 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:58 sjn 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
05:00 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
05:00 sjn in the meantime, play around, learn the different bits of it :)
05:39 Cabanossi joined #perl6
05:39 yeahnoob joined #perl6
05:46 bjz joined #perl6
05:56 bjz joined #perl6
06:05 perlawhirl joined #perl6
06:05 perlawhirl hi perlers
06:05 perlawhirl halp
06:06 perlawhirl http://hastebin.com/ubupetipez.perl
06:06 perlawhirl 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
06:06 jack_rabbit joined #perl6
06:07 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 perlawhirl ermm... s/write/right/
06:13 jdv79 did you look at the tests? (S32-io/IO-Socket-Async-UDP.t)
06:19 darutoko joined #perl6
06:24 bjz joined #perl6
06:24 jdv79 perlawhirl: seems to work - https://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
06:24 perlawhirl oh thanks... i will have a look
06:24 jdv79 nite
06:26 araujo_ joined #perl6
06:26 Timbus yeah the async one you pasted works for me =/
06:27 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 perlawhirl oh
06:27 perlawhirl it works for you? which version of rakudo?
06:27 Timbus This is Rakudo version 2016.02-72-g50a4df3 built on MoarVM version 2016.02
06:27 perlawhirl This is Rakudo version 2016.02 built on MoarVM version 2016.02
06:28 Timbus so, at most a few weeks there. should be working then =/
06:29 Timbus how bout a localhost test
06:29 perlawhirl yeah, i'll keep poking and prodding
06:30 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
06:30 Timbus but if it works locally but not over a host, there might be more involved...
06:31 perlawhirl thanks Timbus, good point... i will try a local p5->p6 implementaion first and see if i can get that working
06:31 perlawhirl gotta go now... feel free to provide extra help if you want! :D i'll check the logs later
06:31 Timbus just use the netcat example aaa he's gone
06:41 CIAvash joined #perl6
06:46 bjz joined #perl6
06:55 m0ltar joined #perl6
07:04 domidumont joined #perl6
07:09 domidumont joined #perl6
07:15 firstdayonthejob joined #perl6
07:24 wamba joined #perl6
07:40 FROGGS joined #perl6
07:42 jjido joined #perl6
07:43 nakiro joined #perl6
07:43 _nadim Good morning.
07:44 _nadim 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 _nadim comb
07:47 masak comb, I'd say
07:48 masak what do you want to happen at the end of the string, if there's < 5 characters left?
07:48 masak m: .say for "abcdefghijkl".comb(/. ** 1..5/)
07:48 camelia rakudo-moar 4a0ba7: OUTPUT«abcde␤fghij␤kl␤»
07:49 _nadim get it back
07:50 masak then the above should do you fine
07:50 _nadim yes it should :)
07:51 nine m: dd "foobarbazq".comb(3)
07:51 camelia rakudo-moar 4a0ba7: OUTPUT«("foo", "bar", "baz", "q").Seq␤»
07:52 nine _nadim: ^^^
07:52 _nadim even better
07:52 masak ooh, didn't know about that one
07:52 _nadim P6 code can get "dangerously compact when one takes time
07:53 fireartist joined #perl6
07:55 rindolf joined #perl6
07:58 Hotkeys check out this wonderful compactness I made today for codegolf
07:58 Hotkeys {[»+«](@^a Z»*»@^b) »/»sum @b}
07:58 Hotkeys Finds center of mass given a list of points and a list of their respective masses
07:59 Hotkeys 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]␤»
07:59 Hotkeys _nadim:
07:59 masak it's so good to see the new generation discover these little things <3
08:00 Hotkeys new generation?
08:01 abraxxa joined #perl6
08:02 zakharyas joined #perl6
08:02 masak Hotkeys: I'm sorry, maybe I misremember. maybe you've been here for years and years and I forgot
08:02 Hotkeys oh
08:02 Hotkeys I haven't been here that long
08:02 Hotkeys only a few months
08:02 masak pleased to meet you
08:02 masak been here since 2005 ;)
08:02 Hotkeys ah
08:03 Hotkeys it seems I am new generation
08:03 Hotkeys :p
08:03 Hotkeys in 2005 I was barely a person
08:03 masak heh
08:03 Hotkeys (are 8 year olds people?)
08:04 tweakism yes, terrible ones.
08:04 Hotkeys okay
08:04 Hotkeys in 2005 I was a terrible person
08:04 tweakism a terrible, little, dirty, person who needed constant supervision.
08:05 tweakism …it's probably a good thing that I don't have kids.
08:07 Laurent_R joined #perl6
08:14 moritz ah well, even those of us how are kids are terrible persons :-)
08:15 sno joined #perl6
08:18 [Tux] test            21.657
08:18 [Tux] test-t          12.648
08:18 [Tux] csv-parser      51.950
08:19 * lizmat clickbaits the Perl 6 Weekly again: https://p6weekly.wordpress.com/2016/03/07/2016-10-enchante/
08:23 moritz reddit'ed
08:24 RabidGravy joined #perl6
08:24 moritz lizmat++
08:38 wamba joined #perl6
08:40 _nadim is there any ETA for private multi?
08:40 masak no
08:41 tadzik yay, p6weekly
08:41 yoleaux 5 Mar 2016 11:14Z <azawawi> tadzik: please enable Travis CI / App
08:41 _nadim and a reason why they are not supported, technical that  is not because of time.
08:41 yoleaux 5 Mar 2016 11:14Z <azawawi> tadzik: please enable Travis CI / AppVeyor support. See https://github.com/tadzik/Shell-Command/pull/10
08:41 tadzik oh gawd
08:41 * tadzik hides
08:42 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
08:43 tadzik masak! \o/
08:43 tadzik masak: in Germany already?
08:43 tmch joined #perl6
08:43 masak tadzik: no, but will be this evening
08:43 tadzik ossum
08:43 tadzik me and sergot land at 18-ish
08:44 cpage_ joined #perl6
08:44 tadzik azawawi: thanks for the PR, I'll get it somewhere today/tomorrow, since it requires digging into panda's dependencies, bootstrap etc
08:45 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 masak _nadim: naively one would think that the solution would then look like multisubs. but I don't know if it's that easy.
08:50 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:51 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 masak _nadim: would that be an option for you?
08:51 moritz the difference is that you can't declare trusts, and that you don't get access to it when augmenting the class
08:52 masak troo
08:52 masak there's probably a workaround for the trusts thing, too (using composition, say) -- but it'd be slightly more involved
08:53 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
08:58 gfldex joined #perl6
09:01 araujo joined #perl6
09:01 DrForr lucs: I'm around now.
09:02 DrForr (not that you are, but at least it serves notice :) )
09:05 lizmat afk for a few hours&
09:11 araujo joined #perl6
09:21 ab6tract joined #perl6
09:21 ab6tract o/ #perl6
09:22 DrForr \o
09:22 [particle]1 joined #perl6
09:22 DrForr \m/ # as well... Changing sound streams to suit.
09:23 ab6tract DrForr: :D
09:23 RabidGravy harr!
09:24 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␤␤»
09:24 RabidGravy Ooh didn't know there was a docker image for informix
09:24 ab6tract i was curious whether this feels weird to anyone else
09:25 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
09:27 RabidGravy It's .hash not .Hash
09:28 RabidGravy ooh no it's both
09:29 musiKk_ joined #perl6
09:32 dakkar joined #perl6
09:33 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
09:34 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␤␤»
09:34 ab6tract m: my %h = x => 'y'; say %(%h.invert){'v'}
09:34 camelia rakudo-moar 4a0ba7: OUTPUT«(Any)␤»
09:34 ab6tract m: my %h = x => 'y'; say %(%h.invert){'y'}
09:34 camelia rakudo-moar 4a0ba7: OUTPUT«x␤»
09:34 moritz ab6tract: invert returns a Seq (or List or whatever), because hash values aren't always unique
09:35 ab6tract moritz: that's fair i suppose
09:36 ab6tract moritz: i thought that used to work though, but i take your point
09:37 s_kilk joined #perl6
09:42 vendethiel joined #perl6
09:50 RabidGravy There "IBM Informix Dynamic Server Version 12.10.FC6IE -- On-Line -- Up 00:04:45 -- 156276 Kbytes"  gigantic image though
09:55 Actualeyes joined #perl6
09:58 M-tadzik joined #perl6
10:06 hanekomu joined #perl6
10:07 M-matthew joined #perl6
10:07 M-Illandan joined #perl6
10:07 donaldh joined #perl6
10:12 timotimo o/
10:17 donaldh o/
10:42 vendethiel joined #perl6
10:42 espadrine joined #perl6
10:46 espadrine_ joined #perl6
10:49 RabidGravy right off out for a bit
10:49 RabidGravy toodles
11:13 donaldh joined #perl6
11:28 nine OT but fun: http://aadrake.com/command-line-tools-can-be-235x-faster-than-your-hadoop-cluster.html
11:28 timotimo yeah
11:28 timotimo "we've reached 2 gigabytes of data, we can't solve our problems without Big Data applications now!"
11:29 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
11:30 timotimo if it fits on an SSD, it's probably also not big data yet
11:30 nine SSDs are now larger than HDDs
11:30 timotimo amazingly, yeah
11:30 timotimo but also quite expensive :D
11:37 bjz_ joined #perl6
11:40 stmuk_ joined #perl6
11:41 John[Lisbeth] joined #perl6
12:04 ilmari if it fits on one server, it's not big data
12:06 colomon joined #perl6
12:07 nemo joined #perl6
12:10 timotimo unless it's a big server :P
12:12 John[Lisbeth] joined #perl6
12:13 kid51 joined #perl6
12:21 llfourn nine: that was a great article thanks
12:30 fireartist nine: thanks for that link - I had no idea about xargs -n flag!
12:31 fireartist xargs -I str # who knew? that's awesome!
12:32 timotimo xargs has a really, really long synopsis section in its manpage
12:33 fireartist I had never before looked at its manpage! :-|
12:33 timotimo i use xargs extremely rarely
12:33 timotimo i should obviously reconsider
12:34 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:35 xiaomiao arnsholt: terabyte is still not big data
12:35 cosimo joined #perl6
12:35 xiaomiao around 1PB I would consider calling it 'big', and even then ... that's easy to store
12:41 iH2O joined #perl6
12:41 Actualeyes joined #perl6
12:56 nine xargs is one of the best parallelization tools ever
12:58 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:59 tweakism 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.
13:05 sufrostico joined #perl6
13:05 Skarsnik joined #perl6
13:07 tmch joined #perl6
13:09 zakharyas joined #perl6
13:11 fireartist looks like you can pipe 2 xargs to get the same affect: | xargs -n 2 | xargs -I {} ...
13:11 donaldh joined #perl6
13:18 tweakism that combines pairs of input files into single arguments
13:19 tweakism printf 'one\ntwo\nthree\nfour\n' | xargs -n 2 | xargs -I {} printf '[%s]\n' {}
13:19 tweakism [one two]
13:19 tweakism [three four]
13:19 rindolf joined #perl6
13:30 perlawhirl joined #perl6
13:31 perlawhirl hi perlers
13:31 perlawhirl ummm... how do i turn a unicode codepoint into a char?
13:31 perlawhirl in perl
13:32 tweakism chr() ?
13:33 perlawhirl umm... what format should the code point be in
13:33 tweakism a number.
13:33 * nine is on a train :)
13:33 perlawhirl lets use pi as an example... how would one turn 03C0 into the pi symbol
13:34 perlawhirl 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 …»
13:34 tweakism m: say chr(0x03c0)
13:34 camelia rakudo-moar 4a0ba7: OUTPUT«π␤»
13:34 perlawhirl ahhhh
13:34 perlawhirl ok 0x
13:34 tweakism for hex
13:34 perlawhirl that's what i need to know
13:34 perlawhirl thanks
13:34 perlawhirl riiight
13:35 perlawhirl i'm just a caveman... your unicode frightens and confuses me
13:35 nine m: say chr 0x3c0
13:35 camelia rakudo-moar 4a0ba7: OUTPUT«π␤»
13:35 tweakism m: say chr(960)
13:35 camelia rakudo-moar 4a0ba7: OUTPUT«π␤»
13:35 nowan_ joined #perl6
13:35 tweakism m: say ord('π')
13:35 camelia rakudo-moar 4a0ba7: OUTPUT«960␤»
13:35 perlawhirl ta, lads
13:36 tweakism perlawhirl: I'm sure there's an escape sequence (probs \u or \U) for use in strings, too.
13:39 perlawhirl i tried \U, i think
13:39 jnthn m: say "\x3c0"
13:39 camelia rakudo-moar 4a0ba7: OUTPUT«π␤»
13:39 perlawhirl yeah, unrecognised
13:40 perlawhirl all good, the chars are in 'U03C0' format... so i'm just doing chr $foo.subst(/U/,'0x')
13:42 perlawhirl m: my $foo = 'U03C0'; say chr( $foo.subst('U', '0x') );
13:42 camelia rakudo-moar 4a0ba7: OUTPUT«π␤»
13:47 Util joined #perl6
13:49 pmurias joined #perl6
13:50 kaare_ joined #perl6
13:51 dalek ecosystem: 61f0f36 | donaldh++ | META.list:
13:51 dalek ecosystem: Add RPi::GpioDirect to ecosystem
13:51 dalek ecosystem:
13:51 dalek ecosystem: See https://github.com/donaldh/Perl6-RPi-GpioDirect
13:51 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/61f0f3606c
13:51 Psyche^ joined #perl6
13:52 pmurias hi
13:53 * donaldh is using NativeCall CArray for GPIO bit twiddling :) ^^^
13:57 donaldh Is there any way to uninstall precompiled modules?
14:00 * donaldh is guessing that cleaning out install/share/perl6/site is the brute-force way
14:01 broquaint joined #perl6
14:02 salv00 joined #perl6
14:05 molaf joined #perl6
14:08 skids joined #perl6
14:37 psch joined #perl6
14:40 perlpilot joined #perl6
14:43 hoelzro o/ #perl6
14:44 pmurias hoelzro: \o
14:46 pmurias the rakudo-js grant has been approved :)
14:46 donaldh pmurias++
14:46 jnthn pmurias++
14:47 llfourn \o/ # pmurias++
14:49 cdg joined #perl6
14:49 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
14:50 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
14:50 moritz rudi_s: $instnance.clone(newattr => 1, newattr2 => 2)
14:50 musiKk_ joined #perl6
14:50 donaldh how often does the ecosystem modules.json update?
14:50 moritz donaldh: at least hourly
14:50 sjn rudi_s: or just listen to moritz :)
14:51 hoelzro o/ pmurias
14:51 hoelzro \o/
14:51 hoelzro that's great news!
14:51 hoelzro pmurias++
14:52 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
14:52 camelia rakudo-moar 4a0ba7: OUTPUT«A.new(x => 1, y => 2)␤A.new(x => 4, y => 2)␤»
14:52 jnthn rudi_s: ^^
14:52 hoelzro m: if False { my $ln = require Linenoise; } # is this a rakudobug?
14:52 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␤␤»
14:53 hoelzro that shouldn't error out, should it?
14:53 jnthn m: if False { my $ln = do require Linenoise; }
14:53 camelia rakudo-moar 4a0ba7: ( no output )
14:53 jnthn hoelzro: It's a statement
14:53 hoelzro ahhh
14:53 hoelzro so why does `my $ln = require Linenoise` parse?
14:54 hoelzro oh, I think I know the answer to my own question
14:54 tadzik joined #perl6
14:55 tadzik anyone planning on a pre-conf beer at GPW?
14:55 rudi_s sjn: moritz: jnthn: Thank you!
14:55 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
14:55 * sjn is just next to the GPW pre-conf pub right now, actually
14:56 sjn tadzik: if you're around, I'm at a cafe called "Black Bean" just sround the corner from Barfuß
14:57 tadzik sjn: I'll arrive around 18-ish to NUE
14:57 tadzik to it'll be a while prolly
15:06 khw joined #perl6
15:10 japhb Congrats, pmurias++ !
15:10 Ven joined #perl6
15:11 Ven jnthn++ # nice thread memory size savings
15:11 RabidGravy joined #perl6
15:15 sufrostico joined #perl6
15:16 RabidGravy boom
15:20 domidumont joined #perl6
15:29 [ptc] joined #perl6
15:31 llfourn has anyone else been experiencing race conditions with locks in precomp recently?
15:32 domidumont joined #perl6
15:48 * perlpilot reads scrollback to find out why japhb is congratulating pmurias
15:48 perlpilot ah rakudo-js ... Good luck pmurias  :)
15:49 perlpilot (and congrats of course)
16:10 Hotkeys Is there any support for STM in p6? Or is it planned?
16:10 Hotkeys I was considering taking on the task of attempting to implement it
16:15 pmurias there was STM support in pugs
16:16 RabidGravy I take it you mean "software transactional memory" and none of the other billion possible expansions
16:18 Ven pmurias: ooooh, did your grant get accepted?
16:18 Ven RabidGravy: yes :P
16:18 RabidGravy I actually wanted object level transactions the other day
16:20 perlpilot Hotkeys: see https://6guts.wordpress.com/2014/04/17/racing-to-writeness-to-wrongness-leads/
16:22 perlpilot (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:23 pmurias Ven: yes
16:24 pmurias Anyone wants to be suggested as grant manager for the rakudo-js grant?
16:24 * Ven is very excited
16:24 Ven this is an astounding news, I'm gonna share it to a few people :D.
16:26 pmurias there should be an official TPF blog post in a couple days
16:26 DrForr I'm working with Tom Hukins.
16:27 timotimo pmurias++
16:28 dalek nqp: 66d0ca2 | (Pawel Murias)++ | src/vm/js/ (4 files):
16:28 dalek nqp: [js] Implement nqp::setmessage, nqp::setpayload, nqp::getpayload, nqp::throw and VMException REPR.
16:28 dalek nqp: review: https://github.com/perl6/nqp/commit/66d0ca2904
16:28 dalek nqp: 431361b | (Pawel Murias)++ | src/vm/js/ (3 files):
16:28 dalek nqp: [js] Implement nqp::newexception.
16:28 dalek nqp:
16:28 dalek nqp: Needs to be integrated with HLL support.
16:28 dalek nqp: review: https://github.com/perl6/nqp/commit/431361b293
16:28 dalek nqp: d8953b6 | (Pawel Murias)++ | t/nqp/44-try-catch.t:
16:28 dalek nqp: Test nqp::newexception, nqp::throw, nqp::setpayload, nqp::getpayload, nqp::setmessage, nqp::getmessage.
16:28 dalek nqp: review: https://github.com/perl6/nqp/commit/d8953b6f5f
16:42 ugexe pmurias++ # great news
16:44 idiosyncrat_ joined #perl6
16:50 [Coke] pmurias++
16:51 FROGGS joined #perl6
16:51 [Coke] I can be a GM if you need.
16:51 timotimo coke the dungeon master
16:52 pmurias [Coke]: thank you, I'll suggest you then ;)
16:53 Skarsnik ++ for perl6 in js :)
16:54 [Coke] pmurias: so, start planning your first blog post. :)
17:14 [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.
17:15 SCHAAP137 joined #perl6
17:21 domidumont joined #perl6
17:29 wamba joined #perl6
17:36 sufrostico joined #perl6
17:42 Skarsnik How do I skip a whenever block? I mean to say "do nothing/skip" like
17:42 timotimo you can just "next" it
17:46 Skarsnik thx :)
17:50 timotimo and when you're done with the whenever's job, you can "last" out of it
17:59 ingy [Coke]: :)
18:01 firstdayonthejob joined #perl6
18:05 lostinfog joined #perl6
18:14 Laurent_R joined #perl6
18:14 kaare_ How would you define a native call where the argument is a pointer to "a fixed size buffer"?
18:17 arnsholt CArray[int8], or similar
18:19 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
18:20 kaare_ OK, I'll try. Thankx
18:20 timotimo you have to get the size of the buffer somehow in any case
18:20 timotimo the C ABI doesn't have anything standardized for sized buffers
18:29 sufrostico joined #perl6
18:33 zakharyas joined #perl6
18:33 vendethiel joined #perl6
18:50 spider-mario joined #perl6
18:54 jack_rabbit joined #perl6
18:56 yqt joined #perl6
18:58 telex joined #perl6
19:26 abaugher joined #perl6
19:47 DrForr Something recently (haven't updated rakudobrew for a few days) just sent performance through the floor.
19:48 hacst joined #perl6
19:48 [Coke] DrForr: you going to bisect?
19:48 [Coke] And/Or do you have a small benchmark that shows it?
19:49 [Coke] and how are you running rakudobrew?
19:50 DrForr No, because I'm afraid I wouldn't be able to run a single test.
19:51 [Coke] What are you seeing a performance problem on?
19:54 DrForr 'use Test' pretty much kills the VM. I'll completely delete .rakudobrew and reinstall.
19:55 DrForr 80% drive usage, load average hit about 5 when trying to run a test script..
19:56 [Coke] so just perl6 -e 'use Test;' is causing you trouble?
19:56 [Coke] (first run, or future runs?)
19:57 [Coke] "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.
19:58 [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.
20:00 DrForr Running internally on MoarVM, I just blew away .rakudobrew and recloned.
20:02 dalek ecosystem: a55512d | RabidGravy++ | META.list:
20:02 dalek ecosystem: Add Audio::Hydrogen
20:02 dalek ecosystem:
20:02 dalek ecosystem: see https://github.com/jonathanstowe/Audio-Hydrogen
20:02 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/a55512da04
20:04 RabidGravy who was it that said they'd be interested in that?
20:07 DrForr Also, should I still be doing 'rakudobrew build panda' to get Panda running, or is there a more recommended method?
20:08 * pyrimidine . o O ( realized I need to set up some NativeCall bindings for bioinformatics )
20:14 RabidGravy anyway another one off the yak listing
20:21 DrForr Chromium may also have been partially at fault, I'll see in a moment.
20:24 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:26 RabidGravy I thought that went away ages ago
20:27 DrForr So did I, which was probaby partially why I overlooked it.
20:27 DrForr Actually this isn't 'unit class Foo; use Foo;' but just 'use Foo;' in file Foo.pm6.
20:31 ugexe are any other processes running that would try to be using the precomp'd Foo.pm6?
20:32 jjido joined #perl6
20:32 DrForr Only perl6 and that's not running.
20:44 sufrostico joined #perl6
20:50 musiKk_ joined #perl6
21:05 prammer joined #perl6
21:07 pyrimidine joined #perl6
21:08 ptolemarch joined #perl6
21:10 dwarring joined #perl6
21:20 molaf joined #perl6
21:22 sergot joined #perl6
21:23 adhoc joined #perl6
21:30 sivoais joined #perl6
21:40 labster joined #perl6
21:40 adhoc left #perl6
21:42 fireartist joined #perl6
21:56 tmch joined #perl6
21:57 labster joined #perl6
22:02 donaldh joined #perl6
22:02 dalek nqp: 24db816 | (Pawel Murias)++ | src/vm/js/nqp-runtime/core.js:
22:02 dalek nqp: [js] Fix stuff found by "make js-lint".
22:02 dalek nqp: review: https://github.com/perl6/nqp/commit/24db816675
22:03 araujo joined #perl6
22:14 timotimo hmm
22:15 Skarsnik timotimo, I get a next without loop construct for next in a whenever block
22:15 timotimo oh? :o
22:17 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␤␤»
22:17 Skarsnik m: react { whenever Supply.interval(2) { next ; } };
22:17 camelia rakudo-moar 4a0ba7: OUTPUT«===SORRY!===␤next without loop construct␤»
22:18 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␤␤»
22:18 timotimo is that just an oversight?
22:19 timotimo 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
22:19 Skarsnik but meh
22:20 RabidGravy I'm not sure 'next' makes sense, 'next' what?
22:20 sno joined #perl6
22:20 tweakism Does anyone here have (purchased) PragmataPro 0.821 ?  I need to confirm their md5sums.
22:21 timotimo RabidGravy: "continue whenever the next thing appears"
22:21 RabidGravy but it does anyway
22:22 timotimo what does what anyway?
22:22 donaldh https://doc.perl6.org/language/control#next
22:24 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
22:24 dalek doc: 77a45e6 | coke++ | doc/Language/control.pod:
22:24 dalek doc: add whitespace to code sample
22:24 dalek doc: review: https://github.com/perl6/doc/commit/77a45e6c2c
22:24 perlpilot a whenever block is quite like a loop that iterates the supply.
22:24 timotimo and you can already "last" inside a whatever loop to close your tap on the supply
22:25 timotimo so why wouldn't it allow to skip the rest of the current iteration with "next"?
22:25 timotimo for what it's worth, a "for" loop is just a map call, not a loop.
22:25 RabidGravy if that makes sense to you
22:25 timotimo it absolutely makes sense to me
22:27 perlpilot That's pretty much how we're going to explain it to people so ...    ;)
22:29 RabidGravy y'see it doesn't make sense to me
22:35 perlpilot for iterates things that come from a list; whenever iterates things that come from a supply.   What doesn't make sense?
22:37 timotimo i don't understand why it doesn't make sense to you :)
22:38 nowan joined #perl6
22:41 RabidGravy because I don't see the iteration
22:42 RabidGravy it could be thought of as doing that sure, but you could think of a subroutine as iterating over its callers too
22:50 timotimo that's true
22:50 timotimo but subroutine calls don't get invoked with a word starting in "wh", like "while" or "whenever" :)
22:51 Skarsnik But having a word to skip this execution could be nice x)
22:57 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␤»
22:57 timotimo i think that only works "by accident" :)
22:59 ugexe we call those happy accidents
23:00 RabidGravy well possibly the next straight in there is afflicted similarly to done not work under the same circumstance
23:01 cdg joined #perl6
23:02 cdg_ joined #perl6
23:02 kid51 joined #perl6
23:03 timotimo i'd even say that the next in that example ugexe put is a bug
23:04 timotimo because anything after the emit would also be skipped (if it were still in that for loop)
23:06 ridthyself joined #perl6
23:09 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␤»
23:10 ridthyself Greetings! I've installed rakudo and am playing around with the REPL. How do I import a .p6 file?
23:11 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:12 cpage_ joined #perl6
23:12 ridthyself Wonderful! thanks!
23:13 ugexe -I doesnt work with the REPL though
23:13 hoelzro it doesn't?
23:14 hoelzro interesting
23:15 vendethiel joined #perl6
23:16 timotimo damn
23:16 timotimo but at least it'll be visibly absent in the list of things looked at
23:17 skids joined #perl6
23:24 DarthGandalf joined #perl6
23:29 Kabanoid joined #perl6
23:36 bpmedley joined #perl6
23:55 vendethiel joined #perl6
23:59 cdg joined #perl6

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

Perl 6 | Reference Documentation | Rakudo