»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend! Set by moritz on 22 December 2015. |
|||
00:01
pmurias left,
CurtisOvidPoe joined
00:05
vendethiel left
00:09
spider-mario left
00:10
spider-mario joined
00:11
musiKk_ left
00:12
Relsak left
00:14
spider-mario left
00:15
wamba left,
firstdayonthejob left
00:19
cpage_ left
00:24
colomon joined
|
|||
RabidGravy | I'n sitting here listening to a Perl 6 program sending random notes to a synthesizer | 00:26 | |
AlexDaniel | RabidGravy: I am sitting here controlling a robotic vacuum cleaner with Perl 6 :) | 00:33 | |
RabidGravy | this is a cool thing | 00:34 | |
00:35
itaipu joined,
cognominal left
|
|||
RabidGravy | so Perl 6 will rule the world | 00:36 | |
00:37
adu joined,
kurahaupo left
00:39
itaipu left
|
|||
timotimo | rule, token or regex. | 00:40 | |
00:40
michaelvipub joined
00:41
sufrostico left
00:42
cpage_ joined,
itaipu joined
00:47
nadim left
00:49
adu left
00:52
kid51 left
00:53
itaipu left
00:56
RabidGravy left
00:58
kid51 joined
01:13
t_ joined
01:39
gnommer joined
01:40
stmuk joined
01:42
stmuk_ left
01:43
t_ left
01:52
frew left
01:57
llfourn left,
adu joined
02:02
kalkin-_ joined
02:07
kalkin-__ left
02:08
kaare_ joined
02:10
Ben_Goldberg joined
02:12
BenGoldberg left
02:13
michaelvipub left
02:15
jack_rabbit joined
02:22
gnommer left
|
|||
AlexDaniel | OK, so IO::Handle.split does not really work? | 02:29 | |
it looks like it returns a non-lazy list | 02:30 | ||
SmokeMachine____ | hi again! I have a question: | 02:32 | |
when I use [X] on a list with 3 tuples on it, it returns a list of tuples with 3 elements each | |||
m: my @a = (1, 2, 3, 4, 5), (10, 20, 30, 40, 50), (100, 200, 300, 400, 500); ([X] @a).say | |||
camelia | rakudo-moar 4f7cb8: OUTPUT«((1 10 100) (1 10 200) (1 10 300) (1 10 400) (1 10 500) (1 20 100) (1 20 200) (1 20 300) (1 20 400) (1 20 500) (1 30 100) (1 30 200) (1 30 300) (1 30 400) (1 30 500) (1 40 100) (1 40 200) (1 40 300) (1 40 400) (1 40 500) (1 50 100) (1 50 200) (1 50 300) (1…» | ||
SmokeMachine____ | www.irccloud.com/pastebin/wIvpqV9X/ | 02:33 | |
AlexDaniel | SmokeMachine____: and what do you want instead? | ||
02:35
pyrimidi_ joined
|
|||
SmokeMachine____ | when I do it with 2 tuples, it returns tuples with 2 elements: | 02:36 | |
m: my @a = (1, 2, 3, 4, 5), (10, 20, 30, 40, 50); ([X] @a).say | |||
camelia | rakudo-moar 4f7cb8: OUTPUT«((1 10) (1 20) (1 30) (1 40) (1 50) (2 10) (2 20) (2 30) (2 40) (2 50) (3 10) (3 20) (3 30) (3 40) (3 50) (4 10) (4 20) (4 30) (4 40) (4 50) (5 10) (5 20) (5 30) (5 40) (5 50))» | ||
AlexDaniel | SmokeMachine____: that's how X works :) | 02:37 | |
SmokeMachine____ | so, why it returns only 1 tuple with all elements when I use a list with 1 tuple? | ||
m: my @a = (1, 2, 3, 4, 5); ([X] @a).say | |||
camelia | rakudo-moar 4f7cb8: OUTPUT«((1 2 3 4 5))» | ||
AlexDaniel | m: my @a = (1, 2, 3, 4, 5); ([X] @a).perl.say | ||
camelia | rakudo-moar 4f7cb8: OUTPUT«((1, 2, 3, 4, 5),).Seq» | ||
geekosaur | seems to make sense to me, picks one element from each input tuple -- which, there being one, means one element. and there's no "1-tuple" | 02:38 | |
02:38
Cabanossi left
|
|||
geekosaur | m: ((1),(2),(3),(4),(5)).say | 02:39 | |
camelia | rakudo-moar 4f7cb8: OUTPUT«(1 2 3 4 5)» | ||
SmokeMachine____ | but that doesn't "do what I mean"... | ||
geekosaur | that being? | 02:40 | |
SmokeMachine____ | my problem is: | ||
02:40
adu left,
kid51 left
|
|||
AlexDaniel | m: .say for $*IN.lines | 02:41 | |
camelia | rakudo-moar 4f7cb8: OUTPUT«Céad slán ag sléibhte maorga Chontae Dhún na nGallAgus dhá chéad slán ag an Eireagal ard ina stua os cionn caor is coll;Nuair a ghluais mise thart le Loch Dhún Lúich’ go ciúin sa ghleann ina luíI mo dhiaidh bhí gleanntáin ghlas’ G…» | ||
AlexDaniel | m: .say for $*IN.split(splitter => ‘ ’) | ||
camelia | rakudo-moar 4f7cb8: OUTPUT«Céad slán ag sléibhte maorga Chontae Dhún na nGallAgus dhá ch…» | ||
02:41
cognominal joined
|
|||
AlexDaniel | ??? | 02:41 | |
02:42
Cabanossi joined
|
|||
AlexDaniel | ah, I'm not reading the docs right | 02:42 | |
m: .say for $*IN.split(‘ ’) | |||
camelia | rakudo-moar 4f7cb8: OUTPUT«CéadslánagsléibhtemaorgaChontaeDhúnnanGallAgusdháchéadslánaganEireagalardinastuaoscionncaoriscoll;NuairaghluaismisethartleLochDhúnLúich’gociúi…» | ||
02:43
molaf_ joined
|
|||
saaki | psch: ah that was it, thanks! i was wanting to use "," rather than "|" there | 02:44 | |
trying* | |||
SmokeMachine____ | m: my @a = (1, 2, 3), (10, 20, 30), (100, 200, 300); say "call-func-with({ $_.join(q|, |) })" for [X] @a | ||
m: my @a = (1, 2, 3), (10, 20, 30); say "call-func-with({ $_.join(q|, |) })" for [X] @a | |||
m: my @a = (1, 2, 3); say "call-func-with({ $_.join(q|, |) })" for [X] @a | |||
camelia | rakudo-moar 4f7cb8: OUTPUT«call-func-with(1, 10, 100)call-func-with(1, 10, 200)call-func-with(1, 10, 300)call-func-with(1, 20, 100)call-func-with(1, 20, 200)call-func-with(1, 20, 300)call-func-with(1, 30, 100)call-func-with(1, 30, 200)call-func-with(1, 30, 30…» | ||
rakudo-moar 4f7cb8: OUTPUT«call-func-with(1, 10)call-func-with(1, 20)call-func-with(1, 30)call-func-with(2, 10)call-func-with(2, 20)call-func-with(2, 30)call-func-with(3, 10)call-func-with(3, 20)call-func-with(3, 30)» | |||
rakudo-moar 4f7cb8: OUTPUT«call-func-with(1, 2, 3)» | |||
02:45
adu joined,
ilbot3 left
02:47
molaf left,
ilbot3 joined
02:51
FROGGS_ joined
02:55
FROGGS left
03:03
perlawhirl joined
03:05
jstimpfle joined
03:08
Ben_Goldberg left
|
|||
SmokeMachine____ | AlexDaniel: you said you liked the idea of Test::Fuzz... just to let you know, the module is getting better... I did the fuzz method that you "asked for"... if you have a free time and want to critic: github.com/FCO/Test-Fuzz | 03:14 | |
zacts | hi perl6 nerds | 03:16 | |
03:16
vendethiel joined
|
|||
AlexDaniel | SmokeMachine____: sounds great. Consider adding it to the ecosystem once it gets more or less ready :) | 03:19 | |
SmokeMachine____ | AlexDaniel: I will! thanks! have a good night!! | 03:20 | |
03:20
perlawhirl left
03:22
jack_rabbit left,
vendethiel left
03:37
noganex joined
03:39
jack_rabbit joined
03:40
noganex_ left
03:49
frew joined,
jack_rabbit left
03:57
vendethiel joined
03:58
xtreak joined
04:05
jack_rabbit joined
04:12
wamba joined
04:13
jack_rabbit left
04:26
AlexDaniel left
04:27
Upasaka_ left
04:33
wamba left
04:35
kaare_ left
04:36
pyrimidi_ left
04:41
Upasaka joined
04:54
colomon left
05:00
vendethiel left
05:01
yqt left
05:06
colomon joined
05:11
colomon left
05:21
perlawhirl joined
05:23
ufobat left
05:30
khw left
05:39
Upasaka left
05:48
Upasaka joined
05:52
adu left
05:53
Cabanossi left
05:55
Cabanossi joined,
buharin joined
06:03
buharin left
|
|||
perlawhirl | hi perlers | 06:08 | |
who's awake | |||
sortiz | perlawhirl, Hi | 06:09 | |
06:09
pierrot left
|
|||
perlawhirl | how can i do a defined-or subscript? | 06:10 | |
m: my @a = <one two three>; say @a[5 || 1]; | |||
camelia | rakudo-moar 4f7cb8: OUTPUT«(Any)» | ||
perlawhirl | or do i have to ne content with $var = @a[5] || @a[1]; | 06:11 | |
sortiz | The later, but use // | 06:12 | |
perlawhirl | ahh yeh.. the defined-or op :D | ||
alright, just checking if there was a shorter way | |||
06:16
CIAvash joined
|
|||
sortiz | m: my @a = <a b c d e>; say @a[10,4,3,5].first(*.defined); # Not shorter ;-) | 06:17 | |
camelia | rakudo-moar 4f7cb8: OUTPUT«e» | ||
perlawhirl | hah | 06:18 | |
sortiz | And I expect 'c' :-(, Need more coffee | ||
06:20
skids left
|
|||
perlawhirl | maybe thats why you've got "c" on the brain... your bodies telling you C-offee | 06:26 | |
and i blame my poor grammar on lack of sleep and too much coffe | 06:27 | ||
sortiz | Coffee ready :-) | 06:29 | |
perlawhirl | ok... more random defindedness related shenanegans... | 06:30 | |
m: my @a = <one two three>; 12 ~~ /(\d+) { ?@a[$0].defined } / | 06:31 | ||
camelia | ( no output ) | ||
perlawhirl | m: my @a = <one two three>; say 12 ~~ /(\d+) { ?@a[$0].defined } / | ||
camelia | rakudo-moar 4f7cb8: OUTPUT«「12」 0 => 「12」» | ||
perlawhirl | why does the regex succeed if @a[12] is not defined, and can/should it backtrack to 1? | ||
read: is there a way to make it so | |||
perlawhirl is off to read regexes doc again | 06:32 | ||
PerlJam | m: my @a = <one two three>; say 12 ~~ /(\d+) <?{ ?@a[$0].defined }> / | 06:37 | |
camelia | rakudo-moar 4f7cb8: OUTPUT«「1」 0 => 「1」» | ||
PerlJam | perlawhirl: like that? | ||
06:38
tmch left
06:39
michaelvipub joined
|
|||
perlawhirl | oh right... the ? i totes forgot | 06:40 | |
i could have just referred to one of my other scripts | |||
again... did i mention i'm sleeped deprived :D | 06:41 | ||
PerlJam needs to get to bed actually | 06:42 | ||
my brain hasn't worked quite right all day and no sleep doesn't help that for tomorrow | |||
06:50
domidumont joined
06:54
domidumont left
06:56
domidumont joined,
perlawhirl left
07:10
virtualsue joined
07:24
Upasaka left
07:28
xtreak left,
xtreak joined
07:32
Upasaka joined
07:43
domidumont left
07:45
geraud left
07:48
xtreak left
07:51
tokomer joined
07:54
xtreak joined,
vendethiel joined
08:00
virtualsue left
08:07
rindolf joined
08:08
geekosaur left
08:10
geekosaur joined
08:12
tokomer left
08:15
darutoko joined
08:21
molaf_ left
08:26
pierrot joined
08:32
CIAvash left
08:38
dsp-_ is now known as dsp-
08:41
Exodist joined
08:48
firstdayonthejob joined
|
|||
stmuk | 08:55 | ||
08:56
azawawi joined
|
|||
azawawi | hi | 08:57 | |
anyone with Mac OSX to test a Selenium::WebDriver? | 08:58 | ||
re travis-ci.org/azawawi/perl6-seleni...1139#L3594 | 08:59 | ||
09:00
michaelvipub left
|
|||
azawawi | any news on 2016.03? | 09:10 | |
azawawi listens to the echo in the room | 09:11 | ||
nine | echo, echo, echo, echo, ... | 09:23 | |
09:23
virtualsue joined
09:25
xtreak left
|
|||
azawawi | :) | 09:26 | |
nine: do you have by any chance a macosx environment around you? :) | 09:27 | ||
nine | Nope...I'm a free software zealot | 09:28 | |
azawawi | nine: cool. i respect that :) | 09:29 | |
09:32
frithnanth joined,
virtualsue left
09:40
kalkin-_ is now known as kalkin-
09:45
Ven joined
09:46
RabidGravy joined
|
|||
Ven | azawawi: cloning! | 09:47 | |
azawawi | Ven: which MacOSX? | ||
Ven | 10.10.5 yosemite | 09:48 | |
(updating rakudo first) | |||
azawawi | cool thanks | 09:49 | |
09:49
TEttinger left
|
|||
azawawi | basically phantomjs is refusing to start for some reason via Proc::Async | 09:49 | |
Ven | sent a PR your way WRT phantomjs on mac os | 09:52 | |
well, `make install` is failing for me. "An exception occurred while evaluating a constant. Could not find symbol '&bool'" | 09:53 | ||
azawawi | Ven: link output please? | 09:58 | |
09:58
virtualsue joined
|
|||
Ven | cleaned up my install, rebuilding :) | 09:59 | |
updating panda now. | 10:01 | ||
azawawi | cool thx for your help. I really appreciate it :) | 10:03 | |
is it me or did they Apple remove the i7 CPU option from iMac? | 10:04 | ||
s/did they/did/ | |||
Ven | no idea, sorry :) | ||
azawawi | oh you get it in the custom builds section now :) | 10:07 | |
for only +200$ (hehe) | 10:08 | ||
10:08
wamba joined
|
|||
Ven | well, HTTP::UserAgent's tests fail here | 10:08 | |
10:09
xtreak joined
|
|||
azawawi | NETWORK_TESTING enabled? | 10:10 | |
Ven | dunno, I just panda install'd it | ||
(so: no) | |||
azawawi | link the output please? | 10:11 | |
10:11
pmurias joined
|
|||
Ven | just "host unreachable" | 10:11 | |
azawawi | panda update && panda install HTTP::UserAgent | 10:12 | |
Ven | and now it worked on the second try :P. guessed it was just a spurious failure | ||
azawawi | most likely a HTTP::UserAgent test not adhering to "NETWORK_TESTING" being off | 10:13 | |
echo $NETWORK_TESTING # to be sure | |||
Ven | it's empty | 10:14 | |
okay, got it to "Cannot obtain a session after 30 attempts" on Selenium::WebDriver | |||
azawawi | good | ||
phantomjs --webdriver=5555 --webdriver-loglevel=DEBUG | 10:15 | ||
Ven | same error | 10:16 | |
azawawi | no did phantomjs give any output? | ||
for the command above? | |||
Ven | no | ||
well, it started, but nothing more. "GhostDriver - Main - running on port 5555" | |||
azawawi | telnet localhost 5555 | 10:17 | |
10:17
hankache joined
|
|||
azawawi | can you clone the S:WebDriver repo please? | 10:17 | |
hankache | morning * | 10:18 | |
10:18
bjz_ left
|
|||
azawawi | Ven: Try to debug this please github.com/azawawi/perl6-selenium-...re.pm6#L44 | 10:18 | |
10:18
virtualsue left
|
|||
azawawi | Ven: maybe _empty-port is not getting us a port | 10:19 | |
hankache: morning | |||
10:19
pippo joined
10:20
pippo left,
perlawhirl joined
|
|||
hankache | hi azawawi | 10:20 | |
10:21
bjz joined
|
|||
azawawi | Ven: gist.github.com/azawawi/f9b8356ed8ed0a4c3c0f # Use this for testing it quickly | 10:25 | |
hankache: hey | |||
10:31
frithnanth left
|
|||
dalek | Iish/myGLR: 0055e68 | (Salvador Ortiz)++ | / (2 files): GLR test target |
10:32 | |
Iish/myGLR: 3849814 | (Salvador Ortiz)++ | lib/DBDish/StatementHandle.pm6: The GLR of DBDIsh. $sth.allrows now returns Seq Fetching rows is now lazy, plus: - named ':hash' of .row method is now implemented by the role. - legacy '.fetchrow' requirement removed from drivers, a simple one implement by the role. - Allows driver's ._row method return a simple list of typed values |
|||
Iish/myGLR: d20be30 | (Salvador Ortiz)++ | lib/DBDish/ (3 files): Simplify drivers for post GLR role |
|||
Iish/myGLR: 4ae1c57 | (Salvador Ortiz)++ | / (4 files): Bump to v0.5.0 DBDish's changes deserve the version incremented. |
|||
10:34
firstdayonthejob left
10:39
xtreak left
10:47
firstdayonthejob joined
10:49
spider-mario joined
10:50
michaelvipub joined
10:53
hankache left
|
|||
RabidGravy | I'm happy, Perl 6 is fast enough to generate a passible acid house bassline at ~120bpm | 10:54 | |
azawawi | RabidGravy: cool | 10:55 | |
RabidGravy: what's your machine specs btw? | |||
timotimo | neato | ||
and good morning | |||
10:55
SCHAAP137 joined
|
|||
RabidGravy | azawawi, it's >5yo i7 | 10:56 | |
with 8gig of memory | |||
azawawi | RabidGravy: Geoforce Titan X with 8 Xeon E7 CPUs :) | ||
azawawi one can dream | 10:57 | ||
RabidGravy | well if I had one of those I could probably do the synthesis part as well | ||
azawawi | most probably your old i7 will beat my old AMD FX-8150 16GB on single thread performance :) | 10:58 | |
an i5 is already doing that | |||
10:58
vendethiel left
|
|||
timotimo | RabidGravy: oh, so that's only midi commands now? | 11:01 | |
RabidGravy | yeah, well you know how hard it was to generate a sine in the time budget? | ||
adding a LPF and a volume envelope I guess would be good for one note a second or something | 11:02 | ||
instead of ~32 | 11:03 | ||
11:03
cpage_ left
11:04
cpage_ joined
|
|||
timotimo | right | 11:06 | |
RabidGravy | it may or may not be playing at rabidgravy.com:8000/stream | ||
timotimo | i'd think adding those things will only slow the thing down a little bit, compared to the overall overhead we already had | ||
11:06
xinming left
|
|||
timotimo | but it's still pretty bad to have all these gc pauses in there | 11:07 | |
(we have a way to make that faster, fortunately) | |||
11:08
xinming joined
|
|||
azawawi listens | 11:09 | ||
RabidGravy | is it actually playing, jack has the soundcard here so I can't actually listen to the stream | 11:10 | |
but fwiw, Perl6 generating the note data, perl6 reading the audio stream, perl6 encoding to mp3 and perl6 streaming to the icecast server | 11:11 | ||
11:12
frithnanth joined
|
|||
RabidGravy | if it's doing all those things reasonably, then it's "fast enough" and I don't give a stuff about no ten million iteration loop | 11:13 | |
perlawhirl | it is playing | ||
psch | and it definitely sounds somewhat like acid | 11:14 | |
perlawhirl | i lasted about 3 mins before my eyes started bleeding | ||
psch | hard to tell if it actually drops out or if that's the synth | ||
as in, there's minor glitchy bits occassionally | |||
RabidGravy | possibly, I've got the latency optimistically low on the jackd | 11:15 | |
psch | the tempo also doesn't seem completely consistent... | ||
RabidGravy | it probably isn't streaming quite right, but I'm hand calculating the note length in millis so that could be faulty too :) | 11:17 | |
right, I'll leave that going while I have a shower | 11:18 | ||
timotimo | i wonder if we can find out some more good stuff by doing a C-level profile of your workload | 11:21 | |
ideally, when we have a big bunch of arithmetic operations, we'd be 100% in jit-land, but since things aren't always inlined nicely, we'll also be having some invocation overhead, increasing and decreasing frame reference counters etc | 11:22 | ||
11:44
nienacko joined
11:45
azawawi left
|
|||
RabidGravy | yeah | 11:56 | |
anyway I had a realisation when I was in the shower | |||
timotimo | keep it real! | 11:57 | |
perlawhirl | the best code ideas happen in the shower, on the toilet, or while sleeping | 11:58 | |
timotimo | i agree with that statement | ||
perlawhirl | who knows what would happen if you fell asleep in the shower and pee'd on yourself! :D | ||
timotimo | :\ | ||
RabidGravy | I wasn't thinking hard enough about the realtime synthesis thing, and if the Meeblip can do a good virtual analgue synthesis on a 16Mhz AVR in ~1000 lines of AVR assembler then it *must* be possible in a Perl 6 program | 11:59 | |
going to kill the stream now | 12:00 | ||
want to put it at a more sensible latency value and also have jack use the dummy driver so I can listen to the stream | 12:01 | ||
also later I'm going to haul out a real synthesizer and a mixer as this could be quite awesome | 12:05 | ||
or synthesizer*s* | 12:08 | ||
right off out for a bit anyway | 12:11 | ||
timotimo | where was the code for the sine sound again? | ||
12:14
colomon joined,
vendethiel joined
12:15
RabidGravy left
|
|||
timotimo | twitter.com/HourlyCats/status/7110...8873508864 - this is approximately how awake i feel right now | 12:17 | |
12:25
cpage_ left,
cpage_ joined
12:35
vendethiel left
12:42
kid51 joined
12:44
BenGoldberg joined
12:50
jin_ joined
13:00
jin_ left
13:06
rindolf left
13:09
vendethiel joined
13:13
AlexDaniel joined
13:14
frithnanth left
13:15
andreoss joined
|
|||
andreoss | m: my \i =$= 1; say ++i; | 13:17 | |
camelia | rakudo-moar 319ec8: OUTPUT«2» | ||
andreoss | m: my \i =$(1); say ++i; | ||
camelia | rakudo-moar 319ec8: OUTPUT«Cannot call prefix:<++>(Int); none of these signatures match: (Mu:D $a is rw) (Mu:U $a is rw) (Int:D $a is rw) (int $a is rw) (Bool $a is rw) (Num:D $a is rw) (Num:U $a is rw) (num $a is rw) in block <uni…» | ||
13:18
bakedb left
|
|||
andreoss | m: my \i :=$= 1; say ++i; | 13:18 | |
camelia | rakudo-moar 319ec8: OUTPUT«2» | ||
psch | m: use nqp; my \i =$= 1; say nqp::iscont(i); my \j =$(1); say nqp::iscont(j) | 13:19 | |
camelia | rakudo-moar 319ec8: OUTPUT«10» | ||
andreoss | what's $? | ||
psch | andreoss: 'i = $ = 1' assigns an anonymous scalar and assigns 1 to that | ||
andreoss: 'i = $(1)' assigns an itemizes single-item list | 13:20 | ||
jnthn | An anonymous state variable. Which means that the =$= idiom is not threadsafe. :) | ||
(Or at least, it's risky depending what you're doing with it) | |||
13:20
bakedb joined
|
|||
jnthn | Together with it looking darn weird that's a good technical reason to consider avoiding it. ;) | 13:21 | |
13:22
ribasushi left
|
|||
andreoss | m: my \a =@= 1,2,3; a.push: 4; say a; | 13:22 | |
camelia | rakudo-moar 319ec8: OUTPUT«[1 2 3 4]» | ||
jnthn | m: sub foo($i) { my \a =@= 1,2,3; foo(0) if $i; a.push: 4; say a; }; foo(1) | 13:24 | |
camelia | rakudo-moar 319ec8: OUTPUT«[1 2 3 4][1 2 3 4 4]» | ||
13:24
shinobicl joined
13:25
ribasushi joined
|
|||
andreoss | when i should use this stuff? they do make sigiless variables more friendly for mutable use | 13:25 | |
psch | m: my \a = [1,2,3]; a.push: 4; say a | ||
camelia | rakudo-moar 319ec8: OUTPUT«[1 2 3 4]» | ||
andreoss | m: my \a = 1, 2, 3; a.push: 4; say a | 13:26 | |
camelia | rakudo-moar 319ec8: OUTPUT«Cannot call 'push' on an immutable 'List' in block <unit> at /tmp/q_pAan7Buw line 1» | ||
jnthn | andreoss: Yes, but it goes against the cultural trend to use them for immutable things... | ||
shinobicl | r: my @rr1 = Nil xx 5; say @rr1.perl; my @rr2 = Any xx 5; say @rr2.perl | 13:27 | |
camelia | rakudo-jvm 978754: OUTPUT«cannot connect to eval server: Connection refused» | ||
..rakudo-moar 319ec8: OUTPUT«[Any, Any, Any, Any, Any][Any, Any, Any, Any, Any]» | |||
shinobicl | say Any ~~ Nil; | ||
r: say Any ~~ Nil; | |||
camelia | rakudo-jvm 978754: OUTPUT«cannot connect to eval server: Connection refused» | ||
..rakudo-moar 319ec8: OUTPUT«False» | |||
13:27
musiKk_ joined
|
|||
jnthn | andreoss: It's unfriendly for a reason :) | 13:28 | |
shinobicl | Hi all, i need to discriminate for an empty value and undefined value, Why i can not have an array of Nil? | ||
jnthn | shinobicl: Because Nil's assignment behavior is "set this thing back to its default" | ||
shinobicl: Maybe use :exists? | |||
shinobicl | r: say Any ~~ Mu; say Nil ~~ Mu; | 13:29 | |
camelia | rakudo-jvm 978754: OUTPUT«cannot connect to eval server: Connection refused» | ||
..rakudo-moar 319ec8: OUTPUT«TrueTrue» | |||
jnthn | m: my @a is default(42); @a = Nil xx 5; say @a; | ||
camelia | rakudo-moar 319ec8: OUTPUT«[42 42 42 42 42]» | ||
jnthn | m: my @a; @a[1] = 5; say @a[0]:exists; | 13:30 | |
camelia | rakudo-moar 319ec8: OUTPUT«False» | ||
shinobicl | So, how can i be sure if something is undefined? | ||
I mean | 13:31 | ||
jnthn | The .defined method, or the defined function, or use with/without | ||
shinobicl | Ok lets say that i have an array of 10 elements, but only with 5 defined, what should i put in the other 5 to say that is not yet assigned? | 13:32 | |
psch | m: my @a[10] = ^5; say @a[5]:exists | 13:33 | |
camelia | rakudo-moar 319ec8: OUTPUT«False» | ||
psch | m: my @a[10] = ^5; say @a[5]:exists; say @a[0..4]:exists | ||
camelia | rakudo-moar 319ec8: OUTPUT«False(True True True True True)» | ||
13:33
kid511 joined,
wamba left
13:34
kid51 left
|
|||
jnthn | shinobicl: Just don't assign to them at all | 13:35 | |
Or if you already did then :delete them | 13:36 | ||
(I assume you need ordering and thus didn't go for the "just use a hash" approach) | 13:37 | ||
vendethiel | azawawi: sorry, had to run | 13:44 | |
13:45
kaare_ joined
13:59
brrt joined
|
|||
shinobicl | r: my @a[10] = ^5; say @a.perl | 14:00 | |
camelia | rakudo-jvm 978754: OUTPUT«cannot connect to eval server: Connection refused» | ||
..rakudo-moar 319ec8: OUTPUT«Array.new(:shape(10,), [0, 1, 2, 3, 4, Any, Any, Any, Any, Any])» | |||
shinobicl | r: say Int ~~ Any; | 14:01 | |
camelia | rakudo-moar 319ec8: OUTPUT«True» | ||
..rakudo-jvm 978754: OUTPUT«cannot connect to eval server: Connection refused» | |||
14:01
virtualsue joined
14:02
virtualsue left,
Actualeyes joined
|
|||
shinobicl | r: my @a[10] = ^5; say @a.perl; say @a[0] | 14:02 | |
camelia | rakudo-moar 319ec8: OUTPUT«Array.new(:shape(10,), [0, 1, 2, 3, 4, Any, Any, Any, Any, Any])0» | ||
..rakudo-jvm 978754: OUTPUT«cannot connect to eval server: Connection refused» | |||
shinobicl | r: my @a[10] = ^5; say @a.perl; say @a[0]:exists; say @a[9]:exists; | 14:03 | |
camelia | rakudo-moar 319ec8: OUTPUT«Array.new(:shape(10,), [0, 1, 2, 3, 4, Any, Any, Any, Any, Any])TrueFalse» | ||
..rakudo-jvm 978754: OUTPUT«cannot connect to eval server: Connection refused» | |||
shinobicl | thanks! :) i think i got it now | ||
14:03
virtualsue joined,
raiph left
|
|||
FROGGS_ | shinobicl: btw, you can use "m:" to query rakudo-moar only | 14:05 | |
shinobicl | how can i define a method callable like :exists? | 14:06 | |
i'm not familiar with this $var:something syntax | 14:07 | ||
geekosaur | that's not a method, it's a named/keyword parameter to something else. in @x[n]:exists it is a named parameter to the postcircumfix:<<[ ]>> method | 14:10 | |
14:11
RabidGravy joined
|
|||
shinobicl | Ahhhh nice! so when i define the postcincumfix op i just define a named argument called :exists and see if "$exists" it is defined or not | 14:12 | |
geekosaur | yep | ||
shinobicl | :D | ||
thanks! | 14:13 | ||
14:13
jameslenz left
|
|||
psch | m: sub postcircumfix:<' '>($it, $arg, :$double) { say $double ?? 2 * $it * $arg !! $it * $arg }; 2'3'; 2'3':double | 14:14 | |
camelia | rakudo-moar 319ec8: OUTPUT«5===SORRY!5=== Error while compiling /tmp/AUrHjKD5d0Unable to parse expression in postcircumfix:sym<' '>; couldn't find final $stopper at /tmp/AUrHjKD5d0:1------> 3 ?? 2 * $it * $arg !! $it * $arg }; 2'3'7⏏5; 2'3':double» | ||
RabidGravy | Rarr! | ||
psch | huh | ||
m: sub postcircumfix:<' '>($it, $arg, :$double) { say $double ?? 2 * $it * $arg !! $it * $arg }; 2'3' | |||
camelia | rakudo-moar 319ec8: OUTPUT«6» | ||
psch | m: sub postcircumfix:<' '>($it, $arg, :$double) { say $double ?? 2 * $it * $arg !! $it * $arg }; 2'3':double | ||
camelia | rakudo-moar 319ec8: OUTPUT«5===SORRY!5=== Error while compiling /tmp/lx3nwuMA77Unable to parse expression in postcircumfix:sym<' '>; couldn't find final $stopper at /tmp/lx3nwuMA77:1------> 3 $it * $arg !! $it * $arg }; 2'3':double7⏏5<EOL> expecting any of:…» | ||
14:15
jameslenz joined,
jameslenz left
14:20
chkk joined,
Ven left
14:21
SCHAAP137 left
14:32
musiKk_ left
14:35
shinobicl left
14:38
virtualsue left
14:40
virtualsue joined
14:41
virtualsue left,
virtualsue joined
14:43
tmch joined
14:46
virtualsue left
14:56
chkk left
14:57
virtualsue joined,
skids joined
15:00
khw joined
|
|||
RabidGravy | there, glitch free and everything - rabidgravy.com:8000/stream | 15:04 | |
15:07
Begi joined
15:08
go|dfish left
|
|||
masak | RabidGravy: what's that? | 15:11 | |
RabidGravy | a perl program sequencing nekobee live and another perl program encoding the output and streaming it | 15:13 | |
but it's lost it now | |||
15:13
BenGoldberg left
|
|||
masak | Perl 5? | 15:15 | |
RabidGravy | er perl 6 | ||
masak | woo | ||
RabidGravy | the problem happens when the GC kicks in and it doesn't have enough time headroom to catch back up again | 15:16 | |
masak | today's autopun spotting: xkcd.com/1657/ | ||
lucs | m: use Test; is(15 + 27, 42) # This is fine. | 15:17 | |
camelia | rakudo-moar 319ec8: OUTPUT«ok 1 - » | ||
lucs | m: require Test; is(15 + 27, 42) # But how does 「require」 work? | ||
camelia | rakudo-moar 319ec8: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Hk_O5lXaCZUndeclared routine: is used at line 1» | ||
masak | RabidGravy: I wonder what kind to GC setting might help in such cases where non-stuttering matters more than being conservative with memory. | ||
ugexe | require doesn't import anything | ||
masak | problem is, you have to GC at some point, I guess. | ||
lucs | m: require Test; Test::is(15 + 27, 42) # ? | 15:18 | |
camelia | rakudo-moar 319ec8: OUTPUT«Could not find symbol '&is' in block <unit> at /tmp/QgcI3c_ZTr line 1Actually thrown at: in block <unit> at /tmp/QgcI3c_ZTr line 1» | ||
ugexe | put your entire program in DESTROY and hope its not collected | ||
`is` is not `our` scoped within Test | |||
15:19
brrt left
15:20
brrt joined,
brrt left
|
|||
lucs | ugexe: Not sure what to do with that info :/ | 15:20 | |
15:20
brrt joined
|
|||
ugexe | im not sure what you are trying to do | 15:21 | |
15:21
brrt left
|
|||
lucs | I'm trying to 「require Test」 and use its functions. | 15:21 | |
15:21
brrt joined
|
|||
RabidGravy | lucs, you have to call import | 15:21 | |
15:21
brrt left
15:22
brrt joined
|
|||
RabidGravy | otherwise the functions "don't exist" in your scope | 15:22 | |
ugexe | m: require Test <&is>; is(1,1) | ||
camelia | rakudo-moar 319ec8: OUTPUT«ok 1 - » | ||
15:22
brrt left
|
|||
lucs | Aha, thanks. | 15:22 | |
15:22
brrt joined
|
|||
ugexe | the import statement is implied by the <&is> | 15:22 | |
15:22
brrt left
15:23
brrt joined,
brrt left
|
|||
lucs | How would I explicitly invoke the 'import'? | 15:23 | |
RabidGravy | import Test | 15:25 | |
lucs | Oh, okay. | ||
ugexe | design.perl6.org/S11.html#Exportation # most of this is valid | 15:26 | |
lucs | Thanks | ||
15:27
xinming left
15:28
michaelvipub left
|
|||
ugexe | if `require Test <&is>;` doesn't work on your local perl6 you probably need to upgrade, as I think that type of symbol importing was added in the last month or two | 15:28 | |
15:29
rindolf joined
|
|||
lucs | ugexe: Yeah, works fine (I have a rather recent build). | 15:29 | |
rindolf | Hi all. Who here is Wga Van Dick? | ||
s/Dick/Dijk/ - sorry. | 15:30 | ||
lucs: hi , sup? | |||
ugexe | thats wendy isnt it? | ||
lucs | rindolf: Same old same old, but with Perl 6 :) | ||
RabidGravy | masak, I could foresee some sort of "I need 0.001 secs" directive for a block and the GC won't take time below that | 15:31 | |
lucs | rindolf: Yes, Wendy (according to google). | ||
rindolf | lucs: ah. | ||
RabidGravy | and not here right now | ||
rindolf | lucs: what is her nickname? | ||
RabidGravy: ah. | |||
ugexe | is IO::Spec extendable such that it could be made to accept file uri? (file://<...>)? | 15:35 | |
15:37
nadim joined
|
|||
rudi_s | Is there a way to get the native file descriptor of Async::Proc's stdin? | 15:39 | |
skids | There wasn't as of a week ago IIRC. | 15:40 | |
jnthn | rudi_s: No; we don't actually expose the handles at all | ||
mst | jnthn: I can't get the fdno out of a filehandle? | 15:41 | |
rudi_s | jnthn: Ok. - So I guess there's no way to use a native C function which writes to a file descriptor and use that with Async::Proc? I tried to use it with plain run but I get deadlocks when the programs writes to stdout and stderr and reads from stdin. | 15:42 | |
Which is kind-of obvious when you think about. I then try to use Supply on $proc.out and $proc.err, but that hangs when I run $proc.out.Supply.tap(...). | 15:43 | ||
jnthn | mst: Out of a file handle yes, but Proc::Async doesn't expose the handles at all. In no small part 'cus it's hard to imagine anything going well when libuv is "owning" them | 15:44 | |
mst | aha, ok, this is probably fair enough | ||
jnthn | rudi_s: Are you trying to work around something we're missing? | 15:45 | |
15:45
gnommer joined
|
|||
mst | I suspect the use cases I'm thinking of will involve me nativecalling fork+exec myself anyway | 15:46 | |
rudi_s | jnthn: Well, maybe. | ||
15:46
Actualeyes left
|
|||
rudi_s | I want to run a program, write to its stdin and get its stdout/stderr. | 15:46 | |
In addition I need the native file descriptor of stdin because I want to call a C function which writes to an fd. | 15:47 | ||
But as a I said, I can't get it to work with just run because of deadlocks and Proc::Async has no way to get the native file descriptor. | 15:48 | ||
pmurias | masak: there are different GC for situations where non-stuttering is important | 15:49 | |
RabidGravy: is your streaming program up for reading somewhere? | 15:50 | ||
RabidGravy | yeah, it's an example in Audio::PortAudio | 15:51 | |
github.com/jonathanstowe/Audio-Por...eam-source | |||
15:51
skids left
15:54
andreoss left
|
|||
jnthn | rudi_s: Yeah, Proc::Async would handle that great except the native descriptor bit... | 15:54 | |
rudi_s | jnthn: Yeah. Any idea how I could get it to work with run without the deadlock? | ||
jnthn | rudi_s: Well, do you know how much data you're going to get back? | 15:55 | |
rudi_s | jnthn: No. | ||
16:00
Actualeyes joined
16:02
wamba joined
|
|||
jnthn | rudi_s: OK. Then not sure. | 16:03 | |
jnthn gotta go take care of home stuffs... | |||
bbl | |||
rudi_s | jnthn: Ok, thanks anyway. For now I have a workound and write to a temp file and then read that in and use Proc::Async. But it's not nice. | 16:04 | |
16:11
zakharyas joined
16:14
gnommer left
16:17
BenGoldberg joined
16:20
dwarring left
16:26
beatdown joined
16:30
virtualsue left,
tmch left
16:40
tmch joined
16:43
azawawi joined
|
|||
azawawi | hi | 16:43 | |
im getting some weird behavior on Proc::Async. Is it working on Mac OSX? | 16:44 | ||
travis-ci.org/azawawi/perl6-seleni...9148#L3596 | |||
16:49
woodruffw left
|
|||
ugexe | azawawi: all the problems i had with it on osx boiled down to: rt.perl.org/Public/Bug/Display.html?id=125758 | 16:49 | |
azawawi reads | 16:50 | ||
ugexe | i.e. osx has some problem with `await Promise.allof(@promised)`, but `for @promised { await $_; }` works, with the difference being the first one doesnt seem to sink all the promises so they never get out of Planned state | 16:51 | |
and that would cascade into all sorts of other errors | 16:53 | ||
azawawi | do you have a MacOS X development environment? | ||
RabidGravy | perl6 channeling Junior Mance on speed rabidgravy.com:8000/stream | ||
ugexe | not now. i use macincloud.com when i need to test on osx | ||
but $ | |||
16:54
BenGoldberg left
16:55
woodruffw joined
|
|||
ugexe | a hack i found to also work was to call `?$p.result;` before using $p | 16:55 | |
so in your test, maybe `my $p = $process.start; ?$p.result; say("phantomjs...` | 16:56 | ||
rudi_s | jnthn: Btw. is it expected that tap on $proc.out.Supply will block or is this supposed to work? | 17:00 | |
azawawi | ugexe: we should start doing rakudostar binary builds... because it is silly... we're using precious travis ci time (and developer time) waiting for test result | ||
17:01
jameslenz joined
|
|||
azawawi | for rakudobrew 2016.xy, couldnt we update the travis ci container image to take ready-made binaries instead of slow source make/test | 17:02 | |
ugexe | tony-o has shown you can archive the rakudo directory in a travis build and reuse it | ||
17:02
virtualsue joined
|
|||
azawawi | ugexe: where is that? | 17:03 | |
ugexe | github.com/tony-o/perl6-travis-bin | ||
azawawi | ugexe: thx | ||
RabidGravy: awesome | |||
RabidGravy | that's what nearly a gig of piano sample sounds like ;-) | 17:06 | |
same program as before, using linux sampler instead of nekobee and streaming via darkice rather audio::portaudio | 17:07 | ||
17:08
zakharyas left
|
|||
ugexe | azawawi: there is also caching on travis, but i could never get it to work before my attention span moved on docs.travis-ci.com/user/caching/ | 17:08 | |
jnthn | rudi_s: I suspect so, given handles currently can't be used across multiple threads | ||
RabidGravy | I say the same program, it's actually slightly weighted toward the third and fifth of the mixolydian | 17:09 | |
rudi_s | jnthn: Multiple threads? I just have one thread which calls run. | 17:10 | |
jnthn | rudi_s: I was explaining why $handle.Supply.tap blocks | 17:13 | |
rudi_s | jnthn: I know. But why is this related to multiple threads? | 17:14 | |
TimToady prefers inverted hungarian, or whatever that's called that's used in Samson and Delilah, with a major third but a minor second | |||
so two 1.5 step intervals, but between 2nd/3rd and 6th/7th | 17:15 | ||
Phrygian or some such | |||
RabidGravy | I was just about to say phrygian, yep | 17:16 | |
TimToady likes raised 9th chords too :) | |||
jnthn | rudi_s: Well, *something* has to be reading from the handle and showing the read stuff into the Supply | 17:17 | |
*shoving | |||
rudi_s | jnthn: Oh, so this is handled by threads? I expected something like epoll or similar. | 17:18 | |
azawawi | btw, Samson in Arabic is pronounced as Shamshon (شمشون) | ||
RabidGravy | sounds like Sean Connery saying it ;-) | 17:19 | |
jnthn | rudi_s: Even then some thread needs to play event loop | ||
rudi_s | jnthn: The main "thread"? | ||
jnthn | rudi_s: Proc::Async, IO::Socket::Async, IO::Notification etc. all proxy operations to a single thread that serves as the event loop | ||
rudi_s | And that's not the normal main thread? | ||
jnthn | rudi_s: It then dispatches results into the queue of ThreadPoolScheduler | 17:20 | |
rudi_s: For non-async things, though, we don't handle them through an event loop-y thing at present | |||
File handles are just normal buffered I/O | |||
azawawi | RabidGravy: it is like Shamshoon | ||
jnthn | (All this is subject to change.) | ||
rudi_s | jnthn: Ah, ok. Good to know. Thanks. | 17:21 | |
TimToady | well, back to cleaning out the garage (and all the other infrastructural things I've been putting off for the last 15 years for some reason...) | ||
jnthn | ;-) | ||
TimToady: 15 years would give a garrage time to accumulate a good amount of stuff, I'd guess :) | |||
17:22
Ven joined
|
|||
RabidGravy | yeah we got a skip last year and dumped ten years worth of junk | 17:22 | |
TimToady | oh, it was already accumulating for a number years before that :) | ||
Ven | azawawi: back | ||
RabidGravy | I spent three days shredding stuff | 17:23 | |
jnthn moved apartment after just *5* years in it last year, and was shocked how much more stuff he had than when he'd moved in there... :) | |||
azawawi | Ven: weclome back. So far I traced it to travis-ci.org/azawawi/perl6-seleni...9148#L3596 | ||
TimToady | we'll probably wait till we get our Free Shredding Day in Mountain View | ||
Ven | I've seen you linked me a gist, but I've been unable to find it atm | ||
RabidGravy | :) | ||
Ven | azawawi: I don't even get that – I get "Starting phantomjs process" | 17:24 | |
jnthn | I suspect I'll be moving again within the next 5 years...though for once I intend it *not* to be an international move. :-) | ||
azawawi | Ven: i will simplify it into a test scrit... give me a min plz | 17:25 | |
Ven | no problem :). sorry for the delay. | ||
(I reconnected a bit earlier but you were away) | |||
azawawi | Ven: gist.github.com/azawawi/c4c2f5b5b31906ea28ed | 17:28 | |
Ven: try this code and paste output please | |||
RabidGravy | If wanted to make something that was like an "enum Foo ..." but the values were lists is it just sub-class EnumMap? | 17:29 | |
azawawi | Ven: sample output here (Linux) pasteboard.co/2o2oIRph.png | 17:31 | |
17:31
nadim left,
_nadim joined
|
|||
azawawi | Ven: no need to worry about the delay. I was outside enjoying the beautiful spring sunny weather :) | 17:33 | |
RabidGravy | Boo, it's freezing and yuck in London still | 17:34 | |
17:34
chee is now known as Dolores
|
|||
Ven | azawawi: phantomjs path: /Users/ven/.opam/system/bin/phantomjs phantomjs port: 5555 phantomjs returned Proc::Async promise: Promise.new(scheduler => ThreadPoolScheduler.new(initial_threads => 0, max_threads => 16, uncaught_handler => Callable), status => PromiseStatus::Planned) | 17:34 | |
azawawi | RabidGravy: hehe :) | ||
17:34
Dolores is now known as chee
|
|||
RabidGravy | we seem to be going through a period of one day of pleasant spring-like weather and three days of winter | 17:35 | |
azawawi | Ven: Is there any DEBUG output like "Config - init - Configuration..."... see the above picture link | 17:36 | |
Ven | azawawi: "Config - config.init - {"ip":"127.0.0.1","port":"5555","hub":null,"proxy":"org.openqa.grid.selenium.proxy.DefaultRemoteProxy","version":"","logFile":null,"logLevel":"DEBUG","logColor":false}" | ||
azawawi | RabidGravy: it was raining but today is sunny and green :) | ||
Ven: strange | 17:37 | ||
Ven: 'git pull' the selenium git repo please and test it | 17:39 | ||
Ven | trying t/02 | ||
azawawi: "phantomjs returned Proc::Async promise: Promise.new(scheduler => ThreadPoolScheduler.new(initial_threads => 0, max_threads => 16, uncaught_handler => Callable), status => PromiseStatus::Planned)" but it's using the wrong port | 17:40 | ||
17:40
Begi left
|
|||
azawawi | Ven: no it is using a random free empty port | 17:40 | |
Ven | oke :) | 17:41 | |
azawawi | Ven: github.com/azawawi/perl6-selenium-...e.pm6#L818 | ||
Ven | hahaha | 17:42 | |
azawawi | Ven: can you please pastebin the following command: prove -v -e 'perl6 -Ilib' t/02-phantomjs.t ? | 17:48 | |
Ven | not sure why you go through `prove` in this case, but... | 17:49 | |
azawawi: gist.github.com/vendethiel/6df07e0ed75749643264 | 17:50 | ||
17:56
_nadim left
|
|||
azawawi | Ven: sleep is working correctly on Mac OS X? | 18:01 | |
18:01
virtualsue left
|
|||
Ven | yes :) | 18:02 | |
azawawi | Ven: does the test take time to finish or right away? | ||
Ven | azawawi: it takes 32.8s to run (real) | 18:03 | |
azawawi | Ven: but no output from phantomjs process... | ||
Ven | indeed | 18:04 | |
azawawi | Ven: try to curl it from another shell while the test is running gist.github.com/azawawi/e30986625e31cae4f2e9 | 18:06 | |
Ven | that worked | 18:08 | |
azawawi | aha | ||
same random port? | |||
and killall phantomjs # just in case | 18:09 | ||
Ven | no, I mean – the curl worked. but that didn't make the test work. | ||
azawawi | make sure no phantomjs process is still there by killing them all: killall phantomjs | 18:10 | |
then try that curl command | |||
18:11
domidumont joined
18:12
go|dfish joined
|
|||
dalek | osystem: 3c5d499 | (Fernando Correa de Oliveira)++ | META.list: Update META.list |
18:12 | |
osystem: 33ae8ba | azawawi++ | META.list: Merge pull request #174 from FCO/patch-1 Update META.list |
|||
TreyHarris | is there shorthand for one grammar referring to another grammar's TOP in one of its rules? | 18:13 | |
azawawi | Ven: Try add :port(5555) parameter to github.com/azawawi/perl6-selenium-...omjs.t#L45 | 18:14 | |
Ven | now there's only one test failing: "not ok 86 - Only One session should be there" line 57 | 18:15 | |
azawawi | Ven: maybe the free port range is somehow bad for osx | ||
Ven: good | 18:16 | ||
Ven: let it run them without curl-ing | |||
Ven | huh? | ||
azawawi | Ven: s/them/then | ||
Ven: that curl http post is actually requesting a new session and the test checks for only one session which it has created earlier | 18:17 | ||
Ven | oh. I didn't curl it. It just worked | 18:18 | |
18:18
colomon left
|
|||
azawawi | good then empty-port sucks on macosx :) | 18:20 | |
i wonder why | |||
My guess is this assumption is bad on osx github.com/azawawi/perl6-selenium-...e.pm6#L829 | 18:22 | ||
Ven: thanks a lot :) | 18:25 | ||
Ven++ | |||
Ven | good! | ||
18:27
itaipu joined
|
|||
azawawi | Ven: also we're testing for an empty port against 127.0.0.1:XYZ ... maybe phantomjs is binding itself to something else | 18:27 | |
azawawi waits for travis ci results | 18:28 | ||
dbohdan | How production-ready is Perl 6 on the JVM for web development? I am looking for a fun, expressive JVM language in which to write a small (public) web application, and Perl 6 seems like fun. :-) | 18:32 | |
timotimo | TreyHarris: no, you'll have to spell out the "TOP" part again i'm afraid | ||
RabidGravy | just for TimToady rabidgravy,com:8000/stream now playing in Phrygian mode | 18:33 | |
timotimo | i have no idea what that means :| | ||
RabidGravy | the phrygian part? | 18:34 | |
it's one of the greek musical modes | 18:35 | ||
TreyHarris | timotimo: okay. is it an antipattern to be doing things like parsing a doc that can include subdocs in HERE-like format by referring to the subdoc's grammar's TOP? or just something which is too uncommon for syntactic sugar to be necessary? | ||
timotimo | well, we're using multiple grammars in rakudo, too | 18:36 | |
RabidGravy | flattened second and fourth compared to a major scale | ||
timotimo | every quote is already a sub-language | ||
so are regexes | |||
lucs | RabidGravy: How was that composed? (re. Phrygian stream) | 18:37 | |
RabidGravy | it's a perl 6 program sequencing linuxsampler live | 18:38 | |
one of the examples from the forthcoming Audio::PortMIDI :) | |||
TreyHarris | timotimo: right, that's why I asked because I'd looked in nqp for examples of referring to another TOP and didn't find any | 18:39 | |
timotimo: but i was just doing 'ack --nqp TOP', so could've missed something | 18:40 | ||
18:40
colomon joined
|
|||
timotimo | hm, look for something like nibble or something? | 18:40 | |
i haven't tried to understand the mechanism yet, because i never needed to modify anything about it | 18:42 | ||
TreyHarris | timotimo: yes, i see nibble. that seems more self-documenting anyway. thanks! | 18:43 | |
kid511 | What is the best way to report a typo in doc.perl6.org/routine/spurt ? | 18:47 | |
RT? | 18:48 | ||
timotimo | nah, it's better to go to the github repo; there's a link at the far bottom | ||
azawawi | kid511: github.com/perl6/doc/issues | 18:50 | |
18:51
jack_rabbit joined,
AlexDaniel left
18:53
woodruffw left
18:54
sufrostico joined
|
|||
kid511 | azawawi: Thanks. Created github.com/perl6/doc/issues/427 | 18:55 | |
18:58
woodruffw joined
19:02
azawawi left
19:03
wamba left
19:04
tmch left
19:05
wamba joined
19:11
BenGoldberg joined
|
|||
kid511 | In the REPL, the following statement fails to compile: | 19:13 | |
19:14
sufrostico left,
woodruffw left
|
|||
kid511 | given prompt "Enter a number: " { when * < 0 { say "Negative"; } when * > 0 { say "Positive"; } default { say "Zero"; } } | 19:14 | |
It will only compile when I put ';' after the '}' if the first 2 'when' blocks. | |||
given prompt "Enter a number: " { when * < 0 { say "Negative"; }; when * > 0 { say "Positive"; }; default { say "Zero"; } } | |||
However, those semicolons are *not* necessary if I enter this same code into a file and run it. Anyone know why? | 19:15 | ||
19:19
woodruffw joined
19:21
labster joined
|
|||
timotimo | because you've put newlines after the } probably | 19:21 | |
a } at the end of a line gives you a ; for free | |||
19:24
lucasb joined
|
|||
kid511 | thx | 19:24 | |
19:26
mohae left
|
|||
lucasb | about the Bool/defined methods from yesterday, I think lizmat's commit only fixed half of the problem | 19:27 | |
19:27
mohae joined
|
|||
lucasb | only Bool(Mu:D:) was changed, but I think the same thing applies to Bool(Mu:U:) | 19:27 | |
timotimo | please elaborate? | 19:28 | |
lucasb | m: say ?class { method defined { True } } | ||
camelia | rakudo-moar 319ec8: OUTPUT«False» | ||
lucasb | star: say ?class { method defined { True } } | ||
camelia | star-m 2016.01: OUTPUT«True» | ||
timotimo | i don't remember 100%, but didn't we say you have to implement method Bool if you want ? to behave differently? | ||
19:29
sufrostico joined
|
|||
RabidGravy | yeah I thought that was what was decided | 19:29 | |
lucasb | if you append ".new" to my examples, you will see I don't need to define Bool | 19:30 | |
so, the behavior is different is you ask a type object or a instance | |||
I can accept it, if someone says that's how things will be from now on :) | 19:31 | ||
*the behavior is different if you ask | |||
timotimo | hmm | 19:32 | |
i'm not 100% convinced any more this is all right | 19:33 | ||
19:35
sufrostico left,
lichtkind__ joined,
domidumont left
|
|||
lucasb | yeah, it's a little confusing to be able to change the definedness of some object... | 19:35 | |
19:36
domidumont joined
19:39
lichtkind_ left
19:40
jantore_ left
|
|||
timotimo | well, it's useful for things that act like proxies to other things | 19:41 | |
and are supposed to be transparent | |||
what you can't change is the DEFINITEness | |||
lucasb | right | ||
19:42
jantore joined
|
|||
timotimo | in general, it's bound to cause confusion one way or the other | 19:42 | |
19:46
kaare_ left
19:47
Begi joined
19:57
musiKk_ joined,
sufrostico joined
20:03
t999 joined
20:05
sufrostico left
20:06
t999 left,
sufrostico joined
20:11
BenGoldberg left,
BenGoldberg joined
20:12
darutoko left
20:13
BenGoldberg left
20:14
BenGoldberg joined
|
|||
masak accidentally writes !~ and gets told off by perl6 | 20:17 | ||
20:20
DarthGandalf left
|
|||
rudi_s | Is it possible to automatically initialize a class member on .new call? I have something like has SetHash $.foo and I'd like to get a SetHash after I call new. Is this possible? | 20:21 | |
timotimo | yeah, just write "has SetHash $.foo = SetHash.new" | ||
masak | m: class C { has $.foo = 42 }; say C.new.foo | 20:23 | |
camelia | rakudo-moar 319ec8: OUTPUT«42» | ||
masak | rudi_s: ^^ | ||
20:23
Begi left
|
|||
masak | m: class C { has $.foo = (1..6).roll }; say C.new.foo for ^3 | 20:24 | |
camelia | rakudo-moar 319ec8: OUTPUT«235» | ||
20:24
Begi joined
20:26
DarthGandalf joined
|
|||
rudi_s | Oh, nice. Didn't know that this works. Awesome. Thank you timotimo, masak. | 20:27 | |
masak | it's nice when you know about it, yes | ||
one way to explain it is to say that the `= 42` and `= (1..6).roll` bits are *thunks* and they run in a separate *phase* (namely, at object construction time) | |||
20:35
zakharyas joined
20:37
Ven left
|
|||
RabidGravy | yeah and a nice implication of that is you can use other attributes in the initialiser | 20:38 | |
m: class F { has Int $.one is required; has Int $.two = do { $!one * 2 }; }; say F.new(one => 3).perl | |||
camelia | rakudo-moar 319ec8: OUTPUT«F.new(one => 3, two => 6)» | ||
20:38
Ven joined
|
|||
moritz | m: class F { has Int $.one is required; has Int $.two = $!one * 2 }; say F.new(one => 3).perl | 20:39 | |
camelia | rakudo-moar 319ec8: OUTPUT«F.new(one => 3, two => 6)» | ||
moritz | no need for that do block | ||
RabidGravy | yeah, superstitious on my part | 20:40 | |
BenGoldberg | m: class Foo { my SetHash $.foo .= new; }; Foo.new.say; | ||
camelia | rakudo-moar 319ec8: OUTPUT«Foo.new» | ||
BenGoldberg | m: class Foo { my SetHash $.foo .= new; }; Foo.new.foo.say; | 20:41 | |
camelia | rakudo-moar 319ec8: OUTPUT«SetHash.new()» | ||
lucasb | m: class C { has $.a = $!b; has $.b = 42 }; say C.new | 20:42 | |
camelia | rakudo-moar 319ec8: OUTPUT«C.new(a => Any, b => Any)» | ||
lucasb | ^^ interesting, no? :D | 20:43 | |
RabidGravy | the order of the attributes is important there | ||
20:43
tmch joined
|
|||
lucasb | I could expect C.new(a => Any, b => 42) | 20:43 | |
masak | the `do` block is unnecessary exactly *because* it's a thunk | 20:44 | |
RabidGravy | lucasb, I missed that, I can however understand why it is happening | 20:46 | |
20:53
TEttinger joined
20:57
_nadim joined
|
|||
Begi | Can we imagine, in the future, a translation of doc ? | 21:00 | |
*of the Perl 6 doc | |||
TreyHarris | "has Int(Cool) $.count is rw;" is "insufficiently type-like". Is there a way to make it dwim? | 21:02 | |
masak | Begi: a translation in general, or to some particular language? | ||
RabidGravy | I can imagine it, but it won't happen unless someone else does it | ||
masak | Begi: either way, I'm pretty sure we can imagine it ;) | ||
Begi | It'd be super ! | ||
I'm French, so I can help with French | |||
step by step | 21:03 | ||
spider-mario | so can I | 21:04 | |
masak | merveilleux! | 21:06 | |
TreyHarris | p6: class CoolInt { has Int(Cool) $.x is rw; }; say CoolInt.new(:x("3")).perl; | ||
camelia | rakudo-moar 319ec8: OUTPUT«5===SORRY!5=== Error while compiling /tmp/tmpfileCoercion Int(Cool) is insufficiently type-like to qualify a variableat /tmp/tmpfile:1------> 3class CoolInt { has Int(Cool) $.x is rw7⏏5; }; say CoolInt.new(:x("3")).perl; expecting …» | ||
Begi | masak : you're German, right ? | 21:07 | |
spider-mario | I programmed with ints before they were cool | ||
masak | Begi: no, I'm from .se | ||
Begi: you might be thinking of moritz; easy to confuse | |||
Begi | ah yes, wouupps :) | 21:08 | |
masak | easy to confuse one for the other, I mean -- it's not moritz who is easily confused... :P | ||
masak is easy to confuse, though | |||
Begi | so, do you think I should start the translation of some parts of the documentation ? (in French) | 21:09 | |
21:10
lucasb left
|
|||
RabidGravy | yes, just doing things is better than waiting for everyone to say yes :) | 21:10 | |
Begi | sure :) | 21:14 | |
21:16
domidumont left
|
|||
awwaiid | m: for <100 10_000 100_000> -> $batch { my $start = now; ((10..99) X (10..99)).map({$_[0] * $_[1]}).grep(-> $n { $n.Str eq $n.Str.flip }).sort[* - 1].say ; my $end = now; say "Batch $batch took { $end - $start } seconds" } | 21:16 | |
camelia | rakudo-moar 319ec8: OUTPUT«9009Batch 100 took 0.2074571 secondsThis Seq has already been iterated, and its values consumed(you might solve this by adding .cache on usages of the Seq, orby assigning the Seq into an array) in block <unit> at /tmp/w2TzV4qVr2 line 1» | ||
awwaiid | Which Seq is it talking about? the ((10..99) X (10..99)) ? | ||
If so, why did it get re-used between iterations of the for-loop? | 21:17 | ||
timotimo | awwaiid: perhaps the sort made it problematic? | 21:27 | |
or the [* - 1] | |||
21:27
zakharyas left
21:36
musiKk_ left
21:46
jantore left,
jantore joined
21:47
woodruffw left
21:51
BenGoldberg left
21:52
BenGoldberg joined
21:53
woodruffw joined,
lostinfog joined
21:55
Begi left
22:02
woodruffw left
22:07
woodruffw joined,
AlexDaniel joined
22:09
perlawhirl left
22:10
bjz left
22:13
lostinfog left
|
|||
TreyHarris | Hm... I'm trying to parse a file format where the final line is special, and it can be anything, including something that would ordinarily be valid if the file were to continue. Is that a situation I can only deal with out-of-band (either by taking the last line off the string before parsing, or by removing it from the parse tree after parsing), or is there some way in a grammar to say that? | 22:21 | |
22:22
nadim joined
|
|||
TreyHarris | oh, duh, I just make TOP a regex instead of something racheting. I imagine that will kill my performance though. | 22:23 | |
22:25
_nadim left
22:26
itaipu left
22:27
itaipu joined
22:30
n1cky left
22:35
itaipu left
|
|||
mst | 22:38 | ||
22:39
mst left,
mst joined
22:43
Ben_Goldberg joined
22:45
rindolf left,
BenGoldberg left
22:46
_nadim joined
22:48
nadim left,
BenGoldberg_ joined
22:50
Ben_Goldberg left
22:51
nadim joined
22:52
sufrostico left
22:54
BenGoldberg_ left,
_nadim left
22:57
nadim left
22:59
colomon left
23:04
colomon joined
23:07
wamba left
23:14
perlawhirl joined
23:27
Ven left
23:31
pmurias left
23:35
espadrine_ joined
23:41
RabidGravy left
23:44
firstdayonthejob left
23:46
firstdayonthejob joined
23:47
espadrine_ left
23:55
firstdayonthejob left
23:58
bjz joined
|