Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2014-06-25

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:11 thou Hmmm. I changed "class Template::Mustache" to "role Template::Mustache", and make test passes immediately. I wasn't expecting that. :)
00:48 logie_ joined #perl6
00:53 BenGoldberg joined #perl6
01:09 FROGGS_ joined #perl6
01:09 jnap joined #perl6
01:10 Sqirrel_ joined #perl6
01:11 Su-Shee_ joined #perl6
01:14 klapperl joined #perl6
01:15 Akagi201_ joined #perl6
01:30 ren1us joined #perl6
01:31 bowtie_ joined #perl6
01:33 ren1us what's the replacement for undef?  Nil?
01:33 yoleaux 24 Jun 2014 12:50Z <lizmat> ren1us: pushing to a hash key autovivifies
01:33 yoleaux 24 Jun 2014 12:51Z <lizmat> ren1us: m: my %h; %h<a>.push: 1; say %h.perl
01:33 yoleaux 24 Jun 2014 12:56Z <TimToady> ren1us: m: my %hash; not %hash{"test"}:exists; %hash{"test"}:!exists;  # two other ways
01:37 TimToady std: undef
01:37 camelia std 0f2049c: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Unsupported use of undef as a value; in Perl 6 please use something more specific:â�¤  an undefined type object such as Any or Int,â�¤   :!defined as a matcher,â�¤        Any:U as a type constraint,â�¤    Nil as the absense of an expected valu…»
01:44 ren1us eh, Nil plus :!defined works for my purposes
02:02 vendethiel joined #perl6
02:10 xiaomiao joined #perl6
02:30 fhelmberger joined #perl6
02:30 noganex_ joined #perl6
02:38 chenryn joined #perl6
02:47 geekosaur joined #perl6
02:49 pochi_ joined #perl6
02:54 simcop2387 joined #perl6
02:58 logie_ joined #perl6
02:59 colomon joined #perl6
03:04 thou joined #perl6
03:06 molaf joined #perl6
03:11 petercommand joined #perl6
03:19 woosley joined #perl6
03:34 woosley joined #perl6
03:41 REPLeffect joined #perl6
03:52 atroxaper joined #perl6
04:02 gfldex joined #perl6
04:04 atroxaper segomos_: Hello. Thank you for your yesterday message! Indeed it works if I use MoludeName::RoleName. It just strange for me why RakudoParrot works well and RakudoJVM and Moar isn't
04:08 kaare_ joined #perl6
04:14 xenoterracide joined #perl6
04:19 rurban joined #perl6
04:30 Alina-malina joined #perl6
04:32 chenryn joined #perl6
04:48 dayangkun joined #perl6
05:17 rindolf joined #perl6
05:26 rurban joined #perl6
05:30 [Sno] joined #perl6
05:31 chenryn joined #perl6
05:39 rurban joined #perl6
05:45 Alina-malina joined #perl6
06:07 kaleem joined #perl6
06:07 anaeem1_ joined #perl6
06:10 denis_boyun_ joined #perl6
06:22 dayangkun joined #perl6
06:36 igorsutton joined #perl6
06:42 kaleem_ joined #perl6
06:46 kaleem joined #perl6
06:49 brrt joined #perl6
06:52 kaleem_ joined #perl6
06:53 zakharyas joined #perl6
06:57 denis_boyun_ joined #perl6
06:59 * brrt is reading the transcript of charlie ross' keynote on yapc::na
07:00 * masak too
07:00 yoleaux 24 Jun 2014 23:38Z <thou> masak: Thanks for the nudge, I just blogged about Template::Mustache: http://ode-to-camelia.tumblr.com/
07:00 masak morning, #perl6
07:00 masak thou++
07:01 * masak has a day of teaching ahead of him
07:01 R0b0t1 joined #perl6
07:02 R0b0t1 If I were to compare perl5 and perl6 to say, python2 and python3, how wrong would I be?
07:02 virtualsue joined #perl6
07:03 dmol joined #perl6
07:04 xiaomiao R0b0t1: green
07:04 brrt it would be wrong in the sense that python3 is supposed to be python2 cleaned
07:04 brrt and perl6 maybe was supposed to be that once, but its now a thing of its own
07:04 R0b0t1 What do yo- oh right.
07:04 brrt iirc perl6 is meant to be the language that programmers will use a hundred years from now
07:05 R0b0t1 brrt: I see. So what did it implement that isn't merely "cleaning?"
07:05 R0b0t1 My, what lofty goals.
07:05 brrt ok, to compare, python 3 cleaned: metaclasses and unicode
07:05 brrt iirc
07:06 brrt perl6 changed syntax, object system, meta-object system, string encoding, i.e. the whole works
07:06 brrt i think the right way to compare perl5 and perl6 is perhaps middle english and modern english?
07:07 brrt most of the same structures are superficially there, but most of what you'd count as 'fundamental' has changed
07:08 R0b0t1 Well some of those things sound like internals... that'd be more like changing the alphabet perhaps?
07:09 R0b0t1 I mean I was going to take a look at the grammar in just a second
07:10 lizmat joined #perl6
07:13 darutoko joined #perl6
07:15 Ven joined #perl6
07:16 Akagi20__ joined #perl6
07:17 markov left #perl6
07:23 FROGGS_ R0b0t1: the syntax has not changed that much... it still looks like a Perl
07:24 woolfy joined #perl6
07:25 Ven .oO( Unless you don't want it to look like it :P )
07:25 R0b0t1 Ven: Howso?
07:25 Ven slangs
07:26 FROGGS_ I guess the most visible change is the dot for method calls, the ~ for string concat and the twigils
07:27 Ven masak: ping
07:27 Ven it's 9 am and I'm looking for a conversation about weird stuff :P
07:43 moritz there are enough conversations about weird stuff on the internet
07:43 moritz shall I find one for you?
07:45 Ven moritz: depends. are there about macro and slangs together ?
07:45 moritz cold fusion might be a good weird topic
07:45 Ven are they*
07:46 moritz http://forum.bodybuilding.co​m/showthread.php?t=150749133
07:46 Ven I'm not clicking.
07:46 moritz no images (afaict)
07:46 moritz it does talk about macro and slangs
07:47 moritz so does http://books.google.de/books?id=5KXdKLDym2QC&​amp;pg=PA239&amp;lpg=PA239&amp;dq=macro+slang​&amp;source=bl&amp;ots=iyyH-jUF_u&amp;sig=mjn​tEuLs2GVBOhi_v_ybaHrUdkg&amp;hl=en&amp;sa=X&a​mp;ei=V36qU8DoA-zA7Aax_oGgCw&amp;redir_esc=y#​v=onepage&amp;q=macro%20slang&amp;f=false
08:07 ChoHag joined #perl6
08:08 ChoHag I have the code at https://gist.github.com/ano​nymous/1fab6c3c028192d89b31 to define a trait on an attribute. It uses apply_handles to create a wrapper around the attribute's accessor.
08:09 ChoHag Line 22 fails with Cannot modify an immutable Any (or Str etc., if x is defined at foo.new time)
08:09 * Ven actually remembers that "but" is immutable and "does" is mutable because "shorter is better". eh ...
08:10 ChoHag Ah but works.
08:10 ChoHag I remember skimming over the explanation of the difference.
08:10 Ven `but` gives back a copy. `does` modifies it in place, destructively
08:24 virtualsue joined #perl6
08:27 fhelmberger joined #perl6
08:28 brrt joined #perl6
08:30 dakkar joined #perl6
08:31 fhelmberger joined #perl6
08:40 spider-mario joined #perl6
09:32 sergot o/
09:33 atroxaper sergot: o/
09:44 kurahaupo joined #perl6
09:45 denis_boyun_ joined #perl6
09:45 vendethiel joined #perl6
09:47 Psyche^_ joined #perl6
09:51 kivutar joined #perl6
10:02 vendethiel- joined #perl6
10:02 fhelmberger joined #perl6
10:12 anaeem1 joined #perl6
10:13 robinsmidsrod joined #perl6
10:16 chenryn joined #perl6
10:29 chenryn joined #perl6
10:32 telex joined #perl6
10:35 kurahaupo left #perl6
10:37 brrt joined #perl6
10:44 dmol joined #perl6
10:46 brrt left #perl6
10:46 brrt joined #perl6
10:47 pecastro joined #perl6
10:51 vendethiel joined #perl6
10:52 virtualsue joined #perl6
11:01 atroxaper joined #perl6
11:02 vendethiel- joined #perl6
11:06 uniejo joined #perl6
11:09 chenryn joined #perl6
11:13 salv0 joined #perl6
11:15 prevost joined #perl6
11:22 molaf joined #perl6
11:23 psch joined #perl6
11:23 psch hi #perl6 o/
11:24 brrt joined #perl6
11:25 brrt left #perl6
11:29 moritz \o
11:34 Alina-malina joined #perl6
11:44 colomon o/
12:02 brrt joined #perl6
12:05 colomon joined #perl6
12:06 Woodi joined #perl6
12:09 jnap joined #perl6
12:13 anaeem1 joined #perl6
12:14 brrt left #perl6
12:15 brrt joined #perl6
12:17 logie_ joined #perl6
12:29 fhelmberger_ joined #perl6
12:41 guru joined #perl6
12:42 TimToady http://rosettacode.org/wiki​/Commatizing_numbers#Perl_6  <-- We pass up J again and get back into 4th place, at least briefly :)
12:46 matija joined #perl6
13:05 Dan077 joined #perl6
13:06 Dan077 left #perl6
13:10 atta joined #perl6
13:12 colomon joined #perl6
13:13 atroxaper joined #perl6
13:20 kivutar joined #perl6
13:31 anaeem1 joined #perl6
13:32 brrt joined #perl6
13:37 carlin joined #perl6
13:39 logie_ joined #perl6
13:53 kurahaupo joined #perl6
14:00 Alina-malina joined #perl6
14:01 btyler joined #perl6
14:01 treehug88 joined #perl6
14:03 carlin joined #perl6
14:09 atroxaper joined #perl6
14:11 psch joined #perl6
14:13 hoelzro morning #perl6
14:13 timotimo hey hoelzro :)
14:19 tadzik hey hey
14:20 psch joined #perl6
14:24 kaleem joined #perl6
14:24 cognominal joined #perl6
14:33 carlin_ joined #perl6
14:39 thou joined #perl6
14:41 guru joined #perl6
14:43 anaeem1 joined #perl6
14:46 lucas__ joined #perl6
14:50 atroxaper joined #perl6
14:50 anaeem1 joined #perl6
14:51 smls joined #perl6
14:57 rurban joined #perl6
15:05 treehug88 joined #perl6
15:19 vendethiel joined #perl6
15:32 logie_ joined #perl6
15:39 atroxaper joined #perl6
15:43 colomon anyone know where next year's YAPC::NA will be?
15:56 moritz has it ever been in Canada?
15:58 guru joined #perl6
16:06 ajr joined #perl6
16:07 ajr_ moritz: yes, 2005 IIRC (Toronto)
16:12 colomon Toronto would be awesome.  :)
16:12 ajr_ Memory still functions: http://www.yapc.org/America/previous-years/2005/
16:13 Rotwang joined #perl6
16:17 tadzik what about Mexico? :)
16:21 anaeem1 joined #perl6
16:22 brrt joined #perl6
16:27 darutoko joined #perl6
16:30 molaf joined #perl6
16:41 ajr__ joined #perl6
16:43 anaeem1_ joined #perl6
16:44 SamuraiJack_ joined #perl6
16:48 TimToady I believe it'll be in Salt Lake City
16:48 sftp joined #perl6
16:48 treehug88 joined #perl6
16:50 jnthn Another hot place.
16:51 * jnthn , meanwhile, heads out into the arctic summer to find some dinner and, hopefully, hike the nearby hill thingy.
16:55 denis_boyun joined #perl6
16:57 smls joined #perl6
16:58 xinming joined #perl6
17:02 rurban joined #perl6
17:03 zakharyas joined #perl6
17:03 bluescreen10 joined #perl6
17:04 rurban1 joined #perl6
17:07 ChoHag What does -> do?
17:07 ChoHag And (where) is it documented?
17:07 TimToady lambda
17:07 SamuraiJack joined #perl6
17:08 timotimo "->" <signature> <block>
17:08 ChoHag How does that compare to sub <signature> <block>?
17:08 timotimo you mean "sub <name> <signature> <block>"?
17:08 ChoHag Ah right.
17:08 TimToady S06:Point_blocks
17:08 timotimo m: sub ($a, $b) { say $a }
17:08 camelia rakudo-moar a7b4cb: ( no output )
17:09 timotimo ah, that does work
17:09 TimToady S06:Pointy_blocks
17:09 ChoHag But:
17:09 ChoHag m: sub ($a, $b) { say $a }.(1,2)
17:09 camelia rakudo-moar a7b4cb: OUTPUT«1␤»
17:09 TimToady it's much like an anonymous sub, but return won't work
17:10 TimToady because Blocks are transparent to return
17:10 timotimo ah, right
17:10 timotimo that's a good point
17:10 uniejo joined #perl6
17:11 ChoHag Right, so they're (-> and sub) essentially the same without the layer of scope which would catch the return?
17:11 TimToady that's the main difference you'll ee
17:11 TimToady *see
17:11 TimToady technically, blocks are immutable, and routines aren't
17:11 TimToady so you can .wrap a routine, but you can't .wrap a block
17:12 TimToady of course, if you have a container, you can make it look mutable, as we do with string vars.
17:12 Alina-malina joined #perl6
17:14 ChoHag How can I .wrap a routine without affecting the mutability of the result of callsame/callwith?
17:16 uniejo joined #perl6
17:16 ChoHag I have $pkg.HOW.find_method($pkg, $accessor).wrap($routine) which I want to call the original accessor and fiddle with the result (and, if I can, the value going in).
17:17 TimToady generally you need to work with | and \ to keep things in terms of Captures and Parcels
17:17 TimToady don't use sigils for the intermediates
17:17 ChoHag Actually right now there isn't an intermediate.
17:17 TimToady and the wrapper might need to be declared 'is rw' as well
17:17 Alina-malina joined #perl6
17:18 TimToady I doubt wrapping copies that for you.
17:18 ChoHag essentially: find_method(...).wrap({say "in accessor"; callsame})
17:18 ChoHag How do I do that? I have the wrapper in a variable but it wasn't just "$r is rw" :(
17:18 TimToady sub (|) is rw { say "in accessor"; nextsame }
17:19 TimToady if that's all you want to do
17:19 TimToady you don't have to return to here with callsame unless you want to postprocess the args
17:19 TimToady s/args/returns/
17:20 ChoHag What does that mean "return to here"?
17:20 timotimo "callsame" acts like a call
17:20 timotimo "nextsame" acts like a goto
17:20 ChoHag Ah.
17:21 ChoHag Right. Hence the s/// which I ignored.
17:21 colomon TimToady++
17:21 TimToady timotimo++ :)
17:21 ChoHag Hmm well now it reports as read-only, which I guess is an improvement.
17:22 brrt joined #perl6
17:23 TimToady de-elevating &
17:23 ChoHag https://gist.github.com/Ch​oHag/e1a910d6ac454aadb7b3
17:23 xfix joined #perl6
17:31 TimToady <de-elevated>
17:31 guru joined #perl6
17:31 ChoHag Can you have a look at my gist?
17:32 ChoHag And surely it should be delevevating?
17:32 ChoHag delevating
17:32 TimToady in a session right now
17:32 ChoHag Or devating maybe.
17:32 [Sno] joined #perl6
17:32 ChoHag deviate.
17:32 beastd joined #perl6
17:33 ChoHag bah. For someone, this is an easy problem.
17:33 ChoHag It's one of those obvious things I don't quite grok about the whole variable/container/object/instance magic.
17:34 xfix joined #perl6
17:39 xfix joined #perl6
17:39 xfix joined #perl6
17:42 darutoko- joined #perl6
17:42 xfix joined #perl6
17:42 xfix joined #perl6
17:47 SamuraiJack_ joined #perl6
17:51 smls rant of the day: Why does the syntax for inline comments have to be so strange?
17:51 SamuraiJack__ joined #perl6
17:52 uniejo joined #perl6
17:53 smls Removing the backtick would be an improvement:   #( bla bla )
17:53 smls Wouldn't that work?
17:53 TimToady used to be, but it's problematic if you take a block and put # in front of each line
17:54 TimToady you don't want end-of-line comments accidentally turning into nested
17:54 FROGGS_ I somehow like #* ... *#
17:55 FROGGS_ but I do not write comments anyway :P
17:55 FROGGS_ I mean, it is source code after all :o)
17:57 smls TimToady: Maybe it could be restricted to one type of brackets then?
17:58 smls So no curly braces (which would probably cause the most trouble)
17:58 TimToady other DSLs could have different issues
17:59 TimToady and we're optimizing for extensibility
17:59 TimToady and comments ought to stand out visually
17:59 smls Personally, I tend to always edit code in an editor with syntax highlighting, and for commenting whole lines/blocks I use an editor shortcur which does the right thing
18:00 TimToady you can make a slang with your own commenting scheme :)
18:00 vendethiel how do slangs interact with macros ?
18:00 SamuraiJack joined #perl6
18:00 masak very well ;)
18:01 TimToady a macro is basically a mini-slang
18:01 vendethiel masak: BZZT! wrong answer
18:01 masak macros are just routines.
18:02 itz joined #perl6
18:02 TimToady macros are like an elephant
18:02 masak if you can call them from your slang, you can interact with it.
18:03 virtualsue joined #perl6
18:08 vendethiel everytime I see nested stuff in perl 5, I go like "how do you remember that?". But I probably do the same all the time
18:09 masak "nested stuff"?
18:10 uniejo joined #perl6
18:10 FROGGS_ interpolated stuff in quotes or regexes I guess
18:10 vendethiel masak: $a[0]->[0] or $a->[0][0] or $a[0][0] ?
18:11 FROGGS_ ahh
18:12 rurban joined #perl6
18:13 btyler joined #perl6
18:14 masak oh, that.
18:14 masak yeah. I can do it... but I prrefer not to :)
18:15 smls 1)  sticking two postcircumfixes together is syntactic sugar for an arrow between them (so if you see [0][0], imaging [0]->[0])
18:15 smls 2) arrows dereference
18:15 smls ^^ really all you need to remember
18:15 vendethiel "dereference" ?
18:15 vendethiel Well, I'll learn about it with the book woolfy++ gave me at some point.
18:16 FROGGS_ yes, the array derefs
18:16 vendethiel I just don't really, uh, carry it out a lot; because it's heavy.
18:16 FROGGS_ $a[0] in P5 is about a variable @a
18:16 smls take a reference (which is a scalar value), and return the value that it points at (which can be any kind of scalr/array/hash/object)
18:16 vendethiel FROGGS_: that I know :)
18:16 FROGGS_ $a->[0] is about a variable $a that is an array reference
18:17 brrt left #perl6
18:18 raiph joined #perl6
18:18 * vendethiel prefers p6's way
18:18 vendethiel ways*
18:20 raiph hi #perl6
18:20 vendethiel o/
18:20 smls vendethiel: yeah, although the Array/List/Parcel separation, container system, and dynamic flattening, add their own pitfalls & hidden complexities
18:20 raiph did anyone come up with a nice way to demo concurrency using camelia?
18:21 vendethiel smls: oh, you can see me going on about how I dislike flattening often enough ;)
18:21 uniejo joined #perl6
18:21 smls :)
18:27 rurban joined #perl6
18:27 vendethiel Ricardo is a good speaker, eh.
18:28 psch https://gist.github.com/pe​schwa/661c66d89243b343ce20 # \o/
18:28 psch running spectest now; i think i'll have to fix the existing tr/// tests
18:29 psch i at least remember one having a bunch of whitespace that aren't reflected in the expected results
18:30 smls TimToady: You know what would be cool? Allow matching a grammar/regex against a *list* of strings, and have a syntax for "match a string boundary here" anchors inside the grammar
18:32 Sqirrel joined #perl6
18:32 masak don't the ^ and $ anchors already match a "string boundary"?
18:33 rurban joined #perl6
18:33 masak seems to me the only missing piece is the ability to keep matching after that.
18:34 smls In Perl, I sometimes concatenate multiple strings with null-bytes, and then use a regex on the combined string (to leverage the power of the backtracking engine to solve my multi-string comparison/matching/selection problems for me)
18:34 vendethiel uh.
18:34 smls but that feels dirty, is not always safe, and will probably not work in P6 (where strings are more hihg-level)
18:36 smls The second solution at http://rosettacode.org/wiki/Fi​nd_common_directory_path#Perl (which I added today) is one example
18:36 smls another use-case would the the parsing of command-line arguments which I talked about a while ago
18:36 smls (since those already come in partially pre-tokenized)
18:38 SamuraiJack joined #perl6
18:40 vendethiel- joined #perl6
18:42 hoverboard joined #perl6
18:42 matija joined #perl6
18:43 raiph .tell thou Your blog says "Let me know" but I see no obvious way to comment. What I'm sure anyone reading it wants to know is what you found out about control of your grammar's backtracking.
18:43 yoleaux raiph: I'll pass your message to thou.
18:44 raiph thou++ # for adding an excellent module to the ecosystem
18:44 raiph thou++ # for blogging about it
18:46 colomon raiph: links?
18:48 smls colomon: I believe raiph is referring to http://ode-to-camelia.tumblr.com/post/8980​4920665/template-mustache-module-in-perl-6
18:48 colomon smls++
18:49 raiph smls++ # for sweet doc.perl6.org design (and correct thou blog link)
18:50 uniejo joined #perl6
18:50 smls Mouq++ did (almost) all the work for that, though :)
18:52 Urchin[emacs] joined #perl6
18:53 uniejo joined #perl6
18:56 dalek roast: 43e2c18 | (Pepe Schwarz)++ | S05-transliteration/trans.t:
18:56 dalek roast: Corrected one test for tr///, all spaces are important.
18:56 dalek roast: review: https://github.com/perl6/roast/commit/43e2c18082
18:56 jnap joined #perl6
18:57 pecastro joined #perl6
18:58 Emilper joined #perl6
19:10 logie_ joined #perl6
19:10 emilper joined #perl6
19:11 emilper joined #perl6
19:11 uniejo joined #perl6
19:14 Urchin[emacs] left #perl6
19:18 FROGGS_ this is an awesome talk about 5.20!! https://www.youtube.com/watch?v=D1LHFKGHceY
19:20 ChoHag Is it possible to get a list of the attributes in a class?
19:21 molaf joined #perl6
19:24 FROGGS_ m: sub foo($x, $y = return 0) { $x + $y };
19:24 camelia rakudo-moar a7b4cb: ( no output )
19:24 molaf joined #perl6
19:24 FROGGS_ m: sub foo($x, $y = return 0) { $x + $y }; say foo(1, 2)
19:24 camelia rakudo-moar a7b4cb: OUTPUT«3␤»
19:24 brrt joined #perl6
19:24 FROGGS_ m: sub foo($x, $y = return 0) { $x + $y }; say foo(1)
19:24 camelia rakudo-moar a7b4cb: OUTPUT«Attempt to return outside of any Routine␤  in block  at /home/p6eval/rakudo-inst-2/languages/​perl6/runtime/CORE.setting.moarvm:1␤  in sub foo at /tmp/LU1AeG4Hoh:1␤  in block  at /tmp/LU1AeG4Hoh:1␤␤»
19:24 FROGGS_ m: sub foo($x, $y = return $x) { $x + $y };
19:24 camelia rakudo-moar a7b4cb: ( no output )
19:24 FROGGS_ TimToady: can we have that?
19:25 TimToady smls: see S05:4686 for the spec; please implment it.  :)
19:25 synopsebot Link: http://perlcabal.org/syn/S05.html#line_4686
19:25 segomos_ jnthn: any hints as to why, if i exceed the number of max_threads in the $*SCHEDULER that it just stops processing?  is there a way to just make it queue requests (or is that what it should do?)
19:26 ChoHag # Add to correct table depending on if it's a Submethod. Note, we
19:26 ingy joined #perl6
19:26 ChoHag Metamodel/MethodContainer.nqp
19:26 brrt_ joined #perl6
19:27 TimToady FROGGS_: arguably that's just a bug
19:27 FROGGS_ TimToady: so it is meant to work?
19:27 FROGGS_ that's cool :o)
19:28 xragnar_ joined #perl6
19:28 smls yes, very cool
19:29 carlin m: my $x = return 1; say 'alive'
19:29 camelia rakudo-moar a7b4cb: ( no output )
19:34 smls TimToady: On a related note (to the multi-string regex matching), can grammars be made to transparently operate on a stream of tokens supplied by an external lexer?
19:35 PerlJam smls: what do you mean by "transparently"?
19:35 PerlJam (because I'm pretty sure they're going to need to see each other to make that work :)
19:36 smls so you can refer to <foo> as if you had defined  «token foo { ... }» in the same grammar
19:36 uniejo joined #perl6
19:37 smls but instead, the token definitions are left out of the grammar, and the input is a list of token tokens that know their names
19:37 smls Pairs, probably
19:39 smls TokenList.new( 'digit' => '5', 'digit' => '2', 'alpha' => 'x' ).match(/ <digit>* <alpha> /)   # so that this would match
19:39 TimToady that's one of those things that'll happen when someone decides to scratch their itch
19:39 smls or similar
19:41 TimToady but it's not on the critical path to 6.0, I suspect
19:42 timotimo I would like to see that feature
19:43 jnthn ChoHag: .^attributes gets you Attribute objects describing each attribute
19:44 jnthn segomos_: The only reason I can imagine it stopping processing is because something is "clogging" up all the threads
19:45 dayangkun joined #perl6
19:47 hoverboard joined #perl6
19:55 lizmat joined #perl6
19:56 rurban joined #perl6
19:56 itz joined #perl6
20:01 emilper I am attempting to use libgsl (GNU GSL) with NativeCall, but libgsl it misses a function from libcblas,  and libgsl is not linked with libcblas at all supposedly so executables using libgsl could link with alternatives ... what options do I have ? I tried wrapping the missing function from libcblas and I can use it, but I get a segmentation fault when one of the libgsl functions I need is ran
20:01 emilper I am attempting to use libgsl (GNU GSL) with NativeCall, but libgsl misses a function from libcblas,  and libgsl is not linked with libcblas at all supposedly so executables using libgsl could link with alternatives ... what options do I have ? I tried wrapping the missing function from libcblas and I can use it, but I get a segmentation fault when one of the libgsl functions I need is ran
20:01 emilper sorry, skype reflexes
20:04 TimToady we should definitely get that to work somehow
20:04 uniejo joined #perl6
20:04 FROGGS_ emilper: when you preload the libcblas, does it work then?
20:05 emilper yes
20:05 FROGGS_ then you just need to find a way to do that programatically
20:06 virtualsue joined #perl6
20:08 emilper .you mean find a way to compile libgsl linked with libcblas ?
20:09 LLamaRider joined #perl6
20:11 FROGGS_ emilper: no, I was thinking that you preload the lobcblas from within rakudo
20:12 pecastro joined #perl6
20:13 PerlJam this sounds hacky, but wouldn't something like: sub dummy is native('libcblas') {}  # do it ?
20:14 lizmat if dummy exists in libclas ?
20:14 lizmat and if not ?
20:15 PerlJam I'm not sure when it actually does the dlopen()
20:15 jnthn Well, you'd have to try and call the dummy
20:15 jnthn Since it will loadlib on the first call
20:15 PerlJam gotcha
20:16 emilper http://pastebin.com/gTq48n8J
20:17 FROGGS_ jnthn: clearly NativeCall needs to expose a way to preload libs :o)
20:17 emilper that is how I got the segmentation fault
20:17 jnthn FROGGS_: Agree
20:18 FROGGS_ on the other hand, loading a lib on first call is an awesome thing to have... no fights with DynaLoader at BEGIN time for example...
20:19 itz joined #perl6
20:24 cosimo joined #perl6
20:25 zengargo1le joined #perl6
20:32 smls joined #perl6
20:37 timotimo joined #perl6
20:43 vendethiel- m: my @a = (1, 2, 3); say @a.perl; say @a[*].perl
20:43 camelia rakudo-moar a7b4cb: OUTPUT«Array.new(1, 2, 3)␤(1, 2, 3)␤»
20:43 virtualsue joined #perl6
20:43 lizmat m: my @a = (1, 2, 3); say @a[].perl
20:43 camelia rakudo-moar a7b4cb: OUTPUT«Array.new(1, 2, 3)␤»
20:44 lizmat m: my @a = (1, 2, 3); say "@a[]".perl
20:44 camelia rakudo-moar a7b4cb: OUTPUT«"1 2 3"␤»
20:45 vendethiel joined #perl6
20:45 vendethiel I don't really understand [*] and [], uh.
20:46 vendethiel m: my $a = [1, 2]; say $a[*].perl
20:46 camelia rakudo-moar a7b4cb: OUTPUT«(1, 2)␤»
20:46 vendethiel okay, that one might be useful
20:46 vendethiel m: my $a = [1, 2]; say $a[].perl
20:46 camelia rakudo-moar a7b4cb: OUTPUT«Array.new(1, 2)␤»
20:46 lizmat S09:634
20:46 synopsebot Link: http://perlcabal.org/syn/S09.html#line_634
20:46 vendethiel I prolly just don't understand Array.new vs no Array.new
20:46 rurban1 joined #perl6
20:46 vendethiel lizmat: yeah, that I know, but I don't know why it's useful
20:47 vendethiel m: my @a = (1, 2, 3); say @a eqv @a[*];
20:47 camelia rakudo-moar a7b4cb: OUTPUT«False␤»
20:47 lizmat allows you to interpolate in a string :-)
20:47 vendethiel m: my $a = [1, 2, 3]; say "$a".perl
20:47 camelia rakudo-moar a7b4cb: OUTPUT«"1 2 3"␤»
20:48 vendethiel joined #perl6
20:48 uniejo joined #perl6
20:48 vendethiel I'd do my test locally but I'm on 2014.03. Guess I'll whisper camelia
20:48 TimToady .[] is a no-op
20:48 TimToady whereas .[*] is a slice
20:49 vendethiel and, yeah, seems like [1, 2, 3] interpolates quite seamlessly in a string. Not sure WDYM lizmat?
20:49 timotimo i thought .[] is like .list?
20:49 TimToady and a normal slice returns everything *except* the array
20:49 TimToady well, yes, it's like .list
20:50 smls m: my @a = 1, 2, 3; say "@a vs @a[]";   #vendethiel
20:50 camelia rakudo-moar a7b4cb: OUTPUT«@a vs 1 2 3␤»
20:50 vendethiel TimToady: and what use does removing the array have ?
20:51 TimToady in interpolation it makes no difference
20:51 vendethiel smls: yeah, yeah, but wrt [*]
20:51 TimToady m: my @a = 1,2,3; say @a[].WHAT
20:51 camelia rakudo-moar a7b4cb: OUTPUT«(Array)␤»
20:51 TimToady m: my @a = 1,2,3; say @a[*].WHAT
20:51 camelia rakudo-moar a7b4cb: OUTPUT«(Parcel)␤»
20:52 TimToady the original intent for .[] was to enable intepolation
20:52 TimToady the item/list distinction came later
20:53 lizmat m: my @a = 1,2,3; say (@a[]:v).WHAT  # is this a pb ?
20:53 camelia rakudo-moar a7b4cb: OUTPUT«(Parcel)␤»
20:53 vendethiel I still don't see how it's useful
20:54 segomos_ jnthn: what do you mean something by "clogging"?
20:54 segomos_ re: threads
20:54 timotimo "reading the irclog"
20:54 timotimo irc log -> irclog -> clog
20:55 segomos_ lol
20:55 vendethiel (really ?)
20:55 jnthn segomos_: Like, something that hangs
20:56 jnthn I mean, if you do start { loop { } } a bunch of times, for example, you exhaust the thread pool
20:57 smls vendethiel: With hashes, it's easier to see the difference:
20:57 smls m: my %a = <a 1 b 2>; say %a{}.perl; say %a{*}.perl
20:57 camelia rakudo-moar a7b4cb: OUTPUT«("b" => "2", "a" => "1").hash␤("1", "2")␤»
20:57 vendethiel yeah, alright; but what about arrays ?
20:58 smls Consistency, i guess. And [] is easier to type for interpolation.
20:58 vendethiel i still mean [*], not []
20:58 vendethiel I get that [] is useful for interpolation -- it indeed is :)
21:03 smls .[*] and .values do seem to be synonymous
21:03 segomos_ jnthn: ahh..i have checked for something hanging in the thread pool but my requests exit normally. so maybe i need to take a different approach from 'await' and use the .then functionality ..
21:03 smls but maybe the star-form is useful whe you don't know in advance what whether you want a full slice:
21:04 smls m: my @indizes = 2, *; say @a[$_] for @indizes;
21:04 camelia rakudo-moar a7b4cb: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/4Dvby5_ddlâ�¤Variable '@a' is not declaredâ�¤at /tmp/4Dvby5_ddl:1â�¤------> [32mmy @indizes = 2, *; say @a[$_][33mâ��[31m for @indizes;[0mâ�¤    expecting any of:â�¤        postfixâ�¤        sta…»
21:04 smls m: my @a = 1, 2, 3; my @indizes = 2, *; say @a[$_] for @indizes;
21:04 camelia rakudo-moar a7b4cb: OUTPUT«3␤1 2 3␤»
21:07 lizmat re clogging: S99:222
21:07 synopsebot Link: http://perlcabal.org/syn/S99.html#line_222
21:11 jnthn segomos_: Try that, yeah
21:11 jnthn segomos_: I plan to make await do something continuationy but didn't get to it yet.
21:13 lue I think "clogs" came about when in one of the #phasers channels the topic miswrote "IRC logs: location.com" as "IR Clogs: location.com"
21:13 timotimo logation, logation, logation.
21:16 dalek rakudo-star-daily: ff92bb0 | coke++ | log/ (10 files):
21:16 dalek rakudo-star-daily: today (automated commit)
21:16 dalek rakudo-star-daily: review: https://github.com/coke/rakudo​-star-daily/commit/ff92bb0af1
21:16 dalek rakudo-star-daily: 37ef2eb | coke++ | log/ (11 files):
21:16 dalek rakudo-star-daily: today (automated commit)
21:16 dalek rakudo-star-daily: review: https://github.com/coke/rakudo​-star-daily/commit/37ef2eb879
21:16 dalek perl6-roast-data: 5e1fc9e | coke++ | / (5 files):
21:16 dalek perl6-roast-data: today (automated commit)
21:16 dalek perl6-roast-data: review: https://github.com/coke/perl6​-roast-data/commit/5e1fc9e819
21:16 dalek perl6-roast-data: f236d46 | coke++ | / (5 files):
21:16 dalek perl6-roast-data: today (automated commit)
21:16 dalek perl6-roast-data: review: https://github.com/coke/perl6​-roast-data/commit/f236d4655f
21:17 [Coke] jvm exploded; moar clean, parrot has one file with failures.
21:17 raiph jnthn: what one liner would you write (preferably but not necessarily using camelia) to demo "a sub returning multiple values" where the multiple values are generated using a concurrent construct?
21:18 raiph (i'm working on a thorough reply to someone's questions about P6)
21:19 * [Coke] waves from montana, somewhere west of billings.
21:20 rurban joined #perl6
21:23 vendethiel m: my ($, $a) = do sub { return 1..* }; say $a
21:23 camelia rakudo-moar a7b4cb: OUTPUT«(Any)␤»
21:24 raiph m: await do for ^10 { start { rand.sleep; .say } } # jnthn, here's what P6ers suggested yesterday but camelia somehow puts stuff back in order
21:24 camelia rakudo-moar a7b4cb: OUTPUT«0␤1␤2␤3␤4␤5␤6␤7␤8␤9␤»
21:26 PerlJam camelia++  you're just too smart for raiph
21:26 vendethiel to be fair, she's probably too smart for all of us
21:26 PerlJam indeed
21:28 PerlJam (Why does camelia output all of those numbers in order?)
21:29 lee__ perl6-m segfaults the second time i try to run that one liner
21:30 PerlJam m: start { sleep 1; say "bob" }; start { sleep 3; say "hi" }
21:30 camelia rakudo-moar a7b4cb: ( no output )
21:31 PerlJam m: await do { start { sleep 3; say "bob" }; start { sleep 1; say "hi" }; }
21:31 camelia rakudo-moar a7b4cb: OUTPUT«bob␤hi␤»
21:32 jnthn um...what on earth...
21:33 timotimo it should return those in order
21:33 timotimo er ...
21:33 timotimo no, i misunderstood
21:34 BenGoldberg joined #perl6
21:34 lizmat wrong scheduler ?
21:34 jnthn It does seem to work locally
21:34 jnthn No ideal what's going on with camelia there
21:34 lizmat does it also work correctly with the restricted setting locally ?
21:34 jnthn raiph: I'm not immediately sure what you mean with returning multiple values concurrently...other than await do for blah { start ... }
21:34 ChoHag lizmat: You grok this stuff more than a sane person should. Perhaps you can help me.
21:35 ChoHag https://gist.github.com/Ch​oHag/e1a910d6ac454aadb7b3
21:35 jnthn raiph: I did some examples of that in my climate data set talk at FOSDEM iirc
21:35 lizmat ChoHag: will look at it later, now watching YAPC::NA keynote
21:36 ChoHag Thankyou. It's short.
21:36 ChoHag And simple, I think.
21:37 uniejo joined #perl6
21:41 raiph jnthn: Thanks, I'll look at that. A P5er asked "Can you return multiple values from a sub?" I'm detailing some of the ways -- Positionals, Iterables. I was thinking a Supply (or .tap) or somesuch would be particularly interesting to a P5er.
21:46 * [Coke] hopes YAPC::NA is -after- school gets out next year. :(
21:46 [Coke] (well, and also that I can convince work to send me. :)
21:46 lizmat http://blog.yapcna.org/2014/06​/25/yapc2015-dates-announced/
21:48 kivutar joined #perl6
21:49 [Coke] nope. earlier than ever. :(
21:51 lizmat shutting down&
21:52 * [Coke] ~~
21:52 TimToady o/
21:52 * TimToady goes to the hallway to see if anyone is there who is too shy to have come up earlier...
21:53 jnthn raiph: Well, supplies are all about *not* returning, 'cus they're doing async... :)
21:54 jnthn Return values - and wait to have one - is basically the definition of synchronous programming :
21:54 jnthn :)
21:54 jnthn *waiting, even
21:56 cognominal joined #perl6
22:04 [Coke] looks like the eval server died on today's jvm run, but there's no error log for the eval server. last successful test was wwwroot/views/entity/pdf.cfm
22:05 [Coke] er, was S32-io/IO-Socket-INET.t.
22:06 rurban joined #perl6
22:06 btyler_ joined #perl6
22:15 lizmat joined #perl6
22:21 * jnthn finally got around to scribbling a small blog post, after months of being quiet :)
22:21 jnthn And now, sleep...early flight...
22:21 jnthn &
22:21 timotimo yays
22:32 segomos_ is there a way to chain together an array of subs that return promises?  for instance, a way to do @a = (sub { return Promise.new; }, sub { return Promise.new; }); @a[0].().then(@[1].().then ... etc
22:32 segomos_ trying to find the right syntax (if there is one) and drawing blank
22:32 zengargoyle joined #perl6
22:33 segomos_ also trying not use await ^
22:39 SevenWolf joined #perl6
22:40 erkan joined #perl6
22:40 erkan joined #perl6
22:40 lizmat joined #perl6
22:40 lizmat socializing&
22:44 simcop2387 left #perl6
22:45 timotimo segomos_: i don't get what you're trying to do
22:45 timotimo i mean, i kinda get what you want to do, but not what it'd be useful for
22:48 segomos_ i guess maybe i need to do this differently..i was thinking that if i do chain sub calls with .then that i would avoid over promising and freezing the thread pool but this could happen anyway, just in a more linear fashion
22:49 Ben_Goldberg joined #perl6
22:50 ggherdov joined #perl6
22:50 akagi201 joined #perl6
22:55 segomos_ not really sure how to handle overloading the thread pool and halting all execution
23:02 carlin jnthn: in your blog post you say "we never actually get to specialize the loop code (because we never ." Think you missed a bit :)
23:02 segomos_ especially with IO::Socket::Async adding items to the thread pool
23:07 [Coke] jnthn: reading blog post. confusing sentence near "(because we never."
23:07 [Coke] carlin++ # Coke too slow!
23:12 timotimo segomos_: you're not thinking right about this stuff
23:12 timotimo Promise.new doesn't start or occupy a new thread
23:12 timotimo start { ... } creates a promise and queues some code to be executed, which will fulfill or break the promise
23:12 timotimo Promise.then takes a code block, not a promise
23:32 btyler joined #perl6
23:34 erkan joined #perl6
23:34 erkan joined #perl6
23:48 thilp joined #perl6
23:56 fhelmberger joined #perl6

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

Perl 6 | Reference Documentation | Rakudo