»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
Set by moritz on 22 December 2015.
00:04 Pierre_ left 00:06 mcmillhj joined 00:10 Ven_ left, mcmillhj left
timotimo raydiak: i'd also go with two roles per term and then putting them all together 00:13
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:14
an EXPORTHOW trick may make that possible; see OO::Monitors or what it's called for an example of EXPORTHOW usage 00:15
other than that: slangs slangs slangs ;)
00:15 Ven_ joined
raydiak oooh good thoughts, thanks timo! 00:16
timotimo that's what my sleep-deprived brain comes up with at these time-of-days ;) 00:17
tomorrow i may have an actual serious look at maybe making a youtube tutorial series for getting up and running with perl6
raydiak better than the things my sleep-deprived brain was coming up with :)
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?
my brain will surely also think a whole bunch about that while i'm desparately trying to catch some Zs 00:19
but a second opinion is always welcome
00:19 mcmillhj joined
raydiak the only other thing not yet mentioned I thought about was using FALLBACK methods but I assume that'd slow things down 00:19
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:20
raydiak oh that's neat, didn't know 00:21
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:24 mcmillhj left 00:25 Ven_ left
timotimo cool 00:26
i'll crash now
have a good one!
you can try how often the body of FALLBACK gets called when you invoke the same method name multiple times 00:27
raydiak yep good idea. you too buddy, thanks for the input, rest well :) 00:28
00:30 [1]ringer1 joined 00:31 ringer1 left 00:34 mcmillhj joined 00:40 mcmillhj left 00:48 mcmillhj joined 00:50 TestNinja joined 00:53 mcmillhj left 01:04 Pierre_ joined 01:09 Pierre_ left 01:12 ringer1 joined 01:14 [1]ringer1 left
awwaiid Hello #perl6!! 01:16
BenGoldberg Hi 01:17
awwaiid hoelzro and I are at StrangeLoop, doing some rakudo hackin'
doy maybe joining us
01:22 gfldex left, bjz joined 01:24 mcmillhj joined
hoelzro o/ 01:26
MasterDuke does anybody here know how to compile a moarvm with debugging (to use with valgrind) using rakudobrew? 01:28
01:30 mcmillhj left 01:32 cpage_ left 01:33 committable6 joined, committable6 left, cpage_ joined 01:35 committable6 joined 01:36 mcmillhj joined 01:41 nadim left, mcmillhj left, committable6 left 01:42 committable6 joined 01:43 committable6 left 01:44 committable6 joined 01:45 labster left, _slade_ left, _slade_ joined 01:52 newbie1 left 01:54 mcmillhj joined 01:59 mcmillhj left 02:01 FROGGS left 02:14 FROGGS joined 02:17 Pierre_ joined, committable6 left
ugexe maybe --configure-opts="--debug" 02:19
02:19 heatsink joined 02:20 heatsink left, noganex joined 02:21 Pierre_ left
MasterDuke ugexe: thanks, i'll give that a try 02:22
02:23 committable6 joined 02:24 noganex_ left 02:37 MilkmanDan left, MilkmanDan joined 02:48 skids left 03:06 committable6 left, bisectable6 left, benchable6 left 03:09 kaare__ joined 03:10 labster joined 03:14 ju_ joined 03:23 mcmillhj joined 03:26 BenGoldberg left 03:28 mcmillhj left 03:37 Actualeyes joined 03:39 mcmillhj joined 03:42 AlexDaniel left 03:44 mcmillhj left 03:50 mcmillhj joined 03:55 mcmillhj left 04:06 zoosha left
samcv more netsplitting. yay 04:06
04:11 amalia_ left 04:13 amalia_ joined 04:22 mcmillhj joined 04:27 mcmillhj left 04:30 khw left 04:32 committable6 joined, bisectable6 joined, benchable6 joined 04:33 perlawhirl left 04:49 mcmillhj joined 04:54 mcmillhj left 04:56 Cabanossi left, gfldex joined 04:58 Cabanossi joined 05:03 canopus_ joined, mcmillhj joined 05:05 canopus left 05:08 mcmillhj left 05:15 mcmillhj joined 05:20 mcmillhj left
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␤»
TimToady wonders what we borrowed from Esperanto... 05:47
moritz the concepts of using verbs and nouns :-)
TimToady um...
05:49 mcmillhj joined
awwaiid haha 05:50
Constructed language?
Language that takes from others?
Humor but seriously?
05:51 labster left
TimToady well, but Ruby, Erlang, Haskell, Perl5 do that too 05:51
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 en.wikipedia.org/wiki/Esperanto those three goals of the language author don't sound too bad
05:54 mcmillhj left 05:57 Actualeyes left
awwaiid What would your list for a semi-joking .pick(2) list be? 05:58
06:00 Pierre_ joined
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␤»
awwaiid I like :)
06:02 mcmillhj joined
awwaiid SNOBOL? 06:02
06:02 cyphase left
TimToady a bit 06:03
maybe Pascal
(one-pass parsing, after all)
awwaiid I feel like some influences are more like libraries or patterns rather than languages, like Supplies and such 06:04
not as much fun for a list though
At some point that's where genesis starts to kick in
TimToady well, Supplies are pretty much observables from C#, even if jnthn put 'em in, not me
awwaiid ahh
I don't know enough C# to have pattern-matched against it :) 06:05
gnight #perl6! 06:06
TimToady o/
06:07 mcmillhj left 06:08 cyphase joined 06:09 darutoko joined 06:10 spider-mario joined, ka left 06:22 wamba joined 06:28 CIAvash joined 06:35 mcmillhj joined 06:40 mcmillhj left 06:46 lizmat left
moritz \o 06:51
07:01 woolfy left 07:06 nadim joined, rgrinberg left 07:07 wamba left 07:10 cyphase left 07:17 cyphase joined 07:19 andrzejku joined 07:20 mcmillhj joined, firstdayonthejob joined 07:21 Pierre_ left 07:22 pierre_ joined 07:25 mcmillhj left 07:35 mcmillhj joined 07:36 cyphase left 07:40 mcmillhj left 07:41 cyphase joined 07:47 BenGoldberg joined 07:49 RabidGravy joined
zengargoyle seems i need to adjust my time schedule. backlog always has interesting conversations i'm sad to have missed. 07:51
DrForr Part of the fun of living 3 hours off UTC :) 07:52
(at least in my case)
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:53
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).
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. 07:58
08:01 cyphase left, _slade_ left 08:03 firstdayonthejob left
DrForr Perl6::Grammar has symbols like ÷ but there's just a marker for their precedence in the code. 08:05
(rakudo/src/Perl6/Grammar.nqp)
zengargoyle i was sorta expecting it to not be as simple as i would like.
DrForr It's also worth contemplating custom Unicode operators :( 08:06
08:06 mcmillhj joined
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
08:07 cyphase joined
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
08:08 Ven_ joined
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
Of course this is hand-wavery on my part.
zengargoyle mine too :) 08:10
DrForr (for context I'm currently enumerating delimiters for string variants for Perl6::Tidy, so I feel your pain acutely.) 08:12
08:12 mcmillhj left
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:13
08:15 pierre_ left, pierre_ joined
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
DrForr Well, you can always release a module that just does the static mapping, and offer a patch to the build scripts later :) 08:19
zengargoyle yeah, was just thinking of 'mapping' => 'FULL UNICODE NAME THING' data file and going from there... 08:21
08:22 mcmillhj joined 08:24 TestNinja is now known as Zoffix
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:25
08:25 Ven_ left
gfldex zengargoyle: already solved :) gfldex.wordpress.com/2016/08/31/on...ingertips/ 08:26
08:26 mcmillhj left
zengargoyle don't use screen and XCompose/ibus works in almost everything. 08:28
08:28 andrzejku left 08:29 jferrero left
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 BenGoldberg left
DrForr . o ( At your fingertips: Unicode ) 08:30
08:31 jonadab left, jonadab joined
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:33
and Compose-<-< « ... i guess i don't really see need for plugin-ish stuff (at least on X using xterms ...) 08:35
zengargoyle does go grrr at laptops and lack of extra keys that can be easily used for such things. 08:36
zengargoyle and fonts that don't have *every* unicode glyph. :) 08:39
08:40 cibs left
zengargoyle and missing my bitmapped fonts now that laptop is HiDPI and they're all too small. 08:41
08:41 cibs joined
gfldex zengargoyle: freemono works for me www.gnu.org/software/freefont/ 08:42
08:43 espadrine joined 08:47 cibs left 08:48 cibs joined
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:51
08:52 Actualeyes left 08:55 bjz left 08:56 wamba joined
zengargoyle i think my eyes are so used to bog standard xterm fixed that all ttf fonts feel wrong. 08:56
08:57 nadim left 09:00 Ven_ joined 09:08 Ven_ left 09:09 Ven_ joined
pierre_ Hi perl6 09:09
DrForr Afternoon.
pierre_ i'm playing with NativeCall, i am a bit stuck, searching for some wisedom 09:10
09:10 lizmat joined
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 fpaste.scsys.co.uk/533953
pierre_ if someone has any idea for that 09:11
DrForr github.com/drforr/perl6-Inline-Scheme-Guile does something similar. 09:12
09:12 labster joined
pierre_ i do not see any callback there, 09:14
my problem here, is the struct is given to the library which will call the callback
yep, except if i am misreading something, i do not see callback there 09:15
DrForr Sorry, I was thinking of something else. 09:16
pierre_ i'll check a few module using nativecall
i did not find any module doing that yet, but for sure there must be some
DrForr Ah, github.com/drforr/perl6-readline may be closer. 09:18
Look at the cb-echo example.
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
09:22 Ven_ left
dalek line-Perl5: 929a640 | niner++ | / (3 files):
Wrap P5 hashes instead of copying for is raw arguments to callbacks

This allows for writing back to the underlying Perl 5 hash and has the potential for performance improvements as we can save a lot of copying.
09:22
pierre_ i'll play with taht, 09:23
here my biggest problem is that i need to declare a CStruct, whre one of the member is a callbac
DrForr You probably need to treat it as a CPointer. 09:24
pierre_ i guess so
09:31 bob777 left 09:37 Actualeyes joined 09:39 lizmat left 09:45 setty2 left 09:48 poohman joined
FROGGS pierre_: after that you can cast it using a sub declaration: github.com/rakudo/rakudo/blob/nom/...pointers.t 09:48
pierre_: err, using a signature
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
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
FROGGS pierre_: segfaults often mean that you CStruct is not identical to the one provided by the library 09:51
pierre_: different sizes, attributes, and so on
pierre_ yep, i'm pretty sure it's segfault when it tries to "call the callback" 09:52
FROGGS is the signature correct?
poohman what will be the difference between $<foo>.Str for example and $<foo>.made.Str??
FROGGS or does it segfault within the callback body? 09:53
pierre_ not sure yet, i need to investigate more
FROGGS poohman: $<foo>.Str stringifies the match, and not what the action method made
poohman: and the match is just the text that that token matched
poohman so the action method does not modify the original match of the token?? 09:54
FROGGS poohman: correct
poohman great, thanks, ill give that a shot
09:55 jferrero joined 09:56 RabidGravy left
poohman Thanks again Froggs - that helped a lot - should have asked a lot earlier 09:59
10:00 labster left
FROGGS :o) 10:02
10:05 domidumont joined 10:06 spebern joined 10:08 poohman left 10:09 domidumont left, poohman joined
pierre_ class msgpack_packer is repr('CStruct') { has Pointer[void] $.data; has Pointer $.callback; } 10:10
poohman token keyval
{ $<key>=[<-[=]>+] '=' \h* $<val>=[\N+] \n }
pierre_ i do not find any way to add a signature to that callback
10:10 domidumont joined
poohman sorry one more question 10:10
nowhow can I return for $<key> from my action class 10:11
10:11 domidumont left
poohman if I say make in keyval action class will I not return $keyval.made? 10:12
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:19
FROGGS poohman: you have to make key and val their own tokens 10:20
poohman: then you can define action methods 10:21
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
FROGGS how is it called?
pierre_ but how can i cast one attribute
my $packer = msgpack_packer.new( ) 10:23
10:23 fritz_ left
poohman thanks 10:23
FROGGS nativecast(:(--> int32), $packer.callback);
pierre_: though, you need to add the right signature there
pierre_ let me try then , but where would i write the code of it
because that will be called from the c lib
FROGGS ohh 10:24
hmmm 10:25
I'm not sure that this is supported currently
you can pass callbacks to C as shown here: github.com/rakudo/rakudo/blob/nom/...allbacks.t 10:26
but I dunno if/how you can/could have callbacks as CStruct members that will be called by C
pierre_ exaclty, i am able to give a call back directly 10:27
but the library i want to use,
FROGGS m: use NativeCall; class Foo is repr<CStruct> { has &.cb; }
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␤»
pierre_ i stumble accross taht several time :)
FROGGS pierre_: can you show me the library's headers/documentation? 10:28
pierre_ yes
github.com/msgpack/msgpack-c 10:29
and more accuraltely
to call that : github.com/msgpack/msgpack-c/blob/...ack.h#L101 10:30
FROGGS what about this? github.com/msgpack/msgpack-c/blob/...pack.h#L42
pierre_ the msgpack_packer type is defined there github.com/msgpack/msgpack-c/blob/...pack.h#L37
it's static 10:31
i can't access it :(
FROGGS damn
pierre_ or i do not do how to do it, but it's not in the symbol table
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
pierre_ i wanted to add a wrapper to the lib
10:33 cpage_ left, cpage_ joined
FROGGS should be an option yes 10:33
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
and XS access the wrapper,
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:35
FROGGS look at LibraryMake, it should be helpful here 10:36
pierre_ i will
zengargoyle pierre_: github.com/zengargoyle/p6-Algorith...-libdatrie -- is a module that builds a simple library and a module that uses it. 10:45
zengargoyle hopes it still works
pierre_ ok, thank you 10:46
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:52
zengargoyle has making sure my modules still work on the TODO list :/ 10:54
10:55 pierre_ left 11:12 bob777 joined 11:13 doublec left 11:15 zakharyas joined 11:17 zakharyas left 11:28 lizmat joined 11:31 TEttinger left 11:34 bioduds joined
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: gist.github.com/0racle/3d157c4ff77...4dcdcee130
bioduds is there a way for me to have bioduds nick reserved to me?
another question, infinite loop in perl6 is better done with loop?
FROGGS bioduds: read the freenode FAQ 11:35
moritz yes
loop { }
bioduds tx :D
11:41 pierre_ joined 11:47 edne joined, edne left 11:53 poohman left 11:57 kaare__ left 12:25 yary joined 12:28 lizmat left
yary perl6: my $*TOLERANCE = .1; say 11 =~= 10; 12:32
camelia rakudo-jvm cd19db, rakudo-moar fd5ef8: OUTPUT«True␤» 12:33
12:33 yary left
mst bioduds: /msg nickserv help register 12:33
timotimo tolerance is multiplicative
12:33 yary joined 12:34 yary left
timotimo ... 12:34
12:34 yary joined
mst timotimo: timotimo not implemented at line 1? 12:34
timotimo yary: tolerance is multiplicative 12:35
mst duct tapes yary to the channel
yary I am looking at an example from docs.perl6.org/language/operators
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?
yary 2016.07.1 built on MoarVM version 2016.07 12:37
timotimo committable6: releases my $*TOLERANCE = .1; say 11 =~= 10;
committable6 timotimo, gist.github.com/3936aae4b8026f05ca...5d91837130
mst yary: that's what I'm running, and I get True
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.
timotimo yeah, it gives True on any release after 2015.11
mst yary: um, no, my 2016.07.1 gives the correct answer
yary Ah... do it in the REPL
timotimo haha, the repl
yary on two separate lines!
mst oh, well, yes
timotimo yeah, i'd like to tell everybody to never use the repl if you expect something to work
mst the scoping for that sort of thing is odd
yary sadness 12:39
timotimo when it involves variables or something ...
12:39 buggable left
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
which is usually what I do to double check for weirdness
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
12:40 Zoffix joined 12:41 nadim joined
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
mst see tinyrepl from Eval::WithLexicals
or doy's Reply
for sensible perl5 options
(no, don't use Devel::REPL, Reply is better, doy learned from my mistakes writing the former ;)
Zoffix yary, I mean in our repl :}
yary Zoffix, I just came off a thread on perl6-language showing a subtle misbehavior with lexicals in the REP:L
timotimo what it -de 1?
Zoffix will never understand why people like the REPL so much 12:42
yary "perl -de 1" is "perl -de 0" for optimists
mst timotimo: drops you into the debugger over no script
timotimo oh, interesting
12:42 Zoffix left
timotimo so like 'perl6-debug' 12:42
MasterDuke RT #78068
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...l?id=78068
mst I've no idea 12:43
I don't use debuggers
12:43 buggable joined
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:43
mst I like things that provide that sort of information as a log 12:44
timotimo right
we want that kind of thing in the future, too
12:45 NeuralAnomaly joined
timotimo but we do have Grammar::Tracer 12:45
12:45 NeuralAnomaly left, NeuralAnomaly joined
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:45
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.
maybe our debugger wants first-class support for that kind of feature
mst it's much like the raison d'etre of /usr/bin/yes, but with more duct tape
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:47
timotimo :) 12:49
we're the cat
12:55 rudi_s left 12:56 rudi_s joined
tony-o i am the walrus 12:59
mst coo coo cashew
12:59 Zoffix joined
Zoffix yary, seems to be an issue with thunking; if I write it as 「where { $h{$_}:exists }」 it works fine 13:00
BTW there's a doc bug in the three-line examle. Both +tol and -tol give true: docs.perl6.org/language/operators#infix_=~= 13:01
And I'm pretty sure =~= doesn't use absolute tolerance
s: &infix:<=~=>
SourceBaby Zoffix, Sauce is at github.com/rakudo/rakudo/blob/fd5e...ic.pm#L264
13:01 poohman joined
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 13:10 poohman left 13:15 yary left, yary joined 13:18 AlexDaniel joined
dalek c: 4cc43ee | (Jan-Olof Hendig)++ | doc/Language/operators.pod6:
An incorrect result was being shown in one of the examples for =~=
13:24
13:32 bjz joined 13:34 rgrinberg joined 13:38 bjz_ joined, bjz_ left 13:40 bjz_ joined 13:41 bjz left 13:44 domidumont joined 13:50 skids joined, yary left 13:52 perlawhirl joined 13:56 rindolf joined 13:57 sjoshi joined 13:59 bjz_ left 14:00 bjz joined 14:01 ringer1 left 14:02 ringer1 joined 14:04 Ven_ joined
bioduds guys, I believe this here is outdated perl6maven.com/tutorial/ 14:06
14:08 CIAvash left 14:10 kaare__ joined
gfldex bioduds: Published on 2012-06-27 (on the about page) 14:10
mst and it's perlmaven so 50/50 it was ever accurate anyway 14:11
14:12 sjoshi left 14:13 Ven_ left 14:14 bjz left 14:16 Ven_ joined 14:17 bjz joined 14:20 nadim left 14:24 bjz left 14:25 bjz joined 14:27 bjz left 14:28 Ven_ left, Ven__ joined 14:29 bjz joined, sjoshi joined, bjz left 14:30 bjz joined
timotimo it doesn't even seem to work; 500 bad gateway 14:31
14:31 bjz left 14:32 bjz joined, bjz left 14:33 Ven__ left
timotimo oh, some of it works 14:33
heh. there's a comment that compares the performance of just a simple print between perl5 and perl6
that comment is 3 years old and perl6 used to take 1.8s on that person's machine to run
0.1s of that was just system time
nine oh the times :) 14:34
14:35 pierre_ left 14:36 Ven_ joined
timotimo o tempora o moares 14:36
14:37 bjz joined 14:40 Ven_ left 14:42 canopus_ is now known as canopus, sjoshi left, Ven_ joined 14:43 BenGoldberg joined 14:45 ka joined 14:48 CIAvash joined
moritz o tempora o moarvm :-) 14:50
14:52 RabidGravy joined 15:01 laurus joined, laurus left 15:10 setty1 joined 15:18 Ven_ left 15:19 Ven_ joined 15:24 Ven_ left 15:27 Ven_ joined
dalek c: cda2ec1 | (Jan-Olof Hendig)++ | doc/Language/operators.pod6:
Changed to example slightly to drive home the fact that the =~= operator is not arithmetically symmetrical (doesn't do ± Δ)
15:30
dogbert17 should proofread commit messages more closely :( 15:31
15:31 Ven_ left 15:33 Ven_ joined 15:36 tushar joined
tushar What "so" keyword do? Is there any documentation available on it? 15:36
timotimo it's the opposite of "not" 15:37
docs.perl6.org/routine/so
tushar timotimo, Thanks. 15:38
15:39 Ven_ left
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:39
tushar mst, hmm.. go it. What will be test case for it? I meant where it will be useful? 15:40
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
m: say so 'baz' eq any < foo bar > 15:42
camelia rakudo-moar 3583e2: OUTPUT«False␤»
perlawhirl m: say 'baz' eq any < foo bar > # without so
camelia rakudo-moar 3583e2: OUTPUT«any(False, False)␤»
tushar mst, perlawhirl, thanks for your explanation.
15:46 skids left
moritz tushar: we even have an FAQ :-) docs.perl6.org/language/faq.html#What_is_so? 15:48
tushar moritz, thanks. I missed that. I apologize for that 15:51
15:52 setty1 left
moritz tushar: no problem 15:53
15:56 Ven_ joined 15:59 poohman joined 16:04 spebern left 16:13 LeCamarade left, Ven_ left 16:14 Ven_ joined 16:15 tushar left 16:24 Guest78798 left 16:27 Ven_ left 16:28 poohman left 16:30 Ven_ joined
AlexDaniel is going to write another bunch of stupid comments on old doc issues 16:33
16:35 Ven_ left
stmuk does anyone know of a linux browser font with the unicode mag glass for the doc.perl6.org search? 16:36
16:37 Guest78798 joined, Ven_ joined 16:39 espadrine left 16:41 NeuralAnomaly left 16:42 Ven_ left 16:43 NeuralAnomaly joined 16:45 canopus left
AlexDaniel stmuk: yes 16:45
stmuk: unifont
stmuk: if you're using debian, then ttf-unifont package is probably what you want
16:46 Ven_ joined
stmuk I am and I'll try it thanks 16:46
FROGGS why not use this? fontawesome.io/icon/search/ 16:48
16:53 canopus joined 16:54 spebern joined 16:56 Ven_ left 16:58 Ven_ joined 17:00 woolfy joined, firstdayonthejob joined 17:01 poohman joined
dalek c: 12a4bf4 | (Armand Halbert)++ | doc/Language/glossary.pod6:
Commented out :rotate adverb example, add back when it works. Fixes #895
17:03
c: cf7e7b3 | RabidGravy++ | doc/Language/glossary.pod6:
Merge pull request #910 from ahalbert/895

Commented out :rotate adverb example, add back when it works. Fixes #895
c: 0aa3a51 | (Sterling Hanenkamp)++ | doc/Type/IO/Socket/Async.pod6:
Correct info about closing an async socket
17:04
c: cb56748 | RabidGravy++ | doc/Type/IO/Socket/Async.pod6:
Merge pull request #902 from zostay/io-async-close

Correct info about closing an async socket
17:05 lizmat joined 17:12 Ven_ left, Ven_ joined 17:13 NeuralAnomaly left, NeuralAnomaly joined 17:14 travis-ci joined
travis-ci Doc build failed. Jonathan Stowe 'Merge pull request #910 from ahalbert/895 17:14
travis-ci.org/perl6/doc/builds/160691474 github.com/perl6/doc/compare/cda2e...7e7b31c47b
17:14 travis-ci left 17:16 perlawhirl left 17:17 Ven_ left 17:18 Ven_ joined 17:21 ju_ left 17:23 Ven_ left, Ven_ joined 17:27 Ven__ joined
bioduds hi guys 17:27
17:27 Ven_ left, BenGoldberg left
bioduds how's Perl6 AWS services integration doing? Do you guys know modules and stuff to help that get going? tx 17:27
DrForr Well, you can always check out the modules on modules.perl6.org. 17:30
timotimo i don't think we have anything in particular, but isn't it just a whole bunch of REST apis? 17:32
17:32 BenGoldberg joined 17:34 NeuralAnomaly left
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 p3rl.org/Paws
17:36 Actualeyes left
bioduds timotimo, not actually, many are somewhat particular integrations I believe 17:36
timotimo oh, OK
17:37 BenGoldberg left, BenGoldberg joined
bioduds mst: tx. do you know if P5 does cover all of AWS integration? 17:37
mst bioduds: did you click the link and look? 17:38
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:52
DrForr poohman: parse($text,:actions(Actions.new)).ast <-- The .ast is the important bit. 17:53
17:55 nadim joined
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:57
DrForr .parse(...) returns the Match object, .parse(...).ast returns the tree that you built with .made(). 17:58
Er, .make. 18:01
poohman oh ok let me check 18:03
18:16 NeuralAnomaly joined, NeuralAnomaly left
timotimo yes, you have to use .make in order to put the stuff in there 18:17
you can just put an action method TOP hat does "make self" 18:18
then it'll keep the Action class instance around for you
18:19 nadim left
mst TOP HAT 18:19
timotimo TOP COMMENT 18:20
DrForr FIRST POST
MasterDuke timotimo: in moarvm, how do you prevent threads from read/writing each other's data structures?
timotimo how do you mean that? 18:21
poohman Is it necessary that the data object has to be in the TOP method?
timotimo we have a few things that have locks installed on either the threadcontext, the instance, or maybe serialization contexts
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?
timotimo TOP is a convention
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 18:24 rindolf left
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?
some repr?
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?
timotimo sorry, watching a movie at the same time 18:26
poohman, what you pass as :actoins will be the self in all action methods called
so if you pass an instance of your action class, you'll be able to persist data through attributes of that, on the "self"
poohman oh ok, thanks 18:27
MasterDuke src/io/syncpipe.c: static MVMint64 do_close(MVMThreadContext *tc, MVMIOSyncPipeData *data)
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
MasterDuke: it's surprising to me that the pipe would be allocated on a thread's stack
oh, wait, syncpipc
this isn't meant to be used across threads :) 18:29
18:29 rindolf joined
MasterDuke ah ha, but i'm not! 18:29
timotimo movie requires my full attention now; subtitle reading
sorry
18:29 NeuralAnomaly left
MasterDuke i even tried adding "my $*SCHEDULER = ThreadPoolScheduler.new( max_threads => 1 )" 18:30
no worries
18:30 NeuralAnomaly joined, NeuralAnomaly left, NeuralAnomaly joined, TakinOver joined 18:31 kaare__ left 18:34 tushar joined 18:35 Ven__ left 18:36 Ven_ joined 18:39 spebern left 18:41 tushar_ joined, zakharyas joined, tushar left 18:43 ringer1 left 18:46 Ven_ left 18:47 BenGoldberg left
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:47
mst but sadly not yet unix sockets 18:51
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:52
18:54 poohman left
dalek c: bd02fa8 | gfldex++ | doc/Language/typesystem.pod6:
fix typo
18:54
18:56 woolfy left, woolfy joined, firstdayonthejob left
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 18:58 poohman joined 18:59 newbie1 joined, firstdayonthejob joined
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␤»
gfldex m: my $i is default(0 does role :: { method defined { False } }); dd $i.defined; $i = 1; dd $i.defined;
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;
camelia rakudo-moar 454964: OUTPUT«Bool::False␤Bool::False␤»
gfldex that feels wrong
19:01 darutoko left
gfldex m: my $i is default(0); dd $i.defined; 19:03
camelia rakudo-moar 454964: OUTPUT«Bool::True␤»
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␤»
gfldex m: my $i = (0 does role :: { method defined { False } }); dd $i.defined; $i = 0; dd $i.defined;
camelia rakudo-moar 454964: OUTPUT«Bool::False␤Bool::False␤»
gfldex is there some shortcut that doens't change a value of a container when the new value matches the old one? 19:05
Zoffix Why does it seem wrong? 19:06
m: my $i; dd $i.defined
camelia rakudo-moar 454964: OUTPUT«Bool::False␤»
gfldex because 0 is defined 19:07
Zoffix Ah
I think the issue here is the mixin mixes in the 0
gfldex m: my $i = (0); dd $i.defined;
camelia rakudo-moar 454964: OUTPUT«Bool::True␤»
Zoffix m: my $i is default(0 but role :: { method defined { False } }); dd $i.defined; $i = 1; $i = 0; dd $i.defined;
camelia rakudo-moar 454964: OUTPUT«Bool::False␤Bool::True␤»
gfldex m: my $i = is default(0); dd $i.defined;
camelia rakudo-moar 454964: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Undeclared routines:␤ default used at line 1␤ is used at line 1␤␤»
gfldex m: my $i is default(0); dd $i.defined;
camelia rakudo-moar 454964: OUTPUT«Bool::True␤»
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
m: my $i = (0 does role :: { method defined { False } }); dd $i;
camelia rakudo-moar 454964: OUTPUT«Int+{<anon|57198640>} $i = 0␤»
Zoffix gfldex, right, so use the `but` version above
Right now you're mixing it into 0
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
Zoffix I think I use that to some benefit in perl6.party/post/Exploiting-Perl-6-...ency-Chain
*"benefit"
gfldex m: my $i is default(0 but role :: { method defined { False } }); dd $i.defined; $i = 0; dd $i.defined;
camelia rakudo-moar 454964: OUTPUT«Bool::False␤Bool::True␤»
gfldex that feels right :)
Zoffix New blog post: "Perl6.Fail, Release Robots, and Other Goodies": perl6.party/post/Perl6-Fail-Release...er-Goodies 19:11
19:14 domidumont left 19:17 TakinOver left 19:19 PerlJam joined
raydiak s: Grammar, 'parsefile' 19:20
SourceBaby raydiak, Sauce is at github.com/rakudo/rakudo/blob/4549...mar.pm#L14 19:21
19:23 TakinOver joined
dalek c: 9ba29d9 | (Thor Michael Støre)++ | doc/Language/objects.pod6:
Fixed small typo

  "Roles can by anonymous" -> "Roles can be anonymous"
19:25
c: 039fc06 | Altai-man++ | doc/Language/objects.pod6:
Merge pull request #911 from thormick/thormick-small-typo-1

Fixed small typo
19:31 labster joined 19:35 Ven_ joined 19:48 wamba left 19:49 b2gills left 19:52 zakharyas left
dalek c: 0a1c391 | raydiak++ | doc/Type/Grammar.pod6:
Fix parsefile example: enc is a named parameter
19:53
19:54 poohman left
Zoffix Github revamped the profile pages 19:55
19:55 Ven_ left
Zoffix it's now "metro" heh 19:55
19:57 Ven_ joined
MasterDuke i do like the graphs of commits by repo 19:58
Zoffix Aye. And you can toggle past years too. 19:59
AlexDaniel I haven't decided if I like it yet :) 20:00
20:04 b2gills joined 20:07 bob777 left, bob777 joined 20:11 canopus_ joined 20:13 canopus left, canopus_ is now known as canopus 20:14 Ven_ left
moritz TIL that in 2008, I had more parrot than rakudo commits. 20:15
20:16 Ven_ joined 20:18 cdg joined 20:21 khw joined 20:22 cdg left, cdg joined 20:28 Ven_ left 20:31 Ven_ joined 20:40 _slade_ joined 20:52 TakinOver left 20:57 Ven_ left 20:58 Ven_ joined, NeuralAnomaly left 20:59 NeuralAnomaly joined, TakinOver joined 21:00 ka left
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
m: my Array @a = [[1..3],[4..6]];
camelia ( no output )
tushar_ m: my Array @a = [[1..3],[4..6]].say;
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␤␤»
Zoffix tushar_, what's "success"? If they all have same number of elements? 21:02
tushar_ Zoffix, yes
in this case it will check 3 == 3 as both the array has 3 elements
jnthn m: my @a = [1,2,3], [4,5,6]; say [==] @a
camelia rakudo-moar c4fd9f: OUTPUT«True␤»
Zoffix m: my Array @a = [[1..3],[4..6]]; say @a».elems.Set.elems == 1 21:03
camelia rakudo-moar c4fd9f: OUTPUT«True␤»
jnthn m: my @a = [1,2,3], [4,5,6, 7]; say [==] @a
camelia rakudo-moar c4fd9f: OUTPUT«False␤»
21:03 Ven_ left
Zoffix Oh 21:03
jnthn++
Zoffix isn't used to metas yet well enough to reach for them on demand :(
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 :)
Zoffix \o/
jnthn Another cute one is `[<=] @a` (are these numbers in order) 21:05
21:05 Ven_ joined
moritz dimly recalls [but] constructions, and shudders 21:05
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:06
moritz following #perl6 helps to learn those neat tricks :-) 21:09
21:09 Ven_ left 21:10 Ven_ joined 21:21 ringer1 joined 21:22 djbkd left
tushar_ moritz, indeed it is. 21:23
mst moritz: [but] ?
tushar_ moritz, do perl6 has twitter feed as well that I can follow.
japhb mst: Adding a list of mixins to a single object 21:31
mst oh, yeat 21:32
*neat
so instead of Moo::Role->apply_roles_to_object($object, @roles);
you'd do
$object = [but] ($object, @roles);
?
21:32 _ramix_ joined
japhb mst: Possibly with some slippage, but yeah. 21:33
But then:
There's [but]=
mst would that be $object [but]= @roles ?
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
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␤»
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:␤…»
japhb AWWW
I thought that one was supported!
Zoffix m: role Foo {}; role Bar {}; role Ber {}; my @roles = Foo, Bar, Ber; my $o = class {}; $o = [[&infix:<but>]] $o,|@roles; dd $o
camelia rakudo-moar c4fd9f: OUTPUT«<anon|83431568>+{Foo}+{Bar}+{Ber} $o = <anon|83431568>+{Foo}+{Bar}+{Ber}␤»
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…»
japhb I wonder if that went away at some point because there was a large WAT
arnsholt PRetty
--
Gah
Pretty sure [but] used to work
_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 github.com/ramiroencinas/perl6-Fil...m-Capacity
Zoffix bisectable6, m: role Foo {}; role Bar {}; role Ber {}; my @roles = Foo, Bar, Ber; my $o = class {}; $o [but]= @roles; dd $o
bisectable6 Zoffix, On both starting points (good=2015.12 bad=b771f1e) the exit code is 1 and the output is identical as well
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
japhb Changed pre-Christmas then. 21:37
Zoffix _ramix_, what do you mean "permission"? Just click the pencil icon in top/right: github.com/perl6/ecosystem/blob/ma.../META.list
committable6, 2015.07 m: role Foo {}; role Bar {}; role Ber {}; my @roles = Foo, Bar, Ber; my $o = class {}; $o [but]= @roles; dd $o
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»
Zoffix Yeah, seems a long time a go
_ramix_, are you sure this stuff works? I think module installers would choke on that github.com/ramiroencinas/perl6-Fil...A.info#L11 21:39
_ramix_, also, while META.info still works, the new name of the meta file is META6.json 21:40
_ramix_ thanks Zoffix, already did! 21:41
Zoffix I don't see your PR 21:42
21:42 TEttinger joined
dalek osystem: b7b0c9f | (Ramiro Encinas)++ | META.list:
Add perl6-FileSystem-Capacity

See github.com/ramiroencinas/perl6-Fil...m-Capacity
21:43
osystem: 14654d6 | (Zoffix Znet)++ | META.list:
Merge pull request #250 from ramiroencinas/patch-1

Add perl6-FileSystem-Capacity
_ramix_ Zoofix, yes now
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?
and if so, was there any conclusion? 21:44
Zoffix I wasn't following it
timotimo soooo 21:45
what did i miss?
_ramix_ respect the L11, is a valid json. May have problems?
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
_ramix_, so my question is: why do you think arrays would work?
_ramix_ ah, ok!
21:47 rindolf left
_ramix_ Zoofix, I will correct 21:47
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:48
.oO( Zoofix... )
21:49
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:53 CIAvash left
mst Does your panda keep escaping? Runaway raccoon.pl? Attach them firmly to their enclosures with Zeffix(tm) 21:54
_ramix_ Zoofix, fixed depends in raw.githubusercontent.com/ramiroen.../META.info 21:58
21:58 Ven_ left
Zoffix cool 21:59
22:00 tushar_ left
_ramix_ Zoofix, thanks for your help! 22:03
Zoffix _ramix_, FWIW, say "Used: " ~ $data<used> ~ " bytes"; can be written as just say "Used: $data<used> bytes"; 22:04
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:05
MasterDuke _ramix_: also, ".split(/\s+/)" can be written as ".words" 22:06
22:07 Ven_ joined
Zoffix And when $_ ~~ /linux/ { return linux; } as just when /linux/ { return linux; } 22:09
And when $_ ~~ /linux/ { return linux; } as just when /linux/ { linux; }
:)
22:09 Zoffix left
timotimo only if that is the last thing in the block, though 22:10
_ramix_ thanks for the suggestions, I will do it. ;-)
22:12 Ven_ left 22:16 Ven_ joined 22:19 zakharyas joined 22:22 _ramix_ left
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
uh, *invocation
timotimo right 22:25
i have a patch locally that does that
we call into the setup method only if not $!setup anyway
so i just put the whole body into a lock.protect
though i didn't put in a re-check, since i used a lock for everything
22:26 spider-mario left
jnthn Yeah but 22:27
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 :)
jnthn Right, but then you need the re-check? :) 22:29
timotimo i just have to return if $!setup at the very beginning
of the protected block
oh, also: could we make --debug=3 the default for moarvm's configure? 22:32
i don't want to constantly teach people how to navigate rakudobrew so they can get debug symbols
22:34 inra joined 22:35 firstdayonthejob left
jnthn timotimo: Can we not just document how they should get a --debug=3 build? :) 22:35
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
jnthn So, note it somewhere(s) prominent? 22:38
timotimo mhm
22:51 kssgill joined 22:57 perlawhirl joined 22:58 pierre_ joined 23:00 pierre_ left 23:04 asdfgh joined
asdfgh how do I remove the first element of an array 23:04
.shift returns it as well
I want for it to return all of the other elements that weren't removed 23:05
timotimo yeah
then just { do @foo.shift; @foo }
er, do in front of the {
gfldex m: my @a = <a b c>; say @a[1..*]
camelia rakudo-moar 8fb9ec: OUTPUT«(b c)␤»
timotimo that doesn't remove the first element, though 23:06
gfldex m: my @a = <a b c>; @a = @a[1..*]; dd @a;
camelia rakudo-moar 8fb9ec: OUTPUT«Array @a = ["b", "c"]␤»
timotimo yeah, you can do i tlike that 23:07
gfldex++
asdfgh alright, thanks guys
I'm sorry for asking such simple questions sometimes, it's just I've never used a language with this much stuff before
gfldex autothreading will reveal plenty of footguns
23:08 dataangel left
timotimo you mean junctions? 23:08
gfldex i was thinking of @objs».somemethod() that does a shift on the same @a 23:09
but a .one junction is equally footgunny 23:10
23:12 cdg left
timotimo if you concurrently shift from an array, you're ni for data loss 23:12
but in the future, no crashes should come from that
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
I'm using @array2.append(@array1)
23:13 Ven_ left
asdfgh ohhh, the append appends each element in array 1 23:14
23:14 zakharyas left
asdfgh do I use push? 23:14
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:16
timotimo push is for appending a single thing, append is for appedning multiple things 23:17
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␤␤»
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 23:24 BenGoldberg joined
timotimo .u × 23:27
yoleaux U+00D7 MULTIPLICATION SIGN [Sm] (×)
asdfgh What graphics library would you guys recommend that isn't raw 23:45
timotimo depends entirely on what you want to do
asdfgh making a pokemon battling game
something like sdl or allegro preferably
timotimo SDL2::Raw isn't so terribly bad 23:46
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
last time i tried it wasn't possible, but that is now ... 2 years ago?
asdfgh did you write SDL2_raw timo 23:48
the bindings 23:49
timotimo yup, a big chunk of it
i also wrote the biggest chunk of the cairo binding
asdfgh nice 23:50
23:50 pierre_ joined
timotimo it was easy 23:51
it's also not complete
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
i'm too lazy