»ö« 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. |
|||
00:15
ajr_ left
00:20
BenGoldberg joined
00:28
chenryn left,
census left
|
|||
[Coke] | huh. looks like I might have had some stray rakudo.jvm build processes laying around on the daily test box. might explain why today's build ran OOM. | 00:30 | |
00:34
plobsing joined
|
|||
[Coke] | looks like. hopefully next run, all 3 will work. | 00:44 | |
colomon | [Coke]++ | 00:52 | |
00:56
dayangkun_ joined
01:00
rurban joined,
dayangkun left
01:04
thou left
01:09
Su-Shee_ joined
01:10
risou is now known as risou_awy
01:12
risou_awy is now known as risou
01:13
Su-Shee left
01:42
klapperl joined
01:44
ilbot3 left,
raiph joined
01:45
klapperl_ left
01:46
ilbot3 joined
|
|||
colomon | m: say "132".chars | 01:51 | |
camelia | rakudo-moar 1a28ed: OUTPUT«3» | ||
colomon | m: say 132.chars | ||
camelia | rakudo-moar 1a28ed: OUTPUT«3» | ||
02:01
thou joined,
jnap left
02:05
thou left
02:09
rurban left
|
|||
colomon | Perl6::Tracer? | 02:18 | |
Hmmm, interestingly low tech solution there. | 02:19 | ||
02:20
donaldh left
02:24
rurban joined,
donaldh joined
02:30
grondilu joined
|
|||
grondilu | r: END BEGIN say "A"; say "B"; BEGIN END say "C"; | 02:30 | |
camelia | rakudo-{parrot,jvm,moar} 1a28ed: OUTPUT«ABC» | ||
02:32
jnap joined
02:37
jnap left
02:39
fhelmberger joined
02:42
bjz joined
02:43
fhelmberger left
02:44
dayangkun_ left
02:51
hoverboard joined
03:00
dwarring left
03:10
thou joined
03:16
anaeem1 left
03:25
Alula left,
lvfjf left
03:33
jnap joined
03:36
Alula joined
03:37
jnap left
03:38
lvfjf joined
03:41
rurban left
03:42
kurahaupo left
03:47
cibs left
03:50
kurahaupo joined
03:53
rurban joined
03:58
lvfjf left
04:01
BenGoldberg left
04:10
SamuraiJack joined
04:21
anaeem1 joined
04:25
SamuraiJack_ joined,
SamuraiJack left
04:26
cooper left
04:32
cooper joined
04:34
jnap joined
04:38
jnap left
04:40
dwoldrich joined
04:42
hoelzro left
04:46
rurban left,
molaf joined
04:50
raiph left,
hoelzro joined
04:55
kaleem joined
05:01
denis_boyun joined
|
|||
nwc10 | fwierzbicki.blogspot.co.at/2014/05/...eased.html | 05:22 | |
although [hard to explain this in polite words] system won't actually show you any content without JavaScript enabled | 05:23 | ||
05:23
kaleem left
|
|||
nwc10 | the basic content plain text - why so many levels of stupid? | 05:23 | |
oh yes, JS needed from two seemingly unrelated domains | 05:25 | ||
xiaomiao | ah, blarghspot | 05:26 | |
nwc10 | "…you will see that we are about to have a report from the hairdressers fire development subcommittee today. " | ||
etc | |||
xiaomiao | they still have a CSS fuckup that covers the first ~20 lines of text | ||
05:26
kaare_ joined
|
|||
xiaomiao | nwc10: I guess the URL contains all the interesting stuff anyway | 05:27 | |
nwc10 | xiaomiao: yes. that's an excellent summary | ||
also, it doesn't seen to be mentioned on jython.org yet | |||
xiaomiao | the best part about all that JS is that it slows down page load times to at best ~15sec for me, if I were to allow everything | 05:28 | |
a static html dump would be a lot more useful | 05:29 | ||
05:31
FROGGS joined
05:32
[Sno] left
05:33
[Sno] joined,
[Sno] left
05:34
FROGGS left,
jnap joined
05:39
jnap left
|
|||
grondilu | std: say q{[foo] bar} ~~ / '[' ~ ']' .* /; | 05:43 | |
camelia | std ec3d853: OUTPUT«ok 00:01 125m» | ||
grondilu | r: say q{[foo] bar} ~~ / '[' ~ ']' .* /; | ||
camelia | rakudo-jvm 1a28ed: OUTPUT«Unable to parse expression in ; couldn't find final ']'  in any FAILGOAL at gen/jvm/stage2/QRegex.nqp:1146 in method ACCEPTS at gen/jvm/CORE.setting:13026 in block at /tmp/tmpfile:1» | ||
..rakudo-moar 1a28ed: OUTPUT«Unable to parse expression in ; couldn't find final ']'  in any FAILGOAL at gen/moar/stage2/QRegex.nqp:1146 in method ACCEPTS at src/gen/m-CORE.setting:13083 in block at /tmp/tmpfile:1» | |||
..rakudo-parrot 1a28ed: OUTPUT«Unable to parse expression in ; couldn't find final ']'  in any FAILGOAL at gen/parrot/stage2/QRegex.nqp:1143 in regex at /tmp/tmpfile:1 in method ACCEPTS at gen/parrot/CORE.setting:13049 in method ACCEPTS at gen/parrot/CORE.setting:794…» | |||
grondilu | n: say q{[foo] bar} ~~ / '[' ~ ']' .* /; | 05:44 | |
camelia | niecza v24-109-g48a8de3: OUTPUT«Unhandled exception: Unable to parse anonymous regexCouldn't find final ']'; gave up at /home/p6eval/niecza/lib/CORE.setting line 1536 (die @ 5)  at /home/p6eval/niecza/lib/CORE.setting line 2962 (Cursor.FAILGOAL @ 6)  at /tmp/pRPpFHh7x…» | ||
grondilu | :/ | ||
TimToady | the final ']' is a hard requirement, not something to backtrack from | ||
it's hard to produce the correct error message otherwise | 05:46 | ||
grondilu doesn't understand | |||
05:46
rurban joined
|
|||
TimToady | you can't commit to an error message without a commit point | 05:47 | |
so this is optimized for writing grammars where the inner expression naturally excludes the terminator | 05:48 | ||
and you can always write '[' .* ']' to mean the other thing | |||
but when a .* is backtracking, it doesn't know what caused it to backtrack | 05:49 | ||
and if it doesn't know, it can't tell the user what is missing | |||
05:50
SamuraiJack_ left
|
|||
grondilu | ok | 05:51 | |
05:51
rurban left
|
|||
TimToady | '[' ~ ']' <thing> is really shorthand for '[' <thing> [ '[' || <.panic: "Couldn't find '['> ] | 05:51 | |
05:51
dwoldrich left
|
|||
TimToady | er, find ']' rather | 05:52 | |
Woodi | morning ! :) | 05:55 | |
05:56
SamuraiJack_ joined
05:57
denis_boyun left
|
|||
Woodi | installing star usualy was like: unpack, cd parrot && install, cd ../nqp && install, cd .., configure && install. but 2014.14 requires additional: cd rakudo configure && cd .. && make && make install it gives me .moarvm modules files | 06:00 | |
06:01
SamuraiJack_ left
|
|||
TimToady | I just did: perl Configure.pl --backend=parrot,jvm,moar --gen-parrot --gen-moar, then 'make' and 'make install' like it said in the README, and it seems to have worked fine | 06:05 | |
though, oddly, the perl6 in the top dir was parrot's while the perl6 in the bin dir was java's | 06:06 | ||
(and I really wanted it to be moar's, oh well) | |||
masak | morning, #perl6 | 06:08 | |
TimToady | o/ | 06:10 | |
06:25
benabik left
|
|||
masak | vaskozl_: | 06:28 | |
$ (echo "line one"; echo "line two") | perl6 -pe '$_ ~= "!"' | |||
line one! | |||
line two! | |||
oh, I was talking to a stale backlog -- sorry ;) | |||
anyway, I disagree that this behavior sucks. it feels like a very sane default to me. | 06:29 | ||
06:34
berekuk joined,
benabik joined
06:35
jnap joined
06:37
askz left
06:39
jnap left
|
|||
masak | r: 0x0123456789abcdef.perl.say | 06:42 | |
camelia | rakudo-moar 1a28ed: OUTPUT«81985529216486896» | ||
..rakudo-{parrot,jvm} 1a28ed: OUTPUT«81985529216486895» | |||
masak | skids: is that one rakudobug-submitted? | ||
06:44
darutoko joined
06:47
rurban joined
06:50
FROGGS joined
|
|||
FROGGS | Woodi: you should get a nice message including examples when you run 'Configure.PL' in latest star without the --backends option | 06:51 | |
06:52
rurban left
|
|||
FROGGS | Woodi: so, best is to not cd into parrot at all, but let Configure.PL do this for you | 06:52 | |
06:53
zakharyas joined
|
|||
FROGGS | r: say $*EXECUTABLE; say $*EXECUTABLE_NAME | 06:54 | |
camelia | rakudo-jvm 1a28ed: OUTPUT«IO::Path</home/p6eval/rakudo-inst-2/bin/perl6-j>perl6-j» | ||
..rakudo-parrot 1a28ed: OUTPUT«IO::Path</home/p6eval/rakudo-inst/bin/perl6-p>./rakudo-inst/bin/perl6-p» | |||
..rakudo-moar 1a28ed: OUTPUT«IO::Path</home/p6eval/rakudo-inst/bin/perl6-m>perl6-m» | |||
06:54
rurban joined
|
|||
Woodi | I trying to use Perl6 software like normal software so I never use --gen-*. VM is one piece and probably rest are too... so why making it different from apache, etc ? | 06:55 | |
masak | in preparing code examples and demos for the Python course, I was impressed by many things. but when I got to looping over lines, and I had to manually chomp off the newline, I went "man, that's so primitive". | ||
06:55
domidumont joined
|
|||
masak | it doesn't get better by Python basically only having .rstrip for this. which is wrong for two reasons: (a) what if I want to get rid of the newline but keep other (horizontal) whitespace around? (b) that 'r' in 'rstrip' is not very considerate of RTL languages. | 06:56 | |
Woodi | and configure in star top dir didn't generate rakudo/Makefile | 06:57 | |
FROGGS | Woodi: before 2014.04 the configure script assumed that there is only parrot out there, which is not true anymore | ||
Woodi: so instead of start running and building something that the user might not want, it asks you for details | |||
Woodi: I don't see any problems with that | |||
06:58
kaleem joined
|
|||
FROGGS | for normal configure scripts you also have options like: --with-tls and --no-tls | 06:58 | |
Woodi | do --gen assumes install into ./install ? | ||
06:58
rurban left
|
|||
FROGGS | we just don't have a default for --backends | 06:58 | |
--gen has nothing todo with --prefix, no | 06:59 | ||
Woodi | I thinked it was before | ||
FROGGS | no | ||
if you omit --prefix, it defaults to ./install | |||
I think when MoarVM is more and more mature, it might be the default for star (for one because it builds within a fraction of the others) | 07:00 | ||
Woodi | so I probably need just --prefix and --backend switches | 07:01 | |
FROGGS | but we need to get rid of another 80% of the precomp bugs and need to get concurrency stable | ||
Woodi: no, you need the --gen-moar --gen-parrot also I think | |||
Woodi | --gen-usually was for cloning from github... | 07:02 | |
FROGGS | because otherwise it assumes that these are already built, and complains otehrwise | ||
--gen will only clone when the requested revision is not already there as a folder | |||
which is never true for star | |||
so, perl Configure.pl --backends=moar,jvm,parrot --gen-moar --gen-parrot is all you need | 07:03 | ||
(until we decide to set defaults) | |||
but then you probably get moar only | 07:04 | ||
at least, that is my gut feeling | |||
Woodi | ah, right. so I still like to install them manually :) | ||
FROGGS | that is still an option :o) | ||
thou | if moar and nqp are in your PATH and recent enough, you won't need --gen-* | 07:05 | |
FROGGS | either PATH or --prefix (or ./install/bin/* is prefix wasn't set) | 07:06 | |
thou | yeah | ||
FROGGS | at least that is what it *should* do | ||
Woodi | actually PATH-way do not work... I instal into /opt/somewhere and link to /opt/bin and nqp do not see moar | ||
FROGGS | Woodi: can't you override PATH during build-time? | 07:07 | |
Woodi | hmm, override ? I'm forced to specify --prefix... | 07:08 | |
parrot-nqp and -rakudo detect corectly, with moar I need to use --prefix for everything | 07:09 | ||
FROGGS | yes, but to find moar you could do: PATH="/path/to/moar/bin/:$PATH" your-build-script.sh | ||
Woodi | horror... | ||
FROGGS | but I don't know the details, so there might be an opportunity to fix something about your issues withing moar/nqp/rakudo's build scripts | 07:10 | |
Woodi | I have correct PATH setup in .bashrc (probably) :) | ||
FROGGS: actually I comfortably cloned 'perl Configure.pl --prefix=/opt/lib/graft/star-201404 --backend=moar' + \n in few subdirs and everything installed correctly :) | 07:11 | ||
FROGGS | okay :o) | 07:12 | |
Woodi | then links to /opt/bin and can use Perl6 :) | ||
xiaomiao | mmh, I do like having a package manager take care of all those weird details ... :) | 07:14 | |
masak | r: 0x0123456789abcdef.perl.say | 07:15 | |
camelia | rakudo-moar 1a28ed: OUTPUT«81985529216486896» | ||
..rakudo-{parrot,jvm} 1a28ed: OUTPUT«81985529216486895» | |||
masak submits rakudobug | |||
07:17
kaare_ left
07:20
Su-Shee_ is now known as Su-Shee
07:25
rindolf joined
07:28
kaare_ joined
07:36
jnap joined
07:37
thou left
07:40
jnap left
07:45
kaare_ left
07:49
kaare_ joined
07:51
Alina-malina left,
hoverboard left
07:55
rurban joined
07:58
rindolf left
07:59
rurban left
08:00
aindilis` left
|
|||
moritz | n: 0x0123456789abcdef.perl.say | 08:12 | |
camelia | niecza v24-109-g48a8de3: OUTPUT«81985529216486895» | 08:13 | |
moritz | r: say 81985529216486896 - 81985529216486895 | ||
camelia | rakudo-{parrot,jvm} 1a28ed: OUTPUT«1» | ||
..rakudo-moar 1a28ed: OUTPUT«0» | |||
moritz | at least moar is consistent :-) | ||
m: say 81985529216486896 * 2 | 08:14 | ||
camelia | rakudo-moar 1a28ed: OUTPUT«163971058432973792» | ||
08:14
kaare__ joined
08:16
kaare_ left
08:17
virtualsue joined
08:18
igorsutton joined
|
|||
dalek | kudo/nom: 8574c4f | (Tobias Leich)++ | / (2 files): obtain execname from runner scripts for jvm too |
08:18 | |
sergot | hi o/ ! | 08:21 | |
08:27
berekuk left
|
|||
masak | ooh, Crockford++ wants to introduce the infix:<~> concatenation operator into JavaScript. www.techtalkshub.com/douglas-crockf...avascript/ | 08:27 | |
I wonder where he got that symbol from? :> | |||
08:28
beastd joined
08:29
beastd left,
beastd joined,
kaare__ is now known as kaare_
|
|||
nwc10 | :-) | 08:29 | |
that's one measure of success - people are now stealing stuff | 08:30 | ||
vendethiel | good thing crockford can't exactly do what he wants, though | 08:31 | |
but yep, we know where that's coming from (C of course) | 08:33 | ||
(C has far too many string manipulation operators, while we're at it :P) | |||
optional static type checking ? he's probably better just writing a p6-js backend :p | 08:34 | ||
tadzik | um, ~ doesn't concat strings in C | ||
frankly, nothing concats strings in C | |||
vendethiel | that's the joke | 08:35 | |
tadzik | oh :) | ||
I'll go get a coffee | |||
masak | not concating strings with an operator is the least of C's string-related problems. | 08:36 | |
vendethiel | maybe that's because C doesn't have strings :p | ||
08:37
jnap joined
|
|||
masak .oO( "arrays of bytes ought to be enough for everyone" ) | 08:37 | ||
vendethiel | I actually think C++ is getting a string::split function in C++14 or C++17 ! (need to check C++1y) This is revolutionary | 08:38 | |
tadzik | I didn't even write "goan get a coffee", as I usually do. What a morning | 08:41 | |
starting from a broken metro/underground/subway | |||
08:41
jnap left
|
|||
masak | dang, all three of them broken at the same time? :P | 08:42 | |
08:42
denis_boyun_ joined
|
|||
vendethiel | .oO( not worth the hassle having them all ) |
08:43 | |
tadzik | heh, I wish we had more than one. Or, today, even one :D | 08:44 | |
xiaomiao | I find such transportation quite convenient | 08:45 | |
as long as they don't collide and the escalators don't spontaneously reverse direction | |||
vendethiel | (and as long people don't pull the emergency stop thingie or even suicide ...) | 08:48 | |
tadzik | yeah, that sucks | 08:50 | |
08:51
dmol joined
08:54
fhelmberger joined
08:56
rurban joined,
plobsing left
08:57
aindilis joined
|
|||
dalek | c: 9cc0b14 | (Tobias Leich)++ | lib/variables.pod: document $*EXECUTABLE and note caveats of $*EXECUTABLE_NAME |
08:58 | |
08:59
xfix left
09:00
rurban left
|
|||
FROGGS | hmmmm, p-clean wipes dynext/*.so, which also cleans up dynext/libperl6_ops_moar.so :( | 09:01 | |
09:02
xfix joined
|
|||
dalek | kudo/nom: a64b6df | (Tobias Leich)++ | tools/build/Makefile-Parrot.in: p-clean should only clean up its own libs |
09:05 | |
FROGGS | ~/dev/rakudo/t$ perl6-p -e 'say $*EXECUTABLE; say $*EXECUTABLE_NAME' | 09:06 | |
IO::Path</home/froggs/dev/rakudo/t/perl6-p> | |||
perl6-p | |||
okay, that one wants fixing | |||
09:21
spider-mario joined
09:23
pecastro joined
09:33
anaeem1__ joined
09:36
anaeem1 left
09:37
jnap joined
09:42
jnap left,
zakharyas1 joined,
zakharyas left
09:53
Alina-malina joined
09:57
rurban joined,
beastd left
10:04
rurban left
10:23
Alina-malina left
10:24
Alina-malina joined
10:26
integral left
|
|||
lizmat | good *, #perl6! | 10:27 | |
10:29
domidumont left
|
|||
sjn | m: good *; #perl6 | 10:31 | |
camelia | rakudo-moar a64b6d: OUTPUT«===SORRY!=== Error while compiling /tmp/HcLFpOz0xzUndeclared routine: good used at line 1» | ||
sjn | aw :/ | 10:32 | |
m: *.good; | |||
camelia | ( no output ) | ||
10:36
Alina-malina left
10:37
Alina-malina joined
10:38
jnap joined
10:42
jnap left
10:43
kivutar joined
|
|||
colomon | *.good indeed | 10:47 | |
10:49
Alina-malina left
|
|||
lizmat has been wondering about pragma's and the interaction with S11's use auth/ver capabilities | 10:49 | ||
10:49
Alina-malina joined
|
|||
lizmat | feels to me that conflating pragma's and "use" is so 20th century | 10:49 | |
FROGGS wonders now also | 10:50 | ||
10:50
cibs joined
|
|||
lizmat | do we want pragma's to also have auth/ver ? | 10:50 | |
FROGGS | hmmm | ||
dunno | |||
10:50
Alina-malina left
|
|||
FROGGS | when they are moduleish, perhaps | 10:51 | |
I mean, the one pragma we have atm is just a module with a lowercase name | |||
lizmat | and which is faulty, really (assuming you're referring to "use lib" ) | 10:52 | |
10:52
Alina-malina joined
|
|||
lizmat | the other is of course "use MONKEYTYPING" | 10:52 | |
FROGGS | why is it faulty? | ||
10:52
rindolf joined
|
|||
lizmat | because it's influence isn't scoped | 10:52 | |
*its | |||
FROGGS | ahh | 10:53 | |
well, that is doable | |||
lizmat | sure... :-) | ||
however, I'm starting to lean towards "pragma {}" being a first class citizen | 10:54 | ||
like module / class / grammar | |||
FROGGS | hmmm | ||
does it have another behaviour? | |||
or other defaults? | 10:55 | ||
lizmat | well, something like: | ||
pragma { switch-on { code to switch on pragma } switch-off { code to switch off pragma } } | 10:56 | ||
FROGGS | ahh, the support for 'no something' | ||
lizmat | when invoked, e.g. with "override strict" | ||
yes | 10:57 | ||
but without the "no" :-) | |||
FROGGS | why? | ||
lizmat | I would think "no" is to short hufmann coded for something so special | ||
"override strict" | |||
FROGGS | O.o | ||
override in what way? | 10:58 | ||
lizmat | like "no strict" in perl 5 | ||
"ensure strict" as the opposite | |||
FROGGS | yeah, but override does not mean to turn something *off* | ||
10:58
chenryn joined
|
|||
FROGGS | I'd like to keep 'use' | 10:59 | |
lizmat | why? | ||
FROGGS | I do not like to see other keywords that have an (almost) identical meaning | 11:00 | |
since lib.pm is just a module | |||
11:01
rurban joined
|
|||
lizmat | but that's you projecting the implementation :-) | 11:02 | |
use lib happens to be a pragma (at least in my book) | |||
that happens to be implemented using library loading code | 11:03 | ||
11:05
rurban left
|
|||
lizmat | actually, maybe "lib" should be loaded always already | 11:07 | |
FROGGS | well yeah, that is the thing about pragmas... these might be already 'loaded' and you just tweak them lexically | ||
lizmat | so we don't need to search for it (which may depend on how what a previous incantation of "use lib" has done) | ||
FROGGS | but still, do we need extra keywords? | 11:08 | |
lizmat | well, we need a decision on that soonish | ||
atm, pragma's are underdeveloped in Perl 6 | |||
and changes in that area would be relatively painless | |||
11:09
avar joined,
avar left,
avar joined
|
|||
FROGGS | question is: do we want to disallow that ppl write their own pragmas? | 11:09 | |
moritz | absolutely not | ||
lizmat | let me just stop this for now, and just state that using "use" for pragma smells to me | ||
FROGGS | because then: use lib:auth<FROGGS> ... won't be possible anymore | ||
lizmat | indeed, people should be able to use their own pragma's | ||
FROGGS | and when we do not want to disallow that, then pragmas are just lowercased modules | ||
lizmat | *make | ||
FROGGS | and I'm more a fan of unifying things than splitting things that are similar enough | 11:10 | |
because these tends to be more powerful if combined | |||
you should only split things that do not work well together or are confusing | 11:11 | ||
lizmat | "or are confusing" it's that part that I'm worried about | 11:12 | |
anyway, "use" in Perl 6 is fundamentally different from "use" in Perl 5 because of auth/ver and its scopedness | 11:14 | ||
and sometimes we don't realize yet how different, is my feeling | 11:15 | ||
FROGGS | but lets say we keep auth/var for pragmas also, and these are meant to be scoped like modules usages... where is the difference? | ||
(within P6, not to P5) | |||
if we had a clear break in behaviour, than I'd fully agree, but I do not see something yet | 11:16 | ||
lizmat | well, pragma's generally wouldn't export things | ||
would they? | |||
FROGGS | hmmm | ||
'warnings' could | |||
lizmat | what would "use warnings" export ? | 11:17 | |
FROGGS | something like %*WARNINGS_CATS ? | ||
that say something about the en-/disabled categories | |||
'use vars' would export things :P | 11:18 | ||
lizmat | that again feels to me like abusing the "use" tool to create pragma functionality | ||
FROGGS | perhaps I don't know what a 'pragma functionality' is | 11:19 | |
lizmat | but maybe we should stop this discussion now and see if masak, moritz, TimToady want to chime in | ||
FROGGS | yes :o) | ||
lizmat | no strict | ||
it's a signal to the compiler | |||
11:21
Alina-malina left
11:26
domidumont joined
11:30
skids left
11:31
mr- joined
|
|||
FROGGS | sure, there are things that need to interact very close to the compiler | 11:32 | |
11:33
mr- left
11:34
telex left,
lvfjf joined
11:36
telex joined
11:39
jnap joined
11:41
domidumont left,
domidumont joined
|
|||
dalek | ast: 61c0b71 | (Elizabeth Mattijsen)++ | S17-supply/interval.t: Add tests for Supply.interval |
11:43 | |
kudo/nom: ebca0e8 | (Elizabeth Mattijsen)++ | t/spectest.data: Make sure we test Supply.interval |
|||
11:44
jnap left
|
|||
masak | watching that Crockford video. | 11:49 | |
he has an interesting thesis: mainstream languages like JavaScript, Python, and Ruby got FP not because people asked for it, but because the language designers got that FP is good. | |||
11:50
ivanshmakov left
|
|||
moritz | well, js had it from the start | 11:51 | |
(afaict) | |||
and Guido doens't seem to be a huge FP fan to me (from a distance) | |||
timotimo | aye, he's said things that weren't especially positive about fp in the past, i think | 11:55 | |
or at least done | |||
12:00
benabik left
12:02
rurban joined
|
|||
masak | moritz: JS had it from 1999, according to that talk. I don't know what Crockford considers to be the watershed moment, but that's four years in. | 12:04 | |
also from a distance, I have the feeling Guido values FP (at least in the form of list comprehensions, map, and filter), but he values simplicity/on-ramps more. | |||
12:06
rurban left
|
|||
colomon | wow, DateTime::TimeZone is ludicrously slow to build under JVM. | 12:07 | |
vendethiel | Guido liking functinal? I think I read him say that fold was too advanced to put it in python's stdlib ? | 12:14 | |
tadzik | not sure if guido, but doesn't some pep un-recommend lambda becuase it's complicated? | 12:16 | |
s/un-recommend/discourage/ | 12:17 | ||
masak | vendethiel: these days, you have to 'from functools import reduce', which I think is fine. 'reduce' does come a distant third after 'map' and 'filter'. | 12:19 | |
vendethiel | well, anyway, I really seem to disagree with crockford on that point. lambdas aren't even related to "functional programming", they're useful for a hundred times more things | 12:20 | |
moritz | vendethiel: most people already consider function objects (or the ability to pass code around) "functional programming" | 12:22 | |
vendethiel | I also think I disagree on that naming. I don't think you're "passing code around" -- that's what a macros does | ||
moritz | in that sense, lambdas are importint | ||
vendethiel | s/naming/terminology | ||
moritz | well, more like "code references" than "code" | 12:23 | |
12:23
rindolf left
|
|||
timotimo | what's wrong with "higher-order functions"? | 12:23 | |
tadzik | nothing, we love them | ||
(ha ha) | |||
timotimo | :) | ||
colomon | timotimo: they're elitist. | ||
vendethiel | oooh | ||
timotimo | ooooh snap :) | ||
12:24
kurahaupo left
|
|||
moritz | hipster-order functions | 12:24 | |
timotimo | :D | ||
masak | highbrow functions | ||
timotimo | did you see "devops against humanity"? | ||
moritz | nope | ||
timotimo | but Cards Against Humanity rings a bell? | 12:25 | |
masak hasn't seen any devops *for* humanity :P | |||
colomon | see back 17 minutes ago when I complained about how slow compiling DateTime::TimeZone was in JVM? It's still ongoing on my *fast* linux box. | ||
moritz | timotimo: only from hearsay | ||
timotimo | ah | ||
colomon | CAH is awesome | ||
timotimo | i didn't know how CAH works about a week ago | ||
tadzik | I'd welcome any CAH-alike that I can buy/print myself in PL :) | ||
timotimo | github.com/bridgetkromhout/devops-...manity.csv - pretty funny :3 | 12:26 | |
colomon is not just saying that because it has provided gifts for his wife for two or three times a year… ;) | |||
tadzik | I just searched for them on our ebay equivalent, and I got some board games, some computer games and an album full of pictures from Auschwitz-Birkenau | ||
colomon | tadzik: pretty sure you can print CAH yourself. | ||
tadzik | oh! | ||
timotimo | yeah, the license allows for it | ||
tadzik | indeed, free download | ||
timotimo | iirc anyway. | ||
tadzik | colomon++ | ||
colomon | tadzik: cardsagainsthumanity.com/ "download for free" | 12:27 | |
there's also a Polish translation, it looks like. | |||
(again, downloadable for free) | |||
tadzik | I prefer things untranslated usually | ||
colomon | yeah, figured that but just wanted to mention it. | 12:28 | |
tadzik | the only people I play games with that don't know english are my parents, and I think in that case I' | ||
* I'll settle for Scrabble | 12:29 | ||
(stupid return key) | |||
colomon has refused to play CAH with his parents and in-laws. | |||
tadzik | hmm, printing 31 pages would be like $0.5 in a xero point nearby | 12:31 | |
FROGGS | (Douglas Crockford)++ # WAT | 12:34 | |
tadzik | I just glanced at a Linux magazine in a kitchen, and I read something about a ruby IRC bot that uses a similar system for matching queries that Dancer/Bailador uses for matching URLs | 12:38 | |
that sounds like the matching-thingy that Bailador has may want to be exposed as a module, and we can add something over our Net::IRC thingy to show that off | |||
and I could rewrite a dinner bot in Perl 6 and thus use Perl 6 in production | 12:39 | ||
vendethiel | .oO( Tonight, we dine in perl 6 ! ) |
12:40 | |
12:40
jnap joined
|
|||
tadzik | exactly | 12:40 | |
ah, but we'd need SSL and all | |||
I'll do that in august then | |||
FROGGS | TLS! | ||
colomon has been building DateTime::TimeZone on JVM for 34+ minutes now... | 12:41 | ||
and it's done! | 12:42 | ||
masak | colomon: hitting memory limits? | ||
colomon | masak: … not of the machine, but maybe of JVM? But I'm assuming it's the effect of compiling so many small files. | 12:43 | |
12:43
grondilu left
12:44
jnap left
|
|||
masak | oh! | 12:44 | |
Woodi is a bit shocked hearing about introducing 'no strict' in v6... pragma "no my" going ? ;) | |||
masak | yes, that could very well be it. | ||
Woodi: 'no my'? never heard of it. | 12:45 | ||
12:45
Alina-malina joined
|
|||
Woodi | masak: just imagined it, low probability as I was told sometime before :) | 12:45 | |
masak | Woodi: I'm not even sure what it is you're proposing. do you want to rename the 'no strict;' directive to 'no my;' ? | 12:47 | |
12:48
REPLeffect left
|
|||
masak | 'no strict;' has the advantage that it is what it says on the tin. you don't have to be strict anymore, so you don't have to use 'my'. you *can* if you want to. | 12:48 | |
'no my;' sounds like "you can't use 'my'". which is not what that directive does. | |||
vendethiel | WTB no p5 :) | 12:49 | |
Woodi | but why allowing to drop 'my' ? what a reason ? | 12:50 | |
[Coke] | I imagine 'no my' would be more strict no strict. | 12:51 | |
but it would probably be "no strict :my"; | |||
Woodi | [Coke]: in my imagination it was like "my is allowed to be > /dev/nulled" :) | 12:52 | |
masak | Woodi: just the other day someone requested the feature for one-liners. | ||
Woodi | oki | 12:53 | |
masak | Woodi: it's just that in Perl 6 (and newer Perl 5s, I hear), the default is strict *on*, not strict *off*. | ||
people can opt out of strictness if they feel it's in the way of them whipping something up. | |||
12:53
skids joined
12:55
anaeem1__ left
|
|||
vendethiel | `no undefined` | 12:55 | |
Woodi | so how varibles will be located ? declared on first sight ? | ||
12:56
kaare_ left
12:59
xinming joined
13:00
lvfjf left
13:06
LLamaRider joined
|
|||
masak | Woodi: you mean with an implicit 'my' declaration? no, I don't think that's gonna fly. | 13:07 | |
FROGGS | Woodi: exactly | ||
masak | that would be very surprising in the case of `{ ... $x ... } ... $x` | 13:08 | |
FROGGS | I think my hacky patch made them implicitly our scoped | ||
masak | our scope could work. | ||
that's how Perl 5 does it. | |||
but I seem to recall our scope is a bit more restrictive in Perl 6. | |||
FROGGS | here is the hack for anybody interested: gist.github.com/FROGGS/6f8989611659551dae1f | 13:09 | |
13:11
guru joined,
guru is now known as ajr_
|
|||
masak | FROGGS++ | 13:12 | |
spider-mario | Rakudo Star appears to build more backends than asked for | ||
I called Configure.pl with --backends=parrot but it still builds the MoarVM backend | |||
13:14
yakudza left
13:16
yakudza joined
|
|||
dalek | ecs: 0b2e726 | (Elizabeth Mattijsen)++ | S17-concurrency.pod: Preliminary spec of Supply.classify |
13:18 | |
FROGGS | spider-mario: hummm... do you have nqp-m or moar in PATH by any chance? | 13:21 | |
13:26
rurban joined
13:29
jnap joined
|
|||
Woodi | m: grammar G { token TOP { \w+ 'a' } }; say G.parse("kota"); | 13:32 | |
camelia | rakudo-moar ebca0e: OUTPUT«(Any)» | ||
tadzik | you need backtracking | 13:33 | |
Woodi | why ? | ||
tadzik | because + is greedy | ||
it eats the 'a' too | |||
Woodi | lol :) | ||
FROGGS | m: grammar G { token TOP { \w+? 'a' } }; say G.parse("kota"); | ||
camelia | rakudo-moar ebca0e: OUTPUT«「kota」» | ||
Woodi | stupid me | ||
m: grammar G { token TOP { \w+ ':' } }; say G.parse("kota."); | 13:34 | ||
camelia | rakudo-moar ebca0e: OUTPUT«(Any)» | ||
Woodi | m: grammar G { token TOP { \w+ '.' } }; say G.parse("kota."); | ||
camelia | rakudo-moar ebca0e: OUTPUT«「kota.」» | ||
timotimo | alternatively you can also do +? to be non-greedy | ||
13:42
ivanshmakov joined
13:43
FROGGS left
13:45
btyler joined,
schogen joined
13:53
benabik joined,
benabik left
13:55
kaleem left,
anaeem1 joined
13:56
treehug88 joined
14:01
Ven joined
14:02
lichtkind joined,
lichtkind_ joined
|
|||
lichtkind | may I ask why the JVM port of rakudo is released now? | 14:04 | |
masak | m: grammar G { token TOP { \w+! 'a' } }; say G.parse("kota"); | ||
camelia | rakudo-moar ebca0e: OUTPUT«「kota」» | ||
masak | FROGGS, Woodi: greediness as such isn't the problem, but if you say 'token', then quantifiers (by default) don't backtrack. | 14:05 | |
colomon | lichtkind: huh? | 14:06 | |
[Coke] | lichtkind: do you mean "why do we have a JVM port?" | 14:07 | |
lichtkind | colomon: rakudo.org/2014/05/05/announce-raku...e-2014-04/ | ||
[Coke] | or "why did we release it in Rakudo Star?" | ||
tadzik | or "why now"? :) | 14:08 | |
lichtkind | now i heard from jntht in kiev that it already had been so far | ||
[Coke] | that's the compiler. | ||
lichtkind | I saw little progress on that front so I ask if i have overlooked something | ||
[Coke] | ^^ that's Rakudo Star, the compiler+modules. | ||
lichtkind | sure | ||
but why its included now | |||
colomon | "along with experimental support for the JVM backend (some module tests fail)." | ||
[Coke] | why not? | ||
colomon | probably easier to include it than exclude it, would be my guess. | 14:09 | |
[Coke] | I don't understand the thrust of your question. can you elaborate? | ||
lichtkind | it could be included half a year ago | ||
I skaed if there is a reason to do it now | |||
[Coke] | why did we wait so long, then? | ||
Rakudo * was parrot only. adding all backends was easier than adding only one additional backend. | 14:10 | ||
even if one of them doesn't quite run all the modules yet. | |||
colomon | while at the same time, adding other backends was a good bit of work | ||
lichtkind | yes ,i know | ||
nwc10 | JVM didn't support nativecall, hence a chunk of the Star modules didn't work | ||
colomon | so there was no good reason to add JVM before it was ready | ||
nwc10 | that was, I think, the bigger reason why no-one did the other code work | ||
lichtkind | ah so now nativecall works on jvm? | 14:11 | |
nwc10 | lichtkind: I believe "mostly" | ||
I don't know for sure | |||
exactly how mostly | |||
tadzik | it passes the tests | ||
works with bugs :) | |||
I mean, I found one | |||
and I sucessfully released two products that ran on JVM+NativeCall with no problems :) | |||
masak | \o/ | 14:15 | |
14:15
xenoterracide joined
|
|||
timotimo | hw much money you makin'? :) | 14:16 | |
tadzik | nobody signed up for Steroids' Commercial Support yet :P | 14:18 | |
moritz | tadzik: well, you could offer enterprise features, like LDAP/ActiveDirectory integration :-) | 14:19 | |
tadzik | heheh | ||
14:20
donaldh left
|
|||
tadzik | as soon as I can actually distribute these without asking people to install rakudo I may put something on Steam Greenlight, just to be the first one to have a Linux Exclusive in there :P | 14:20 | |
timotimo | haha, ouch :) | 14:21 | |
tadzik | it will probably have HW requirements simlar to Black Annex | ||
timotimo | that's the qbasic thing, right? | 14:22 | |
spider-mario | camelia: tell FROGGS yes, I do have nqp-m in my PATH (actually, I even have perl6-m) | ||
tadzik | yeah | ||
spider-mario | (that’s how the bot works, right?) | ||
tadzik | it requires a mouse, a VGA graphics card and a 2GHz+ CPU | ||
moritz | spider-mario: no, camelia only evals code | ||
spider-mario | oh, ok | 14:23 | |
moritz | .tell spider-mario maybe like this | ||
yoleaux | moritz: I'll pass your message to spider-mario. | ||
timotimo | m: sleep 3600; say "froggs, here's a message for you" | ||
tadzik | :D | ||
camelia | rakudo-moar ebca0e: OUTPUT«(timeout)» | ||
moritz | timotimo++ # but you need to do that asynchronously :-) | ||
spider-mario | thanks. :) | ||
yoleaux | 14:23Z <moritz> spider-mario: maybe like this | ||
timotimo | m: Promise.in(3600).then({ say "hi" }) | 14:24 | |
camelia | ( no output ) | ||
timotimo | not quite. | ||
tadzik | just wait an hour... | ||
spider-mario | .tell FROGGS yes, I do have nqp-m in my PATH (actually, I even have perl6-m) | ||
yoleaux | spider-mario: I'll pass your message to FROGGS. | ||
14:24
donaldh joined
|
|||
tadzik | FROGGS++ # handling panda things | 14:25 | |
masak | is there a way to say "if there are any promises that haven't triggered yet, wait for them" ? | 14:26 | |
tadzik | await {} ? | ||
ah, but like, globally | |||
moritz | masak: considering that not all promises are tied to concurrent execution somehow, that could be a very bad idea, IMHO | 14:28 | |
timotimo | so you essentially want a non-app-lifetime-thread to handle your stuff? | ||
tadzik | what if you waited for them in a different thread? :o | ||
JimmyZ | m: Promise.in(60).then({say "hello"}) | ||
camelia | ( no output ) | ||
moritz | m: Promise.in(2).then({say "hello"}) | 14:29 | |
camelia | ( no output ) | ||
14:29
raiph joined
|
|||
moritz | m: Promise.in(2).then({say "hello"}).result | 14:30 | |
camelia | rakudo-moar ebca0e: OUTPUT«hello» | ||
JimmyZ | m: Promise.in(60).then({say "hello"}).result | ||
spider-mario | wow, the startup time of Rakudo on Parrot is way better than it used to be | ||
14:30
shevy joined
|
|||
camelia | rakudo-moar ebca0e: OUTPUT«(timeout)» | 14:30 | |
14:31
tobiasvl joined
|
|||
timotimo | may very well be | 14:32 | |
JimmyZ | looks like it eats my cpu by above code | ||
schogen | p6: $*SCHEDULER.cue: :every(2), {say "hello"} | ||
masak | moritz: yes, you are right. | ||
timotimo | we've got lexical variables transformed into locals and blocks merged into each other, i'm sure that'll improve startpu time a little, too | ||
camelia | ( no output ) | ||
..rakudo-jvm ebca0e: OUTPUT«(timeout)» | |||
..niecza v24-109-g48a8de3: OUTPUT«Unhandled exception: Unable to resolve method cue in type Any 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 @ 576)  a…» | |||
..rakudo-parrot ebca0e: OUTPUT«Dynamic variable $*SCHEDULER not found in method <anon> at gen/parrot/CORE.setting:12682 in any at gen/parrot/Metamodel.nqp:2710 in any find_method_fallback at gen/parrot/Metamodel.nqp:2698 in any find_method at gen/parrot/Metamodel.nqp:…» | |||
masak | moritz: next question: if I have a promise that I want to wait for, how do I do that? | ||
oh, that's await {}, got it. :) | 14:33 | ||
m: await Promise.in(6).then({ say "hi" }) | |||
timotimo | yeah, await or .result | ||
camelia | rakudo-moar ebca0e: OUTPUT«hi» | ||
masak | \o/ | ||
m: await Promise.in(60).then({ say "(timeout)" }) | 14:34 | ||
camelia | rakudo-moar ebca0e: OUTPUT«(timeout)» | ||
masak | \o/ | ||
timotimo | oh you troll :) | ||
masak | that may be, but look how *fast* it responded! | ||
though I notice that the final newline is somehow missing... | 14:35 | ||
timotimo | well, that's weird | ||
masak | no, it *isn't*. you already correctly identified me as a troll. | 14:36 | |
14:36
virtualsue left
|
|||
timotimo | is the timeout on camelia only ~15 seconds? | 14:37 | |
masak | m: say "(no output)" | ||
camelia | rakudo-moar ebca0e: OUTPUT«(no output)» | ||
masak | m: print "(no output)" | ||
camelia | rakudo-moar ebca0e: OUTPUT«(no output)» | ||
masak | m: print "OUTPUT«(no output)»" | 14:38 | |
camelia | rakudo-moar ebca0e: OUTPUT«OUTPUT«(no output)»» | ||
moritz | masak: or, .result, as I used above | ||
masak | right. | ||
moritz feels pretty helpless in front of a p5 function with 2k lines that needs to be refactored | 14:40 | ||
Ven | a 2k lines function ? Really | ||
14:41
FROGGS joined
|
|||
timotimo | hopefully there are at least a hundred lines of comments in there. | 14:41 | |
FROGGS | well, it could be worse, really | 14:43 | |
yoleaux | 14:24Z <spider-mario> FROGGS: yes, I do have nqp-m in my PATH (actually, I even have perl6-m) | ||
FROGGS | spider-mario: hmmm, okay, that might trigger it... I'll look into it when I have time | ||
timotimo | spider-mario: have you seen the startup times of moarvm yet? :) | ||
spider-mario | yes, it’s pretty good. :) | 14:44 | |
but it seems parrot is on par now | |||
(pun not intended) | |||
(but still appreciated) | |||
moritz | Ven: yes, hysterically grown | 14:45 | |
timotimo | oh, wow. it is? | ||
i need to check that out mysel | |||
myself | |||
14:45
integral joined
|
|||
timotimo | something seems wrong with my local perl6-p | 14:46 | |
it's taking way longer than it should to compile the setting | |||
oh ... well it isn't infinilooping at least | |||
spider-mario | oh wait, perl6 is actually perl6-m | 14:47 | |
my bad | |||
(I did find it strange…) | |||
FROGGS | :o) | ||
timotimo | oh, all right | ||
FROGGS | perl6-p's startup time is usually twice as long as perl6-m's | ||
spider-mario | perl6-p is about twice as slow as perl6-m | ||
FROGGS | yeah | 14:48 | |
timotimo | hmm. we're above 100megabytes of maxrss for a simple "say 1" on moarvm | ||
i'm guessing that's due to the new classes and functions in the setting | |||
still way below 1/2 the memory usage of perl6-p | 14:49 | ||
FROGGS .oO( and what if you "say 2"? O.o ) | |||
timotimo | and perl6-p takes about half as much memory as perl6-j does to start up | ||
but perl6-j splits its 10 seconds across two cores, so it only takes 5.6s wallclock time | 14:50 | ||
14:50
zakharyas joined
14:51
zakharyas1 left
|
|||
Woodi | for my little file parsing script r-m is 38x slower then perl5 version of that script... what rakudo do on startup ? | 14:51 | |
14:51
grondilu joined
|
|||
[Coke] | Try loading moose, and bigints, and... | 14:52 | |
Woodi | 1.45 vs 0.038... | ||
then do not load this stuff... | |||
grondilu | I feel I've already asked that, but is it a good idea to rely on .keys and .values to return in reciprocally consistent order? | ||
FROGGS | grondilu: no | 14:53 | |
PerlJam | grondilu: maybe you want to use .kv ? | ||
Woodi | grondilu: yes, but only for small keys set ;) | ||
[Coke] | Woodi: to not load it, you'd have to not use it in the setting... and I'm pretty sure the OO stuff is baked in pretty deep. | ||
grondilu | maybe it's better to tell you what I want to do. I have a hash whose keys are real numbers and values are lists of real numbers. I want to see whether if for all key-values pairs, the key is the mean of the values. | 14:54 | |
Woodi | then MooV6.c maybe ? | ||
PerlJam | grondilu: won't you have issues with floating point precision? | 14:55 | |
grondilu | PerlJam: I don't want to worry about that yet | 14:56 | |
FROGGS | Woodi: that is like telling P5 to not use SV's | ||
Woodi: but yeah, P6 needs to get faster (and it will get a lot faster) | |||
grondilu | maybe something like [and] map { .key == .values R/ [+] .values }, %h.paris | ||
*pairs | |||
timotimo | grondilu: it wouldn't seem like you'd have to rely on the order of .keys and .values; though you really would want .pairs or .kv | ||
FROGGS .oO( We always have Paris ) | |||
retupmoca | m: my %h = (2 => [1,2,3]); for %h.kv -> $mean, @vals { if $mean == ([+] @vals) / +@vals { say 'yay!'} } | 14:57 | |
camelia | rakudo-moar ebca0e: OUTPUT«yay!» | ||
14:58
shevy left
|
|||
timotimo | i'd suggest { say "you're all so mean!" } instead | 14:58 | |
14:58
lvfjf joined
|
|||
timotimo | hm. wasn't there recently some effort to replace the strings in O( ... ) with proper hashes? | 14:59 | |
Woodi | can we have two kinds of objects ? a) just rich struct; and b) fully MOPped... | ||
masak | grondilu: (a) I think you *can* rely on it, but (b) whether it's a good idea to do so is a different question. I would consider it a code smell, I think. | 15:00 | |
timotimo | Woodi: whether or not your code relies on OOP, almost everything in the setting does | 15:01 | |
getting rid of OOP from the setting seems like a bad idea; i'd rather go for different things that aren't always used | |||
FROGGS | timotimo: yes, arnsholt++ did that, but there are issues in rakudo so it is still in a branch | ||
timotimo | FROGGS: ah, okay. sad to hear it | ||
moritz | also, the compiler itself uses the MOP :-) | ||
FROGGS | timotimo: well, you can fix the issues :o) | 15:02 | |
PerlJam | grondilu: [and] map { $^k == @^v R/ [+] @^v }, %h.kv # if you want to go that route. | ||
timotimo | Woodi: for example, not all scripts use Bag or Mix, Promises or Channels, Instant, Buf, that kind of stuff | ||
FROGGS: will i immediately see what's wrong when i check out the branch and try to compile it? | 15:03 | ||
15:03
bluescreen10 joined
|
|||
PerlJam | grondilu: you could also use a junction | 15:03 | |
FROGGS | Woodi: this won't work out... when you declare a custon infix, the grammar gets inherited and augmented... there are so many things that need the mop | ||
timotimo: I think so | |||
timotimo: also, he added comments to the issue he made I think | |||
timotimo | moritz: there's still a very old branch in rakudo from you that aimed to allow the user to subclass nqp classes; are you interested in reviving that any time soon? | 15:04 | |
moritz | timotimo: no | 15:05 | |
timotimo | did the use-case disappear? | 15:06 | |
FROGGS | hmmm, there is a use case | ||
slangs that use P6 grammars but build QAST | |||
timotimo | aye. | 15:07 | |
15:07
bjz left
|
|||
moritz | timotimo: no, my motivation :-) | 15:07 | |
15:07
virtualsue joined,
bjz joined
|
|||
timotimo | motivation's kinda low for me at the moment as well; though i'm itching to make something happen ... :\ | 15:08 | |
tadzik | ༼ つ ◕_◕ ༽つ pls gamepads | 15:09 | |
actually, I just wanted to use that image :P | |||
FROGGS | how can you not be motivated when rakudo gets moar awesome day by day?? | ||
15:11
guru joined
|
|||
moritz | FROGGS: oh, I'm very motivated watching you and @others making it awesome :-) | 15:11 | |
15:11
guru is now known as Guest27681
|
|||
FROGGS | bah | 15:11 | |
:P | |||
15:12
bjz left
|
|||
lee_ | am i misunderstanding how to turn an array into a list? i wanted to try something like [and] @array.list | 15:12 | |
gist.github.com/leedo/5b90563535cd6dd3d295 | |||
masak | m: my @array = True, True, True; say [&&] @array | 15:13 | |
camelia | rakudo-moar ebca0e: OUTPUT«True» | ||
masak | m: my @array = True, False, True; say [&&] @array | ||
camelia | rakudo-moar ebca0e: OUTPUT«False» | ||
masak | lee_: worksforme. | ||
moritz | lee_: it's an array of arrays | ||
lee_ | oh, derp. i see what i did | ||
moritz | lee_: you you need @a[0].list | ||
15:14
ajr_ left
|
|||
moritz | or omit those [ ] while assigning :-) | 15:14 | |
lee_ | yep, used my @a = [ ... ] | ||
PerlJam | you could have said @a := [ ... ] | ||
Ven | m: my @array = True, False, True; say all(@array) | ||
camelia | rakudo-moar ebca0e: OUTPUT«all(True, False, True)» | ||
Ven | m: my @array = True, False, True; say ?all(@array) | ||
camelia | rakudo-moar ebca0e: OUTPUT«False» | ||
grondilu | kinf of related: does the order of .keys is supposed to be consistent with the order of .pairs? | 15:15 | |
(omg my english was terrible here) | 15:16 | ||
I mean: is the order of .keys supposed to be... | |||
PerlJam | I dunno the answer, but I think if you care about keeping the order of keys and values in sync, then you should ask for them together. | ||
15:16
plobsing joined
|
|||
grondilu | yeah but it just does not seem convenient to do so | 15:17 | |
moritz | grondilu: I'm pretty sure that .keys and .values are supposed to be in sync | ||
(as long as you don't modify the hash inbetween) | 15:18 | ||
not sure about any other pair of methods | |||
masak | grondilu: what PerlJam said. basically what I felt with the last question. | ||
moritz | (at least that's the p5 approach) | ||
masak | right. | ||
it's one of those "you can depend on this... but try not to" situations. | |||
15:18
igorsutton left,
denis_boyun_ left
|
|||
masak | anything that *depends* on hash order, no matter how innocently, is asking for the future to come and break it. | 15:19 | |
moritz | if you ask for .kv and .pairs, you already have keys *and* values, so I don't see much reason for external consistencies as well | ||
15:19
igorsutton joined
15:20
spider-mario left
|
|||
skids | masak: As far as that 0x1023456789abcdef bug, I'd say the 1s-complement problem with libtomath is at the root of most such problems; it's almost not worth filing separate bug reports until RT#115966 is fixed. IIRC FROGGS++ tried to appply the fix in the gist there but there was bitrot in the meantime. | 15:21 | |
synopsebot | Link: rt.perl.org/rt3//Public/Bug/Displa...?id=115966 | ||
moritz | skids: but how is a positive number affected by 1s complement? | ||
FROGGS | skids: that covers what I remember, aye | 15:22 | |
skids | Who knows how that is being optimized. | ||
15:23
igorsutton left
|
|||
masak | skids: ok, merging into RT#115966 | 15:28 | |
synopsebot | Link: rt.perl.org/rt3//Public/Bug/Displa...?id=115966 | ||
15:32
plobsing left
|
|||
skids | If I get some tuits I'll try to refresh the proposed fix, but I haven't trained up on properly smoking things, so I'll need some help there. | 15:34 | |
FROGGS | skids: you shall get your help :o) | ||
grondilu | Well, I wrote rosettacode.org/wiki/K-means%2B%2B_...ing#Perl_6 but that may be the least elegant Perl 6 code I've ever written in RC. This algorithm is tough to write without making it tedious, though. | 15:35 | |
PerlJam | why the ++ on operator? | 15:38 | |
grondilu | just to match the name of the algorithm. | ||
it's a bit annoying that Complex numbers are not made of Rat but floating points. | 15:41 | ||
r: say .reals».WHAT given 1 + 1i | 15:42 | ||
camelia | rakudo-{parrot,jvm,moar} ebca0e: OUTPUT«(Parcel)» | ||
grondilu | r: say .reals[0].WHAT given 1 + 1i | ||
camelia | rakudo-{parrot,jvm,moar} ebca0e: OUTPUT«(Num)» | ||
grondilu | I kind of would have expected (Int) here :/ | 15:43 | |
15:43
bluescreen100 joined
|
|||
grondilu | r: say .re.WHAT given 1 + 1i | 15:44 | |
camelia | rakudo-{parrot,jvm,moar} ebca0e: OUTPUT«(Num)» | ||
15:44
anaeem1 left
15:45
anaeem1_ joined,
virtualsue left
15:47
bluescreen10 left
15:52
vaskozl_ left
15:55
lvfjf left
15:58
pecastro left
|
|||
tadzik | masak: not sure if it was you I told all about "little tails" in polish, but actually "ogonek" is the formal name for this, even in english: en.wikipedia.org/wiki/Ogonek | 15:58 | |
16:01
anaeem1_ left,
anaeem1_ joined
16:02
zakharyas left
16:05
btyler_ joined,
schogen left
16:06
btyler left
16:23
denis_boyun_ joined
|
|||
PerlJam | tadzik: what's the little appendange called for consonants like Ç ? | 16:25 | |
oh, just cedilla (I've always associated that word with just Ç) | 16:26 | ||
16:26
Psyche^ joined,
fhelmberger left
|
|||
geekosaur | and then there's comma which is sometimes replaced with cedilla out of confusion or because it's easier in some typography implementation | 16:29 | |
16:29
hummeleBop left
16:30
Psyche^_ left
16:39
pdcawley left
16:40
Alula left,
Alula joined
16:42
Alula left
16:43
thou joined
16:46
kurahaupo joined
16:57
Alula joined
17:01
kurahaupo left
|
|||
tadzik | PerlJam: oh, that I don't know | 17:07 | |
polish only has things in Ą and Ć | |||
huf | and l | 17:10 | |
17:11
guru joined,
guru is now known as ajr_
17:12
Rotwang joined
|
|||
tadzik | oh, Ł yes | 17:13 | |
and Ż | 17:14 | ||
that's it I think : | |||
17:14
Guest27681 left
17:15
wbill joined
|
|||
Rotwang | did you know that there are no square nor curly braces on the finnish keyboard? | 17:15 | |
TimToady | that's looks like 之 to me :) | ||
next you'll be telling me John McCarthy was Finnish... | 17:16 | ||
17:21
hoverboard joined
17:37
denis_boyun_ left
17:42
hoverboard left,
rindolf joined
17:57
ajr_ left
|
|||
Woodi | can we have PerlScript ? ;) | 18:03 | |
TimToady | m: say Complex(42).re.WHAT | 18:06 | |
camelia | rakudo-moar ebca0e: OUTPUT«(Num)» | ||
TimToady | I'd call that a bug; the specs consistently talk about Real components, not Num components | 18:07 | |
18:07
araujo left
|
|||
TimToady | lizmat: :auth and :ver are just about identity to my mind, and pragmas have just as much identity as any other module, even if most of 'em come standard; as for other semantic differences, I see none; all modules mutate the current language upon import, including pragmas, with no sane place to draw a boundary. | 18:10 | |
FROGGS | TimToady: and the opposite of 'use foo' is still 'no foo'? | 18:12 | |
TimToady | well, I suppose we could have don't-use nowadays :) | 18:13 | |
but I'm fine with keeping no | |||
FROGGS | :o) | ||
18:13
araujo joined
|
|||
TimToady | re Complex, if you really want floaters, that's what complex is for | 18:13 | |
FROGGS | I think we need an opposite of &EXPORT btw | ||
TimToady | well, we certainly need ways of undoing things that are undoable | ||
FROGGS | so 'no foo <blarg>' does call another sub | ||
TimToady | whether the current EXPORT mechanism is up to the task, I've never thought about | 18:14 | |
FROGGS | IIRC I do `$*SCOPE eq 'use'` in v5, but that is not the best way either | 18:15 | |
TimToady | it's certainly not quite ready to export new slangs or to export modifications of the current slangs | 18:16 | |
FROGGS | the entire use/no warnings in v5 is a huge hack | ||
TimToady | well, sure, because use is file-scoped by default in P5 | ||
18:16
simcop2387 left
|
|||
TimToady | that's one of the main reasons we changed everything to lexical scoped in P6 | 18:17 | |
18:17
simcop2387 joined,
ivanshmakov left
|
|||
FROGGS | m: { use lib 'foo' }; say @*INC # :/ | 18:18 | |
camelia | rakudo-moar ebca0e: OUTPUT«foo /home/p6eval/.perl6/2014.04-193-gebca0e8/lib /home/p6eval/rakudo-inst-1/languages/perl6/site/lib /home/p6eval/rakudo-inst-1/languages/perl6/vendor/lib /home/p6eval/rakudo-inst-1/languages/perl6/lib» | ||
TimToady | it actually made much less sense in P5 to combine pragmas with modules, but it made enough sense even there | ||
18:18
telex left
|
|||
TimToady | but 'use lib' is simply mis-implemented right now in P6 | 18:19 | |
FROGGS | right | ||
TimToady | there's no reason to have things that are special file scope when the outermost lexical scope is file scope, and we want to encourage file scoped things to be declared at the front anyway, not hidden down in a block somewhere | 18:20 | |
18:20
hoverboard joined
|
|||
FROGGS | yeah, and my bet is that not a single thing breaks when we fix 'use lib' | 18:21 | |
TimToady | there are a few things relating to identity that are truly file-scoped, but 'use lib' does not appear to be one of them, from the user's perspective anyway | 18:22 | |
18:23
telex joined
|
|||
moritz agrees | 18:23 | ||
18:23
ivanshmakov joined
|
|||
moritz | a pragma that indicates the character encoding of a file might be file scoped | 18:23 | |
FROGGS | like the magic comment in Python? | 18:24 | |
TimToady | technically it wouldn't have to be file-scoped, but that's a spot where we can afford to be draconian :) | ||
since most text editors can't deal with mixed encodings in a single file | 18:25 | ||
18:26
ivanshmakov left,
ivanshmakov joined
18:27
fhelmberger joined
|
|||
TimToady | but many binary file types support "mixed encodings" all the time internally, for some definition of encoding | 18:27 | |
it's very nearly almost the definition of "binary" | |||
linguistically speaking, it's funny that we settle on "binary" to describe that, but I guess it's sort of a lowest-common whatsy | 18:29 | ||
18:29
guru joined,
guru is now known as Guest84418
18:30
Guest84418 is now known as ajr_
18:31
fhelmberger left
|
|||
FROGGS | :o) | 18:31 | |
18:32
integral left
18:34
virtualsue joined
|
|||
masak | tadzik: I think we discussed "little tails" and "ogonek" at some point. either way, I'm familiar with the concept of "ogonek", and I would know what it meant if someone said it :) | 18:39 | |
TimToady: I had never made the connection between Ż and 之 before -- now I can't un-see it :P | 18:40 | ||
18:40
integral joined,
integral left,
integral joined
|
|||
jnthn | evening, #perl6 | 18:44 | |
TimToady | o/ | ||
jnthn is on his way home from this week's teaching ) | 18:45 | ||
FROGGS | hi jnthn | ||
18:48
virtualsue left
18:49
molaf left
|
|||
masak | jnthn: hi ))))))) | 18:50 | |
FROGGS | jnthn was in russia? | ||
jnthn | Nyet, just Oerebro :) | 18:51 | |
18:51
darutoko left
|
|||
btyler_ | or masak fell into a vkontakte comment thread and didn't manage to wash off all the smailiki | 18:52 | |
jnthn | Smailiki are cute. Why wash them off? :P | 18:54 | |
.oO( or should that just be P... ) |
18:55 | ||
raydiak | good almostnoon, #perl6 | 18:57 | |
18:57
prevost joined
|
|||
jnthn | o/ raydiak | 18:57 | |
FROGGS | hi raydiak | 18:58 | |
timotimo | oh hey raydiak | ||
raydiak | \o jnthn, FROGGS & timotimo | ||
timotimo | raydiak: can you add a "run time: $n seconds" to the popups of perl6-bench? :) | ||
raydiak | doesn't sound too hard, does it? | 18:59 | |
FROGGS | jnthn: do you have a sec to talk about UnwindExceptions and friends? | ||
19:00
grep0r left
|
|||
masak | hehe, "smailiki" :) | 19:00 | |
jnthn | FROGGS: Well, I don't watch friends, but I know about UnwindException...kinda. | 19:01 | |
FROGGS | k | ||
that should suffice :o) | |||
- for loops like while we have unwind exceptions handlers for next/redo/last | |||
- this is not what I want for `next LABEL`, because these UnwindExceptions do not have a payload attr | 19:02 | ||
- so I'd need handlers for VMExceptions I think | |||
- there was another dynamic variable like @*REGISTER_UNWING_HANDLERS, is this the right one for VMExceptions? | 19:03 | ||
jnthn | hm | ||
masak .oO( jnthn only watches druzya ) :P | |||
FROGGS | - can I mix UnwindException handlers and handlers for VMExceptions in the same while loop code gen? | ||
jnthn | Well, the "normal" exceptions actually use UnwindException too | 19:04 | |
FROGGS | - it was @*REGISTER_BLOCK_HANDLER or so | ||
ahh, yeah, you said that already | |||
I just don't see how that can be true | 19:05 | ||
19:05
grep0r joined,
virtualsue joined
|
|||
FROGGS | because I throw via newexception, and in the while loop (due to such a unwind handler), I only have an UnwindException on the stack | 19:06 | |
so I dunno how to get the information I need - the payload | |||
jnthn | Remember that normal exception handlers run on the stack top | 19:07 | |
And *then* unwind | |||
So the whole payload business is all over by the time we unwind. | |||
FROGGS | aha | ||
jnthn | Any change you can stuff it in the result slot of the unwind exception for this case? | ||
FROGGS | hmmm | ||
interesting Idea... | 19:08 | ||
I'll try | |||
thanks )) | |||
jnthn | pzh ) | ||
19:08
LLamaRider left
|
|||
colomon | wow, there are 30+ modules that work in parrot and fail in JVM. | 19:10 | |
including ABC? :( | |||
vendethiel | .oO( it should be as simple as ABC to get p6-jvm working ... ) |
19:12 | |
raiph | grondilu++ # rosetta contributions in general, "K-means++ clustering" in particular | ||
timotimo | oh, you're smoking all three backends now? | ||
19:12
cognominal__ joined
|
|||
colomon | timotimo: just got my first complete smoke of JVM | 19:12 | |
19:12
dalek left
|
|||
colomon | moar still fails horribly | 19:13 | |
timotimo | oh my :( | ||
jnthn | colomon: How so? It passes all the Star modules... | ||
19:13
dalek joined,
ChanServ sets mode: +v dalek
|
|||
jnthn | So I don't imaigne the module smoke can be *that* bad... | 19:13 | |
lizmat | TimToady: message received | ||
colomon | jnthn: it's worse | ||
jnthn | colomon: Odd. | 19:14 | |
colomon | jnthn: wait | ||
19:14
virtualsue left
|
|||
colomon | jnthn: when it tries to install File::Find, it works, but somehow installing it while running it corrupts both the current executable running and the compiled version of File::Find stored on my hard drive. | 19:15 | |
19:15
cognominal left
|
|||
jnthn | um...huh? | 19:15 | |
colomon | jnthn: so it not only kills the smoker in mid-run, it kill's panda ability to run until you rebootstrap | 19:16 | |
jnthn: it's been doing this for at least a month now. | |||
dalek | Heuristic branch merge: pushed 52 commits to rakudo/loop_labels_test by FROGGS | ||
colomon | jnthn: I'm only guessing proximately about what's causing it to die, but I can tell you for sure that panda install File::Find breaks panda | 19:17 | |
jnthn | ah, that sounds like a more easily huntable one. | ||
colomon | I'm rebuilding moar at the moment, when I'm done I'll post a gist of how to duplicate the issue | 19:18 | |
jnthn | colomon++ | ||
colomon | assuming you're in the mood for hunting | ||
jnthn | Well, may be too tired today, but good to have it, as I have more tuits in the next days. | 19:19 | |
raydiak | timotimo: I remember the tooltip sticks, will see if I can smooth that out too...any other smallish ideas for when I get to p6bench today? | ||
timotimo | raydiak: i'm afraid no :( | 19:23 | |
but if you want to write actual benchmarks....? ;) | |||
19:23
Sqirrel joined
|
|||
raydiak | timotimo: good thought...we'll see how inspired I feel after the other things :) | 19:26 | |
colomon | jnthn: gist.github.com/colomon/f181213518aeb5cdacd0 # lines 22 on are key, rest provided for context and for duplicating | ||
jnthn: key showing the bug, I mean | 19:27 | ||
jnthn | uh, wtf... | ||
wow | |||
FROGGS | jnthn: I need to ask again: do you meant that I should throw an unwindexception, or shall I try later to put the payloap of the vmex into the result attribute? | 19:35 | |
colomon: and you get that identical error for a month now? with the same error message? | |||
jnthn | FROGGS: hmmmm | ||
FROGGS: I'm just looking at nqp::control in QAST::Compiler::JAST | 19:36 | ||
colomon | FROGGS: well, the exact number of the opcode might be different. but yes, that message, for sure. | ||
jnthn | It appears it does | ||
$il.append(savesite(JAST::Instruction.new( :op('invokestatic'), $TYPE_OPS, | |||
FROGGS | because in rakudo I'd like to throw normal exceptions... and use setpayload etc | ||
jnthn | 'throwcatdyn_c', 'Void', 'Long', $TYPE_TC ))); | ||
That is, it's already doing a fairly normal throw | |||
FROGGS | colomon: k, thanks | 19:37 | |
jnthn: okay... | |||
jnthn | It just doens't throw an exception object, but only a category | ||
FROGGS | right | ||
jnthn: my code throws an object though | |||
jnthn | public static void throwcatdyn_c(long category, ThreadContext tc) { | ||
ExceptionHandling.handlerDynamic(tc, category, false, null); | |||
} | |||
colomon | FROGGS: the number has changed: irclog.perlgeek.de/perl6/2014-03-01#i_8368338 | ||
jnthn | OK, but point is this seems to be going kinda through the normal exception system | ||
colomon | FROGGS: and I guess it's two months, not one. | 19:38 | |
FROGGS | jnthn: yes, that is what I discovered also | ||
jnthn | So I guess the diference is in the kind of handler | ||
19:39
dwarring joined
|
|||
jnthn | EX_UNWIND_SIMPLE vs others | 19:39 | |
FROGGS | I'd guess that there is a code that take the VMEx, turns it into an UnwindException and runs the @*REGISTER_UNWIND_HANDLERs | 19:40 | |
so if I could put my hands on that bit :o) | |||
19:41
domidumont left
|
|||
jnthn | I see that REGISTER_UNWIND_HANDLER takes a :$ex_obj that means "I'd like to receive the exception object" | 19:41 | |
FROGGS | but okay, I am going to try to follow the exception's path to the handler | ||
hmmm | |||
cool | |||
jnthn | Nothing actualy uses it at present, though. | ||
FROGGS | okay, thank you so far :o) | 19:42 | |
err, o)) even | |||
19:57
cogno joined,
cogno is now known as Guest41736
19:59
virtualsue joined,
hoverboard left
20:01
berekuk joined
20:03
hoverboard joined
20:04
Guest41736 left
20:12
cooper left
|
|||
dalek | ast: e4e3206 | (David Warring [email@hidden.address] | integration/advent2010-day03.t: adding 2010 advent day 3 |
20:13 | |
20:19
raiph left
20:20
Rotwang left
|
|||
masak | 'night, #perl6 | 20:26 | |
FROGGS | gnight masak | 20:31 | |
jnthn: how do I can a smo to a vmex? is that this weird syntax? "[$TYPE_OBJ" | 20:38 | ||
s/can/cast/ | |||
20:38
vendethiel left
|
|||
jnthn | No | 20:39 | |
That means "array of" | |||
FROGGS | ahh | ||
jnthn | checkcast instruction or something like that | ||
20:39
vendethiel joined
|
|||
jnthn | If you mean in bytecode | 20:39 | |
FROGGS | ohh, make sense | ||
checkcast... okay | |||
jnthn | Typically we put something in Ops.java or so and call it and have it do the work, though. | 20:40 | |
20:40
prevost left
|
|||
FROGGS | I see | 20:40 | |
20:51
treehug88 left
|
|||
TimToady | colomon: did you notice that Complex is acting like (Num,Num) rather than (Real,Real)? | 20:52 | |
colomon | TimToady: not sure the context, but I believe that's standard (if not spec) now | ||
for performance reasons. | 20:53 | ||
colomon is not totally happy about this, but Complexes without performance are relatively useless... | |||
TimToady | complex should be used if you want performance | ||
Complex should perhaps be a bit more abstract | 20:54 | ||
FROGGS | m: say complex | ||
camelia | rakudo-moar ebca0e: OUTPUT«===SORRY!=== Error while compiling /tmp/q9z4QVzEwuUndeclared routine: complex used at line 1» | ||
colomon | huh. I like that idea, but don't know what you'd do with i | ||
TimToady | well, it's not a new idea; complex as a native type is kind of all over S02 and S09, which kinda implies that Complex is something else | 20:57 | |
anyway, kinda seems like it was in your bailiwick :) | |||
20:58
Ven left
20:59
lichtkind_ left,
lichtkind left
|
|||
colomon | :) | 21:04 | |
wonder how easy it would be to implement complex by just cut-n-pasting Complex? ;) | |||
21:05
skids left,
iovanna joined
|
|||
FROGGS | colomon: sure, copy it over, then fix Complex to use Real, and perhaps complex to use num? (I dunno the spec though) | 21:05 | |
21:06
iovanna left
|
|||
dalek | ecs: 806f1cc | (Elizabeth Mattijsen)++ | S17-concurrency.pod: Spec Supply.classify slightly differently It now more's a Pair with key value / Supply, so that the receiver of the more has a little more information as to what to do with that Supply. |
21:09 | |
21:10
treehug88 joined
|
|||
dalek | ast: 65fbf45 | (Elizabeth Mattijsen)++ | S17-supply/classify.t: Add tests for Supply.classify |
21:13 | |
21:17
araujo left
21:19
treehug88 left
|
|||
dalek | kudo/nom: 6e359ab | (Elizabeth Mattijsen)++ | src/core/Supply (2 files): Implement Supply.classify |
21:22 | |
kudo/nom: 173a1f0 | (Elizabeth Mattijsen)++ | src/core/Supply.pm: Fix playing paused values once a tap is made |
|||
kudo/nom: bd518ab | (Elizabeth Mattijsen)++ | t/spectest.data: Test Supply.classify and advent2010-03 |
|||
21:23
BenGoldberg joined
21:28
treehug88 joined
21:29
araujo joined
|
|||
jnthn | lizmat: +1 to pair for classify | 21:31 | |
lizmat: I really don't think the "paused" thing in Supply itself can live, so please don't stack too much up on top of it. | 21:32 | ||
21:33
araujo left
|
|||
lizmat | well, without it Supply.classify doesn't make much sense :-( | 21:33 | |
21:33
araujo joined
|
|||
lizmat | and we have race conditions in e.g. crappy useragent | 21:33 | |
I'm not sure of Subjects would help with this | |||
timotimo still doesn't know what Subjects are | 21:35 | ||
jnthn | lizmat: I'm not saying we don't need a solution, I'm saying that I doubt "paused" is the right one. | 21:36 | |
lizmat | well, it's only called "paused" internally now | 21:39 | |
it's just making sure that any "more"s done on a live Supply will be seen by the *first* tap | |||
(and only the first tap) | |||
jnthn | Well, in the case of read_chars, the problem is that it even is a live supply | 21:40 | |
lizmat | that's what I said: a live supply :-) | 21:42 | |
21:42
ajr_ left,
Alula left
|
|||
jnthn | yes, I know, but it probably shouldn't be one, since we want to be able to stop receiving | 21:43 | |
lizmat | but a second tap on that supply would not be guaranteed to see the whole thing, would it ? | ||
21:44
dmol left
|
|||
jnthn | Right. If you really want that, then I think it needs to be made explicit. | 21:45 | |
21:45
Alula joined
|
|||
jnthn | With a .publish equivalent. | 21:45 | |
At present we have no way of doing live -> demand (.replay(...) being an example) and demand -> live (.publish being an example) | |||
lizmat | so, let me get this straight: .publish would be a method on a live Supply, that would a live supply an on demand one? | 21:47 | |
*make | |||
jnthn | No, it'd be a method on a demand supply a live one, but it avoids races by letting you have a change to do any setup work | 21:50 | |
In Rx it works by having a connectable observable | |||
Essentially the pattern is: | |||
my $pub-supply = $some-demand-supply.publish; | |||
$pub-supply.tap(...); | |||
$pub-supply.connect; # Actually does the tap of $some-demand-supply | 21:51 | ||
Not attached to the naming. | |||
tadzik | .tap.tap.tap.penny.tap.tap.tap.penny | ||
21:51
rindolf left
21:55
anaeem1_ left
21:56
virtualsue left
|
|||
lizmat | ah | 21:56 | |
hmmm... | |||
doesn't that really come down to $pub-supply doing buffering ? | 21:58 | ||
jnthn | No, it's just don't tap the underlying thing until the setup is done | 21:59 | |
So you don't "start" it | |||
lizmat | but in the crappy useragent example, there's no way not to start it | 22:00 | |
or the $socket object needs to be buffering ? | |||
I mean, you send the request to the remote server | 22:02 | ||
and it will start coming back at ya, possibly before you have the supply even | |||
jnthn | lizmat: Yes because IO::Socket::Async.read_chars is not done yet! | 22:07 | |
lizmat | hehe ok | ||
jnthn | lizmat: When it is, it'll return a demand supply that starts the reading when you tap it and stops when you close the tap. | ||
lizmat: I just didn't want to re-create that infrastructure in a bunch of places, and we have no equivalent to Rx's Observable.Create yet. | 22:08 | ||
lizmat | and any second tap would be guaranteed to get the same more's ? | ||
jnthn | lizmat: No, a second tap on that is probably a really bad idea...potentially an exception. | 22:09 | |
lizmat | so we have a third type of supply: on demand (repeatable), live (see what you get) and once (you only will get all) | ||
jnthn | The first and third are the same, though. | 22:10 | |
I mean, interval is "only you will get" | |||
.for is "only you will get" | |||
22:10
anaeem1_ joined
|
|||
lizmat | but but, on demand you can have as many taps as you want | 22:10 | |
and each will get the same, no? | 22:11 | ||
jnthn | r: my $iv = Supply.interval(1); $iv.tap({ say 1 }); sleep 0.5; $iv.tap({ say 2 }); | ||
camelia | rakudo-moar ebca0e: OUTPUT«1» | ||
..rakudo-jvm ebca0e: OUTPUT«12» | |||
..rakudo-parrot ebca0e: OUTPUT«None of the parametric role variants for 'Supply' matched the arguments supplied.Cannot call ''; none of these signatures match: in any specialize at gen/parrot/Metamodel.nqp:2262 in any compose at gen/parrot/Metamodel.nqp:2560 in any make…» | |||
jnthn | m: my $iv = Supply.interval(1); $iv.tap({ say 1 }); sleep 0.5; $iv.tap({ say 2 }); sleep 5; | ||
camelia | rakudo-moar ebca0e: OUTPUT«121212121212» | ||
hoelzro | timotimo: are you around? | ||
jnthn | lizmat: Each .tap on a demand supply creates a new timer here. | 22:12 | |
22:12
sftp left
|
|||
lizmat | true, but the sequence for all is the same | 22:12 | |
jnthn | In this particular case, yes. | ||
lizmat | same for "for" | 22:13 | |
jnthn | Right. The point of .create is for cases where it's not the same. | ||
For example, in the twitter stream example | |||
Where you want to observe different topics. | |||
It's a demand supply 'cus you want to be able to establish a connection at the point of tapping, and disconnect later on when that topic is no longer interesting. | 22:14 | ||
22:14
kurahaupo joined
22:15
anaeem1_ left
|
|||
jnthn | But clearly, Twitter.live_feed('bieber') and Twitter.live_feed('goodmusic') are two very differrent sets of data. | 22:15 | |
timotimo | hoelzro: i'm here | ||
hoelzro: just distracted a bit ... watching Warehouse 13 | 22:16 | ||
hoelzro | timotimo: I was wondering if you knew if Python had an equivalent to classify | ||
timotimo | surprisingly excellent show | ||
hold on, i can try to find out | |||
22:16
sftp joined
|
|||
hoelzro | I asked on #python, but no luck =/ | 22:16 | |
timotimo | aye | 22:17 | |
try this: docs.python.org/2/library/itertool...ls.groupby | |||
22:17
jnap left
|
|||
lizmat | jnthn: the twitter example feels like a live feed (unrepeatble) with a .grep on it | 22:17 | |
22:17
sftp left
|
|||
hoelzro | ah ha | 22:17 | |
lizmat | they are different sets of data, yet they're both live | ||
hoelzro | thanks timotimo | ||
timotimo | i'm not sure how close it comes | 22:18 | |
hoelzro | well, it's pretty close | ||
lizmat | jnthn: but anyway, going to take in what you said | ||
and sleep on it a bit | |||
jnthn | lizmat: In reality you can't actually do it that way (even if it'd be cute) | ||
lizmat: 'cus then you'd be receiving every single tweet over the network and discarding almost all of them. | 22:19 | ||
hoelzro | the data need to be sorted? boooo | ||
lizmat | jnthn: if the selection part is actually part of the URL, then I would consider them completely separate supplies anyway | ||
dalek | ast: d269628 | (Elizabeth Mattijsen)++ | S17-supply/classify.t: Also test Supply.classify(%mapper) |
22:20 | |
22:23
jnap joined
|
|||
lizmat | gnight, #perl6! | 22:23 | |
jnthn | 'night, lizmat | ||
22:24
treehug88 left,
denis_boyun_ joined
22:26
xiaomiao joined
22:36
sftp joined
22:40
rurban left
22:41
cognominal__ left,
cognominal__ joined
22:46
denis_boyun_ left
22:50
rurban joined
22:52
skids joined
22:57
eMBee left,
eMBee joined
|
|||
BenGoldberg | m: my $iv = Supply.interval(1); $iv.tap({ say @_ }); sleep 5; | 23:02 | |
camelia | rakudo-moar bd518a: OUTPUT«012345» | ||
BenGoldberg | m: my $iv = Supply.interval(1); $iv.tap({ say 'a:', @_ }); sleep .5; $iv.tap({ say 'b:', @_ }); sleep 5; | ||
camelia | rakudo-moar bd518a: OUTPUT«a:0b:0a:1b:1a:2b:2a:3b:3a:4b:4a:5b:» | ||
BenGoldberg | m: my $iv = Supply.interval(1); $iv.tap({ say 'a:', @_ }); sleep 2.5; $iv.tap({ say 'b:', @_ }); sleep 2.6; | 23:03 | |
camelia | rakudo-moar bd518a: OUTPUT«a:0a:1a:2b:0a:3b:1a:4b:2a:5» | ||
23:07
btyler_ left
23:10
xenoterracide left
23:12
rurban left
23:14
hoverboard left
23:15
telex left
23:16
telex joined
23:18
bluescreen100 left
23:27
klapperl left
23:28
klapperl joined
23:34
pippo joined
23:39
kurahaupo left
23:42
eternaleye left
23:43
eternaleye joined
23:47
lvfjf joined
23:50
kurahaupo joined
23:58
anaeem1 joined,
xragnar_ joined,
xragnar is now known as Guest27600,
xragnar_ is now known as xragnar
|
|||
skids | gist.github.com/skids/618713daedac57e8ca67 | 23:59 |