Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2017-07-08

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:00 sch left #perl6
00:04 BenGoldberg joined #perl6
00:07 kliph joined #perl6
00:08 TimToady m: say 9**99999999999
00:08 camelia rakudo-moar c76d93: OUTPUT: «Numeric overflow␤  in block <unit> at <tmp> line 1␤␤»
00:08 TimToady "You can't be serious."  -- The Computer
00:25 kliph joined #perl6
00:30 pierre_ joined #perl6
00:36 kliph joined #perl6
00:37 aindilis joined #perl6
00:42 Cabanossi joined #perl6
00:47 skids left #perl6
00:51 kliph joined #perl6
00:56 kliph joined #perl6
01:10 kliph joined #perl6
01:12 Cabanossi joined #perl6
01:13 seatek can you coerce class attributes into a certain type, using the attribute definition?
01:14 seatek m: class C { has Num $.n is rw; }; say C.new.n = '5.25';
01:14 camelia rakudo-moar c76d93: OUTPUT: «Type check failed in assignment to $!n; expected Num but got Str ("5.25")␤  in block <unit> at <tmp> line 1␤␤»
01:14 seatek like the signature coersion maybe... (Num(Int)) sorta thang
01:16 seatek i was thinking i'd just do my own accessor methods for the attributes and do it there,  using a private attribute
01:16 seatek but it's hot out and i'm so lazy
01:21 Zoffix m: class C { has Num $.n is rw; submethod TWEAK (Num() :$!n) {} }; say C.new.n = '5.25';
01:21 camelia rakudo-moar c76d93: OUTPUT: «No such method 'Num' for invocant of type 'Any'. Did you mean 'sum'?␤  in submethod TWEAK at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
01:21 Zoffix huh
01:22 Zoffix Oh
01:22 Zoffix seatek: right, no, you can't make a variable auto-coerce (yet)
01:23 seatek Zoffix: yeah I tried with TWEAK too. :) all the magic i could think of
01:24 seatek i read in the docs that type coersion like the (Num(Int)) that you can do in signatures will be able to be used everywhere else some day, but didn't know if there was something i was missing on attribute definitions
01:24 dj_goku_ joined #perl6
01:26 kliph joined #perl6
01:28 kliph joined #perl6
01:30 Zoffix Well, you can just use a Proxy, but I don't get why it doesn't like me
01:30 Zoffix m: class C { has Num $.n; submethod TWEAK (:$n) { my $_n; $!n := Proxy.new: :FETCH{ $_n }, STORE => -> $, $_n {  }; Nil } }; say C.new
01:30 camelia rakudo-moar c76d93: OUTPUT: «Type check failed in binding; expected Num but got Any (Any)␤  in submethod TWEAK at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
01:30 Zoffix Where did the typecheck fail what is it whining about?
01:31 pierre_ joined #perl6
01:31 Zoffix Ah, OK
01:32 Zoffix m: class C { has Num $.n is rw; submethod TWEAK (:$n) { my Num $_n; $ = $!n := Proxy.new: :FETCH{ $_n }, STORE => -> $, Num() $n { $_n = $n }; } }; say C.new.n = '5.25'
01:32 camelia rakudo-moar c76d93: OUTPUT: «5.25␤»
01:34 seatek Zoffix: :) I think I'll just have it call a method to either set/corece or return the value ;)
01:34 Zoffix m: class C { has Num $.n is rw; submethod BUILD (:$n) { my Num $_n; $!n := Proxy.new: :FETCH{ $_n }, STORE => -> $, Num() $n { $_n = $n }; $!n = $_ with $n } }; say C.new(:42n)
01:34 camelia rakudo-moar c76d93: OUTPUT: «C.new(n => 42e0)␤»
01:34 seatek i'll forget all that tomorrow
01:35 Zoffix m: class C { has Num $.n is rw; method n is rw { Proxy.new: :FETCH{ $!n }, STORE => -> $, Num() $!n {} } }; say C.new.n = '42'
01:35 camelia rakudo-moar c76d93: OUTPUT: «42␤»
01:36 Zoffix Though that won't let you set it via non-Num in new
01:37 seatek that's interesting
01:46 shyam_ joined #perl6
01:46 seatek i had no idea about Proxy's  - thanks Zoffix++
01:46 seatek very DIY that ;)
01:46 shyam_ What are the "Real Perl Programmers" dos/don'ts ?
01:49 raschipi Perl 6 has a motto that as long as your boss is happy, it's proper programming.
01:52 shyam_ raschipi: I'm unemployed (NEET).
01:52 raschipi So you're your own boss.
01:56 Zoffix shyam_: "write code that's very easy to throw away"
01:56 shyam_ Zoffix: Why is that a good thing?
01:57 Zoffix shyam_: because then each part of the program can be easily modifed and extended.
01:57 shyam_ Zoffix: Do you mean modularity?
01:57 shyam_ I'm already doing modules...
01:58 Zoffix shyam_: another term I heard in use is "YAGNI" (You Ain't Gonna Need It). Which means just because you can implement 100 features, doesn't mean it's a good idea to do so and you'll likely won't really need them all.
01:59 shyam_ Zoffix: I think that's more of a design pattern, than anything to do with Perl?
02:00 Zoffix shyam_: the suggestion is quite literal: look at any piece of code (a loop, a subroutine, a class, a module). It should be easy to throw it away; both technically and emotionally. The whole "modularity" and "re-usability" and not suffering from featuritis all converge on just throwing code away.
02:01 Zoffix shyam_: yeah, I guess. I don't think language matters much.
02:02 Zoffix There aren't any published Perl 6 Best Practices I'm aware of.
02:02 Zoffix If that's what you're looking for.
02:03 shyam_ Zoffix: "One of my most productive days was throwing away 1000 lines of code." — Ken Thompson
02:05 Zoffix :D
02:08 AlexDaniel shyam_: this is not what you asked for, but perhaps you'll find it useful: https://docs.perl6.org/language/traps
02:10 shyam_ AlexDaniel: Do you know how to do something like this: Char @char
02:10 Zoffix int8 @char
02:10 Zoffix :)
02:12 shyam_ Zoffix: This is the full thing I'm using, and it didn't work: int8 @char=(('0'..'9'), ('a'..'z'), ('A'..'Z')).flat
02:12 Cabanossi joined #perl6
02:14 noganex_ joined #perl6
02:14 Zoffix shyam_: you don't have to type your Arrays in Perl 6
02:14 Zoffix m: my @char = |('0'..'9'), |('a'..'z'), |('A'..'Z'); say @char
02:14 camelia rakudo-moar c76d93: OUTPUT: «[0 1 2 3 4 5 6 7 8 9 a b c d e f g h i j k l m n o p q r s t u v w x y z A B C D E F G H I J K L M N O P Q R S T U V W X Y Z]␤»
02:17 shyam_ Zoffix: It's parametric, and if it's longer than a single char then it will attract Camelia.
02:18 geekosaur also '0' is not an int8, it is a Str
02:18 Zoffix m: subset Char of Str where .chars == 1; my Char @char = |('0'..'9'), |('a'..'z'), |('A'..'Z'); say @char
02:18 camelia rakudo-moar c76d93: OUTPUT: «[0 1 2 3 4 5 6 7 8 9 a b c d e f g h i j k l m n o p q r s t u v w x y z A B C D E F G H I J K L M N O P Q R S T U V W X Y Z]␤»
02:19 Zoffix shyam_: ^ you could do that, but I think trying to stick types all over the place will only lead to frustration :)
02:19 Zoffix Relevant blog post: https://rakudo.party/post/Perl-6-Types--Made-for-Humans
02:23 shyam_ Zoffix: I heard type-level programming is the best practice?
02:25 Zoffix I don't know what that is.
02:25 Zoffix :)
02:25 Zoffix Type is not King in Perl 6, as it is in Haskell. Perhaps that best practice applies to Haskel but not Perl 6?
02:29 shyam_ Zoffix: There's only one "best" practice.
02:29 Zoffix What is it?
02:29 seatek it's secret and powerful ;)
02:32 shyam_ Zoffix: I mean, you can't say going east is the best practice for some people, and going west is the best practice for others.
02:33 Zoffix shyam_: it is if the first group of people is traveling using a different method of transportation ;)
02:35 seatek i would drive my car into the sea
02:35 seatek hmm. that's west
02:41 shyam_ Zoffix: You can't, because eventually they all reach an obstacle; whether it be the coast, or some other formidable barrier, or just running out of fuel.
02:43 AlexDaniel .oO( what if somebody has a teleport? … I mean, you have to be open-minded… )
02:45 shyam_ AlexDaniel: I would say it's just a dream.
02:48 AlexDaniel shyam_: I think in software development sometimes dreams come true
02:48 AlexDaniel shyam_: and what I mean by that is that things that may seem impossible (or too hard) are eventually done by a right person :)
03:02 TimToady joined #perl6
03:07 shyam_ AlexDaniel: By "a right person", do you mean our second brain?
03:07 AlexDaniel shyam_: no, some superman coming in and solving the task :)
03:08 shyam_ AlexDaniel: Our future selves?
03:08 pierre_ joined #perl6
03:08 AlexDaniel possibly!
03:10 AlexDaniel shyam_: for example, at some point I was impressed by this: http://fastcompression.blogspot.com.ee/2013/12/finite-state-entropy-new-breed-of.html
03:10 AlexDaniel shyam_: for me it seemed that we are not going to have any kind of breakthrough or significant improvement in compression algorithms
03:11 shyam_ AlexDaniel: And then I came along?
03:11 AlexDaniel shyam_: not you, but the guy who wrote the article :P
03:43 Cabanossi joined #perl6
03:55 ugexe hackerrank allows submissions in LOLCAT but not perl6
03:56 ugexe er LOLCODE
03:56 Cabanossi joined #perl6
04:11 skaji Hi,
04:11 skaji I noticed that with recent rakudo, it takes a lot of time to call non-existing methods.
04:11 skaji please take a look at this: https://gist.github.com/skaji/b597ec5ecef28449527bb746ab53bd30
04:14 llfourn skaji: That's strange. Looks like it's worth reporting as bug.
04:16 ugexe Foo.?not-exists; is still fast it seems though
04:16 llfourn maybe exception handling got slow
04:17 skaji for ^30 { try die; } is not slow.
04:19 skaji llfourn, ugexe: thanks. I'll open a ticket in rt.perl.org.
04:21 llfourn skaji: cool. I'd put [PERF][REGRESSION] in the title.
04:21 llfourn you can just email rakudobug@perl.org fyi
04:22 skaji llfourn: I'll put the tags in the title, thanks!
04:22 llfourn skaji: also japhb was thanking you for making mi6 earlier in perl6-dev (he didn't know where to find you) :)
04:23 skaji ????
04:23 llfourn (actually perl6-toolchain)
04:23 llfourn https://irclog.perlgeek.de/perl6-toolchain/2017-07-07#i_14841761
04:40 skaji created. https://rt.perl.org/Ticket/Display.html?id=131721
04:40 llfourn skaji++
04:46 MasterDuke skaji: i'm pretty sure i know why it's slower
04:46 gdonald joined #perl6
04:46 skaji MasterDuke:  wow!
04:47 MasterDuke about a month ago, i added a feature where it will suggest methods that are similarly named
04:47 MasterDuke m: say Int.son
04:47 camelia rakudo-moar c76d93: OUTPUT: «No such method 'son' for invocant of type 'Int'. Did you mean any of these?␤    sin␤    so␤␤  in block <unit> at <tmp> line 1␤␤»
04:47 MasterDuke like so ^^^
04:48 llfourn MasterDuke: can we make that lazy? ie only calculate it when .gist is called.
04:48 MasterDuke hm, not sure
04:48 llfourn (MasterDuke++ btw that's an awesome feature)
04:49 MasterDuke it's happening when the $.message is created
04:50 MasterDuke here: https://github.com/rakudo/rakudo/blob/nom/src/core/Exception.pm#L155-L205
04:51 llfourn :o we have A StrDistance class?
04:51 llfourn is that spec'd?
04:51 MasterDuke not really
04:51 skaji like https://github.com/yuki24/did_you_mean ?
04:51 MasterDuke there was some discussion about that yesterday in #perl6-dev i believe
04:52 llfourn tbh I would be a +1 on including .levinstein or something on Str
04:52 MasterDuke skaji: yeah. we already had it for sub and variables, i added it for methods
04:52 llfourn because I find myself needing it all the time
04:53 skaji I also think it is nice feature!
04:54 MasterDuke the code to generate the suggestions is not very optimized, since i assumed this would be in a failure path
04:54 llfourn mmm
04:54 llfourn I don't think .message should be called unless it's actually .gisted
04:54 MasterDuke but it people are noticing the slowdown it could be made some faster
04:55 llfourn no matter how fast it can become I don't think we want it running unless we are actually producing the error message.
04:55 MasterDuke that would be a bigger change
04:56 llfourn would it?
04:56 Cabanossi joined #perl6
04:57 llfourn it looks like it's because .throw does self.?message to check if there's a message before installing a default '{self.^name} exception produced no message'
04:57 MasterDuke well, right now Exception.throw calls .message
04:57 MasterDuke jinx
04:58 llfourn well, my intuition would be to re-work that so the message default is done in .gist instead.
04:58 llfourn (actually looking at the code it already does that so it might be dead code anyway?)
05:00 MasterDuke .throw seems to call .message it so that it can nqp::setmessage with the result
05:00 llfourn mm but maybe we can just do that in .gist instead
05:01 MasterDuke maybe
05:01 llfourn that could be a big win in general for code that catches a lot of exceptions
05:10 MasterDuke well, just removing those couple lines from .throw breaks ~20 spectests
05:11 pierre_ joined #perl6
05:12 MasterDuke one problem is you lose the argument to die()
05:12 llfourn that would be expected, unless you get the message at the start of .gist?
05:16 kyan_ joined #perl6
05:41 Cabanossi joined #perl6
05:41 Todd_ joined #perl6
05:42 Todd_ anyone home
05:42 Todd_ ??
05:43 Todd_ guess not.  I will post on the mailing list
05:47 llfourn o/ Todd_
05:47 Todd_ I just got gobsmacked by https://github.com/retupmoca/P6-Net-SMTP/issues/16  Were Net:SMTP gives the following error:      Type check failed in binding to parameter '@seps';      expected Positional but got Str ("\r\n")  Anyone know a workaround?  Any way to get git to cough up a prior version?  This is kind of urgent as it is affecting a security program.
05:49 llfourn hmm I'm not familiar with that codebase
05:50 Todd_ It happened just after installing Fedora 25 updates (dnf upgrade)
05:50 Todd_ I re-cloned from git and uninstalled and reinsalled with zef.  No joy.
05:51 llfourn you mean you reinstalled rakudo?
05:51 llfourn or the module or both?
05:52 Todd_ zef uninstall Net::SMTP
05:53 Todd_ perl6 -v This is Rakudo version 2017.06 built on MoarVM version 2017.06 implementing Perl 6.c.
05:53 Todd_ Am I out of date, again?
05:54 llfourn no but I can tell you that @seps is a parameter in rakudo not in NET::SMTP
05:54 llfourn it was introduced 2017-05-19
05:55 Todd_ How do I fix?
05:55 llfourn maybe you can run with --ll-exception and put the output in a gist?
05:56 Todd_ what do you mean?
05:56 llfourn perl6 --ll-exception my_program.p6
05:57 llfourn if you just want a quick fix maybe go back to an older rakudo like .04
05:59 Todd_ will try
05:59 llfourn Todd_: it doesn't look like a problem with a module. I doubt there's a prior version of the module that works. It looks like a regerssion/change in rakudo.
06:01 Todd_ dnf downgrade rakudo Last metadata expiration check: 2:51:02 ago on Fri Jul  7 20:10:02 2017. Package rakudo of lowest version already installed, cannot downgrade it. Error: Nothing to do.
06:01 Todd_ poop!
06:04 wamba joined #perl6
06:04 Todd_ I see rakudo-star-0.0.2016.07-1.fc25.x86_64 in pbone
06:05 llfourn Todd_: looks like you either have to investigate the bug in the module and fix it or just uninstall your rakudo and install an older version from here: http://rakudo.org/downloads/rakudo/
06:06 araraloren joined #perl6
06:06 Todd_ got a link for rpm's?
06:07 llfourn Todd_: not sure about the rpm situation
06:08 Todd_ I found https://github.com/nxadm/rakudo-pkg/releases, but they only have current versions
06:11 Todd_ I have to give up for the night.  Thank you for the help!  I did post on the mailing list if anyone thinks of anything.
06:11 llfourn Todd_: np sorry I couldn't be of more help
06:12 Todd_ I appreciate the help anyway.
06:12 Todd_ bye bye
06:17 Atomic_qm8UY joined #perl6
06:21 skids joined #perl6
06:32 mr-foobar joined #perl6
06:38 espadrine_ joined #perl6
06:41 Cabanossi joined #perl6
06:45 ChoHag joined #perl6
07:07 setty1 joined #perl6
07:36 ab5tract m: m: my Int $v = 5 but role { method Int() { 42 }}; say $v+$v; say +$v + +$v
07:36 camelia rakudo-moar c76d93: OUTPUT: «10␤10␤»
07:36 ab5tract I guess the optimizer filters out the Int coercion?
07:37 ab5tract m: m: my Int $v = 5 but role { method Int() { 42 }}; say $v+$v; say +$v + +$v; say $v.Int + $v.Int
07:37 camelia rakudo-moar c76d93: OUTPUT: «10␤10␤84␤»
07:45 ab5tract ah, prefix:<+> is a .Numeric coercer, which makes a lot of sense
07:46 hankache joined #perl6
07:50 ab5tract m: m: my Int $v = 5 but role { method Int() { 42 }; method Numeric() { 23.3 } }; say $v+$v; say +$v + +$v; say $v.Int + $v.Int
07:50 camelia rakudo-moar c76d93: OUTPUT: «10␤46.6␤84␤»
07:51 llfourn MasterDuke: You were right. It's tougher than I imagined to make exceptions generate their messages lazily.
07:58 nadim joined #perl6
08:01 domidumont joined #perl6
08:03 pierre_ joined #perl6
08:07 domidumont joined #perl6
08:16 FROGGS joined #perl6
08:16 FROGGS o/
08:20 hankache joined #perl6
08:22 timotimo it's quite strange that the current IO-Socket-INET test didn't catch this problem with nl-in not being a list, because it does look like it has a test specifically for that case
08:26 Cabanossi joined #perl6
08:34 timotimo aha
08:34 timotimo it doesn't explode if you get() once before you have set an nl-in
08:34 timotimo only if you create the socket, set the nl-in, and then get will it explode
08:35 hankache m: say "à;
08:35 camelia rakudo-moar a20908: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Unable to parse expression in double quotes; couldn't find final '"' ␤at <tmp>:1␤------> 3say "à;7⏏5<EOL>␤    expecting any of:␤        argument list␤        double quotes␤        term␤»
08:36 hankache m: say "à";
08:36 camelia rakudo-moar a20908: OUTPUT: «à␤»
08:41 LeCamarade joined #perl6
08:42 rindolf joined #perl6
08:44 hankache_ joined #perl6
08:48 Atomic_qm8UY joined #perl6
08:49 mr-foobar joined #perl6
08:56 Cabanossi joined #perl6
09:01 kent\n joined #perl6
09:03 hankache joined #perl6
09:04 hankache hello *
09:04 doks joined #perl6
09:05 hankache say "\n"
09:05 evalable6 hankache, rakudo-moar a2090821b: OUTPUT: «␤»
09:05 hankache m: say "\n"
09:05 camelia rakudo-moar a20908: OUTPUT: «␤␤»
09:06 hankache :( and another irc client bites the dust on Windows
09:17 kmel joined #perl6
09:17 kmel m: say "\n"
09:17 camelia rakudo-moar a20908: OUTPUT: «␤␤»
09:21 gdonald joined #perl6
09:32 rindolf joined #perl6
09:32 kyan_ joined #perl6
09:38 kyan_ joined #perl6
09:46 mr-fooba_ joined #perl6
09:54 ab5tract .tell lizmat Well, the failing test in t/spec/S03-operators/mix.t used to pass when I pushed it..
09:54 yoleaux ab5tract: I'll pass your message to lizmat.
09:56 lizmat .
09:56 yoleaux 09:54Z <ab5tract> lizmat: Well, the failing test in t/spec/S03-operators/mix.t used to pass when I pushed it..
09:56 lizmat ab5tract: that doesn't mean it is/was correct :-)
10:01 andrzejku joined #perl6
10:01 kyan_ joined #perl6
10:02 pecastro joined #perl6
10:03 ab5tract it was accepted as the behavior in the PR ...
10:10 ab5tract to be honest, I'm not sure what I'm supposed to do with changing a test that changes the behavior of this operator
10:10 ab5tract seems more the province of the person who changed the behavior/
10:10 ab5tract ?
10:12 ab5tract lizmat: https://github.com/rakudo/rakudo/pull/911#issuecomment-257941267
10:19 pecastro joined #perl6
10:22 kyan_ joined #perl6
10:23 ab5tract or even: https://github.com/rakudo/rakudo/pull/911#issuecomment-257932401
10:29 ab5tract hmmm... my mistake. It seems that this PR was reverted in the end.
10:30 ab5tract I had forgotten about that
10:31 ab5tract .tell lizmat here is the PR that was finally merged https://github.com/rakudo/rakudo/pull/934
10:31 yoleaux ab5tract: I'll pass your message to lizmat.
10:33 ab5tract and ab5tract-- for not following through on updating the documentation request from Zoffix
10:36 mr-foobar joined #perl6
10:41 lizmat .
10:41 yoleaux 10:31Z <ab5tract> lizmat: here is the PR that was finally merged https://github.com/rakudo/rakudo/pull/934
10:41 lizmat shit happens  :-)
10:42 ab5tract does that mean you will revert your behavioral changes?
10:42 ab5tract i promise to begin hacking on the documentation :)
10:43 Rawriful joined #perl6
10:44 lizmat ab5tract: I was away most of yesterday and will be distracted most of today and tomorrow
10:45 lizmat need some quality time to digest all that has happened there
10:45 lizmat so I think Sunday evening at the earliest
10:46 ab5tract ok, fair enough
10:47 ab5tract not a blocker for documentation, anyway
10:59 Geth ¦ ecosystem: 50c772e99f | loren++ (committed using GitHub Web editor) | META.list
10:59 Geth ¦ ecosystem: Add Getopt::Advance
10:59 Geth ¦ ecosystem:
10:59 Geth ¦ ecosystem: deprecate Getopt::Kinoko, use Getopt::Advance instead
10:59 Geth ¦ ecosystem: review: https://github.com/perl6/ecosystem/commit/50c772e99f
11:09 mr-foobar joined #perl6
11:11 tbrowder hi #perl6
11:11 llfourn o/ tbrowder
11:12 tbrowder o/ llfourn!
11:14 tbrowder i just noticed a new behavior and wonder if it's worth a fix: i'm in process of converting a p5 module to p6 and named it the same but with a pm6 extension instead of pm.
11:14 timotimo i sure hope retupmoca can apply my PR soon and toddandmargo gets what they need
11:15 llfourn timotimo++ # fixing Net::SMTP
11:15 tbrowder when i use it the p6 prog first find the pm version which causes a failure. couldn't perl6 favor pm6 over pm?
11:17 llfourn tbrowder: to me that sounds like some added complexity we don't need
11:18 tbrowder so renaming is the way to go in this case?
11:18 timotimo tbrowder: do you have a META file?
11:18 llfourn I'd say not having it in the same directory
11:18 timotimo if so, you should -I. instead of -Ilib and it will pick up what the provides section of the meta file has in it
11:19 * llfourn had no idea that was a thing
11:19 tbrowder no meta file, this is a more casual setup, renaming is easy
11:22 tbrowder ref rakudo build: i'm having some sucess in user build and root install but i get one funny write error when i'm root; i'll gist it in a while
11:23 timotimo looking at the code, it does try .pm6 first, and then .pm
11:23 timotimo oh, haha
11:23 timotimo it doesn't abort when it's found a match
11:23 timotimo so if all match, it'll give the last match only
11:24 timotimo fixed it
11:24 timotimo tbrowder: ^
11:25 ChoHag joined #perl6
11:25 llfourn timotimo++
11:26 tbrowder https://www.irccloud.com/pastebin/fUzFwQIK/
11:27 tbrowder note i renamed that file to .p6 instead of .pl
11:28 tbrowder error is funny because permissions on that perl6 dir are: drwxr-sr-x 12 tbrowde tbrowde
11:30 tbrowder i don't understand why, as root, that would cause a no-write. however, the offending line in the referenced file use $*CWD and i know that has had some changes lately
11:31 llfourn does it happen if you are browde?
11:33 moritz m: say (^0x1ffff).map(&chr).grep({ m/ \n / xor m/ \v /}).elems
11:33 camelia rakudo-moar e1e909: OUTPUT: «0␤»
11:33 moritz I'm a tad surprised that \v and \n end up matching exactly the same characters
11:33 tbrowder i'll try again, but i think the killer is it dies when it tries to create the instdir--going off to try it...
11:35 llfourn m: say so "\x[b]" ~~ /\v/
11:36 camelia rakudo-moar e1e909: OUTPUT: «True␤»
11:36 llfourn m: say so "\x[b]" ~~ /\n/
11:36 camelia rakudo-moar e1e909: OUTPUT: «True␤»
11:36 llfourn moritz: eh \n matches vertical tab?
11:37 mr-foobar joined #perl6
11:37 timotimo does \n match form feed?
11:37 llfourn m: say so "\x[c]" ~~ /\n/
11:37 camelia rakudo-moar e1e909: OUTPUT: «True␤»
11:37 llfourn (yes)
11:38 tbrowder yes, it makes it through that step. i have been trying to get the build harness to change the perms on the offending dirs but no luck yet. the default perms i think are set by the debian system (i think they may be new in jessie), so the build system will have to deal with it.
11:38 timotimo interesting
11:39 tbrowder a kludge would be to create the complete install dir structure as a first step
11:40 tbrowder with "ordinary" user perms
11:41 tbrowder for the acrual install-instdir target i'm using the system install command to create the instdir and copy the ./install dir contents to it.
11:47 tbrowder ...well i'm wrong about the default dir perms, trying to find where those perms come from...
11:55 moritz umask, most likely
12:05 mr-foobar joined #perl6
12:16 tbrowder i found that a r-s higher up in my dirs was causing the default r-s with mkdir. i changed that all the way down and that fixed the perms problem with mkdir.
12:17 tbrowder however, when root, i still get the error about cannot write!! $*CWD ??
12:19 tbrowder i'll go back to a vanilla nom and see how that works for me...see ya'll later
12:30 llfourn tbrowder: afaik root can usually write to anywhere :S
12:32 tbrowder correct--that's why i wonder about the $*CWD maybe doing one thing and reporting another??? or the script it's in???
12:32 tbrowder so far a real mystery
12:32 llfourn hmm maybe
12:33 tbrowder to me, that is
12:37 mr-foobar joined #perl6
12:41 Cabanossi joined #perl6
12:57 domidumont joined #perl6
13:02 mr-fooba_ joined #perl6
13:26 Cabanossi joined #perl6
13:28 pilne joined #perl6
13:44 moritz so "Perl 6 Fundamentals" has been through the production phase, and I'm proof-reading the result
13:44 moritz and their proof-reading platform has a somewhat erratic placement of index terms
13:44 moritz I have this sentence in there: "or one could read Unicode’s Technical Report 44 for the gory details"
13:45 BenGoldberg joined #perl6
13:45 moritz and it shows "gory" as the anchor term for "Unicode Technical Report 44" :-)
13:45 MasterDuke erratic? or nearly sentient?
13:46 timotimo nothing wrong to see there
13:48 moritz MasterDuke: that's the question here :-)
13:54 skids joined #perl6
13:56 Cabanossi joined #perl6
13:59 ptolemarch joined #perl6
14:01 ChoHag joined #perl6
14:29 kurahaupo joined #perl6
14:33 moritz also, pro tip: If you don't want to proof read so much text, write less!
14:34 llfourn .oO(if you don't want to maintain so much code, write less)
14:40 moritz (this is text, not code, but the same rules apply :-)
14:44 khw joined #perl6
14:56 Cabanossi joined #perl6
15:03 nickadlakha joined #perl6
15:08 AlexDaniel joined #perl6
15:10 freeze joined #perl6
15:16 mr-foobar joined #perl6
15:21 mdl joined #perl6
15:24 cdg joined #perl6
15:29 Atomic_qm8UY joined #perl6
15:30 konsolebox joined #perl6
15:30 mdl joined #perl6
15:31 mdl76 joined #perl6
15:36 Atomic_qm8UY joined #perl6
16:11 lucasb joined #perl6
16:25 kurahaupo_ joined #perl6
16:36 cdg_ joined #perl6
16:41 Cabanossi joined #perl6
16:45 |oLa| joined #perl6
16:54 skids joined #perl6
16:57 timotimo c: 2017.04.3 $*ERR.say: "1. this is an error"; $*OUT.say: "2. this is standard out"
16:57 timotimo commit: 2017.04.3 $*ERR.say: "1. this is an error"; $*OUT.say: "2. this is standard out"
16:58 timotimo not on line i see
17:00 MasterDuke timotimo: test bot running in #whateverable
17:00 timotimo ah
17:07 TreyHarris joined #perl6
17:13 araraloren joined #perl6
17:15 Zoffix .tell jdv79 I think your segv was due to unpacking in Proc::Async.new (discussed in https://irclog.perlgeek.de/perl6-dev/2017-07-08#i_14844751 ). I'm about to remove unpacking (mostly 'cause of 10x speed boost) and I think other devs are working on the actual fix too
17:15 yoleaux Zoffix: I'll pass your message to jdv79.
17:17 Resol joined #perl6
17:20 Resol Hi there!
17:20 Resol I'm trying to use DBIish to access the Postgres database
17:20 Zoffix \o
17:20 Resol The result of my execute is always DBIish: DBDish::Pg needs 'pq', not found
17:20 ChoHag joined #perl6
17:21 Zoffix "pq"? Are you sure it's not asking for "pg"?
17:21 Resol I've done a few searches for this error, and it seems to have shown up in some of the Toast testing, but I haven't sorted out a way around it so for
17:21 Resol er, far
17:22 Resol Yeah, that's a direct cut-n-past from my window
17:22 Resol This will be ugly, but here's the entire output from the run:
17:22 Resol C:\tools\fbdc>perl6 rugged-status.p6 DBIish: DBDish::Pg needs 'pq', not found   in block  at C:\rakudo\share\perl6\site\sources\F18EA8A0FD337C840672427703CC68 FA0720FEDF (DBIish) line 38   in any  at C:\rakudo\share\perl6\site\precomp\18598AE3617EC45C44E4BEB01DD0B51C 03A9498C.1493925935.62509\F1\F18EA8A0FD337C840672427703CC68FA0720FEDF line 1   in method setup at C:\rakudo\share\perl6\sources\24DD121B5B4774C04A7084827BFAD 92199756E03
17:23 Resol I'm running Rakudo version 2017.04.3 on Windows
17:24 Zoffix Do you have libpq.dll on your system?
17:24 Resol p6: use DBIish;
17:24 camelia rakudo-moar 80b3e8: OUTPUT: «===SORRY!===␤Could not find DBIish at line 1 in:␤    /home/camelia/.perl6␤    /home/camelia/rakudo-m-inst-1/share/perl6/site␤    /home/camelia/rakudo-m-inst-1/share/perl6/vendor␤    /home/camelia/rakudo-m-inst-1/share/perl6␤    CompUnit::Repo…»
17:24 Resol I guess I can't try to execute the connection here
17:25 Zoffix Seems it wants a PG lib and isn't finding it https://www.postgresql.org/docs/9.3/static/install-windows-libpq.html  https://stackoverflow.com/questions/38341725/how-to-install-libpq-dev-package-for-windows
17:25 Resol I'll have a look ... standby!
17:26 Cabanossi joined #perl6
17:27 Resol Yup, it's there, in bothc:\Program Files (x86)\PostgreSQL\9.4\bin and lib.  But I wonder now if that's on my path.
17:28 Resol It's not, so I suppose I need to have th elib directory in my path
17:30 Geth ¦ doc: eb8df0cde7 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Language/nativecall.pod6
17:30 Geth ¦ doc: Make it clearer code shows what NOT to do
17:30 Geth ¦ doc: review: https://github.com/perl6/doc/commit/eb8df0cde7
17:30 zengargoyle that DBIish error message could use a clue that 'pg' is libpq.so or libpq.dll or at leas 'a library'.
17:31 zengargoyle /pg/pq/
17:32 Zoffix No idea where NativeCall looks for libraries
17:32 Resol I tried adding the location to the libpq.dll to my path, but that didn't help.
17:33 Resol pgAdminIII works fine ... I installed everything using the system defaults.
17:33 zengargoyle does Windows have a 'LD_LIBRARY_PATH' like env variable?
17:33 bioexpress joined #perl6
17:34 Resol Doesn't look like it ... at least not on my installation ...
17:34 Geth ¦ DBIish: 2f35130e91 | (Zoffix Znet)++ (committed using GitHub Web editor) | README.pod
17:34 Geth ¦ DBIish: panda's ded
17:34 Geth ¦ DBIish: review: https://github.com/perl6/DBIish/commit/2f35130e91
17:35 zengargoyle it could maybe be possible that DBIish is loading a different library that itself requires 'pq'.  so like maybe NativeCall is finding the first library and that library is not finding the 'pq' library....
17:35 Resol Boy I had shared libraries ... back in the good old days when memory was limited and expensive sure, but now, it's always something that doesn't work ...
17:35 * zengargoyle doesn't really do windows, just thinking out loud.
17:36 Resol I always seem to run into these load path, location issues ... never seems to "just work" ... sigh ... I'm done ranting now.
17:37 zengargoyle Resol: i get ya. :)  last $WORK put every program/library into it's own directory so futzing with LD_LIBRARY_PATH and wrappers and OMG HELL was the norm.
17:38 Resol Yeah, more than half the battle is getting things set up right!
17:40 Zoffix dunno, seems like adding the dir to PATH should've worked
17:40 Zoffix Did you restart your "command prompt" so it'd see the change?
17:42 Resol Yes, I did ... and verified that the directories are in the %path%
17:43 Zoffix *shrug* No clue, sorry.
17:43 Zoffix Resol: if you figure it out, can you post the steps to make it work as an Issue on https://github.com/perl6/DBIish/issues/new ? This is really something that should be added to install instructions.
17:43 Resol C:\Users\AD-Msanders>echo %path% C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\Sy stem32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Python26;C:\rakudo\bi n;C:\rakudo\share\perl6\site\bin;C:\Program Files (x86)\PostgreSQL\9.4\bin;C:\Pr ogram Files (x86)\PostgreSQL\9.4\lib
17:44 Resol Yes, If I figure it out, I'll certainly do it ...
17:45 Resol (The formatting of the pasted echo results are off, there's not actually any spaces there)
17:45 Resol Windows does know how to "find" the lib:
17:46 Resol :\Users\AD-Msanders>where libpq.dll :\Program Files (x86)\PostgreSQL\9.4\bin\libpq.dll :\Program Files (x86)\PostgreSQL\9.4\lib\libpq.dll  :\Users\AD-Msanders>
17:51 |oLa| joined #perl6
17:51 zengargoyle does windows have a 'ldd' like command?  it could also be that 'pq' needs another library that 'psql' or other postgresql programs can find and work but p6 can't.
17:51 zengargoyle my libpq has 27 libraries it uses....
17:51 mingdao joined #perl6
17:53 Resol So how do you "find" where things are in Perl6.
17:53 Zoffix What sort of things?
17:54 Resol In Unit module DBDish::Pg::Native I see a line:
17:54 Resol constant LIB = NativeLibs::Searcher.at-runtime('pq', 'PQstatus', 5);
17:54 zengargoyle were it linux.... i'd write a little p6 script that shells/runs the `ldd /path/to/libpq.dll`  and inspect the output to see if all libraries get resolved correctly.
17:54 Zoffix constant, eh?
17:54 Resol I'd like to have a look at NativeLibs::Searcher
17:54 Zoffix Resol: can you try re-installing the module? zef --force install DBIish
17:54 Resol But for the life of me, these crazy long, non-intuitive directory names that seem to store modules is baffeling
17:55 Zoffix constants are compile time, so that value won't ever change anymore
17:55 Resol Sure ..
17:55 Resol That's a grand idea
17:55 zengargoyle oh hahaha.
17:56 Cabanossi joined #perl6
17:56 Zoffix Resol: as for crazy directory names. The modules are actually precompiled and stored as bytecode. I *think* source is also kept somewhere, but it's not used, as in, if you change it, the behaviour of the module won't change.
17:56 Resol And it continues :
17:56 Resol So, I guess I can't do an install without git?
17:57 Resol C:\tools\fbdc>zef --force install DBIish ===> Searching for: DBIish Enabled fetching backends [path pswebrequest] don't understand git://github.com/ perl6/DBIish.git You may need to configure one of the following backends, or install its underlyi ng software - [git wget curl]   in method fetch at C:\rakudo\share\perl6\site\sources\A48CF21F42885E27DBC7EBC4 927226101DEAD45B (Zef::Fetch) line 12   in code  at C:\rakudo\share\perl6\site\
17:57 Zoffix Resol: zef --force install https://github.com/perl6/DBIish/archive/master.zip
17:57 Zoffix Resol: you can, if you give it non-git source
17:57 Zoffix And the source for the Searcher is here: https://github.com/perl6/DBIish/blob/master/lib/NativeLibs.pm6#L57
17:58 Resol Forgive me for being dense, but I'm not understanding this ...
17:58 Resol I've tried both of your suggested zef --force commands, neither work.
17:59 Zoffix Resol: how does the second one fail? The one with the URL to a zip?
18:00 Resol C:\tools\fbdc>zef --force install https://github.com/perl6/DBIish/archive/master .zip No extracting backend available   in method extract at C:\rakudo\share\perl6\site\sources\26BEE6DE3D8587782D7BFB CA96F730387710091D (Zef::Extract) line 8   in code  at C:\rakudo\share\perl6\site\sources\4B1D5A60B59D9541E13F76E0E2A2D55 0E0144053 (Zef::Client) line 239   in method extract at C:\rakudo\share\perl6\site\sources\4B1D5A60B59D9541E13F76 E0
18:00 Resol So it's complaining about no extracting backend available
18:00 Zoffix That space in "master .zip" is not actually there, is it?
18:01 Resol right, the space isn't there ...
18:01 skf joined #perl6
18:01 Resol I'm running Perl on a remote machine that I'm connected to via RDP, and then I have to use Windows command prompt Mark / Copy ...
18:01 Zoffix weird. I get the same error :o
18:02 zengargoyle download the .zip, unzip it, cd into the directory and 'zef --force install .'
18:02 geekosaur mrhm. doesn't apply here but it looks to me like the lib-prefix fallback never tries versions
18:02 Resol It's a little Rube Goldberg, but it's the way I have to do it to deal with corporate Information Security
18:02 Resol Okay, I'll try that
18:03 Zoffix hm, yeah, zef looks for `unzip` which isn't there on Windows. Wonder what the command name is
18:04 lizmat .oO( pkunzip :-)
18:04 * zengargoyle would probably 'zef uninsatall DBIish' and then check to make sure.  there are ways to get a module installed in two different places depending on how much you muck with thing. :)
18:04 Zoffix C:\Users\zoffi>pkunzip                                                                                                  'pkunzip' is not recognized as an internal or external command,                                                         operable program or batch file.
18:05 Resol C:\Users\AD-Msanders\Downloads\DBIish-master>zef --force install . No meta file? Path: .   in method new at C:\rakudo\share\perl6\site\sources\D2D7BE27C4415C0CA56E7907E1 8AF2E002594255 (Zef::Distribution::Local) line 12   in sub MAIN at C:\rakudo\share\perl6\site\sources\09969B10D9F270B8DBAAB9961FA7 E6CDB8AD58C9 (Zef::CLI) line 93   in block <unit> at C:\rakudo\share\perl6\site\resources\8E4CA8253915139305439E F9E20B7FC58E97260C line
18:05 Zoffix oh boy :)
18:05 Zoffix Resol must be the unluckiest Perl 6 user of the day :)
18:05 lizmat https://en.wikipedia.org/wiki/PKZIP   # Zoffix
18:05 Resol Why do you think I picked that nickname (it's best read backwards!)
18:06 Resol :-)
18:06 Zoffix heh
18:06 Resol It's a real shame ...
18:06 Resol this was a fresh install of Rakudo ...
18:07 Resol I have a really simply little thing to do ... suck some events out of an event log, and summarize them ...
18:07 Zoffix Yeah, but someone dropped the ball with testing releases on Windows.
18:07 Resol figured Perl6 would be a snap to do this ...
18:07 Resol What's that old saying about the best laid plans? ;-)
18:08 zengargoyle hrm, that zip *does* have a META6.json file...
18:08 Resol Yeah, I can see it there ...
18:10 Resol Okay so for whatever reason, doing the zef uninstall first allowed the zef --force install to work ...
18:10 zengargoyle try without the --force?
18:10 Zoffix Resol: well, I don't have good solutions for you. One of them involves building Rakudo from source. You'll need git and tools (like the stuff that comes with Strawberry Perl 5), but as I've said the Rakudo's release manager dropped the ball and wasn't testing properly on Windows, so I can't guarantee latest Rakudo works fine on Windows. The other alternative is to install older Rakudo Star (2017.01
18:10 Zoffix http://rakudo.org/downloads/star/ ), but that was before IO refactor and I can't guarantee zef and some more modern modules still work with it
18:10 zengargoyle ... or .... uninstall first. :P
18:10 Zoffix huggable: star
18:10 huggable Zoffix, Estimated Rakudo Star releases for 2017: .01, .04, .07 & .10
18:11 Zoffix The third option is to wait a few weeks until Rakudo Star 07 :P
18:11 Resol interesting ... so when the install runs, the pq isn't found:
18:11 ChoHag joined #perl6
18:11 Resol Here are some of the output from it:
18:11 Resol # DBIish: DBDish::mysql needs 'mysql', not found # Can't continue. t\27-mysql-datetime.t ..... ok t\30-pg.t ................. ok # DBIish: DBDish::Pg needs 'pq', not found # Can't continue. t\34-pg-types.t ........... ok # Testing DBDish::Pg t\35-pg-common.t ..........1/107# DBIish: DBDish::Pg needs 'pq', not found # Can't continue. t\35-pg-common.t .......... ok # DBIish: DBDish::Pg needs 'pq', not found # Can't continue. t\36-pg-ar
18:11 Zoffix :(
18:11 Zoffix Sucks
18:11 Resol So the testing is doing the same thing as my little program ...
18:11 Resol So I'm back to not being able to locate that library I guess
18:12 Zoffix OK. Good.
18:12 Resol I just need to coerce Windows into finding the library ...
18:12 Zoffix Fails on my box too "# DBIish: DBDish::Pg needs 'pq', not found" gonna poke at a bit
18:12 Resol and that seems to be in NativeCall right?
18:12 zengargoyle find where libraries normally go and copy all the PG related .dll's there.
18:12 Resol So I look through that source you provided the link to, and I might get lucky?
18:12 Zoffix Resol: yeah. Though I don't see what the paths it looks in for libraries are: https://github.com/rakudo/rakudo/blob/nom/lib/NativeCall.pm6
18:13 zengargoyle it probably uses the system's DLL loader (like ld.so on linux) so the paths aren't in p6 or NativeCall.
18:14 Resol So, on Windows I imagine that's going to be registry setting or something then
18:14 Zoffix Says it looks in PATH too: https://docs.microsoft.com/en-us/cpp/build/search-path-used-by-windows-to-locate-a-dll
18:14 Resol The output of set which shows all the environment variables doesn't yield anything that looks like a library path
18:14 zengargoyle you could maybe place them under master/resources/something and install the dll's into the CUR, but it'd take some "i don't know windows"....
18:15 Resol Hmmm ... and I have the path pointing to both the PostgreSQL lib and bin directories, where the libpq.dll is
18:16 zengargoyle does windows stil have a registry?  if you haven't already set an env variable to override the defaults, there won't be an env variable to be seen by set.
18:16 Zoffix hehe, DBIish currently has 666 commits :)
18:16 Resol Chuckle ...
18:16 Resol The devil is in the details I guess
18:17 zengargoyle isn't ....\system32\ where DLL's are normally found?
18:17 bioexpress joined #perl6
18:18 geekosaur I think windows smacks your fingers if you try to put userspace dlls there
18:19 geekosaur these days
18:19 zengargoyle ah, must admit, i haven't windows'd in ages.
18:20 travis-ci joined #perl6
18:20 travis-ci Doc build errored. Zoffix Znet 'Make it clearer code shows what NOT to do'
18:20 travis-ci https://travis-ci.org/perl6/doc/builds/251527375 https://github.com/perl6/doc/compare/6ffd299f1d17...eb8df0cde7df
18:20 travis-ci left #perl6
18:20 buggable [travis build above] ✓ All failures are due to timeout (1), missing build log (0), GitHub connectivity (0), or failed make test (0).
18:21 Resol Unfortunately I don't have any other options besides Windows
18:21 geekosaur apps dumping their dlls in there was a major support nightmare for microsoft; as of win7 you need LSA to put stuff there and iirc the shell at least still warns you
18:21 geekosaur ("the shell" in windows parlance being the gui, so maybe not if you do it from cmd.exe)
18:21 * zengargoyle elaborates.. as in there was that one $WORK thing that requred WINE and some google sleuthing and questionable downloading of .dll's to get working. :)
18:25 cdg joined #perl6
18:26 bioexpress Hello, is this code https://gist.github.com/kuerbis/54bd232ecbdc4d90e1684a3b87a26911 OK?  There are some code points, which return the same charakter, but i suppose the such a charakter has always the same width.
18:28 Zoffix bioexpress: %cache.EXISTS-KEY( char ) is typically written as %cash{char}:exists %cache.BIND-KEY( char, wcwidth($_) ) is usually written as %cache{char} = wcwidth $_; %cache.AT-KEY( char ); is usually written as %cash{char}.
18:29 bioexpress Zoffix: I thought %cache.EXISTS-KEY( char ) is faster.
18:29 Zoffix And $res = $res +  is usually written as $res +=
18:29 gdonald joined #perl6
18:29 Zoffix bioexpress: premature optimization is the root of all evil
18:31 Zoffix You're writing awkward code on mere assumption that X is faster than Y and will definitely make your program faster when your bottleneck is likely elsewhere
18:31 bioexpress But is it bad to use EXISTS-KEY?  It is mentioned in the documentation.
18:31 Resol So it looks like Search.try-versions calls $*VM.platform-library-name()
18:31 Resol So I need to search for that, and see how it is being called
18:32 Zoffix s: $*VM, 'platform-library-name', \()
18:32 SourceBaby Zoffix, Something's wrong: ␤ERR: Could not find candidate that can do \()␤  in sub sourcery at /home/zoffix/services/lib/CoreHackers-Sourcery/lib/CoreHackers/Sourcery.pm6 (CoreHackers::Sourcery) line 29␤  in block <unit> at -e line 6␤␤
18:32 Zoffix s: $*VM, 'platform-library-name'
18:32 SourceBaby Zoffix, Sauce is at https://github.com/rakudo/rakudo/blob/05c255c/src/core/VM.pm#L44
18:33 Resol $*VM is a reference to the Rakudo star VM right?
18:33 Resol So basically it's the place that should be interfacing to the Windows system?
18:40 skf Newbie question. What does the line 'unit module modulname' in a module mean?
18:41 geekosaur means the whole file is the module. instead of having to wrap the whole thing in module modulename { ... }
18:41 cpage_ joined #perl6
18:42 skf Aha, thanks!
18:43 Atomic_qm8UY joined #perl6
18:45 Zoffix Resol: looks like the issue isn't with it failing to find lib but with it trying to load a symbol.
18:45 Resol Going back to the beginning ... how did we decided that it was libpq.dll that DBIish was looking for?
18:46 labster joined #perl6
18:46 Resol Since I know that that is in the PATH, perhaps it's looking for something else?  I've not been able to follow the thread to find the code that has libpq.dll in it
18:46 Resol Zoffix: sorry, I typed over you
18:49 * Zoffix wipes the type prints off the shirt
18:53 Resol Do you say that it's having touble with th esysmbol because the stack trace ends with "in block <unit> at <unknown file> line 1?
18:55 Zoffix It goes to call NativeCall's cglobal with "libpq.dll", "PQstatus", Pointer and gets Any in return.
18:55 geekosaur ...what?
18:55 Zoffix and it wants a Pointer in return
18:58 Zoffix hm, nm, it does fail to find the library
18:58 Zoffix C:\Temp\DBIish>perl6 -MNativeCall -e "dd cglobal 'libpq.dll', 'PQstatus', Pointer"
18:58 Zoffix Cannot locate native library 'libpq.dll': error 0x7e
19:03 Resol Okay, so at least for sure it's looking for libpq.dll and not finding it
19:03 Resol So that means it's not using my PATH env variable ...
19:06 * Zoffix digs into nqp/MoarVM source to see where it's looking for libs
19:07 rindolf Zoffix: meow!
19:07 rindolf Zoffix: sup?
19:07 Resol I also tried moving the .dlls to the current working directory and my "home" directory since Windows says it looks in those places, but that didn't help.
19:08 cdg joined #perl6
19:08 Zoffix rindolf: \o
19:09 rindolf Zoffix: sup?
19:10 Zoffix nothing
19:11 Zoffix Is Windows using dyncall?
19:11 mst rindolf: if people have already responded politely to your lame attempt at trapping them into a conversation, repeating it is a violation of human social norms
19:11 MasterDuke i don't know anything about this particular tool (or have a windows machine to test on), but maybe this will help? http://www.drmemory.org/strace_for_windows.html
19:12 Resol Dunno ... way above my pay grade ...
19:12 MasterDuke or the sysinternals procmon tool
19:13 Resol So here's a question ...
19:13 Resol did this ever work?
19:14 Resol On windows that is?
19:14 Resol If so, it might be possible to see what's changed ...
19:14 Resol But if it's never worked, well, then I guess that idea would be out
19:15 rindolf left #perl6
19:15 geekosaur that was the point of zoffix's earliier snark about testing on windows
19:16 Resol Okay, right ... I guess I missed that.
19:16 Resol Maybe I can find a way to export the PostgreSQL tables inot sqlite3 and then use DBIish with sqlite3 ...
19:17 Zoffix Snark?
19:22 Zoffix Do we use nativecall or libffi on Windows?
19:22 Zoffix I can't figure out which MVM_nativecall_load_lib ends up being
19:23 Zoffix C:\Temp\DBIish>perl6 -MNativeCall -e "sub PQstatus () is native('C:\Program Files\PostgreSQL\9.6\lib\libpq.dll') {}; PQstatus"
19:23 Zoffix Cannot locate native library 'C:\Program Files\PostgreSQL\9.6\lib\libpq.dll': error 0x7e
19:25 Zoffix 0x7e is "The specified module could not be found."... What module? :/
19:25 Resol Hmmm ... odd, since you passed the whole path to native ...
19:25 Zoffix Yeah.
19:26 FROGGS you're talking about libffi vs dyncall
19:26 Zoffix Well, the "cannot locate" is not exactly accurate. That message is printed when MVM_nativecall_load_lib errors out, regardless of the reason
19:26 FROGGS and we use dyncall I think
19:26 Zoffix FROGGS: yeah, dyncall
19:26 Zoffix OK. Then yeah, the above should "find" the lib. 'cause the path is just passed to dlLoadLibrary()
19:26 Zoffix It errors out for some other reason
19:27 * Zoffix gives up
19:27 FROGGS hmmm
19:27 FROGGS Zoffix: what if you chdir to its directory and use the dll name without the path?
19:28 Zoffix FROGGS: tried that. Same error
19:29 Zoffix Opened an Issue on DBIish: https://github.com/perl6/DBIish/issues/95
19:29 Zoffix C:\Program Files\PostgreSQL\9.6\lib>perl6 -MNativeCall -e "sub PQstatus () is native('libpq.dll') {}; PQstatus"
19:29 Zoffix Cannot locate native library 'libpq.dll': error 0x7e
19:30 Zoffix C:\Program Files\PostgreSQL\9.6\lib>dir libpq.dll [...] 06/05/2017  07:07 AM           183,296 libpq.dll
19:30 Zoffix I'm guessing libpq.dll has something in it that dyncall don't like
19:31 FROGGS unlikely I'd say
19:31 FROGGS there is nothing to like in such a dll
19:32 Resol I get a slightly different error than you do ...
19:33 Resol when I execute that, it says : Cannot locate native library 'libpq.dll': error 0xc1
19:33 Zoffix That code is "%1 is not a valid Win32 application."
19:33 Resol I wonder what that error code is referring to?
19:33 jdv79 Zoffix: yeah, that fixed the new conc bug
19:33 yoleaux 17:15Z <Zoffix> jdv79: I think your segv was due to unpacking in Proc::Async.new (discussed in https://irclog.perlgeek.de/perl6-dev/2017-07-08#i_14844751 ). I'm about to remove unpacking (mostly 'cause of 10x speed boost) and I think other devs are working on the actual fix too
19:33 Zoffix \o/
19:34 Zoffix Sweet
19:34 jdv79 but now i'm still up against another one from 5 months ago:(
19:34 jdv79 haha
19:34 Zoffix :)
19:34 jdv79 https://rt.perl.org/Ticket/Display.html?id=130690
19:34 jdv79 good times
19:35 jdv79 2 steps backwards 1 step forwards?
19:35 jdv79 thanks
19:35 ugjka joined #perl6
19:36 geekosaur sounds like programming :p
19:36 jdv79 the old one seems to happen a lot less so maybe it won't block me
19:43 andrzejku joined #perl6
19:45 Sgeo joined #perl6
19:46 Resol Do you know of any other modules that use NativeCall and a .dll?  Maybe I could try another one, and see if the error is the same?
19:48 MasterDuke https://github.com/Skarsnik/perl6-gumbo maybe does
19:48 Resol Thanks ... I'll take a peek at that
19:49 BenGoldberg joined #perl6
19:52 cdg joined #perl6
19:52 Zoffix Is sixfix author still around?
19:53 MasterDuke greppable6: \.dll
19:53 greppable6 MasterDuke, Sorry, can't do that
19:53 MasterDuke greppable6: .dll
19:53 greppable6 MasterDuke, Sorry, can't do that
19:53 Zoffix The Day 2 answer page has a bug. ""Life, the Universe, and Everything".WHY" <--- we no longer have the second comma there
19:53 espadrine_ joined #perl6
19:53 TEttinger joined #perl6
19:53 MasterDuke greppable6: dll
19:53 greppable6 MasterDuke, Sorry, can't do that
19:54 * Zoffix sent to an email on the site
19:55 AlexDaniel MasterDuke: why can't it?
19:55 Resol Sigh ... running on Windows is kind of a PITA for this.
19:56 Resol I download gumbo, and install, but it needs XML.
19:56 Zoffix Get VirtualBox and run a linux VM in it?
19:56 Resol So I download XML and try to install, but it fails some tests ... a repo.lock operation isn't permitted
19:57 Zoffix That's what I'm doing ATM. Host Win10 and Bodhi Linux in Virtual Box
19:57 Resol The problem is that I have to run all of this on a server that's running Windows.
19:57 * AlexDaniel slaps greppable6
19:57 Resol Due to firewalls, etc. etc. etc. I can't just do this on my Mac and access the database remotely.
19:58 mst AlexDaniel: btw, we *can* do I-lines but if you can get extra IPs that's probably simpler
19:58 Resol It's got to be a local access ...
19:58 mst Resol: this is the point at which I set up a bunch of ssh tunnels
19:58 Zoffix Or just merge features into fewer bots :)
19:58 mst and hope the network admins don't spot what I've done
19:58 AlexDaniel mst: I-lines?
19:58 Resol How do yo uget Windows to allow you to set up tunnels?
19:58 Resol putty?
19:59 mst I do it with the standard openssh stuff
19:59 Resol I *might* be able to do that ...
19:59 mst but that's because I run cygwin on all my windows machines
19:59 mst because screw not having a command line
19:59 Resol I think though, that the firewalls are set up to only allow Remote Desktop Protocol access to the sever ...
19:59 Resol Ah, yes ...
19:59 Resol well, I probably can't get cygwin installed :-(
20:00 Resol It's a Windows Server 2012 box ...
20:00 mst looks like https://www.skyverge.com/blog/how-to-set-up-an-ssh-tunnel-with-putty/ is doable
20:00 mst I've just never done it
20:01 Resol Thanks, I'll look at that and see about setting it up to use the RDP ports
20:02 committable6 joined #perl6
20:02 greppable6 joined #perl6
20:02 Resol Still, even if I get it running on my Mac, the corporate standard is Windows, so even if I'm successful, I won't be able to hand over the tools to anyone else.
20:02 Resol Sigh ...
20:02 Resol Still, a good way to try a proof of concept though
20:04 committable6 joined #perl6
20:07 El_Che Resol: ssh tunneling with putty works fine
20:07 El_Che Resol: as does SOCKS proxy
20:10 Geth ¦ whateverable: 2513807d70 | (Aleks-Daniel Jakimenko-Aleksejev)++ | Greppable.p6
20:10 Geth ¦ whateverable: Oops
20:10 Geth ¦ whateverable:
20:10 Geth ¦ whateverable: Not sure how it worked at all, but this is how it should be.
20:10 Geth ¦ whateverable: review: https://github.com/perl6/whateverable/commit/2513807d70
20:11 Geth ¦ whateverable: fa442f1c52 | (Aleks-Daniel Jakimenko-Aleksejev)++ | Greppable.p6
20:11 Geth ¦ whateverable: Oops №2
20:11 Geth ¦ whateverable:
20:11 Geth ¦ whateverable: That was the wrong fix… this is the right one.
20:11 Geth ¦ whateverable: review: https://github.com/perl6/whateverable/commit/fa442f1c52
20:12 greppable6 joined #perl6
20:12 AlexDaniel greppable6: \.dll
20:12 greppable6 AlexDaniel, https://gist.github.com/238f86ba2879886eff133397c586b295
20:12 AlexDaniel MasterDuke: ↑ \o/
20:14 MasterDuke Resol: ^^^ modules that probably use dlls
20:25 walfisch joined #perl6
20:28 kybr how would you go about correcting spelling and grammar on docs.perl6.org?
20:29 moritz kybr: tell me your github username, and I can give you direct push access
20:29 moritz kybr: then you can just edit the source files and push them to github
20:29 kybr it's kybr. thanks
20:30 moritz kybr: invitation sent. Go wild, and have fun!
20:30 kybr ha! thanks.
20:41 Cabanossi joined #perl6
20:42 Zoffix Tip: You can use github's web editor to make changes without messing with checkouts and pushes. Just click the pencil icon in top right of the page you want to edit https://github.com/perl6/doc/edit/master/doc/404.pod6
20:50 El_Che hi Zoffix, how has been the response so far of your latest post?
21:02 Zoffix El_Che: 100% positive from outside the Rakudo community. Within, I'd say overall it's been positive. The non-yes voices mostly say it's impossible to change the name. Some say the name doesn't matter. And a few say the change would be negative (by citing past Google search result). Importantly, I've not heard any reasons for why the current name is *beneficial*
21:02 wigner1 joined #perl6
21:04 Zoffix And the biggest challenge from the comments I see is many people think a name is something you just type when you want to talk about the thing. They don't make the connection that the name carries a lot of perceptions with it.
21:07 Zoffix In my notes I'm preparing, currently word "concise" shows up to be a good concept to base Rakudo on. "Concise is not code golf. Concise is working smarter, not harder. Concise is having shorter programs because you don't need to do a lot. Concise occurs naturally in Rakudo. Concise is readable. Concise is smart. Concise is writing a program in 5 hours instead of 10"
21:07 Zoffix But Perl cannot be "concise". Because Perl's idea of "concise" is line-noise and code golf.
21:10 Zoffix And since we're on a subject. A quote from my $work's marketing book I'm currently re-reading: "The way for the leader to maintain its dominance is to address each emerging category with a different brand name [...] Companies make a mistake when they try to take a well-known brand name in one category and use the same brand name in another category"
21:11 Zoffix With a following example of Volkswagen having 67% market share when they had their Beetle which shrunk to 4% once they trying to use the brand of "small and ugly" to sell cars of all types.
21:11 Zoffix Sounds a lot like the story of Perl
21:14 espadrine joined #perl6
21:26 vendethiel joined #perl6
21:40 seatek joined #perl6
21:41 Cabanossi joined #perl6
21:55 stmuk joined #perl6
22:00 stmuk_ joined #perl6
22:04 vendethiel m: ^3 .map: {say $_}; 1
22:04 camelia rakudo-moar 05c255: OUTPUT: «WARNINGS for <tmp>:␤Useless use of constant integer 1 in sink context (line 1)␤0␤1␤2␤»
22:11 BenGoldberg joined #perl6
22:12 El_Che Zoffix: I have explained the difference between perl 5 and 6 quite a few times. People outside the Perl 5 and 6 world seem to nod politely  and keep thinking what they did before
22:14 Juerd El_Che: I have the same experience...
22:15 Zoffix Resol: add C:\Program Files\PostgreSQL\9.6\bin to PATH
22:15 Zoffix Resol: well, the bin of your postgress install
22:18 Zoffix Resol: Hm. I see you had it above in "C:\Program Files (x86)\PostgreSQL\9.4\bin". Is that the actual path? I have 9.6 pg and I used the 64-bit so on my box it's in "Program Files" (without (x86)) and once I added the bin\ to path, DBIish started being happy
22:19 Zoffix Well, happy enough for its test to tell me it can't connect without a password, but I assume it works as addvertized
22:19 geekosaur could that then be a 32 vs. 64 issue?
22:20 dogbert17 probably
22:20 Zoffix maybe. Resol was also getting a different error code than me
22:20 geekosaur windows does not handle 32 bit the same way as linux, in particular if you install a 32 bit package on a 64 bit windows it will run it in a 32-bit container
22:20 dogbert17 and it will end up in the (x86) directory
22:20 geekosaur and it's entirely possible that trying to load a 32-bit dll in a 64-bit process will fail
22:21 ChoHag joined #perl6
22:22 Zoffix El_Che: "what they did before" meaning thinking something negative?
22:25 geekosaur yep, can't load a 32-bit DLL in 64-bit code https://support.microsoft.com/en-us/help/282423/list-of-limitations-in-64-bit-windows
22:25 Zoffix Aha
22:26 geekosaur .tell Resol can't load 32 bit DLLs in 64 bit code https://support.microsoft.com/en-us/help/282423/list-of-limitations-in-64-bit-windows so find a 64 bit build of postgresql / libpq.dll
22:26 yoleaux geekosaur: I'll pass your message to Resol.
22:27 geekosaur should probably be documented as a Windows limitation for NativeCall
22:30 El_Che Zoffix: sorry tablet. Some like perl5 but see it more as useful old school, ohers think perl 6 is,the,new version.
22:31 El_Che Zoffix: remember, I am talking about people not in touch with the perl 5/6 ecosystem
22:31 Zoffix Yeah
22:36 unicodable6 joined #perl6
22:36 bisectable6 joined #perl6
22:36 evalable6 joined #perl6
22:36 greppable6 joined #perl6
22:36 committable6 joined #perl6
22:36 bloatable6 joined #perl6
22:36 quotable6 joined #perl6
22:36 coverable6 joined #perl6
22:36 benchable6 joined #perl6
22:36 statisfiable6 joined #perl6
22:45 dogbert17 bisect: my $f = "\x1F466\x1F3FE"; say $f.chars()
22:45 bisectable6 dogbert17, Bisecting by output (old=2015.12 new=05c255c) because on both starting points the exit code is 0
22:45 bisectable6 dogbert17, bisect log: https://gist.github.com/1ca5b039e9a9900a07debb21c68a4277
22:45 bisectable6 dogbert17, (2017-01-02) https://github.com/rakudo/rakudo/commit/7c8b705b3375522fc36304b771f82f50246afcf0
22:46 Resol joined #perl6
22:48 Resol joined #perl6
22:53 Resol Sorry, got dropped of there.
22:53 yoleaux 22:26Z <geekosaur> Resol: can't load 32 bit DLLs in 64 bit code https://support.microsoft.com/en-us/help/282423/list-of-limitations-in-64-bit-windows so find a 64 bit build of postgresql / libpq.dll
22:53 Resol So, I see that I can't load 32-bit DLLs in 64-bit code.
22:54 Resol And Rakudo Star will be 64-bit, but my install of PostgreSQL is 32-bit
22:55 MasterDuke can you get a 64-bit version of PostgreSQL?
22:55 Resol Perhaps ...
22:55 Resol I bet I can get one and then run it in a sandbox ...
22:56 Resol The current version of PostgreSQL that I'm using comes "bundled" with a network management application I'm using.
22:56 Resol Funny, it's just been upgraded to the latest / greatest version ...
22:56 MasterDuke there's a 32-bit version of rakudo star, but it's a 1.5 years old
22:56 Resol Woulda thought they'd go 64-bit ... but well, commercial applications I guess
22:58 mattp_ joined #perl6
23:00 Resol Just for laughs, I'm opening a trouble ticket with the vendor and asking them if I can upgrdae to 64-bit PostgreSQL ...
23:00 Resol That oughta be good for a laugh when I get into the office on Mondya morning ;-)
23:01 gdonald joined #perl6
23:09 Resol By the way, I really appreciat eall of the help that everyone here provided!
23:16 Zoffix Any time
23:32 BenGoldberg m: sub foo($bar) is pure { print $bar }; foo(Bool.pick) for ^3;
23:32 camelia rakudo-moar 05c255: OUTPUT: «WARNINGS for <tmp>:␤Useless use of "foo(Bool.pick)" in expression "foo(Bool.pick)" in sink context (line 1)␤FalseTrueTrue»
23:33 BenGoldberg m: sub foo($bar) is pure { print $bar }; constant A = foo(Bool.pick); constant B = foo(Bool.pick); constant C = foo(Bool.pick);
23:33 camelia rakudo-moar 05c255: OUTPUT: «TrueFalseFalse»
23:33 BenGoldberg m: sub foo($bar) is pure { print $bar }; constant A = foo(True); constant B = foo(True); constant C = foo(True);
23:33 camelia rakudo-moar 05c255: OUTPUT: «TrueTrueTrueTrueTrueTrue»
23:34 BenGoldberg m: sub foo($bar) is pure { print $bar }; constant A = foo(42); constant B = foo(42); constant C = foo(42);
23:34 camelia rakudo-moar 05c255: OUTPUT: «424242424242»
23:36 BenGoldberg m: sub foo($bar) { print $bar }; constant A = foo(42); constant B = foo(42); constant C = foo(42);
23:37 camelia rakudo-moar 05c255: OUTPUT: «424242»
23:37 BenGoldberg I know that 'is pure' isn't the same as 'is cached', but
23:37 BenGoldberg , but I think it's really bizzare that it calls the sub twice as often.
23:41 ugexe m: my $x = 0; sub foo() is pure { ++$x }; say foo(); say foo(); say $x
23:41 camelia rakudo-moar 05c255: OUTPUT: «1␤2␤0␤»
23:42 timotimo "is pure" subs may be evaluated at compile time
23:42 timotimo m: sub foo($a) { $a + 10 }; say foo(9); BEGIN { say "compile time ends here" }
23:42 camelia rakudo-moar 05c255: OUTPUT: «compile time ends here␤19␤»
23:42 timotimo m: sub foo($a) is pure { $a + 10 }; say foo(9); BEGIN { say "compile time ends here" }
23:42 camelia rakudo-moar 05c255: OUTPUT: «compile time ends here␤19␤»
23:43 timotimo oh, hah
23:43 timotimo of course that makes no difference
23:43 timotimo m: sub foo($a) is pure { say "foo evaluated"; $a + 10 }; say foo(9); BEGIN { say "compile time ends here" }
23:43 camelia rakudo-moar 05c255: OUTPUT: «compile time ends here␤foo evaluated␤19␤»
23:43 timotimo okay.
23:43 timotimo it's no guarantee anyway
23:43 Zoffix m: sub foo($bar) is pure { say $bar }; constant $x = foo 42; BEGIN say "compile time ends here"
23:43 camelia rakudo-moar 05c255: OUTPUT: «42␤compile time ends here␤42␤»
23:43 Zoffix It gets evaluated during constant folding and then gets run at runtime
23:48 Zoffix hm
23:48 Zoffix If you turn optimizer off, it prints "42␤compile time ends here"
23:54 timotimo constant is always at BEGIN time
23:54 timotimo m: constant x = say "hi"; BEGIN say "compile time ends here"
23:54 camelia rakudo-moar 05c255: OUTPUT: «hi␤compile time ends here␤»
23:55 timotimo ^- see this example
23:55 timotimo constants therefor also get baked into precompiled code
23:56 Cabanossi joined #perl6

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

Perl 6 | Reference Documentation | Rakudo