Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2017-04-30

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:00 timotimo so i'd press left-arrow and i'd get the ESC and the [, but then i press q and i get D, then i press q again and i get q
00:00 timotimo i used termios' makeraw command for this
00:02 timotimo and why is termios' examples working on fd 1 instead of 0? well, probably because stdout, stderr, and stdin are usually all the same fd under the hood?
00:02 Sound joined #perl6
00:08 imcsk8 joined #perl6
00:08 geekosaur more importantly they're usually the same terminal
00:09 geekosaur and, hiistorically, there used to be some oddnesses where some systems only let you do certain operations if the fd was open for read instead of read/write or write
00:10 geekosaur (early termios was often emulated on top of the native API)
00:11 Sound_ joined #perl6
00:11 samcv ugexe, i'm working on that grammar atm
00:11 samcv i have what you said in my comment working for one order of parens finally now for the other.
00:11 samcv progress
00:17 geekosaur joined #perl6
00:19 Sound_ joined #perl6
00:22 Cabanossi joined #perl6
00:28 bjz joined #perl6
00:31 timotimo haha, my tired butt wasn't realizing i was dealing with strings
00:32 timotimo so "looming combiners" problem
00:36 timotimo we might want to have a module that handles input via terminals as an event-based interface
00:37 timotimo so you'd get arrow keys, you'd get copy-paste, you'd get keys with ctrl held, stuff like that
00:37 timotimo perhaps have a little bit of functionality for text input, too
00:37 timotimo (because writing your own line editor is not a problem at all)
00:37 timotimo mouse input, too
00:39 raschipi Transforming the terminal input into something more like what X11/Wayland does?
00:39 timotimo i was thinking more like SDL, but it's all the same kind of deal
00:42 * BenGoldberg is hoping for some sort of Supply
00:43 timotimo a supply would probably be good
00:43 timotimo if you have something main-loop-like at all, supply doesn't make so much sense, i'm afraid
00:44 raschipi Then it would have to be more like curses, where the application has to poll input.
00:45 timotimo again, like SDL
00:45 Geth ¦ ecosystem: 9045b6bd8e | (Matt Oates)++ (committed using GitHub Web editor) | META.list
00:45 Geth ¦ ecosystem: Mark all MattOates repos as using META6.json
00:45 Geth ¦ ecosystem: review: https://github.com/perl6/ecosystem/commit/9045b6bd8e
00:45 u-ou that sounds less perl6y than Supply
00:45 timotimo sure you can manipulate program state in an event-loop-like extra thread, which is what a supply would entail, i'd say
00:46 timotimo it's not unlikely that i'd want to use supply api to do things like "figure out ansi escapes"
00:49 raschipi Create an auxiliary module that polls the input constantly and reemits the appropriate events on the supplie(s).
00:50 timotimo right
00:50 timotimo it's easy to turn a supply into a channel
00:50 timotimo in fact, i think a supply has a Channel method
00:50 timotimo then you can receive stuff from the channel in your main loop
00:54 samcv uh ugexe i'm done with that script
00:54 samcv err grammar
00:54 samcv ugexe, https://github.com/samcv/zef/blob/spdx-parser/spdxparser.p6
00:55 samcv err forgot to push. ok there
01:02 quester left #perl6
01:05 timotimo sadly, batch with :seconds will not automatically spit out stuff when the seconds after the last item have elapsed
01:05 timotimo you'd have to regularly emit empty messages to cause that
01:05 timotimo or i'd have to use throttle instead of batch
01:06 timotimo hmm, throttle is also not the right thing, is it?
01:08 u-ou why would you hvae to emit empty
01:08 u-ou why would you have to emit empty?
01:08 timotimo so that you don't have to hit a key so that previous inputs would be recognized
01:09 timotimo okay it's bedtime for me
01:10 timotimo i'll ponder stuff s'more tomorrow
01:17 timotimo seeya
01:17 u-ou night
01:19 ggoebel joined #perl6
01:40 semigloss joined #perl6
01:41 u-ou why is python so popular
01:48 Juerd Could be because it's pretty good.
02:04 skids joined #perl6
02:11 silug joined #perl6
02:22 Cabanossi joined #perl6
02:45 noganex joined #perl6
02:51 raiph joined #perl6
03:00 raiph joined #perl6
03:12 BenGoldberg joined #perl6
03:23 samcv ok i think Matt Oates wins internet points
03:23 samcv for being the module that passed the 50% mark
03:25 samcv \o/
03:25 samcv oh wait.
03:25 samcv it says 50%. is that exactly 50%... i thought i had big precision here. maybe it is. yes
03:25 samcv it's exactly 50%.
03:25 samcv so i guess the next person gets internet points?
03:28 TEttinger it's oates' other module
03:29 TEttinger (just guessing)
03:29 TEttinger I mean, if I were going through updating more than one module, it wouldn't be simultaneous
03:29 samcv hmm? what wouldn't
03:29 TEttinger the updates
03:29 samcv it gets them from githubmaster though
03:30 samcv my checker. not the collation of meta files
03:30 TEttinger so oates would update to the 50% mark, then update another possible module he has maybe and pass that mark?
03:30 samcv sure
03:30 samcv anybody can get access to the points :)
03:30 TEttinger hehe
03:36 Cabanossi joined #perl6
03:53 bjz joined #perl6
03:58 aborazmeh joined #perl6
03:58 aborazmeh joined #perl6
04:17 u-ou hi perl6
04:36 Cabanossi joined #perl6
04:50 samcv is this a useful thing. i made a module that as an argument takes an Array of pairs. where the key is identifier (name) and the value is an array of arguments
04:50 samcv given to Proc::Async. so you can give it hundreds of things to run, and it will wait for all to run and then return the output from all 800 or so
04:50 samcv or however many you want
04:51 samcv i've experimented and that is faster than using start { } blocks, just creating a bunch of procayncs
05:00 aindilis joined #perl6
05:05 skids If the start blocks were running external processes, I'd expect that to be faster... or were they doing just pure perl6 things?
05:07 poohman joined #perl6
05:08 samcv running programs
05:08 samcv yeah it's for running programs mostly
05:08 samcv though you could run perl6 scripts if you wanted
05:08 samcv cause i needed a way to dl all 800 metadata files a sfast as possible cause i don't have all the time in the world lol
05:09 samcv so dl's in like 20 seconds?
05:09 samcv way less than super long many minutes get a coffee while you wait thing
05:10 skids Yeah then I'd expect Proc::Async to be the most direct interface to use, vs a start { run }.
05:12 samcv i'm timing it now to see how fast it is
05:12 samcv ok 32s for 822 processes
05:14 samcv .o(wonders how long it'd take 9000 echo processes
05:16 samcv uh oh
05:17 samcv Unhandled exception in code scheduled on thread 15.... a few more times then too many open files XD
05:17 samcv i tried to do 9000 at once
05:17 skids That's probably a ulimit or some new fangled process group limit.
05:18 samcv i don't think i have a limit set hm
05:18 samcv yeah i do not
05:18 samcv not ulimit at least
05:18 samcv e
05:19 samcv hmm system is at 1616326
05:22 skids ulimit -Hn shows the per-user hard limit.
05:23 samcv oh no
05:23 samcv that's way too low
05:26 samcv i love my `halp` utility. it acts like man sorta. you type `halp ulimit` and it checks if there's a man, otherwise checks if there's a -h or --help option, checks if there's any `info` command output
05:26 samcv if it still can't find anything it asks if you want to google it, you type y or n
05:26 samcv so it does all that with typing one commad and brings you the information. infinitely useful
05:27 samcv https://github.com/samcv/scripts/blob/master/halp.sh
05:28 samcv nobody got time to try all like options of the command and man and info...
05:30 skids Speaking of time I should probably already be asleep by now :-).  n8
05:35 samcv ok it worked when i increased the soft limit to 4096
05:51 cyphase joined #perl6
06:06 sena_kun joined #perl6
06:13 Grauwolf joined #perl6
06:13 Grauwolf joined #perl6
06:21 Cabanossi joined #perl6
06:29 CIAvash joined #perl6
06:38 wamba joined #perl6
06:41 parv joined #perl6
06:55 bioexpress joined #perl6
07:06 bioexpress Hello, can somebody tell me, why the >"license" : "Artistic-2.0",< line is removed from the META6.json file, if i call >mi6 build<?
07:09 sena_kun bioexpress, seems like a bug.
07:10 sena_kun .seen skaji
07:10 yoleaux I saw skaji 8 Dec 2016 00:54Z in #perl6: <skaji> If I create a long running program, I want to make sure no resouce leak occur.
07:10 sena_kun skaji, ping.
07:12 mr-foobar joined #perl6
07:13 sena_kun not sure about a quick reply, though. bioexpress, I think, you can open an issue at https://github.com/skaji/mi6/issues
07:14 wamba joined #perl6
07:14 bioexpress Ok, thx.
07:31 setty1 joined #perl6
07:40 labster joined #perl6
07:50 sammers hi all
07:50 sena_kun sammers, o/
07:50 sammers hello
07:52 sammers is HardRoutine still a thing? There is nothing in docs about it but it is mentioned here https://github.com/perl6/specs/blob/master/S06-routines.pod
07:55 Actualeyes joined #perl6
08:11 rindolf joined #perl6
08:14 pierre_ joined #perl6
08:17 moritz no
08:17 moritz at least, it was never implemented
08:21 AlexDani` joined #perl6
08:28 sammers thanks moritz
08:58 sammers m: my $str := 'Hello'; $str := 'World'; say $str;
08:58 camelia rakudo-moar 1ed76a: OUTPUT: «World␤»
09:00 samcv ugexe, playing around with a parser class for spdx grammar. this is my first real parser class. so i could be doing horrible things :)
09:01 samcv keeping it here https://github.com/samcv/SPDX-Parser
09:30 kurahaupo joined #perl6
09:41 samcv ack grammars are hard. i just keep making things worse
09:42 Actualeyes joined #perl6
09:42 samcv the methods called in the 'parser' class when you parse a regex. what order are they called in?
09:51 Cabanossi joined #perl6
10:03 damnlie joined #perl6
10:05 espadrine joined #perl6
10:08 pmurias joined #perl6
10:09 timotimo excuse me, what? :)
10:10 timotimo what parser are you refering to?
10:36 Cabanossi joined #perl6
10:42 bjz_ joined #perl6
10:50 felher joined #perl6
10:53 Geth Swapped META.info → META6.json in 2 dists in https://github.com/perl6/ecosystem/commit/a5c7bb82d4
10:56 samcv one i made timotimo
10:56 samcv i just linked to it :>
10:56 samcv https://github.com/samcv/SPDX-Parser
10:57 cyphase joined #perl6
10:57 Actualeyes joined #perl6
11:04 timotimo yeah, but what do you mean by "methods in the parser class"?
11:05 Grauwolf joined #perl6
11:06 Cabanossi joined #perl6
11:13 samcv https://github.com/samcv/SPDX-Parser/blob/master/lib/SPDX/Parser.pm6#L54-L98
11:13 samcv Grammar::SPDX::Expression.parse(@list[4].key, actions => parsething.new);
11:14 samcv uses parsething class to uh parse i guess. or actions
11:14 timotimo yeah, we call those action methods
11:14 samcv this is new to me. so maybe it's called actions class
11:14 samcv ok
11:15 timotimo an action method is called as soon as a same-named token/regex/rule in the grammar has successfully parsed
11:15 samcv yeah the action methods are called in an order that confuses me
11:15 samcv ok well it seems to parse the shorter ones first
11:15 samcv so i guess i need to make uh. different tokens that have a usable $/
11:16 samcv because the ones called first don't help me if i don't know where the parenthesis are and things.
11:16 timotimo "shorter ones"?
11:16 samcv the <simple-expression> tokens. the smaller ones
11:16 timotimo if you have nested matches, the "innermost" stuff will be called first
11:17 samcv i want the opposite :P
11:17 timotimo just have the logic in the outer action methods
11:17 samcv ok so i need to ignore the innermost. and then access the innermost matches from the outer tokens?
11:17 samcv ok
11:18 jnthn Or have the innermost ones produce things that the outer ones can put together
11:18 samcv i tried that. but it got confusing
11:18 samcv and got bad fast. i mean it works for some cases atm. but others it explodes because it's. uh. how i did it is not good. will try something else
11:18 jnthn :)
11:20 samcv ok. i access it with $<foo> for token foo { }; but what if i have token foo:sym<baz>
11:20 samcv i know i can use $<foo> but any way to tell which sym it was that matched?
11:20 timotimo i believe the individuals take the common spot?
11:21 timotimo since the name it gets installed for is determined by what the calling regex looks like
11:21 timotimo like, when you have <foo>, it'll be in $<foo>, if you have <baz=foo> you'll have $<foo> and $<baz> holding this, if you have $<foo>=[abc] it'll have something in $<foo>, too
11:23 samcv ok but what if i don't have any =
11:23 samcv than it's indistinguishable?
11:24 vips joined #perl6
11:25 vips hi
11:25 pmurias hi
11:25 samcv hi
11:26 timotimo no, it's just what's inside the < >
11:29 vips i am interested in Perl 6 libraries enrichment, please let me know if i can take some part.
11:31 timotimo cool
11:31 timotimo there's a "most wanted" list that you can get ideas from if you want, otherwise you can build whatever you find interesting and/or useful
11:32 vips cool
11:33 timotimo https://github.com/perl6/perl6-most-wanted/blob/master/most-wanted/modules.md - there it is
11:34 vips thanks :)
11:35 timotimo the link "native library bindings" at the top of this document is also interesting
11:35 timotimo please be aware that this page isn't necessarily updated as soon as something happens, though
11:36 timotimo and i'm not sure why there's a "Databases" section with Sql in it that doesn't also list DBIish?
11:38 vips hmm
11:53 timotimo well, it's clearly not infallible :)
11:56 mr-foobar joined #perl6
12:03 samcv m: say 'MIT OR GPL-1.0 OR BSD' ~~ / ( \S+) <.ws> (\S+)/;
12:03 camelia rakudo-moar bdb539: OUTPUT: «「MIT OR」␤ 0 => 「MIT」␤ 1 => 「OR」␤»
12:03 samcv is there way i can do this but uhm
12:03 samcv i need to match infinite numbers of them
12:03 samcv like as string of LICENSE OR LICENSE OR LICENSE
12:04 timotimo m: say 'MIT OR GPL-1.0 OR BSD'.words.perl
12:04 camelia rakudo-moar bdb539: OUTPUT: «("MIT", "OR", "GPL-1.0", "OR", "BSD").Seq␤»
12:04 samcv no with grammars
12:04 timotimo you could put [ ] around it and a + after the ]
12:05 samcv then i tbecomes (\S+) <.ws> OR (\S+) (\S+) OR (\S)+
12:05 samcv which is double the number
12:05 timotimo huh?
12:05 timotimo oh
12:05 timotimo yeah, you want to use the % operator
12:06 timotimo m: say 'MIT OR GPL-1.0 OR BSD' ~~ / (\S+)+ % (\S+ <.ws>) /
12:06 camelia rakudo-moar bdb539: OUTPUT: «「MIT」␤ 0 => 「MIT」␤»
12:06 timotimo m: say 'MIT OR GPL-1.0 OR BSD' ~~ / (\S+)+ % (<.ws> \S+ <.ws>) /
12:06 camelia rakudo-moar bdb539: OUTPUT: «「MIT OR GPL-1.0 OR BSD」␤ 0 => 「MIT」␤ 1 => 「 OR 」␤ 0 => 「GPL-1.0」␤ 1 => 「 OR 」␤ 0 => 「BSD」␤»
12:06 Cabanossi joined #perl6
12:06 samcv so that extends the left hand side?
12:06 samcv or the right hand side
12:07 Geth ¦ doc: c7e32e2c2b | (Zoffix Znet)++ | doc/Type/IO/Spec/Unix.pod6
12:07 Geth ¦ doc: [io grant] Document IO::Spec::Unix.curupdir
12:07 Geth ¦ doc: review: https://github.com/perl6/doc/commit/c7e32e2c2b
12:07 timotimo it extends the lhs, by putting the rhs in between instances of the lhs
12:07 samcv ok cool
12:07 samcv got it
12:11 dct joined #perl6
12:15 Geth ¦ doc: 2f2686b71f | (Zoffix Znet)++ | 8 files
12:15 Geth ¦ doc: Add "Defined as" prefix text before sig codes
12:15 Geth ¦ doc:
12:15 Geth ¦ doc: Like we commonly have in the rest of the docs
12:15 Geth ¦ doc: review: https://github.com/perl6/doc/commit/2f2686b71f
12:25 samcv m: say 'THAT OR THIS OR GPL' ~~ / [\S+ ' OR ' ]+ % \S+ /;
12:25 camelia rakudo-moar bdb539: OUTPUT: «「THAT OR THIS OR 」␤»
12:25 samcv help
12:25 leah2 joined #perl6
12:25 timotimo well, yeah
12:26 timotimo why do you put OR there and not in the %?
12:26 samcv timotimo, your example isn't helping me that much because you use \S for everything. but OR needs to be seperate
12:26 timotimo because % makes sure to not require the thing at the end
12:26 samcv ah
12:26 timotimo (except if you use %% which optionally allows the in-between thing to occur once at the end as well)
12:26 Geth ¦ doc: fe489dc161 | (Zoffix Znet)++ | doc/Type/IO/Spec/Unix.pod6
12:26 Geth ¦ doc: [io grant] Document IO::Spec::Unix.curdir
12:26 Geth ¦ doc: review: https://github.com/perl6/doc/commit/fe489dc161
12:26 samcv m: say 'THAT OR THIS OR GPL' ~~ / [ \S+ ]+ % ' OR ' /;
12:26 camelia rakudo-moar bdb539: OUTPUT: «「THAT OR THIS OR GPL」␤»
12:26 samcv yay
12:27 samcv thank you!
12:27 samcv omg this saved my life
12:29 timotimo p6 regex are cool :)
12:31 AlexDaniel u: bullet
12:31 unicodable6 AlexDaniel, U+2022 BULLET [Po] (•)
12:31 unicodable6 AlexDaniel, U+2023 TRIANGULAR BULLET [Po] (‣)
12:31 unicodable6 AlexDaniel, 14 characters in total: https://gist.github.com/b783771d5924f59760f5ccfbee9b3dd7
12:36 Geth ¦ doc: 83d5de0f28 | (Zoffix Znet)++ | doc/Type/IO/Spec/Unix.pod6
12:36 Geth ¦ doc: [io grant] Document IO::Spec::Unix.updir
12:36 Geth ¦ doc: review: https://github.com/perl6/doc/commit/83d5de0f28
12:36 Cabanossi joined #perl6
12:37 chansen_ joined #perl6
12:40 pnu__ joined #perl6
12:40 ggherdov joined #perl6
12:48 rodarmor joined #perl6
12:50 samcv now i got infinite loop :(
12:50 samcv of matches
12:50 araraloren joined #perl6
12:51 timotimo why can't i hold all of these matches
12:51 samcv oh it goes a level deeper each time
12:52 samcv of the exact same match
12:52 timotimo huggable: speed
12:52 huggable timotimo, http://tux.nl/Talks/CSV6/speed4.html
12:52 timotimo huggable: test-t.pl
12:52 huggable timotimo, nothing found
12:52 timotimo buggable: speed
12:52 buggable timotimo, ▁▃▁▁▂▄▅▂▄▂▃↑▆▃▂▄▄▄▄▄▄▅▄▄↑▅▇▆▅▅▅▇▆▅▄▅▅▂▂▃▄▄↑▆▅▅▅▇█▄ data for 2017-04-10–2017-04-30; range: 4.921s–5.479s; 4% slower
12:52 timotimo ...
12:52 timotimo what's the fact that tells me how to properly prepare hello.csv?
12:53 w4and0er96 joined #perl6
12:53 timotimo is it 50k lines?
12:53 pierre_ joined #perl6
13:05 samcv i'll work on this again tomorrow ugh
13:05 samcv the reason i did it crappily was because it would just loop forever :(
13:06 samcv but then that makes the $/ i need to parse not good at all in actions methods
13:06 timotimo were you giving it a way to match the empty string multiple times in a row?
13:06 timotimo because it'll happily match the empty string at any position as often as it can
13:06 timotimo which is very often
13:08 samcv uhm https://github.com/samcv/SPDX-Parser/blob/next/lib/SPDX/Parser.pm6
13:08 timotimo any luck with Grammar::Tracer or something?
13:09 timotimo when i run spdxtest.t it doesn't infiniloop; can you upload your latest code?
13:09 timotimo oh, i'm on master
13:09 samcv ye
13:09 timotimo good
13:09 samcv grammar tracer is broken
13:09 samcv and so is grammar debugger
13:09 samcv annot invoke this object (REPR: Null; VMNull)
13:09 timotimo whoops, it crashes, yeah
13:11 Actualeyes joined #perl6
13:11 timotimo it might just be that terminal::ansicolor changed from beneath it
13:13 timotimo hm, dunno, perhaps it just explodes on the first line
13:14 samcv oh grammar::debugger?
13:14 samcv i gotta go to bed!
13:14 samcv o/ night
13:15 timotimo nite!
13:16 Geth ¦ doc: 4804128065 | (Zoffix Znet)++ | doc/Type/IO/Handle.pod6
13:16 Geth ¦ doc: [io grant] Document IO::Handle.DESTROY
13:16 Geth ¦ doc: review: https://github.com/perl6/doc/commit/4804128065
13:22 Geth ¦ doc: 987f735743 | (Curt Tilmes)++ (committed by Zoffix Znet) | doc/Language/ipc.pod6
13:22 Geth ¦ doc: Added a note about run/shell exceptions due to non-zero exits (#1294)
13:22 Geth ¦ doc:
13:22 Geth ¦ doc: * Add section on rendering Pod to Text
13:22 Geth ¦ doc:
13:22 Geth ¦ doc: * typo head => head2
13:22 Geth ¦ doc:
13:22 Geth ¦ doc: * Add note about run/shell exceptions
13:22 Geth ¦ doc: review: https://github.com/perl6/doc/commit/987f735743
13:24 Geth ¦ doc: 3023441a8c | (Zoffix Znet)++ | doc/Language/ipc.pod6
13:24 Geth ¦ doc: Reword; use better idiom for not-sinking
13:24 Geth ¦ doc: review: https://github.com/perl6/doc/commit/3023441a8c
13:29 kurahaupo joined #perl6
13:30 astj joined #perl6
13:37 pierre_ joined #perl6
13:38 semigloss joined #perl6
13:44 Geth ¦ perl6-examples: 0c96817860 | (Shlomi Fish)++ | categories/euler/prob125-shlomif.p6
13:44 Geth ¦ perl6-examples: Remove some unneeded quotes.
13:44 Geth ¦ perl6-examples: review: https://github.com/perl6/perl6-examples/commit/0c96817860
13:44 Geth ¦ perl6-examples: 13312f174f | (Shlomi Fish)++ | categories/euler/prob125-shlomif.p6
13:44 Geth ¦ perl6-examples: Convert to SetHash.
13:44 Geth ¦ perl6-examples: review: https://github.com/perl6/perl6-examples/commit/13312f174f
13:44 Geth ¦ perl6-examples: 9640e566d6 | (Shlomi Fish)++ | categories/euler/prob601-shlomif.p6
13:44 Geth ¦ perl6-examples: Add solution to Euler #601.
13:44 Geth ¦ perl6-examples:
13:44 Geth ¦ perl6-examples: Based on:
13:44 Geth ¦ perl6-examples:
13:44 Geth ¦ perl6-examples: https://github.com/shlomif/project-euler/blob/master/project-euler/601/euler_601_v1.py
13:44 Geth ¦ perl6-examples:
13:44 Geth ¦ perl6-examples: It emits identical output to it, but it is much slower than when the
13:44 Geth ¦ perl6-examples: original code is ran by cpython2, cpython3 or especially pypy2.
13:44 Geth ¦ perl6-examples: review: https://github.com/perl6/perl6-examples/commit/9640e566d6
13:57 khw joined #perl6
14:02 bjz joined #perl6
14:10 robertle I often do something like "our $DEBUG = False" in a module or even class, and then conditionally emit extra output. this way you can turn on the extra debug from the outside. seen this a million times all over other people's code too. is this (still?)  a good thing to do? or is there a neater way to achieve the same?
14:11 robertle and if this isn't a terrible thing to do, how do I do it in a role? they seem to have a (to me) surprising behavior around packages/namespaces...
14:15 DrForr robertle: I actually prefer $*DEBUG for that sort of thing.
14:18 robertle so a single global one rather than one per namespace?
14:20 timotimo i'd introduce an environment variable, since it's not always possible to go into the code where i'd have to set the $DEBUG or $*DEBUG to make the right stuff appear
14:20 robertle right, that's an option as well!
14:20 zakharyas joined #perl6
14:20 robertle btw: shouldn't $*DEBUG be listed on https://docs.perl6.org/language/variables?
14:21 DrForr It's just a dynamic variable, not a "special"
14:21 robertle right
14:22 DrForr And yeah, if you want to do multiple types of debugging, using %*ENV is another way to go.
14:23 DrForr You still run the risk of name conflicts either way.
14:23 robertle ..which is where the "our" approach is really nice!
14:24 felher joined #perl6
14:25 DrForr In my case I have a few things I want to turn on just inside test scripts, extra validation and such that end users don't need.
14:26 robertle ok, I think that gives me enough options and ideas. another question: sometimes I have functionality that I could expose through a pure procedural interface, but that are often used in an OO fashion
14:26 robertle so for simple cases, I currently do e.g. a "unit role XYZ" with some methods in it
14:27 robertle but also have sub mystuff() is export in the same file. this way IO can use the same module either in a OO fashion or procedurally
14:27 robertle typically the two fall abck to common "my sub" implementations"
14:28 robertle the whole thing feelks a bit like a hack and a bit dirty as well. is it? am I relying on some behavior that is going to go away?
14:31 DrForr It's a bit more work to keep in sync, certainly. I don't think you're relying on shady behavior though.
14:38 Cabanossi joined #perl6
14:41 leah2 joined #perl6
14:54 Geth ¦ perl6-examples: 0179ad6c6b | (Paul Cochrane)++ | .gitignore
14:54 Geth ¦ perl6-examples: Ignore all .precomp dirs
14:54 Geth ¦ perl6-examples: review: https://github.com/perl6/perl6-examples/commit/0179ad6c6b
14:54 Geth ¦ perl6-examples: f07c780949 | (Paul Cochrane)++ | README.md
14:54 Geth ¦ perl6-examples: Fix quoting in README
14:54 Geth ¦ perl6-examples: review: https://github.com/perl6/perl6-examples/commit/f07c780949
15:04 lorenzoi joined #perl6
15:06 lorenzoi hello, is it possible to use variables in HashMap accessing, i.e `my %hash = ("x" => "Some Value") ; my $variable = "x"; randomHash<$variable>`
15:07 lorenzoi oops i meant `%hash<$variable>`
15:07 timotimo of course
15:07 timotimo just use { } instead of < >, or use << >>
15:07 lorenzoi oh, thanks!
15:07 timotimo < > is much like ' ', it makes strings and won't let you interpolate stuff
15:08 timotimo but << >> is like " ", which allows interpolation
15:08 timotimo and { } is hash access without stringifying
15:08 DrForr <> are for qw-like stuff, no interpolation.
15:08 astj joined #perl6
15:10 leah2 joined #perl6
15:11 robertle I was wondering what the reason to use < > over { } for hash acces was? I have seen it but can't find a good reason. except that it saves you the extra quotes...
15:11 leah2 joined #perl6
15:11 timotimo it saves you quotes and commas
15:12 timotimo you quite commonly have literal hash keys in your code
15:12 araraloren it press easier than {}
15:12 robertle that's what I thought. I am personally not so tight on individual characters ;)
15:12 araraloren haha..
15:13 timotimo < > is also a signal for "only literals here"
15:13 timotimo whereas { } could have anything in it, including flattening
15:13 lorenzoi I just read the perl6 intro site, it doesn't include the <<>> thing.
15:14 timotimo perl6intro is just an intro :)
15:14 DrForr lorenzoi: There's lots of stuff it doesn't cover :)
15:14 lorenzoi is there a better documentation then?
15:14 lorenzoi that has a layout like perl6 intro?
15:14 pierre_ joined #perl6
15:14 DrForr docs.perl6.org
15:15 timotimo the "language" section of docs.perl6.org is probably what you're looking for
15:15 lorenzoi oh .__.
15:15 araraloren You can refer this https://docs.perl6.org/language/quoting
15:15 * lorenzoi knows nothing
15:16 araraloren It covered Perl6 quote syntax
15:29 stmuk joined #perl6
15:37 stmuk_ joined #perl6
15:46 lorenzoi is there a way to make strings come out colored in the terminal?
15:47 araraloren maybe you can use a module
15:47 lorenzoi oh.
15:48 araraloren http://modules.perl6.org/#q=color
15:48 araraloren Here is the module list of Perl 6
15:49 gfldex lorenzoi: see line 33-45 in https://github.com/gfldex/perl6-meta6-bin/blob/master/lib/META6/bin.pm6#L33
15:49 DrForr lorenzoi: Terminal::ANSIColor
15:49 gfldex then you just `say RED "your string here";`
15:50 lorenzoi gr8
15:50 rindolf joined #perl6
15:51 * lorenzoi thinks that perl6 is better than python
15:51 * lorenzoi thinks that perl6 is better than python in syntax and community
15:51 araraloren :)
15:51 gfldex m: my &BOLD = sub (*@s) { "\e[1m{@s.join('')}\e[0m" }; say BOLD "foo";
15:51 camelia rakudo-moar 2bd1d9: OUTPUT: «foo␤»
15:52 gfldex github is busy today. I'm getting loads of timeouts.
15:53 gfldex what is nice because I wanted to teach META6::bin how to retry anyways :)
15:54 araraloren m: my &RED = sub (*@s) {
15:54 camelia rakudo-moar 2bd1d9: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Missing block␤at <tmp>:1␤------> 3my &RED = sub (*@s) {7⏏5<EOL>␤»
15:54 araraloren "\e[31m{@s.join('')}\e[0m"
15:54 araraloren }; say RED "I love Perl 6";
15:54 araraloren m: my &RED = sub (*@s) { "\e[31m{@s.join('')}\e[0m" }; say RED "I love Perl 6";
15:54 camelia rakudo-moar 2bd1d9: OUTPUT: «5I love Perl 6␤»
15:55 gfldex m: my &RED = sub (*@s) { "\e[31m{@s.join('')}\e[0m" }; say RED "Perl 6 ♥ araraloren";
15:55 camelia rakudo-moar 2bd1d9: OUTPUT: «5Perl 6 ♥ araraloren␤»
15:56 BenGoldberg joined #perl6
15:58 stmuk joined #perl6
16:02 lorenzoi im a weird person, I like having scopes in my code for testing.
16:07 stmuk joined #perl6
16:07 timotimo i don't know what that means
16:12 lorenzoi a scope like `{ my $x = "Valid" } say $x #invalid`
16:13 lorenzoi well I call 'em scopes cause I also write Rust.
16:13 timotimo ah
16:13 timotimo yeah, lexical scopes
16:13 timotimo i don't know what "for testing" means in this case, though?
16:13 araraloren Rust is a good language ..
16:14 lorenzoi oh i mean when I want to test a feature in my code without screwing anything up, trust me it happened before.
16:14 lorenzoi to me
16:16 pierre_ joined #perl6
16:16 stmuk_ joined #perl6
16:17 timotimo oh, right
16:20 stmuk joined #perl6
16:30 ChoHag joined #perl6
16:31 stmuk_ joined #perl6
16:34 zakharyas1 joined #perl6
16:34 stmuk joined #perl6
16:35 zakharyas1 joined #perl6
16:37 stmuk__ joined #perl6
16:39 stmuk_ joined #perl6
16:41 Cabanossi joined #perl6
17:16 domidumont joined #perl6
17:22 domidumont joined #perl6
17:23 lorenzoi joined #perl6
17:23 lorenzoi success fully writen FizzBuzzWolf in 29 Lines of Pure Perl6 :)
17:24 lorenzoi Take that Rust :P
17:30 gfldex lorenzoi: please share!
17:30 lorenzoi ok!
17:30 labster joined #perl6
17:32 lorenzoi https://gist.github.com/lorenzoi/d1bd869b08f323314b358a477cab454b
17:32 araraloren m: say 25 %% 5; say 25 %% 6;
17:32 camelia rakudo-moar 2bd1d9: OUTPUT: «True␤False␤»
17:33 araraloren You can use %% replace `% =`
17:34 lorenzoi TIMTOWTOI
17:34 DrForr Change the 'say' to '$str += "Fizz";' and so on, and you can get rid of all but the last 4 cases :)
17:34 lorenzoi *TINTOWTDI
17:35 lorenzoi **TIMTOWTDI
17:35 DrForr Of course TIMTOWTDI as well :)
17:36 lorenzoi best thing is I wrote it First Try :) and its my first day writing Perl 6.
17:36 DrForr Party on!
17:36 DrForr How are you liking it so far?
17:37 lorenzoi its awesome.
17:38 DrForr Great! Where'd you hear about it?
17:40 lorenzoi I knew about it for a long time, I first heard about it in a Youtube Video.
17:41 DrForr Cool. You remember what the video was? (Just getting an idea of where people find out about this.)
17:44 lorenzoi https://www.youtube.com/watch?v=LR8fQiskYII&amp;t Title: Larry Wall: 5 Programming Languages Everyone Should Know (and of course he has perl in there, he created it. :P )
17:45 DrForr Neat! Glad to see it's getting around.
17:47 lorenzoi The comment section is full of Perl haters XD
17:48 skids joined #perl6
17:48 DrForr Color me surprised.
17:49 lorenzoi left #perl6
17:52 DrForr Suppertime here. Glad to see more people coming onboard.
18:09 gfldex lolibloggedalittle: https://gfldex.wordpress.com/2017/04/30/issue-all-the-things/
18:10 lizmat gfldex++
18:11 timotimo i find the stray "cd ../perl6-concurrent-channelify" in the output a bit confusing
18:12 gfldex timotimo: I just wanted to find out if anybody would actually read that wall of text. :-> (also, fixed)
18:13 timotimo hah
18:17 pierre_ joined #perl6
18:17 ugjka_ joined #perl6
18:17 timotimo so will there also be a quick way to get issues for all dependencies (maybe even transitive) of your module?
18:17 timotimo (and no, i don't want to also get rakudo, nqp, and moarvm issues in there, too :D)
18:17 obfusk_ joined #perl6
18:19 gfldex timotimo: wont be hard to implement, it's just a tree walk after all
18:24 timotimo right
18:25 timotimo not even sure if i want this feature for actual use
18:26 Cabanossi joined #perl6
18:26 rindolf Hi all! Can this be made faster while using the same algo - https://github.com/perl6/perl6-examples/commit/9640e566d65ecbce231a26dff2e734a2c5303035 ?
18:29 lizmat rindolf: += is still poorly optimized, you could try using $i = $i + $l
18:30 timotimo i'd use a brace-less if for the ++$ret piece of code
18:30 timotimo though i'd imagine it'd be inlined by the optimizer already
18:38 lizmat timotimo: yeah, in my experience it is when hot enough
18:38 timotimo i meant by the static optimizer actually
18:44 labster joined #perl6
19:00 rindolf lizmat: ah
19:00 yqt joined #perl6
19:01 timotimo rindolf: will you share your results? also, have you already tried perl6 --profile yourscript.p6?
19:01 rindolf timotimo: i have not.
19:03 timotimo i tend to go directly to the "routines" tab and sort by "exclusive time" and see which routines show up on top
19:07 zakharyas joined #perl6
19:09 Geth ¦ perl6-examples: b5fd7f5640 | (Shlomi Fish)++ | categories/euler/prob601-shlomif.p6
19:09 Geth ¦ perl6-examples: Some optimizations.
19:09 Geth ¦ perl6-examples: review: https://github.com/perl6/perl6-examples/commit/b5fd7f5640
19:09 rindolf timotimo: i only have one time-consuming routine there
19:11 dustinm` joined #perl6
19:15 timotimo calc_P?
19:15 rindolf timotimo: here is the profile - http://www.shlomifish.org/Files/files/text/profile-1493579443.16345.html
19:15 rindolf timotimo: yes
19:15 timotimo heh.
19:15 timotimo well, that doesn't tell us terribly much
19:16 timotimo but you're spending 50% of total time running %
19:16 timotimo have you considered using %% instead of %?
19:16 rindolf timotimo: i don't know what %% is
19:16 rindolf doc: %%
19:17 timotimo a %% b is true if a is evenly divisible by b
19:17 MasterDuke_ i don't think there is a doc bot, but it's a good idea...
19:18 timotimo doesn't sound like a bad idea, yeah
19:19 MasterDuke_ rindolf: have you tried making variables native ints?
19:19 timotimo for % to %% you'll of course have to flip if to unless
19:20 rindolf MasterDuke_: no, but they need to be 64-bit
19:20 timotimo huh, it's hardly any faster at all
19:20 timotimo native ints on moarvm are always 64bit
19:20 MasterDuke_ native ints are 64bit if you're on a 64bit system
19:21 rindolf MasterDuke_: ah
19:21 MasterDuke_ timotimo: i've found %% to usually be slower, since it calls % it just creates an extra method call
19:21 programmingnewbi joined #perl6
19:22 programmingnewbi Hello everyone. I have a question. Is Perl6 production ready?
19:22 timotimo why does it call %?
19:22 timotimo it shouldn't need to do that, tbh
19:22 timotimo let me loook
19:23 timotimo programmingnewbi: we almost always say "it depends on your use case". got any more detail to help us answer your questions?
19:23 MasterDuke_ timotimo: https://github.com/rakudo/rakudo/blob/07feca6/src/core/Numeric.pm#L240
19:24 timotimo dang
19:24 MasterDuke_ looks like it doesn't anymore for the Int, Int case
19:24 timotimo at least for Int, Int it's a little bit better, yeah
19:24 dogbert17 well, making $l, $i and $t native ints gives a nice boost for starters
19:24 timotimo the one that's being called is from Int.pm fwiw
19:24 programmingnewbi Yes. I'm interested in using perl 6 as a backend language. Currently just learned basic frontend stuff and wondering what to learn next. Perl6 seemed like the best choice given its support for parallelism and concurrency
19:25 rindolf dogbert17: do you have a patch?
19:26 dogbert17 fake patch, the first four lines in Calp_P
19:26 dogbert17 my int $l = [lcm] 1 .. $s;
19:26 Cabanossi joined #perl6
19:26 dogbert17 my int $i = 0;
19:26 dogbert17 my $ret = 0;
19:26 timotimo programmingnewbi: yeah, it isn't bad for that. it used to crash semi-regularly when you used parallel stuff, but our lead technical designer spent a lot of time and energy on fixing that
19:26 dogbert17 my int $t = $s + 1;
19:27 dogbert17 it should be a measurable difference
19:28 programmingnewbi @timotimo thanks for the answer
19:28 Cabanossi joined #perl6
19:29 timotimo is there really no %% candidate for native ints?
19:29 MasterDuke_ was just wondering that myself
19:29 timotimo oh MasterDuke_, wanna do the renames for sql stuff together or something
19:30 timotimo also, wanna put in more "primary key" things?
19:30 MasterDuke_ timotimo: sure
19:31 Geth ¦ perl6-examples: 1fe0a7587c | (Shlomi Fish)++ | categories/euler/prob601-shlomif.p6
19:31 Geth ¦ perl6-examples: Speedup by using native ints.
19:31 Geth ¦ perl6-examples:
19:31 Geth ¦ perl6-examples: Thanks to dogbert17 .
19:31 Geth ¦ perl6-examples: review: https://github.com/perl6/perl6-examples/commit/1fe0a7587c
19:31 MasterDuke_ timotimo: i thought i saw you mention something before? callee_id -> id?
19:32 timotimo yep, that's one
19:32 rindolf dogbert17: thanks!
19:33 timotimo say, don't we also have deopt_all data somewhere in there?
19:33 timotimo yeah, we totally do
19:33 dogbert17 rindolf: np :) if you make $M a native int as well you'll se another boost
19:33 timotimo and it's not getting put into the sql output yet
19:34 MasterDuke_ timotimo: yeah, i just see deopt_one
19:34 timotimo yup, just get the deopt_all key from the hash as well
19:34 rindolf dogbert17: i already did
19:35 dogbert17 :) so now performance should be decent ata least
19:35 MasterDuke_ timotimo: deopt_all is an INT also?
19:35 timotimo yep
19:36 timotimo just a count
19:36 timotimo i kind of wish we could have optimizations for "we know the second arg is nonzero" in the static optimizer or something
19:38 MasterDuke_ timotimo: the `caller_id, callee_id` order i believe is an artifact from how i grabbed them before. i'm going to switch to `id, caller_id`
19:43 timotimo can we call it parent_id?
19:43 timotimo that makes it a bit more obvious, i think, that it's a tree structure
19:46 MasterDuke_ sure
19:47 timotimo allocations is strange
19:47 timotimo why does it have a caller_id and a callee_id?
19:49 MasterDuke_ cause i wasn't sure which was needed at first
19:49 timotimo so they just both get the same value?
19:50 MasterDuke_ no, the same values as a call entry at the same level
19:52 timotimo ah, i see
19:52 timotimo okay, but the id from the calls table will be all we need
19:53 MasterDuke_ can you think of any real reason to have both? or should i just remove caller_id and rename callee_id to call_id?
19:54 TEttinger joined #perl6
19:56 timotimo i can't see a reason for both
19:56 timotimo if you have the calls.id it belongs to, you've also got the calls.parent_id that goes along with it
19:57 MasterDuke_ yep
20:05 espadrine joined #perl6
20:14 MasterDuke_ timotimo: https://github.com/perl6/nqp/pull/356
20:24 japhb .tell timotimo I noticed yesterday you were discussing raw and processed keyboard input in terminal UIs.  See https://github.com/ab5tract/Terminal-Print/blob/raw-input/lib/Terminal/Print/RawInput.pm6 for early work on this, with https://github.com/ab5tract/Terminal-Print/blob/raw-input/examples/tris.p6 for a test program.  Last I tried it works fine right up until it stops accepting keyboard input; see https://github.com/ab5tract/Terminal-Print/issues/19 for the s
20:24 yoleaux japhb: I'll pass your message to timotimo.
20:27 curt_ joined #perl6
20:28 stmuk joined #perl6
20:28 curt_ p6: my uint64 $x = 18446744073709551615; say $x;
20:28 camelia rakudo-moar b1fbd1: OUTPUT: «-1␤»
20:30 curt_ Why not print '18446744073709551615'?
20:32 MasterDuke_ curt_: hmm, thought that had been fixed
20:37 MasterDuke_ c: releases my uint64 $x = 18446744073709551615; say $x;
20:37 committable6 MasterDuke_, ¦releases (18 commits): «-1»
20:45 TreyHarris has anyone written zef shell completions? I'm searching github but not finding anything
20:54 curt_ p6: my uint64 $x = 18446744073709551615; say $x == 18446744073709551615 ?? "good" !! "bad";
20:54 camelia rakudo-moar 762fd2: OUTPUT: «bad␤»
20:55 MasterDuke_ c: releases my uint64 $x = 18446744073709551616; say $x;
20:55 committable6 MasterDuke_, ¦releases (18 commits): «Cannot unbox 65 bit wide bigint into native integer␤  in block <unit> at /tmp/D1P8KXcPfQ line 1␤ «exit code = 1»»
20:56 Geth Swapped META.info → META6.json in 8 dists in https://github.com/perl6/ecosystem/commit/9aab65394e
20:58 MasterDuke_ hm, maybe it was just int64 that i fixed and haven't done uint64 yet
20:59 MasterDuke_ c: releases my int64 $x = 18446744073709551616; say $x;
20:59 committable6 MasterDuke_, ¦releases (18 commits): «Cannot unbox 65 bit wide bigint into native integer␤  in block <unit> at /tmp/s1in6FNYUN line 1␤ «exit code = 1»»
20:59 MasterDuke_ c: releases my int64 $x = 2**63; say $x;
20:59 committable6 MasterDuke_, https://gist.github.com/23e49d799be41f8333f3e2f3a05d2d61
21:00 MasterDuke_ ah, that was it
21:01 MasterDuke_ curt_: so yeah, native uints don't work very well now (i.e., they pretty much act like ints, not uints)
21:01 curt_ ok, thanks
21:03 bjz joined #perl6
21:04 MasterDuke_ i've been trying to fix it, but it's slow going (not my strong suit)
21:05 curt_ MasterDuke_: Thanks for all your work.  It is appreciated, even if there is still more to go..
21:06 MasterDuke_ curt_: of course if you know C...
21:09 pecastro joined #perl6
21:09 dj_goku joined #perl6
21:11 BenGoldberg m: my uint32 $x = 2**31; say $x;
21:11 camelia rakudo-moar fec547: OUTPUT: «2147483648␤»
21:11 BenGoldberg m: my uint32 $x = 2**32; say $x;
21:11 camelia rakudo-moar fec547: OUTPUT: «0␤»
21:12 BenGoldberg m: my uint64 $x = 2**64; say $x;
21:12 camelia rakudo-moar fec547: OUTPUT: «Cannot unbox 65 bit wide bigint into native integer␤  in block <unit> at <tmp> line 1␤␤»
21:12 BenGoldberg m: my uint8 $x = 2**8; say $x;
21:12 camelia rakudo-moar fec547: OUTPUT: «0␤»
21:12 stmuk_ joined #perl6
21:13 BenGoldberg . o O (A little bit more consistency would be nice ;))
21:16 stmuk joined #perl6
21:24 stmuk_ joined #perl6
21:26 stmuk joined #perl6
21:27 astj joined #perl6
21:29 stmuk_ joined #perl6
21:30 gfldex timotimo: as requested `meta6 --issues --one-line --url --deps`
21:31 stmuk__ joined #perl6
21:32 timotimo i hope it wasn't too much work :S
21:32 gfldex timotimo: it would have been less work if github wouldn't be that slow today
21:33 timotimo are you running into rate limiting on their api?
21:33 gfldex no, I'm hitting timeouts
21:34 zacts joined #perl6
21:37 timotimo MasterDuke_: you know, we could even make call_id in allocations a primary key
21:39 dct joined #perl6
21:40 MasterDuke_ not a unique one, but yeah
21:40 timotimo wow, i didn't know about /dev/fd
21:55 MasterDuke_ timotimo: looks like `integer primary key` requires uniqueness, so no go
21:55 timotimo oooh
21:55 timotimo of course
21:55 timotimo every routine allocates a bunch of different things
21:56 timotimo we can make a primary key built from two fields, though
21:56 timotimo routine and type
21:57 Rawriful joined #perl6
21:58 MasterDuke_ could also do foreign key constraints
22:02 haxmeister joined #perl6
22:02 haxmeister hello perl
22:03 gfldex m: say „Hallo haxmeister!“;
22:03 camelia rakudo-moar fec547: OUTPUT: «Hallo haxmeister!␤»
22:03 haxmeister just getting started on some tutorials found at : perl6intro.com
22:04 haxmeister and ran into a snag with probably a simple explanation
22:04 gfldex place questions here ↓↓↓
22:04 haxmeister the following example statment:  say "folder123".IO.d; seems to work differently than I expected
22:05 haxmeister I use  say "/var/tmp/portage".IO.d;
22:05 haxmeister it doesn't like that much
22:05 haxmeister that is a folder on my computer
22:05 haxmeister nay
22:06 haxmeister I'm an idiot
22:06 haxmeister lol
22:06 haxmeister sorry for the screen litter, the problem is solved
22:06 AlexDaniel haxmeister: glad to help! :)
22:07 haxmeister :-P
22:07 timotimo rather screen litter than kitty litter
22:07 * haxmeister meow
22:07 AlexDaniel .oO( if there are any other questions you can answer yourself, feel free to ask them! )
22:09 haxmeister was writing a little perl6 script friday to search through some folders and make list of all files with a particular name.. had errors I didn't understand, will try to recreate it in the next few and see if I have better luck
22:10 haxmeister I get confused dealing with files right now.. like the dir "some directory"
22:10 haxmeister returning file objects.. and I get lost in what is an object or not because I'm a perl6 noob
22:12 Cabanossi joined #perl6
22:12 timotimo everything is an object, though
22:12 AlexDaniel .oO( wait what? I'm not an object! )
22:13 AlexDaniel m: say %*ENV<ME>.^mro
22:13 camelia rakudo-moar a2602b: OUTPUT: «((Str) (Cool) (Any) (Mu))␤»
22:13 gfldex m: say "$*HOME".IO.WHAT
22:13 camelia rakudo-moar a2602b: OUTPUT: «(Path)␤»
22:13 haxmeister jeese you guys are cracking me up... I'm liking this channel almost as much as funtoo..
22:13 gfldex haxmeister: feed the typenames to https://docs.perl6.org/language.html
22:13 AlexDaniel at least it says that I'm cool…
22:13 timotimo AlexDaniel: it looks like you're cool
22:13 timotimo yeah
22:15 labster joined #perl6
22:15 gfldex m: say "timotimo" ~~ Cool;
22:15 camelia rakudo-moar a2602b: OUTPUT: «True␤»
22:16 haxmeister dir is a function.. can I use parenths around the quoted string?
22:16 timotimo yup, but the ( has to touch the dir
22:16 AlexDaniel haxmeister: sure
22:16 haxmeister has to touch.. got it
22:16 timotimo well, if you have more than one argument
22:16 gfldex m: say dir("/home/camelia");
22:16 camelia rakudo-moar a2602b: OUTPUT: «("/home/camelia/.cpanm".IO "/home/camelia/.local".IO "/home/camelia/.npm".IO "/home/camelia/.perl6".IO "/home/camelia/.perlbrew".IO "/home/camelia/.rcc".IO "/home/camelia/.ssh".IO "/home/camelia/Perlito".IO "/home/camelia/evalbot".IO "/home/camelia/log".…»
22:16 timotimo otherwise it makes no difference
22:16 timotimo m: say dir ("/home/camelia")
22:16 camelia rakudo-moar a2602b: OUTPUT: «("/home/camelia/.cpanm".IO "/home/camelia/.local".IO "/home/camelia/.npm".IO "/home/camelia/.perl6".IO "/home/camelia/.perlbrew".IO "/home/camelia/.rcc".IO "/home/camelia/.ssh".IO "/home/camelia/Perlito".IO "/home/camelia/evalbot".IO "/home/camelia/log".…»
22:16 timotimo because foo (1, 2, 3) is a call to foo with a single argument. that argument is a list
22:17 haxmeister I have to use ().. or I struggle reading back through it..lol
22:17 gfldex m: say "/home/camelia".&dir;
22:17 camelia rakudo-moar a2602b: OUTPUT: «("/home/camelia/.cpanm".IO "/home/camelia/.local".IO "/home/camelia/.npm".IO "/home/camelia/.perl6".IO "/home/camelia/.perlbrew".IO "/home/camelia/.rcc".IO "/home/camelia/.ssh".IO "/home/camelia/Perlito".IO "/home/camelia/evalbot".IO "/home/camelia/log".…»
22:17 haxmeister camelia drank to much coffee
22:18 AlexDaniel m: say "/".IO.dir
22:18 camelia rakudo-moar a2602b: OUTPUT: «("/boot".IO "/home".IO "/opt".IO "/srv".IO "/tmp".IO "/usr".IO "/var".IO "/etc".IO "/dev".IO "/proc".IO "/sys".IO "/run".IO "/lib".IO "/sbin".IO "/bin".IO "/lib64".IO "/mnt".IO "/root".IO "/selinux".IO)␤»
22:20 haxmeister wait I can put a regex in a container and use it like that?
22:20 haxmeister like this: my $build-log-regex = /build\.log/ ;
22:20 timotimo yeah, regexes are also just objects
22:21 timotimo and so are functions, but you have to put the & in front of the name so that it's not just a call
22:21 haxmeister I can use that in place of m/regex/ ?
22:21 AlexDaniel m: my $r = / ‘build.log’ /; say ‘blahbuild.logblah’ ~~ $r
22:21 camelia rakudo-moar a2602b: OUTPUT: «「build.log」␤»
22:22 haxmeister singl quotes will escape that .
22:22 haxmeister ?
22:22 timotimo m/regex/ will immediately match the regex against text
22:23 gfldex m: my $r = / „build.log“ /; say ‘blahbuild.logblah’ ~~ $r
22:23 camelia rakudo-moar a2602b: OUTPUT: «「build.log」␤»
22:23 gfldex any quite will
22:23 haxmeister kk ty
22:23 timotimo so you can't put it into anything because it'll immediately turn into the match result
22:24 japhb timotimo: Looks like yoleaux cut off my message in this channel; you can see the original almost exactly 2 hours ago in #perl6.
22:25 n0xff joined #perl6
22:25 timotimo i saw it, yeah
22:25 timotimo i was surprised you opened /dev/fd/* to get at the input
22:26 timotimo in my attempt at this i "start"ed the other code and had the main thread would go off to do the input stuff
22:27 brrt joined #perl6
22:30 japhb timotimo: The use case here is a library that can't assume it can take over the main thread.
22:31 japhb But (for now at least) it *can* assume a posix-like system, because termios.
22:32 timotimo right
22:32 timotimo have you ever looked into sixel btw?
22:32 timotimo that stuff is fascinating
22:33 japhb timotimo: You mean this?  https://github.com/saitoha/libsixel
22:34 timotimo yuppers
22:34 timotimo i compiled a mlterm so i can have sixel on my macine
22:34 timotimo machine*
22:35 timotimo i'm just now maybe actually switching from xfce to plasma5
22:35 timotimo which means i'll probably be using Konsole in the future
22:35 bjz joined #perl6
22:35 timotimo but Konsole can't sixel, iirc
22:35 timotimo it can, however, do 24bit color for text and background
22:38 timotimo maybe the konsole devs will be like "yeah, ok, we'll build in sixel support, that's fine. but you know what, we'll do you one better and make our sixels support 24bit colors!"
22:38 bjz joined #perl6
22:39 u-ou why don't cnosoles have that already
22:39 u-ou I mean terminals
22:39 timotimo what, 24bit colors or sixel graphics?
22:39 u-ou the former
22:40 u-ou I don't know what sixel is
22:40 timotimo amazing is what sixel is
22:41 timotimo so, sixel was meant for controling dot matrix needle printers
22:41 timotimo but terminals also support(ed) it
22:41 u-ou I know, but terminals should have 24bit colour
22:42 japhb Wow, that is indeed really dang cool, timotimo -- thanks for pointing me to it!
22:42 timotimo isn't it the best?
22:42 japhb u-ou: Some already do.  I added support for it to Terminal::ANSIColor.
22:42 timotimo since there's a patch for SDL where you just set an env var and it outputs sixel instead of opening a window ...
22:42 timotimo and there's an X server that renders to SDL instead of to a framebuffer
22:43 japhb timotimo: I can do SO MANY COOL THINGS
22:43 timotimo ... endless possibilities
22:43 timotimo you know what's missing, though?
22:43 japhb ... with this
22:43 timotimo stereo sound over ansi escape sequences
22:43 japhb LOL
22:44 timotimo okay, maybe it'd be better if it'd be just MIDI ...
22:44 timotimo for bandwidth reasons
22:44 u-ou lol
22:44 timotimo or just what you could do with a pc speakers back in the day
22:44 timotimo because why have anything more modern than that in 2017
22:44 japhb I will say one thing though: I'm already pushing the limits of older terminal emulators doing full-color mandelbrot output at two "pixels" per character cell -- you can watch the repaint -- I hate to imagine what poorly optimized terminals will do with escape sequences that dense
22:45 japhb I'm all for modtrackers built into my terminal
22:46 timotimo well, you know, sixel can be pretty performant
22:46 timotimo did you look at how it works internally?
22:46 japhb (I should mention I mean that you can watch the repaint when I just output a string containing the entire serialized screen full of escape sequences -- I'm not even counting the color calculations here, just the terminal trying to understand the megabyte of escape sequences I just shoved down the pipe)
22:46 japhb Not yet
22:46 timotimo let me explain
22:46 japhb Where's the best place to start?
22:46 timotimo it's so cool
22:46 timotimo hm, i'm not sure where i learned about it, really
22:47 timotimo but it's like this
22:47 timotimo you can set up a number of "color registers" where you store your 256 color index or something
22:47 timotimo then you put in your "ima do sixel now" escape starter
22:47 timotimo and then one lower-7-bit character (printable ascii range) gives six pixels 1 or 0
22:48 timotimo and you can go over the same place multiple times with different colors, because you can also have transparent
22:48 timotimo and there's also an extra RLE thing
22:49 AlexDaniel stereo soound should be part of unicode
22:49 japhb So you're sending "This pixel is the current color" or "This pixel is *not* the current color"?
22:49 timotimo and one character for "go to next line" and one character for "return to the left border"
22:49 timotimo if by "current" you mean "what's already there", then yes, i think so
22:49 timotimo but i think you really set two colors and one of them is allowed to be "transparent"
22:49 japhb Ah, interesting
22:50 AlexDaniel u: variation
22:50 unicodable6 AlexDaniel, U+180B MONGOLIAN FREE VARIATION SELECTOR ONE [Mn] (◌᠋)
22:50 unicodable6 AlexDaniel, U+180C MONGOLIAN FREE VARIATION SELECTOR TWO [Mn] (◌᠌)
22:50 unicodable6 AlexDaniel, 260 characters in total: https://gist.github.com/01aa218992a4ed7a49a0b9d6ebf561b3
22:50 timotimo http://qiita.com/arakiken/items/4a216af6547d2574d283 - look at this, japhb
22:50 timotimo just the pictures will be enough for a little bit of understanding
22:50 japhb So optimally with 256 color registers, you would do 128 passes over every 6 row block, so with overhead maybe 22 passes per row amortized.
22:51 timotimo i don't think you have that many color registers actually
22:51 timotimo let me look again
22:51 haxmeister easy syntax for not ~~ ?
22:51 AlexDaniel !~~
22:51 haxmeister oh.. duh
22:52 haxmeister ty
22:52 AlexDaniel haxmeister: that works with any operator
22:52 AlexDaniel well… not any operator, but you get the idea
22:52 haxmeister kk
22:54 timotimo m: say 1 !< 4
22:54 camelia rakudo-moar a2602b: OUTPUT: «False␤»
22:54 timotimo m: say 1 < 4
22:54 camelia rakudo-moar a2602b: OUTPUT: «True␤»
22:54 timotimo m: say 1 !+ 4
22:54 camelia rakudo-moar a2602b: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Cannot negate + because additive operators are not iffy enough␤at <tmp>:1␤------> 3say 1 !7⏏5+ 4␤    expecting any of:␤        infix␤        infix stopper␤»
22:54 timotimo ^- the operator has to be iffy, otherwise prefixing it with ! to negate doesn't make sense
22:55 haxmeister !~~ is pretty easy not match
22:56 AlexDaniel m: 42 !. say
22:56 camelia rakudo-moar a2602b: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Cannot negate . because dotty infix operators are too fiddly␤at <tmp>:1␤------> 42 !.7⏏5 say␤»
22:56 AlexDaniel timotimo: is this error message correct?
22:56 AlexDaniel ah yes, it is
22:57 * AlexDaniel still cannot remember what fiddly is
22:57 timotimo "complicated"?
22:57 AlexDaniel timotimo: which means?
22:57 haxmeister AlexDaniel: you have never "fiddled" with something?
22:57 dj_goku joined #perl6
22:57 dj_goku joined #perl6
22:57 AlexDaniel haxmeister: given that I'm not a native speaker… I don't really know :(
22:58 timotimo dunno :)
22:58 AlexDaniel timotimo: for example, old design docs say “No meta in fiddly things. So you can't reduce, negate, reverse, sequence, cross, zip, hyperify or assignify fiddly operators.”
22:58 timotimo "nobody would agree to one interpretation of what that's supposed to mean"?
22:58 AlexDaniel and then of course .= is a thing, so “assignify” does not really belong there?
22:59 haxmeister it means your toying with something
22:59 haxmeister fiddling = toying or playing with something without any real purpose to be accomplished
23:01 haxmeister or
23:01 haxmeister complicated or detailed and awkward to do or use.
23:02 haxmeister can't negate complex operators
23:03 AlexDaniel maybe that's what it should say
23:03 AlexDaniel “Cannot negate . because dotty infix operators are too fiddly (cannot negate complex operators)”
23:03 AlexDaniel or whatever
23:04 haxmeister takes a southerner to dumb it down ;-)
23:05 haxmeister can just replace "fiddly" with "complex"
23:07 AlexDaniel haxmeister: well, it's not just the error message. Internally it's “fiddly” everywhere, so perhaps it makes sense to leave it there
23:08 haxmeister well I certainly don't have the credentials to suggest otherwise..lol
23:08 gfldex haxmeister: see https://github.com/rakudo/rakudo/blob/nom/src/Perl6/Grammar.nqp#L3878
23:11 haxmeister looks fiddly
23:18 MasterDuke_ timotimo: just made another commit to https://github.com/perl6/nqp/pull/356. anything else you can think of or go ahead and merge?
23:19 timotimo i wonder what makes that one qast test inside nqp fail on travis
23:20 timotimo the last time i tried to have "references" i couldn't import the generated sqlite any more
23:20 timotimo because things weren't being put in in the right order
23:20 MasterDuke_ not sure, but it started a couple nqp commits back
23:21 haxmeister I have no idea what I'm doing..lol
23:23 MasterDuke_ timotimo: hm, my test profile loaded fine, but i guess i should try a more complicated one
23:23 timotimo oh!
23:23 timotimo i think that was before we had call id vs caller id
23:25 timotimo so of course things would explode
23:25 n0xff left #perl6
23:25 MasterDuke_ ah, yep
23:26 geekosaur joined #perl6
23:26 Cabanossi joined #perl6
23:31 geekosaur joined #perl6
23:33 timotimo i think i'll go to bed rather soon, though
23:34 MasterDuke_ it's fine with a profile of CSV's test-t
23:34 timotimo cool
23:34 timotimo there we go
23:35 Actualeyes joined #perl6
23:40 timotimo thank you for your continued work :)
23:42 Geth joined #perl6
23:47 haxmeister searching dir recursively seems slow
23:49 gfldex haxmeister: what does `perl6 --version` say?
23:51 Geth joined #perl6
23:53 bjz joined #perl6
23:56 tardisx joined #perl6
23:58 haxmeister actually maybe it isn't slow.. maybe it's just a lot of dirs..
23:58 haxmeister This is Rakudo version 2017.04.2 built on MoarVM version 2017.04
23:58 haxmeister implementing Perl 6.c.
23:59 AlexDaniel haxmeister: seems recent enough
23:59 haxmeister https://pastebin.com/nzS60eHp
23:59 haxmeister please be nice about my noob code :-P

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

Perl 6 | Reference Documentation | Rakudo