Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2017-08-21

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:16 atroxaper joined #perl6
00:18 TEttinger joined #perl6
00:44 raschipi joined #perl6
00:45 pierre_ joined #perl6
00:53 Cabanossi joined #perl6
01:04 BenGoldberg joined #perl6
01:37 geekosaur joined #perl6
01:38 Cabanossi joined #perl6
01:43 Petit_Dejeuner joined #perl6
01:49 cdg joined #perl6
01:51 ilbot3 joined #perl6
01:51 Topic for #perl6 is now »ö« Welcome to Perl 6! | https://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:,  or /msg camelia p6: ... | irclog: http://irc.perl6.org or http://colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
01:51 raschipi If you have a Seq that reads from the file, using the :close argument will make it close automatically. If you opened it just has a handle to read and write to, you'll need to explicitly close the file.
01:54 raschipi Perl6 avoids doing some tracking other languages do to avoid the performance penalty.
01:55 ugexe i think you are confused
01:55 Petit_Dejeuner Maybe if I post the code I'm trying to translate my intent will be clearer. https://pastebin.com/raw/PXixC0zC
01:56 Petit_Dejeuner raschipi: I'm surprised that there's a performance penalty for that kind of thing. Doesn't Perl6 have to check the phasors on every block either way?
01:58 ugexe they are talking about reference counting which is gc related closing of handles, not scope
01:59 ugexe https://docs.perl6.org/routine/close#(IO::Handle)_routine_close
01:59 raschipi ugexe: Maybe I wasn't clear with my words, but I'm aware of the difference and I know Perl6 doesn't guarantee any of them.
01:59 ugexe there is an example of how to close handles using... LEAVE phaser
02:00 raschipi ugexe: Yes, that was the next thing I was going to tell him, but I didn't start with it because he said that wasn't the answer he was looking for.
02:00 raschipi So yeah, Petit_Dejeuner, explicitly close your files in the LEAVE phasor.
02:00 Petit_Dejeuner Alright, thanks.
02:01 ugexe it was only stated that they wanted something built in. im not sure how this is not the built in answer you would be looking for
02:02 ugexe the alternative is handles always close when leaving scope unless you explicitly do... i dunno... and then it stays open?
02:04 ugexe hell `break` isnt even valid perl6
02:05 Petit_Dejeuner Many languages provide stdlibs with two ways to open files. The first returns a high level file handler that can be manually closed. This first way is almost always wrong and requires a try/finally wrapper or a dynamic-unwind around it, depending on the language. The second interface is a high order function or macro that takes a block of code as an argument. Inside that block of code, the file handler is available,
02:05 Petit_Dejeuner but after the block is done running, the file handler is closed.
02:06 ugexe how is that different than phaser + close?
02:07 raschipi Petit_Dejeuner: You're lookint for creating a Seq that returns the file by pieces and closes it afterwards. If you use .words or .lines on it, pass the :close argument to get something already done.
02:07 ugexe sub foo(&code) { my $handle = ...; LEAVE $handle.close; &code($handle); }
02:07 Petit_Dejeuner ugexe: I don't have to write phaser + close or anything like it, the way I opened the file ensures it will be closed correctly.
02:08 Petit_Dejeuner Yes, but there's no reason to write a helper if it's not already available. It just makes my code more obtuse.
02:08 Petit_Dejeuner raschipi: I'll look into that.
02:09 Cabanossi joined #perl6
02:09 ugexe right, you'd normally just write LEAVE $whatever.close, the &code was just because it was in what you said other libraries provide
02:09 Petit_Dejeuner If the Seq isn't what I want, I'll probably just use the LEAVE.
02:10 raschipi Try the P6 way, it works and it's simple to use. It's just different and you're not used to it yet.
02:11 Petit_Dejeuner I'll try! :)
02:19 atroxaper joined #perl6
02:22 raschipi Petit_Dejeuner: Some tips for doing it: right after opening the file, register the LEAVE phaser. It doesn't need to be near where you think it will be executed. Let Perl6 keep track of that for you.
02:24 pierre_ joined #perl6
02:29 neet joined #perl6
02:35 AlexDaniel raschipi++
02:36 * AlexDaniel ? LEAVE
02:40 noganex_ joined #perl6
03:07 Cabanossi joined #perl6
03:12 geekosaur joined #perl6
03:15 zakame joined #perl6
03:15 char_var[buffer] joined #perl6
03:19 llfourn joined #perl6
03:22 zengargoyle joined #perl6
03:26 pharv joined #perl6
03:37 Cabanossi joined #perl6
03:44 geekosaur joined #perl6
03:58 wamba joined #perl6
04:00 cdg joined #perl6
04:02 pierre_ joined #perl6
04:07 Cabanossi joined #perl6
04:20 atroxaper joined #perl6
04:22 pierre_ joined #perl6
04:23 mr-foobar joined #perl6
04:37 Cabanossi joined #perl6
04:37 xtreak joined #perl6
04:55 xtreak_ joined #perl6
04:59 piojo joined #perl6
05:11 xtreak joined #perl6
05:20 piojo joined #perl6
05:32 ufobat joined #perl6
05:36 parv joined #perl6
05:36 itaylor57 joined #perl6
05:49 pierre_ joined #perl6
05:49 nadim joined #perl6
05:50 mtsd joined #perl6
05:57 gfldex m: class C { my $a = 42; method m { temp $a; say $a; $a = 0; say $a } }; C.new.m
05:57 camelia rakudo-moar 1aee9a: OUTPUT: «42?0?»
05:57 mtsd left #perl6
06:01 cdg joined #perl6
06:02 parv Emric F makes a string case for Bailador: http://blogs.perl.org/users/emeric/2017/08/bailador-needs-your-help.html . That, or the post could have been only a place holder.
06:02 parv s/string/strong/
06:03 ufobat sounds like an SOS call :D
06:05 gfldex the internet must be broken. I made a mistake in my blog and wasn't corrected before I could blink!
06:07 espadrine joined #perl6
06:20 darutoko joined #perl6
06:23 ins64 joined #perl6
06:24 atroxaper joined #perl6
06:25 domidumont joined #perl6
06:29 cdg joined #perl6
06:30 domidumont joined #perl6
06:46 nadim joined #perl6
06:51 lowbro joined #perl6
06:51 lowbro joined #perl6
06:52 Cabanossi joined #perl6
07:03 wamba joined #perl6
07:08 rindolf joined #perl6
07:17 nattefrost joined #perl6
07:25 leont joined #perl6
07:26 lichtkind joined #perl6
07:37 Cabanossi joined #perl6
07:40 OtherNick joined #perl6
07:41 zakharyas joined #perl6
07:47 jsimonet joined #perl6
07:50 jsimonet joined #perl6
07:52 nadim Good morning!
07:56 robertle joined #perl6
07:58 rindolf joined #perl6
08:00 domidumont joined #perl6
08:00 jonas1 joined #perl6
08:04 dakkar joined #perl6
08:07 Cabanossi joined #perl6
08:09 robertle joined #perl6
08:18 Ven joined #perl6
08:19 lizmat .tell gfldex cool blog: https://gfldex.wordpress.com/2017/08/20/preparations-for-your/  but couldn't you use a trait aka "my $c is watched" ?
08:19 yoleaux lizmat: I'll pass your message to gfldex.
08:21 leont joined #perl6
08:29 wamba joined #perl6
08:37 Cabanossi joined #perl6
08:45 cdg joined #perl6
08:50 nadim joined #perl6
09:06 nadim Hi, I see that Str has a rotor method that is a Todo, is there a plan to implement those or one implements it and send a patch?
09:07 nadim also, there's a Hash.grep method that is a Todo, how was that supposed to work?
09:10 cdg joined #perl6
09:12 cdg_ joined #perl6
09:16 cdg joined #perl6
09:18 pierre_ joined #perl6
09:25 El_Che joined #perl6
09:26 cdg joined #perl6
09:26 El_Che I pointed the rakudo/zef Fedora to this channel in case he has questions, so be nice :)
09:26 El_Che (as you always are)
09:27 cdg joined #perl6
09:27 atroxaper joined #perl6
09:42 pmurias joined #perl6
09:44 lizmat nadim: where do you see those things?
09:46 cdg joined #perl6
09:51 nadim lizmat: https://docs.perl6.org/type/Hash#(Any)_method_grep
09:52 nadim note that in the case of Hash.grep it is implemented
09:52 lizmat nadim: well, not really: it's implemented because Hash is an Any, and Any.grep is implemented
09:53 Cabanossi joined #perl6
09:53 nadim what is the TODO supposed to mean?
09:53 lizmat that the *documentation* is missing
09:57 Ven`` Damian Conway is beautifully insane, huh.
10:06 nadim anything new or the same old insane?
10:17 nadim Here is a rather weird question, i have a piece of text generated with .perl; I want to evaluate is in another context where I know the types used in the .perl do not exist. Is there a way to catch  the errors, force the generation of "dummy" types?
10:20 dogbert17 joined #perl6
10:20 lizmat nadim: the only thing I can think of, is iterative: EVAL the string, if it throws an X::Undeclared::Symbols, look at unk_types, create them, and rince/repeat
10:26 lichtkind joined #perl6
10:29 nadim thanks for the X::Undeclared::Symbol tip. EVAL being fast as it is, that means it would take forever. I had an object, mainly string, 500 KB in size, it took 40 seconds to EVAL.
10:39 cdg joined #perl6
10:41 Zoffix joined #perl6
10:43 Zoffix Petit_Dejeuner: note there's a module that gives you a `does auto-close` trait that will install the phaser for you. I didn't read far into backlog, but most of the common file operations can be done with IO::Path and you never need to worry about file handles or when to close them.
10:43 Zoffix buggable: eco Trait::IO
10:43 buggable Zoffix, Trait::IO 'Helper IO traits': https://github.com/zoffixznet/perl6-Trait-IO
10:46 Zoffix As for some suggesting LEAVE phasers: keep in mind the code shown will trigger the phaser when routine is called with incorrect args. Probably applies to methods only...
10:46 Zoffix m: class { method foo { my $foo = open 'bar'; LEAVE $foo.close; } }.foo: 42
10:46 camelia rakudo-moar 1aee9a: OUTPUT: «No such method 'close' for invocant of type 'Any'. Did you mean 'clone'??  in block <unit> at <tmp> line 1??»
10:46 Zoffix ^ not a very enlightening error, since it dies with that before it can tell you wrong args were passed
10:48 pierre_ joined #perl6
10:49 Zoffix "Perl6 avoids doing some tracking other languages do to avoid the performance penalty."
10:49 Zoffix Huh? I thought it was just a different mechanism
10:50 Zoffix The ref counting has its own host of issues
10:52 Zoffix left #perl6
10:52 Cabanossi joined #perl6
10:57 committable6 joined #perl6
11:11 wamba joined #perl6
11:13 rindolf joined #perl6
11:22 piojo It looks like on windows, the newlines are being changed to '\r\n'
11:22 piojo Perl6 won't open the file in binary mode and allow printing
11:23 piojo is there a workaround? in other environments (or perl5), you just open the file as binary.
11:23 piojo I mean in output, when I call $fh.print("$line\n")
11:28 domidumont joined #perl6
11:29 piojo Okay, I used $fh.write($line.encode("utf-8")), but I'm surprised it takes so much boilerplate (on every single line) to avoid the dreaded \r\n
11:30 atroxaper joined #perl6
11:32 lizmat piojo: have you tried opening with :nl-out("\n")
11:32 timotimo the encoder has a translate-nl option
11:33 timotimo you can pass an encoder object to :enc, and you can pass :!translate-nl to the encode method
11:34 timotimo like Encoding::Registry.find("utf8").new(:!translate-nl)
11:39 macsnowball joined #perl6
11:40 macsnowball nick macsnowball
11:40 Ven`` Aw, I regret missing TPCiA.
11:40 Ven`` when's the SPW?
11:41 macsnowball left #perl6
11:41 ilmari this week (fri-sat)
11:41 ilmari http://act.perl-workshop.ch/spw2017/
11:42 * timotimo is going to spw o/
11:43 Ven`` oh, probably a bit late to book
11:44 jjatria joined #perl6
11:45 lizmat conf is still open to registration :-)
11:45 piojo lizmat: I opened with :nl-out(""). Didn't try "\n" yet
11:45 lizmat et on parle Francais la bas
11:47 piojo lizmat: nl-out doesn't help, I'll try timotimo's way
11:47 Ven`` il y a marqué anglais :)
11:47 Ven`` their "online booking" link doesn't seem to work. mmh..
11:50 Ven`` should look for a different hotel, since hotel du golf itself's website doesn't help at all. two links to book but none work, and the "rates" link doesn't work ;o)
11:56 piojo timotimo: I think the syntax is "encoder" rather than "new" :enc(Encoding::Registry.find("utf8").encoder(:!translate-nl))
11:56 piojo timotimo: but it fails with: Unknown string encoding 'Encoding::Encoder::Builtin<160273136>'
11:57 timotimo oh? wow
11:58 piojo I'm using rakudo star 07, so I'll see if the new release fixes it, when it comes out
11:58 raschipi joined #perl6
11:58 timotimo perhaps you can call .encoding(Encoding::Registry.find(......)) on the handle once you've built it
11:59 piojo I can't test moar-blead because of the build problem...
11:59 timotimo the new release is just about done, i don't think a fix for this will be put in
11:59 piojo I meant maybe it's already done
11:59 piojo I know most developers don't use Windows, so maybe someone spotted this previously
12:00 timotimo we just fixed some windows build issues today
12:00 piojo Nice
12:00 timotimo is it about something with registers and such?
12:00 piojo yeah, I saw lots of discussion about it
12:00 piojo I'll try building from source tomorrow
12:01 timotimo yeah, no fix for the encoder for this release
12:01 timotimo you can always create your encoder up top and use it to encode all your strings and .write them to your binary handle
12:02 piojo timotimo: same result when setting the encoding on the open $fh
12:02 timotimo yeah
12:02 timotimo i tried it locally with the very latest version
12:02 timotimo same error
12:04 ntinos joined #perl6
12:04 piojo It would be nice to have a pre-made encoder with a string name that doesn't translate newlines, but it's enough if this info is readily available
12:04 piojo stackoverflow is good for that, when you're not sure where to stick the info in the documentation
12:05 piojo just ask a question, and answer it yourself :)
12:05 piojo (if you know it's something people are going to search for)
12:07 Cabanossi joined #perl6
12:08 piojo timotimo: thanks for the explanation!
12:09 timotimo no prob
12:11 domidumont joined #perl6
12:15 char_var[buffer] joined #perl6
12:15 thinkpad joined #perl6
12:16 domidumont joined #perl6
12:17 gfldexwork joined #perl6
12:17 thinkpad left #perl6
12:18 gfldexwork lizmat: I had the plan to be brave and implement a slang but a trait is a good fallback. I may just add it to the block before I fail at the slang. :->
12:20 Ven`` TIL about the $_ with X idiom :). lizmat++
12:20 domidumont joined #perl6
12:20 Ven`` well, $x = $_ with $y, rather.
12:23 timotimo it's like R//R= :P
12:24 timotimo (except that still gives you the wrong thing)
12:24 timotimo or, huh, maybe not?
12:24 timotimo i don't think R= is actually a metaop
12:24 raschipi So, people really didn't like the way I tried to explain why Perl6 doesn't have some guarantees other languages have. Isn't it the motive to not guarantee everything will be garbage collected to make sure rakudo will exit fast? (Letting the OS do the work...) And the motive for not doing reference counting is to allow the flexibility necessary for more modern GC designs?
12:25 timotimo well, reference counting does have a big performance impact for multithreaded programs
12:25 timotimo and yeah, we do let the OS clean everything up, that's why we don't guarantee we run DESTROY for everything
12:26 zakharyas joined #perl6
12:27 raschipi So, what did I got wrong? Zoffix, can you help me? What were the details I missed?
12:28 timotimo let me look again
12:29 raschipi I can bring you links to the relevant parts if you want.
12:31 Zoffix joined #perl6
12:31 Zoffix raschipi: where did I say you got anything wrong?
12:31 Zoffix Defensive much?
12:31 raschipi No, I'm just asking if that's the case.
12:32 raschipi Because of this: https://irclog.perlgeek.de/perl6/2017-08-21#i_15048898. I'm asking what you meant, did I got some detail wrong?
12:33 timotimo you can say "refcounting is just a differnet mechanism", but in multithreaded situations it's far inferior to anything "completely" gc-based
12:33 Zoffix I asked if it were really true we used different mechanism from Perl 5 simply for performance reasons.
12:33 timotimo doesn't D offer both ref-counted parts and GC'd parts? and if you don't use the GC, the GC doesn't end up in your program at all?
12:33 raschipi OK, thanks for the explanation.
12:33 Zoffix left #perl6
12:34 domidumont joined #perl6
12:40 gfldexwork left #perl6
12:43 domidumont joined #perl6
12:46 mr-foobar joined #perl6
12:47 sena_kun joined #perl6
12:50 NeuralAnomaly joined #perl6
12:52 lizmat I seem to recall that MoarVM had some parts refcounted, but that turned out to be a Bad Idea(tm)
12:54 atroxaper joined #perl6
12:54 pierre_ joined #perl6
12:57 macsnowball joined #perl6
12:57 mcmillhj joined #perl6
13:06 timotimo was that the frame cache or something? hmm.
13:06 jnthn Frames used to be ref-counted
13:06 bdmatatu joined #perl6
13:06 jnthn Before we introduced the call stack regions mechanism
13:06 jnthn And then made them GC-able
13:07 smash joined #perl6
13:07 jnthn And yeah, it didn't work out too well to have a hybrid model 'cus it intersected badly with generational GC
13:07 jnthn So as soon as your program kept lots of closures alive, GC performance started to tank
13:15 mspo can you create your own gc generations at runtime?
13:16 jnthn No
13:16 jnthn .oO( Does any VM do that? :) )
13:18 mspo erlang, of course :)
13:18 mspo each process is its own thing
13:19 raschipi I heard Erlang has the opposite problem people usually have with concurrency, _nothing_ is shared.
13:19 mspo but the beam collector only works on process-level.  There are no generations that i know about
13:19 mspo raschipi: yeah it's tricky
13:19 mspo X="stuff".
13:21 raschipi mspo: Do you know if it's possible to mmap files in diffrent heavy weight threads in Erlang?
13:22 mspo raschipi: you don't have any access to os threads at all, as far as I know
13:22 mspo raschipi: BEAM decides the number of threads and how to schedule them
13:22 raschipi Right, does it have an interface for mmap?
13:24 mspo raschipi: I don't think so
13:24 raschipi Thanks.
13:25 mspo raschipi: if file:something does an mmap under the hood or not; I wouldn't know
13:26 mspo raschipi: but it would be unusual for erlang to expose that kind of low level detail
13:26 raschipi mspo: I'm seeing the discussion online, and people talk about patching the VM to get that behavior.
13:27 mspo raschipi: it would be a nice option probably
13:27 raschipi mmap is most interesting when the same file is mapped in multiple processes.
13:29 raschipi "because of mmap‘s alignment restrictions combined with the way the Erlang runtime allocate binaries, I was forced to copy the data into the binary, thus killing any performance benefits mmap might have provided."
13:35 sena_kun > m: say "<html>My Content</html>" ~~ /'<html>' .*? '<'/
13:35 sena_kun m: say "<html>My Content</html>" ~~ /'<html>' .*? '<'/
13:35 camelia rakudo-moar b686f4: OUTPUT: «?<html>My Content<??»
13:35 sena_kun m: say "<html>My Content</html>" ~~ /'<html>' .*? '<h'/
13:35 camelia rakudo-moar b686f4: OUTPUT: «Nil?»
13:35 sena_kun Do I miss something?
13:36 jnthn /
13:36 sena_kun omg
13:36 mspo can you tell perl6 to mmap a file?
13:37 cdg joined #perl6
13:37 Cabanossi joined #perl6
13:37 raschipi mspo: I suppose I should try it using NativeCall.
13:38 mspo raschipi: I think they would need a nif-module to give an mmap interface but i don't know how it would all work
13:38 mspo so the same answer :)
13:39 timotimo yeah, nativecall lets you handle mmapped stuff
13:39 timotimo you can't allocate perl6 objects into an mmapped region, though
13:40 raschipi Well, bummer.
13:40 mspo is that a practical limitation?
13:41 raschipi Like I said, the interesting part is to have a mmaped file in two processes, alocating the objects in the file would mean the object would be available in both processes.
13:41 raschipi Like if they were threads.
13:42 moritz how do pointers work in mmap'ped memory regions?
13:44 timotimo if you allocate a perl6 object into a shared memory region, it's very easy to make your vm segfault ...
13:45 moritz I can imagine, yes
13:45 raschipi moritz: Pointers are restricted to offsets to inside the file itself.
13:46 raschipi I completely see why it doesn't work, though.
13:48 ingy how do I get every element of an array after the first?
13:48 AlexDaniel m: my @a = <a b c d>; say @a[1..*]
13:48 camelia rakudo-moar b686f4: OUTPUT: «(b c d)?»
13:48 ingy ta
13:48 timotimo m: my @a = <a b c d e f g>; .say for @a.skip(1)
13:48 camelia rakudo-moar b686f4: OUTPUT: «b?c?d?e?f?g?»
13:49 AlexDaniel bench: HEAD my @a = <a b c d>; for ^10000 { say @a[1..*] }
13:49 benchable6 AlexDaniel, starting to benchmark the 1 given commit
13:49 benchable6 AlexDaniel, ¦HEAD: «1.6327»
13:49 AlexDaniel bench: HEAD my @a = <a b c d>; for ^10000 { .say for @a.skip(1) }
13:49 benchable6 AlexDaniel, starting to benchmark the 1 given commit
13:49 AlexDaniel that's not entirely identical, but…
13:49 Ven`` the first one creates a temporary string
13:50 AlexDaniel m: my @a = <a b c d e f g>; say @a.skip(1)
13:50 camelia rakudo-moar b686f4: OUTPUT: «(b c d e f g)?»
13:50 benchable6 AlexDaniel, ¦HEAD: «6.6695»
13:50 Ven`` why not say @a.skip(1)?
13:50 AlexDaniel bench: HEAD my @a = <a b c d>; for ^10000 { say @a.skip(1) }
13:50 benchable6 AlexDaniel, starting to benchmark the 1 given commit
13:50 benchable6 AlexDaniel, ¦HEAD: «1.2387»
13:50 AlexDaniel yep
13:51 timotimo one less loop, that explains the performance discrepancy
13:51 Ven`` The overhead is probably because the 1st one has two iterators, the second one has one
13:51 Ven`` (one iterator for 1..*, one iterator for @a vs one iterator for @a)
13:52 AlexDaniel m: my @a = <a b c d>; say WHAT @a[1..*]
13:52 camelia rakudo-moar b686f4: OUTPUT: «(List)?»
13:52 AlexDaniel m: my @a = <a b c d>; say WHAT @a.skit(1)
13:52 camelia rakudo-moar b686f4: OUTPUT: «No such method 'skit' for invocant of type 'Array'. Did you mean any of these??    emit?    shift?    sin?    skip??  in block <unit> at <tmp> line 1??»
13:52 AlexDaniel m: my @a = <a b c d>; say WHAT @a.skip(1)
13:52 camelia rakudo-moar b686f4: OUTPUT: «(Seq)?»
13:52 timotimo it doesn't necessarily do an iteration of the 1..*
13:52 timotimo it could totally see it's a Range and work more efficiently
13:52 AlexDaniel yea, I'd expect it to be smarter than that
13:53 AlexDaniel why does it have to return a List there though?
13:53 Ven`` let's go check with the magic bus
13:53 AlexDaniel m: my @a = <a b c d>; say WHAT @a.list.skip(1)
13:53 camelia rakudo-moar b686f4: OUTPUT: «(Seq)?»
13:53 jjatria joined #perl6
13:53 AlexDaniel m: my @a = <a b c d>; say WHAT @a.list[1..*]
13:53 camelia rakudo-moar b686f4: OUTPUT: «(List)?»
13:54 kannan joined #perl6
13:54 Ven`` m: my @a = 1..*; say WHAT @a[1..*]
13:54 Ven`` reified?
13:54 camelia rakudo-moar b686f4: OUTPUT: «(timeout)»
13:54 timotimo AFK for a bit
13:54 Ven`` m: my @a = 1..*; say WHAT @a.skip(1)
13:54 camelia rakudo-moar b686f4: OUTPUT: «(Seq)?»
13:54 Ven`` yup...
13:55 kannan hello good day. i am new here. can one learn perl6 without knowing much of perl5? (just going to get started with coding)
13:56 Ven`` kannan: https://perl6.org/resources/ see here
13:56 Ven`` We have a "For Newcomers" section.
13:57 kannan Ven` ` oh ok, thanks
13:57 raschipi kannan: Yes, no need to know Perl5 at all.
13:57 Ven`` say: 1..* ~~ Iterable:D
13:57 kannan good. i will start then.
13:57 Ven`` m: say 1..* ~~ Iterable:D
13:57 camelia rakudo-moar b686f4: OUTPUT: «True?»
13:58 Ven`` timotimo, AlexDaniel: apparently lizmat++ worked on such a candidate and reverted the commit ( https://github.com/rakudo/rakudo/commit/7599e0c3ffb2c7ef29c2994c7d212360459f14fe )
14:01 lizmat yeah, it broke stuff in the ecosystem afaik
14:01 domidumont joined #perl6
14:01 lizmat and I also realized I would need to dig deeper to really make things faster generally
14:02 lizmat that area of the setting is still showing scars of the GLR
14:02 lizmat m: my @a = ^10; dd @a[^5].WHAT
14:02 camelia rakudo-moar b686f4: OUTPUT: «List?»
14:02 lizmat ideally, I would want that to return a Seq
14:03 AlexDaniel yeah
14:03 lizmat but that will be for after the SPW
14:03 AlexDaniel Ven``: RT #131830
14:03 synopsebot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=131830
14:03 jnthn Seq? It's by design that indexing consistently returns a List, I thought...
14:03 lizmat jnthn: but why ?
14:04 Ven`` .oO( The GLR also left scars in my understanding of this apparently )
14:05 jnthn I'm sure this was discussed a bunch during the GLR.
14:05 ilmari GLR = gashes left and right
14:05 jnthn I don't consider it up for being revisited.
14:05 lizmat well, my recollection is that it was considered too complex to make it a Seq
14:05 lizmat but with my current knowledge of iterators, seqs and other internals,
14:06 lizmat I think it is merely tricky
14:06 lizmat and it could give a performance boost in many cases
14:06 jnthn Yeah but it's API. Everybody who's written my @foo := @bar[1..5]; would have their code broken by this
14:07 lizmat so perhaps this needs to be 6.d  :-)
14:07 jnthn I don't recall it as "too complex", I recall it as a concious decision that slicing should return a List
14:08 skids joined #perl6
14:28 matiaslina joined #perl6
14:30 daxim hey, the bugs I filed three days ago failed to materialise in the queue.  I need a champion to take over for me: <http://paste.debian.net/hidden/33aab62d/>  (NB: 3 bugs altogether)  please highlight me if you do so.
14:31 brrt joined #perl6
14:32 ugexe there is no binary grammar parsing
14:33 daxim that's what the bug says
14:33 ugexe thats a feature request
14:34 AlexDaniel so mark it as [RFC] and that's it.
14:35 AlexDaniel daxim: fwiw, “parser lacks a sensible error message” is a known thing. In fact, this was addressed a couple of days ago, but it's not backward-compatible
14:35 daxim what does addressed mean here?
14:36 AlexDaniel daxim: it was changed to return a Failure (which had all of the nice bits) instead of a Nil, but you can probably imagine how many people were relying on the old behavior :)
14:36 daxim ok, cool
14:36 AlexDaniel daxim: so first we moved it to 6.d (and it was usable if you put use v6.d.PREVIEW in your source), but today it was decided that it's not going to fly
14:37 AlexDaniel daxim: in other words, 2017.08 release is not going to have it
14:37 mcsnolte joined #perl6
14:38 Ven`` .oO( .parse-pretty-please )
14:39 ugexe say $match-obj isnt pretty enough?
14:39 AlexDaniel daxim: in any case, here's a ticket, so we probably don't need another one: RT #131919&
14:39 synopsebot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=131919
14:39 Ven`` ugexe: when a match failed?
14:39 Ven`` the Failure isn't for when the match succeeded.
14:40 ugexe ha i thought you were asking for a .parse-pretty (like a json-pretty)... I missed the please
14:42 AlexDaniel daxim: also, I've already done a bunch of PRs to modules that relied on the previous behavior, in a hope that it will ease up the transition. You see, we want this change as strongly as your ticket suggests it :)
14:42 mspo mm binary grammar
14:42 timotimo fwiw, you can parse your string as latin1 and pretend you have bytes with your grammar ...
14:43 AlexDaniel daxim: “infinite loop with grammar” is a valid ticket, but the doc part of it is better submitted here: https://github.com/perl6/doc/issues
14:45 daxim what about the failure mode?
14:48 AlexDaniel daxim: that's why I say that the ticket is valid. Most likely there's a way to do it better, but it has to be discussed more
14:49 daxim can you take care that the ticket doesn't fall under the table?
14:58 pierre_ joined #perl6
14:58 rindolf joined #perl6
15:06 macsnowball left #perl6
15:07 Cabanossi joined #perl6
15:24 gregf_ joined #perl6
15:24 Kyo91 joined #perl6
15:26 sena_kun joined #perl6
15:29 Skarsnik joined #perl6
15:29 Skarsnik Hello
15:29 timotimo yo
15:34 Ven`` \o
15:36 kannan ok, now i ran the 'hello world' !! i added 3 lines to /etc/profile
15:36 kannan export PATH=$PATH:/opt/rakudo-star-2017.07/bin
15:36 kannan export PATH=$PATH:/opt/rakudo-star-2017.07/share/perl6/bin
15:36 kannan export PATH=/usr/src/perl6/rakudo-star-2017.07/install/bin/:$PATH
15:37 kannan not sure if these are the correct ones, i added first two from instructions seen after a 'make install', and the last one from installation instruction.
15:37 Cabanossi joined #perl6
15:38 kannan on website - http://rakudo.org/how-to-get-rakudo/#Installing-Rakudo-Star-Linux
15:39 Skarsnik hm did you set a prefix?
15:46 timotimo can you look what these paths contain?
15:47 Skarsnik what di you use? rakudobrew?
15:49 timotimo i hope not!
15:49 ugexe its rakudo star, and they showed a link to the instructions they followed
15:49 kannan tom editor gives an error when i run a helloworld.p6 - Check Error: Failed to spawn command `perl6`. Make sure `perl6` is installed and on your PATH
15:50 kannan atom editor i meant
15:50 ugexe did you refresh your shell so the PATH got updated? what does `echo $PATH` show?
15:50 devmikey joined #perl6
15:51 timotimo when you change /etc/profile it doesn't immediately take effect everywhere
15:51 Skarsnik ugexe, dunno the link point me to etheir apt or rakudobrew
15:52 timotimo why are we still recommendin rakudobrew on rakudo.org
15:52 Petit_Dejeuner is it that bad?
15:53 kannan ugexe, thanks. i just need to restart the atom editor.
15:54 jjatria joined #perl6
15:54 timotimo it can cause some trouble
15:54 timotimo it's meant for rakudo developers who want to quickly switch between multiple rakudo versions
15:54 Petit_Dejeuner like the python or ruby version managers?
15:55 * Petit_Dejeuner can't remember what they're called.
15:55 Petit_Dejeuner rvm, pvm?
15:55 Skarsnik dunno I always fetch rakudo directly
15:56 kannan i installed from source (rakudo star) , as explained on the perl6intro page for installing. i did not install rakudobrew.
15:56 kannan now all i have left is to learn to code and learn perl6 , heh.
15:57 ugexe there is a few problems if you aren't experienced enough to know whats happening. for instance: problems with the git repos between 1 of 3 different things (rakudo, moarvm, nqp), artifacts when upgrading an existing installation ala moar-nom/moar-blead, previous module installations can go haywire, etc
15:58 timotimo and the bin/ stuff modules install ... they only actually show up when you "rakudobrew rehash"
15:58 rba_ joined #perl6
15:58 zakharyas joined #perl6
16:00 pecastro joined #perl6
16:00 telex joined #perl6
16:01 rba__ joined #perl6
16:02 ugexe but if you *do* know what you are doingits invaluable
16:03 ugexe and "know what you are doing" I really mean "know how to avoid the traps"
16:04 Skarsnik rm -fr rakudo && git clone
16:04 Skarsnik how git work in a nutshell
16:08 mspo yeah that split is pretty confusing
16:08 imcsk8 joined #perl6
16:10 setty1 joined #perl6
16:16 AlexDaniel joined #perl6
16:17 rba__ joined #perl6
16:19 P6steve joined #perl6
16:31 alimon joined #perl6
16:31 rba_ joined #perl6
16:32 P6steve Hi - I am trying to write a perl6 Class "Distance" to work as a type. This works my Distance $d .= new: '1e1 m'; With infix foo, this too $d ?  '3e1 m'; BUT my Distance $c; $c ? '3e1 m'; seems to load attributes but leave object itself undefined.
16:32 P6steve Probably a newbie error ... can someone give me a hint, please?
16:33 S007 joined #perl6
16:34 mcmillhj joined #perl6
16:36 timotimo how does your infix work?
16:37 P6steve sub infix:<?> ($left, $right) { return $left.assign($right); }
16:37 timotimo that'll only work if the assign method works on undefined Distance objects
16:38 timotimo rather, "the type object"
16:38 timotimo if you don't .new your my Distance $c, it'll be just the type object of Distance
16:38 raiph joined #perl6
16:39 timotimo you can do a little magic with "is rw": turn your infix into a multi sub, one of the multis will look like (Distance:U $left is rw, $right) { $left = Distance.new; $left.assign($right) }
16:39 P6steve multi method assign (Str:D $right) { if self.defined { self.extract($right);  } else { self.new($right); }    }
16:39 timotimo oh, ok
16:40 timotimo that still doesn't do anything to actually cause assignment to the variable on the LHS of your arrow
16:40 timotimo it'll return the new object, but it'll just fall on the floor
16:40 P6steve ah - now I (think I) get it - multi the infix seems best
16:41 timotimo it makes sense to only ask for "is rw" if it's a Distance:U
16:42 timotimo because that lets you do something like Distance.new <= '1 m', where there is no variable that it could modify
16:43 P6steve sounds good - let me give that a shot - thanks
16:44 st_elmo joined #perl6
16:46 rba__ joined #perl6
16:47 timotimo you're welcome!
16:47 timotimo i'll be afk for a bit
16:52 Cabanossi joined #perl6
17:01 rba_ joined #perl6
17:02 P6steve my Distance $c ? '5e1 m'; say $c; #50 m   Nice
17:11 Petit_Dejeuner Weird, when I call the socket 'print' method with a string argument, I get an error as if I'm calling 'print' as a string method and a function, like 'abc'.print('abc').
17:11 gfldex m: constant \T = Int; my T $b;
17:11 yoleaux 08:19Z <lizmat> gfldex: cool blog: https://gfldex.wordpress.com/2017/08/20/preparations-for-your/  but couldn't you use a trait aka "my $c is watched" ?
17:11 camelia rakudo-moar 69a91d: ( no output )
17:11 gfldex is that doced?
17:12 gfldex and more important, is that specced?
17:13 ugexe looking at the doc for trait i would say yes?
17:16 gfldex it's a bit to hidden. I shall issue right away!
17:16 rba__ joined #perl6
17:24 jjatria joined #perl6
17:31 rba_ joined #perl6
17:34 sjoshi joined #perl6
17:35 DerAlex joined #perl6
17:35 timotimo s: IO::Socket::INET, 'print', \("Foo")
17:35 SourceBaby timotimo, Sauce is at https://github.com/rakudo/rakudo/blob/201708/src/core/IO/Socket.pm#L93
17:35 timotimo huh, how did the . in the tag name get lost?
17:36 timotimo Petit_Dejeuner: do you have an IO::Socket::INET or an IO::Socket::Async?
17:36 Petit_Dejeuner timotimo: I have an IO::Socket::INET
17:36 timotimo mhm, it should work with a string argument
17:36 timotimo can you show some code?
17:36 Petit_Dejeuner sure
17:37 DrForr joined #perl6
17:37 Cabanossi joined #perl6
17:38 Petit_Dejeuner timotimo: https://pastebin.com/raw/s9cZbQb1
17:38 DrForr Well, that was an odd greeting.
17:38 yoleaux 29 Jun 2017 10:52Z <tbrowder> DrForr: my Perl6::Parser PR passes all tests
17:38 timotimo yo DrForr, how are you doing?
17:39 timotimo howd on
17:39 timotimo Petit_Dejeuner: why does it say "parrot" there?
17:39 timotimo what's your perl6 --version?
17:40 Petit_Dejeuner 'This is perl6 version 2014.07 built on parrot 6.6.0 revision 0'
17:40 Petit_Dejeuner oh
17:40 sjn quick question; is there a way to query the version on of a loaded module? (eqiv. to print $My::Module::VERSION in perl5)
17:40 timotimo that's really not good :D
17:40 Petit_Dejeuner I'm guessing 2014's way too old.
17:41 Petit_Dejeuner What's the point of having a package manager if everything is several years out of date. I gotta go install by hand.
17:41 DrForr Working on the emojicode parser, thinking about debugging.
17:41 timotimo there's packages you can get for your distro
17:41 timotimo huggable: packages
17:41 huggable timotimo, nothing found
17:41 timotimo buggable: packages
17:41 Petit_Dejeuner thanks
17:41 timotimo huggable: debian
17:41 huggable timotimo, nothing found
17:41 timotimo really
17:41 AlexDaniel huggable: deb
17:41 huggable AlexDaniel, CentOS, Debian, Fedora and Ubuntu Rakudo packages: https://github.com/nxadm/rakudo-pkg/releases
17:41 wamba joined #perl6
17:41 AlexDaniel huggable: debian :is: CentOS, Debian, Fedora and Ubuntu Rakudo packages: https://github.com/nxadm/rakudo-pkg/releases
17:41 huggable AlexDaniel, Added debian as CentOS, Debian, Fedora and Ubuntu Rakudo packages: https://github.com/nxadm/rakudo-pkg/releases
17:42 AlexDaniel huggable: packages :is: CentOS, Debian, Fedora and Ubuntu Rakudo packages: https://github.com/nxadm/rakudo-pkg/releases
17:42 huggable AlexDaniel, Added packages as CentOS, Debian, Fedora and Ubuntu Rakudo packages: https://github.com/nxadm/rakudo-pkg/releases
17:43 timotimo thanks!
17:43 timotimo Petit_Dejeuner: if you're on any of these distros, you're in luck!
17:46 rba__ joined #perl6
17:47 ChoHag joined #perl6
17:49 sjn m: use Test; say Test.^ver;
17:49 camelia rakudo-moar 69a91d: OUTPUT: «(Mu)?»
17:49 DrForr Working on the emojicode parser, thinking about debugging.
17:49 DrForr Grr.
17:50 sjn doesn't any of the core rakudo modules have a version defined?
17:50 El_Che DrForr: I understand the -o fun part, but wtf :)
17:51 sjn El_Che: -o fun # output fun
17:51 sjn El_Che: -O fun # optimize fun
17:51 DrForr It just happens that I was on the worng tmux screen.
17:51 sjn :)
17:52 DrForr That and I'm distracted by watching a .. review, I think... of /Moonwalker/.
17:53 El_Che sjn: -O ????
17:53 sjn El_Che:-D
17:54 El_Che timotimo, Petit_Dejeuner: if you use and other distro, and there is demand for pkgs, I can add it.
17:55 Petit_Dejeuner El_Che: I'm on Devuan, so the Debian package would probably work, but it would just need to be tested.
17:55 Petit_Dejeuner Which I guess <<I'm>> in a pretty good position to do.
17:56 Petit_Dejeuner Although I just started installing rakudobrew, so I'll have to sanitize my system first.
17:56 El_Che wel, if devuan is binary compatible with the released debian version, it should work. No systemd deps on the pkgs :)
17:56 Petit_Dejeuner Oh, then that should be fine!
17:58 Petit_Dejeuner Let me see if rakudobrew works, then I'll try uninstalling it and check if the deb works.
18:01 rba_ joined #perl6
18:03 El_Che both work :)
18:07 Cabanossi joined #perl6
18:16 rba__ joined #perl6
18:30 leont joined #perl6
18:31 cdg joined #perl6
18:31 rba_ joined #perl6
18:39 rba__ joined #perl6
18:39 mcmillhj joined #perl6
18:41 TEttinger joined #perl6
18:46 Geth ¦ ecosystem: 23e74625a9 | (Martin Barth)++ (committed using GitHub Web editor) | META.list
18:46 Geth ¦ ecosystem: time::crontab META.info -> META6.json
18:46 Geth ¦ ecosystem: review: https://github.com/perl6/ecosystem/commit/23e74625a9
18:47 rba_ joined #perl6
18:49 Rawriful joined #perl6
18:51 mcmillhj joined #perl6
18:53 jjatria joined #perl6
18:55 rba__ joined #perl6
19:02 rba_ joined #perl6
19:04 mcmillhj joined #perl6
19:07 Cabanossi joined #perl6
19:07 pierre_ joined #perl6
19:07 espadrine joined #perl6
19:17 setty1 joined #perl6
19:17 rba__ joined #perl6
19:25 geekosaur joined #perl6
19:29 gfldex m: multi sub trait_mod:<is>(Variable $v, :$watched){ dd $v }; my $c is watched; say $c;
19:30 camelia rakudo-moar 69a91d: OUTPUT: «Variable $c = Variable.new(name => "\$c", scope => "my", var => Any, block => -> gnatur { #`(Block|42281752) ... }, slash => Perl6::Grammar.new() #`[140095662401952])?(Any)?»
19:30 gfldex what is slash in `Variable`?
19:30 pecastro joined #perl6
19:30 ugexe the variable name is '$c' i presume
19:31 ugexe oh literal 'slash'
19:31 rba_ joined #perl6
19:31 moritz probably a $/ during compile time
19:37 gfldex i'm trying to bind a new container to a Variable in a trait. Is there actually any way to do that?
19:37 timotimo gnatur %)
19:37 timotimo gfldex: i don't think so, as traits are compile-time
19:39 lizmat gfldex: I have been trying that this afternoon...  didn't get it to work yet
19:39 gfldex i'm trying to tie a Proxy to a Variable as lizmat suggested. Looks like I will have to dive into NQP land.
19:39 gfldex muddy waters that
19:39 lizmat I assume you got to the Scalar container already?  (1st param.var.VAR )
19:40 gfldex yes
19:40 lizmat I was thinking that maybe by using the $!whence on the container, you could do something
19:40 cdg joined #perl6
19:41 lizmat but I didn't get that to work: guess I still don't understand when the $!whence is being called
19:42 lizmat and I really should work on my slides  :-)
19:44 timotimo i wonder if you should perhaps install it as "is default" does it
19:46 Spot__ joined #perl6
19:46 rba__ joined #perl6
19:48 timeless joined #perl6
19:52 gfldex timotimo: doesn't work. The default value is just a fallback for the value in the container it seams.
19:52 lizmat yeah, that doesn't work
19:52 lizmat either we need to replace the container with a proxy, or do some $!whence magic
19:53 timotimo ah
19:54 OtherNick joined #perl6
19:55 moritz my $var := watched(); and then a sub watched that returns a Proxy
19:56 cdg joined #perl6
19:56 lizmat moritz: yes, but we were going for something syntactically less invasive
19:58 cdg_ joined #perl6
20:01 rba_ joined #perl6
20:09 pierre_ joined #perl6
20:15 yqt joined #perl6
20:16 rba__ joined #perl6
20:19 raschipi joined #perl6
20:19 emeric joined #perl6
20:31 rba_ joined #perl6
20:37 nadim joined #perl6
20:39 cdg joined #perl6
20:46 teatime joined #perl6
20:46 rba__ joined #perl6
20:49 * teatime is trying to determine what perl6 thing, if any, is the perl6 equiv to nodejs's streams / object streams
20:49 teatime supplies, I think...
20:52 Cabanossi joined #perl6
20:54 jjatria joined #perl6
20:55 teatime like... streams, pipes, coroutines, are equivalent, yeah?
21:01 rba_ joined #perl6
21:02 ugexe probably closer to a Channel
21:04 mspo promise?
21:06 lizmat and yet another Perl 6 Weekly hits the net: https://p6weekly.wordpress.com/2017/08/21/2017-34-going-atomic/
21:07 |oLa| joined #perl6
21:08 raschipi yay lizmat++
21:12 gfldex lizmat: s/if 0 if/of 0 if/
21:13 lizmat gfldex++
21:13 lizmat (fixed)
21:15 gfldex ohh, it's a weekly that's announcing a talk about weeklies … one more level of indirection :->
21:16 lizmat .oO( indirection is grossly overrated )
21:16 rba__ joined #perl6
21:25 mcmillhj joined #perl6
21:31 rba_ joined #perl6
21:37 Cabanossi joined #perl6
21:38 AlexDaniel lizmat++
21:41 mcmillhj joined #perl6
21:46 rba__ joined #perl6
21:46 timotimo lizmat++ :)
21:56 ugexe ahem ?+++
21:57 timotimo yeah, better make sure none of the ++ go to waste
21:57 mcmillhj joined #perl6
21:58 geekosaur ...lizmatom? :p
21:59 geekosaur or is that the nuclear option?
22:01 lizmat hmmm  liztormatomic  :-)
22:01 rba_ joined #perl6
22:02 TEttinger there's ?
22:03 mcmillhj joined #perl6
22:03 lizmat .u ?
22:03 yoleaux U+2623 BIOHAZARD SIGN [So] (?)
22:03 lizmat yeah, we're keeping that for the dirty work
22:03 lizmat perhaps "use MONKEY" should have a unicode counterpart: "use ?"
22:03 lizmat :-)
22:04 lizmat good night, #perl6!
22:04 TEttinger ?
22:05 TEttinger .u ?
22:05 yoleaux U+2622 RADIOACTIVE SIGN [So] (?)
22:11 timotimo so ... the spw, right?
22:11 timotimo there's a pre-workshop meetup. the description asks people to "add this to your personal schedule" so they know how many spots to reserve
22:11 timotimo except the software won't let me do that, nor does it show any other attendees
22:16 rba__ joined #perl6
22:18 mcmillhj joined #perl6
22:21 cono m: class ? { method state { "DEAD" } }; ?.new.state.say
22:21 camelia rakudo-moar 8a0f6a: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>?Unable to parse class definition?at <tmp>:1?------> 3class7?5 ? { method state { "DEAD" } }; ?.new.st?    expecting any of:?        generic role?»
22:22 cono is there any way to create unicode class name? :)
22:23 cono .u ?
22:23 yoleaux U+2620 SKULL AND CROSSBONES [So] (?)
22:23 zoll joined #perl6
22:24 mcmillhj joined #perl6
22:31 rba_ joined #perl6
22:35 skids joined #perl6
22:38 cdg_ joined #perl6
22:40 mcmillhj joined #perl6
22:41 [Coke] unicode, sure. emoji, no.
22:41 MasterDuke joined #perl6
22:44 jnthn It'd have to something that matches \w+ to parse the usual way. Though you can probably do class ::('weird symboles here') { } to do it anyway
22:46 rba__ joined #perl6
22:52 Geth ¦ doc/master: 5 commits pushed by (Will "Coke" Coleda)++
22:52 Geth ¦ doc/master: 37d8c027b8 | mention the slightly better way to do it
22:52 Geth ¦ doc/master: 6067a5fa2e | Allow for :method<False> to disable method fuzzing
22:52 Geth ¦ doc/master: d815f434b8 | test more examples
22:52 Geth ¦ doc/master: ade4716c03 | fix typo
22:52 Geth ¦ doc/master: cf190112c0 | remove useless whitespace
22:52 Geth ¦ doc/master: review: https://github.com/perl6/doc/compare/cc6f61e5b0...cf190112c0
22:53 [Coke] m: class ::('????') { ... } ;
22:53 camelia rakudo-moar 8a0f6a: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>?The following packages were stubbed but not defined:?    ?????at <tmp>:1?------> 3class ::('????') { ... } ;7?5<EOL>?»
22:53 [Coke] m: class ::('????') { } ;
22:53 camelia rakudo-moar 8a0f6a: ( no output )
22:54 cono heh
22:54 [Coke] m: class ::('????') { } ;say ????.new.^name;
22:54 camelia rakudo-moar 8a0f6a: OUTPUT: «5===SORRY!5===?Argument to "say" seems to be malformed?at <tmp>:1?------> 3class ::('????') { } ;say7?5 ????.new.^name;?Bogus postfix?at <tmp>:1?------> 3class ::('????') { } ;say 7?5????.new.^name;?    expecting any of:? …»
22:55 ugexe m: class ::("? ") { method state { "DEAD" } }; ::("?.").new.state.say
22:55 camelia rakudo-moar 8a0f6a: OUTPUT: «Failed??Actually thrown at:?  in block <unit> at <tmp> line 1??»
22:56 AlexDaniel I mean…
22:56 AlexDaniel m: class term:<?> { method state { "DEAD" } }; term:<?>.new.state.say
22:56 camelia rakudo-moar 8a0f6a: OUTPUT: «DEAD?»
22:56 AlexDaniel this works, but…
22:56 zoll Does the 12:54 error message complain about "skull" not having a "say" method?
23:01 rba_ joined #perl6
23:07 Cabanossi joined #perl6
23:09 pierre_ joined #perl6
23:10 pierre_ joined #perl6
23:16 ntinos joined #perl6
23:16 rba__ joined #perl6
23:21 notostraca joined #perl6
23:23 raschipi joined #perl6
23:25 BenGoldberg joined #perl6
23:31 rba_ joined #perl6
23:36 TEttinger joined #perl6
23:46 rba__ joined #perl6
23:51 Xliff m: my %a = { 'A' => 1, 'B' => 2, 'cD' => 34, 'Ef' => 56 }; %a.keys => .lc; dd %a;
23:51 camelia rakudo-moar 8a0f6a: OUTPUT: «Potential difficulties:?    Useless use of hash composer on right side of hash assignment; did you mean := instead??    at <tmp>:1?    ------> 3=> 1, 'B' => 2, 'cD' => 34, 'Ef' => 56 }7?5; %a.keys => .lc; dd %a;?WARNINGS for <tmp>:?Useles…»
23:58 AlexDaniel m: my %a = 'A' => 1, 'B' => 2, 'cD' => 34, 'Ef' => 56
23:58 camelia rakudo-moar 8a0f6a: ( no output )
23:59 AlexDaniel or, if you insist
23:59 AlexDaniel m: my %a = %('A' => 1, 'B' => 2, 'cD' => 34, 'Ef' => 56)
23:59 camelia rakudo-moar 8a0f6a: ( no output )

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

Perl 6 | Reference Documentation | Rakudo