Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-09-17

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:06 mcmillhj joined #perl6
00:13 timotimo raydiak: i'd also go with two roles per term and then putting them all together
00:14 timotimo i could imagine a package could be built that lets you put a few tokens/rules/regexes together with their corresponding action method into one block and when "does" ing that thing you declared it'll check if it's being does'd into a class or into a grammar and then only add the tokens/... or the action methods
00:15 timotimo an EXPORTHOW trick may make that possible; see OO::Monitors or what it's called for an example of EXPORTHOW usage
00:15 timotimo other than that: slangs slangs slangs ;)
00:15 Ven_ joined #perl6
00:16 raydiak oooh good thoughts, thanks timo!
00:17 timotimo that's what my sleep-deprived brain comes up with at these time-of-days ;)
00:17 timotimo tomorrow i may have an actual serious look at maybe making a youtube tutorial series for getting up and running with perl6
00:17 raydiak better than the things my sleep-deprived brain was coming up with :)
00:18 raydiak that'd be cool (youtube tutorials)
00:18 timotimo would you be willing to write up what kind of stuff you'd expect from such a tutorial?
00:19 timotimo my brain will surely also think a whole bunch about that while i'm desparately trying to catch some Zs
00:19 timotimo but a second opinion is always welcome
00:19 mcmillhj joined #perl6
00:19 raydiak the only other thing not yet mentioned I thought about was using FALLBACK methods but I assume that'd slow things down
00:20 timotimo doesn't slow things down terribly much. after it fallback'd once, the result will be installed in the method table i think
00:21 raydiak oh that's neat, didn't know
00:21 raydiak I will think about tutorial content and let you know what comes to mind, but can't promise a lot, totally slammed with work these days
00:26 timotimo cool
00:26 timotimo i'll crash now
00:26 timotimo have a good one!
00:27 timotimo you can try how often the body of FALLBACK gets called when you invoke the same method name multiple times
00:28 raydiak yep good idea. you too buddy, thanks for the input, rest well :)
00:30 [1]ringer1 joined #perl6
00:34 mcmillhj joined #perl6
00:48 mcmillhj joined #perl6
00:50 TestNinja joined #perl6
01:04 Pierre_ joined #perl6
01:12 ringer1 joined #perl6
01:16 awwaiid Hello #perl6!!
01:17 BenGoldberg Hi
01:17 awwaiid hoelzro and I are at StrangeLoop, doing some rakudo hackin'
01:17 awwaiid doy maybe joining us
01:22 bjz joined #perl6
01:24 mcmillhj joined #perl6
01:26 hoelzro o/
01:28 MasterDuke does anybody here know how to compile a moarvm with debugging (to use with valgrind) using rakudobrew?
01:33 committable6 joined #perl6
01:33 cpage_ joined #perl6
01:35 committable6 joined #perl6
01:36 mcmillhj joined #perl6
01:42 committable6 joined #perl6
01:46 committable6 joined #perl6
01:46 _slade_ joined #perl6
01:54 mcmillhj joined #perl6
02:14 FROGGS joined #perl6
02:17 Pierre_ joined #perl6
02:19 ugexe maybe --configure-opts="--debug"
02:19 heatsink joined #perl6
02:20 heatsink left #perl6
02:20 noganex joined #perl6
02:22 MasterDuke ugexe: thanks, i'll give that a try
02:23 committable6 joined #perl6
02:37 MilkmanDan joined #perl6
03:09 kaare__ joined #perl6
03:10 labster joined #perl6
03:14 ju_ joined #perl6
03:23 mcmillhj joined #perl6
03:37 Actualeyes joined #perl6
03:39 mcmillhj joined #perl6
03:50 mcmillhj joined #perl6
04:06 samcv more netsplitting. yay
04:13 amalia_ joined #perl6
04:22 mcmillhj joined #perl6
04:32 committable6 joined #perl6
04:32 bisectable6 joined #perl6
04:32 benchable6 joined #perl6
04:49 mcmillhj joined #perl6
04:56 gfldex joined #perl6
04:58 Cabanossi joined #perl6
05:03 canopus_ joined #perl6
05:03 mcmillhj joined #perl6
05:15 mcmillhj joined #perl6
05:46 awwaiid m: say "Perl6 is a cross between {<Ruby Erlang Lisp APL Haskell Perl5 JS Esperanto>.pick(2).join(" and ")}"
05:46 camelia rakudo-moar 8a70c9: OUTPUT«Perl6 is a cross between Esperanto and JS␤»
05:47 * TimToady wonders what we borrowed from Esperanto...
05:47 moritz the concepts of using verbs and nouns :-)
05:47 TimToady um...
05:49 mcmillhj joined #perl6
05:50 awwaiid haha
05:50 awwaiid Constructed language?
05:50 awwaiid Language that takes from others?
05:50 awwaiid Humor but seriously?
05:51 TimToady well, but Ruby, Erlang, Haskell, Perl5 do that too
05:52 TimToady we don't really borrow much from JS either
05:52 awwaiid yeah, I almost left JS out. And added Esperanto as a joke. Though now that I'm re-reading https://en.wikipedia.org/wiki/Esperanto those three goals of the language author don't sound too bad
05:58 awwaiid What would your list for a semi-joking .pick(2) list be?
06:00 Pierre_ joined #perl6
06:01 TimToady m: say "Perl6 is a cross between {<Ruby Erlang Lisp APL Haskell Perl5 Ada English Smalltalk awk BASIC Python C C++ C#>.pick(2).join(" and ")}"
06:01 camelia rakudo-moar 8a70c9: OUTPUT«Perl6 is a cross between C and Smalltalk␤»
06:01 awwaiid I like :)
06:02 mcmillhj joined #perl6
06:02 awwaiid SNOBOL?
06:03 TimToady a bit
06:03 TimToady maybe Pascal
06:03 TimToady (one-pass parsing, after all)
06:04 awwaiid I feel like some influences are more like libraries or patterns rather than languages, like Supplies and such
06:04 awwaiid not as much fun for a list though
06:04 awwaiid At some point that's where genesis starts to kick in
06:04 TimToady well, Supplies are pretty much observables from C#, even if jnthn put 'em in, not me
06:04 awwaiid ahh
06:05 awwaiid I don't know enough C# to have pattern-matched against it :)
06:06 awwaiid gnight #perl6!
06:06 TimToady o/
06:08 cyphase joined #perl6
06:09 darutoko joined #perl6
06:10 spider-mario joined #perl6
06:22 wamba joined #perl6
06:28 CIAvash joined #perl6
06:35 mcmillhj joined #perl6
06:51 moritz \o
07:01 woolfy left #perl6
07:06 nadim joined #perl6
07:17 cyphase joined #perl6
07:19 andrzejku joined #perl6
07:20 mcmillhj joined #perl6
07:20 firstdayonthejob joined #perl6
07:22 pierre_ joined #perl6
07:35 mcmillhj joined #perl6
07:41 cyphase joined #perl6
07:47 BenGoldberg joined #perl6
07:49 RabidGravy joined #perl6
07:51 zengargoyle seems i need to adjust my time schedule.  backlog always has interesting conversations i'm sad to have missed.
07:52 DrForr Part of the fun of living 3 hours off UTC :)
07:52 DrForr (at least in my case)
07:53 zengargoyle would there be an easy way to dump out the Texas <=> Unicode mappings from withing P6 vs digging through source?  i've been pondering crafting a .XCompose that uses Texas mappings directly.
07:54 DrForr You could do it through NQP code.
07:54 zengargoyle it might be nice to have a script or module that could dump XCompose (or other IME suitable format).
07:58 DrForr I think those are :sym-prototyped methods on the grammar, you could introspect the grammar directly and get the method names, but what they correspond to in Texas would be the hard part.
08:05 DrForr Perl6::Grammar has symbols like ÷ but there's just a marker for their precedence in the code.
08:05 DrForr (rakudo/src/Perl6/Grammar.nqp)
08:05 zengargoyle i was sorta expecting it to not be as simple as i would like.
08:06 DrForr It's also worth contemplating custom Unicode operators :(
08:06 mcmillhj joined #perl6
08:07 zengargoyle like it's probably easier to just keep a text file yourself.  custom isn't in my interest, actually if you already know how to type them there's probably already a XCompose mapping of some sort.
08:07 cyphase joined #perl6
08:08 zengargoyle and you'll know the ones you use yourself or already know.  just Compose-(+) might be better for some than whatever already exists in XCompose or vim-digraphs etc.
08:08 Ven_ joined #perl6
08:09 DrForr It'd be nice to have a core module that maintains the mappings; it could be created at compile-time, and it's easy to argue that custom Unicode operators won't necessarily have Texas equivalents, it's up to the operator's author.
08:09 DrForr Of course this is hand-wavery on my part.
08:10 zengargoyle mine too :)
08:12 DrForr (for context I'm currently enumerating delimiters for string variants for Perl6::Tidy, so I feel your pain acutely.)
08:13 DrForr The grammar just lumps '' through Q :q ^^ into a single string, but looking at the dataset there might be a way to just subtract the range around <nibble>.
08:15 pierre_ joined #perl6
08:17 DrForr (yes, Q:to is just an adverb on a Q-string. Not complaining, just figuring out how to nibble away at it. (hee))
08:17 zengargoyle i'm just trying to ease back into P6, been too away/busy for the past 8 months or so
08:18 Actualeyes joined #perl6
08:19 DrForr Well, you can always release a module that just does the static mapping, and offer a patch to the build scripts later :)
08:21 zengargoyle yeah, was just thinking of 'mapping' => 'FULL UNICODE NAME THING' data file and going from there...
08:21 mcmillhj joined #perl6
08:25 zengargoyle i usually use a rfc1345 input method (and have a script to search for the right key combination) but it's missing some things and an IME switch is a PITA
08:26 gfldex zengargoyle: already solved :) https://gfldex.wordpress.com/2016/08/31/one-line-of-unicode-at-you-fingertips/
08:28 zengargoyle don't use screen and XCompose/ibus works in almost everything.
08:29 zengargoyle and digraphs are a bit limiting and get confusing (at least to me) esp when they differ from one program to another.
08:29 gfldex zengargoyle: the script got a fairly big hash that you may be able to transform into whatever input XCompose likes
08:30 DrForr . o ( At your fingertips: Unicode )
08:31 jonadab joined #perl6
08:33 zengargoyle gfldex: i get ya.  XCompose already handles most of those (module looking them up to be sure) but Compose-<char>-" puts ümlats on anything....
08:35 zengargoyle and Compose-<-< « ... i guess i don't really see need for plugin-ish stuff (at least on X using xterms ...)
08:36 * zengargoyle does go grrr at laptops and lack of extra keys that can be easily used for such things.
08:39 * zengargoyle and fonts that don't have *every* unicode glyph. :)
08:41 * zengargoyle and missing my bitmapped fonts now that laptop is HiDPI and they're all too small.
08:41 cibs joined #perl6
08:42 gfldex zengargoyle: freemono works for me https://www.gnu.org/software/freefont/
08:43 espadrine joined #perl6
08:48 cibs joined #perl6
08:51 zengargoyle gfldex: cool, i'll check it out.  i started from scratch on this laptop (instead of usual clone old install and tweak) and think i need to tweak fontconfig a bit.
08:56 wamba joined #perl6
08:56 zengargoyle i think my eyes are so used to bog standard xterm fixed that all ttf fonts feel wrong.
09:00 Ven_ joined #perl6
09:09 Ven_ joined #perl6
09:09 pierre_ Hi perl6
09:09 DrForr Afternoon.
09:09 pierre_ i'm playing with NativeCall, i am a bit stuck, searching for some wisedom
09:10 lizmat joined #perl6
09:10 pierre_ i have a C struct that contains a callback, not sure who to translate that to perl6 with native call
09:10 shadowpaste "pierre_" at 217.168.150.38 pasted "Callback in Stuct and native call" (6 lines) at http://fpaste.scsys.co.uk/533953
09:11 pierre_ if someone has any idea for that
09:11 DrForr https://github.com/drforr/perl6-Inline-Scheme-Guile does something similar.
09:12 labster joined #perl6
09:14 pierre_ i do not see any callback there,
09:14 pierre_ my problem here, is the struct is given to the library which will call the callback
09:15 pierre_ yep, except if i am misreading something, i do not see callback there
09:16 DrForr Sorry, I was thinking of something else.
09:16 pierre_ i'll check a few module using nativecall
09:16 pierre_ i did not find any module doing that yet, but for sure there must be some
09:18 DrForr Ah, https://github.com/drforr/perl6-readline may be closer.
09:18 DrForr Look at the cb-echo example.
09:22 DrForr Line 15 is the callback itself, line 44 sets it up, line 1304 in the library is the prototype for the native function.
09:22 dalek Inline-Perl5: 929a640 | niner++ | / (3 files):
09:22 dalek Inline-Perl5: Wrap P5 hashes instead of copying for is raw arguments to callbacks
09:22 dalek Inline-Perl5:
09:22 dalek Inline-Perl5: This allows for writing back to the underlying Perl 5 hash and has
09:22 dalek Inline-Perl5: the potential for performance improvements as we can save a lot of
09:22 dalek Inline-Perl5: copying.
09:22 dalek Inline-Perl5: review: https://github.com/niner/Inline-Perl5/commit/929a6400b9
09:23 pierre_ i'll play with taht,
09:23 pierre_ here my biggest problem is that i need to declare a CStruct, whre one of the member is a callbac
09:24 DrForr You probably need to treat it as a CPointer.
09:24 pierre_ i guess so
09:37 Actualeyes joined #perl6
09:48 poohman joined #perl6
09:48 FROGGS pierre_: after that you can cast it using a sub declaration: https://github.com/rakudo/rakudo/blob/nom/t/04-nativecall/19-function-pointers.t
09:48 FROGGS pierre_: err, using a signature
09:49 poohman Hello all, another question in Grammars, what and how exactly do we return something using make in the action class?
09:49 FROGGS we attach the thing you made to $/.made
09:50 Zoffix left #perl6
09:50 FROGGS which in turn is available as $<foo>.made in an outer method bar (i.e. when you have a token bar { <foo> })
09:50 pierre_ interesting, for now, i just have a tons of segfault
09:51 FROGGS pierre_: segfaults often mean that you CStruct is not identical to the one provided by the library
09:51 FROGGS pierre_: different sizes, attributes, and so on
09:52 pierre_ yep, i'm pretty sure it's segfault when it tries to "call the callback"
09:52 FROGGS is the signature correct?
09:52 poohman what will be the difference between $<foo>.Str for example and $<foo>.made.Str??
09:53 FROGGS or does it segfault within the callback body?
09:53 pierre_ not sure yet, i need to investigate more
09:53 FROGGS poohman: $<foo>.Str stringifies the match, and not what the action method made
09:53 FROGGS poohman: and the match is just the text that that token matched
09:54 poohman so the action method does not modify the original match of the token??
09:54 FROGGS poohman: correct
09:54 poohman great, thanks, ill give that a shot
09:55 jferrero joined #perl6
09:59 poohman Thanks again Froggs - that helped a lot - should have asked a lot earlier
10:02 FROGGS :o)
10:05 domidumont joined #perl6
10:06 spebern joined #perl6
10:09 poohman joined #perl6
10:10 pierre_ class msgpack_packer is repr('CStruct') { has Pointer[void] $.data; has Pointer $.callback; }
10:10 poohman token keyval
10:10 poohman { $<key>=[<-[=]>+] '=' \h* $<val>=[\N+] \n }
10:10 pierre_ i do not find any way to add a signature to that callback
10:10 domidumont joined #perl6
10:10 poohman sorry one more question
10:11 poohman nowhow can I return for $<key> from my action class
10:12 poohman if I say make in keyval action class will I not return $keyval.made?
10:19 pierre_ hum, i can pass callback as argument to a function, but i am really stuck at passing a callback to a function within a struct
10:20 FROGGS poohman: you have to make key and val their own tokens
10:21 FROGGS poohman: then you can define action methods
10:21 FROGGS pierre_: at some point you should have an instance of msgpack_packer, right? then you can cast $obj.callback as shown above
10:22 pierre_ yes, i have an instance
10:22 FROGGS how is it called?
10:22 pierre_ but how can i cast one attribute
10:22 pierre_ my $packer = msgpack_packer.new( )
10:23 poohman thanks
10:23 FROGGS nativecast(:(--> int32), $packer.callback);
10:23 FROGGS pierre_: though, you need to add the right signature there
10:23 pierre_ let me try then , but where would i write the code of it
10:23 pierre_ because that will be called from the c lib
10:24 FROGGS ohh
10:25 FROGGS hmmm
10:25 FROGGS I'm not sure that this is supported currently
10:26 FROGGS you can pass callbacks to C as shown here: https://github.com/rakudo/rakudo/blob/nom/t/04-nativecall/08-callbacks.t
10:26 FROGGS but I dunno if/how you can/could have callbacks as CStruct members that will be called by C
10:27 pierre_ exaclty, i am able to give a call back directly
10:27 pierre_ but the library i want to use,
10:27 FROGGS m: use NativeCall; class Foo is repr<CStruct> { has &.cb; }
10:27 camelia rakudo-moar fd5ef8: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤CStruct representation only handles int, num, CArray, CPointer, CStruct, CPPStruct and CUnion␤at <tmp>:1␤»
10:27 pierre_ i stumble accross taht several time :)
10:28 FROGGS pierre_: can you show me the library's headers/documentation?
10:28 pierre_ yes
10:29 pierre_ https://github.com/msgpack/msgpack-c
10:29 pierre_ and more accuraltely
10:30 pierre_ to call that : https://github.com/msgpack/msgpack-c/blob/master/include/msgpack/pack.h#L101
10:30 FROGGS what about this? https://github.com/msgpack/msgpack-c/blob/master/include/msgpack/pack.h#L42
10:30 pierre_ the msgpack_packer type is defined there https://github.com/msgpack/msgpack-c/blob/master/include/msgpack/pack.h#L37
10:31 pierre_ it's static
10:31 pierre_ i can't access it :(
10:31 FROGGS damn
10:31 pierre_ or i do not do how to do it, but it's not in the symbol table
10:32 pierre_ i have a pure perl implementation of MessagePack, but it's slow , so before adding that to ecosystem
10:32 FROGGS then you cant call it
10:32 pierre_ i wanted to add a wrapper to the  lib
10:33 cpage_ joined #perl6
10:33 FROGGS should be an option yes
10:34 FROGGS the proper way would be to implement callbacks as attributes ;o)
10:34 pierre_ the perl5 version seems to be adding a c wrapper around the lib
10:34 pierre_ and XS access the wrapper,
10:35 pierre_ but i am really newbiw with nativecall, and i do not really see how to compile and make a package of somtehing like that
10:36 FROGGS look at LibraryMake, it should be helpful here
10:36 pierre_ i will
10:45 zengargoyle pierre_: https://github.com/zengargoyle/p6-Algorithm-Trie-libdatrie -- is a module that builds a simple library and a module that uses it.
10:45 * zengargoyle hopes it still works
10:46 pierre_ ok, thank you
10:52 zengargoyle i'm pretty sure it worked back when 6.c was released.  may not be current best practice... but builds a simple .so library that's built and stored and loaded along with the P6 code yadda yadda.
10:54 * zengargoyle has making sure my modules still work on the TODO list :/
11:12 bob777 joined #perl6
11:13 doublec left #perl6
11:15 zakharyas joined #perl6
11:27 lizmat joined #perl6
11:34 bioduds joined #perl6
11:34 bioduds hey guys
11:34 yoleaux 16 Sep 2016 15:42Z <perlawhirl> bioduds: a cleanup of your script turned into a rewrite. Feel free to steal any ideas from here: https://gist.github.com/0racle/3d157c4ff7777cbeb2cce74dcdcee130
11:34 bioduds is there a way for me to have bioduds nick reserved to me?
11:34 bioduds another question, infinite loop in perl6 is better done with loop?
11:35 FROGGS bioduds: read the freenode FAQ
11:35 moritz yes
11:35 moritz loop { }
11:35 bioduds tx :D
11:41 pierre_ joined #perl6
11:47 edne joined #perl6
11:47 edne left #perl6
12:25 yary joined #perl6
12:32 yary perl6: my $*TOLERANCE = .1; say 11 =~= 10;
12:33 camelia rakudo-jvm cd19db, rakudo-moar fd5ef8: OUTPUT«True␤»
12:33 mst bioduds: /msg nickserv help register
12:33 timotimo tolerance is multiplicative
12:33 yary joined #perl6
12:34 timotimo ...
12:34 yary joined #perl6
12:34 mst timotimo: timotimo not implemented at line 1?
12:35 timotimo yary: tolerance is multiplicative
12:35 * mst duct tapes yary to the channel
12:35 yary I am looking at an example from https://docs.perl6.org/language/operators
12:36 yary in my rakudo it gives "false" whereas the docs say "true" and was wondering if the bug was fixed
12:36 timotimo what's your rakudo version?
12:37 yary 2016.07.1 built on MoarVM version 2016.07
12:37 timotimo committable6: releases my $*TOLERANCE = .1; say 11 =~= 10;
12:37 committable6 timotimo, https://gist.github.com/3936aae4b8026f05ca50e25d91837130
12:37 mst yary: that's what I'm running, and I get True
12:38 mst yary: perhaps you could show us exactly how you're testing this?
12:38 yary right and camelia gave the correct answer also. I  just need an update.
12:38 timotimo yeah, it gives True on any release after 2015.11
12:38 mst yary: um, no, my 2016.07.1 gives the correct answer
12:38 yary Ah... do it in the REPL
12:38 timotimo haha, the repl
12:38 yary on two separate lines!
12:38 mst oh, well, yes
12:38 timotimo yeah, i'd like to tell everybody to never use the repl if you expect something to work
12:38 mst the scoping for that sort of thing is odd
12:39 yary sadness
12:39 timotimo when it involves variables or something ...
12:39 MasterDuke i think there's some pre-existing ticket about dynamic variables in the repl
12:39 mst yary: works in the repl in one line btw
12:39 mst which is usually what I do to double check for weirdness
12:40 yary ok... I can treat it like perl5's "-de 1" mode, which I use often, there lexical variables only live on one line.
12:40 Zoffix joined #perl6
12:41 nadim joined #perl6
12:41 mst wow, I'd forgotten there were still people who used -de 1
12:41 Zoffix yary, lexicals work fine. You're trying to use a dynamic var
12:41 mst see tinyrepl from Eval::WithLexicals
12:41 mst or doy's Reply
12:41 mst for sensible perl5 options
12:41 mst (no, don't use Devel::REPL, Reply is better, doy learned from my mistakes writing the former ;)
12:41 Zoffix yary, I mean in our repl :}
12:41 yary Zoffix, I just came off a thread on perl6-language showing a subtle misbehavior with lexicals in the REP:L
12:41 timotimo what it -de 1?
12:42 * Zoffix will never understand why people like the REPL so much
12:42 yary "perl -de 1" is "perl -de 0" for optimists
12:42 mst timotimo: drops you into the debugger over no script
12:42 timotimo oh, interesting
12:42 Zoffix left #perl6
12:42 timotimo so like 'perl6-debug'
12:42 MasterDuke RT #78068
12:42 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=78068
12:43 mst I've no idea
12:43 mst I don't use debuggers
12:43 buggable joined #perl6
12:43 timotimo perl6-debug is pretty cool. you can use it to single-step through regex matches and it'll show you what's matching what and such
12:44 mst I like things that provide that sort of information as a log
12:44 timotimo right
12:44 timotimo we want that kind of thing in the future, too
12:45 NeuralAnomaly joined #perl6
12:45 timotimo but we do have Grammar::Tracer
12:45 NeuralAnomaly joined #perl6
12:45 yary Zoffix, about the perl6-REPL bug- try this in 3 lines:  "my Hash $h = {a=>1,b=>2};subset mh of Str where $h{$_}:exists;my mh $x = 'b'"
12:46 mst I've generally found that if one grabs the tty of a debugger and sends it the 'single step' command in an infinite loop, one gets a log of some sort
12:46 timotimo hehe.
12:46 timotimo maybe our debugger wants first-class support for that kind of feature
12:46 mst it's much like the raison d'etre of /usr/bin/yes, but with more duct tape
12:47 mst well, yes, this is one of those things that's an elegant workaround for everything being made of urine and the cat being nowhere to be found
12:48 timotimo :)
12:49 timotimo we're the cat
12:56 rudi_s joined #perl6
12:59 tony-o i am the walrus
12:59 mst coo coo cashew
12:59 Zoffix joined #perl6
13:00 Zoffix yary, seems to be an issue with thunking; if I write it as 「where { $h{$_}:exists }」 it works fine
13:00 Zoffix BTW there's a doc bug in the three-line examle. Both +tol and -tol give true: https://docs.perl6.org/language/operators#infix_=~=
13:01 Zoffix And I'm pretty sure =~= doesn't use absolute tolerance
13:01 Zoffix s: &infix:<=~=>
13:01 SourceBaby Zoffix, Sauce is at https://github.com/rakudo/rakudo/blob/fd5ef86/src/core/Numeric.pm#L264
13:01 poohman joined #perl6
13:02 Zoffix Right. It's relative unless one of the values is zero
13:02 * Zoffix leaves back to put finishing touches on the release bot
13:02 Zoffix left #perl6
13:15 yary joined #perl6
13:18 AlexDaniel joined #perl6
13:24 dalek doc: 4cc43ee | (Jan-Olof Hendig)++ | doc/Language/operators.pod6:
13:24 dalek doc: An incorrect result was being shown in one of the examples for =~=
13:24 dalek doc: review: https://github.com/perl6/doc/commit/4cc43eea89
13:32 bjz joined #perl6
13:34 rgrinberg joined #perl6
13:38 bjz_ joined #perl6
13:40 bjz_ joined #perl6
13:44 domidumont joined #perl6
13:50 skids joined #perl6
13:52 perlawhirl joined #perl6
13:56 rindolf joined #perl6
13:57 sjoshi joined #perl6
14:00 bjz joined #perl6
14:02 ringer1 joined #perl6
14:04 Ven_ joined #perl6
14:06 bioduds guys, I believe this here is outdated http://perl6maven.com/tutorial/
14:10 kaare__ joined #perl6
14:10 gfldex bioduds: Published on 2012-06-27 (on the about page)
14:11 mst and it's perlmaven so 50/50 it was ever accurate anyway
14:16 Ven_ joined #perl6
14:17 bjz joined #perl6
14:25 bjz joined #perl6
14:28 Ven__ joined #perl6
14:29 bjz joined #perl6
14:29 sjoshi joined #perl6
14:30 bjz joined #perl6
14:31 timotimo it doesn't even seem to work; 500 bad gateway
14:32 bjz joined #perl6
14:33 timotimo oh, some of it works
14:33 timotimo heh. there's a comment that compares the performance of just a simple print between perl5 and perl6
14:33 timotimo that comment is 3 years old and perl6 used to take 1.8s on that person's machine to run
14:33 timotimo 0.1s of that was just system time
14:34 nine oh the times :)
14:35 Ven_ joined #perl6
14:36 timotimo o tempora o moares
14:37 bjz joined #perl6
14:42 Ven_ joined #perl6
14:43 BenGoldberg joined #perl6
14:45 ka joined #perl6
14:48 CIAvash joined #perl6
14:50 moritz o tempora o moarvm :-)
14:52 RabidGravy joined #perl6
15:01 laurus joined #perl6
15:01 laurus left #perl6
15:10 setty1 joined #perl6
15:19 Ven_ joined #perl6
15:27 Ven_ joined #perl6
15:30 dalek doc: cda2ec1 | (Jan-Olof Hendig)++ | doc/Language/operators.pod6:
15:30 dalek doc: Changed to example slightly to drive home the fact that the =~= operator is not arithmetically symmetrical (doesn't do ± Δ)
15:30 dalek doc: review: https://github.com/perl6/doc/commit/cda2ec1e19
15:31 * dogbert17 should proofread commit messages more closely :(
15:33 Ven_ joined #perl6
15:35 tushar joined #perl6
15:36 tushar What "so" keyword do? Is there any documentation available on it?
15:37 timotimo it's the opposite of "not"
15:37 timotimo https://docs.perl6.org/routine/so
15:38 tushar timotimo, Thanks.
15:39 mst tushar: you know how people often use !! in e.g. C to force boolean? perl6 has a name for it rather than an idiom
15:40 tushar mst, hmm.. go it. What will be test case for it? I meant where it will be useful?
15:41 mst er. anywhere you'd use !! in other languages.
15:41 perlawhirl tushar: prefix '?' forces boolean as well... 'so' is the same but with a looser precedence
15:42 perlawhirl m: say so 'baz' eq any < foo bar >
15:42 camelia rakudo-moar 3583e2: OUTPUT«False␤»
15:42 perlawhirl m: say 'baz' eq any < foo bar > # without so
15:42 camelia rakudo-moar 3583e2: OUTPUT«any(False, False)␤»
15:42 tushar mst, perlawhirl, thanks for your explanation.
15:48 moritz tushar: we even have an FAQ :-) https://docs.perl6.org/language/faq.html#What_is_so?
15:51 tushar moritz, thanks. I missed that. I apologize for that
15:53 moritz tushar: no problem
15:56 Ven_ joined #perl6
15:59 poohman joined #perl6
16:14 Ven_ joined #perl6
16:30 Ven_ joined #perl6
16:33 * AlexDaniel is going to write another bunch of stupid comments on old doc issues
16:36 stmuk does anyone know of a linux browser font with the unicode mag glass for the doc.perl6.org search?
16:37 Guest78798 joined #perl6
16:37 Ven_ joined #perl6
16:43 NeuralAnomaly joined #perl6
16:45 AlexDaniel stmuk: yes
16:45 AlexDaniel stmuk: unifont
16:45 AlexDaniel stmuk: if you're using debian, then ttf-unifont package is probably what you want
16:46 Ven_ joined #perl6
16:46 stmuk I am and I'll try it thanks
16:48 FROGGS why not use this? http://fontawesome.io/icon/search/
16:53 canopus joined #perl6
16:54 spebern joined #perl6
16:58 Ven_ joined #perl6
17:00 woolfy joined #perl6
17:00 firstdayonthejob joined #perl6
17:01 poohman joined #perl6
17:03 dalek doc: 12a4bf4 | (Armand Halbert)++ | doc/Language/glossary.pod6:
17:03 dalek doc: Commented out :rotate adverb example, add back when it works. Fixes #895
17:03 dalek doc: review: https://github.com/perl6/doc/commit/12a4bf485a
17:03 dalek doc: cf7e7b3 | RabidGravy++ | doc/Language/glossary.pod6:
17:03 dalek doc: Merge pull request #910 from ahalbert/895
17:03 dalek doc:
17:03 dalek doc: Commented out :rotate adverb example, add back when it works. Fixes #895
17:03 dalek doc: review: https://github.com/perl6/doc/commit/cf7e7b31c4
17:04 dalek doc: 0aa3a51 | (Sterling Hanenkamp)++ | doc/Type/IO/Socket/Async.pod6:
17:04 dalek doc: Correct info about closing an async socket
17:04 dalek doc: review: https://github.com/perl6/doc/commit/0aa3a519eb
17:04 dalek doc: cb56748 | RabidGravy++ | doc/Type/IO/Socket/Async.pod6:
17:04 dalek doc: Merge pull request #902 from zostay/io-async-close
17:04 dalek doc:
17:04 dalek doc: Correct info about closing an async socket
17:04 dalek doc: review: https://github.com/perl6/doc/commit/cb56748dc3
17:05 lizmat joined #perl6
17:12 Ven_ joined #perl6
17:13 NeuralAnomaly joined #perl6
17:14 travis-ci joined #perl6
17:14 travis-ci Doc build failed. Jonathan Stowe 'Merge pull request #910 from ahalbert/895
17:14 travis-ci https://travis-ci.org/perl6/doc/builds/160691474 https://github.com/perl6/doc/compare/cda2ec1e1958...cf7e7b31c47b
17:14 travis-ci left #perl6
17:18 Ven_ joined #perl6
17:23 Ven_ joined #perl6
17:27 Ven__ joined #perl6
17:27 bioduds hi guys
17:27 bioduds how's Perl6 AWS services integration doing? Do you guys know modules and stuff to help that get going? tx
17:30 DrForr Well, you can always check out the modules on modules.perl6.org.
17:31 timotimo i don't think we have anything in particular, but isn't it just a whole bunch of REST apis?
17:32 BenGoldberg joined #perl6
17:35 bioduds 2 modules on modules.per6.org they are a bit far from whats needed to integrate main services like dynamoDB, SQS and so on
17:35 mst bioduds: install Inline::Perl5, use http://p3rl.org/Paws
17:36 bioduds timotimo, not actually, many are somewhat particular integrations I believe
17:36 timotimo oh, OK
17:37 BenGoldberg joined #perl6
17:37 bioduds mst: tx. do you know if P5 does cover all of AWS integration?
17:38 mst bioduds: did you click the link and look?
17:52 poohman Hello all, can anybody tell me how I can access the members of the data class i created in my Grammar after the parsing is over
17:53 DrForr poohman: parse($text,:actions(Actions.new)).ast <-- The .ast is the important bit.
17:55 nadim joined #perl6
17:57 poohman Hello DrForr, but doesnt .ast give me the whole Grammar tree, (tokens, regexs tree)? Or does it let us access the Data Class created in the Grammar??
17:58 DrForr .parse(...) returns the Match object, .parse(...).ast returns the tree that you built with .made().
18:01 DrForr Er, .make.
18:03 poohman oh ok let me check
18:16 NeuralAnomaly joined #perl6
18:17 timotimo yes, you have to use .make in order to put the stuff in there
18:18 timotimo you can just put an action method TOP hat does "make self"
18:18 timotimo then it'll keep the Action class instance around for you
18:19 mst TOP HAT
18:20 timotimo TOP COMMENT
18:20 DrForr FIRST POST
18:20 MasterDuke timotimo: in moarvm, how do you prevent threads from read/writing each other's data structures?
18:21 timotimo how do you mean that?
18:21 poohman Is it necessary that the data object has to be in the TOP method?
18:21 timotimo we have a few things that have locks installed on either the threadcontext, the instance, or maybe serialization contexts
18:22 timotimo poohman: whatever piece of the parse tree you want to access to get the object out of the whole
18:22 MasterDuke "Address 0xffefffe20 is on thread 1's stack", i assume thread != 1 is trying to access that address?
18:22 timotimo TOP is a convention
18:23 timotimo data on the stack shouldn't be accessed by other threads unless things have been coordinated up front
18:23 MasterDuke "status = *(MVMint64*)data->process->data", that's the problem line
18:23 NeuralAnomaly joined #perl6
18:25 MasterDuke well, and i think the "MVM_free(data->process->data)" on the next line is what causes the segfault
18:25 timotimo what is that from?
18:25 timotimo some repr?
18:25 poohman timotimo: If I create a data structure using new in one method - how can I append to the same object in another method- can I somehow assign the oject and access it in other token method?
18:26 timotimo sorry, watching a movie at the same time
18:26 timotimo poohman, what you pass as :actoins will be the self in all action methods called
18:26 timotimo so if you pass an instance of your action class, you'll be able to persist data through attributes of that, on the "self"
18:27 poohman oh ok, thanks
18:27 MasterDuke src/io/syncpipe.c: static MVMint64 do_close(MVMThreadContext *tc, MVMIOSyncPipeData *data)
18:28 timotimo and "make" is a little bit like a return (except it doesnt interrupt control flow), but the flow of data goes in the same direction as a return wuld do it
18:28 timotimo MasterDuke: it's surprising to me that the pipe would be allocated on a thread's stack
18:28 timotimo oh, wait, syncpipc
18:29 timotimo this isn't meant to be used across threads :)
18:29 rindolf joined #perl6
18:29 MasterDuke ah ha, but i'm not!
18:29 timotimo movie requires my full attention now; subtitle reading
18:29 timotimo sorry
18:30 MasterDuke i even tried adding "my $*SCHEDULER = ThreadPoolScheduler.new( max_threads => 1 )"
18:30 MasterDuke no worries
18:30 NeuralAnomaly joined #perl6
18:30 NeuralAnomaly joined #perl6
18:30 TakinOver joined #perl6
18:34 tushar joined #perl6
18:36 Ven_ joined #perl6
18:41 tushar_ joined #perl6
18:41 zakharyas joined #perl6
18:47 timotimo even if you have just one thread for scheduling things, there's a event-loopy thread that handles everything from file watchers to async sockets and processes
18:51 mst but sadly not yet unix sockets
18:52 MasterDuke "for ^100{ my $proc = run(:out, :bin, "ls"); run(:in($proc.out), :bin, "true");}" is what i'm running, so far it always segfaults before finishing
18:54 dalek doc: bd02fa8 | gfldex++ | doc/Language/typesystem.pod6:
18:54 dalek doc: fix typo
18:54 dalek doc: review: https://github.com/perl6/doc/commit/bd02fa8a59
18:56 woolfy joined #perl6
18:57 gfldex m: my $i is default(0 does role :: { method defined { False } }); dd $i.defined;
18:57 camelia rakudo-moar 454964: OUTPUT«Bool::False␤»
18:57 Zoffix joined #perl6
18:58 poohman joined #perl6
18:59 newbie1 joined #perl6
18:59 firstdayonthejob joined #perl6
18:59 gfldex m: my $i is default(0 does role :: { method defined { False } }); dd $i.defined; $i = 0; dd $i.defined;
18:59 camelia rakudo-moar 454964: OUTPUT«Bool::False␤Bool::False␤»
18:59 gfldex m: my $i is default(0 does role :: { method defined { False } }); dd $i.defined; $i = 1; dd $i.defined;
18:59 camelia rakudo-moar 454964: OUTPUT«Bool::False␤Bool::True␤»
19:00 gfldex m: my $i is default(0 does role :: { method defined { False } }); dd $i.defined; $i = 1; $i = 0; dd $i.defined;
19:00 camelia rakudo-moar 454964: OUTPUT«Bool::False␤Bool::False␤»
19:00 gfldex that feels wrong
19:03 gfldex m: my $i is default(0); dd $i.defined;
19:03 camelia rakudo-moar 454964: OUTPUT«Bool::True␤»
19:04 gfldex m: my $i = (0 does role :: { method defined { False } }); dd $i.defined; $i = 1; dd $i.defined;
19:04 camelia rakudo-moar 454964: OUTPUT«Bool::False␤Bool::True␤»
19:04 gfldex m: my $i = (0 does role :: { method defined { False } }); dd $i.defined; $i = 0; dd $i.defined;
19:04 camelia rakudo-moar 454964: OUTPUT«Bool::False␤Bool::False␤»
19:05 gfldex is there some shortcut that doens't change a value of a container when the new value matches the old one?
19:06 Zoffix Why does it seem wrong?
19:06 Zoffix m: my $i; dd $i.defined
19:06 camelia rakudo-moar 454964: OUTPUT«Bool::False␤»
19:07 gfldex because 0 is defined
19:07 Zoffix Ah
19:07 Zoffix I think the issue here is the mixin mixes in the 0
19:07 gfldex m: my $i = (0); dd $i.defined;
19:07 camelia rakudo-moar 454964: OUTPUT«Bool::True␤»
19:07 Zoffix m: my $i is default(0 but role :: { method defined { False } }); dd $i.defined; $i = 1; $i = 0; dd $i.defined;
19:07 camelia rakudo-moar 454964: OUTPUT«Bool::False␤Bool::True␤»
19:07 gfldex m: my $i = is default(0); dd $i.defined;
19:07 camelia rakudo-moar 454964: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Undeclared routines:␤    default used at line 1␤    is used at line 1␤␤»
19:07 gfldex m: my $i is default(0); dd $i.defined;
19:07 camelia rakudo-moar 454964: OUTPUT«Bool::True␤»
19:09 gfldex i want the role mixed in because that way i can indicate that it's never initialised. When I output the value it's still displayed properly as 0. (That comes from a counting Hash)
19:09 gfldex m: my $i = (0 does role :: { method defined { False } }); dd $i;
19:09 camelia rakudo-moar 454964: OUTPUT«Int+{<anon|57198640>} $i = 0␤»
19:09 Zoffix gfldex, right, so use the `but` version above
19:09 Zoffix Right now you're mixing it into 0
19:10 Zoffix so when you use 0 again, it still has that role mixed in
19:10 gfldex and that is a constant value and thus cached
19:10 Zoffix I think I use that to some benefit in http://perl6.party/post/Exploiting-Perl-6-Code-From-Down-The-Dependency-Chain
19:10 Zoffix *"benefit"
19:10 gfldex m: my $i is default(0 but role :: { method defined { False } }); dd $i.defined; $i = 0; dd $i.defined;
19:10 camelia rakudo-moar 454964: OUTPUT«Bool::False␤Bool::True␤»
19:10 gfldex that feels right :)
19:11 Zoffix New blog post: "Perl6.Fail, Release Robots, and Other Goodies": http://perl6.party/post/Perl6-Fail-Release-Robots-And-Other-Goodies
19:18 PerlJam joined #perl6
19:20 raydiak s: Grammar, 'parsefile'
19:20 SourceBaby raydiak, Sauce is at https://github.com/rakudo/rakudo/blob/4549642/src/core/Grammar.pm#L14
19:23 TakinOver joined #perl6
19:25 dalek doc: 9ba29d9 | (Thor Michael Støre)++ | doc/Language/objects.pod6:
19:25 dalek doc: Fixed small typo
19:25 dalek doc:
19:25 dalek doc: "Roles can by anonymous" -> "Roles can be anonymous"
19:25 dalek doc: review: https://github.com/perl6/doc/commit/9ba29d92ca
19:25 dalek doc: 039fc06 | Altai-man++ | doc/Language/objects.pod6:
19:25 dalek doc: Merge pull request #911 from thormick/thormick-small-typo-1
19:25 dalek doc:
19:25 dalek doc: Fixed small typo
19:25 dalek doc: review: https://github.com/perl6/doc/commit/039fc06695
19:31 labster joined #perl6
19:35 Ven_ joined #perl6
19:53 dalek doc: 0a1c391 | raydiak++ | doc/Type/Grammar.pod6:
19:53 dalek doc: Fix parsefile example: enc is a named parameter
19:53 dalek doc: review: https://github.com/perl6/doc/commit/0a1c3916a9
19:55 Zoffix Github revamped the profile pages
19:55 Zoffix it's now "metro" heh
19:57 Ven_ joined #perl6
19:58 MasterDuke i do like the graphs of commits by repo
19:59 Zoffix Aye. And you can toggle past years too.
20:00 AlexDaniel I haven't decided if I like it yet :)
20:04 b2gills joined #perl6
20:07 bob777 joined #perl6
20:11 canopus_ joined #perl6
20:15 moritz TIL that in 2008, I had more parrot than rakudo commits.
20:16 Ven_ joined #perl6
20:18 cdg joined #perl6
20:21 khw joined #perl6
20:22 cdg joined #perl6
20:31 Ven_ joined #perl6
20:40 _slade_ joined #perl6
20:58 Ven_ joined #perl6
20:59 NeuralAnomaly joined #perl6
20:59 TakinOver joined #perl6
21:01 tushar_ Is there any way to compare length of each array resides in array of arrays with each other and return true on success and false on failure. I hope I am clear enough.
21:01 tushar_ m: my Array @a = [[1..3],[4..6]];
21:01 camelia rakudo-moar c4fd9f: ( no output )
21:01 tushar_ m: my Array @a = [[1..3],[4..6]].say;
21:01 camelia rakudo-moar c4fd9f: OUTPUT«[[1 2 3] [4 5 6]]␤Type check failed in assignment to @a; expected Array but got Bool (Bool::True)␤  in block <unit> at <tmp> line 1␤␤»
21:02 Zoffix tushar_, what's "success"? If they all have same number of elements?
21:02 tushar_ Zoffix, yes
21:02 tushar_ in this case it will check 3 == 3 as both the array has 3 elements
21:02 jnthn m: my @a = [1,2,3], [4,5,6]; say [==] @a
21:02 camelia rakudo-moar c4fd9f: OUTPUT«True␤»
21:03 Zoffix m: my Array @a = [[1..3],[4..6]]; say @a».elems.Set.elems == 1
21:03 camelia rakudo-moar c4fd9f: OUTPUT«True␤»
21:03 jnthn m: my @a = [1,2,3], [4,5,6, 7]; say [==] @a
21:03 camelia rakudo-moar c4fd9f: OUTPUT«False␤»
21:03 Zoffix Oh
21:03 Zoffix jnthn++
21:03 * Zoffix isn't used to metas yet well enough to reach for them on demand :(
21:04 tushar_ Zoffix, jnthn -- thanks guys. You are awesome.. I am in love with Perl 6..
21:04 jnthn To be fair, using the reduction meta-op with a comparison is less common :)
21:04 Zoffix \o/
21:05 jnthn Another cute one is `[<=] @a` (are these numbers in order)
21:05 Ven_ joined #perl6
21:05 * moritz dimly recalls [but] constructions, and shudders
21:06 tushar_ jnthn, I don't know when I will learn all this little tricks.. There are too many of them.. Definitely, in love with Perl 6..
21:09 moritz following #perl6 helps to learn those neat tricks :-)
21:10 Ven_ joined #perl6
21:21 ringer1 joined #perl6
21:23 tushar_ moritz, indeed it is.
21:23 mst moritz: [but] ?
21:23 tushar_ moritz, do perl6 has twitter feed as well that I can follow.
21:31 japhb mst: Adding a list of mixins to a single object
21:32 mst oh, yeat
21:32 mst *neat
21:32 mst so instead of Moo::Role->apply_roles_to_object($object, @roles);
21:32 mst you'd do
21:32 mst $object = [but] ($object, @roles);
21:32 mst ?
21:32 _ramix_ joined #perl6
21:33 japhb mst: Possibly with some slippage, but yeah.
21:33 japhb But then:
21:33 japhb There's [but]=
21:33 mst would that be $object [but]= @roles ?
21:34 * japhb gently points towards camelia  ;-)
21:34 Zoffix m: role Foo {}; role Bar {}; role Ber {}; my @roles = Foo, Bar, Ber; my $o = class {}; $o [but]= @roles; dd $o
21:34 camelia rakudo-moar c4fd9f: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Cannot make assignment out of but because structural infix operators are too diffy␤at <tmp>:1␤------> 3o, Bar, Ber; my $o = class {}; $o [but]=7⏏5 @roles; dd $o␤»
21:35 Zoffix m: role Foo {}; role Bar {}; role Ber {}; my @roles = Foo, Bar, Ber; my $o = class {}; $o = [but] $o,|@roles; dd $o
21:35 camelia rakudo-moar c4fd9f: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Cannot reduce with but because structural infix operators are diffy and not chaining␤at <tmp>:1␤------> 3 Foo, Bar, Ber; my $o = class {}; $o = [7⏏5but] $o,|@roles; dd $o␤    expecting any of:␤…»
21:35 japhb AWWW
21:35 japhb I thought that one was supported!
21:35 Zoffix m: role Foo {}; role Bar {}; role Ber {}; my @roles = Foo, Bar, Ber; my $o = class {}; $o = [[&infix:<but>]] $o,|@roles; dd $o
21:35 camelia rakudo-moar c4fd9f: OUTPUT«<anon|83431568>+{Foo}+{Bar}+{Ber} $o = <anon|83431568>+{Foo}+{Bar}+{Ber}␤»
21:36 Zoffix m: role Foo {}; role Bar {}; role Ber {}; my @roles = Foo, Bar, Ber; my $o = class {}; $o [[&infix:<but>]]= @roles; dd $o
21:36 camelia rakudo-moar c4fd9f: OUTPUT«Cannot resolve caller infix:<but>(...); none of these signatures match:␤    (Mu:D \obj, Mu:U \rolish)␤    (Mu:D \obj, Mu:U \rolish, :$value! is raw)␤    (Mu:U \obj, Mu:U \rolish)␤    (Mu \obj, Mu:D $val)␤    (Mu:D \obj, **@roles)␤    (Mu:U \obj…»
21:36 japhb I wonder if that went away at some point because there was a large WAT
21:36 arnsholt PRetty
21:36 arnsholt --
21:36 arnsholt Gah
21:36 arnsholt Pretty sure [but] used to work
21:36 _ramix_ Hi!, I have a new perl6 module that I would get on the perl6 ecosystem, but I need permission to doing the PR to META.list. The repository module is https://github.com/ramiroencinas/perl6-FileSystem-Capacity
21:36 Zoffix bisectable6, m: role Foo {}; role Bar {}; role Ber {}; my @roles = Foo, Bar, Ber; my $o = class {}; $o [but]= @roles; dd $o
21:36 bisectable6 Zoffix, On both starting points (good=2015.12 bad=b771f1e) the exit code is 1 and the output is identical as well
21:36 bisectable6 Zoffix, Output on both points: ===SORRY!=== Error while compiling /tmp/XM8K2A2KQQ␤Cannot make assignment out of but because structural infix operators are too diffy␤at /tmp/XM8K2A2KQQ:1␤------> o, Bar, Ber; my $o = class {}; $o [but]=<HERE> @roles; dd $o
21:37 japhb Changed pre-Christmas then.
21:37 Zoffix _ramix_, what do you mean "permission"? Just click the pencil icon in top/right: https://github.com/perl6/ecosystem/blob/master/META.list
21:37 Zoffix committable6, 2015.07 m: role Foo {}; role Bar {}; role Ber {}; my @roles = Foo, Bar, Ber; my $o = class {}; $o [but]= @roles; dd $o
21:37 committable6 Zoffix, ¦«2015.07»: ===SORRY!=== Error while compiling /tmp/913keEriMz␤Cannot make assignment out of but because structural infix operators are too diffy␤at /tmp/913keEriMz:1␤------> o, Bar, Ber; my $o = class {}; $o [but]=⏏ @roles; dd $o  «exit code = 1»
21:37 Zoffix Yeah, seems a long time a go
21:39 Zoffix _ramix_, are you sure this stuff works? I think module installers would choke on that https://github.com/ramiroencinas/perl6-FileSystem-Capacity/blob/master/META.info#L11
21:40 Zoffix _ramix_, also, while META.info still works, the new name of the meta file is META6.json
21:41 _ramix_ thanks Zoffix, already did!
21:42 Zoffix I don't see your PR
21:42 TEttinger joined #perl6
21:43 dalek ecosystem: b7b0c9f | (Ramiro Encinas)++ | META.list:
21:43 dalek ecosystem: Add perl6-FileSystem-Capacity
21:43 dalek ecosystem:
21:43 dalek ecosystem: See https://github.com/ramiroencinas/perl6-FileSystem-Capacity
21:43 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/b7b0c9f37f
21:43 dalek ecosystem: 14654d6 | (Zoffix Znet)++ | META.list:
21:43 dalek ecosystem: Merge pull request #250 from ramiroencinas/patch-1
21:43 dalek ecosystem:
21:43 dalek ecosystem: Add perl6-FileSystem-Capacity
21:43 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/14654d68a4
21:43 _ramix_ Zoofix, yes now
21:43 MasterDuke Zoffix: wasn't there some talk a couple days about about the need for a way to specify external (non-Perl 6) dependencies in META6.json?
21:44 MasterDuke and if so, was there any conclusion?
21:44 Zoffix I wasn't following it
21:45 timotimo soooo
21:45 timotimo what did i miss?
21:45 _ramix_ respect the L11, is a valid json. May have problems?
21:46 Zoffix _ramix_, it's valid JSON, but that property is for a list of strings with module names, while you have a list of arrays.
21:46 Zoffix _ramix_, so my question is: why do you think arrays would work?
21:46 _ramix_ ah, ok!
21:47 _ramix_ Zoofix, I will correct
21:48 Zoffix Yup, fails: panda: "resolve stage failed for FileSystem::Capacity::VolumesInfo: Dependency df command from GNU coreutils is not present in the module ecosystem"; zef: "*resolve stage failed for FileSystem::Capacity::VolumesInfo: Dependency df command from GNU coreutils is not present in the module ecosystem)"
21:49 Zoffix .oO( Zoofix... )
21:51 jnthn .oO( Does your zebra keep escaping? Runaway racoon? Attach them firmly to their enclosures with Zoofix(TM) )
21:51 timotimo :D :D :D
21:54 mst Does your panda keep escaping? Runaway raccoon.pl? Attach them firmly to their enclosures with Zeffix(tm)
21:58 _ramix_ Zoofix, fixed depends in https://raw.githubusercontent.com/ramiroencinas/perl6-FileSystem-Capacity/master/META.info
21:59 Zoffix cool
22:03 _ramix_ Zoofix, thanks for your help!
22:04 Zoffix _ramix_, FWIW, say "Used: " ~ $data<used> ~ " bytes"; can be written as just say "Used: $data<used> bytes";
22:05 timotimo jnthn: how do you feel about protecting the "setup" method of the role for NativeCalls with a lock to prevent explosions when multiple threads set up the same routine at the same time?
22:06 MasterDuke _ramix_: also, ".split(/\s+/)" can be written as ".words"
22:07 Ven_ joined #perl6
22:09 Zoffix And when $_ ~~ /linux/ { return linux; } as just when /linux/ { return linux; }
22:09 Zoffix And when $_ ~~ /linux/ { return linux; } as just when /linux/ { linux; }
22:09 Zoffix :)
22:09 Zoffix left #perl6
22:10 timotimo only if that is the last thing in the block, though
22:10 _ramix_ thanks for the suggestions, I will do it.  ;-)
22:16 Ven_ joined #perl6
22:19 zakharyas joined #perl6
22:22 _ramix_ left #perl6
22:22 jnthn timotimo: Sounds fine, though do it by checking, then acquiring the look if not set up, and re-checking, so we don't have to do a lock acquisition on every incovatrion.
22:22 jnthn uh, *invocation
22:25 timotimo right
22:25 timotimo i have a patch locally that does that
22:25 timotimo we call into the setup method only if not $!setup anyway
22:25 timotimo so i just put the whole body into a lock.protect
22:25 timotimo though i didn't put in a re-check, since i used a lock for everything
22:27 jnthn Yeah but
22:28 jnthn If something else does the setup, and then lets go of the lock, then you get the lock...shoudln't do the setup all over again.
22:28 timotimo that's what i mean :)
22:29 jnthn Right, but then you need the re-check? :)
22:29 timotimo i just have to return if $!setup at the very beginning
22:29 timotimo of the protected block
22:32 timotimo oh, also: could we make --debug=3 the default for moarvm's configure?
22:32 timotimo i don't want to constantly teach people how to navigate rakudobrew so they can get debug symbols
22:34 inra joined #perl6
22:35 jnthn timotimo: Can we not just document how they should get a --debug=3 build? :)
22:36 jnthn Or patch rakudobrew to have a way to ask for that?
22:36 timotimo there is a way. i think --moar-options=--debug=3 or something
22:38 jnthn So, note it somewhere(s) prominent?
22:38 timotimo mhm
22:51 kssgill joined #perl6
22:57 perlawhirl joined #perl6
22:58 pierre_ joined #perl6
23:04 asdfgh joined #perl6
23:04 asdfgh how do I remove the first element of an array
23:04 asdfgh .shift returns it as well
23:05 asdfgh I want for it to return all of the other elements that weren't removed
23:05 timotimo yeah
23:05 timotimo then just { do @foo.shift; @foo }
23:05 timotimo er, do in front of the {
23:05 gfldex m: my @a = <a b c>; say @a[1..*]
23:05 camelia rakudo-moar 8fb9ec: OUTPUT«(b c)␤»
23:06 timotimo that doesn't remove the first element, though
23:06 gfldex m: my @a = <a b c>; @a = @a[1..*]; dd @a;
23:06 camelia rakudo-moar 8fb9ec: OUTPUT«Array @a = ["b", "c"]␤»
23:07 timotimo yeah, you can do i tlike that
23:07 timotimo gfldex++
23:07 asdfgh alright, thanks guys
23:07 asdfgh I'm sorry for asking such simple questions sometimes, it's just I've never used a language with this much stuff before
23:07 gfldex autothreading will reveal plenty of footguns
23:08 timotimo you mean junctions?
23:09 gfldex i was thinking of @objs».somemethod() that does a shift on the same @a
23:10 gfldex but a .one junction is equally footgunny
23:12 timotimo if you concurrently shift from an array, you're ni for data loss
23:12 timotimo but in the future, no crashes should come from that
23:13 asdfgh if I have an array of 3 values, and I want to append that array to another array so I can do something like array2[0][1], it says that 1 is out of bounds 0..0
23:13 asdfgh I'm using @array2.append(@array1)
23:14 asdfgh ohhh, the append appends each element in array 1
23:14 asdfgh do I use push?
23:16 gfldex asdfgh: you can use push but you likely want to have a gather/take to create the array (that will be a Seq)
23:17 timotimo push is for appending a single thing, append is for appedning multiple things
23:18 gfldex m: my $s = <a b c>.Seq; $s.shift;
23:18 camelia rakudo-moar 8fb9ec: OUTPUT«Method 'shift' not found for invocant of class 'Seq'␤  in block <unit> at <tmp> line 1␤␤»
23:18 timotimo if you don't want it to take the individual elements out of your array, you'll have to use push
23:22 tushar joined #perl6
23:24 BenGoldberg joined #perl6
23:27 timotimo .u ×
23:27 yoleaux U+00D7 MULTIPLICATION SIGN [Sm] (×)
23:45 asdfgh What graphics library would you guys recommend that isn't raw
23:45 timotimo depends entirely on what you want to do
23:45 asdfgh making a pokemon battling game
23:45 asdfgh something like sdl or allegro preferably
23:46 timotimo SDL2::Raw isn't so terribly bad
23:47 timotimo if you want some vector graphics, you can add cairo to that, but i don't really know how to make cairo work with opengl
23:47 timotimo last time i tried it wasn't possible, but that is now ... 2 years ago?
23:48 asdfgh did you write SDL2_raw timo
23:49 asdfgh the bindings
23:49 timotimo yup, a big chunk of it
23:49 timotimo i also wrote the biggest chunk of the cairo binding
23:50 asdfgh nice
23:50 pierre_ joined #perl6
23:51 timotimo it was easy
23:51 timotimo it's also not complete
23:59 timotimo i have a little binding for sdl2_gpu that i didn't put up yet because i didn't test any of it yet
23:59 timotimo i'm too lazy

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

Perl 6 | Reference Documentation | Rakudo