»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg camelia perl6: ... | irclog: irc.perl6.org | UTF-8 is our friend!
Set by sorear on 25 June 2013.
TimToady hoelzro: I suspect you didn't really mean $max max= .chars.say; 00:51
because .say is just gonna return True
benabik r: say (0 max True) 00:52
Timbus he wants the most true
camelia rakudo-{parrot,jvm,moar} f374d8: OUTPUT«True␤»
benabik should remember to use m: rather than r:
Nicely cleaned up output there, though. 00:56
BenGoldberg r: say 1 max True; 01:04
camelia rakudo-{parrot,jvm,moar} f374d8: OUTPUT«True␤»
BenGoldberg r: say 1 min True;
camelia rakudo-{parrot,jvm,moar} f374d8: OUTPUT«1␤»
thou Hi, who here is supernovous on github? I'm curious about the state of Web, PSGI, Bailador, etc. 01:06
tadzik supernovus, but he's not here 01:07
I may be able to answer some bailador questions though
thou hah
hoelzro TimToady: no, that was a typo 01:08
thou tadzik: Cool. I'm mostly interested in what projects are active, what work is ongoing to merge the app stuff from a few different projects. I'm thinking of resurrecting November, rewriting it w/ current state of the art. 01:09
thou Also, I still have a soft spot for Plackdo, which had a heroic amount of work done on it a while back and may still be useful. I'm wondering if there's a coalition of people cooperating on a web stack. 01:11
TimToady p6: .say for <a b c>.permutations 01:15
camelia niecza v24-109-g48a8de3: OUTPUT«Unhandled exception: Unable to resolve method permutations in type Parcel␤ at /tmp/tmpfile line 1 (mainline @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4595 (ANON @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4596 (module-CORE @…»
..rakudo-moar f374d8: OUTPUT«Cannot call 'postcircumfix:<[ ]>'; none of these signatures match:␤:(Any \SELF, int $pos)␤:(Any \SELF, int $pos, \assignee)␤:(Any \SELF, int $pos, :BIND($BIND)!)␤:(Any \SELF, int $pos, Any :SINK($SINK)!, *%other)␤:(Any \SELF, int $pos, Any :delet…»
..rakudo-{parrot,jvm} f374d8: OUTPUT«a b c␤a c b␤b a c␤b c a␤c a b␤c b a␤»
TimToady r-m bug 01:16
benabik m: [0].permutations 01:21
camelia rakudo-moar f374d8: OUTPUT«Unhandled exception: Cannot call 'postcircumfix:<[ ]>'; none of these signatures match:␤:(Any \SELF, int $pos)␤:(Any \SELF, int $pos, \assignee)␤:(Any \SELF, int $pos, :BIND($BIND)!)␤:(Any \SELF, int $pos, Any :SINK($SINK)!, *%other)␤:(Any \SELF,…»
benabik m: [].permutations 01:22
camelia ( no output )
tadzik thou: I haven't developed bailador for a longer while
not sure if anything webdev-related is really going on these days :( 01:23
thou tadzik: OK. I thought I saw something in p6weekly a month or so ago.
BenGoldberg m: say (1..3).permutations 01:24
camelia rakudo-moar f374d8: OUTPUT«Cannot call 'postcircumfix:<[ ]>'; none of these signatures match:␤:(Any \SELF, int $pos)␤:(Any \SELF, int $pos, \assignee)␤:(Any \SELF, int $pos, :BIND($BIND)!)␤:(Any \SELF, int $pos, Any :SINK($SINK)!, *%other)␤:(Any \SELF, int $pos, Any :delet…»
tadzik hm, maybe 01:25
thou tadzik: thanks, and hopefully ecosystem stuff will continue to improve along w/ everything else, as it seems most of the old excuses about speed and features are quickly being overcome. :-) 01:26
TimToady okay, here's some LHF: add any tests whatsoever for permutations 01:32
r: .say for permutations(3)
camelia rakudo-{parrot,jvm,moar} f374d8: OUTPUT«0 1 2␤0 2 1␤1 0 2␤1 2 0␤2 0 1␤2 1 0␤» 01:33
TimToady at least that part works in moar
BenGoldberg p6: my @a = 'a'..*; say @a[@$_] for permutations(3) 01:38
camelia niecza v24-109-g48a8de3: OUTPUT«===SORRY!===␤␤Undeclared routine:␤ 'permutations' used at line 1␤␤Unhandled exception: Check failed␤␤ at /home/p6eval/niecza/boot/lib/CORE.setting line 1502 (die @ 5) ␤ at /home/p6eval/niecza/src/STD.pm6 line 1147 (…»
..rakudo-{parrot,jvm,moar} f374d8: OUTPUT«a b c␤a c b␤b a c␤b c a␤c a b␤c b a␤»
TimToady m: .say for [<a b c>].permutations 01:49
camelia rakudo-moar f374d8: OUTPUT«Cannot call 'postcircumfix:<[ ]>'; none of these signatures match:␤:(Any \SELF, int $pos)␤:(Any \SELF, int $pos, \assignee)␤:(Any \SELF, int $pos, :BIND($BIND)!)␤:(Any \SELF, int $pos, Any :SINK($SINK)!, *%other)␤:(Any \SELF, int $pos, Any :delet…»
TimToady ooh, now only 8 solutions behind C on rosettacode 02:22
colomon go go go!
TimToady interestingly, there are exactly 8 bitmap/* tasks that aren't done 02:23
but I've been holding off on all the solutions that will improve with 2d matrices...
hoelzro I just tried building MoarVM from the release tarball, and it's complaining about a lack of dynload.h 03:13
it doesn't seem to be building the 3rdparty modules
benabik Submodules aren't included by git-archive, I bet that's the problem. 03:14
(IIRC)
hoelzro that would be a good assumption, I think =)
moritz iirc we specifically patched the MoarVM build to use more than git-archive 05:34
s/build/release/
xiaomiao hoelzro: submodules ... 05:36
don't ever get tarballs from github, that way lies sadness
masak mornin', #perl6 06:44
moritz \o masak, * 07:07
FROGGS perhaps interesting for somebody: github.com/libgdx/packr - Packages your JAR, assets and a JVM for distribution on Windows, Linux and Mac OS X 07:22
masak this feels like it belongs on #perl6, somehow: animalnewyork.com/2014/artists-note...ey-nasser/ -- news.ycombinator.com/item?id=7700691 07:29
moritz off-topic UNIX question: when I run a script via cron as a specific user, that user only has the permissions of its primary group, not those of the other groups (and 'id -a' doesn't even show the others groups) 07:35
can I somehow prevent that from happening? 07:36
masak: wow, that's nice
masak it is. 07:38
if I could buy that mosaic as a poster, I would.
lizmat good *, #perl6! 08:01
lizmat jnthn: wrt to Supply.classify 08:02
lizmat I doubt whether that would make sense, unless we can make a "live" Supply become "on demand" 08:03
I mean, more'ing a Supply and then more'ing the value for that Supply on it
doesn't guarantee that a tap on that Supply will see that value, because it will most likely be too late 08:04
unless we can make a "live" Supply to become "on demand"
am I making sense here ?
masak does Perl 6 distinguish between "hot" and "cold" supplies, the way Rx does?
um, the distinction is more of a social one than one in code, to be sure. 08:05
lizmat yes, "live" vs "on demand"
masak ok, good.
lizmat Supply.for(...)
would be on demand (as in, every tap on that Supply will see all values)
masak excellent.
lizmat Supply.new is live
a tap will only see values that have been "more"d on the Supply after the tap has been made 08:06
masak right. 08:10
but a "cold"/"on demand" Supply will kindly wait until it's being tapped by something.
whereas a "hot"/"live" one won't/can't.
lizmat yup 08:11
lizmat S17:478 08:15
synopsebot Link: perlcabal.org/syn/S17.html#line_478
lizmat but turning a "live" supply into an "on demand" supply, implies buffering 08:16
at least until the first tap arrives
perhaps we need a third state: "paused" 08:17
as in "on demand until the first tap is made"
and perhaps that should be the default for Supply.new 08:18
masak I don't think buffering should be made the default, no. 08:25
there are cases where that would lead to performance/memory problems but have no benefit. 08:26
lizmat masak: agree, but making "paused" the default, would maybe less of a WAT for people getting into Supplies 08:35
afk for a few hours&
masak I think there is WAT on either side of that decision. better to teach people about the distinction between "live" and "on demand". 08:36
I kind of liked the rule you mentioned, that 'Supply.for' creates an on-demand Supply, whereas 'Supply.new' creates a live one. 08:37
of course, we could rename 'Supply.new' to 'Supply.live' instead. not sure it's worth it, though. people tend to expect a .new method on things. 08:38
timotimo the .new could force at least one named to be set or something. 08:44
timotimo in order to have libnotify stuff working, it seems like we have to have at least a partial glib binding 09:30
lizmat is back 10:32
lizmat after some more thinking, I sort of convinced now we need Supply.new to pause 10:33
take e.g. the crappy useragent example with IO::Socket::Async.chars_supply
that provides a supply with the contents of what is being received on the socket 10:34
the first thing you do, of course, is to put a tap on it
but between the creation of the Supply, and the creation of the tap, the remote client *could* have sent something already
so you have a race condition there
otoh, you don't want that Supply to be on demand, because it could be a huge file you're receiving 10:35
sjn thinks about cooperative multitasking for some reason 10:36
masak lizmat: that's a good point. 10:37
lizmat: my worry is a use case where there's massive data coming in, none of which we're interested in. let's say a Twitter feed or something.
lizmat looking at the code in IO::Socket::Async, it is already suffering from that race condition
masak and if pause is the default, the application ends up spending lots of cycles and RAM just storing those things, for (it turns out) no benefit at all. 10:38
lizmat well, maybe it would need a named parameter or another method for creating the base Supply
sjn doesn't the OS buffer incoming data to some extent? 10:39
lizmat but bytes_supply and chars_supply atm have a race condition
wrt to tap
sjn: I would think so, yes, and that makes it sort of work at the moment 10:40
but there *is* a race comdition there: there is nothing guaranteeing there will not be a "more" before there is a tap
sjn lizmat: can you fix that by changing the order of how things are set up? 10:41
lizmat like doing the tap before the supply is created ? 10:42
sjn mm
sjn also usually don't worry about race conditions unless there's real risk for data loss or deadlocks 10:42
doesn't* 10:43
lizmat sjn: we're talking core primitives here
sjn ok
lizmat I think we want them to be non-lossy :-)
sjn guaranteed non-lossy, you mean :)
lizmat and guarantee them to be non-lossy :-)
sjn yeah
fair enough 10:44
moritz jnthn++ # star release 11:27
masak a star was released? yay! 11:57
masak .oO( it's the best Rakudo Star, ever! )
nwc10 I didn't see an e-mail yet to p6-language
but I see bloggage
and
yay! to everyone who made it so 11:58
jnthn++ # two (and a bit) stars for the price of one
colomon gist.github.com/colomon/8acaa296cbc51f2b7f55 # under parrot. does this suggest anything to anyone?
tadzik rakudo all-star
colomon Hmmm. So it appears Just Rakuo It *isn't* on Planet Perl 6. Any clues how to get it there? 12:05
oh, just saw the link. 12:07
[Coke]: can you pretty please add justrakudoit.wordpress.com/ to Planet Perl 6? Danke. 12:08
dalek kudo/nom: 9e8ba5d | (Elizabeth Mattijsen)++ | src/core/Supply.pm:
Make sure we don't lose more until the first tap

This is really a proof of concept. Perhaps this should not be the default. Perhaps we should do it differently. What it does do is fix race condition in e.g. IO::Socket::Async.bytes_supply.tap(). And it now makes sense to spec, implement and test Supply.(classify|categorize).
12:26
lizmat jnthn: ^^^ you might want to look at that :-)
and my monologue earlier today
cognominal__ Tristar, jonathan se fait son cinéma. :) # pun on tristar, the movie company and "se faire son cinéma", meaning dreaming about a situation ; and, literally, cinema meaning movie. 12:27
lizmat commute to NLPW & 12:28
masak NLPW is still going on!? 12:29
FROGGS wow, think of all the beer that they probably drink during that period... 12:30
masak boggles 12:31
liztormato masak: Actually it's the NLPM meeting. ;) 13:08
masak oh!
masak .oO( it's like NLPW but with the W turned upside-down )
liztormato Hehe. A bit, yes. Redoing presentations for those who missed them at NLPW 13:09
Nap&
dalek kudo/nom: 2e6010c | (Tobias Leich)++ | src/core/IO/Spec/Win32.pm:
is-absolute should return True/False according to spec
13:13
[Coke] thou/j-spectest - yes. this happens to me as well on a linux box. I end up specifically not using the eval service and running things directly. takes 3 times as long, but it finishes. 13:29
cognominal__ hi, domidumont :) 13:47
domidumont cognominal__: hello
[Coke] colomon: added. 13:50
cognominal__ r: say "domidumon" # <- using bots 13:55
camelia rakudo-{parrot,jvm,moar} 9e8ba5: OUTPUT«domidumon␤»
cognominal__ n: say "domidumont" # <- using bots
camelia niecza v24-109-g48a8de3: OUTPUT«domidumont␤»
masak m: say "hi ", d-m("o", "i"), d-m("u", "ont") given sub d-m($middle, $end) { "d{$middle}m{$end}" } 14:10
camelia rakudo-moar 9e8ba5: OUTPUT«hi domidumont␤»
masak prior art for using 'given' to declare a named sub? I think it's new :P 14:11
of course, it doesn't actually *use* 'given', per se.
this would be better:
m: say "hi ", .("o", "i"), .("u", "ont") given sub ($middle, $end) { "d{$middle}m{$end}" }
camelia rakudo-moar 9e8ba5: OUTPUT«hi domidumont␤» 14:12
masak m: my @matrix = [[<o i>], [<u ont>]]; say "hi ", @matrix.map({ "d{.[0]}m{.[1]}" }).join 14:14
camelia rakudo-moar 9e8ba5: OUTPUT«hi do imu ont␤»
masak oh, argh.
m: my @matrix = [<o i>], [<u ont>]; say "hi ", @matrix.map({ "d{.[0]}m{.[1]}" }).join
camelia rakudo-moar 9e8ba5: OUTPUT«hi domidumont␤»
masak it's not the first time I make that mistake. neither will it be the last ;) 14:15
similarly, I'm not the first time make that mistake; neither will I be the last...
PerlJam that reminds me of the 15 minutes I spent yesterday because I'd written @objects.sort: { +*.method } and was confused about why it wasn't sorting. 14:16
domidumont feels like a labrat ;-) 14:17
masak m: my @matrix = [<o i>], [<u ont>]; say "hi ", @matrix>>.&f.join given sub f($_) { "d{@_[0]}m{@_[1]}" }
camelia rakudo-moar 9e8ba5: OUTPUT«===SORRY!=== Error while compiling /tmp/Fnso224yme␤Placeholder variable @_ may not be used here because the surrounding block takes no signature␤at /tmp/Fnso224yme:1␤------> ix>>.&f.join given sub f($_) { "d{@_[0]}⏏…»
masak m: my @matrix = [<o i>], [<u ont>]; say "hi ", @matrix>>.&f.join given sub f($_) { "d{.[0]}m{.[1]}" }
camelia rakudo-moar 9e8ba5: OUTPUT«hi domidumont␤»
masak m: my @matrix = [<l b>], [<r t>]; say "hi ", @matrix>>.&f.join given sub f($_) { "{.[0]}a{.[1]}" } 14:18
camelia rakudo-moar 9e8ba5: OUTPUT«hi labrat␤»
masak grins
thou next step: get camelia to grin
moritz m: my @matrix = [<l b>], [<r t>]; say "hi ", @matrix>>$_.join given sub f($_) { "{.[0]}a{.[1]}" } 14:19
camelia rakudo-moar 9e8ba5: OUTPUT«===SORRY!=== Error while compiling /tmp/d9pqo1_7ES␤Preceding context expects a term, but found infix > instead␤at /tmp/d9pqo1_7ES:1␤------> = [<l b>], [<r t>]; say "hi ", @matrix>>⏏$_.join given sub f($_) { "{.[0]}a…»
moritz m: my @matrix = [<l b>], [<r t>]; say "hi ", @matrix>>.$_.join given sub f($_) { "{.[0]}a{.[1]}" }
masak moritz: I was thinking the same thing!
camelia rakudo-moar 9e8ba5: OUTPUT«hi labrat␤»
PerlJam thou: but then she'll show her fangs and that might scare people
moritz masak: :-)
m: my @matrix = [<l b>], [<r t>]; say "hi ", @matrix>>.$_.join given sub ($_) { "{.[0]}a{.[1]}" }
camelia rakudo-moar 9e8ba5: OUTPUT«hi labrat␤»
moritz now without the sub name.
masak m: say "hi ", ([<l b>], [<r t>])>>.$_.join given sub ($_) { "{.[0]}a{.[1]}" } 14:20
camelia rakudo-moar 9e8ba5: OUTPUT«hi labrat␤»
masak now without variables.
moritz ... except $_
masak I dig the two-layered use of $_. 14:21
oh, yeah, $_
[Coke] "that's not a REAL variable" <scottish problem>
masak m: say "hi ", ([<l b>], [<r t>])>>.$_.join given { "{.[0]}a{.[1]}" }
camelia rakudo-moar 9e8ba5: OUTPUT«hi labrat␤»
masak oh, better.
moritz++ :)
there's no implicit way to do .$_ , though
moritz no .() ? :-) 14:21
masak doesn't mean what you think it does :P 14:22
JimmyZ timotimo: www.php-oa.com/2014/04/25/optimizat...-moar.html
chinese version
masak m: sub postfix:<!>($x) { $x.$_ }; say "hi ", ([<l b>], [<r t>])>>!.join given { "{.[0]}a{.[1]}" }
camelia rakudo-moar 9e8ba5: OUTPUT«hi ␤»
masak awww
so close.
but the sub declares its own $_, I guess
JimmyZ and p6maven has chinese version too 14:23
masak JimmyZ: did you translate it?
JimmyZ my friends is translating <<Using Perl 6 boo>>
masak: nope, it's my friends. 14:24
masak friends++
JimmyZ jnthn++ maybe see him in beijing
FROGGS m: say "hi ", ([<l b>], [<r t>])>>.map(*~'a'~*).join 14:29
camelia rakudo-moar 9e8ba5: OUTPUT«hi labrat␤»
timotimo JimmyZ: oh, thanks. should i link to that site from my p6weekly page? 14:31
AFK for now, though
PerlJam reading S17, I keep expecting Supply.more to be called Supply.pump 14:32
timotimo JimmyZ: why is the domain "php-oa"? 14:33
thou m: say "hi ", (*~"a"~* for <l b>, <r t>)
camelia rakudo-moar 2e6010: OUTPUT«hi lab rat␤»
FROGGS m: say "hi ", |(*~"a"~* for <l b>, <r t>) 14:34
camelia rakudo-moar 2e6010: OUTPUT«hi labrat␤»
PerlJam and FROGGS wins! :)
FROGGS m: say "hi ", |(*~"a"~* for < l b r t >) 14:35
camelia rakudo-moar 2e6010: OUTPUT«hi labrat␤»
FROGGS another byte shoved off :P
masak m: say |(*~"a"~* for <<h 'i ' l b r t >>) 14:37
camelia rakudo-moar 2e6010: OUTPUT«hai labrat␤»
timotimo m: say "hi labrat" # shortest so far 14:42
camelia rakudo-moar 2e6010: OUTPUT«hi labrat␤»
PerlJam heh
FROGGS n: my &op=*~"a"~*;say "hi ",[[&op]] <l br t> 14:43
camelia niecza v24-109-g48a8de3: OUTPUT«hi labrat␤»
masak timotimo: shame you blew it with that long, unnecessary comment :P
timotimo masak: if you look closely, i think i didn't 14:44
masak troo
FROGGS n: say "hi ", [[&(*~"a"~*)]] <l br t>
camelia niecza v24-109-g48a8de3: OUTPUT«hi labrat␤»
hoelzro ahoy #perl6
masak but you could've had it much shorter :)
ahoy hoelzro
FROGGS hi hoelzro
masak n: say "hi ",[[&$_]] <l br t> given *~"a"~* 14:45
camelia niecza v24-109-g48a8de3: OUTPUT«===SORRY!===␤␤Unable to parse bracketed infix at /tmp/m8Iq2aAgMO line 1:␤------> say "hi ",[[⏏&$_]] <l br t> given *~"a"~*␤Couldn't find final ']'; gave up at /tmp/m8Iq2aAgMO line 1:␤------> say "h…»
masak aww :)
timotimo JimmyZ: for a moment i derped and thought that was a translation of a p6weekly post i did, but it obviously isn't :)
but it should send a couple of chinese viewers to my p6weekly; i hope they can use the information in there
hmm. my visitor count has been higher two weeks ago and earlier ... :\ 14:46
JimmyZ timotimo: the website auther was using php. and now perl 14:50
author
timotimo: oh, it's jnthn++'s one, I just see he mentioned you.. 14:51
timotimo yup 14:56
if i want to have more readers, i should start writing more controversial stuff, start some flamewars, ... :) 14:59
JimmyZ we 're your readers :P
I have many chinese friends who read your post 15:00
timotimo i'm glad to hear that!
JimmyZ ;)
timotimo do they have to use a proxy? wordpress claims it was 6 viewers over the last 30 days, i wonder if that's unique viewers over that time 15:01
oh, "views" not "viewers"
JimmyZ not all, we can't visit wordpress, so we always visit planeteria.org/perl6/ 15:02
timotimo ah!
i don't like the great firewall of china :(
JimmyZ but I'm in philippine now, so I can
FROGGS timotimo: I can't imagine that there are only six views... 15:03
I guess you already have six views within an hour after posting that link here
timotimo only from china
JimmyZ I guess many people read it from planeteria.org/perl6/
6 viewers, it may be me 15:04
:P
I have a proxy
but I sent your post to my friend is not the wordpress link 15:06
grondilu r: say { foo => .4 }.Mix; 15:06
camelia rakudo-{parrot,jvm,moar} 2e6010: OUTPUT«mix(foo(0.4))␤»
grondilu r: say { foo => .4 }.Mix.pick;
camelia rakudo-moar 2e6010: OUTPUT«===SORRY!===␤.pick is not supported on a Nil␤»
..rakudo-parrot 2e6010: OUTPUT«.pick is not supported on a Nil␤ in method gist at gen/parrot/CORE.setting:12677␤ in method gist at gen/parrot/CORE.setting:1056␤ in sub say at gen/parrot/CORE.setting:13605␤ in block at /tmp/tmpfile:1␤␤»
..rakudo-jvm 2e6010: OUTPUT«.pick is not supported on a Nil␤ in method gist at gen/jvm/CORE.setting:12654␤ in sub say at gen/jvm/CORE.setting:13561␤ in block at /tmp/tmpfile:1␤␤»
dalek kudo/nom: 148fb6e | (Tobias Leich)++ | src/core/IO/Spec/Win32.pm:
distinguish between different kinds of abs paths on win32
15:07
Ven m: say "foo"~*~* for <a b c> Z <x y z>; 15:08
camelia rakudo-moar 2e6010: OUTPUT«WhateverCode.new()␤WhateverCode.new()␤WhateverCode.new()␤WhateverCode.new()␤WhateverCode.new()␤WhateverCode.new()␤»
colomon [Coke]++ 15:09
hoelzro is there a good idiom for slurping a file into an array, where I have one line by index? 15:13
Ven m: say ("foo"~*~* for <a b c> Z <x y z>);
camelia rakudo-moar 2e6010: OUTPUT«fooax fooby foocz␤»
hoelzro I'm trying my @lines = slurp($filename)
I figured explicitly splitting wouldn't be necessary
Ven not sure how it failed so the first time though 15:14
masak hoelzro: how about my @lines = lines($filename) ? 15:18
masak er, lines($filename.IO) 15:18
hoelzro oh, I didn't know about the lines builtin
masak it's quite handy.
it used to be spelled prefix:<=>
masak shudders
Ven `=<>`
masak aye.
looks like an alien jellyfish from some old ASCII space game. 15:19
timotimo so ... ="foo.txt"?
Ven
.oO( I read that as "infix jellyfish" )
15:22
hoelzro is there a way to get the current time including microseconds? 15:23
timotimo m: say now; say time;
camelia rakudo-moar 2e6010: OUTPUT«Instant:1399389825.756710␤1399389790␤»
hoelzro ah, thanks timotimo
timotimo ... huh?!
timotimo is that our float printing going nuts again? 15:23
timotimo m: say now mod 60; say time mod 60; 15:24
camelia rakudo-moar 2e6010: OUTPUT«Cannot call 'infix:<div>'; none of these signatures match:␤:(Int:D \a, Int:D \b)␤:(int $a, int $b)␤ in sub infix:<mod> at src/gen/m-CORE.setting:4422␤ in block at /tmp/2yHY9Al8Aq:1␤␤»
timotimo m: say now.Int mod 60; say time.Int mod 60;
camelia rakudo-moar 2e6010: OUTPUT«3␤28␤»
dalek kudo/nom: 1ccc4d3 | (Tobias Leich)++ | src/core/IO/Spec/Unix.pm:
also cleanup the base/cwd in IO::Spec::Unix
PerlJam m: say now; say time; 15:25
camelia rakudo-moar 2e6010: OUTPUT«Instant:1399389935.674809␤1399389900␤»
PerlJam Why such a big difference between those numbers?
timotimo i want to know the same thing
m: say now.Num - time
camelia rakudo-moar 2e6010: OUTPUT«35.0602767467499␤»
timotimo m: say now.Num - time
camelia rakudo-moar 2e6010: OUTPUT«35.8219721317291␤»
FROGGS p: say now.Num - time 15:26
camelia rakudo-parrot 2e6010: OUTPUT«35.1420454978943␤»
PerlJam a constantish 35 seconds is weird
timotimo .... what.
FROGGS p: say now.Num - time
camelia rakudo-parrot 2e6010: OUTPUT«35.1477427482605␤»
FROGGS n: say now.Num - time
camelia niecza v24-109-g48a8de3: OUTPUT«Unhandled exception: Unable to resolve method Num in type Instant␤ at /tmp/3jQ5YHBeHO line 1 (mainline @ 4) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4595 (ANON @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4596 (module-CORE @ 576)…»
FROGGS j: say now.Num - time
camelia rakudo-jvm 2e6010: OUTPUT«35.49300003051758␤»
timotimo n: say now - time 15:27
camelia niecza v24-109-g48a8de3: OUTPUT«Unhandled exception: Cannot use value like Instant as a number␤ at <unknown> line 0 (ExitRunloop @ 0) ␤ at /home/p6eval/niecza/lib/CORE.setting line 300 (Any.Numeric @ 6) ␤ at <unknown> line 0 (ExitRunloop @ 0) ␤ at /tmp/2Yst1YFL7v line 1 …»
timotimo hmm
FROGGS ~/dev/rakudo$ perl6-m -e 'say now.Num - time'
35.7231543064117
even locally
timotimo weird timezones? :P
FROGGS *g* 15:28
bbiab
PerlJam leap seconds maybe?
FROGGS that many? no
jnthn evening, #perl6 15:33
timotimo hey jnthn :)
you said you'd have tuits tonight? :D
jnthn yawns
:P
hoelzro ahoy jnthn
jnthn ahoj
Well, I don't have $dayjob tasks to do this evening at least :)
I do plan to at least review the nwc10++ patches to MoarVM 15:34
Ulti one of the reasons I like Perl6! 15:34
p6: "MIHĂŞAN".lc
camelia rakudo-jvm 148fb6: OUTPUT«(timeout)» 15:35
( no output )
PerlJam aye, it is leap seconds ... tai-utc has our sub initial-offset() { 10 } and there are 25 leap-second-dates
thou p6: "MIHĂŞAN".lc.say 15:36
hoelzro oh, I forgot to congratulate everyone here on the latest Rakudo * release!
camelia rakudo-{parrot,jvm,moar} 148fb6, niecza v24-109-g48a8de3: OUTPUT«mihăşan␤»
hoelzro hoelzro.congratulate(*)
PerlJam r: my ($t,$n) = time, now; say $t; say $n; say Instant.from-posix($t); 15:39
camelia rakudo-moar 148fb6: OUTPUT«1399390747␤Instant:1399390782.213589␤Instant:1399390782␤»
..rakudo-jvm 148fb6: OUTPUT«1399390746␤Instant:1399390781.659␤Instant:1399390781␤»
..rakudo-parrot 148fb6: OUTPUT«1399390744␤Instant:1399390779.483663␤Instant:1399390779␤»
timotimo so should we be putting the leap seconds into both? 15:40
PerlJam no, I think it's right (modulo that initial offset which I'm not sure about).
timotimo hmm 15:41
that could easily give people WAT if they mix time and now.
thou My first reaction is that now shouldn't use TAI, it should use UTC. TAI should be requested explicitly via some module. 15:43
PerlJam interestingly, I was thinking we should make people say POSIX::time to emphasize that it's not UTC or TAI 15:45
thou and shouldn't TAI be *behind* UTC, not ahead of it? Or am I confused....
PerlJam no, you're confused
TAI has leap seconds, UTC doesn't.
jnthn .tell lizmat Supply itself should not be doing that kind of race protection. It does need putting somewhere, but not *there*. async_chars and async_bytes are not meant to use Supply directly in the end, for the reason you mentioned and also the other race between packets. 15:47
yoleaux jnthn: I'll pass your message to lizmat.
thou 35 leap seconds total since 1972 is correct: tycho.usno.navy.mil/leapsec.html 15:48
jnthn I'm sure that those 35 leap seconds make a big and important difference to our lives... 15:51
PerlJam when you're mixing Instant and time(), it might.
"We're launching the rocket in T-30 seconds" "Wait...the rocket launched 5 seconds ago!" 15:52
jnthn .tell lizmat in .Net there's some notion of Subject types whihc deal wiht this sort of problem; we absolutely do *not* want to steal that naming, but their semantics can be interesting to study. 15:53
yoleaux jnthn: I'll pass your message to lizmat.
PerlJam Is there some prior art for winner in other languages that I can read about/ 16:03
?
(I'm having trouble grokking what exactly can and should go in the X and Y slots in winner X { more Y { ... } } so I think I need a different perspective or more information) 16:06
timotimo aye, the winner synatx is kind of twofold 16:07
or ... it was at some point
i once implemented an early version of it, but that was superceded, i may have to read the current spec before i actually try to explain
timotimo i'm glad to report that the advent calendar still pulls in about 40-50 views per day 16:12
PerlJam The last example before the section on Supplies makes winner look quite a bit like given/when. gather loop { given $channel { when .more { ... } when .done { ... } } }
PerlJam And what does the * really mean in winner * { ... } ? 16:15
timotimo it means you don't supply a candidate list up front 16:17
instead, the candidates are taken from the internal blocks
PerlJam so, would winner * { more * { ... } } be a valid construction? 16:18
timotimo no
well, it could go for Promise.^instances and see there :P
or inspect MY::
but no
PerlJam So ... it seems a tad fiddly to me, but I don't know if that's just my ignorance or if there's a design problem. 16:20
timotimo well, winner is kind of like "select" except instead of giving you all the ready fd's, it executes a block directly and bails out 16:28
the desire to do winner * came from the following:
winner $p1, $p2, $c1, $c2 { done $p1 { ... }; done $p2 { ... }; more $c1 { ... }; more $c2 { ... }; wait 0 { ... } } 16:29
having to specify the promises/channels multiple times
i seem to recall i was among the people who wanted the change (introducing *, that is)
and since you can have the candidate list up front, you can also react to "any channel more-ing" or "any promise done-ing" with more * and done *
bbl
nwc10 p6: say $*VERSION 16:33
r: say $*VERSION
camelia rakudo-jvm 1ccc4d: OUTPUT«(timeout)»
..rakudo-moar 1ccc4d: OUTPUT«===SORRY!===␤Dynamic variable $*VERSION not found␤»
..rakudo-parrot 1ccc4d: OUTPUT«Dynamic variable $*VERSION not found␤ in method gist at gen/parrot/CORE.setting:12677␤ in method gist at gen/parrot/CORE.setting:1056␤ in sub say at gen/parrot/CORE.setting:13607␤ in block at /tmp/tmpfile:1␤␤»
..niecza v24-109-g48a8de3: OUTPUT«(Any)␤»
rakudo-moar 1ccc4d: OUTPUT«===SORRY!===␤Dynamic variable $*VERSION not found␤»
..rakudo-jvm 1ccc4d: OUTPUT«Dynamic variable $*VERSION not found␤ in method gist at gen/jvm/CORE.setting:12654␤ in sub say at gen/jvm/CORE.setting:13563␤ in block at /tmp/tmpfile:1␤␤»
..rakudo-parrot 1ccc4d: OUTPUT«Dynamic variable $*VERSION not found␤ in method gist at gen/parrot/CORE.setting:12677␤ in method gist at gen/parrot/CORE.setting:1056␤ in sub say at gen/parrot/CORE.setting:13607␤ in block at /tmp/tmpfile:1␤␤»
thou PerlJam: I think I agree with you about POSIX::time, after reading more on it. Any bare built-in functions should use UTC (including now(), time()). If POSIX or TAI is needed, those could be specifically requested. 16:37
lizmat greets #perl6 from the NLPM meeting 16:39
yoleaux 15:47Z <jnthn> lizmat: Supply itself should not be doing that kind of race protection. It does need putting somewhere, but not *there*. async_chars and async_bytes are not meant to use Supply directly in the end, for the reason you mentioned and also the other race between packets.
15:53Z <jnthn> lizmat: in .Net there's some notion of Subject types whihc deal wiht this sort of problem; we absolutely do *not* want to steal that naming, but their semantics can be interesting to study.
masak jnthn++ # separation of concerns 16:40
lizmat jnthn: will look later, now nom nom and presentations and decommute&
TimToady
.oO(sometimes "separation of concerns" sounds a little like "bolted on after"... :)
16:45
chenryn p6: say $];say $*PERL_VERSION; 16:53
camelia rakudo-{parrot,jvm,moar} 1ccc4d: OUTPUT«===SORRY!=== Error while compiling /tmp/tmpfile␤Unsupported use of $] variable; in Perl 6 please use $*PERL_VERSION␤at /tmp/tmpfile:1␤------> say $]⏏;say $*PERL_VERSION;␤»
..niecza v24-109-g48a8de3: OUTPUT«===SORRY!===␤␤Unsupported use of $] variable; in Perl 6 please use $*PERL_VERSION at /tmp/tmpfile line 1:␤------> say $]⏏;say $*PERL_VERSION;␤␤Parse failed␤␤»
chenryn p6: say $*PERL_VERSION; 16:54
camelia rakudo-jvm 1ccc4d: OUTPUT«Dynamic variable $*PERL_VERSION not found␤ in method gist at gen/jvm/CORE.setting:12654␤ in sub say at gen/jvm/CORE.setting:13563␤ in block at /tmp/tmpfile:1␤␤»
..rakudo-moar 1ccc4d: OUTPUT«===SORRY!===␤Dynamic variable $*PERL_VERSION not found␤»
..rakudo-parrot 1ccc4d: OUTPUT«Dynamic variable $*PERL_VERSION not found␤ in method gist at gen/parrot/CORE.setting:12677␤ in method gist at gen/parrot/CORE.setting:1056␤ in sub say at gen/parrot/CORE.setting:13607␤ in block at /tmp/tmpfile:1␤␤»
..niecza v24-109-g48a8de3: OUTPUT«(Any)␤»
tadzik heh
jnthn hah
m: say $*PERL 16:55
camelia rakudo-moar 1ccc4d: OUTPUT«{"compiler" => {"name" => "rakudo", "build-date" => "2014-05-06T16:18:21Z", "ver" => "2014.04-185-g1ccc4d3", "release-number" => "", "codename" => ""}, "name" => "rakudo"}␤»
tadzik "pepsi or coke?" "pepsi" "we don't have pepsi" "then coke" "we don't have coke either"
PerlJam why isn't "version" spelled out like the others? that's weird. 16:56
TimToady PerlJam: the whole purpose of now() is to be not-UTC
UTC can contain seconds that are 2 seconds long, and this must not stand 16:57
well, UTC "handles" leap seconds, but the OS misinterprets it as long seconds when it comes to time() 16:59
thou TimToady: I am ignorant, but read that UTC has a 23:59:60 second, not a 2-second-long 23:59:59 second
Ah, OK 17:00
TimToady anyway, the point of Instants is to be completely independent of any notion of cultural time apart from the length of a second
as soon as you start introducing cultural notions, people get very confused very fast 17:01
TimToady Instants don't even have an epoch, the way we've defined them. 17:02
Ven convinced yet another friend that perl 6 is pretty great 17:04
... he actually came back to me and said "yeah, a friend told me about python's greatness for one-liners, so I showed him the p6 stuff you told me about yesterday"
timotimo as a former (and still occasionally) python enthusiast ... yeah ... no ... 17:08
tadzik python and one-liners? 17:24
dalek kudo-star-daily: 4f61c75 | coke++ | log/ (5 files):
today (automated commit)
17:25
rl6-roast-data: d5d4349 | coke++ | / (6 files):
today (automated commit)
TimToady you see, there's this pressure in python to do things as one-liners so that you don't have to think about indentation :P 17:26
[Coke] *facepalm*
rakudo.parrot is now building and passing tests again.
rakudo.jvm died.
[Coke] # 17:27
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (malloc) failed to allocate 156237824 bytes for committing reserved memory.
# An error report file with more information is saved as:
Ven TimToady: that's a pretty bad one :) 17:33
(especially from you :P)
[Coke] new atom editor needs a perl 6 syntax. has a neat feature where you can say "git blame this on github". 17:35
FROGGS damn, rakudo has role IO::FileTestable where the spec mentions IO::FileTests 17:41
n: say IO::FileTestable 17:42
camelia niecza v24-109-g48a8de3: OUTPUT«(FileTestable)␤»
FROGGS n: say IO::FileTests
camelia niecza v24-109-g48a8de3: OUTPUT«Unhandled exception: Unable to resolve method postcircumfix:<( )> in type Any␤ at /tmp/t0BOhG3uxZ line 1 (mainline @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4595 (ANON @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4596 (module…»
FROGGS P: say IO::FileTests
camelia pugs: OUTPUT«*** No such subroutine: "&IO::FileTests"␤ at /tmp/FsMMyMSs0m line 1, column 5 - line 2, column 1␤»
FROGGS P: say IO::FileTestable
camelia pugs: OUTPUT«*** No such subroutine: "&IO::FileTestable"␤ at /tmp/vWqOcRhh0C line 1, column 5 - line 2, column 1␤»
FROGGS TimToady: here you mention that -s if about a *path*, where P5 talks about *files*: perlcabal.org/syn/S32/IO.html#line_558 17:50
TimToady: I want to spec .IO.z, and wonder if this should return True for something else other than files
*empty files 17:51
hoelzro there's no Perl 6 profiler aside from native level profiling, is there? 18:15
I have a one liner that's taking quite some time, and I'd like to see the breakdown of time spent in src/core/* files
[Coke] ISTR there was a profile that took advantage of parrot's --profile.. 18:17
raiph hoelzro: irclog.perlgeek.de/moarvm/2014-05-04#i_8677255
hoelzro thanks [Coke], raiph
[Coke]: btw, are you planning on continuing with the Mojolicious stuff?
I have a small Perl 5 application I wrote, and I'd like to port it to Perl 6 18:18
raiph lizmat, jnthn, anyone: I'm thinking and hoping the lastest R*, with the MoarVM backend, will compile the code in jnthn's recent reactive programming presentation. Is there anything obvious you know I'm missing before I publish something that makes that assumption? 18:22
[Coke] hoelzro: yes. My free time between now and the end of June is gone, however. 18:25
hoelzro ah ha 18:25
[Coke] Happy to give anyone commit privs to that repo if they wish to poke at it in the meantime.
hoelzro [Coke]: do you have a TODO list for it?
I might be able to allocate some tuits to it 18:26
[Coke] I was still at the "go through the utility methods and port those". all the recent async IO stuff was making me hope I could do a lot more, though.
hoelzro alright 18:27
[Coke] I basically got really motivated for 2 days an--SQUIRREL!
hoelzro haha 18:30
sounds like every project I ever start =P 18:31
PerlJam sounds like a common affliction 18:32
Sqirrel I've got nothing to do with it
btyler hoelzro: sri mentioned thinking about what a p6 mojo might look like, and that it was unlikely to end up being a straight port -- might be worth sounding out his thoughts on the matter if you think you're going to dive into mojo6 18:36
hoelzro btyler: yeah, I figured it wouldn't be too straightforward 18:37
I'll wait for _sri to chime in, then =)
ajr_ Anybody doing work on the ARM side might want to take a look at the pcDuino www.pcduino.com/ to accelarate development over the Pi. 18:38
FROGGS nwc10: ^^ # that is for you 18:41
_sri btyler/hoelzro: yea, you *could* do a quick port, i don't think it would have much of a future though, perl6 has too many cool new features that just wouldn't be utilized... a real redesign would be better, but takes time 18:43
hoelzro what would be the best way to decode a Buf of length 4 into an Int?
_sri: ok
FROGGS m: say :16('0x' ~ buf8.new( 0, 0, 128, 0).list>>.fmt('%02x').join) 18:52
camelia rakudo-moar 1ccc4d: OUTPUT«32768␤»
FROGGS hoelzro: but I don't if that is intended to be the best way :o)
hoelzro heh 18:53
thanks for the input, either way =)_
FROGGS v5 has a sub unpack wich would be handy here 18:54
masak raiph: seems it would be quite straightforward to simply test jnthn's code from the slides, no?
hoelzro I just noticed in the latest MVM Star that the modules aren't precompiled into moarvm files; why is this? 18:59
masak hoelzro: doesn't 'make' usually precompile modules? 19:01
hoelzro yeah, which is why I'm confused 19:02
I only see the .pm files
which is fine, but it probably increases load time
masak oh, you ran `make` already?
hoelzro well, I built a package for the 2014.04 Rakudo star 19:06
which ran make
[Coke] sri: I'd love to have that chat about mojo6 with you. I'll ring you up in about 6 weeks. :)
(in the meantime, as time permits, i'll keep doing minor stupid stuff that requires no real thought)
Juerd Random thought: %foo{ $foo :default('x') } as a shortcut for exists %foo{ $foo } ?? %foo{ $foo } !! %foo<x> 19:07
PerlJam Juerd: btw, you mean %foo{$foo}:exists these days 19:10
colomon wouldn't that might be %foo{$foo} // 'x' ? 19:12
thou %foo{$foo} // %foo<x> 19:13
colomon ah, right
thou but :exists instead of defined test
dalek kudo/nom: 4715afc | (Tobias Leich)++ | src/core/IO.pm:
.IO.z is now only True for empty files, not dirs
19:14
colomon hmmm, I guess a hash value can exist but be undefined?
FROGGS yes 19:14
FROGGS %foo<bar> = Int for example 19:14
PerlJam Seems a little to special-purposey to me. Perhaps a more real example would help? 19:15
jnthn hoelzro: I think make modules-install or so does it, iirc... 19:16
Which a make install should iirc trigger
hoelzro hmm
I can look into that later
jnthn When I was looking at it I'm sure I had it pre-compile the modules 19:17
masak Juerd: at first glance, it feels like that adverb is adverbing the wrong thing. 19:19
PerlJam Juerd: wait ... don't we already have my %h is default("blah")? Sure you can do my %h is default({ %h<blah> }()); 19:20
masak m: sub postcircumfix:<{{ }}>(%c, $k, $d) { %c{$k} :exists ?? %c{$k} !! $d }; my %h = foo => 42; say %h{{"foo"}}; say %h{{"bar"}} 19:21
camelia rakudo-moar 1ccc4d: OUTPUT«===SORRY!===␤Cannot find method 'orig'␤»
PerlJam (or soemthing like that)
masak aww
FROGGS PerlJam: if you keep a hash of name-to-class mapping, then its values where all type object and therefore undef
masak that error message leaves something to be desired, too.
m: sub postcircumfix:<{{ }}>(%c, $k, $d) { %c{$k} :exists ?? %c{$k} !! $d }; my %h = foo => 42; say %h{{"foo", 5}}; say %h{{"bar", 5}}
camelia rakudo-moar 1ccc4d: OUTPUT«Not enough positional parameters passed; got 2 but expected 3␤ in sub postcircumfix:<{{ }}> at /tmp/ZY3tig4mLB:1␤ in block at /tmp/ZY3tig4mLB:1␤␤»
masak m: sub postcircumfix:<{{ }}>(%c, :($k, $d)) { %c{$k} :exists ?? %c{$k} !! $d }; my %h = foo => 42; say %h{{"foo", 5}}; say %h{{"bar", 5}} 19:22
camelia rakudo-moar 1ccc4d: OUTPUT«Not enough positional parameters passed; got 0 but expected 2 in sub-signature␤ in sub postcircumfix:<{{ }}> at /tmp/Efju3bJTCm:1␤ in block at /tmp/Efju3bJTCm:1␤␤»
masak gives up
retupmoca m: buf8.new(0,0,128,0).unpack('N') 19:27
camelia ( no output )
retupmoca m: buf8.new(0,0,128,0).unpack('N').say
camelia rakudo-moar 1ccc4d: OUTPUT«32768␤»
FROGGS ohh, we have that method, nice
retupmoca m: say pack('N', 32768) 19:28
camelia rakudo-moar 1ccc4d: OUTPUT«Buf:0x<00 00 80 00>␤»
dalek kudo/nom: f1dd8a8 | (Elizabeth Mattijsen)++ | src/core/Mixy.pm:
Fix error message on Mixy.(pick|grab)
19:29
PerlJam m: my %h is default(%h<foo>); # surely this is a bug? 19:30
camelia rakudo-moar 1ccc4d: OUTPUT«===SORRY!=== Error while compiling /tmp/HtntR_h3tN␤Variable '%h' is not declared␤at /tmp/HtntR_h3tN:1␤------> my %h is default(%h<foo>⏏); # surely this is a bug?␤ expecting any of:␤ postfix␤»
masak PerlJam: yes. it's a bug by the parsing principles of Perl 6, I would say. 19:31
PerlJam: as in, %h should be defined by that point.
s/defined/declared/
that's why something like this works: 19:32
m: my %h = %h; say %h
camelia rakudo-moar 1ccc4d: OUTPUT«().hash␤»
lizmat PerlJam: could you rakudobug that? 19:34
retupmoca oh, that's interesting
m: my $x = $x.^name; say $x; say $x.^name;
camelia rakudo-moar 1ccc4d: OUTPUT«Any␤Str␤»
jnthn PerlJam, lizmat: I think it's 'cus the traits are part of the declaration... 19:35
And until we know there's no "is FooType" trait there, we don't actually know what container to install. 19:36
jnthn So it's kinda a can of worms to open. 19:36
lizmat ok... one of those things then...
jnthn "of" is similar
PerlJam sure, but the name %h is already in existence, so "Variable not declared" is LTA
lizmat like role { class {} }
dalek ecs: a7244f9 | (Tobias Leich)++ | / (2 files):
spec .IO.z and s/IO::FileTests/IO::FileTestable/

niecza and rakudo implemented the role as IO::FileTestable, and this seems to match the current way of naming roles.
masak PerlJam: feel free to submit a rakudobug (or delegate to me) 19:39
PerlJam rakudobugged 19:43
masak PerlJam++ 19:45
moritz star: say 42 19:56
camelia star 2014.04: OUTPUT«Error occurred during initialization of VM␤Could not reserve enough space for object heap␤Error: Could not create the Java Virtual Machine.␤Error: A fatal exception has occurred. Program will exit.␤»
PerlJam that's a really heavy 42. 19:57
vendethiel I guess the world weighs its worth in RAM 19:59
[Coke] never memory enough. 20:06
[Coke] wonders if the java build failure is a result of the ulimit or just the normal build process.
dalek albot: 98c9ae5 | moritz++ | evalbot.pl:
add star-m, star-p, star-j targets
20:07
moritz star: use JSON::Tiny; say to-json { a => [1, 2], b => "42 23" } 20:09
camelia star-{m,p} 2014.04: OUTPUT«{ "a" : [ 1, 2 ], "b" : "42 23" }␤» 20:09
vendethiel \o/ 20:13
dalek ast: e0b835f | (Tobias Leich)++ | S16-filehandles/filestat.t:
be nice and close filehandles
20:19
masak moritz++
Juerd PerlJam: Oh wow, it's already there? I'll have to read the spec. Thanks for the pointer :) 20:27
PerlJam: I can't find it in the Synopses. Do you happen to know where I could look this up? I've tried S09. 20:30
PerlJam Juerd: S02:1315 or so 20:31
synopsebot Link: perlcabal.org/syn/S02.html#line_1315
Juerd PerlJam: Thank you! 20:32
PerlJam S02:693 mentions it in a more general sense too
synopsebot Link: perlcabal.org/syn/S02.html#line_693
FROGGS r: say $*EXECUTABLE
PerlJam It's not well-documented in the sense that a reference manual would. 20:33
camelia rakudo-jvm f1dd8a: OUTPUT«IO::Path</home/p6eval/rakudo-inst-1/bin/perl6-j>␤»
..rakudo-moar f1dd8a: OUTPUT«IO::Path</home/p6eval/rakudo-inst-1/bin/perl6-m>␤»
..rakudo-parrot f1dd8a: OUTPUT«IO::Path</home/p6eval/rakudo-inst/bin/perl6-p>␤»
masak "If a mutable value is borrowed, it becomes immutable for the duration of the borrow." -- this, my friends, is the future. featherweightmusings.blogspot.co.uk...rowed.html
I hope Perl 6 becomes extensible enough that type systems like this can be evolved inside of it.
masak I think borrowed references are related to linear logic, but the exact relation is not so clear to me. 20:34
masak anyway, it's surprising that not more languages do what Rust do: enforce memory safety through the type system. 20:38
masak on HN, "I'd argue that linear and substructural typing is pretty much in the cutting edge of language research." 20:39
vendethiel #shithnsays 20:40
what is even "linear typing"?
masak do not dismiss it without first learning what it is :) 20:41
dalek kudo/nom: 959cb81 | (Tobias Leich)++ | src/core/IO.pm:
cleanup to be created IO::Path

Otherwise chdir("t/spec") from C:\rakudo leads to a mix of path separators.
masak linear typing, as far as I've understood it, captures the notion that some resources can't just be copied in memory -- by sharing it, you give it away rather than duplicating it.
PerlJam yep, that jibes with my understanding 20:42
masak which makes a lot of sense for mutable references, for example. linear logic makes sure that by sharing the mutable reference, you (temporarily) give away the right to mutate it.
PerlJam stuff in linear type systems always have a ref count of 1
masak ooh, that's a nice way of putting it.
it took me a while to realize what it reminded me of... quantum computation and the no-cloning theorem. 20:43
I bet they're related somehow on a deep level.
vendethiel (or, you could, erm, just forget about side effects :).)
(side-effects anywhere*) 20:44
masak "forget" as in "not use", or "forget" as in "ignore the effects of" ?
vendethiel sorry - "not use" 20:45
PerlJam awww... you should have left the ambiguity so that masak would forever be in two states of thought about your sentence. 20:46
masak :P
vendethiel: well, that leads to a very special kind of programming. I think there are interesting code-scapes outside of eschew-all-side-effects territory.
Ulti Mouq++ for giving me really useful feedback on my Gist! 20:49
vendethiel masak: I hope there are :-) 20:50
but linear typing and substructural typing seem to be related to GC and whatnot, here 20:51
masak I don't know what the exact relation is there. neither C++ nor Rust have a GC, but Rust employs linear typing. 20:54
vendethiel yeah, not really GC, more RAII 20:56
masak "The single-reference property makes linear type systems suitable as programming languages for quantum computation, as it reflects the no-cloning theorem of quantum states." -- hah! en.wikipedia.org/wiki/Substructural_type_system 21:00
[Coke] "now you're just stringing words together" 21:06
masak [Coke]: it's fascinating stuff. someone who has done OO will instantly recognize that what nature is doing here is practicing encapsulation/information hiding. 21:11
[Coke]: that is, you can put something in a quantum state where it contains a lot more information than a corresponding classical system -- but that information is "private", and if you try to read it directly you encounter nature's equivalent of a permission error -- the information is destroyed and the system starts behaving clasically. basically, you get bumped down to the "public" interface. 21:13
masak 'night, #perl6 21:31
lue masak: in general, there's a lot about the world that's just programming on a different kind of transistor :P 21:33
jnthn sleep & 21:52
dalek kudo/nom: beda46c | (Tobias Leich)++ | src/core/IO.pm:
cleanup paths in chdir, not IO::Path.new, this unbusts tests on linux
22:09
vaskozl_ Hey again! 22:28
vaskozl_ I'm trying to remove newlines from a file like so: echo "line one" & echo "line two" |perl6 -pe '$_=.chomp;' 22:28
in perl 5 it would've been done with |perl -pe 'chomp' 22:29
but for some reason nothing happens to the newlines, they still appear
timotimo aye, because they are say'd at the end 22:30
vaskozl_ oh crap
timotimo and say has the property of putting a newline in for you for convenience :) 22:31
vaskozl_ yes I forgot
that sux some times :D
timotimo what was our answer to the eskimo kiss operator again?
vaskozl_ is there an option that does print instead?
if -pe replace -ple
timotimo since the "main loop" would give you a list of the lines, you can print "".join them or so.
actually. what about this:
er. hold on. no. 22:32
vaskozl_ *ignore the echo stuff
that kinda doesn't work very well
timotimo cat README.md | perl6 -ne 'print $_' 22:33
easy as pie, once you've read perl6 --help :)
vaskozl_ well kinda logn :/ 22:34
s/gn$/ng/
would it be a bad idea to implement an option that does print instead?
-pe now behaves like perl5 -ple (or atleast simililarly) 22:35
then again, this is only a problem when you want to remove the new lines
timotimo well, you can also use perl -ne '.print' 22:37
vaskozl_ yah makes sense
timotimo and then you can leave out the ' ' 22:38
we really ought to write up some documentation for common things you may want to do if you're looking to write shell one-liners in perl6 22:39
vaskozl_ hey how come we don't have to chomp it?
timotimo now that our implementation starts up in a reasonable amount of time
let's see.
m: say $*IN.DUMP
vaskozl_ perl5 -ne 'print' shows new lines while perl6 -ne '.print' doesn't
camelia rakudo-moar 959cb8: OUTPUT«IO::Handle<1>(␤ :$!PIO(BOOTIO<2>(...)),␤ :ins(▶0),␤ :chomp(▶True),␤ :path(IO::Path<5>(:path(=IO::Path<5>)))␤)␤»
timotimo there we go. $*IN has chomp set to true by default
so lines() will give you lines without their end-of-line piece 22:40
vaskozl_ timotimo: that's pretty neat
someone thought about this before
timotimo apparently :)
vaskozl_ strict is not disabled in one liners :/ 22:41
timotimo yes
we don't have no strict yet
usually, you can get away with writing "state" in front of the first occurence of a variable and it'll do what you want :P
vaskozl_ now I have to learn perl6 regex! 22:42
timotimo ooooh perl6 regex is so lovely 22:43
vaskozl_ omg I can use quotes so I no longer have to escape everything! 22:44
*other than quotes :D
dalek p: 73f417d | (Tobias Leich)++ | / (2 files):
map nqp::execname and bump moar revision
TimToady '"' and "'" work too :)
timotimo yes, that is one of the nicest things we have; also the "backslash reform" 22:45
dalek kudo/nom: 1a28eda | (Tobias Leich)++ | / (3 files):
use nqp::execname to get the runner's path safely

Parrot does it already correct because its fake executable is able to determine its own path, but what we do here for MoarVM needs doing for JVM also.
22:47
vaskozl_ I've been using this awesomeness recently: ms/'start' <( .*? )> 'finish'/ 22:48
but I don't really know much about ms/ and the <()> notation
where can I read up on this?
timotimo yes, i love <( and )>, too 22:49
so much nicer than <?after 'start'> ... <?before 'finish'> 22:50
timotimo also i believe the version you posted gets optimized using boyer-moore-string-search, and the other one doesn't 22:50
it's all in S05:01
synopsebot Link: perlcabal.org/syn/S05.html#line_01
vaskozl_ nice 22:51
much kudos
timotimo there's also a regextut on docs.perl6.org, but it's very incomplete 22:52
i wonder if that site should get the "onelinerstut", too? 22:53
vaskozl_ timotimo: comming from perl 5 I didn't really face a difficulty 22:53
other than the one just now 22:54
also since you guys fixed -p in moar and made -pe work it's been awesome!
timotimo TimToady: should an invocation like -e 'my $foo = "hello";' -ne '$foo = $_ if Bool.pick;' -e 'say $foo' result in something like 'my $foo = "hello"; for lines { $foo = $_ if Bool.pick }; say $foo' being executed?
i think we're currently not doing multiple -e's
that's pretty nonhelpful, IMO.
i'm very glad you're actually exercising the commandline portions of perl6, i've been mostly writing longer scripts so far 22:55
anyway, i ought to get some rest now :)
gnite and good luck!
vaskozl_ good night :)
skids r: 0x0123456789abcdef.perl.say 23:54
camelia rakudo-moar 1a28ed: OUTPUT«81985529216486896␤»
..rakudo-{parrot,jvm} 1a28ed: OUTPUT«81985529216486895␤»
skids r-m's bitops are even more hosed than r-p. 23:55