Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-09-09

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:01 BenGoldberg m: '🙉'.uniname.say
00:01 camelia rakudo-moar bc3592: OUTPUT«HEAR-NO-EVIL MONKEY␤»
00:01 BenGoldberg m: '🙉'.succ.uniname.say
00:01 camelia rakudo-moar bc3592: OUTPUT«HEAR-NO-EVIL MONKEY␤»
00:01 BenGoldberg m: '🙉'.pred.uniname.say
00:01 camelia rakudo-moar bc3592: OUTPUT«HEAR-NO-EVIL MONKEY␤»
00:02 BenGoldberg m: '🙉'.ord.pred.chr.uniname.say
00:02 camelia rakudo-moar bc3592: OUTPUT«SEE-NO-EVIL MONKEY␤»
00:08 eyck joined #perl6
00:10 itaipu joined #perl6
00:10 tushar joined #perl6
00:12 tushar Hello, I have very basic question. What is a difference between "class" and "unit class"? I have seen several times "unit class classname" in several .pm files? Why does .pm file has it instead "class"?
00:13 Zoffix tushar, unit class; lets you avoid using { } to wrap the entire class in
00:14 geekosaur unit class Foo; declares that the whole file is the class definition
00:14 TimToady so it's like declaring the class from the inside
00:14 geekosaur instead of class Foo { ... }
00:15 tushar ohh yes.. I have noticed that too. Whenever, "unit class classname" present into .pm files, I have not seen {} after classname.
00:16 AlexDaniel awesome feature, by the way
00:17 tushar @Zoffix, @geekosaur, and @TimToady -- Thanks for prompt explanation.
00:17 Zoffix Any time.
00:17 TimToady m: .uniname.say for '🙈' ... '🙊'
00:17 camelia rakudo-moar bc3592: OUTPUT«SEE-NO-EVIL MONKEY␤HEAR-NO-EVIL MONKEY␤SPEAK-NO-EVIL MONKEY␤»
00:23 pierre_ joined #perl6
00:23 bob777 joined #perl6
00:24 pierre_ joined #perl6
00:25 tbrowder I assume it's known doc build has been failing for over 13 hours.  From my quick look it's not because of doc pod changes.
00:26 geekosaur it's known, there was a change in precomp that broke the doc builder searching for precompiled modules
00:26 geekosaur last I heard a quick fix had been proposed but not applied
00:27 geekosaur (or, it was applied and this current failure mode is the result; the failure mode from the original change was different...)
00:27 tbrowder Looks like some dev will have to fix it.
00:35 wamba joined #perl6
00:36 BenGoldberg Does 'unit' only work with 'class' and 'module' ?
00:36 Zoffix sub MAIN too
00:36 geekosaur also package
00:37 geekosaur (but package isn't used much)
00:37 BenGoldberg m: package Foo; say 42;
00:37 camelia rakudo-moar bc3592: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤This appears to be Perl 5 code. If you intended it to be Perl 6 code, please use a Perl 6 style declaration like "unit package Foo;" or "unit module Foo;", or use the block form instead of the semicolon form…»
00:37 BenGoldberg m: unit package Foo; say 42;
00:37 camelia rakudo-moar bc3592: OUTPUT«42␤»
00:38 BenGoldberg m: unit package Foo { say 42 }
00:38 camelia rakudo-moar bc3592: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Cannot use 'unit' with block form of package declaration␤at <tmp>:1␤------> 3unit package Foo7⏏5 { say 42 }␤    expecting any of:␤        generic role␤»
00:38 BenGoldberg m: package Foo { say 42 }
00:38 camelia rakudo-moar bc3592: OUTPUT«42␤»
00:38 BenGoldberg What's the difference between a module and a package?
00:39 Zoffix also grammar
00:39 geekosaur package is the basic unit of namespacing. you could say that things like module and class are subclasses of package
00:39 geekosaur (that is, they are namespacing plus some kind of functionality)
00:40 BenGoldberg Where is 'unit' documented?
00:40 geekosaur oh, I;d expect unit role to work as well
00:41 BenGoldberg m: unit role Foo; 42
00:41 camelia rakudo-moar bc3592: OUTPUT«WARNINGS for <tmp>:␤Useless use of constant integer 42 in sink context (line 1)␤»
00:41 BenGoldberg m: unit role Foo; 42.say
00:41 camelia rakudo-moar bc3592: ( no output )
00:41 BenGoldberg m: role Foo {...}; Foo.new; unit role Foo; say(42);
00:41 camelia rakudo-moar bc3592: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Too late for unit-scoped role definition;␤Please use the block form.␤at <tmp>:1␤------> 3role Foo {...}; Foo.new; unit role Foo;7⏏5 say(42);␤»
00:41 BenGoldberg m: Foo.new; unit role Foo; say(42);
00:41 camelia rakudo-moar bc3592: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Illegally post-declared type:␤    Foo used at line 1␤␤»
00:42 geekosaur hm
00:42 geekosaur unit doesn't show up in the docs where I expected to find it
00:43 Zoffix left #perl6
00:43 geekosaur (tat said, I'm not sure where I expected to find it is where anyone else would look)
00:43 geekosaur first I looked in Syntax (since it's a more general thing, given what it can be applied to), then I looked in Packages
00:44 geekosaur oh, it *is* in Syntax.
00:44 geekosaur https://docs.perl6.org/language/syntax#Module,_Class,_Role,_and_Grammar_declaration
00:45 geekosaur "You can declare a unit of things without explicit curly brackets."
00:49 BenGoldberg That's not exactly a lot of docu.
00:50 BenGoldberg m: unit sub MAIN; say 42;
00:50 camelia rakudo-moar bc3592: OUTPUT«42␤»
00:50 geekosaur well, it is followed by an example... but yes, it's as threadbare as the export stuff was
00:50 geekosaur so is most of the documentation, really
00:52 geekosaur [[This Perl 6 documentation is a stub. You can help Perl 6 by expanding it.]]
00:53 BenGoldberg It would be really cool if 'unit' could be used on any expression which normally ends in a block, not just a handful of special cases.
00:53 geekosaur "any"? including, say, if and while?
00:54 BenGoldberg . o O (unit gather do; take 1; take 2; take 3)
00:55 BenGoldberg I see nothing wrong with 'unit while condition; statement; statement; statement;'
00:55 geekosaur er, 'say' there was rhetorical, not the sub/method
00:56 BenGoldberg 'unit if condition; statement; statement; statement;' should also work, but isn't any more useful than 'return unless condition; statements' or 'last unless condition; statements;'
00:57 Zoffix joined #perl6
00:57 geekosaur I was specifically thinking that (a) so how do you do 'else' (b) and, pedantically speaking, the ending block is the 'else' :p
00:58 BenGoldberg Obviously, you wouldn't be able to have an 'else BLOCK' after a 'unit if'
00:59 BenGoldberg Well, maybe you could if you wrote "unit if EXPR { STATEMENTS } else;", but that would be wierd. :)
01:01 geekosaur imo unit if already lands you in uncanny valley; what's more weird on top?
01:02 Zoffix bisect: "foo".IO.modified
01:03 Zoffix bisectable6, "foo".IO.modified
01:03 Zoffix :\
01:03 geekosaur bisectable took a header earlier
01:03 Zoffix Anyway, I'm tracing the doc failure to this line: https://github.com/gfldex/perl6-pod-to-bigpage/blob/a0baafbb1e8db76910aff9df0f9224c69777f82d/bin/pod2onepage#L66
01:04 geekosaur oh, no, that was benchable
01:04 Zoffix .modified is being called on a non-existant file, which returns a Failure. I'm suspecting that may have been returning something else in the past
01:04 Zoffix committable6, 2016.04 "foo".IO.modified.say
01:04 committable6 Zoffix, ¦«2016.04»: Failed to find 'foo' while trying to do '.modified'␤  in block <unit> at /tmp/VIcjqsBSK1 line 1␤␤Actually thrown at:␤  in block <unit> at /tmp/VIcjqsBSK1 line 1␤ «exit code = 1»
01:04 Zoffix hm
01:04 geekosaur precomp IDs changed yesterday from a subset of Str to a class
01:04 Zoffix Right, and moritz fixed that.
01:05 Zoffix committable6, 2016.04 try { "foo".IO.modified.say; CATCH { default { .^name.say } } }
01:05 committable6 Zoffix, ¦«2016.04»: X::IO::DoesNotExist
01:05 Zoffix committable6, HEAD try { "foo".IO.modified.say; CATCH { default { .^name.say } } }
01:05 Zoffix m: try { "foo".IO.modified.say; CATCH { default { .^name.say } } }
01:05 camelia rakudo-moar bc3592: OUTPUT«Instant:1453533000.729611␤»
01:05 Zoffix 0.o
01:05 Zoffix dafuq
01:06 Zoffix m: try { "not-foo".IO.modified.say; CATCH { default { .^name.say } } }
01:06 camelia rakudo-moar bc3592: OUTPUT«X::IO::DoesNotExist␤»
01:06 geekosaur m: ".".IO.dir.say
01:06 camelia rakudo-moar bc3592: OUTPUT«(".cpanm".IO ".local".IO ".npm".IO ".perl6".IO ".perlbrew".IO ".rcc".IO ".ssh".IO "Perlito".IO "evalbot".IO "log".IO "nqp-js".IO "p1".IO "p2".IO "perl5".IO "std".IO ".bash_history".IO ".bashrc".IO "mbox".IO ".lesshst".IO "evalbot.log".IO ".cpan".IO "dalek-…»
01:07 BenGoldberg m: ".".IO.dir.grep(/foo/).say;
01:07 camelia rakudo-moar bc3592: OUTPUT«("foo".IO)␤»
01:13 Actualeyes joined #perl6
01:13 kaare_ joined #perl6
01:18 bisectable6 joined #perl6
01:18 committable6 joined #perl6
01:19 Zoffix Hm, even if I remove the .modifed in pod2onepage and just pass now to :since() it still cries about .modified.
01:20 Zoffix Hehe under the commit that mentions .modifed stuff: :) "<nine> Ah screw the caution. Everything works just fine here and I have no idea why a sha1 would not be enough to clearly identify the precomp file's contents."
01:25 AlexDaniel committable6: HEAD say "foo".IO.modified
01:25 committable6 AlexDaniel, ¦«HEAD»: Failed to find 'foo' while trying to do '.modified'␤  in block <unit> at /tmp/PDFOyEJToT line 1␤␤Actually thrown at:␤  in block <unit> at /tmp/PDFOyEJToT line 1␤ «exit code = 1»
01:26 AlexDaniel committable6: 2015.12 say "foo".IO.modified
01:26 committable6 AlexDaniel, ¦«2015.12»: Failed to find 'foo' while trying to do '.modified'␤  in block <unit> at /tmp/EDMWA9cmBU line 1␤␤Actually thrown at:␤  in block <unit> at /tmp/EDMWA9cmBU line 1␤ «exit code = 1»
01:26 AlexDaniel bisectable6: say "foo".IO.modified
01:26 bisectable6 AlexDaniel, On both starting points (good=2015.12 bad=77d9d41) the exit code is 1 and the output is identical as well
01:26 bisectable6 AlexDaniel, Output on both points: Failed to find 'foo' while trying to do '.modified'␤  in block <unit> at /tmp/yciwTri4P1 line 1␤␤Actually thrown at:␤  in block <unit> at /tmp/yciwTri4P1 line 1␤
01:26 AlexDaniel bisectable6: "foo".IO.modified
01:26 bisectable6 AlexDaniel, On both starting points (good=2015.12 bad=77d9d41) the exit code is 1 and the output is identical as well
01:26 bisectable6 AlexDaniel, Output on both points: Failed to find 'foo' while trying to do '.modified'␤  in block <unit> at /tmp/55r2R2YSzx line 1␤␤Actually thrown at:␤  in block <unit> at /tmp/55r2R2YSzx line 1␤
01:27 AlexDaniel hm huh, so what was the problem with bisectable? :/
01:27 AlexDaniel committable6: HEAD try { "foo".IO.modified.say; CATCH { default { .^name.say } } }
01:27 committable6 AlexDaniel, ¦«HEAD»: X::IO::DoesNotExist
01:27 AlexDaniel huh
01:27 MasterDuke i think it was the comment i just made here: https://github.com/perl6/whateverable/issues/25
01:28 AlexDaniel ah
01:29 AlexDaniel MasterDuke: … is there anything we can do to prevent them from dying?
01:30 MasterDuke block Zoffix from using them ;)
01:30 Zoffix :D
01:30 MasterDuke i kid, i kid
01:31 itaipu joined #perl6
01:39 poohman_ joined #perl6
01:42 pierre_ joined #perl6
01:46 Zoffix .tell nine recent changes still seem to have a fallout in the doc build: https://travis-ci.org/perl6/doc/builds/158600415 here's the module debug part for failing bit: https://gist.github.com/zoffixznet/8214560a3fe3a47b5708a9d3818804cb
01:46 yoleaux Zoffix: I'll pass your message to nine.
01:46 * Zoffix tried to debug and failed :)
01:48 ilbot3 joined #perl6
01:48 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:49 kerframil joined #perl6
01:53 poohman joined #perl6
01:57 poohman_ joined #perl6
02:04 Zoffix What does <quote=.LANG('MAIN','quote')> mean? What's with the equals sign?
02:09 cpage_ joined #perl6
02:14 skids the = separates the named capture's name from the rx or expression.
02:14 skids same as $quote=<.LANG...>
02:15 pierre_ joined #perl6
02:15 Zoffix m: say "foo" ~~ /<meow=[.+]>/
02:15 camelia rakudo-moar 94b09a: OUTPUT«Nil␤»
02:15 Zoffix m: say "foo" ~~ /<meow=[foo]+>/
02:15 camelia rakudo-moar 94b09a: OUTPUT«5===SORRY!5===␤Unable to parse expression in metachar:sym<assert>; couldn't find final '>' ␤at <tmp>:1␤------> 3say "foo" ~~ /<meow=[foo]+7⏏5>/␤    expecting any of:␤        term␤Other potential difficulties:␤    Repeated character …»
02:15 Zoffix m: say "o" ~~ /<meow=[o]>/
02:15 camelia rakudo-moar 94b09a: OUTPUT«「o」␤ meow => 「o」␤»
02:16 Zoffix Ah, cool. skids++
02:20 perlpilot joined #perl6
02:23 lizmat joined #perl6
02:27 cyphase joined #perl6
02:30 noganex joined #perl6
02:42 cyphase joined #perl6
02:58 cyphase joined #perl6
03:13 cyphase joined #perl6
03:19 pierre_ joined #perl6
03:22 cdg joined #perl6
03:26 pierre_ joined #perl6
03:27 cyphase joined #perl6
03:40 cyphase joined #perl6
03:42 imcsk8_ joined #perl6
03:46 cpage_ joined #perl6
03:50 holyghost joined #perl6
03:52 cyphase joined #perl6
03:55 dalek ecosystem: d39e439 | LLFourn++ | META.list:
03:55 dalek ecosystem: Fix DispatchMap url
03:55 dalek ecosystem:
03:55 dalek ecosystem: doh
03:55 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/d39e4399ab
04:06 cyphase joined #perl6
04:10 poohman joined #perl6
04:10 Cabanossi joined #perl6
04:14 holyghost joined #perl6
04:18 poohman joined #perl6
04:20 cyphase joined #perl6
04:43 cyphase joined #perl6
04:48 pierre_ joined #perl6
04:51 cibs joined #perl6
04:55 pierre_ joined #perl6
05:03 cyphase joined #perl6
05:05 pierre_ joined #perl6
05:14 pierre_ joined #perl6
05:20 cyphase joined #perl6
05:32 pierre_ joined #perl6
05:46 cyphase joined #perl6
05:50 pierre_ joined #perl6
05:58 domidumont joined #perl6
06:03 domidumont joined #perl6
06:03 cyphase joined #perl6
06:08 pierre_ joined #perl6
06:10 ufobat joined #perl6
06:11 [ptc] joined #perl6
06:19 firstdayonthejob joined #perl6
06:21 cyphase joined #perl6
06:23 pierre_ joined #perl6
06:26 wamba joined #perl6
06:38 cyphase joined #perl6
06:49 poohman joined #perl6
06:50 llfourn if I have a type object in a $var is there any way to get the :D (definite) version of it?
06:50 llfourn (without nqp)
06:53 nadim_ joined #perl6
06:57 llfourn hmmm looks like not
06:58 llfourn you can do it except it will create a new MO every time you do it
06:58 poohman joined #perl6
06:58 moritz m: my $var = Int; say ::($var.^name ~ ':D')
06:58 camelia rakudo-moar 94b09a: OUTPUT«No such symbol 'Int:D'␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
06:58 cyphase joined #perl6
07:00 llfourn m: my $var = Int; Metamodel::DefiniteHOW.new_type(:base_type($var),:definite); say $var'
07:00 camelia rakudo-moar 94b09a: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> 3pe(:base_type($var),:definite); say $var7⏏5'␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        statement end␤     …»
07:00 llfourn m: my $var = Int; say Metamodel::DefiniteHOW.new_type(:base_type($var),:definite);
07:00 camelia rakudo-moar 94b09a: OUTPUT«(Int:D)␤»
07:00 Sgeo_ joined #perl6
07:01 llfourn but I don't want to make a new MO each time :\
07:02 llfourn maybe I can just cache them
07:02 konobi access the slot?
07:02 infina joined #perl6
07:02 infina joined #perl6
07:02 llfourn konobi: what slot?
07:03 konobi the slots the object is using to store it's attributes
07:04 llfourn konobi: note sure I understand what object you're referring to
07:04 llfourn not*
07:04 konobi $var
07:05 llfourn the situtation is that I need a function that take a type object and returns the definite version
07:05 llfourn but doesn't create a new Int:D if Int is passed twice
07:05 llfourn but this looks to be tricky
07:06 labster joined #perl6
07:07 llfourn it would be nice if ClassHOW or whatever cached the defnite version as an attribute
07:07 Actualeyes joined #perl6
07:07 cog_ joined #perl6
07:08 llfourn ah no maybe rakudo already caches it for me from looking at DefiniteHOW
07:09 leejo joined #perl6
07:09 llfourn m: my $a =  Metamodel::DefiniteHOW.new_type(:base_type(Int),:definite); my $b = Metamodel::DefiniteHOW.new_type(:base_type(Int),:definite); say $a.WHERE; say $b.WHERE
07:09 camelia rakudo-moar 94b09a: OUTPUT«139693161093320␤139693161093320␤»
07:09 llfourn \o/
07:10 llfourn success
07:21 rindolf joined #perl6
07:30 wamba joined #perl6
07:32 grondilu joined #perl6
07:37 cyphase joined #perl6
07:57 cyphase joined #perl6
07:58 leont__ joined #perl6
08:05 kurahaupo joined #perl6
08:10 g4 joined #perl6
08:13 edehont joined #perl6
08:13 zakharyas joined #perl6
08:19 cdc joined #perl6
08:19 cdc Hello #perl6 o/
08:21 cdc How do I get a IO::Handle from a "native" file descriptor (returned by a native call) ?
08:21 cdc I'm looking for something similar to openfd (in C).
08:23 grondilu IIRC in C a native file descriptor is just an int.
08:24 cdc grondilu: I agree, I'd like to use IO::Handle methods (like .lines)
08:24 jast in C there are fds and FILE objects (the latter is usually implemented in libc)
08:25 cdc yeah openfd() returns a FILE from an int fd
08:25 cdc I'd like to do the same in Perl6: getting a IO::Handle from an int fd
08:26 grondilu I'd be surprised if it were possible
08:26 cdc oh noes /o\
08:26 lizmat cdc: I would have to concur with grondli
08:26 jast well you can *read* the native fd from an IO::Handle, so at least it would be symmetric for that to exist
08:26 lizmat unless I missed something the past months
08:27 cdc lizmat: I imagined that $*IN was created from stdin.
08:28 jast internally, though
08:28 lizmat yes, it is, with a dedicated nqp::op
08:28 cdc lizmat: then I have to learn NQP too :)
08:28 lizmat nqp::getstdin();
08:28 cdc lizmat: could you point me to some piece
08:29 jast you'd probably have to _implement_ a new nqp op
08:29 lizmat nqp::getstdou();
08:29 cdc lizmat: oops, Thanks!
08:29 lizmat nqp::getstdout();
08:29 lizmat nqp::getstderr();
08:29 cdc I'll take a look.
08:29 geekosaur on linux you could do it with a hack: open("/dev/fd/$native")
08:29 cdc geekosaur: yeah, I tried but I got a strange behavior
08:30 cdc geekosaur: .lines returned an error ("can't seek" IIRC)
08:30 cdc geekosaur: my fd is returned by forkpty()
08:32 geekosaur sigh. libuv, too smart for its own good
08:32 geekosaur (this may imply that, even beyond a new nqp op, you may need new logic in libuv :/ )
08:34 kurahaupo geekosaur: it turns out that Linux's /proc/*/fd/* don't enforce the permissions granted in the original open; it's possible to truncate or overwrite a file that's connected via those, even if they were originally opened read-only or append-only
08:35 geekosaur yep
08:41 kurahaupo_ joined #perl6
08:44 pierre_ joined #perl6
08:47 lizmat commut&
08:48 cdc $*IN IO::Handle object is created at a very low-level :(
08:48 cdc inside MoarVM IIUC
08:49 cdc this is not blocking for me, but I have to use native call to read/write instead of IO::Handle methods :(
08:49 cdc (context = I'd like to use Perl6 instead of Expect)
08:53 woolfy left #perl6
08:53 pierre_ joined #perl6
08:56 imcsk8 joined #perl6
08:57 kurahaupo joined #perl6
09:05 pierre_ joined #perl6
09:07 bob777 joined #perl6
09:08 Woodi cdc: if it's in Moar then it's better, just copy-paste handle creation using openfd ? :) maybe...
09:14 domidumont joined #perl6
09:16 kurahaupo_ joined #perl6
09:16 cdc Woodi: I think this is more than copy-paste, an "openfd" op should be added to get a (generic) access to MVM_file_get_stdstream
09:17 cdc Woodi: and I don't know how to do that :)
09:18 cdc Woodi: the good news is that this function already handles my case (fd points to a TTY) :)
09:18 Actualeyes joined #perl6
09:20 geekosaur actually, if you're holding the master end as you should be, it's not a tty
09:20 geekosaur it's a mutant pipe as far as the OS is concerned
09:20 geekosaur the *slave* end is a tty
09:21 cdc geekosaur: you are right, my mistake.
09:22 * cdc is afk
09:23 RabidGravy joined #perl6
09:27 brrt joined #perl6
09:31 darutoko joined #perl6
09:46 pierre_ joined #perl6
09:49 wamba joined #perl6
09:52 cyphase joined #perl6
09:55 pierre_ joined #perl6
10:40 grondilu .seen Zoffix
10:40 yoleaux I saw Zoffix 02:16Z in #perl6: <Zoffix> Ah, cool. skids++
10:42 Zoffix ?
10:43 Zoffix grondilu, what?
10:45 timotimo cdc: check out our SSL socket thing, it uses a function that gives you the native descriptor behind an IO handle
10:46 cdc timotimo: ok, thanks!
10:46 cdc timotimo: what's the name of this module? please.
10:47 cdc timotimo: IO::Socket::SL I suppose.
10:47 cdc *SSL
10:47 timotimo at least i thought we had that
10:47 timotimo i think it's inside the OpenSSL module, actually
10:47 cdc ok
10:47 * timotimo greps around rakudo a bit
10:48 timotimo aha
10:48 timotimo there's a method called native-descriptor
10:52 cdc timotimo: ho, I didn't read you correctly
10:52 grondilu Zoffix: just telling you that I'm doing the Eve thing after all.
10:52 cdc timotimo: I want the opposite: create a IO::Handle from a native desc.
10:52 grondilu (or at least trying)
10:52 Zoffix .oO( Eve thing? )
10:52 bjz joined #perl6
10:53 grondilu the map in WebGL
10:53 Zoffix No idea what you're talking about....
10:53 Zoffix Are you sure you got the right Zoffix?
10:53 grondilu hum
10:54 timotimo oh, i see
10:54 timotimo i guess *i* didn't read *you* correctly
10:54 grondilu Aren't you the guy with whom I talked about Eve online lately?
10:54 Zoffix Nope
10:54 grondilu oh, he must have a very similar nick
10:55 Zoffix zofstay?
10:55 cdc timotimo: no pb :)
10:55 Zoffix or zostay
10:55 * grondilu looks at the IRC log
10:56 grondilu it's Xliff.  I don't know how I could have confused the two.
10:57 Zoffix :}
11:00 ab6tract joined #perl6
11:00 ab6tract m: my $x; say $x %% 4
11:00 camelia rakudo-moar 8a6683: OUTPUT«Use of uninitialized value of type Any in numeric context␤  in block <unit> at <tmp> line 1␤True␤»
11:00 ab6tract gonna have to say
11:01 ab6tract i am not clear on why that would return True
11:01 Zoffix m: say 0 %% 4
11:01 camelia rakudo-moar 8a6683: OUTPUT«True␤»
11:01 timotimo yeah, undefined numbers will warn and be treated as 0
11:02 ab6tract it feels bizarrely half-way between being strict about it and being DWIM about it.
11:02 Zoffix left #perl6
11:02 ab6tract like, if I didn't coerce it into numeric, then arguably it should just warn and perhaps return a failure
11:03 ab6tract and furthermore, undefined could arguably be better coerced to something like NaN
11:04 ab6tract though that strays pretty far from the standard Perl behaviors on truthiness and numbers
11:06 ab6tract anyway, was attempting to construct an argument around why P6's Any semantics are awesome and ran into this... which makes me feel less excited about my own argument
11:08 edehont joined #perl6
11:10 Actualeyes joined #perl6
11:13 munja joined #perl6
11:16 ggoebel joined #perl6
11:17 jervo joined #perl6
11:23 bjz joined #perl6
11:23 nadim_ Good afternoon P6ers
11:24 Woodi grondilu: what data you want to put on the map ? aliance ships, intel ?
11:24 Woodi hi nadim_ :)
11:24 nadim_ Woodi: hi :)
11:26 nadim_ I was watching a video and a section was about unicode handling in P6, NFC-NFG, and it hit me that I have had a, maybe, related problem. colored srings. Now I don't think there a color space in unicode but I sure would like to be able to compose color in text.
11:26 brrt someone recently demonstrated this:
11:26 brrt m: my $x; my $y = $x.sort; say $y;
11:26 camelia rakudo-moar 8a6683: OUTPUT«((Any))␤»
11:26 brrt which, is ehm,
11:26 brrt not what i think is the right thing to do?
11:27 brrt m: my $x; my $y = $x.sort; say $y.items;
11:27 camelia rakudo-moar 8a6683: OUTPUT«Method 'items' not found for invocant of class 'List'␤  in block <unit> at <tmp> line 1␤␤»
11:27 brrt m: my $x; my $y = $x.sort; say $y.length;
11:27 camelia rakudo-moar 8a6683: OUTPUT«Method 'length' not found for invocant of class 'List'␤  in block <unit> at <tmp> line 1␤␤»
11:27 brrt m: my $x; my $y = $x.sort; say $y.count;
11:27 camelia rakudo-moar 8a6683: OUTPUT«Method 'count' not found for invocant of class 'List'␤  in block <unit> at <tmp> line 1␤␤»
11:28 timotimo omg, i got a new fan installed on my laptop and it's AMAZING
11:28 nadim_ In a module I generated colored output but later I had to remove the color to count the chararacters. my first plan was to create a colored-char class and let it do the job but I wonder if I can compose the color in the characters
11:28 brrt timotimo: objectively disagree. heat pipes are amazing
11:28 brrt fans are so-so
11:28 brrt :-P
11:28 timotimo there's a heat pipe in my laptop
11:28 brrt m: my $x; my $y = $x.sort; say $y.elems;
11:28 camelia rakudo-moar 8a6683: OUTPUT«1␤»
11:28 timotimo it leads to a fan
11:29 timotimo the fan was previously hardly able to cool down the machine, and what's more it started whining like crazy
11:29 nadim_ TimToady: you were talking on the video, so is there a way, even if it may sound silly, to compose color in characters?
11:29 brrt (so there is my example: sorting an undefined value gives you a list of length 1. WAT)
11:29 timotimo but now it's quiet as a rock and blows like a hurricane when i turn it to "disengaged"
11:30 timotimo brrt: single things pretend to be a list of a single thing
11:30 brrt okay, okay
11:30 timotimo but things that create lists won't give you "only the object" if they make a list of a single thing instead
11:30 brrt m: my $x; say so $x; my $y = $x.sort; say so $y;
11:30 camelia rakudo-moar 8a6683: OUTPUT«False␤True␤»
11:31 timotimo hehe.
11:31 timotimo man the wifi in my parent's house is *crap*
11:31 brrt so, listifying does not preserve booleanness, or rather, it does not preserve nothingness, and *that* is a WAT
11:31 timotimo i need to figure out how you debug something like that
11:31 timotimo um, a single type object isn't a nothing
11:32 timotimo but it's an undefined
11:32 brrt uhuh
11:32 brrt m: my $x; say $x.WHAT;
11:32 camelia rakudo-moar 8a6683: OUTPUT«(Any)␤»
11:32 timotimo having lists check if they aonly contain undefined things would be WAT-y to me
11:32 timotimo m: my $x; say $x.perl
11:32 camelia rakudo-moar 8a6683: OUTPUT«Any␤»
11:32 tbrowder hi #perl6
11:33 brrt hmmmm
11:33 brrt hi tbrowder
11:33 timotimo don't forget a variable you don't assign anything to will have the type object that belongs to its type assigned to it
11:33 timotimo so that we have nice tricks like .= new, and type checks working, and stuff like that
11:34 cyphase joined #perl6
11:34 brrt i have a feeling that non-preservation of the notion of 'emptiness' is going to be painful
11:34 ilmari m: my Int $x; say $x.WHAT;
11:34 camelia rakudo-moar 8a6683: OUTPUT«(Int)␤»
11:34 bjz_ joined #perl6
11:35 brrt but i also have a feeling that this has been discussed before
11:35 tbrowder I tried to use p6 pod on my github p6 module README and it didn't render.  I thought I had seen some discussion some time ago about getting the github folks to integrate p6 pod rendering.
11:36 brrt (and the feeling that I'm wrong in some important way)
11:36 timotimo brrt: are you advocating that type objects pretend to be the empty list instead of the list with only the type object in it?
11:36 brrt maybe even an undefined list
11:36 timotimo that'd be really weird
11:36 brrt yeah, i guess that is somewhat like what i'm saying
11:36 brrt agreed
11:37 Woodi my: $x; dd $x; dd $x.sort;
11:37 Woodi m: $x; dd $x; dd $x.sort;
11:37 camelia rakudo-moar 8a6683: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Variable '$x' is not declared␤at <tmp>:1␤------> 3<BOL>7⏏5$x; dd $x; dd $x.sort;␤»
11:37 Woodi m: my $x; dd $x; dd $x.sort;
11:37 camelia rakudo-moar 8a6683: OUTPUT«Any $x = Any␤(Any,)␤»
11:38 tbrowder I asked Github support about it and got a quick reply from github staffer Stacey Burns who seemed not to not know anything about the difference between the two pod types.
11:38 Woodi m: my $x; my $y = $x.sort;
11:38 camelia rakudo-moar 8a6683: ( no output )
11:38 Woodi m: my $x; my dd $y = $x.sort;
11:38 camelia rakudo-moar 8a6683: OUTPUT«5===SORRY!5===␤Type 'dd' is not declared␤at <tmp>:1␤------> 3my $x; my dd7⏏5 $y = $x.sort;␤Malformed my␤at <tmp>:1␤------> 3my $x; my7⏏5 dd $y = $x.sort;␤␤»
11:38 Woodi m: my $x; my $y = $x.sort; dd $y;
11:38 camelia rakudo-moar 8a6683: OUTPUT«List $y = $(Any,)␤»
11:38 timotimo tbrowder: it's an easy mistake to make, given how perl6 is practically invisible to many people who aren't perl5 people
11:38 ShimmerFairy timotimo: I'd personally wait until Pod6 got more love, since it's one of the more (if not most) undermaintained parts of P6 :P
11:39 brrt hmm
11:39 * Woodi goes for coffe, enforced
11:39 * ShimmerFairy should really get back to working Pod stuff soonish...
11:39 timotimo ShimmerFairy: agreed :S
11:39 timotimo about the undermaintained parts
11:39 timotimo and i'm also partially to blame for that
11:39 timotimo i started doing some stuff with it, but then stopped
11:39 brrt on further thought, I think listifying undefined objects to an empty, or undefined list, is a weird special case
11:40 ZoffixMobile joined #perl6
11:40 tbrowder I offered to put them in contact with a core p6 person who could help with integration of p6 pod rendering.
11:40 brrt on the other hand, i'd argue it is much more DWIMmy than the current behaviour
11:40 timotimo tbrowder: thing is, rendering pod6 makes you susceptible to remote code execution
11:40 infina joined #perl6
11:40 infina joined #perl6
11:40 ShimmerFairy brrt: maybe it should have a warning, like trying to stringify (at least some kinds of) undefined objects
11:40 brrt and i'm having trouble to see what the WAT will be
11:40 timotimo as in, if there's code between the pod pieces, that code gets executed
11:41 brrt ShimmerFairy: that is a good idea, I think
11:41 ZoffixMobile tbrowder, the discussion is still in a doc Issue. So far we simply went with using .pod6 extension. I opened an issue asking how to have a Pod 6 renderer but never got any reply
11:41 ShimmerFairy timotimo: that shouldn't happen, for sure. You can parse ambient blocks, but should have to execute them.
11:41 ShimmerFairy *shouldn't have to
11:41 timotimo right. i don't think rakudo has a flag somewhere to make code "only parsed" and BEGIN blocks ignored
11:41 timotimo but then there's DOC blocks
11:41 timotimo which are specifically meant to be executed if perl6 is invoked with --doc
11:42 ShimmerFairy timotimo: imo, the concept of things like DOC use is misinformed, I'd prefer e.g. =use instead (to make it way more obvious it's a doc module), and I'd rather toss DOC BEGIN and friends until we find out why you'd actually need it (since I can't think of a reason).
11:43 timotimo that sounds sensible
11:43 timotimo but if you have =use, you'll still be running code :P
11:43 ZoffixMobile tbrowder, this one https://github.com/perl6/doc/issues/167
11:43 infina joined #perl6
11:43 infina joined #perl6
11:43 timotimo though if you don't set a -I with "uncontrolled" paths, i guess a =use with only a module name ought to be fine
11:43 ShimmerFairy timotimo: yeah, I think one might desire a declarative new language to guarantee no-remote-code while still being able to extend Pod6 :P
11:43 timotimo github is unlikely to install ACME::PwnMyServer so you could =use that in a doc
11:44 timotimo :D
11:44 ShimmerFairy I really need to write some blog posts to outline what I've been thinking of on various parts of Pod6.
11:45 tbrowder Zoffix: can I refer Stacey to you at some email address?
11:46 ShimmerFairy I've also been thinking lately that my ability to recompile the CORE.setting is low enough (~160s IIRC) that I think keeping SUPERNOVA a separate thing is more awkward than just developing in-rakudo.
11:47 timotimo 160 seconds! holy fuck.
11:47 timotimo do you have an account on hack? if not, do you want one?
11:48 ShimmerFairy Not unless I seriously forgot. And sure, why not? :)
11:49 moritz ShimmerFairy: even with relatively fast compile cycles I tend to develop core stuff out of rakudo if at all possible
11:49 tbrowder BTW, we're all using p6 pod heavily in spite of incompleteness. If we wait till it's complete, it may be a LONG time before github (or anyone else) gets interested.
11:49 moritz because the difference between ~40s and 2s to get feedback is immense
11:49 ShimmerFairy moritz: my issue is that trying to maintain a quasi-NQP codebase is probably not beneficial for much longer (it's a src/Perl6/ type change, not a src/core/ type change)
11:49 ZoffixMobile tbrowder, umm, I guess.... broto3@zoffix.com
11:50 moritz ShimmerFairy: ok, that changes things
11:50 ShimmerFairy the quasi- part comes from needing access to Perl 6 stuff (so coding in P6 is best), but needing to code in an NQP style so that the transition is less painful.
11:50 timotimo ShimmerFairy: what username would you like to have?
11:51 ShimmerFairy ShimmerFairy :)
11:51 moritz please don't use camel case for UNIX user names
11:52 timotimo yeah, it's asking me to --force-badname for the uppercase letters
11:52 timotimo ShimmerFairy: would lowercase shimmerfairy be okay?
11:52 ShimmerFairy timotimo: yeah, lowercase is fine, I don't mind the capitalization.
12:00 eliasr joined #perl6
12:07 tbrowder Zoffix: Okay, I just responded to Github's Stacey and sent yr email. I also forwarded my original response to Stacey to you for context.
12:08 canopus joined #perl6
12:11 itaipu joined #perl6
12:11 cyphase joined #perl6
12:17 nine m: (2.0**0.5) * (2.0**0.5) == 2.0
12:17 camelia rakudo-moar 8a6683: OUTPUT«WARNINGS for <tmp>:␤Useless use of "==" in expression "* (2.0**0.5) == 2.0" in sink context (line 1)␤»
12:17 yoleaux 01:44Z <Zoffix> nine: recent changes still seem to have a fallout in the doc build: https://travis-ci.org/perl6/doc/builds/158600415 here's the module debug part for failing bit: https://gist.github.com/zoffixznet/8214560a3fe3a47b5708a9d3818804cb
12:17 nine m: say (2.0**0.5) * (2.0**0.5) == 2.0
12:17 camelia rakudo-moar 8a6683: OUTPUT«False␤»
12:17 nine sad :(
12:18 bioduds hey guys
12:18 bioduds sorry but this seems like the best I can do
12:18 bioduds http://67.205.136.118/install.sh
12:18 bioduds Im going to have to shut this server down cause I can't pay for it
12:19 bioduds im uploading the script to my git
12:19 bioduds if you wish to have it set on https://install.perl6.org
12:19 bioduds feel free to change whatever you believe is best on the script
12:19 bioduds to have it served there
12:19 bioduds :)
12:20 bioduds git is: https://github.com/bioduds/perl6-oneliner.git im uploading right now
12:22 TheLemonMan joined #perl6
12:24 bioduds there it is :)
12:24 stundenull joined #perl6
12:24 bioduds feel free to clone it and use it :)
12:26 itaipu joined #perl6
12:26 nine bioduds++
12:27 bioduds :D thanks nine. sorry i couldn't do a master job but you know, shell is hell
12:27 bioduds it works though
12:30 cyphase joined #perl6
12:35 MetaZoffix joined #perl6
12:39 bioduds thanks nine :D saw your change, im merging it :)
12:40 bioduds merged, thanks a lot :>
12:42 bioduds great, so this line works: curl https://raw.githubusercontent.com/bioduds/perl6-oneliner/master/install.sh | sh;. ~/rakudo/setpath.sh
12:43 lichtkind joined #perl6
12:47 bioduds tx DrForr
12:51 cyphase joined #perl6
12:54 Woodi bioduds: I think point of setpath.sh or generally setenv.sh files is that it helps to keep .bashrc clean. also allowing someone on internets to write to your .bashrc is security stupidity. so removing '... >> ~/.bashrc' is very recomended for that two reasons, at least :)
12:56 Woodi bioduds: also, would be nice if we have http://rakudo.org/downloads/star/rakudo-star-latest.tgz, so installer could find newest R* automatically :)
12:56 bioduds yeah, we talked a lot about it. sanitizing it would actually take more than I can do in shell-hell scripting.
12:57 bioduds I actually tried prompting the user but no success
12:58 bioduds nine just edited in github. I merged. I really encourage and invite all changes you want to do there. it is public
12:58 bioduds feel free to help cause really, my shell scripts only goes that far :(
13:03 cdg joined #perl6
13:03 cdg joined #perl6
13:03 hahainternet so a slightly difficult question to ask: given i have a postgresql database with a set of enum types representing 'status', 'Active', 'Inactive' and so-forth. I'd also like to use an enum in Perl 6 to handle this, however I don't want to duplicate the definitions, they should stay in the database. I'd like to define a type which has enum-like facilities but can be instantiated when the DB connects, or
13:03 hahainternet some other workaround for this, any thoughts?
13:03 hahainternet i appreciate that might be a stream of useless conciousness
13:04 rgrinberg joined #perl6
13:04 hahainternet came across a similar problem in Go too but there is literally no solution there, seems like a difficult one conceptually though
13:04 nine hahainternet: unless you want to connect to your database at compile time, I suggest just duplicating those definitions. I guess you won't have all that many and they won't change all the time.
13:04 hahainternet nine: that's the practical solution sure, but i'm more interested in options
13:04 bioduds tx again nine
13:04 hahainternet i don't actually need to do this to get anything working, but it seems valuable to be able to support
13:05 bioduds really appreciate your help
13:05 hahainternet nine: let's say that having a database online at compile time was a feasible option, as perhaps it only gets built inside a dev VM, would there be an option to build an enum at compile time easily enough?
13:06 mcmillhj joined #perl6
13:06 hahainternet I have some free time coming up soon so going to dig more into p6 than I've been able to before, which should be fun
13:07 masak hahainternet: pro tip: dig in public. learning on-channel helps accelerate everything
13:08 masak (and if done right, ends up not being as noisy/spammy as one might assume)
13:08 hahainternet masak: i get code shy :(
13:08 masak heh
13:09 hahainternet seriously though, a compile time enum import from a database would be goddamn lovely
13:09 hahainternet i know there are compilish timish phasers, and proper macro support, but i just have never read it enough
13:09 hahainternet or started to put it together
13:09 masak macro support is not there yet for that, sadly
13:09 masak but will be
13:09 masak your best bet is to go through the MOP, I think
13:10 nine Yes, sounds like a rather straight forward job for the MOP in a BEGIN block
13:11 hahainternet roger that
13:11 hahainternet not sure if i know literally any other language where that's feasible
13:11 hahainternet i'm sure C++ would manage it somehow
13:12 Woodi hahainternet: is there a way to ask postgresql about types without select * ? :)
13:13 hahainternet that's a good question, i'm not that au-fait with the API
13:14 Woodi hahainternet: maybe you have table with allowed states ?
13:16 hahainternet Woodi: no i'm talking specifically about an enum type, although i guess in this case it wouldn't make much difference
13:18 Woodi ? http://stackoverflow.com/questions/1616123/sql-query-to-get-all-values-a-enum-can-have
13:19 hahainternet https://github.com/postgres/postgres/blob/master/src/bin/psql/command.c#L481
13:19 _slade_ joined #perl6
13:19 hahainternet https://github.com/postgres/postgres/blob/7f61fd10ceb715eceece49451f6dfe9058044e15/src/bin/psql/describe.c#L586
13:19 hahainternet so the answer is no, even psql uses that hardcoded SQL to get type info
13:20 cognominal joined #perl6
13:25 arnsholt hahainternet: Common Lisp would have no problem with compile-time definition of pretty much anything, but that may not be a surprise =)
13:30 nowan joined #perl6
13:30 cyphase joined #perl6
13:34 cognominal joined #perl6
13:37 cog_ joined #perl6
13:38 bioduds great, DrForr! tested on fresh Debian Jessie VM, worked fine!
13:38 bioduds that is really good
13:38 hahainternet arnsholt: i know very little about the guts of cl and similar languages, i'm very ignorant :D
13:39 bioduds if anyone cares to test on MacOS please let me know how it goes
13:40 DrForr I'm about to really stress things out by building on OpenBSD :)
13:40 arnsholt hahainternet: Put *extremely* simply, it can do pretty much all of the things =)
13:41 brrt bioduds: I can test, but I missed the part where you told us what :-)
13:41 finanalyst joined #perl6
13:42 bioduds brrt: the perl6 one-liner script installation
13:42 hahainternet arnsholt: i'm chatting about it on another channel with a guy that's getting very frustrated i don't just pick a 'practical' option
13:42 bioduds here´s the source: https://raw.githubusercontent.com/bioduds/perl6-oneliner/master/install.sh
13:42 bioduds here's the line: curl https://raw.githubusercontent.com/bioduds/perl6-oneliner/master/install.sh | sh;. ~/rakudo/setpath.sh
13:45 brrt bioduds: works, so far
13:46 brrt oh, can i just advice to try to add a make -j $number flag, that really helps compiling moarvm
13:47 DrForr OpenBSD seems to be going smoothly so far.
13:47 brrt hahainternet: why would anybody care about the practicality of your solution
13:47 hahainternet brrt: some people get frustrated by 'fancy' code i think
13:47 brrt or does this person have to maintain your code
13:47 hahainternet haha
13:47 cyphase joined #perl6
13:48 hahainternet i don't really see any reason that you can't have db types and perl6 types be the same thing, but it'll take some playing
13:49 brrt there is also the element of fun, and, i'd fear the day that I'd be upset by someone elses fun
13:49 brrt also, using the MOP to use database types in the codebase seems like pretty practical to me
13:50 brrt especially the fun of exploration...
13:50 hahainternet indeed, his criticism was that there's a string-like interface between code and the db
13:50 DrForr bioduds: (without looking) I'm guessing the final install.sh script assumes the existence of .bashrc? (which isn't default on OBSD)
13:50 hahainternet but that's simply not true, what there is is a 'bunch of bytes', which is the same as any RPC or memcpy or anything
13:51 _slade_ joined #perl6
13:52 ugexe you cant map every db's idea of some type to a single type is the problem, not that a languages type couldnt match a single db's types
13:52 brrt why let the impossiblity of a general solution stop you from making a specific one?
13:53 moritz you could however use p6's REPR mechanism to have the memory layout of the p6 objects and DB objects identical
13:53 hahainternet moritz: that's exactly what i was wondering about
13:53 hahainternet thanks for giving me something to google
13:54 hahainternet and ugexe could you not? what is feasibly stopping you using a pseudo type that can vary based on which DB you're using?
13:54 pierre_ joined #perl6
13:54 brrt that sounds awefully like extension REPRs though
13:54 moritz hahainternet: the cstruct repr from NativeCall.pm6 might serve as a good example
13:54 hahainternet moritz: o/
13:57 bioduds brrt: works on mac? that is GREEEAT
13:58 brrt seems to me that it does, yes
13:58 NEveD joined #perl6
13:59 bioduds DrForr: yes, I actually answered too on fb. I'm very raw with shell scripts. Many excellent suggestions done here I simply couldn't implement. Therefore, assuming .bashrc is what I did
13:59 brrt using clang and the whole XCode bullshiC^u8C^d toolchain
13:59 brrt bioduds++ awesome work
13:59 bioduds brrt: can you please tell me basic system info used so i can put on my report (https://docs.google.com/spreadsheets/d/1dOAJEglf0D9hV5doDADZJEMUIvWlmsRSBx8S118-3iY/edit?usp=sharing)
14:00 brrt oh, fwiw, .bashrc doesn't exist on OS X either, but .bash_profile does
14:00 poohman_ joined #perl6
14:01 bioduds im so crude in shell i cant even check if .bashrc is there and if yes use .bash_profiles
14:02 bioduds then again, if its not ask too much, please, feel free to change the script there in the git repo
14:02 bioduds i will merge it
14:02 bioduds like niner did twice. tx nine!
14:03 hahainternet moritz: i'm not seeing where the repr types are actually defined, but i'm maybe being ignorant, just skipping over it
14:03 hahainternet if you have any other links please feel free to dump them on me
14:03 hahainternet i'll be back in an hour or so to pay more attention
14:04 cyphase joined #perl6
14:07 skids joined #perl6
14:07 brrt hahainternet: REPRs are defined in MoarVM.
14:09 hahainternet brrt: ah so i couldn't just make a 'PGString' or similar repr
14:12 brrt that would be... hard
14:12 brrt currently
14:12 bioduds thanks bart
14:12 brrt but it possible, I think
14:12 bioduds merging...
14:12 brrt yw. it's not been tested because that takes time and i'm lazy
14:13 * [Coke] yawns.
14:13 bioduds np, im testing now
14:14 dalek doc: e98f1ae | (Jan-Olof Hendig)++ | doc/Language/regexes.pod6:
14:14 dalek doc: Fixed some code indent problems
14:14 dalek doc: review: https://github.com/perl6/doc/commit/e98f1ae2ba
14:17 bioduds but please when you can, test on Mac again cause its a system i have no access to right now
14:17 cyphase joined #perl6
14:21 dalek doc: d3afef5 | coke++ | doc/Type/IO/Socket/Async.pod6:
14:21 dalek doc: use non-breaking space
14:21 dalek doc: review: https://github.com/perl6/doc/commit/d3afef5cea
14:22 mr-foobar joined #perl6
14:29 RabidGravy anyway you'll all be pleased to know that rakudo/moarvm still builds okay on the poor Raspberry Pi B
14:34 cyphase joined #perl6
14:34 bioduds rabidgravy, is it possible to test the install script on raspberyy pi b?
14:35 RabidGravy "install script" ?
14:37 bioduds curl https://raw.githubusercontent.com/bioduds/perl6-oneliner/master/install.sh | sh;. ~/rakudo/setpath.sh
14:37 bioduds perl6 one-liner installer
14:37 khw joined #perl6
14:38 bioduds hopefully in the future it will go to: curl https://install.perl6.org | sh;. ~/rakudo/setpath.sh
14:38 llfourn bioduds: cool :)
14:38 bioduds ;)
14:39 llfourn now can you get it to dynamically pull the latest rakudo star
14:39 bioduds I don't know how
14:39 kerframil joined #perl6
14:39 bioduds you can, the script is public, or you can tell me exactly how and I will gladly change there
14:40 travis-ci joined #perl6
14:40 travis-ci Doc build passed. Jan-Olof Hendig 'Fixed some code indent problems'
14:40 travis-ci https://travis-ci.org/perl6/doc/builds/158746691 https://github.com/perl6/doc/compare/8a94bc5f4a5e...e98f1ae2ba6e
14:40 travis-ci left #perl6
14:40 llfourn probably can't without making it more brittle
14:45 mcmillhj joined #perl6
14:46 bioduds brrt: working fine on ubuntu
14:46 user9 joined #perl6
14:46 bioduds should work fine on MacOS I believe, since installation before your contribution worked. When you get the tiete to test pelase send me a line bioduds@gmail.com
14:46 bioduds :)
14:46 bioduds *tiete = time
14:47 brrt sure :-)
14:47 kurahaupo joined #perl6
14:47 bioduds *pelase = please
14:47 bioduds mentioned you on readme
14:47 cyphase joined #perl6
14:48 travis-ci joined #perl6
14:48 travis-ci Doc build passed. Will "Coke" Coleda 'use non-breaking space'
14:48 travis-ci https://travis-ci.org/perl6/doc/builds/158748394 https://github.com/perl6/doc/compare/e98f1ae2ba6e...d3afef5cea09
14:48 travis-ci left #perl6
15:05 MetaZoffix joined #perl6
15:10 MetaZoffix "now can you get it to dynamically pull the latest rakudo star" ... We can just create a redirect on rakudo.org that will redirect from http://rakudo.org/downloads/star/rakudo-star-latest.tar.gz  to the latest release
15:10 MetaZoffix And the script would use that URL. Script... and well, all the references where we currently hardcode the version
15:13 cyphase joined #perl6
15:14 lichtkind_ joined #perl6
15:15 * MetaZoffix takes the liberty of doing that
15:19 MetaZoffix bioduds: there: http://rakudo.org/downloads/star/rakudo-star-latest.tar.gz
15:22 [Coke] MetaZoffix: does that link now need to be updated as part of the rakudo star release process?
15:22 MetaZoffix [Coke]: yeah, I'm adding it into the guide.
15:24 [Coke] MetaZoffix++
15:30 perlpilot joined #perl6
15:32 grondilu joined #perl6
15:34 mcmillhj joined #perl6
15:38 cyphase joined #perl6
15:49 RabidGravy Stage parse      : 2994.901
15:49 RabidGravy that's a bit, er, dull
15:50 timotimo yeah, that's not so good
15:50 girafe joined #perl6
15:52 skarn_ joined #perl6
15:54 cyphase joined #perl6
15:57 MetaZoffix .oO( I didn't know Perl 6 could run on a potato... )
15:59 mst we support NetBSD, right?
16:00 noreem joined #perl6
16:05 [Coke] MetaZoffix: if GlaDOS can run on a potato, so can we.
16:05 MetaZoffix Don't think so... As in: I don't think we have anyone with access to NetBSD to test things
16:05 [Coke] I suppose we could virtual box some stuff if needed.
16:06 [Coke] ;... but I think that was a joke about a potato.
16:06 MetaZoffix Oh, NetBSD is free... I thought it wasn't
16:06 RabidGravy to be fair on the other parts of this, this is a horribly old pidora image from a few years ago
16:08 ilmari are there any non-free BSDs?
16:08 cyphase joined #perl6
16:08 ugexe netbsd has worked in the past
16:09 MetaZoffix No idea... Maybe my thought of there being non-free BSDs was due to FreeBSD lol
16:09 RabidGravy there used to be BSDi back in the day
16:09 ugexe see: http://testers.perl6.org/reports/32520.html
16:10 ugexe Operating system netbsd (netbsd) 7.99.5 earmv7hf
16:14 Khisanth joined #perl6
16:15 itaipu joined #perl6
16:22 MilkmanDan joined #perl6
16:28 cyphase joined #perl6
16:28 geekosaur non-free BSDs... one could argue OS X :p
16:31 dalek doc: dfc44f2 | (Tom Browder)++ | doc/Language/modules.pod6:
16:31 dalek doc: add ws between hash mark and text
16:31 dalek doc: review: https://github.com/perl6/doc/commit/dfc44f21ef
16:34 rgrinberg joined #perl6
16:34 cdc left #perl6
16:36 rgrinberg joined #perl6
16:38 stmuk_ I thought it wasn't
16:38 stmuk_ I thought it wasn't
16:39 stmuk_ arrg copy and paste fail
16:39 domidumont joined #perl6
16:39 timotimo i thought it wasn't
16:42 cyphase joined #perl6
16:45 canopus joined #perl6
16:47 mspo I'm also on netbsd
16:47 mspo x86_64
16:47 timotimo i thought you weren't
16:47 stmuk_ some math tests were skipped on NetBSD
16:48 _slade_ joined #perl6
16:48 mspo I can see that
16:48 mspo if our libm gave trouble
16:48 stmuk_ yes stuff at the margins (O, Inf etc.(
16:48 mspo let me add some swap and compile something
16:49 mspo netbsd was supposed to be setting up some CI servers for things like programming languages
16:49 mspo ..now who was supposd to be workign on that? .. oh right
16:49 timotimo is it you? :)
16:50 mspo timotimo: yes
16:51 mspo ugexe is on HEAD and ARM
16:51 mspo so a good test too
16:51 ugexe well that was from 2015
16:51 * timotimo is rescuing data off of a super old computer and accidentally caught a big chunk of music
16:52 timotimo oooh, it's careless whisper!
16:52 mspo I am on This is Rakudo version 2016.06-20-g053729c built on MoarVM version 2016.06
16:52 mspo should I get something newer?
16:52 mspo oh I see a 2016.08.1
16:53 mspo rakudobrew-ing, anyway
16:55 domidumont joined #perl6
16:58 cyphase joined #perl6
17:03 mcmillhj joined #perl6
17:09 firstdayonthejob joined #perl6
17:13 itaipu joined #perl6
17:16 cyphase joined #perl6
17:17 leont__ joined #perl6
17:17 sufrostico joined #perl6
17:22 mspo okay I'm installed.  Now what?
17:23 ugexe if its about netbsd testing, its the spec test that had the failure I think
17:26 mspo ~ $ rakudobrew test
17:26 mspo Spectesting moar-2016.08.1
17:26 mspo Couldn't determine correct make program. Aborting.
17:26 mspo hm
17:26 ugexe you could cd into ~/.rakudobrew/moar-$whatever/ and run your make
17:27 ugexe make spectest
17:29 FROGGS joined #perl6
17:30 mspo running now
17:30 mspo I'm on 6.x so..
17:31 * TimToady wonders which festival begins with 'x'...
17:31 FROGGS o/
17:32 buggable joined #perl6
17:32 timotimo xmas, clearly
17:32 TimToady FROGGS: \o
17:34 [Coke] TimToady: https://uz.wikipedia.org/wiki/Xalqaro_xotin-qizlar_kuni
17:34 * masak .oO( ask a xilly question... )
17:36 [Coke] it was that or X-ray day. :)
17:36 mspo perl5 closed a localization bug for netbsd that I opened ~five years ago
17:36 mspo with an actual fix
17:36 mspo I was amazed when I got the email
17:36 timotimo cool
17:36 TimToady you should change your email address more often, obviously...
17:37 mspo TimToady: they live much longer than my physical addresses
17:40 masak [Coke]: next question: do you actually speak Uzbek?
17:50 dogbert17 o/ #perl6
17:50 Woodi mspo: if you still around, what's nice in NetBSD ? OpenBSD got better press in last two decades :)
17:50 cyphase joined #perl6
17:50 dogbert17 is TimToady still online? Have a doc question for him
17:51 canopus joined #perl6
17:51 * TimToady hides behind a cricket
17:52 dogbert17 Hi, do you have time to look at https://docs.perl6.org/language/operators#infix_eqv especially the part starting with "For arbitrary objects ..." ?
17:52 FROGGS telling the obvious: regex interpolations are huge performance killers...
17:53 dogbert17 perlpilot mentioned that you might have changed how eqv works just about a year ago and that the doc looks a bit dated
17:53 mspo Woodi: nicer people?
17:53 mspo Woodi: I don't know what to say: I like it
17:53 FROGGS tried to parse a text file with 1k lines of indented structures, and before I had something like: token indentation($lvl) { <{ $lvl ?? '. "   " ' x $lvl !! '""' }> }
17:53 FROGGS it ate all my ram and didnt even finish after an hour
17:53 mspo Woodi: NetBSD has init scripts instead of just using rc.local
17:53 mspo Woodi: pkgsrc is nice
17:53 timotimo oh yeah, FROGGS
17:54 timotimo that's very true
17:54 FROGGS now I have this: [ <?{ $lvl ==  0 }> '' | <?{ $lvl ==  1 }> . '   ' | ... ]
17:54 FROGGS (as a longer list)
17:54 Woodi mspo: oo, it have rational init ! ;)
17:54 FROGGS and I can parse 25k lines in 30s
17:54 mspo Woodi: openbsd has much better marketing and market positioning; it also inspires more passion I think
17:55 mspo Woodi: also the six month release cycle is obviously a good choice
17:55 FROGGS sure, EVAL has to be slow by definition, but...
17:55 TimToady dogbert17: that paragraph is inaccurate
17:55 TimToady the default eqv compares .perl, iirc
17:55 timotimo FROGGS: you really can't match against a string?
17:55 TimToady m: my class A { has $.a; }; say A.new(a => 5) eqv A.new(a => 5);
17:55 camelia rakudo-moar 228717: OUTPUT«True␤»
17:55 mspo Woodi: but netbsd is just overall a pleasure to use :)
17:56 TimToady dogbert17: note it actually returns True, not False, as falsely claimed :)
17:56 mspo that's quite a doc bug
17:56 FROGGS timotimo: well, depending on the indentation level the string is n times the given pattern
17:56 dogbert17 TimToady: should I scrap that part from the docs or are there situations when a custom eqv is necessary?
17:56 FROGGS ohh wait
17:57 Woodi mspo: do Xen works on NetBSD ?
17:57 mspo Woodi: yes, DOM0 and DOMU
17:57 TimToady custom eqv is likely to be more efficient than calling a.perl eq b.perl
17:57 timotimo FROGGS: so the . really has to be in there?
17:57 FROGGS didnt I implement variables in repeatitors?
17:57 timotimo i think you did
17:57 timotimo i was about to say :)
17:57 FROGGS *g*
17:57 Woodi mspo: then you convinced me to try :)
17:59 FROGGS damn, my brain sucks
17:59 FROGGS timotimo: how do I write the repeatition again?
17:59 nadim_ joined #perl6
17:59 timotimo ** { $var } i believe?
18:00 TimToady correct, we require the braces for anything dynamic
18:01 masak m: my $var = 5; say "aaaaa" ~~ / "a" ** $var /
18:01 camelia rakudo-moar 228717: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Quantifier quantifies nothing␤at <tmp>:1␤------> 3my $var = 5; say "aaaaa" ~~ / "a" **7⏏5 $var /␤»
18:01 masak m: my $var = 5; say "aaaaa" ~~ / "a" ** { $var } /
18:01 camelia rakudo-moar 228717: OUTPUT«「aaaaa」␤»
18:01 canopus joined #perl6
18:01 masak bit of a LTA error message there
18:02 masak did I dream it, or did we have a better one at some point?
18:02 pyrimidine joined #perl6
18:02 FROGGS I was thinking the same
18:02 FROGGS as you masak, not as camelia
18:02 TimToady I don't think anyone ever implemented such a message
18:02 geekosaur iirc, it used to suggest wrapping in {}, yes
18:02 dogbert17 TimToady: many thanks, do you also happen to know if $*TOLERANCE can be used or should it be hidden from users?
18:03 firstdayonthejob joined #perl6
18:03 TimToady $*TOLERANCE is considered part of the public api
18:03 * dogbert17 finds a cold Pale Ale and rejoices
18:03 FROGGS hmmm... [ . '   ' ] ** { $lvl } seems to be way slower
18:03 MetaZoffix joined #perl6
18:04 MetaZoffix I recall improving the message, but I think it was for ranges with variables
18:04 MetaZoffix bisect: m: my $var = 5; say "aaaaa" ~~ / "a" ** $var /
18:04 bisectable6 MetaZoffix, On both starting points (good=2015.12 bad=77d9d41) the exit code is 1 and the output is identical as well
18:04 bisectable6 MetaZoffix, Output on both points: ===SORRY!=== Error while compiling /tmp/Apm6Zid9ka␤Quantifier quantifies nothing␤at /tmp/Apm6Zid9ka:1␤------> m: my $var = 5; say "aaaaa" ~~ / "a" **<HERE> $var /
18:04 dogbert17 Thx, I'll update the dynvar page later
18:05 MetaZoffix bisect: good=2016.04,bad=HEAD m: my $var = 5; say "aaaaa" ~~ / "a" ** $var /
18:05 bisectable6 MetaZoffix, Cannot find ‘good’ revision
18:05 FROGGS no, actually it is faster...
18:05 mspo Woodi: great
18:06 MetaZoffix m: my $var = 5; say "aaaaa" ~~ / "a" ** 1..$var /
18:06 camelia rakudo-moar 228717: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Malformed Range. If attempting to use variables for end points, wrap the entire range in curly braces.␤at <tmp>:1␤------> 3my $var = 5; say "aaaaa" ~~ / "a" ** 1..7⏏5$var /␤»
18:06 MetaZoffix Ah, that's what I fixed.
18:06 FROGGS (say'ing the Match takes quite a while, compared to saying what the action class made...)
18:08 timotimo right
18:09 cyphase joined #perl6
18:10 FROGGS parsing 72k lines (4.1MB) takes 1m34.953s now... I'm happy \o/
18:10 masak I think the need for braces around dynamic things is rooted in backwards compatibility with people who think that `%` is still spelled `**`
18:11 TimToady not really
18:11 TimToady the primary motivation is simply that such a DWIM would introduce a great many syntactic WATs
18:12 TimToady regex syntax is terribly ambigous with postfix brackets and dots and such
18:12 TimToady *ambiguous even
18:12 masak I see.
18:13 masak or rather, I'll take your word for it :)
18:13 TimToady 'a'**$var......'b' /
18:14 Actualeyes joined #perl6
18:14 * masak is convinced :)
18:15 TimToady and the 'is it dynamic?' test is simple to teach
18:15 masak aye
18:16 lizmat joined #perl6
18:17 TimToady arguably, we do allow singleton variables elsewhere, but not where we'd be looking for .. afterwards
18:18 TimToady m: / $_[1] /
18:18 camelia rakudo-moar 228717: OUTPUT«Potential difficulties:␤    Apparent subscript will be treated as regex␤    at <tmp>:1␤    ------> 3/ $_7⏏5[1] /␤»
18:18 TimToady at least we catch that one
18:20 kyclark I found that "for" will return a list, e.g., my @list = for ...; I wanted to use "given" to return a value, but it doesn't seem to work
18:20 kyclark my $val = given $s { when /cap/ { 1 } default { 0 } }
18:20 kyclark Word 'given' interpreted as a listop; please use 'do given' to introduce the statement control word
18:21 TimToady if 'for' works without 'do', that's a bug
18:22 TimToady m: my @list = for 1..10 { $_ }
18:22 camelia rakudo-moar 228717: OUTPUT«5===SORRY!5===␤Word 'for' interpreted as a listop; please use 'do for' to introduce the statement control word␤at <tmp>:1␤------> 3my @list = for7⏏5 1..10 { $_ }␤Unexpected block in infix position (two terms in a row)␤at <tmp>:1␤-----…»
18:22 TheLemonMan joined #perl6
18:22 woolfy joined #perl6
18:22 kyclark m: my $val = do given 'CAPSID' { when :i/cap/ { 1 } default { 0 } }
18:22 camelia rakudo-moar 228717: OUTPUT«5===SORRY!5===␤Expression needs parens to avoid gobbling block␤at <tmp>:1␤------> 3= do given 'CAPSID' { when :i/cap/ { 1 }7⏏5 default { 0 } }␤Missing block (apparently claimed by expression)␤at <tmp>:1␤------> 3= do given 'CAPSID' {…»
18:23 TimToady missing semi, really
18:23 masak kyclark: you can't `:i` nothing
18:24 TimToady m: my $val = do given 'CAPSID' { when m:i/cap/ { 1 } default { 0 } }
18:24 camelia rakudo-moar 228717: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Strange text after block (missing semicolon or comma?)␤at <tmp>:1␤------> 3 do given 'CAPSID' { when m:i/cap/ { 1 }7⏏5 default { 0 } }␤»
18:24 TimToady now you get the correct semi message
18:25 TimToady without m it parsed both / as division operators
18:25 TimToady m: my $val = do given 'CAPSID' { when /:i cap/ { 1 }; default { 0 } }
18:25 camelia rakudo-moar 228717: ( no output )
18:25 TimToady you can put the :i inside too
18:26 TimToady m: my $val = do given 'CAPSID' { when /:i cap/ { 1 }; default { 0 } }; say $val
18:26 camelia rakudo-moar 228717: OUTPUT«1␤»
18:26 timotimo this machine has a ubuntu 8.04 on it %)
18:27 [Coke] masak: nope. I speak english, and then have maybe a dozen words in various other languages. :)
18:28 kyclark OK, this works now!  Thanks.
18:32 masak [Coke]: I figured it'd be pretty unlikely for you to know Uzbek and me not knowing it by now :P
18:33 masak (not that I speak it, either. it seems like a nice language, though.)
18:35 itaipu joined #perl6
18:35 wamba joined #perl6
18:36 TimToady All natural languages are nice, except when they're naughty.
18:37 dalek doc: 23a69ab | (Jan-Olof Hendig)++ | doc/Language/variables.pod6:
18:37 dalek doc: Added dynvar TOLERANCE to variables.pod6
18:37 dalek doc: review: https://github.com/perl6/doc/commit/23a69ab30b
18:38 * dogbert17 hopes he got that 'approximately' right
18:40 TimToady it leaves out a bit of the generality
18:41 TimToady m: my $*TOLERANCE = 0.001; say .01i.Num
18:41 camelia rakudo-moar 228717: OUTPUT«Can not convert 0+0.01i to Num: imaginary part not zero␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
18:41 TimToady m: my $*TOLERANCE = 0.1; say .01i.Num
18:41 camelia rakudo-moar 228717: OUTPUT«0␤»
18:41 TimToady since other operations depend on =~=
18:44 dogbert17 so the text might come off as slightly misleading then
18:45 TimToady maybe just a "and any operations that depend on =~=" or some such
18:45 TimToady it's not a major point
18:45 dogbert17 consider it changed, thx for the feedback
18:46 TimToady people tend to interpret things concretely unless directed toward the abstraction, even if the abstraction in question is just function calls...
18:49 zumbra joined #perl6
18:49 * Woodi just few minutes ago thinked: global variable... they make so many things simpler ! ;)
18:50 dogbert17 m: say <l i z m a t>.permutations.pick(3) # lizmat++ for optimizing permutations
18:50 camelia rakudo-moar 228717: OUTPUT«((a l z t m i) (t z i m l a) (l a m z t i))␤»
18:50 timotimo liz! mat! hooraay!
18:51 dogbert17 now the solution for project euler problem 24 runs in 6 sec on my machine, in March it took 83 !!
18:52 cyphase joined #perl6
18:52 timotimo fantastic!
18:52 timotimo that's better than 5x faster
18:54 dogbert17 yes, very impressive, since the first run was in March it's possible that some other optimization might have played a role
18:55 timotimo we've had a lot of different optimizations; liz is responsible for a big chunk of them :)
18:55 ItayAlmog joined #perl6
18:55 mspo okay my spectest finished with some failures
18:55 masak m: say <l i z m a t>.permutations.pick(3)>>.join
18:55 camelia rakudo-moar 228717: OUTPUT«(iltazm ztimla tmiazl)␤»
18:56 Actualeyes left #perl6
18:58 ItayAlmog So after doing alot of research, i think i will stop making the perl6 native compiler and create a NQP native compiler....
18:58 dogbert17 how about: $*TOLERANCE  Used by the C<=~=> operator, and any operations that depend on it, to decide if two values are approximately equal. Defaults to 1e-15.
18:59 zumbra ItayAlmog: :D
19:00 zumbra ItayAlmog: all the Grammar handling stuff will be pretty much the same
19:04 Sgeo_ joined #perl6
19:07 ItayAlmog_ joined #perl6
19:09 dalek doc: 189b39b | (Jan-Olof Hendig)++ | doc/Language/variables.pod6:
19:09 dalek doc: Updated the text on TOLERANCE. TimToady++
19:09 dalek doc: review: https://github.com/perl6/doc/commit/189b39b613
19:10 ItayAlmog_ I know the grammar will be the same, but i was told it will be easier :D
19:10 spider-mario joined #perl6
19:10 * masak .oO( this community is all about TOLERANCE, that's why we shout it at each other )
19:11 masak ItayAlmog_: if you want to fast-forward to the gnarly parts, consider how you'd code-generate a function value (i.e. a block of code or a sub stored into a variable)
19:13 cyphase joined #perl6
19:14 ItayAlmog_ I will probably use function pointers like in C, you can have a variable and a sub with the same name right? (For example have `my $sum` and a `sub sum{}`).
19:14 masak oh yes
19:14 masak the sub gets the name `&sum`, which doesn't collide with `$sum`
19:15 El_Che a var and sub yes, attribute and sub no
19:15 ItayAlmog_ Ok, interesting, so functions are represented as special var right?
19:15 masak m: class C { has $.x; sub x {} } # El_Che: works fine
19:15 camelia rakudo-moar 228717: ( no output )
19:16 El_Che masak: yes, but you loose the auto getters/setters
19:16 masak ItayAlmog_: you could say that, yes. a `sub` declaration has the side effect of initializing a name `&sub` in the current scope.
19:16 El_Che I am not saying it's a bug, but a nice case for suble bugs
19:16 masak El_Che: you're probably thinking of methods, not subs
19:16 El_Che masak: I am
19:17 ItayAlmog_ NQP has classes as well? And if so they are as dynamic as in perl6 or are they less dynamic?
19:17 masak a sub and an attribute can co-exist just fine
19:17 El_Che isn't that all the same? Pardon my Perl5 :)
19:17 masak El_Che: not at all.
19:17 El_Che :)
19:17 masak El_Che: subs are small helpers. the fact that they are in the class block is irrelevant.
19:17 labster joined #perl6
19:18 masak El_Che: methods have a `self` and generally assume they'll be called on an object (or type object)
19:18 El_Che yeah, I know
19:19 masak subs install themselves in the `my` namespace by default. methods (and attributes) in the `has` namespace. that's why they don't collide
19:21 ItayAlmog_ Other than the NQP github repo are there any other documentations?
19:21 ItayAlmog_ About NQP
19:21 ItayAlmog_ A
19:22 perlpilot ItayAlmog_: https://github.com/edumentab/rakudo-and-nqp-internals-course
19:22 yoleaux 8 Sep 2016 21:42Z <tbrowder> perlpilot: look at doc change https://github.com/perl6/doc/commit/0a7d930cbb
19:22 ItayAlmog_ perlpilot: Thanks!
19:34 cyphase joined #perl6
19:41 zumbra m: say q           ︵Help! My brackets have fallen over!︶
19:41 camelia rakudo-moar 228717: OUTPUT«Help! My brackets have fallen over!␤»
19:41 timotimo oops
19:41 ItayAlmog2805 joined #perl6
19:41 zumbra :)
19:42 zostay how did programmers have fun before unicode? oh wait, most of them can't have fun with unicode still
19:42 zumbra ^_^
19:42 timotimo %)
19:43 timotimo only sadness
19:44 masak .u fun
19:44 yoleaux U+2061 FUNCTION APPLICATION [Cf] (<control>)
19:44 yoleaux U+2336 APL FUNCTIONAL SYMBOL I-BEAM [So] (⌶)
19:44 yoleaux U+2337 APL FUNCTIONAL SYMBOL SQUISH QUAD [So] (⌷)
19:44 masak so many ways to have fun with unicode
19:49 cyphase joined #perl6
19:53 mspo ⎔
19:53 mspo .u ⎔
19:53 yoleaux U+2394 SOFTWARE-FUNCTION SYMBOL [So] (⎔)
19:54 mspo I was thinking of ƒ; I'd never seen the hexagon used before
19:54 geekosaur gotta make your flowcharts in unicode too
19:54 mspo is it UML?
19:54 geekosaur do kids these days even use flowcharts?
19:55 mspo they use the kanban
19:55 * moritz never got the point of most UML diagrams
19:55 mspo moritz: you and the rest of the world
19:55 mspo I have a book around here somewhere
19:56 zostay it was for impressing your software project professor who never worked in the real world
19:56 timotimo DrForr: your talk seems to claim that "everything is utf8 internally", that's not correct, though
19:56 cdg joined #perl6
19:57 El_Che mspo: haha
19:59 masak I happen to think UML has a valid use -- I think the DDD book convinced me
19:59 masak it uses UML as a sketching/whiteboard discussion medium
20:00 timotimo m: sub mean ( @a ) { say sum @a }; mean 1, 2, 3  # DrForr you meant to have *@a here
20:00 camelia rakudo-moar 87f772: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Calling mean(Int, Int, Int) will never work with declared signature (@a)␤at <tmp>:1␤------> 3sub mean ( @a ) { say sum @a }; 7⏏5mean 1, 2, 3  # DrForr you meant to have␤»
20:00 El_Che yeah, my java ide has some tool to generate uml after you wrote the code. It was called the "shut-up-you-stupid-manager" macro
20:01 timotimo fantastic
20:01 timotimo i expect a code editor is much more comfortable for creating an UML diagram than any UML editor would be
20:01 timotimo you get all your templates/snippets, refactoring stuff, ...
20:04 masak El_Che: reminds me in spirit of https://structurizr.com/
20:05 El_Che I remember a time when people thought you could autogenerate all the code from some uml
20:05 timotimo of course you can do that
20:05 TimToady Woodi: if you're referring to $*TOLERANCE, that's not really a global, except for the default, which is immutable, so by necessity you have to use a dynamic variable to override it
20:05 timotimo you just have to put a whole lot of code in little boxes that go on the side
20:05 TimToady m: $*TOLERANCE = 0.1
20:05 camelia rakudo-moar 87f772: OUTPUT«Cannot modify an immutable Num␤  in block <unit> at <tmp> line 1␤␤»
20:06 El_Che timotimo: the problem was when you needed to edit something. boom
20:06 TimToady so a dynvar can be limited to any (dynamic) scope you like
20:08 timotimo El_Che: no, you only ever edit your code in the UML and building the .java out of that is a step in the build process
20:08 timotimo all your code now goes into the UML diagram boxes
20:10 mspo code is a failure of your UML skills, obviously
20:12 cyphase joined #perl6
20:20 nadim joined #perl6
20:22 timotimo i wonder why i've seen all the things DrForr has shown already :P
20:29 leont__ joined #perl6
20:32 TEttinger joined #perl6
20:42 cyphase joined #perl6
20:46 canopus joined #perl6
20:56 AlexDaniel joined #perl6
20:59 cyphase joined #perl6
21:07 khw joined #perl6
21:14 canopus joined #perl6
21:24 cyphase joined #perl6
21:24 perlpilot Just participated in a phone interview where the interviewee asked if we were using Perl 6 yet  :)
21:28 timotimo awesome
21:29 canopus joined #perl6
21:42 cyphase joined #perl6
21:49 _slade_ joined #perl6
21:51 lizmat dogbert17: you might want to try again with my last commit  :-)
21:52 mcmillhj joined #perl6
21:52 dogbert17 lizmat++, will do
21:53 timotimo i should hit up the person who wrote those "overkill" blog posts and tell them to try again
21:53 timotimo also, now that permutations is so much cheaper, i bet the thing will parallelize
21:54 El_Che timotimo: what post?
21:55 timotimo El_Che: about the "magic box" math puzzle thingie
21:55 timotimo at first it had a recursive implementation of doing its own permutations, and it was rather slow (rakudo itself is at fault partially here, too)
21:57 timotimo i suggested using rakudo's built-in permutations function because it's algorithmically superior to the naive version, and it already gave a nice performance boost
21:57 timotimo but now that permutations has been optimized two times over, that could be worth a lot :)
22:01 cyphase joined #perl6
22:09 mcmillhj joined #perl6
22:16 cyphase joined #perl6
22:17 dogbert17 lizmat: the last fix didn't change anything, here's my code: say permutations((0,1,2,3,4,5,6,7,8,9)).[999_999];
22:18 lizmat ah, no, that didn't change
22:18 lizmat List.permutations got 8x faster
22:18 lizmat m: dd <a b c>.permutations
22:18 camelia rakudo-moar bb6da7: OUTPUT«(("a", "b", "c"), ("a", "c", "b"), ("b", "a", "c"), ("b", "c", "a"), ("c", "a", "b"), ("c", "b", "a")).Seq␤»
22:19 dogbert17 well, the first fix was more than good enough for me :)
22:20 japhb lizmat: Are you saying if dogbert17 changed it from a sub call to a method call, it would go faster?
22:20 timotimo so ... the magic box uses permutations on a range of numbers 3..12 or something; i think the calculation code could just be changed to pretend the numbers 0 through 9 are those numbers ... or whatever? and then on display add 3 to all of them
22:20 lizmat dd (^10 .permutations)[999_999] runs in 4.7 seconds for me
22:20 timotimo japhb: no, the method form of permutations has more things to do, and actually almost immediately calls into the sub form
22:21 japhb timotimo: Ah, I was apparently misunderstanding lizmat's comment
22:21 lizmat japhb: the method form maps onto the actual contents of the list
22:21 timotimo benchable6: compare HEAD say (^10 .permutations)[999_999] ||| say permutations(9)[999_999]
22:21 benchable6 timotimo, starting to benchmark the 1 given commits
22:21 lizmat that mapping got 8x faster
22:21 benchable6 timotimo, ¦«HEAD»:Benchmark: ␤Timing 10 iterations of 0, 1...␤«timed out after 10 seconds, output»:
22:21 timotimo whoops?
22:22 timotimo benchable6: compare HEAD say (^10 .permutations)[100_000] ||| say permutations(9)[100_000]
22:22 benchable6 timotimo, starting to benchmark the 1 given commits
22:22 benchable6 timotimo, ¦«HEAD»:Benchmark: ␤Timing 10 iterations of 0, 1...␤(0 3 5 8 9 2 6 7 1 4)␤«timed out after 10 seconds, output»:
22:22 timotimo darn it :)
22:22 lizmat timotimo: that's not the same, it should be "permutations(10)
22:22 timotimo OK!
22:22 timotimo benchable6: compare HEAD say (^10 .permutations)[50_000] ||| say permutations(10)[50_000]
22:22 benchable6 timotimo, starting to benchmark the 1 given commits
22:22 timotimo of course, ^10 gives you 10 values
22:23 benchable6 timotimo, ¦«HEAD»:Benchmark: ␤Timing 10 iterations of 0, 1...␤(0 2 3 9 5 7 4 6 1 8)␤(0 2 3 9 5 7 4 6 1 8)␤«timed out after 10 seconds, output»:
22:23 timotimo it's quite late and dark in my head already ;)
22:23 mcmillhj joined #perl6
22:23 lizmat anyways, List.permutations can never be faster than permutations()
22:23 timotimo i wanted to know how big the difference is
22:23 timotimo when the list conversion is actually completely "useless"
22:23 lizmat because List.permutations just calls permutations()
22:23 lizmat not a lot of difference anymore
22:24 lizmat it was quite a lot (like the first 6 entries in the profile just for .map and slicing)
22:24 timotimo that sounds fantastic
22:24 timotimo i'm so glad the two of you and the profiler have met :D
22:25 dogbert17 lizmat: what's your next optimization target?
22:26 lizmat not sure yet
22:26 lizmat tomorrow will be a long drive home after seem some more sights here in Dresden
22:26 lizmat *seeing
22:27 lizmat dogbert17: any suggestions ?
22:27 dogbert17 hopefully it's been a nice trip
22:27 lizmat it was, visited 5 countries I never visited before
22:28 lizmat Slovakia, Hungary, Croatia, Slovenia and Liechtenstein
22:28 dogbert17 impressive
22:28 * timotimo goes to bed
22:28 timotimo see y'all :)
22:28 dogbert17 good night
22:29 lizmat good night!
22:29 * lizmat does the same
22:29 dogbert17 good night 2
22:29 * dogbert17 wonders if array accesses are slow
22:34 canopus joined #perl6
22:38 mcmillhj joined #perl6
22:40 cyphase joined #perl6
22:54 tbrowder hi #perl6
22:54 Ven_ joined #perl6
22:55 tbrowder anyone interested in talking about the docs and the sprintf function description?
22:56 tbrowder i'll pontificate: perlpilot and i msde
22:56 tbrowder *made a few changes, but i!
22:56 skids joined #perl6
22:57 tbrowder argh!! i'm not happy with the current description which i took from perl 5 docs
22:58 tbrowder i think the linux man page for printf does a better job
23:00 tbrowder perlpilot and others want to separate (or eliminate) the unimplemented features and i am working on a redo of the whole sprintf section
23:03 tbrowder i am testing every example and every feature on the perl 5 sprintf doc and i will do the same for the linux printf doc
23:04 tbrowder then i will adapt the linux printf description for our sprintf doc
23:05 pierre_ joined #perl6
23:05 tbrowder in the process, i will put all unimplemented features in a separate section following the sprintf section
23:07 tbrowder it will be a =head2 section titled "sub sprintf [C<unimplemented features>"
23:07 canopus joined #perl6
23:08 kyclark_ joined #perl6
23:08 tbrowder i will put the new doc redo in a gist for easier consideration
23:09 cdg joined #perl6
23:11 kyclark_ I’m back with grammar questions.  I have something that parses just fine, but I’m not sure what I’m doing with the Actions to “make” things.  To start, I’d be happy to get back each <record> as a hash with { id => <id>, member => <member> } http://lpaste.net/187760
23:14 kyclark_ I guess I should say that I’m getting back all these Match objects, and I was hoping to distill it down to strings
23:16 geekosaur you can stringify with ~
23:16 kyclark_ I’m doing this: $/.caps[0].value.Str
23:16 geekosaur yes, but $/.make is what wraps it in a Match object (and must or you couldnt get it back)
23:16 kyclark_ Maybe I don’t understand correctly, but the “method” in the Actions class gets a Match object called $/, so I should be able to get at the captured bits with “caps” right?
23:17 geekosaur you can use prefix ~ on the match objects you get out to get just the strings
23:18 kyclark_ Am I doing the correct thing to get the captured parentheses?
23:18 kyclark_ $/.caps[…]?
23:25 geekosaur it should be
23:28 canopus joined #perl6
23:31 vike joined #perl6
23:34 mcmillhj joined #perl6
23:41 tushar joined #perl6
23:43 mcmillhj joined #perl6
23:51 cyphase joined #perl6

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

Perl 6 | Reference Documentation | Rakudo