»ö« 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:06
itaipu left
|
|||
dalek | osystem: b427f5f | (Zoffix Znet)++ | META.list: Add CoreHackers::Sourcery Show source locations of core methods and subs: github.com/zoffixznet/perl6-CoreHa...s-Sourcery |
00:07 | |
Zoffix | New blog post "Perl 6 Core Hacking: Where's Da Sauce, Boss?": perl6.party/post/Perl-6-Core-Hackin...Sauce-Boss | 00:08 | |
harmil_wk, ^ the module and post might be of interest to you. | |||
00:11
kurahaupo left
00:12
margeas left
00:20
canopus left
|
|||
awwaiid | The ICFP Contest has begun! icfpc2016.blogspot.jp/ | 00:22 | |
00:24
sufrostico left
00:27
canopus joined
00:33
Actualeyes joined
00:34
freezerburnv_ joined
00:38
freezerburnv left
00:47
Rawriful left
00:59
sena_kun left
01:05
itaipu joined
01:07
BenGoldberg left
01:10
BenGoldberg joined
01:16
labster left
01:26
AlexDaniel joined
01:33
bjz left
|
|||
MasterDuke | AlexDaniel: i just tried to install Inline::Perl5, but got '/usr/bin/ld: cannot find -lperl' | 01:35 | |
01:42
labster joined
01:43
kalkin- left,
kalkin-_ joined
|
|||
AlexDaniel | ↑ fixed ;) | 01:44 | |
01:48
BenGoldberg left,
BenGoldberg joined
01:50
cibs left
01:52
cibs joined
01:57
ShimmerFairy joined
02:06
pierre_ left
|
|||
Xliff | m: $a = 'aaa'; $a ~~ s:g/a/b/; say $a; | 02:22 | |
camelia | rakudo-moar 552d9c: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Variable '$a' is not declaredat <tmp>:1------> 3<BOL>7⏏5$a = 'aaa'; $a ~~ s:g/a/b/; say $a;» | ||
Xliff | m: my $a = 'aaa'; $a ~~ s:g/a/b/; say $a; | ||
camelia | rakudo-moar 552d9c: OUTPUT«bbb» | ||
02:27
cdg joined
02:30
noganex_ joined
|
|||
Xliff | m: $a = 'aaa'; $a ~~ s/a/b/h; say $a; | 02:30 | |
camelia | rakudo-moar 552d9c: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Variable '$a' is not declaredat <tmp>:1------> 3<BOL>7⏏5$a = 'aaa'; $a ~~ s/a/b/h; say $a;» | ||
Xliff | m: $a = 'aaa'; $a ~~ s/a/b/g; say $a; | ||
camelia | rakudo-moar 552d9c: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Variable '$a' is not declaredat <tmp>:1------> 3<BOL>7⏏5$a = 'aaa'; $a ~~ s/a/b/g; say $a;» | ||
Xliff | m: my $a = 'aaa'; $a ~~ s/a/b/g; say $a; | ||
camelia | rakudo-moar 552d9c: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Unsupported use of /g; in Perl 6 please use :gat <tmp>:1------> 3my $a = 'aaa'; $a ~~ s/a/b/g7⏏5; say $a;» | ||
Xliff | Hrm. | ||
m: my $a = 'aaa'; $a = $a.subst(/a/, 'b'); say $a; | 02:31 | ||
camelia | rakudo-moar 552d9c: OUTPUT«baa» | ||
Zoffix | m: my $a = 'aaa'; $a = $a.subst(/a/, 'b', :g); say $a; | ||
camelia | rakudo-moar 552d9c: OUTPUT«bbb» | ||
Zoffix | m: my $a = 'aaa'; $a ~~ s:g/a/b/; say $a; | ||
camelia | rakudo-moar 552d9c: OUTPUT«bbb» | ||
Xliff | m: my $a = 'aaa'; $a.=subst(/a/, 'b', :g); say $a; | 02:32 | |
camelia | rakudo-moar 552d9c: OUTPUT«bbb» | ||
02:32
noganex left
|
|||
Zoffix | m: my $a = 'aaa'; $a = $a.trans('a' => 'b'); say $a; | 02:33 | |
camelia | rakudo-moar 552d9c: OUTPUT«bbb» | ||
Zoffix | m: my $a = 'aaa'; $a ~~ tr/a/b/; say $a; | ||
camelia | rakudo-moar 552d9c: OUTPUT«bbb» | ||
02:33
wamba joined
|
|||
skids | m: my $b = 'aaa'; my $a = $b ~~ S:g/a/b; say $b; say $a; | 02:34 | |
camelia | rakudo-moar 552d9c: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Cannot use variable $a in declaration to initialize itselfat <tmp>:1------> 3a'; my $a = $b ~~ S:g/a/b; say $b; say $7⏏5a; expecting any of: postfix term» | ||
skids | m: my $b = 'aaa'; my $a = ($b ~~ S:g/a/b); say $b; say $a; | ||
camelia | rakudo-moar 552d9c: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Cannot use variable $a in declaration to initialize itselfat <tmp>:1------> 3; my $a = ($b ~~ S:g/a/b); say $b; say $7⏏5a; expecting any of: postfix term» | ||
skids | :/ | 02:35 | |
m: my $b = 'aaa'; my $a; $a = ($b ~~ S:g/a/b); say $b; say $a; | |||
camelia | rakudo-moar 552d9c: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Malformed replacement part; couldn't find final /at <tmp>:1------> 3a; $a = ($b ~~ S:g/a/b); say $b; say $a;7⏏5<EOL> expecting any of: postfix» | ||
skids | oh. | ||
m: my $b = 'aaa'; my $a = $b ~~ S:g/a/b/; say $b; say $a; | |||
camelia | rakudo-moar 552d9c: OUTPUT«Potential difficulties: Smartmatch with S/// is not useful. You can use given instead: S/// given $foo at <tmp>:1 ------> 3my $b = 'aaa'; my $a = $b ~~ 7⏏5S:g/a/b/; say $b; say $a;aaaFalse» | ||
skids | m: my $b = "aaa"; my $a = S:g/a/b/ given $b; say $b; say $a; | 02:37 | |
camelia | rakudo-moar 552d9c: OUTPUT«aaabbb» | ||
skids | there we go. | ||
02:38
freezerburnv joined
02:39
kid51 left
02:41
freezerburnv_ left
|
|||
MasterDuke | m: my $b = "aaa"; (my $a = $b) ~~ s:g/a/b/; say $b; say $a; | 02:41 | |
camelia | rakudo-moar 552d9c: OUTPUT«aaabbb» | ||
MasterDuke | skids: ^^^ is that the same thing you were trying to do? | 02:42 | |
skids | I was just riffing off the previous stuff to demonstrate S///. | 02:43 | |
konobi | ullo | 02:45 | |
MasterDuke | anybody here used Inline::Perl5 much? | 02:48 | |
i have 'use Chart::Gnuplot:from<Perl5>;' | |||
'my $chart = Chart::Gnuplot.new(<...>)' works | 02:49 | ||
but then 'my $dataSet = Chart::Gnuplot::DataSet.new(<...>) | |||
gives "Could not find symbol '&DataSet'" | |||
and i tried, 'use Chart::Gnuplot::DataSet:from<Perl5>;', but that just gave "Can't locate Chart/Gnuplot/DataSet.pm in @INC" | 02:54 | ||
skids | Hrm. I wonder if that's a generic problem with p5 files that contain multiple packages. | 03:04 | |
Unfortunately using "import" doesn't help. | |||
03:06
pierre_ joined
|
|||
skids | Weird. If you ".say for ::Chart::Gnuplot::" DataSet is not there, but there's a class "Grepper" and that string does not appear inside rgrep Grepper /usr/share/perl5/Chart/. Or even all of /usr/share/perl5 | 03:09 | |
03:12
cdg left,
cdg joined
|
|||
skids | Something in Inline::Perl5 or rakudo is going off the rails wth that file. Grepper is an Any-iterable role that is somhow getting punned in there. | 03:12 | |
Unfortinately I really can't stay up to hunt that down. | 03:13 | ||
03:13
khw left
03:17
cdg left
|
|||
skids | MasterDuke: maybe as a temporary workaround see if you can split DataSet code out to its own Gnuplot/DataSet.pm file. | 03:19 | |
MasterDuke | skids: yeah, thought about that, will give it a try | ||
weird about that Grepper thing though | 03:20 | ||
skids | my bet is a leftover GLR-induced buglet. | 03:22 | |
03:27
freezerburnv left
03:33
wamba left
03:39
kurahaupo joined
03:55
bob777 left
04:04
bob777 joined
04:05
skids left
04:06
BenGoldberg left
04:13
Actualeyes left
04:16
Actualeyes joined,
golee joined
|
|||
awwaiid | ok, I apparently don't know how to do simple things | 04:22 | |
m: module Foo { sub hi { say "hi" } } ; Foo::hi | |||
camelia | rakudo-moar 552d9c: OUTPUT«Could not find symbol '&hi' in block <unit> at <tmp> line 1Actually thrown at: in block <unit> at <tmp> line 1» | ||
04:28
pierre_ left
04:29
avenj left
04:37
Cabanossi left
04:38
Cabanossi joined,
mcmillhj joined
04:42
golee left
04:44
mcmillhj left,
avenj joined,
avenj left,
avenj joined
04:46
kurahaupo left
|
|||
llfourn | awwaiid: you want "our sub hi" | 04:48 | |
awwaiid | our! | 04:49 | |
by default they are 'my' ? | |||
llfourn | yes :) | ||
04:52
pierre_ joined
|
|||
awwaiid | I'm trying to write a grammar where the first line has an integer count and then I read that number of lines for another rule | 05:03 | |
fancy wya to do that? | |||
like rule { <count> <data>{$count} } | 05:06 | ||
05:06
PapaChub left
|
|||
llfourn | m: say "aaa" ~~ /a ** {1 + 2}/ # seems to work | 05:11 | |
camelia | rakudo-moar 552d9c: OUTPUT«「aaa」» | ||
llfourn | awwaiid: ^^ | ||
awwaiid | m: "3 a b c " ~~ / $<count>=\d+ <ws> [\w+ <ws>] ** {$count} / | 05:12 | |
camelia | rakudo-moar 552d9c: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Variable '$count' is not declaredat <tmp>:1------> 3" ~~ / $<count>=\d+ <ws> [\w+ <ws>] ** {7⏏5$count} /» | ||
awwaiid | m: "3 a b c " ~~ / $<count>=\d+ <ws> [\w+ <ws>] ** {$/<count>} / | ||
camelia | ( no output ) | ||
awwaiid | m: ("3 a b c " ~~ / $<count>=\d+ <ws> [\w+ <ws>] ** {$/<count>} /).say | 05:13 | |
camelia | rakudo-moar 552d9c: OUTPUT«「3 a b c 」 count => 「3」 ws => 「 」 ws => 「 」 ws => 「 」 ws => 「 」» | ||
awwaiid | hm! | ||
llfourn | looks good :) | ||
awwaiid wonders if rules can take a parameter | 05:14 | ||
llfourn | they can :) | ||
05:14
M-Illandan left,
tadzik left,
Matthew[m] left
|
|||
AlexDaniel | m: ("3 a b c " ~~ / $<count>=\d+ <.ws> [\w+ <.ws>] ** {$/<count>} /).say | 05:16 | |
camelia | rakudo-moar 552d9c: OUTPUT«「3 a b c 」 count => 「3」» | ||
05:22
pierre_ left
05:36
_28_ria left
05:53
golee joined
05:55
golee left
05:57
tadzik joined
05:59
MilkmanDan left
|
|||
llfourn | m: my $a = "bar"; (with $a { $_ }) = "foo"; say $a # works | 06:00 | |
camelia | rakudo-moar 552d9c: OUTPUT«foo» | ||
llfourn | m: my $a = "bar"; ($_ with $a) = "foo"; say $a # doesn't | ||
camelia | rakudo-moar 552d9c: OUTPUT«Cannot modify an immutable Str in block <unit> at <tmp> line 1» | ||
llfourn | anyone know if this is itended? | ||
intended* | 06:01 | ||
06:04
golee joined
|
|||
llfourn goes to RT | 06:06 | ||
06:08
mohae_ joined
06:10
mohae left
06:20
firstdayonthejob joined
06:23
M-Illandan joined
06:24
Matthew[m] joined
06:38
NEveD left
06:43
firstdayonthejob left
06:51
darutoko joined
07:10
sno left
07:24
ufobat joined
07:26
bjz joined
|
|||
ufobat | good morning :) | 07:31 | |
07:47
zakharyas joined
07:58
sno joined,
RabidGravy joined
08:05
ribasushi left
08:07
pierre_ joined
08:13
ribasushi joined
08:26
pierre_ left
08:31
telex left
08:32
telex joined
08:35
espadrine joined
|
|||
ufobat | what is this: Unhandled exception in code scheduled on thread 7 | 08:36 | |
getexpayload needs a VMException | |||
in any at /home/martin/.rakudobrew/moar-2016.07.1/install/share/perl6/runtime/CORE.setting.moarvm line 1 | |||
08:37
pierre_ joined
|
|||
timotimo | is your everything up to date? | 08:39 | |
ufobat | This is Rakudo version 2016.07.1 built on MoarVM version 2016.07 | ||
i think so | |||
timotimo | OK, could have been your moar and rakudo weren't compiled for the same version of things | 08:40 | |
well, can you golf it? :) | |||
ufobat | i tried to golf my segfault from yesterday | 08:41 | |
so far its not a tiny piece of code :/ gist.github.com/ufobat/fedd964bb83...0bd9296e20 | |||
timotimo | ah, i seem to recall you said something about supplies and such | 08:42 | |
ufobat | i am starting 8 times per sec: nc -w 1 localhost 3000 & | ||
timotimo | there's been stability fixes for async stuff recently | 08:43 | |
ufobat | if i start 30 netcats per sec it seems that my code deadlocks. at least nothing is happening anymore | ||
timotimo | you should perhaps grab latest versions out of git for moar, nqp, and rakudo | ||
ufobat | hm okay :) | ||
i will do so after my vacation in sweden :-) | 08:44 | ||
timotimo | oh | ||
OK! | |||
aha, it stopped for me | 08:45 | ||
ufobat | for more then 8 connections in parallel? | ||
timotimo | for some reason it went up to Thread<19> | ||
if you could give me a command that'll do the 8 connections in parallel, that'd be nice %) | 08:46 | ||
because how do i even loops in fish | |||
08:46
Actualeyes left
|
|||
timotimo | i ran them pretty much serially | 08:46 | |
ufobat | while true; do; sleep 1, nc -w 1 localhost 3000 &; nc -w 1 localhost 3000 &; nc -w 1 localhost 3000 &; ......; done | ||
-w 1 is a timeout of 1 sec, so the number of nc == number of parallel connections | 08:47 | ||
timotimo | it's like the threads don't get unblocked | 08:48 | |
08:48
Actualeyes joined
|
|||
timotimo | there's a terrible mistake in your code! | 08:48 | |
ufobat | whats wrong? | ||
timotimo | it should read "$*THREAD closing client connection ", not "$*THREAD closing cient connection " | 08:49 | |
i never get any of those outputs, btw | |||
i think LAST may not be the right phaser there? | |||
ufobat | hmm | 08:50 | |
when i connect with a broser to localhost 3000 and push relaod quite a while i get a | |||
timotimo | hm, doc says LAST is right, and QUIT is also a thing you should have | ||
ufobat | i get a closing client connection, and somethings i get a idk "can't close a closed connection" | 08:51 | |
sometimes | |||
timotimo | well, browsers will also do keepalive unless you tell them not to | ||
that complicates things, definitely | |||
ufobat | Thread<19>(<anon>) closing cient connection IO::Socket::Async.new | 08:52 | |
Unhandled exception: cannot close a closed socket | |||
and thry catch dosnt catch it :( | |||
timotimo | could be you aren't (or can't be) in the right dynamic scope to catch that exception | 08:53 | |
i.e. could be rakudo core code tries to do that and doesn't handle "cannot close closed code" | |||
can you use --ll-exception to get more details? | |||
08:55
trnh joined,
trnh left,
trnh joined
|
|||
ufobat | doesn't work | 08:55 | |
i dont get any details | |||
timotimo | hm, OK | ||
oh, that close thing is inside your try/catch | 08:56 | ||
weird. | |||
so what if you don't $conn.close? | |||
AlexDaniel | Comments needed: github.com/perl6/doc/pull/632 | 09:00 | |
ufobat | if i dont close it, echo on the cli works fine with nc localhost 3000 | 09:02 | |
but i dont see the http get request as a reply in my browser.. | |||
then the only thing thats happening is the "deadlock" when i use 20 or more connections in parallel | 09:03 | ||
timotimo | on my end, the event loop for responses never terminates | ||
hm, or ... maybe it does? | |||
time to move the stuff onto its own workspace, so i have more than just half a single monitor for all of it | 09:06 | ||
ah, i was misreading the handle_conn the entire time | 09:07 | ||
oh my, all the nc processes are still running | 09:09 | ||
09:10
kid51 joined
|
|||
timotimo | well, all i can say is your code looks, at first glance, as if it shouldn't be blocking threads | 09:11 | |
however, it seems like there's an await inside of REACT | 09:13 | ||
and that's where all those threads are blocked | |||
ufobat | how come your netcats didnt terminate? | ||
timotimo | dunno | ||
but also killall isn't enough, i have to killall -KILL | 09:14 | ||
ufobat | hmm | ||
timotimo | oh | ||
ufobat | thanks for your help timotimo :) but now its time for vacation :) | ||
timotimo | duh | ||
react does block the thread for you | |||
because of course it does | 09:15 | ||
that's what you use react for | |||
instead of supply | |||
so instead of that i suppose you'd want to keep supplies you've created around in some list and make sure they get handled properly when they terminate, and such | |||
REACT is quite literally SUPPLY + await | 09:16 | ||
and await doesn't free up the thread for the threadpool yet; that's a 6.d feature | |||
ufobat | AH ! | ||
i see | |||
timotimo | if i liked coffee, now would be the right time to start drinking it | 09:17 | |
09:17
rindolf joined
|
|||
ufobat | so then i assume everything would work fine, which means that golfing the segfault didnt work :/ | 09:17 | |
timotimo | ah, probably. i'll try the supply-instead-of-react-thing and see if i can get it to segv | 09:18 | |
09:18
xinming_ joined
|
|||
ufobat | but i think i am understanding async programming a bit better now :-) thanks timotimo :) | 09:18 | |
timotimo | yay | ||
i haven't done much with supply or react at all, so it was a good exercise for me | |||
ufobat | if you're interested how my segfault is reproduced: rt.perl.org/Public/Bug/Display.html?id=128839 | 09:19 | |
timotimo | well, now i have only 3 threads active | ||
09:20
e163 joined
|
|||
timotimo | but as i said, it could just be that recent stability fixes by jnthn would prevent this segfault entirely | 09:21 | |
09:21
xinming left,
e163 left
|
|||
ufobat | would you how me how you handle the supplies now? | 09:23 | |
timotimo | i just replaced react with supply inside the $p_reply.then, and added a .then({ $_.tap({ say "dummy" }); @supplies.push($_) }) | 09:25 | |
i'm not sure if that's thread-safe, actually | |||
just pushing it | |||
would be better to feed it into a channel | |||
09:27
kid511 joined
09:28
kid51 left
09:30
jkramer left
|
|||
ufobat | mhmm | 09:31 | |
timotimo | i'm only keeping them around in a variable so it isn't considered garbage, but i think that's unnecessary anyway | ||
09:38
triholyghost joined
09:46
margeas joined
09:53
thomas left,
trnh left
|
|||
Ulti | you get LAST and QUIT on a whenever block is there any reason for no FIRST? | 09:56 | |
09:59
TEttinger left
|
|||
literal | isn't there? | 10:01 | |
docs.perl6.org/language/phasers#Loop_Phasers | |||
Ulti | nope | 10:02 | |
10:02
Actualeyes left
|
|||
Ulti | or at least it doesn't appear to actually execute | 10:02 | |
no error at all it just doesn't work | |||
literal | m: for 1..3 { FIRST { print "bar" }; print "foo" } | 10:03 | |
camelia | rakudo-moar 552d9c: OUTPUT«barfoofoofoo» | ||
timotimo | that's not a whenever block :) | ||
literal | yeah, FIRST is a loop phaser | 10:04 | |
you might want ENTER | |||
timotimo | but ENTER fires on every enter | ||
whenevers are loop-like | |||
dalek | ateverable: 998ae02 | (Aleks-Daniel Jakimenko-Aleksejev)++ | Bisectable.p6: Perl 6 rewrite of bisectable Everything looks fine. It does segfault sometimes, but it is most likely not our fault. |
||
10:05
triholyghost left
10:15
NEveD joined
10:16
danaj left
10:17
pierre_ left
10:18
lambd0x joined
|
|||
lambd0x | Hi everyone! | 10:18 | |
RabidGravy | erp | 10:19 | |
lambd0x | How can I search for a key in an array of hashes? | ||
first time working with them...sorry it's a dumb question :P | 10:20 | ||
nine | Something like @hashes.grep: { $_<yourkey>:exists }? | 10:22 | |
10:24
Actualeyes joined
|
|||
Ulti | literal yeah as timotimo says ENTER is every time something is called not the first time | 10:26 | |
10:27
movl left
|
|||
AlexDaniel | lambd0x: if you are going to do lots of such lookups, perhaps consider creating one big hash for that | 10:28 | |
m: my %a = <a 1 b 2 c 3>; my %b = <x 7 y 8 z 9>; %a.append(%b); say %a<y> # or something | |||
camelia | rakudo-moar 552d9c: OUTPUT«8» | ||
Zoffix | m: my @hashes = %(<a 1 b 2 c 3>), %(<x 7 y 8 z 9>); say @hashes.map({.<y>:v}).grep: *.elems | 10:34 | |
camelia | rakudo-moar 552d9c: OUTPUT«(8)» | ||
lambd0x | nine: I'll try that... was unsure this would work with hashes since they do with arrays | 10:35 | |
Zoffix | Kinda dissapointing this ain't working: | ||
m: my @hashes = %(<a 1 b 2 c 3>), %(<x 7 y 8 z 9>); say @hashes».<y>:v | |||
camelia | rakudo-moar 552d9c: OUTPUT«Unexpected named parameter 'v' passed in block <unit> at <tmp> line 1» | ||
lambd0x | AlexDaniel: What is the best way of creating a list of hashes that might get big? | 10:36 | |
my @hash? my %hash? just their syntax differs or something else does too? | 10:37 | ||
gregf_ | i guess it should be O(1) - best case , or O(n) worst case? | ||
10:38
AlexDaniel left
|
|||
lambd0x | I know their proper parameters in the @array case to use it as a @hash already...just am unsure how to use hash type :D | 10:38 | |
nine | lambd0x: seems to me like you would benefit from describing your problem instead of asking about a tiny part of the solution? | ||
lambd0x | gregf_: better yes. | ||
gregf_ | my @hashes = %(<a 1 b 2 c 3>), %(<x 7 y 8 z 9>); @hashes.first: ->$h { $h<$key>:exists } | 10:39 | |
prolly ;) # not sure its valid :| | |||
Zoffix | gregf_, but this and nine's solutions just find the first hash with the key, not the actual value of the key. | 10:40 | |
lambd0x | nine: My problem is that I come from C programming and I never worked before with hash type. Wanted to know how to proper work with them... :P | ||
moritz | m: my @hashes = %(<a 1 b 2 c 3>), %(<x 7 y 8 z 9>); say @hashes.first: ->$h { $h<x>:exists } | 10:41 | |
camelia | rakudo-moar 552d9c: OUTPUT«{x => 7, y => 8, z => 9}» | ||
gregf_ | Zoffix: yeah, your .elems sounds perfect | ||
moritz | gregf_: the only problem is $h<$key>, which needs to be $h{$key} or $h<literal_key> | ||
gregf_ | moritz: yep, you got it :) | 10:42 | |
nine | lambd0x: ok....so something in between would be good :) What is your array of hashes supposed to solve? What do you use it for? What do you want to store in it? | ||
lambd0x | nine: ahahah | 10:43 | |
Ok I'm trying to understand how to store a indefinite series of integers in some way and report by the end of it what was the number of ocurrences of the last int...suposed a hash would be good key as a number and value as the amount of times each key appeared during exec. | 10:45 | ||
But I was asking bits of questions for I wanted to figure out it on my own :). But didn't know really how to use hash type yet. :) | 10:46 | ||
Zoffix | labster, a Bag or BagHash would be a better choice | ||
m: say bag "A quick brown fox jumped over a lazy dog".comb | |||
camelia | rakudo-moar 552d9c: OUTPUT«bag(a(2), p, n, k, (8), l, r(2), c, g, q, b, j, x, e(2), m, i, y, v, w, u(2), A, z, d(2), f, o(4))» | ||
lambd0x | Zoffix: ahah, Bag stands for that exactly? | 10:47 | |
Zoffix | docs.perl6.org/language/setbagmix | ||
Don't think it stands for anything... well... other than real life bags maybe? :) | |||
lambd0x | I know, was refering to the argument type after the bag call... | 10:49 | |
Oh, well I have a lot to learn yet hahaah | 10:50 | ||
10:50
labster left
|
|||
lambd0x | Thanks guys, will read about what you all just said and try again :) | 10:51 | |
10:52
kaare_ joined
10:56
rindolf left
11:01
kurahaupo joined
|
|||
dalek | line-Perl5: 62d7a43 | niner++ | / (3 files): Try to make installation on Windows possible |
11:02 | |
line-Perl5: d65d956 | niner++ | META.info: Version 0.8 |
|||
11:07
noreem joined
11:13
holyghostoo joined
11:14
dalek left
11:18
NEveD left
11:33
sena_kun joined
11:35
holyghostoo left
11:54
tbrowder joined
|
|||
tbrowder | another possible p6 marketing project: API support for backendless.com | 11:56 | |
12:00
pmurias joined
|
|||
pmurias | hi | 12:00 | |
tbrowder | hi, pmurias | 12:05 | |
Woodi | o/ | 12:06 | |
vcv | \o | ||
12:09
xfix left
|
|||
unmatched} | "Backendless Platform: The Platform is a productivity machine, a fine-tuned engine with well-integrated components designed to make you feel in empowered"... ahh, bless you marketing boardroom meetings that always produce non-descriptive nonsense. | 12:12 | |
tbrowder: so what is it? | 12:15 | ||
DrForr | Buzzword buzzkill? | ||
unmatched} | Seems to be. I've been on that website for 7 minutes already and still don't know wtf this is... well, other than a "fine-tuned engine" that they mention several times :) | 12:16 | |
DrForr | Something to do with the new "serverless" stuff, I'm guessing? | 12:17 | |
12:17
rindolf joined
|
|||
unmatched} | Seems something to do with mobile apps. | 12:18 | |
unmatched} hits the "close" button on the browser window | |||
12:19
xfix joined,
wamba joined
|
|||
llfourn | m: say Array[Int] ~~ Array[Int]; say Array[Int] ~~ Positional[Numeric]; say Array[Int] ~~ Array[Numeric]; | 12:22 | |
camelia | rakudo-moar 552d9c: OUTPUT«TrueTrueFalse» | ||
llfourn | ^bug? | ||
12:23
canopus left
|
|||
llfourn | m: say Positional[Int] ~~ Positional[Numeric] | 12:23 | |
camelia | rakudo-moar 552d9c: OUTPUT«True» | ||
tbrowder | I first heard about it this morning in a DZONE article about RESTful interfaces, etc. I looked briefly at the site and saw interesting things like free storage up to 20 Gb, free tier of restful dervices, etc. for developing mobile apps. They have several languages supported, no Perl of any kind, and no hint of the possibility of adding it. Just saying it's | ||
worth investigating... | |||
unmatched} | m: say Positional[Numeric] ~~ Positional[Int] | 12:24 | |
camelia | rakudo-moar 552d9c: OUTPUT«False» | ||
mst | kinda firebase like | ||
12:24
atta left
|
|||
nine | tbrowder: do you have any idea what the website is acutally offering? I'm in unmatched}'s camp with having no clue after reading the website. | 12:25 | |
tbrowder | If we want to get p6 being used by the world, someone has to start providing hooks that will interest devs that want to make money. | ||
nine: Not exactly, but there are people here who I am sure can see its promise. | 12:26 | ||
mst | oh gods please let's not go that route | ||
llfourn | isn't the point of restful interfaces that they are language agnostic? | ||
mst | tbrowder: you want to build stuff? build stuff | 12:27 | |
tbrowder: talk about it. show people shiny things. | |||
tbrowder: unmatched} is doing more marketing for perl6 than any amount of your navel gazing "we should support X" discussion will achieve | |||
if you think backendless is a good target, go build support for it | |||
then write some nice blog posts | |||
maybe explain it to unmatched} so he writes some nice blog posts too | |||
unmatched} | meh :) | 12:28 | |
12:28
pierre_ joined
|
|||
mst | but "someone has to start" just smacks of "I want somebody else to volunteer to do this thing" | 12:28 | |
and that ain't how -Ofun works | |||
tbrowder | mst: my only audience is here and just hope to spark some interest | ||
mst | tbrowder: so spark interest by writing something | 12:29 | |
not by telling other people how to spend their spare time | |||
this sort of "somebody else should volunteer to do X because marketing" thing never goes anywhere useful; | |||
12:29
canopus joined
|
|||
tbrowder | don't shoot the messenger, please | 12:29 | |
mst | also, "because marketing" is a shitty motivation | ||
what | |||
I'm sorry, you said "someone has to start" on behalf of somebody else? | 12:30 | ||
DrForr | Shrug, you've mentioned it. It's not going to go very far until there's a decent ... RPC? web server is up and running, I'm guessing? | 12:34 | |
Woodi would realy like to see W3 forum done in Perl6... | 12:37 | ||
about serverless: they are interesting ay of selling computation power :) probably that's why they do not sell C functions calls... | 12:39 | ||
El_Che | DrForr: I saw you on television today and you were wearing your best suit! | 12:41 | |
DrForr | Uh? :) | ||
El_Che | DrForr: the oscon video's are on o'reilly's safari | ||
DrForr | Oh, I thought it was only for OSCON attendees. | 12:42 | |
El_Che | DrForr: no, you can wait for your big royalty check once it hits the videostores :) | ||
DrForr: it's available for safari subscribers | 12:43 | ||
DrForr | Neato. | ||
El_Che | DrForr: www.safaribooksonline.com/library/...491968321/ | 12:44 | |
Release Date: July 2016 | |||
brandnew | |||
DrForr | Hrm, I have a free Safari account... | ||
12:47
lichtkind_ joined,
edwinsage joined
|
|||
El_Che | DrForr: is that an oscon perk? | 12:47 | |
DrForr | Yep. | ||
El_Che | nice | ||
12:48
lichtkind__ left
|
|||
perlpilot | Zoffix++ nice post | 12:55 | |
moritz | can anybody still log in on hack.p6c.org? | 12:59 | |
unmatched} | moritz: nope. ssh hack.p6c.org just sits there | 13:00 | |
13:01
sergot left,
dalek joined,
ChanServ sets mode: +v dalek,
Begi left
|
|||
moritz | ok, rebooted | 13:01 | |
13:01
synopsebot6 left,
synopsebot6 joined
|
|||
RabidGravy | I don't suppose any one knows Maurice Aubrey (CPAN author)? I want to blag the C part of his DoubleMetaphone module ;-) | 13:02 | |
13:05
gnull joined
13:06
parabolize left
13:10
mcmillhj joined
13:14
Sgeo__ left
|
|||
pmurias | tbrowder: isn't backendless intended to replace the backend? | 13:15 | |
tbrowder: an as such Perl 6 API to it wouldn't be that usefull | 13:16 | ||
tbrowder | maybe, but I haven't looked into it deeper yet; I will sign up for a free account and see if a p6 interface is possible according to their policies | 13:17 | |
unmatched} | tbrowder++ | 13:19 | |
tbrowder | and I can't answer about the value, I just want p6 available wherever I see collections of language-specific APIs | ||
13:21
parabolize joined
|
|||
pmurias | tbrowder: there is a REST API | 13:23 | |
having APIs to stuff is good. You never know where someone else will decide to store the data you need ;) | 13:24 | ||
tbrowder | BTW, on my TODO list is working on a p6 interface to the Lego robot (EV3). See the empty repo at github.com/tbrowder/ev3dev-lang-perl6. I'll be happy to give commit priv to anyone who wants to help. It will be some time before I can start on it. | 13:25 | |
pmurias: I saw that but I couldn't see low-level access to files and such which I think one needs for complete use of their system. The other langs seem to have that. | 13:27 | ||
13:28
noreem_ joined
13:30
noreem left
|
|||
literal | m: my $foo = bag <0 0 2 2 4 5 7 7>; say $foo.map({.key if .value == 2}); say $foo.grep({.value == 2}, :k); | 13:30 | |
camelia | rakudo-moar 552d9c: OUTPUT«(0 7 2)(1 2 3)» | ||
literal | so, how am I misunderstanding grep() here? :P | ||
13:31
espadrine left
|
|||
unmatched} | literal: you're making the assumption that :k gives you the .key | 13:32 | |
literal | oh, so it's just an index | 13:33 | |
unmatched} | ":k Only return the index values of the matching elements in order." (from docs.perl6.org/routine/grep ) | ||
literal | maybe it should have been called :i and :iv :P | ||
unmatched} | It comes from .kv | 13:34 | |
13:34
perlawhirl joined
13:35
skids joined
|
|||
perlawhirl | hi perlers... it's been a while | 13:36 | |
13:36
holyghost left
|
|||
unmatched} | m: my $foo = bag <0 0 2 2 4 5 7 7>; say $foo.categorize(*.value){2} | 13:36 | |
camelia | rakudo-moar 552d9c: OUTPUT«[0 => 2 7 => 2 2 => 2]» | ||
unmatched} | m: my $foo = bag <0 0 2 2 4 5 7 7>; say $foo.categorize(*.value){2}.keys | ||
camelia | rakudo-moar 552d9c: OUTPUT«0..2» | ||
unmatched} | m: my $foo = bag <0 0 2 2 4 5 7 7>; say eager $foo.categorize(*.value){2}.keys | 13:37 | |
camelia | rakudo-moar 552d9c: OUTPUT«(0 1 2)» | ||
unmatched} | oh | ||
m: my $foo = bag <0 0 2 2 4 5 7 7>; say $foo.categorize(*.value){2}».key | |||
camelia | rakudo-moar 552d9c: OUTPUT«[0 7 2]» | ||
unmatched} | there we go | ||
13:38
FROGGS joined
|
|||
pmurias | tbrowder: what do you mean by low level access to files? | 13:38 | |
tbrowder | I meant access to files--I shouldn't have said "low level." | 13:39 | |
unmatched} | m: my $foo = bag <0 0 2 2 4 5 7 7>; say $foo.map({.key if .value == 2}); say $foo.grep(*.value == 2)».key; | 13:40 | |
camelia | rakudo-moar 552d9c: OUTPUT«(0 7 2)(0 7 2)» | ||
unmatched} | literal: ^ another way | ||
literal | unmatched}: ah, indeed | ||
pmurias | tbrowder: backendless.com/documentation/file...erview.htm | ||
perlawhirl | I was using Net::Telnet:from<Perl5> the other day. A Net::Telnet object has a .print method, but Perl 6's .print takes precedence. How can I call my object's .print method? | ||
13:40
Rawriful joined
13:41
Rawriful left
|
|||
unmatched} | perlawhirl: I'd say that's a bug/limitation in Net::Telnet | 13:41 | |
El_Che | moritz: I logging in | ||
unmatched} | perlawhirl: errr... in Inline::Perl5 | ||
m: class Foo{ method print { say "works fine" } }; Foo.new.print | |||
camelia | rakudo-moar 552d9c: OUTPUT«works fine» | ||
vcv | m: my $foo = bag <0 0 2 2 4 5 7 7>; say $foo.grep(*.value == 2).Hash.keys | ||
camelia | rakudo-moar 552d9c: OUTPUT«(0 7 2)» | ||
El_Che | moritz: do you want me to check something? | ||
13:42
Rawriful joined
|
|||
jdv79 | unmatched}: entertaining post. thanks! | 13:42 | |
perlawhirl | hrm... yeah, maybe. luckily i could work around by using the .cmd method. the only difference is .cmd returns the output, .print does not... but was bringing it up partly so people are aware of that particlar limitation | ||
13:43
ptolemarch joined
|
|||
unmatched} | perlawhirl: it's worth reporting it on the Inline::Perl5's repo | 13:43 | |
perlawhirl | i wonder if Inline::Perl5 can check the local object's method first before falling back to perl 6 core methods | ||
unmatched} | buggable: Inline::Perl5 | ||
perlawhirl | yeah will do |
|