Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-04-10

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:06 timotimo MadcapJake: a bunch of the things sdl2 offers aren't actually bound :)
00:07 timotimo and there's not yet a high-level API built on top of it that'd let you use sdl2 with objects and such
00:07 timotimo did you look in the examples/ where there's code that uses cairo in addition to sdl2? :)
00:10 dalek ecosystem: bb2ed8c | (Zoffix Znet)++ | META.list:
00:10 dalek ecosystem: Add GlotIO to ecosystem
00:10 dalek ecosystem:
00:10 dalek ecosystem: Use glot.io API: pastebin allowing execution of code: https://github.com/zoffixznet/perl6-GlotIO
00:10 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/bb2ed8c034
00:10 MadcapJake I've never used either library :P so I'll have to run through the examples (and some SDL2 tutorials)
00:11 timotimo 'k
00:11 timotimo have you used allegro and glfw, though?
00:11 MadcapJake nope! I've just read their tutorials and wrote a few basic bindings
00:11 timotimo OK
00:11 MadcapJake the closest thing I've done to game programming is pygame like 2 years ago :P
00:11 ZoffixLappy So, with P6 being available on glot.io, we can probably use its API to make a "try it now in browser" box on perl6.org, eh?
00:12 timotimo yeah, the thing about pygame is that it's blit-oriented
00:13 timotimo like, you're using the screen as a buffer of pixels that you copy pixel data into
00:13 MadcapJake how does SDL2 do it?
00:13 timotimo sdl2's "renderer" thing is much more 3d-graphics-acceleration-like
00:13 timotimo in fact, it's implemented on top of opengl and direct3d
00:13 AlexDaniel ZoffixLappy: or perhaps wait a little for js backend?
00:13 timotimo AlexDaniel: "a little" is quite optimistic
00:14 timotimo after nqp is fully ported to JS, there's still a ways to go until rakudo is fully functional as well
00:16 ZoffixLappy AlexDaniel, I'm unsure how much that's applicable. Wouldn't that just result in the "try now" box being restricted to just what the browser can do rather than running code the average Perl 6 user might end up running locally?
00:17 * ZoffixLappy is still isn't too clear on what the JS backend is all about...
00:17 AlexDaniel ¯\(°_o)/¯
00:18 AlexDaniel ZoffixLappy: anyway, what is glot.io? I mean, like, what's the idea behind it?
00:18 ZoffixLappy well, not "all about", but what exactly allows one to do and how does it go about manipulating DOM
00:19 ZoffixLappy AlexDaniel, a pastebin that lets you *execute* pasted code in 29 different languages. Ulti++ recently managed to get Perl 6 added to the list.
00:19 AlexDaniel ZoffixLappy: well, that's not what I meant
00:19 AlexDaniel ZoffixLappy: my ad blocker says that almost nothing is blocked, where are the ads?
00:20 AlexDaniel ZoffixLappy: what is preventing it to become another pastebin.com tomorrow?
00:21 AlexDaniel after all, there is also http://ideone.com/, which also supports perl 6
00:22 ZoffixLappy AlexDaniel, don't know about ads, but I was planning to utilize their API to power the "try now" box.
00:23 AlexDaniel I mean, we can even sorta hook camelia to web interface and that's it
00:24 ZoffixLappy I was thinking of that, but I hit a snag: there's no way to know which response matches which request.
00:24 ZoffixLappy Unless you have a dozen of IRC clients running, each handling a single request, which is a bit silly.
00:24 AlexDaniel I agree that “try it now” thingy right in the browser is great, but we can also just link to glot.io, ideone.com and whatever else supports perl 6
00:25 ZoffixLappy ¯\_(ツ)_/¯ I was just thinking aloud.
00:25 ZoffixLappy I think I'm still too burnt out to do web work anyway ^_^
00:25 AlexDaniel ZoffixLappy: another way to do it is to have an IRC client that will open private chat with camelia by default :)
00:26 AlexDaniel this way we will also get some people to hang out here, perhaps :)
00:26 AlexDaniel but yeah, I'm just thinking aloud to your thinking aloud
00:26 ZoffixLappy :)
00:27 timotimo gnite perlfriends
00:28 ZoffixLappy night
00:30 ChoHag joined #perl6
00:32 skink timotimo, Got it working again!
00:33 skink Well, ish
00:33 ZoffixLappy skink++
00:36 skink Honestly the way this is set up is really bizarre and overdone. There's redundant bindings to the same symbols and completely unnecessary class use.
00:37 skink I can probably do a clean re-write rather quickly, but it'd mean an API change
00:40 skink Why does he have 290 tests???
00:43 skink ZoffixLappy, Would it be okay to re-write this module, considering its age / lack of maintenance?
00:44 skink I don't think an API change would really affect anyone, considering it seems to be broken :)
00:44 ZoffixLappy skink, sure.
00:46 kurahaupo joined #perl6
00:47 kurahaupo joined #perl6
00:49 kurahaupo_ joined #perl6
00:51 cdg joined #perl6
00:52 kurahaupo joined #perl6
00:53 * [Coke] yawns.
00:55 * ZoffixLappy chugs another beer
00:55 ZoffixLappy I'm almost getting interested in hockey, sitting at this bar :P
01:01 * teatime tries to remember if he has easy ACM digital library access currently
01:08 FROGGS_ joined #perl6
01:10 keix joined #perl6
01:14 * geekosaur gets interested in hockey... until the commercials at every little stop in play. pfeh
01:14 skink > my $hash = bcrypt_hash("password");
01:14 skink $2a$12$1FjzCVKIfaFywBKQvRwOj.2LqoKtjpEj/EyovoHyQde3hrH70Zx1C
01:14 skink > bcrypt_compare("password", $hash);
01:14 skink True
01:14 skink ZoffixLappy, :)
01:15 TEttinger joined #perl6
01:15 skink Have also confirmed it's compatible with Python's bcrypt
01:15 ZoffixLappy Neat. Did you name those subs? Why not the Perl-6-patented kebab-case?
01:15 skink I just took his original names and s/Crypt::Bcrypt./bcrypt_/
01:17 skink bcrypt-hash-pw and -same-pw seem reasonable to you?
01:18 ZoffixLappy What's "-pw"?
01:19 skink password
01:19 skink Maybe -password-hash and -password-check?
01:20 skink or just -hash and -check
01:20 ZoffixLappy I wouldn't have neither -pw nor -password in it. Just bcrypt-hash / bcrypt-compare
01:21 skink -compare or -check? "If check returns true" sounds logical in my head
01:22 skink For its typical use case
01:22 ZoffixLappy Yeah, better than -compare.
01:23 ZoffixLappy -match maybe worth considering too
01:23 * ZoffixLappy may be too drunk to offer good ideas :)
01:23 skink I like -match
01:25 Ben_Goldberg joined #perl6
01:30 teatime is there perhaps a doc that describes:  if you want to clone {rakudo, moar, nqp, roast} separately, where to put them in relation to each other / how to point them at each other, and/or how to execute roast, etc.  basically, 'default/typical dev environment'
01:30 ZoffixLappy m: my $x = 1; sub foo ( Hash $foo ) {say $foo }; foo { bar => { |( $x ?? foo => 'ber'  !!  Empty) } }
01:30 camelia rakudo-moar 40a953: OUTPUT«{bar => -> ;; $_? is raw { #`(Block|84588672) ... }}␤»
01:31 ZoffixLappy I'm having trouble again with putting in optional args. I want `bar` to be an empty hash if $x is false and to be foo => 'ber' if $x is true
01:32 skink :o I think my last push to Crypt::Random broke it
01:32 skink >read bytes requires an object with REPR MVMOSHandle
01:32 ZoffixLappy Wasn't it the error shown when I tried to install it originally?
01:33 BenGoldberg joined #perl6
01:33 skink That was for Bcrypt
01:33 ZoffixLappy m: my $x = 1; sub foo ( Hash $foo ) {say $foo }; foo { bar => %(  |( foo => 'ber' if $x )) }
01:33 camelia rakudo-moar 40a953: OUTPUT«{bar => {foo => ber}}␤»
01:33 ZoffixLappy m: my $x = 0; sub foo ( Hash $foo ) {say $foo }; foo { bar => %(  |( foo => 'ber' if $x )) }
01:33 camelia rakudo-moar 40a953: OUTPUT«{bar => {}}␤»
01:34 skink My Random module now also has it, after I actually adapted something from Bcrypt
01:34 ZoffixLappy Sounds like you have the opportunity to fix two modules :P
01:36 skink https://github.com/skinkade/crypt-random/commit/0fa2a8ac9cf04acfe02a803322669a29ff91138c
01:37 MadcapJake teatime: the INSTALL.txt file in each of their repos
01:37 ZoffixLappy Try changing BEGIN to INIT?
01:37 MadcapJake teatime: rakudo will generate moar and nqp for you too
01:40 teatime yeah.  and that will work at least for now.
01:45 skink Alright, I give, how do I _un_install a module with panda?
01:45 molaf joined #perl6
01:45 teatime can I stick --gen-moar --gen-nqp --backends=moar into config.default, btw?
01:45 ZoffixLappy You don't? :)
01:45 ZoffixLappy panda isn't a package manager. But this question came up many times with cpan in Perl 5... Perhaps, it should be considered to add a feature to do that to panda.
01:47 ilbot3 joined #perl6
01:47 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:47 ZoffixLappy skink++
01:47 ZoffixLappy lucs, scroll down on http://modules.perl6.org/repo/DBIish
01:48 ZoffixLappy Herby_, why do you have percs?
01:48 lucs ZoffixLappy: I get that, but did a copy of README.pod get installed on my machine with the module?
01:49 ZoffixLappy Oh, no idea.
01:49 lucs :(
01:49 ZoffixLappy Internet. Web. Use it! :D
01:50 lucs Also, I'd like to read the code that got installed, but precomp'ed files make it hard -- or is there some way I'm missing?
01:50 perlawhirl joined #perl6
01:50 Herby_ ZoffixLappy: was sick as a dog all week, went to the ED today and they gave me a few
01:51 Herby_ now I'm feeling pretty good.  Hopefully the mysteries of coding will be unveiled to my eyes now!
01:51 lucs ZoffixLappy: So I need to be connected to the internet to play this game? :)
01:51 perlawhirl Zoffix: just reading logs. the thing with ideone is that it's rakudo is ancient... like 2014.
01:52 perlawhirl so i wouldn't be pointing people to it :D
01:52 perlawhirl glot.io on the other hand has a recent version, and being an OS project on github means it's easier to push updates to it
01:53 ZoffixLappy Herby_, I had some a month ago. Haven't tried coding while on them though lol :)
01:53 Herby_ you need to give it a shot next time!
01:54 Herby_ well, hopefully you dont need them but if you do!
01:56 ZoffixLappy lol, yeah, considering how shitty I felt at the time, I really hope there is no "next time" :)
01:56 ZoffixLappy lucs, you mean... there are times when you are NOT connected to the Internet? :)
01:57 lucs ZoffixLappy: Nah, but I'd really like to be able to look at the stuff that gets installed, not what is supposed to have been installed.
01:58 ZoffixLappy I don't think README.pod gets installed. As for the plain-code of modules. They're likely are present somewhere non-precompiled, but I'm unsure of where.
01:59 BenGoldberg joined #perl6
02:01 lucs ZoffixLappy: I see some plain code in .../install/share/perl6/site/sources/, but the file names are hashes :/
02:01 MadcapJake lucs: perl6 -e '$*REPO.repo-chain.say' will show you all the repos and their locations
02:02 lucs MadcapJake: Thanks, I'll take a look.
02:04 Ben_Goldberg joined #perl6
02:05 MadcapJake perl6 uses a nifty filesystem database that makes it a little difficult to find the source code.  If you decide you want to create a clone of something to install, you are supposed to be able to change the auth/ver/api, then `panda install .` and it will install your version as a separate distribution. You'll just need to use your modified auth/ver/api to
02:05 MadcapJake get access to it.
02:08 ZoffixLappy m: my $h = '<foo>; rel="next", <bar>; rel="last"'; say $h ~~ /g: '<'(.+?)'>;'\s+'rel="'(.+?)\"/
02:08 camelia rakudo-moar 40a953: OUTPUT«Nil␤»
02:08 ZoffixLappy I'm trying to get a hash with   next => 'foo', last => 'bar' from this
02:09 skink https://github.com/carbin/p6-Crypt-Bcrypt/compare/master...skinkade:master
02:09 skink >43 additions and 356 deletions.
02:09 skink :D
02:10 ZoffixLappy Screw it. Too drunk.
02:10 Herby_ no such thing!
02:12 ZoffixLappy m: my %h; for '<foo>; rel="next", <bar>; rel="last"' ~~ m:g/ '<'(.+?)'>;'\s+'rel="'(.+?)\" / -> $m { %h{$m[1]} = $m[0] }; say %h
02:12 camelia rakudo-moar 40a953: OUTPUT«{last => 「bar」, next => 「foo」}␤»
02:12 lucs Not drunk enough!
02:12 ZoffixLappy Seems to work, although the quotes around bar and foo look weird on my lappy. they show up as squares with FF62/FF63 in them
02:13 ZoffixLappy .u 「
02:13 yoleaux U+FF62 HALFWIDTH LEFT CORNER BRACKET [Ps] (「)
02:13 ZoffixLappy Ah
02:13 * skink proceeds to close nearly 20 windows
02:15 lucs MadcapJake: In Perl 5, it's easy to read (and maybe modify) the source of an installed module, to see how it works.
02:15 lucs I have no idea how to do this in Perl 6.
02:16 lucs Well, I can alway go read the github code, but modifications, dunno.
02:16 noganex_ joined #perl6
02:16 ZoffixLappy Fetch a local copy of GitHub module and load it?
02:16 ZoffixLappy s/of/from/
02:17 lucs ZoffixLappy: I can have it run in my local Perl 6 environment?
02:17 ZoffixLappy Sure, just add -Ipath/to/it
02:17 lucs Oh, right.
02:18 Actualeyes joined #perl6
02:18 lucs It feels a bit weird to need to have the whole thing in double, but I guess that can work.
02:19 skink I'll need someone's help in setting up the build process for crypt_blowfish.dll and testing on Windows
02:19 skink Not tonight though
02:20 ZoffixLappy ¯\_(ツ)_/¯ another way to look at it is it's weird to be able to modify already-installed modules anyway you want to :P
02:22 lucs ZoffixLappy: I'm alway a bit afraid of running into the I'm-looking-for-my-keys-here-because-there-is-light-here-even-though-I-lost-them-over-there :)
02:22 ZoffixLappy :D
02:24 ZoffixLappy Yikes. With tip, $100 bar bill.
02:24 ZoffixLappy An indicator of how drunk I am right now.. and I still have my last pint full :P
02:24 lucs Santé! :)
02:25 ZoffixLappy "Health"?
02:25 ZoffixLappy Ah, "Cheers"
02:29 ZoffixLappy "Internal error: invalid thread ID 241251728 in GC work pass"
02:30 ZoffixLappy :o
02:41 cognominal joined #perl6
02:46 sortiz joined #perl6
02:48 sortiz \o #perl6
02:51 skink Hey sortiz
02:52 skink Semi-related to DBIish, I'm re-writing the Bcrypt module for password storage
02:56 sortiz skink, your PR for P6-UUID was merged. :-)
02:56 skink mhm
02:56 skink Also Crypt::Random got added this morning
02:56 astj joined #perl6
02:56 skink On which Crypt::Bcrypt will now depend for salts
02:57 sortiz Nice!
02:58 khisanth_ joined #perl6
02:59 BenGoldberg joined #perl6
03:00 skink The UUID thing was entirely skids though
03:01 _28_ria joined #perl6
03:03 cdg joined #perl6
03:03 sortiz Yep, is a good example of collaboration.
03:03 sortiz And what the relation with DBIish is?
03:04 skink People store passwords in DBs :)
03:04 _28_ria joined #perl6
03:05 BenGoldberg joined #perl6
03:05 sortiz Yep, not always in a safe way, but yes. ;-)
03:11 skink Well I made it so it's simply bcrypt-hash($password) so people do do it in a safe way.
03:12 sortiz That returns a Buf?
03:13 skink Str
03:14 sortiz Ok, I need to see the module. :-)
03:16 skink The C library itself returns char* so original author logically did Str
03:16 skink bcrypt-hash(Str $password, int $rounds = 12) returns Str
03:16 skink bcrypt-match(Str $password, Str $hash) returns Bool
03:17 skink That's all that's exported
03:18 skink Hard to mess it up :)
03:18 sortiz Ok, I'm unaware of that API, seems is similar to standard crypt
03:18 skink mhm
03:19 skink Those functions call crypt(), in fact
03:19 skink From crypt_blowfish.{so,dll}
03:20 skink Just with the salt generation abstracted away
03:24 sortiz I see.
03:28 sortiz btw I need to see the status of the openssl bindings for perl6, I use it a lot in perl5.
03:29 bjz_ joined #perl6
03:31 skink Looks like not much in the way of features, at least according to the README: socket class, RSA signing, and AES en/decrypt
03:32 skink Whole buncha sub-modules though, so perhaps the README is just itself incomplete
03:42 sortiz For the moment I will concentrate on DBIish.
03:43 sortiz That has allowed me to know the strengths and weaknesses of perl6's NC
03:53 skids joined #perl6
03:53 skink Hey skids
03:53 skids o/
03:55 bjz joined #perl6
03:56 sortiz skids++ # UUID stringification
04:05 _28_ria joined #perl6
04:07 araujo joined #perl6
04:10 perlawhirl joined #perl6
04:23 Cabanossi joined #perl6
04:24 kaare_ joined #perl6
04:28 _nadim joined #perl6
04:36 skink Hey skids, what's the difference between :256[$buf.values].fmt("%32.32x") and .fmt("%02x")
04:37 skink I get the same output for both
04:37 skids I'm not familiar with a leading zero in the directive.
04:38 khisanth_ joined #perl6
04:39 skids Looks like it is in the manpage.  They should be equivalent.
04:41 skids Question is how portable across different libc each is, I guess.
04:41 skink Apparently not, because changing it crypt_random_UUIDv4() breaks it completely :)
04:42 skids m: 1.fmt("2.2x").say; 1.fmt("%02x).say
04:42 camelia rakudo-moar 40a953: OUTPUT«5===SORRY!5=== Error while compiling /tmp/FYEg6UA7XL␤Unable to parse expression in double quotes; couldn't find final '"' ␤at /tmp/FYEg6UA7XL:1␤------> 1.fmt("2.2x").say; 1.fmt("%02x).say7⏏5<EOL>␤    expecting any of:␤        postfix␤»
04:43 skids m: 1.fmt("2.2x").say; 1.fmt("%02x").say
04:43 camelia rakudo-moar 40a953: OUTPUT«Your printf-style directives specify 0 arguments, but 1 argument was supplied␤␤»
04:43 cyberviking joined #perl6
04:43 skids m: (1,).fmt("2.2x").say; (1,).fmt("%02x").say
04:43 camelia rakudo-moar 40a953: OUTPUT«Your printf-style directives specify 0 arguments, but 1 argument was supplied␤␤»
04:43 skids ergh.
04:43 skink %2.2x works though
04:44 skids m: (1,).fmt("%2.2x").say; (1,).fmt("%02x").say
04:44 camelia rakudo-moar 40a953: OUTPUT«01␤01␤»
04:44 skids m: (0x7fff,).fmt("%2.2x").say; (0x7fff,).fmt("%02x").say
04:44 camelia rakudo-moar 40a953: OUTPUT«7fff␤7fff␤»
04:45 skids try %032x not %02x
04:45 skink Wait, what...
04:45 skink > crypt_random_UUIDv4();
04:45 skink 8576a7a7-9714-4b85-9ee6-7d56438b4b76
04:45 skink > do crypt_random_UUIDv4() for 1..10000; say now - INIT now;
04:45 skink Use of Nil in string context
04:47 skink %032x works though
04:48 skids Yeah there are 32 digits, ot 2 :-)
04:48 skids *not
04:48 skink It's almost 1am, all I'm seeing is %x%x%x
04:48 skids heheh.
04:50 skids It seems that if the number exceeds the width, it ignores the width.  So a UUID that starts with 0 will skip leading 0s with %02x.
04:50 skink Performance difference is negligible with that change so I'll just keep the original
04:57 skids m: :256[Buf.new(0..255.pick xx 16).values].base(16).fmt("%032s") for 1..1000; say now - INIT now; #  I wonder if that performs better (but will be uppercase)
04:57 camelia rakudo-moar 40a953: OUTPUT«0.62406691␤»
05:00 skink iirc your original was 0.4 for camelia
05:11 skink skids, You might be able to use the regexp directly to insert the dashes rather than having to call .join()
05:13 khisanth_ joined #perl6
05:14 skids Maybe, not sure what that would do  I think the reason it is efficient is because Match objects do not create a new string, just store offsets, and do so in low level code.
05:17 skink Hm
05:17 skink fwiw, with 10,000 iterations, it takes 0.9s for the buffers and ~14-15s for the strings
05:18 skink On my machine
05:28 dalek DBIish: cbaedfd | (Salvador Ortiz)++ | t/03-lib-util.t:
05:28 dalek DBIish: Better test for library detection
05:28 dalek DBIish: review: https://github.com/perl6/DBIish/commit/cbaedfd589
05:28 dalek DBIish: 12bb8d6 | (Salvador Ortiz)++ | lib/DBDish/Pg (3 files):
05:28 dalek DBIish: Pg: Use the more robust PQconnectdbParams
05:28 dalek DBIish:
05:28 dalek DBIish: No need to quote-and-escape at connect time
05:28 dalek DBIish: + Add pg-parameter-status and server-version methods
05:28 dalek DBIish: review: https://github.com/perl6/DBIish/commit/12bb8d66b7
05:28 dalek DBIish: 46fdc11 | (Salvador Ortiz)++ | / (5 files):
05:28 dalek DBIish: mysql: Deprecate mysql_insertid over insert-id
05:28 dalek DBIish:
05:28 dalek DBIish: + Add $dbh.server-version
05:28 dalek DBIish: + Version aware datetime test
05:28 dalek DBIish: review: https://github.com/perl6/DBIish/commit/46fdc11d2c
05:28 dalek DBIish: 311bf76 | (Salvador Ortiz)++ | lib/DBIish/CommonTesting.pm6:
05:28 dalek DBIish: CommonTesting: Test library and server versions
05:28 dalek DBIish: review: https://github.com/perl6/DBIish/commit/311bf766c2
05:28 dalek DBIish: 82773f8 | (Salvador Ortiz)++ | lib/DBIish/CommonTesting.pm6:
05:28 dalek DBIish: CommonTesting: Fix a typo in added skip
05:28 dalek DBIish: review: https://github.com/perl6/DBIish/commit/82773f8104
05:47 khisanth_ joined #perl6
06:00 CIAvash joined #perl6
06:03 cdg joined #perl6
06:03 Xliff Soo... I just submitted my first PR for rakudo.
06:03 perlawhirl joined #perl6
06:03 wamba joined #perl6
06:04 jdv79 congratulations!
06:05 Xliff https://github.com/rakudo/rakudo/pull/739
06:06 * Xliff ♥s multis and a sensible operator redifinition scheme.
06:07 jdv79 i was just looking at it.  i'm a little skeptical but i don't know anything.
06:08 jdv79 also, where's the tests?:)
06:14 jdv79 then again i might wait til i got real feedback on the PR before i put more effort into it.
06:14 jdv79 good luck with that
06:15 Xliff Yeah. I've been holding it. The OO programmer in me thinks that this will eventually be needed. I can come up with one potential real world application for it.
06:16 Xliff I have the tests I used when I developed it. Don't know where to put them quite yet.
06:16 Xliff Hence the submission. I can sit here and try to talk about it, but an official PR seems to be the best way to proceed.
06:16 Xliff Thanks for the wishes.
06:17 Xliff Would help if you could put your skepticisms on the PR! =)
06:30 djbkd joined #perl6
06:46 sortiz .ask moritz With https://github.com/perl6/DBIish/commit/12bb8d66b75db20823148d802316e1babaa8219d I addressed the last pending issue in DBIish stale branches, may I delete them?
06:46 yoleaux sortiz: I'll pass your message to moritz.
06:56 jjido joined #perl6
07:14 moritz sortiz: sure
07:14 yoleaux 06:46Z <sortiz> moritz: With https://github.com/perl6/DBIish/commit/12bb8d66b75db20823148d802316e1babaa8219d I addressed the last pending issue in DBIish stale branches, may I delete them?
07:15 khisanth_ joined #perl6
07:19 walkerlala joined #perl6
07:28 wamba joined #perl6
07:28 darutoko joined #perl6
07:34 ufobat morning p6 :D
07:38 khisanth_ joined #perl6
07:40 rindolf joined #perl6
07:40 emdashcomma don't say p6, i already have a stomach ache
07:42 bjz joined #perl6
07:43 ufobat i feel pain about something else :-)
07:48 grondilu m: say (1 => *, { 1 => $_ } ...
07:48 camelia rakudo-moar 40a953: OUTPUT«5===SORRY!5=== Error while compiling /tmp/h5rwaYnZV8␤Missing required term after infix␤at /tmp/h5rwaYnZV8:1␤------> 3say (1 => *, { 1 => $_ } ...7⏏5<EOL>␤    expecting any of:␤        prefix␤        term␤»
07:48 grondilu m: say (1 => *, { 1 => $_ } ... *)[3].perl
07:48 camelia rakudo-moar 40a953: OUTPUT«Too few positionals passed; expected 1 argument but got 0␤  in block <unit> at /tmp/LYzNBCMUyP line 1␤␤»
07:49 grondilu m: say (1 => Mu, { 1 => $_ } ... *)[3].perl
07:49 camelia rakudo-moar 40a953: OUTPUT«1 => 1 => 1 => 1 => Mu␤»
07:49 grondilu m: say (1 => Mu, { 1 => $_ } ... *)[3].WHAT
07:49 camelia rakudo-moar 40a953: OUTPUT«(Pair)␤»
07:50 grondilu ^I thought that was failing.  My bad.
07:52 * grondilu watched a video about implementing Clifford algebras with binary trees (http://mediacenter.univ-lr.fr/videos/MEDIA120716124233657/multimedia/MEDIA120716124233657.mp4) and wants to give it a shot in Perl 6.  He remembers about Pairs being used to do binary trees.
07:53 bjz joined #perl6
07:53 espadrine joined #perl6
07:59 firstdayonthejob joined #perl6
08:02 dalek Heuristic branch merge: pushed 44 commits to DBIish/data-sets by salortiz
08:17 jjido joined #perl6
08:25 pmurias joined #perl6
08:27 pmurias ZoffixWin: re how does one go about manipulating the DOM on the js backend? it will be possible to call methods on javascript objects
08:37 frithnanth joined #perl6
08:38 masak grondilu: just because pairs can be use to implement binary trees doesn't mean that they're the optimal model for it ;)
08:38 grondilu masak: you'd use an handmade class?
08:38 masak grondilu: it annoys me whenever people use the Complex data type to just store a (x, y) tuple of things
08:39 masak if you're not multiplying the numbers, or otherwise using complex number arithmetic, you're basically over-committing on your model
08:39 grondilu well we don't quite have tuples, do we?
08:40 grondilu m: say (1, 2).WHAT
08:40 camelia rakudo-moar 40a953: OUTPUT«(List)␤»
08:40 masak like always putting on a full soldering helmet every time you make pancakes.
08:40 masak m: subset Pos of Positional where .elems == 2 && .all ~~ Int; say [3, 4] ~~ Pos
08:40 camelia rakudo-moar 40a953: OUTPUT«True␤»
08:40 masak that's some code from my latest board game.
08:41 masak works surprisingly well
08:41 grondilu oh you can actually write .method there without being in a closure?
08:42 grondilu m: subset Large of Real where .abs > 1000; say 1e6 ~~ Large;
08:42 camelia rakudo-moar 40a953: OUTPUT«True␤»
08:42 masak jnthn told me you can.
08:42 grondilu cool TIL
08:43 masak I'm still a bit surprised that's a thunk -- but I can't very well claim that it's *wrong*, just surprising-ish :)
08:45 masak m: subset Foo of Real where say($_ * 2); 5 ~~ Foo
08:45 camelia rakudo-moar 40a953: OUTPUT«10␤»
08:45 masak m: subset Foo of Real where say($_ *= 2); 5 ~~ Foo
08:45 camelia rakudo-moar 40a953: OUTPUT«10␤»
08:45 masak m: subset Foo of Real where say($_ *= 2) && .say; 5 ~~ Foo
08:45 camelia rakudo-moar 40a953: OUTPUT«10␤10␤»
08:46 masak (don't do that) :)
08:48 grondilu m: subset Foo of Real where $_ = "oops"; say my $ = 7;
08:48 camelia rakudo-moar 40a953: OUTPUT«7␤»
08:49 grondilu m: subset Foo of Real where $_ = "oops"; my $x = 7; say
08:49 camelia rakudo-moar 40a953: OUTPUT«5===SORRY!5===␤Argument to "say" seems to be malformed␤at /tmp/igR0s7rxfx:1␤------> 3f Real where $_ = "oops"; my $x = 7; say7⏏5<EOL>␤Other potential difficulties:␤    Unsupported use of bare "say"; in Perl 6 please use .say if you mean…»
08:49 grondilu m: subset Foo of Real where $_ = "oops"; my $x = 7; say
08:49 camelia rakudo-moar 40a953: OUTPUT«5===SORRY!5===␤Argument to "say" seems to be malformed␤at /tmp/lCvySg9eGM:1␤------> 3f Real where $_ = "oops"; my $x = 7; say7⏏5<EOL>␤Other potential difficulties:␤    Unsupported use of bare "say"; in Perl 6 please use .say if you mean…»
08:49 grondilu ahh
08:49 grondilu m: subset Foo of Real where $_ = "oops"; my $x = 7; say $x
08:49 camelia rakudo-moar 40a953: OUTPUT«7␤»
08:49 grondilu m: subset Foo of Real where $_ = "oops"; my $x = 7; say $x ~~ Foo
08:49 camelia rakudo-moar 40a953: OUTPUT«True␤»
08:49 grondilu m: subset Foo of Real where $_ = "oops"; my $x = 7; say $x ~~ Foo; say $x
08:49 camelia rakudo-moar 40a953: OUTPUT«True␤7␤»
08:49 masak probably an 'is copy' in there somewhere
08:53 domidumont joined #perl6
08:57 grondilu m: say ("foo" but 7) ~~ Int  # not sure about this
08:57 camelia rakudo-moar 40a953: OUTPUT«False␤»
09:00 ocbtec joined #perl6
09:03 RabidGravy joined #perl6
09:08 vendethiel- joined #perl6
09:09 masak m: say ("foo" but 7).^name
09:09 camelia rakudo-moar 40a953: OUTPUT«Str+{<anon|60316064>}␤»
09:09 masak that's why. it's not getting Int nature, really, it's getting {<anon|60316064>} nature.
09:10 masak I for one am fine with that. if you're messing around with `but`, you'll have to accept some compromises.
09:10 masak or, put differently, the language is not optimized for making the `but` use case 100% consistent :)
09:11 masak there's probably some decent way to ask the question "did we mix in an Int into this thing?". it just ain't `~~`
09:15 pmurias joined #perl6
09:19 grondilu ideally it should be "does" in boolean context.
09:19 TEttinger joined #perl6
09:19 grondilu but that's probably too much semantics
09:23 bjz joined #perl6
09:23 Ven joined #perl6
09:24 perlawhirl joined #perl6
09:32 dysfun joined #perl6
09:32 dysfun hello. is anyone able to point me at the perl5-in-perl6 FFI library please?
09:34 perlawhirl hi perlers
09:34 labster joined #perl6
09:34 perlawhirl dysfun: https://github.com/niner/Inline-Perl5
09:34 dysfun thank you :)
09:35 perlawhirl also... all libs are currently listed at modules.perl6.org
09:38 Begi joined #perl6
10:04 Begi hey #perl6 ! I've a newbie question, about the hyper method. What's the batch size ?
10:06 Timbus ummmm i saw Zoffix claim it was.. 64? in his presentation? will have to defer to someone who knows anything about it
10:07 Timbus http://doc.perl6.org/routine/hyper yep, 64
10:08 RabidGravy and the source agrees: "method hyper(Int(Cool) :$batch = 64, Int(Cool) :$degree = 4)"
10:09 timotimo o/
10:09 RabidGravy yo
10:10 timotimo music annoys me
10:11 tadzik :(
10:11 grondilu I have this in a A.pm6 file:  'unit class A; constant $a is export = A.new;'  then 'use A;' fails, telling me method 'new' is not found for invocant of class 'A'.
10:11 grondilu that's just not right, is it?
10:11 timotimo well, the class isn't composed yet at that point
10:12 grondilu doesn't it at least inherit from Any?
10:12 RabidGravy yes, I'd say that was right
10:13 timotimo it'd be pretty terrible if you could invoke method "new" on A at that point and get Any.new even if later in the file there's a "method new" defined
10:13 RabidGravy if you want to do that it would be something like
10:14 RabidGravy m: class A { }; constant $a is export = A.new
10:14 camelia rakudo-moar 40a953: ( no output )
10:14 RabidGravy one good reason for using the curly version of class
10:14 timotimo maybe the class itself wants to be export, too?
10:14 grondilu but I'd like to define the constant inside the compunit.
10:15 grondilu constant $a is export = END A.new;  # maybe?
10:15 timotimo that's exactly what rabidgravy's code does
10:15 timotimo no, that'll be even worse :)
10:16 grondilu yeah, not the correct phaser.
10:17 masak Begi: src/core/Iterable.pm:    method hyper(Int(Cool) :$batch = 64, Int(Cool) :$degree = 4) {
10:17 masak Begi: (found by doing `git grep -w 64 src/core` in the rakudo/ directory)
10:17 Begi masak: nice tip !
10:22 _28_ria joined #perl6
10:25 grondilu lol, check out this error message:
10:25 grondilu ===SORRY!===
10:25 grondilu *
10:25 grondilu shell returned 1
10:28 timotimo a real beauty of a diagnostic message
10:28 masak `*` ?
10:29 masak also... there's a shell happening during compile?
10:29 masak not by the compiler itself, surely, but by a BEGIN block or something?
10:29 timotimo we do shell out in order to precompile, iirc
10:30 masak huh.
10:30 masak is there some reason we have to do that?
10:31 arnsholt Yeah, I tried to do it all in a single process, but it broke in subtle ways
10:31 arnsholt I think something there're some data structures that end up being shared, even when we start up a new compiler
10:31 timotimo FWIW, we can fire up a second moar vm interpreter in the same process
10:32 masak arnsholt: aha.
10:32 masak arnsholt: sounds like something we should maybe look into long-term.
10:32 timotimo going through the heap analyzer recently taught jnthn and me about all the little spots we're keeping things around in
10:32 masak and by "we", I mean competent knowledgeable people, not me :P
10:32 timotimo one of the most astounding ones, to me, was the int cache :D
10:33 timotimo whatever compunit/serialization context is "first" to populate the Int cache will get its Int boxes spread out to all the others :P
10:33 grondilu apparently it's because I began a line with the sequence operator.
10:33 * masak .oO( "these are all the ints your parents left you as inheritance, Harry" -- "whoaaaa"  )
10:33 grondilu I thought it was ok to do that.
10:33 arnsholt Yeah, the fact that we shell out to do precomp was precisely the reason I wanted to redo it, since invoking the compiler from a program is actually pretty straightforward
10:34 arnsholt Unfortunately precomp had to do tricky things
10:34 timotimo m: ... 99
10:34 camelia rakudo-moar 40a953: OUTPUT«99␤  in block <unit> at /tmp/U2yNFDcajo line 1␤␤»
10:34 timotimo that's not the sequence operator
10:34 masak right.
10:34 timotimo that's the yada-yada-yada operator
10:34 masak that's a term.
10:34 labster joined #perl6
10:34 masak timotimo: no, it's not an operator at all.
10:34 grondilu no I mean '1, 2 \n ... *'
10:34 masak timotimo: it's more of a listop.
10:34 timotimo well, it's a sub i guess
10:34 timotimo yeah
10:35 masak well, on some level it's a sub.
10:35 timotimo termorator
10:36 masak timotimo: token term:sym<...> { [<sym>|'…'] <args> }
10:36 timotimo just like the world-famous System.out.println operator that's there to print a line to the system's output stream!
10:37 masak as I've delved deeper into language design/implementation, I've become a wee bit more sensitive to people calling a non-operator "an operator"
10:37 masak like, things in parameter lists/signatures
10:37 timotimo mhm
10:37 timotimo m: 1, 2 ␤ ... *
10:38 camelia rakudo-moar 40a953: OUTPUT«(timeout)»
10:38 timotimo m: my @result = 1, 2 ␤ ... *; say @result[^5]
10:38 camelia rakudo-moar 40a953: OUTPUT«(1 2 3 4 5)␤»
10:38 timotimo m: say 1, 2 ␤ ... *
10:38 camelia rakudo-moar 40a953: OUTPUT«(...)␤»
10:41 wtw joined #perl6
10:41 bazzar joined #perl6
10:43 wtw joined #perl6
10:44 pmurias masak: the haskell approach of an operator just being a function with fancy syntax has a lot of elegance
10:47 teatime joined #perl6
10:48 perlawhirl joined #perl6
10:48 Xliff I thought ... needed at least three terms, or a function as the third element for it to work?
10:48 Xliff m: say 1, 3 ... *
10:48 camelia rakudo-moar 40a953: OUTPUT«(...)␤»
10:49 Xliff m: my @t = 1, 3 ... *; say @t[^4];
10:49 camelia rakudo-moar 40a953: OUTPUT«(1 3 5 7)␤»
10:49 Xliff Huh
10:49 Xliff m: my @t = 1, 6 ... *; say @t[^4];
10:49 camelia rakudo-moar 40a953: OUTPUT«(1 6 11 16)␤»
10:49 timotimo m: my @f = 1 ... *; say @f[^5]
10:49 camelia rakudo-moar 40a953: OUTPUT«(1 2 3 4 5)␤»
10:49 Xliff m: my @t = 1, 3, 6 ... *; say @t[^4];
10:49 camelia rakudo-moar 40a953: OUTPUT«Unable to deduce arithmetic or geometric sequence from 1,3,6 (or did you really mean '..'?)␤  in block <unit> at /tmp/pNU4Z5wuV1 line 1␤␤»
10:49 Xliff m: my @t = 1, 3, 9 ... *; say @t[^4];
10:49 camelia rakudo-moar 40a953: OUTPUT«(1 3 9 27)␤»
10:49 timotimo m: my @t = 0, 3, 6 ... *; say @t[^5]
10:49 camelia rakudo-moar 40a953: OUTPUT«(0 3 6 9 12)␤»
10:50 Xliff m: my @t = 1, 4, 16 ... *; say @t[^4];
10:50 camelia rakudo-moar 40a953: OUTPUT«(1 4 16 64)␤»
10:50 psch m: (0 ... *)[^5].say
10:50 camelia rakudo-moar 40a953: OUTPUT«(0 1 2 3 4)␤»
10:50 psch \o
10:50 Xliff \o
10:50 Xliff I've finished my ePub cleanup project. Now need to find something else.
10:50 psch m: (1, 3, 6 .. *)[^5].say
10:50 camelia rakudo-moar 40a953: OUTPUT«(1 3 6..Inf Nil Nil)␤»
10:50 psch hmm
10:51 psch "did you really mean '..'" doesn't seem particularly helpful right there :)
10:52 perlawhirl hi perlers
10:53 timotimo hi whirler!
10:54 perlawhirl i found a source of potential bugs/annoyances
10:54 perlawhirl m: say <matthew mark luke john>.sort(by => *.chars).tail
10:54 camelia rakudo-moar 40a953: OUTPUT«(matthew)␤»
10:55 perlawhirl that's not really sorting by chars, but you wouldn't know it
10:55 Xliff perlawhirl, \o
10:55 perlawhirl it would be nice if it warned you
10:55 Xliff The results of my Mojo::DOM experiment.
10:55 Xliff https://gist.github.com/Xliff/34bb9371787d68898cd8b3891794d93b
10:55 timotimo oh, you get a whatever-code that builds a pair for you
10:55 psch interesting
10:55 perlawhirl yeah, &by is not understood by the auto-closure, only in the code block
10:56 perlawhirl which is fine, because you should do sort(*.chars) if you want sorting based on chars
10:56 perlawhirl but you know... it could catch people out
10:56 perlawhirl so a warning would be nice
10:56 psch well, it seems a general problem for every named that could take a Whatever
10:56 Xliff perlawhirl++   # That would have gotten me!
10:56 perlawhirl yeah
10:56 perlawhirl min, max, and minmax i think also have the same gotcha
10:56 timotimo if we offer a warning, we also have to offer a way to get the warning silenced if you really wanted that
10:57 perlawhirl well... i guess the other way to go is add multi to handle it so it just DWIM's
10:57 timotimo we don't give you the "proper" named semantics when you write by => (*.chars), right?
10:57 timotimo no, that sounds terrible
10:57 perlawhirl hah, i'm sorry :D
10:58 psch adding a multi to CORE means the solution is always adding a multi, which is kinda the opposite of DWIM
10:58 timotimo you'd have to execute the whatevercode and see if it returns a Pair that has a key that matches a named argument, and then redispatch? :\
10:58 psch cause that makes users have to do the same
10:58 Xliff perlawhirl, in your first example, what is it really sorting by? Is the (by => *.chars) ignored?
10:58 perlawhirl just a regular alpha sort
10:58 perlawhirl ie, same as .sort()
10:59 Xliff So the argument is ignored. =)
10:59 timotimo no, it's not
10:59 psch m: <a bb ccc dddd>.sort(-(*.chars)).say
10:59 camelia rakudo-moar 40a953: ( no output )
10:59 timotimo it transforms every element of the list into by => 1, by => 2, by => 3 etc
10:59 psch m: <a bb ccc dddd>.sort(-(*.chars)).say
10:59 camelia rakudo-moar 40a953: ( no output )
10:59 timotimo i don't think we have an order on Pair objects
11:00 psch m: say :1by cmp :2by
11:00 camelia rakudo-moar 40a953: OUTPUT«Less␤»
11:00 Xliff m: say "matthew".chars
11:00 camelia rakudo-moar 40a953: OUTPUT«7␤»
11:01 Xliff m: <a bb ccc dddd>.sort(by => -(*.chars)).say
11:01 camelia rakudo-moar 40a953: OUTPUT«(a bb ccc dddd)␤»
11:01 Xliff m: <-1 -2 -3 -4>.sort.say
11:01 camelia rakudo-moar 40a953: OUTPUT«(-4 -3 -2 -1)␤»
11:01 psch m: <a bb ccc dddd>.sort(-(*.chars)).say
11:01 camelia rakudo-moar 40a953: OUTPUT«(dddd ccc bb a)␤»
11:02 psch well, it does look like it does get ignored... vOv
11:04 Xliff .tell skink Commit 9dfe16e passes all tests on Windows.
11:04 yoleaux Xliff: I'll pass your message to skink.
11:04 perlawhirl psch: to be clear... my main concern is accidental use of the 'by' named parameter in a auto-closure. (*.chars) works, ({by => .chars}) works, (by => *.chars) does not work
11:05 perlawhirl unlike something like unique, that allows (as => *.some-method) because it's signature is :&as
11:07 psch m: Any.can('sort')[0].signature.perl.say
11:07 camelia rakudo-moar 40a953: ( no output )
11:08 psch well, what i have established with camelia right now is that the same code twice in a row doesn't seem to work
11:08 psch ...cause i have this habit of trying things in a query first
11:08 psch point of that one was that sort doesn't have a named :&by, but a positional &by?
11:08 psch so ignoring it is perfectly fine, interface consistency and all
11:09 perlawhirl yes... if you added a ':' then you couldn't do sort(*.chars)
11:09 timotimo added a : ?
11:09 perlawhirl ie, make the sig :&by... but that would break things
11:10 perlawhirl so either a warning or workaround is needed
11:10 liztormato joined #perl6
11:10 psch ...a warning for a named argument on a method doesn't support it is kind of against interface consistency
11:10 psch +that
11:11 * liztormato waves from below the sea
11:11 psch o/ liztormato
11:11 kid51 joined #perl6
11:11 liztormato Turns out there's 4G nowadays in the EuroTunnel
11:12 psch ah, so no singing lobsters :)
11:12 spider-mario joined #perl6
11:12 liztormato Nope
11:12 perlawhirl psch: yeah, kinda spitballing here on what a nice solution might be.
11:13 psch perlawhirl: what's your solution to &say not accepting a :filehandle named?
11:13 psch m: say :filehandle($*ERR), "foo"
11:13 camelia rakudo-moar 40a953: OUTPUT«Unexpected named parameter 'filehandle' passed␤  in block <unit> at /tmp/vFgwSLVYhC line 1␤»
11:13 timotimo what's bad about $*ERR.say?
11:13 timotimo that's what say with a :filehandle would do anyway
11:14 psch ...i suppose i'm somewhat cranky and will get more coffee
11:14 Xliff Chai is better for crankiness. Especially good chai
11:14 Xliff Spiced chai
11:15 liztormato Agree. ;-)
11:15 perlawhirl psch: i'm not sure i have one :/
11:15 timotimo i have cheap chai latte that comes as powder in bags :P
11:16 psch perlawhirl: to be clear though, the real problem is .unique and .sort having different signatures, isn't it?
11:16 psch as in, .unique has a named, .sort has a pos
11:16 perlawhirl well, yes basically. that is to say... i noticed it when i was playing around with a method call chain involving both unique and sort.
11:17 timotimo m: sub test(*@a, *%b) { dd @a, %b }; test(by => *.foo)
11:17 camelia rakudo-moar 40a953: OUTPUT«[]␤»
11:17 perlawhirl i had used .unique(as => *~) and then without thinking wrote .sort(by => *.chars) and was perplexed for a few mins when it didn't DWMI
11:17 timotimo m: sub test(*@a, *%b) { dd @a; dd %b }; test(by => *.foo)
11:17 camelia rakudo-moar 40a953: ( no output )
11:17 perlawhirl DWIM
11:17 timotimo oh camelia
11:17 timotimo oh, god damn it
11:17 timotimo i misunderstood the problem all along
11:18 Xliff timotimo: That's better than no chai latte (and I have the same).
11:18 timotimo by => *.chars does put the *.chars into the named slot
11:18 Xliff timotimo: I think mine is Big Train
11:18 timotimo i thought you were complaining the by => *.chars was creating a WhateverCode that returns "by => $_.chars" for everything
11:19 perlawhirl i'm sorry timo... if the deficiency was anywhere, it was likely my poor explanation of the problem
11:19 liztormato joined #perl6
11:21 liztormato Commute&
11:21 liztormato left #perl6
11:21 psch yeah i really don't know how to fix that
11:23 timotimo well, it's the old thing about methods taking *% by default
11:23 psch partly, yes
11:23 psch but the inconsistency between .sort and .unique does exist
11:23 psch m: say Any.can('unique')>>.signature.say
11:23 camelia rakudo-moar 40a953: OUTPUT«(($: | is raw))␤»
11:24 psch i mean, of course .sort and .unique do different things so that's kinda fine
11:24 psch but it also means that this could become a FAQ that's quickest answered with "RTFM", which is kind of eh...
11:25 perlawhirl psch: that's the rub. nothing is truly broken... it's a gotch that could sneek into code and potentially go unnoticed in for quite a while
11:26 perlawhirl apologies for my tired grammar+spelling
11:32 teatime off-topic: I hate when I forget to |sort before I |uniq and so it doesn't work.
11:32 timotimo that's why we have unique be sort + uniq, and squish be uniq :)
11:32 timotimo that's also why we didn't name it uniq
11:33 psch m: <aa ccc aa dddd bb ccc aa>.unique.say
11:33 camelia rakudo-moar 40a953: OUTPUT«(aa ccc dddd bb)␤»
11:33 psch no sort there, afaict
11:33 timotimo er
11:33 Xliff heh
11:33 timotimo yeah, it retains the original order
11:34 timotimo but it has the effect of |sort|uniq
11:34 timotimo basically |sort|uniq|unsort
11:34 teatime so then, the effect of uniq?
11:34 teatime your implementation details are of no concern to me, the lowly api consumer ;)
11:35 teatime well.. unique... if it was the effect of uniq, it would just break... I guess that was your point.
11:35 timotimo now it was my turn to poorly explain
11:35 perlawhirl timotimo: | sort -u
11:36 perlawhirl has replaced uniq for me almost every time
11:37 timotimo oh, didn't know it did that
11:38 psch uniq feels weirdly special-purpose to be included in the slew of *nix tools
11:39 psch but there's probably a few that i don't even know that are even more narrow in use... :)
11:39 * moritz is still annoyed that cut only allows single-character delimiters
11:41 perlawhirl moritz: tell me about it... whipping out awk just because of this never ceases to annoy me
11:43 Juerd I tend to whip out perl5 for things that others use cut, sed and awk for.
11:43 Juerd I'm too dumb to learn a dozen different tools.
11:43 timotimo uniq seems nice for when a tool spits out logging information and you want to deduplicate
11:43 perlawhirl the prob is if you learned those tools before perl, it's muscle memory at this point
11:44 RabidGravy yeah, I'd been working with Unix for a few years before I encountered Perl
11:44 Juerd perlawhirl: In over 10 years I apparently did manage to unlearn them :)
11:45 perlawhirl Juerd: there's hope for us yet :D
11:45 Xliff RabidGravy, \o
11:45 teatime psch: hrm... uniq seems to fit in fine to me... I do a lot of find/xargs/awk/grep/whatever 5-line one-liners, and I end up using it occassionally 'cause it's exactly what I need
11:46 Xliff Anyone know the best way to handle wchar_t using NativeCall?
11:46 teatime psch: I used to have a set of aliases that implemented all of the basic set operations in terms of POSIX utils like uniq ;)
11:46 Xliff https://en.wikipedia.org/wiki/Wide_character
11:46 Xliff It seems to be not-a-very-portable-type.
11:46 timotimo that's an understatement
11:47 Xliff Aaand.... that sinking feeling I got when I read that page just got worse.
11:48 teatime sounds like at worst, you can encode to UTF-32 in Perl, and use char32_t ?
11:48 teatime do any functions actually take arrays of those and treat them like strings tho, hrm
11:49 * teatime has done C and Unicode, but managed to avoid doing them together so far.
11:51 psch teatime: well, i'm not gonna argue that i know better than them POSIX people what's a useful tool... :)
11:51 teatime lol
11:52 mayuresh joined #perl6
11:54 RabidGravy I think POSIX was basically "what does SVr4 have, let's mandate that"
11:54 _28_ria joined #perl6
12:03 Xliff teatime: I'm gonna cross that bridge when I get to it.
12:03 skids joined #perl6
12:03 Xliff Hopefully those functions are totally unnecessary and I can "lose" them.
12:06 teatime so then what lead you to needing wchars?  some API you want to use or something?
12:26 pmurias does Koalatee on modules.perl6.org actually serve a purpose?
12:28 pmurias it's not described what it is, and clicking on it points to an "Not Implemented Yet" page?
12:28 pmurias should I make a pull request to remove it?
12:28 masak +1
12:30 moritz pmurias: or push directly; you should have access already
12:30 moritz pmurias: if not, please tell me
12:35 pmurias how is the ugly icon next to some of the modules called?
12:36 RabidGravy it's "logotype/32x32.png" in the repository I think
12:38 pmurias why do we have it?
12:39 RabidGravy dunno
12:49 tokomer joined #perl6
12:49 teatime pmurias: they might look less stupid/ugly if they were vertically aligned.
12:49 teatime at least they're already uniform size?
12:52 Xliff teatime: Yeah. I did a gptrixie on a header file and ran into wchar_t warnings.
12:52 cdg joined #perl6
12:53 Xliff Is it a best practice to encapsulate NativeCall bindings inside a class (including the "use NativeCall")?
12:55 skink joined #perl6
13:11 _nadim joined #perl6
13:18 _28_ria joined #perl6
13:21 dalek ecosystem: 27f3224 | RabidGravy++ | META.list:
13:21 dalek ecosystem: Add EuclideanRhythm
13:21 dalek ecosystem:
13:21 dalek ecosystem: See https://github.com/jonathanstowe/EuclideanRhythm
13:21 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/27f32240ea
13:22 dogbert2 Hello #perl6
13:23 dogbert2 Stupid question of the day, how often is camelia/rakudo-moar updated?
13:23 RabidGravy erp
13:23 dogbert2 the version that can be run here is from Friday
13:23 pmurias teatime: yes, thought that some alginment might turn them from dorky to ok/cool
13:24 Actualeyes joined #perl6
13:24 teatime sadly, you can't ever distribute design skills or a standard aesthetic to all of the contributors of perl modules :)
13:27 ZoffixWin dogbert2, I'm pretty sure it automatically gets all the latest commits
13:29 suman joined #perl6
13:29 ZoffixWin it's logotype/logo_32x32.png
13:29 dogbert2 hi zoffix, I was under the same impression but there are several commits to moar-nom since 40a953
13:30 ZoffixWin *shrug* no idea
13:30 dogbert2 I noticed some 'shouting' against Camelia not returning output. Perhaps something has gone awry.
13:31 ZoffixWin Maybe
13:32 suman Hi there, Is there a decent IDE for perl 6 like wing ide, spyder, pyscripter for python??
13:32 RabidGravy depends what you mean by "decent IDE"
13:35 ZoffixWin There's Atom. But I really only use it for its editor.
13:37 dogbert2 m: my @a[2;2]; @a[0;0] = 17; @a[0;1] = 4711; say @a;
13:37 camelia rakudo-moar 40a953: OUTPUT«[[17 4711] [(Any) (Any)]]␤»
13:37 dogbert2 can you make the two assignments into one somehow?
13:38 dogbert2 i.e. initialize one row with one statement
13:38 psch m: my @a[2;2]; @a[0] = 17, 4711; say @a;
13:38 camelia rakudo-moar 40a953: OUTPUT«Cannot assign to a 2 dimension array with only 1 dimensions␤  in block <unit> at /tmp/AfEkoTAm4m line 1␤␤»
13:38 psch m: my @a[2;2]; @a[0;*] = 17, 4711; say @a;
13:38 camelia rakudo-moar 40a953: OUTPUT«Partially dimensioned views of arrays not yet implemented. Sorry. ␤  in block <unit> at /tmp/fd8rLywMlB line 1␤␤»
13:38 psch hm
13:38 * psch doesn't deal with shaped arrays often enough apparently
13:39 dogbert2 psch, thx for trying, haven't been able to figure out if it works
13:40 psch dogbert2: well, the last one says "not yet implemented", so i'd suspect that's what's supposed to work... :)
13:40 dogbert2 ah well :) thx anyway
13:42 skink Oh dear
13:42 yoleaux 11:04Z <Xliff> skink: Commit 9dfe16e passes all tests on Windows.
13:43 skink bcrypt hashes generated in Perl6 test for validity in Perl6/Python3, but ones generated in Python3 fail in Perl6
13:44 skink Thanks Xliff
13:44 skink D'oh!
13:45 skink $2a$ vs $2b$
13:48 shinobi-cl joined #perl6
13:48 ZzZ__ joined #perl6
13:49 ZzZ__ hey
13:49 ZzZ__ i'm learn perl programing
13:50 ZzZ__ I was undecided
13:50 ZzZ__ which perl 5 or perl 6 learning ?
13:50 shinobi-cl 6 is more fun!
13:50 skink Perl 5 is an extremely mature language with huge amounts of documentation and library support
13:51 skink Perl 6 is less mature, but much nicer in my opinion :)
13:51 ZzZ__ which would be better to start from
13:51 ZzZ__ ?
13:52 psch ZzZ__: what is your reason for learning perl?
13:52 ZzZ__ network programing
13:52 ZzZ__ web
13:53 psch well, perl5 has the more extensive library support and documentation, as skink says
13:53 psch and that included webdev
13:53 psch *includes
13:53 RabidGravy but both are theoretically equally capable
13:53 Begi (but it's also possible with Perl 6)
13:54 RabidGravy I'd say eventually Perl 6 will lead to nicer designs
13:54 skink More importantly, however, there a lot more tutorial guides intended for new programmers for Perl 5
13:54 ZzZ__ Is there much difference?
13:54 skink for ZzZ__'s specific need
13:55 Begi ZzZ__: what kind of differences ?
13:55 RabidGravy the code base is for example completely different
13:55 _28_ria joined #perl6
13:57 RabidGravy eugh something totally changed in qjackctl since last week
13:57 RabidGravy didn't even see an update
13:58 shinobi-cl Hi all: I want to overload [] for a custom object
13:58 shinobi-cl m: class A {  has @.data; method postcircumfix:<[ ]>(A $a, @posspec) { say "op []"; } }; my @data = (1,2,3); my $o = A.new(data=>@data); say $o.perl; say $o[2];
13:58 camelia rakudo-moar 40a953: OUTPUT«A.new(data => [1, 2, 3])␤Index out of range. Is: 2, should be in 0..0␤  in block <unit> at /tmp/8KebdyTxGH line 1␤␤Actually thrown at:␤  in block <unit> at /tmp/8KebdyTxGH line 1␤␤»
13:58 psch shinobi-cl: http://doc.perl6.org/language/subscripts#Methods_to_implement_for_positional_subscripting
13:58 RabidGravy psch++ # beat me to it
13:59 ocbtec joined #perl6
13:59 psch although with 'has @.data' i'd probably just use handles, except if you need something magical like modulo access
14:00 psch m: class A { has @.data handles <elems AT-POS ASSIGN-POS BIND-POS DELETE-POS EXISTS-POS>; }; my A $a .= new; $a[0] = "foo"; say $a.perl
14:00 camelia rakudo-moar 40a953: OUTPUT«A.new(data => ["foo"])␤»
14:00 psch like that
14:04 shinobi-cl Wow, what is that 'handles' keyword?
14:04 psch an unfortunately undocumented trait_mod
14:04 psch m: say &trait_mod:<handles>.perl
14:04 camelia rakudo-moar 40a953: OUTPUT«sub trait_mod:<handles> (| is raw) { #`(Sub|43565336) ... }␤»
14:05 psch m: say &trait_mod:<handles>>>signature.perl
14:05 camelia rakudo-moar 40a953: OUTPUT«5===SORRY!5=== Error while compiling /tmp/WyUcLKgJT8␤Missing dot on method call␤at /tmp/WyUcLKgJT8:1␤------> 3say &trait_mod:<handles>>>7⏏5signature.perl␤    expecting any of:␤        postfix␤»
14:05 psch m: say &trait_mod:<handles>>>.signature.perl
14:05 camelia rakudo-moar 40a953: OUTPUT«(:(| is raw),)␤»
14:05 psch ah, only one cand
14:05 khw joined #perl6
14:05 psch hah, no
14:05 psch m: say &trait_mod:<handles>.candidates>>.signature.perl
14:05 camelia rakudo-moar 40a953: OUTPUT«(:(Attribute:D $target, $thunk), :(Method:D $m, &thunk))␤»
14:06 _nadim joined #perl6
14:06 psch shinobi-cl: basically says "if any method named like the RHS is called on the object we're in, delegate to the LHS"
14:06 psch m: class A { method foo handles <bar> { "foo..?" } }; say A.bar
14:06 camelia rakudo-moar 40a953: OUTPUT«Method 'bar' not found for invocant of class 'Str'␤  in block <unit> at /tmp/8StWi8yGXH line 1␤␤»
14:07 psch ahh
14:07 psch in that case the return value handles it, apparently
14:07 psch that's neat
14:08 vendethiel joined #perl6
14:17 tharkun joined #perl6
14:20 khisanth__ joined #perl6
14:23 sue joined #perl6
14:30 shinobi-cl So, in the documentation, there are examples like this:   multi method elems (::?CLASS:D:)
14:31 shinobi-cl This ::?CLASS the type is for the current class?
14:32 _28_ria joined #perl6
14:33 psch m: class C { method foo { say ::?CLASS } }; C.foo; class D is C { }; D.foo
14:33 camelia rakudo-moar 40a953: ( no output )
14:33 psch shinobi-cl: yeah, it is
14:34 shinobi-cl is there a way to emulate this kind of subscripting? $a[1;3], or $a['C4'] (like a cell reference in Excel?)?
14:37 shinobi-cl I'm trying to to a kind of 2d table structure and i want to use something like $a[A1] for the first cell
14:37 psch i'd like to recommend against that
14:37 shinobi-cl or maybe $a<A1 B2 C3> for getting 3 cells at the same time
14:37 psch postcircumfix:<[ ]> is strongly expected to only take Int arguments in the circumfix
14:38 psch further, i don't really see why you can't just a Hash in the first place
14:38 psch +use
14:39 zakharyas joined #perl6
14:39 espadrine joined #perl6
14:41 skink RabidGravy, Made a PR for Crypt::Bcrypt ownership change
14:42 dalek ecosystem: 2d5f549 | skinkade++ | META.list:
14:42 dalek ecosystem: Update Crypt::Bcrypt
14:42 dalek ecosystem:
14:42 dalek ecosystem: Old version no longer works. This is a re-write with a simpler API and updated crypt_blowfish library.
14:42 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/2d5f5497cd
14:42 dalek ecosystem: 3b19c56 | RabidGravy++ | META.list:
14:42 dalek ecosystem: Merge pull request #191 from skinkade/patch-1
14:42 dalek ecosystem:
14:42 dalek ecosystem: Update Crypt::Bcrypt
14:42 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/3b19c562dc
14:42 RabidGravy there
14:42 skink :D
14:46 ufobat joined #perl6
14:48 _28_ria joined #perl6
14:51 kurahaupo joined #perl6
14:57 BenGoldberg joined #perl6
15:04 Ven joined #perl6
15:05 _28_ria joined #perl6
15:08 RabidGravy http://airtime.rabidgravy.com:8000/stream - the last thing I made playing with itself :)
15:12 psch i feel that would strongly benefit from a straight 8th hihat
15:13 RabidGravy yeah
15:13 El_Che RabidGravy: I would add some hamsters. Always a hit: https://www.youtube.com/watch?v=6WpMlwVwydo&amp;annotation_id=annotation_62512&amp;feature=iv&amp;src_vid=Q6TzAQXVpB8
15:13 psch it's a bit disorienting as-is
15:15 shinobi-cl class A { multi method EXISTS-KEY(::?CLASS:D $key) { return True }; multi method AT-KEY(::?CLASS:D $key) { return "111" } }; my $o = A.new(); say $o{aDSD}
15:15 shinobi-cl m: class A { multi method EXISTS-KEY(::?CLASS:D $key) { return True }; multi method AT-KEY(::?CLASS:D $key) { return "111" } }; my $o = A.new(); say $o{aDSD}
15:15 camelia rakudo-moar 40a953: OUTPUT«5===SORRY!5=== Error while compiling /tmp/vWu_2eXhsS␤Undeclared routine:␤    aDSD used at line 1␤␤»
15:19 RabidGravy now if Gtk::Simple had a slider widget, this could be adjusted in realtime
15:19 djbkd joined #perl6
15:21 _28_ria joined #perl6
15:21 sufrostico joined #perl6
15:21 BenGoldberg joined #perl6
15:27 BenGoldberg joined #perl6
15:31 _28_ria joined #perl6
15:39 BenGoldberg joined #perl6
15:41 _28_ria joined #perl6
15:47 bartolin [Coke], nine: the other day you took a look at RT #123276. I added a comment there -- do you agree that the test should be adjusted and the ticket be closed?
15:47 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=123276
15:49 Ven joined #perl6
15:51 _28_ria joined #perl6
15:52 ZoffixWin skink, was any attempt made to contact the original author?
15:52 skink ZoffixWin, He hasn't been seen since Dec
15:52 ZoffixWin It's just I see no Issues reported on their repo and from their point of view we effectively just silently ditched their work from Ecosystem without them even knowing it.
15:53 skink You're right. Shall I make a bug report?
15:54 ZoffixWin I'll just post an Issue on their repo saying the module's broken and we've replaced it. If they wish it readded then can submit a PR to readd
15:54 ZoffixWin (under another name now, I guess, or is :auth<> fully supported now?)
15:54 skink Alrighty
15:57 ZoffixWin Done https://github.com/carbin/p6-Crypt-Bcrypt/issues/6
16:01 _28_ria joined #perl6
16:05 skink Meanwhile, I managed to break panda :)
16:07 shinobi-cl Hi, does anyone knows of a current working module that overloads [] or {} ?
16:07 ZoffixWin shinobi-cl, what for?
16:08 ZoffixWin shinobi-cl, I have an example of postcircumfix here. If you add is export trait and pack it into module, it should work: http://tpm2016.zoffix.com/#/17
16:08 ZoffixWin It's just lines 2-4
16:11 skink panda --force install . wasn't actually overwriting my install, so I tried removing the files manually first
16:11 skink Seems panda doesn't like that
16:11 _28_ria joined #perl6
16:12 jjido joined #perl6
16:13 cisstrd joined #perl6
16:17 ZoffixWin m: say '???????????????????? ???????????????????????? '
16:17 camelia rakudo-moar 40a953: ( no output )
16:17 ZoffixWin heh... apparently Unicode support on my IRC client is far worse than the browser
16:17 ZoffixWin .u ????
16:17 yoleaux U+1D4BB MATHEMATICAL SCRIPT SMALL F [Ll] (????)
16:18 sufrostico joined #perl6
16:27 skink Someone wanna 'panda install Crypt::Bcrypt' and see if the test passes?
16:27 skink Shared library had the wrong path until just a moment ago
16:29 _28_ria joined #perl6
16:30 ZoffixWin skink, "Successfully installed Crypt::Bcrypt"
16:30 moritz skink: will do, once I get my rakudo running again :-)
16:30 skink Thanks ZoffixWin
16:33 moritz skink: same here; got a one-line for testing it in the isntalled state?
16:34 skink my $hash = bcrypt-hash("password"); bcrypt-match("password", $hash);
16:34 moritz moritz@pete:~$ perl6-m -M Crypt::Bcrypt -e 'say bcrypt-hash("password", :rounds(15));
16:34 moritz > '
16:34 moritz Cannot locate native library 'resources/crypt_blowfish.so': resources/crypt_blowfish.so: cannot open shared object file: No such file or directory
16:36 ugexe Crypt::Bcrypt isn't declaring any of its build dependencies
16:36 skink Yeah that's what I was worried about. If I'm including resources/lib.so, is its path in the installed state just 'lib.so'?
16:37 cisstrd left #perl6
16:38 _28_ria joined #perl6
16:38 ZoffixWin skink, I don't see resources/ dir in the repo. Where's the crypt_blowfish.so you declerated in resources in mETA file?
16:38 [Coke] is there an ecosystem module for json that uses a nativecall library?
16:38 skink It gets built by Build.pm / Makefile.in
16:38 ZoffixWin Ah, is it building it automatically?
16:38 ZoffixWin K
16:39 Begi [Coke]: i don't thinks so, but i'm not sure
16:42 dvinciguerra_ joined #perl6
16:44 dvinciguerra_ joined #perl6
16:46 dvinciguerra_ joined #perl6
16:46 _28_ria joined #perl6
16:48 [Coke] ok. I know there's a zillion others, just checking on the NC. Danke.
16:50 RabidGravy I looked at making one but it seemed more trouble than it's worth
16:52 Begi RabidGravy: but I guess it'd be a lot faster ?
16:55 [Coke] Eh. it'll help with a presentation.
16:57 timotimo there is one
16:57 timotimo um ... there was one
17:04 _28_ria joined #perl6
17:07 dvinciguerra_ joined #perl6
17:09 dvinciguerra_ joined #perl6
17:12 _28_ria joined #perl6
17:17 djbkd joined #perl6
17:18 ZoffixWin m: my Str $x; say $x.chars
17:18 camelia rakudo-moar 40a953: OUTPUT«Use of uninitialized value of type Str in string context␤Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed.  in block <unit> at /tmp/hb4k3MSzXy line 1␤0␤»
17:19 ZoffixWin m: my Str $x; say "Tis good" if $x.?chars
17:19 camelia rakudo-moar 40a953: OUTPUT«Use of uninitialized value of type Str in string context␤Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed.  in block <unit> at /tmp/xei1iu1jfK line 1␤»
17:20 ZoffixWin :/ feels like at least the latter should do something sane
17:20 _28_ria joined #perl6
17:20 psch m: Int.chars
17:20 camelia rakudo-moar 40a953: OUTPUT«Use of uninitialized value of type Int in string context␤Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed.»
17:21 psch ZoffixWin: that warning is sensible, don't you agree?
17:21 ZoffixWin I suppose. But it's a very common pattern to do { if $x.defined and $x.chars }. You'd think there'd be an easier way to write it
17:23 ZoffixWin I guess there's no good way around it.
17:23 psch "if $x.defined and $x.chars" is equivalent to "if so $x" for Str
17:23 psch or, well, just "if $x"... :)
17:23 ZoffixWin Oh. Right! '0' is not False
17:23 ZoffixWin psch++
17:23 ZoffixWin <3 Perl 6
17:24 ugexe if $x.?chars
17:24 djbkd_ joined #perl6
17:25 ZoffixWin ugexe, that fails. It tries to stringify a type (see eval above)
17:25 smls joined #perl6
17:26 smls m: my token foo (&regex) { <&regex> };
17:26 camelia rakudo-moar 40a953: OUTPUT«5===SORRY!5=== Error while compiling /tmp/0cERbDiirW␤Undeclared routine:␤    regex used at line 1␤␤»
17:26 smls ^^ Any particular reason why that does not compile?
17:27 ugexe ZoffixWin: ah. eww
17:27 dalek ecosystem: 326b154 | Altai-man++ | META.list:
17:27 dalek ecosystem: See https://github.com/Altai-man/deredere - just a little web-scraping framework
17:27 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/326b15444e
17:27 dalek ecosystem: e8dbac7 | (Zoffix Znet)++ | META.list:
17:27 dalek ecosystem: Merge pull request #192 from Altai-man/master
17:27 dalek ecosystem:
17:27 dalek ecosystem: Add deredere library to ecosystem: https://github.com/Altai-man/deredere/
17:27 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/e8dbac7371
17:28 jdv79 ZoffixWin: i don't follow that one
17:28 ZoffixWin jdv79, which one?
17:28 jdv79 the whole thing
17:28 _28_ria joined #perl6
17:28 timotimo m: say quietly "Oh lord".?chars
17:28 camelia rakudo-moar 40a953: OUTPUT«7␤»
17:29 timotimo m: say quietly Str.?chars
17:29 camelia rakudo-moar 40a953: OUTPUT«0␤»
17:29 timotimo ZoffixWin: ^
17:29 jdv79 where is this warning coming from?
17:29 jdv79 m: my Str $s; $s.chars;
17:29 camelia rakudo-moar 40a953: OUTPUT«Use of uninitialized value of type Str in string context␤Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed.  in block <unit> at /tmp/1ufQXqfCs5 line 1␤»
17:29 jdv79 is that chars trying to string out the type obj?
17:29 ugexe m: my Str $x; say WHAT($x.?chars); # '0' is not false, but 0 is
17:29 camelia rakudo-moar 40a953: OUTPUT«Use of uninitialized value of type Str in string context␤Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed.  in block <unit> at /tmp/VohYIdno74 line 1␤(Int)␤»
17:30 psch smls: seems a bit weird from here, yeah
17:30 dalek doc: 3393d0a | (Zoffix Znet)++ | doc/Language/5to6-nutshell.pod:
17:30 dalek doc: Mention '0' is True in Perl 6 and common pattern is simperl
17:30 dalek doc: review: https://github.com/perl6/doc/commit/3393d0a0ac
17:30 ZoffixWin timotimo, :o
17:30 skink [Coke], You could bind to https://github.com/esnme/ujson4c/
17:31 timotimo of course if you call .chars on Str, it'll try to use the Str as a string :)
17:31 jdv79 which seems confusing for a newbie
17:31 ZoffixWin jdv79, yeah, I believe what it's happening is it's going off to Cool's .chars which calls .Str so you're attempting to call .Str on a type object: https://github.com/rakudo/rakudo/blob/nom/src/core/Cool.pm#L63
17:31 timotimo would a newbie expect every Str to behave like "" in every case?
17:31 jdv79 i'm sure there's a deep reason why just returning 0 is a bad idea but really...?
17:31 skink That looks to be one of the friendlier APIs you could bind, and the benchmarks of its parent lib seem good if I'm reading them right
17:32 jdv79 in that case i had to think about it for a few minutes
17:32 psch ZoffixWin: not quite.  Str.chars explicitly generates the warning in the Str:U case
17:32 timotimo we do return 0
17:32 jdv79 and i'm not a 100% newbie
17:32 ZoffixWin Ah
17:32 jdv79 and a warning?
17:32 psch ZoffixWin: by calling self.Str :)
17:32 ZoffixWin :D
17:32 ZoffixWin m: say quietly 0/0
17:32 camelia rakudo-moar 40a953: OUTPUT«Attempt to divide by zero using div␤  in block <unit> at /tmp/43FpbL1ufe line 1␤␤Actually thrown at:␤  in block <unit> at /tmp/43FpbL1ufe line 1␤␤»
17:32 jdv79 seems borderline unperlish to me but ok:)
17:33 psch jdv79: which part?  that it happens at all (e.g. for Int.chars as well) or that it happens with Str.chars specifically?
17:34 ZoffixWin FWIW, modern perls made length() not emit a warning on undefs
17:35 smls They did?
17:35 ZoffixWin Though, that's likely due to what started this conversion... You can'd do "if $str" in Perl 5, because '0' is false
17:35 smls $ perl -wE 'say length undef'
17:35 smls Use of uninitialized value in say at -e line 1.
17:35 ZoffixWin Yeah, since 5.14 if my memory is correct
17:35 timotimo that's why we have "with", too :)
17:35 smls that's with PErl 5.22
17:35 zakharyas joined #perl6
17:36 ZoffixWin smls, that's a warning for length() returning undef, not a warning for an undef argument to length()
17:36 smls ah, true
17:37 stmuk DBIish fails its tests
17:38 raoulvdberge joined #perl6
17:40 [Coke] there's nothing in nativecall to tie constants to a name, right? so if there's a #define FOO 3    I need to have a similar p6-level constant, yes?
17:43 stmuk odd travis has passes
17:43 [Coke] skink: I'm looking at json-c; is ujson4c more straightforward?
17:44 skink I literally search 'fastest json library' and one of the first results was UltraJSON, ujson4c being a friendlier API for it
17:44 skink searched*
17:44 sue joined #perl6
17:45 skink I didn't look that hard tbh
17:45 _28_ria joined #perl6
17:49 jdv79 what is the reason this time to do json faster?  seems like a recurring quest around here.
17:51 skids joined #perl6
17:54 ZoffixWin ¯\_(ツ)_/¯ it's used for everything. The faster the better.
17:55 mst jdv79: it turns out to be a limiting factor a lot
17:55 mst e.g. JSON::PP often shows up at the top of my profiles
17:56 mst (for perl5 code)
18:00 jdv79 JSON::XS is pretty fast.  is that a limiting factor for a lot of people?
18:00 jdv79 i know in p6 it seems to be
18:00 skink AH
18:00 skink I finally got the bundling working correctly
18:01 skink $path = %?RESOURCES<crypt_blowfish.so>.Str;
18:02 skink Interesting that is native() can't take an IO::Path
18:02 jjido joined #perl6
18:04 RabidGravy It would only be a convenience for the user because it goes straight to the VM pretty directly
18:06 skink moritz or ZoffixWin, could you --force install and see?
18:08 ZoffixWin $ perl6-m -M Crypt::Bcrypt -e 'say bcrypt-hash("password", :rounds(15))';
18:08 ZoffixWin $2b$15$XAiG5SSgQB9Fyy0JlYhfc.cknPvFhAH6raJElAmOep7GhGMPtt/nW
18:08 ZoffixWin skink++ works
18:08 skink Sweet. Now at some point I just gotta add Windows support :)
18:10 _28_ria joined #perl6
18:11 BenGoldberg joined #perl6
18:11 _28_ria joined #perl6
18:12 [Coke] jdv79: I'm not doing this to make anything faster.
18:13 _28_ria joined #perl6
18:14 _28_ria joined #perl6
18:16 _28_ria joined #perl6
18:19 _28_ria joined #perl6
18:19 skink You alright there, _28_ria?
18:19 ugexe stmuk: DBIish travis test is an install using --notests apparently
18:20 ZoffixWin :S what is the point of that travis then :S
18:20 * ugexe deletes/todos tests until CI passes, then exclaims its ready for the public
18:22 ugexe i guess you could look at it as its testing if it segfaults during install...
18:22 ZoffixWin But would it even... if no tests are run?
18:22 ugexe if the META6.json is incorrect i think the call to CURI.install would still fail
18:23 ugexe and the precompilation
18:24 ugexe (i.e. .install would fail trying to copy a non-existing file, or when there is a syntax error while trying to precompile)
18:25 mcsnolte joined #perl6
18:26 ugexe not that those scenarios make it a reasonable way to look at it
18:40 stmuk ugexe++ # well spotted
18:40 hankache joined #perl6
18:41 RabidGravy at one point, it definitely was running all the tests properly
18:42 RabidGravy I think the problem is that there are no installed libraries on the travis
18:43 ugexe https://github.com/perl6/DBIish/commit/940848dab7623ae10bfc19ad5fcf6b5408130dc4
18:48 skink Is setting up travis encouraged?
18:48 ZoffixWin skink, yes.
18:48 Skarsnik joined #perl6
18:48 ZoffixWin It's the only autotesting facility we have at the moment
18:49 ZoffixWin well.. there's panda testing too, I guess
18:50 skids joined #perl6
18:50 ugexe you can test on windows with a little ingenuity: https://github.com/ugexe/zef/blob/master/.appveyor.yml
18:52 stmuk BTW OpenSSL has outdated windows DDL checked in as binaries which should be upgraded (if anyone knows where they come from). I emailed the guy who added them but didnt get a reply yet
18:55 sjoshi joined #perl6
19:01 yqt joined #perl6
19:02 khisanth_ joined #perl6
19:09 skink stmuk, From what I can tell, they're the actual plain libs for OpenSSL
19:09 skink SSLeay being the software OpenSSL was forked from originally
19:11 timotimo stmuk: is that park of star, btw?
19:11 timotimo or "not yet"?
19:13 stmuk skink: yes but I was wondering where the updates came from?
19:13 stmuk timotimo: "not yet"
19:14 timotimo ok
19:15 timotimo because it'd be pretty damn uncomfortable for us to be "the project that dares ship year-old ssl libraries as binaries"
19:15 stmuk indeed
19:15 stmuk I spent most of the last few years updating OpenSSL (and glibc) :/
19:16 timotimo yeah :|
19:16 skink You could have its build script pull in libressl-portable and compile the libs
19:16 timotimo no
19:16 timotimo that'd require our windows users to have a compiler installed
19:16 timotimo which is the reason why it ships dlls in the first place
19:16 stmuk yeah its mainly a problem with windows
19:17 skink Alright, here's a better idea then
19:17 skink Set up another repo that builds and cryptographically signs Open/LibreSSL, then have the module download the libs from there and verify them
19:18 stmuk or just locate a frequently updated source of DDLs and poll that
19:18 timotimo yes
19:18 stmuk which brings me back to my original question :)
19:18 timotimo gtk-simple also ships dlls; we should update those, too
19:19 skink Is there a trusted source of OpenSSL libs compiled for Windows?
19:19 stmuk I'd imagine so
19:20 timotimo maybe a centralized/shared mechanism for allowing a site-admin to override the dlls we ship with a local/other repository would be a good thing to have
19:21 skink If you wanna go third-party there seems to be three options
19:21 skink https://wiki.openssl.org/index.php/Binaries
19:22 timotimo also, tooling to inspect what computers on a site have and such ..
19:23 stmuk skink: that looks useful thanks
19:24 timotimo hm. does SDL2 ship binaries at all? i wonder ...
19:24 jjido_ joined #perl6
19:25 timotimo i mean SDL2::Raw
19:27 timotimo it doesn't
19:27 stmuk usually it would use linux package installed libs
19:28 stmuk and I think I had to compile on Mac
19:28 stmuk windows is the special case because so few users have a compiler and/or sets of libraries
19:29 MadcapJake with NativeCall, for a char* when do you use uint8 vs uint8 is rw vs CArray[uint8] ?
19:29 spider-mario joined #perl6
19:29 MadcapJake in one example in the NativeCall.pod, it shows even using Str o_O
19:30 timotimo yeah, you would use Str for that
19:30 timotimo unless the function is expected to be modifying the value for you
19:30 MadcapJake what about const char *? Same or with is rw trait?
19:30 skink Alrighty ZoffixWin I just set up Travis for Crypt::{Random,Bcrypt}
19:31 ZoffixWin skink++
19:31 skink Currently building
19:32 * MadcapJake would love to read a «Basic use of Strings» section in that NativeCall.pod
19:32 MadcapJake any takers? :)
19:32 timotimo hm, what does the readme of zavolaj have to say about this?
19:33 MadcapJake same as doc's pod
19:34 MadcapJake how do you do the synapsebot thing?
19:34 MadcapJake dalek: help
19:34 MadcapJake synopsebot6: help
19:34 MadcapJake synopsebot6: .help
19:34 MadcapJake syn 21
19:34 MadcapJake Well, here's the link http://design.perl6.org/S21.html#Strings
19:37 MadcapJake Oh and missed this little detail: "If the C function requires the lifetime of a string to exceed the function call, the argument must be manually encoded and passed as CArray[uint8]"
19:38 stmuk I suppose the best solution for windows openssl is not to ship DDLs but nativecall the equivs which come with windows and are updated by MS
19:38 timotimo um, isn't that what "explicitly-manage" is for?
19:39 skink Hm. ZoffixWin, on Travis, Bcrypt fails with a similar error
19:39 skink To before
19:40 MadcapJake timotimo: that's what I thought :/ was that taken out of the nativecall pod?
19:41 timotimo are you sure that S21 is up to date whatsoever?
19:41 skink Tests successfully and installs it, then the 'prove' command on the test fails
19:42 timotimo Last Modified: 23 Nov 2012
19:42 timotimo ^- maybe not
19:42 timotimo https://github.com/perl6/specs/blame/master/S21-calling-foreign-code.pod
19:43 pomJ joined #perl6
19:44 timotimo wait, that section is about explicitly-manage
19:44 MadcapJake timotimo: https://github.com/perl6/doc/commit/52daa5d47a6852b6c61a8f1ea07c136432703eb3
19:45 pomJ joined #perl6
19:45 MadcapJake it was replaced by a CArray example
19:46 MadcapJake rudi_s: why replace the explicitly-manage example in the nativecall.pod?
19:46 ZoffixWin skink, no idea.
19:48 labster joined #perl6
19:48 labster joined #perl6
19:49 skink When I run prove on my own machine I get a different but related (TAP) error
19:50 skink Could not execute (perl6 t/01-compare.t): open3: exec of perl6 t/01-compare.t failed at /usr/share/perl/5.18/TAP/Parser/Iterator/Process.pm line 168.
19:50 RabidGravy MOAR COWBELL http://rabidgravy.com:8000/stream
19:50 skink https://travis-ci.org/skinkade/p6-Crypt-Bcrypt#L1075
19:50 RabidGravy which is perl6 euclidean --channel=1 --device=3 --bpm=136 --part=35,16,4 --part=39,16,7 --part=54,24,13 --part=63,13,3 --part=36,11,4 --part=56,24,11
19:50 skink ... yet we know the build itself works
19:50 skink ¯\_(ツ)_/¯
19:51 Xliff RabidGravy, LOL!
19:51 Xliff euclidean?
19:51 skink The modules page itself still says 'not set up' instead of failed (passed for Random), so maybe it knows something we don't, eh?
19:51 Xliff Hmmm....
19:52 * Xliff goes to update rakudo on the VM.
19:52 RabidGravy Xliff, http://cgm.cs.mcgill.ca/~godfried/publications/banff.pdf - euclidean
19:52 ZoffixWin RabidGravy, what stream is generated with Perl 6? :o
19:52 RabidGravy that is only generating the notes
19:53 ZoffixWin That clap sounds awful, but I'm impressed :P
19:53 RabidGravy it could be done all in Perl 6 (apart from the synthesis right now), but it gets a little tired sometimes and starts streaming weird
19:54 ZoffixWin I wonder what it'd sound with clap replaced by those maraccas
19:55 ZoffixWin skink, the modules page caches travis status and updates it about every 2 hours, if there have been commits to the repo
19:55 RabidGravy actual snare drum?
19:55 ZoffixWin *shrug*
19:55 Xliff RabidGravy, (◎ . ◎)
19:56 ZoffixWin Better :)
19:56 Xliff Wonder if the amen break is in there somewhere...
19:56 RabidGravy wants a proper 808 clap I think
19:56 skink ZoffixWin, OH
19:56 skink You know what it is?
19:56 ZoffixWin What?
19:57 skink When you do panda-install, it put the .so in .panda-work/resources instead of plopping it in resources/
19:57 ZoffixWin ah
19:57 skink I probably have to run panda-build first
19:58 RabidGravy yeah, if you're doing panda-test sure
19:59 skink panda-install does panda-test but with its temporary files, afaik
19:59 psch ...what is that metre even
19:59 psch or, well, time signature i suppose
19:59 psch ...and then it disappeared /o\
20:00 * psch does that too o/
20:02 RabidGravy Xliff, it's doing the amen break now using the same kit
20:02 skink Anyone know the current state of Rakudo on the BSDs?
20:03 RabidGravy works for me on FreeBSD 8.4
20:03 bartolin works fine on FreeBSD 10.3 as well
20:04 RabidGravy yeah worked there for me last time I compiled (and some 9 as well)
20:04 skink Anyone tried OpenBSD?
20:05 skink I have a feeling if I just left this stream on I'd slowly be driven to madness
20:05 zakharyas joined #perl6
20:05 stmuk I got 100% test pass on OpenBSD last time I tried it a few months back
20:05 skink neat
20:06 Xliff RabidGravy, LOLOL!
20:06 Xliff RabidGravy++ # MOAR DRUMS
20:07 stmuk I've also ran successfully on "BitRig" -- an OpenBSD fork with logging fs, clang rather than gcc and other modern features
20:07 stmuk I see math tests fail on NetBSD (edge case stuff) due to libm on that system :/
20:08 skids joined #perl6
20:08 ugexe ive gotten netbsd to pass, moar and jvm
20:08 stmuk ugexe: I think I ended up skipping the math edge cases
20:11 skink Does panda-installdeps also fetch build-time deps? I assume so
20:12 stmuk S03-operators/arith.t line 250
20:12 ugexe i think i changed some moar Configure.pl flag
20:12 stmuk https://rt.perl.org/Public/Bug/Display.html?id=124147
20:13 skink Yo Xliff, you got that VM running?
20:13 RabidGravy skink, yeah, it actually flattens all the dependencies and installs them in one go
20:13 Xliff skink, yeees?
20:14 Xliff skink, the VM is Linux. Host is Windows.
20:14 skink Alrighty. panda-build failed on Travis because I put it before installdeps :D
20:14 Xliff Does the rakudo source tree build under Windows?
20:14 Xliff Or do I need something like cygwin?
20:15 ugexe it builds under windows
20:15 BenGoldberg joined #perl6
20:17 Xliff OK. I will clone and try it.
20:18 Xliff I'm using rakudobrew under Linux. Will that work under Windows?
20:18 stmuk yes
20:18 Xliff Thanks.
20:19 stmuk its likely some modules might not work under windows
20:23 skink YES
20:23 skink ZoffixWin, Bcrypt Travis build passes
20:23 skink That was indeed the problem
20:23 ZoffixWin \o/
20:29 Xliff stmuk, I'm just going to do a basic install. Testing modules for skink.
20:29 moritz skink:  the current version of Crypt::Bcrypt works fine for me (on Ubuntu)
20:30 skink moritz, I got the installation working this morning after figuring out shared library inclusion
20:30 moritz skink++
20:30 skink Travis was failing because said lib was being built in a temporary location that was gone by the time it ran the latter round of tests
20:31 BenGoldberg joined #perl6
20:32 Xliff Hrm.
20:32 Xliff /cygdrive/d/SVN/Github/rakudobrew/moar-nom/install: No such file or directory at Configure.pl line 91.
20:34 skink For Windows support, should I just cross-compile a .dll and bundle it?
20:35 Xliff skink, probably the best option.
20:37 Xliff Hrm.
20:37 Xliff No idea why rakudobrew is failing under Cygwin
20:38 Xliff Not rakudobrew. It's Configure.pl in rakudo that's failing.
20:38 timotimo i don't think cygwin is supported
20:39 Xliff Well, that would do it.
20:39 Xliff I guess I could try using ActiveState???
20:39 moritz I think so
20:40 Xliff Need a compiled under the Windows env, though.
20:44 TreyHarr1 joined #perl6
20:47 ZoffixWin joined #perl6
20:48 skink Oh, well, that was easy
20:49 skink Changed %CC% to i586-mingw32msvc-gcc and .so to .dll in the existing makefile
20:51 RabidGravy :-O
20:51 skink Is that a good or bad :-O
20:53 RabidGravy it's surprise it works
20:54 ugexe download visual studio community edition for a windows compiler
20:54 ugexe and strawberry perl for a perl 5
20:54 skink I don't know if it works yet :)
20:54 rudi_s MadcapJake: Because it was broken and wasn't a generally useful example.
20:55 rudi_s There are better alternatives (which the replacement should be).
20:56 skink Xliff, Pushed experimental Windows support to Crypt::Bcrypt
20:56 skink I'd be absolutely shocked if that dll works though
21:00 timotimo Xliff: i think strawberry perl is a common way to build perl6 on windows
21:00 avenj joined #perl6
21:00 avenj joined #perl6
21:04 Xliff timotimo++ # Strawberry perl
21:06 _nadim joined #perl6
21:12 AlexDaniel joined #perl6
21:15 dvinciguerra_ joined #perl6
21:16 Xliff OK. rakudobrew is definitely better under Strawberry
21:17 djbkd joined #perl6
21:17 Xliff Wow! Build is slower on the Windows host than it is in the Linux VM!!
21:18 AlexDaniel m: :9<76>R=my$x; say $x
21:18 camelia rakudo-moar 40a953: OUTPUT«69␤»
21:18 BenGoldberg joined #perl6
21:19 AlexDaniel just don't post that ↑ on reddit
21:19 AlexDaniel ah wait, I forgot something
21:21 AlexDaniel m: :Ⅸ<76>R=my$x; say $x
21:21 camelia rakudo-moar 40a953: OUTPUT«5===SORRY!5=== Error while compiling /tmp/LAl1sR0JvE␤Bogus statement␤at /tmp/LAl1sR0JvE:1␤------> 3:7⏏5Ⅸ<76>R=my$x; say $x␤    expecting any of:␤        colon pair␤»
21:21 AlexDaniel nope :(
21:24 Xliff https://gist.github.com/Xliff/b021212a564fd47a7c59440573d66600
21:25 AlexDaniel m: 42, 69, 96 ZR= my ($x,$y,$z); say “$x $y $z” # heh
21:25 camelia rakudo-moar 40a953: OUTPUT«42 69 96␤»
21:27 AlexDaniel m: my ($x,$y) = 42, 69; $x, $y X+= 5; say “$x $y”
21:27 camelia rakudo-moar 40a953: OUTPUT«47 74␤»
21:30 Begi1 joined #perl6
21:31 Xliff *sigh*
21:31 AlexDaniel Xliff: ? :)
21:31 Xliff OK. rakudo built. I need to get the windows environment straight though because "git" isn't available under the Windows shell
21:31 Xliff Typically when I do Unixish stuff under the host, it is under a bash.exe
21:32 Xliff However Strawberry Built rakudo needs the Windows shell.
21:33 AlexDaniel Xliff: oh! Once upon a time I tried to install Perl 6 on windows
21:33 AlexDaniel Xliff: msi was not available back then, not sure why
21:34 ugexe cmd.exe, Visual Studio Command, powershell, etc all work perfectly fine under windows
21:34 Xliff Yeah. I need 2016.3, so I can't use the MSI, which is still at 2016.1
21:34 Xliff So I'm building from source.
21:34 AlexDaniel Xliff: so I opened up the terminal, realized that I've not used windows for more than 5 years… and gave up like 3 minutes after
21:35 Xliff AlexDaniel++ # Save yourself from the insanity.
21:35 ugexe https://github.com/ugexe/zef/blob/master/.appveyor.yml # complete windows perl6 install
21:35 skink @ your gist: I bet there's somewhere in there you could add '-j$(nproc)' to make
21:35 ugexe its all very simple
21:36 BenGoldberg joined #perl6
21:36 Xliff skink: Yeah, but I think the parsing process is decidedly uniproc
21:36 Xliff ugexe, Oooh! Bookmarking. Thanks.
21:37 Xliff HOWEVER! I have gotten through this part.
21:37 AlexDaniel honestly, people using windows have to be really smart. I don't think that you can figure out things like this otherwise.
21:37 Xliff It's "rakudobrew build panda" that's failing now.
21:37 ugexe use zef, it works on every OS :P
21:37 RabidGravy I want this to work:
21:37 Xliff Particularly Shell::Command -- which I don't think is windows aware, anyways.
21:37 RabidGravy m: sub foo(:$foo!) { say $foo }; my &f = &foo.assuming(foo => *); f("var")
21:37 camelia rakudo-moar 40a953: OUTPUT«Too many positionals passed; expected 0 arguments but got 1␤  in sub __PRIMED_ANON at EVAL_2 line 1␤  in block <unit> at /tmp/F_xTZAM8kL line 1␤␤»
21:38 Xliff ugexe: That was my next step. :P
21:38 ugexe if you want to use panda anyway, use zef to force install Shell::Command, then install panda
21:38 RabidGravy but I looked at the code for .assuming once and it made my headache
21:39 Xliff ugexe, I just want to get to the point where I can install skink's modules
21:40 * skink has a stalker
21:40 ugexe his module wont install on windows. 1: he doesnt declare all his build dependencies 2: one of those built dependencies is Shell::Command
21:40 Xliff AAaieeee!
21:40 skink Oh, right. Forgot about the dude's shell script :D
21:41 * Xliff thinms skink will soon lose his stalker. =p
21:41 AlexDaniel m: sub foo(:$foo!) { say $foo }; my &f = { &foo.assuming(foo => $_)() }; f("var")
21:41 camelia rakudo-moar 40a953: OUTPUT«var␤»
21:41 Xliff s/thinms/thinks/
21:42 AlexDaniel RabidGravy: so, uh, it works
21:42 AlexDaniel RabidGravy: not sure if that is what you wanted
21:42 BenGoldberg IF you're going to do it that way, then you don't even need .assuming
21:42 AlexDaniel yup
21:42 BenGoldberg m: sub foo(:$foo!) { say $foo }; my &f = { foo($_) }; f("var")
21:42 camelia rakudo-moar 40a953: OUTPUT«Too many positionals passed; expected 0 arguments but got 1␤  in sub foo at /tmp/bpqAgJAJG5 line 1␤  in block <unit> at /tmp/bpqAgJAJG5 line 1␤␤»
21:42 BenGoldberg m: sub foo(:$foo!) { say $foo }; my &f = { foo($^x) }; f("var")
21:42 camelia rakudo-moar 40a953: OUTPUT«Too many positionals passed; expected 0 arguments but got 1␤  in sub foo at /tmp/_m44VUMHik line 1␤  in block <unit> at /tmp/_m44VUMHik line 1␤»
21:43 BenGoldberg m: sub foo(:$foo!) { say $foo }; my &f = -> $x { foo($x) }; f("var")
21:43 camelia rakudo-moar 40a953: ( no output )
21:43 AlexDaniel m: sub foo(:$foo!) { say $foo }; my &f = { &foo(foo => $_) }; f("var")
21:43 camelia rakudo-moar 40a953: OUTPUT«var␤»
21:43 RabidGravy yeah
21:43 Relsak joined #perl6
21:43 AlexDaniel m: sub foo(:$foo!) { say $foo }; my &f = { foo(:foo($_)) }; f("var")
21:43 camelia rakudo-moar 40a953: OUTPUT«var␤»
21:43 BenGoldberg m: sub foo(:$foo!) { say $foo }; my &f = { foo(foo => $_) }; f("var");
21:43 camelia rakudo-moar 40a953: OUTPUT«var␤»
21:44 Xliff OK. That's Crypt::Random done.
21:44 skink ugexe, I see rmdir is a built-in. No remove file built-in?
21:44 ugexe unlink deletes files. rmdir delets an empty directory
21:44 awwaiid I just grabbed rakudo-star windows msi and installed -- no panda?
21:44 skink mk
21:44 AlexDaniel well, you probably need .assuming if you want to do something like this:
21:44 AlexDaniel m: sub foo(:$foo!) { say $foo }; my &f = { &foo.assuming(foo => $_) }; f("var")()
21:44 camelia rakudo-moar 40a953: OUTPUT«var␤»
21:45 AlexDaniel like
21:45 AlexDaniel m: sub foo(:$foo!) { say $foo }; my &f = { &foo.assuming(foo => $_) }; my $x = f("var"); $x
21:45 camelia rakudo-moar 40a953: OUTPUT«WARNINGS for /tmp/bNrItvFg31:␤Useless use of $x in sink context (line 1)␤»
21:45 AlexDaniel m: sub foo(:$foo!) { say $foo }; my &f = { &foo.assuming(foo => $_) }; my $x = f("var"); $x()
21:45 camelia rakudo-moar 40a953: OUTPUT«var␤»
21:45 Xliff zef fetching under Windows is broken.
21:46 Xliff ===> Fetching: Crypt::Bcrypt
21:46 Xliff Can't extract non-existent path: False
21:46 Xliff in method extract at sources\F94CA4E91B2AF324B8A925E1F065F40258AE4D90 (Zef::Ex
21:46 Xliff tract) line 5
21:46 Xliff skink: Have a git link for Crypt::Bcrypt?
21:46 ugexe sounds like something about the package itself is broken
21:46 BenGoldberg m: sub foo(:$foo!) { say $foo }; my &f = { &foo.assuming(foo => $_) }; .(), .(), .() for f("var");
21:46 camelia rakudo-moar 40a953: OUTPUT«var␤var␤var␤»
21:46 skink https://github.com/skinkade/p6-Crypt-Bcrypt
21:46 ugexe there are windows CI tests for windows fetching
21:47 skink Okay ugexe I can safely remove Shell::Common. By other build depends I imagine you mean Panda?
21:47 Xliff skink: Shell::Common?
21:48 dalek doc: cdc260b | (Brock Wilcox)++ | doc/Type/Callable.pod:
21:48 dalek doc: Minor edit for callable role doc
21:48 dalek doc: review: https://github.com/perl6/doc/commit/cdc260b937
21:48 ugexe skink: anything you `use`
21:48 BenGoldberg m: sub foo(:$foo!) { say $foo }; my &f = -> $foo { { foo(:$foo) } }; .(), .(), .() for f("var");
21:48 camelia rakudo-moar 40a953: OUTPUT«var␤No such method 'CALL-ME' for invocant of type 'Bool'␤  in block <unit> at /tmp/yTq8qRvMZW line 1␤␤»
21:48 skink Xliff, Originally used for bash commands
21:48 BenGoldberg m: sub foo(:$foo!) { say $foo }; my &f = -> $foo { -> { foo(:$foo) } }; .(), .(), .() for f("var");
21:48 camelia rakudo-moar 40a953: OUTPUT«var␤var␤var␤»
21:48 skink But I removed most of them and the rest were just rm
21:50 MadcapJake rudi_s: so explicitly-manage is not recommended? What are the differences between using it and using a CArray[uint8]? We should probably have some mention of explicitly-manage since it is is in NativeCall and others uses it.
21:50 awwaiid Xliff: you've been doing windows stuff lately maybe you know -- is rakudo-star supposed to come with panda (aka am I doing something wrong with 2016.01 that it isn't there)?
21:51 skink ugexe, I imagine I can take them out of regular depends if I add them to build-depends?
21:51 skink Should just be LibraryMake, Panda and Crypt::Random now
21:52 ugexe Panda requires Shell::Command itself
21:52 skink ... Well then.
21:52 skink That complicates things
21:52 ugexe https://github.com/ugexe/zef#build-paths
21:52 ugexe there is how to write a panda-free Build.pm
21:54 Xliff awwaiid: I don't think panda was included in the MSI.
21:54 Xliff I know rakudobrew typically installs panda, though.
21:54 rudi_s MadcapJake: Yes, that's what I got from the discussion. - Scoped Carray[uint8] is automatically deallocated once it goes out of scope. I've no idea how memory management works for explicitly-mange.
21:55 Xliff "choco install strawberryperl"
21:55 Xliff ugexe, choco?
21:55 ugexe its like a windows apt-get
21:55 Xliff *drool*
21:55 Xliff I'll have to find that.
21:55 Xliff Later.
21:56 Xliff Something in my environment is making zef puke on the fetching stage. This is for any module.
21:56 Xliff Missing bin, maybe?
21:56 awwaiid thanks Xliff . Next weekend I'm doing a getting-started tutorial and am practicing windows
21:57 ugexe i have an idea, i think its due to git:// vs https:// and if you have your git creds saved
21:57 Xliff No worries. I'm here if you need something tested.
21:57 Xliff ugexe, pretty sure I do.
21:58 skink ugexe, With those changes, panda-build no longer works
21:59 ugexe the ecosystem mangles the source-url of modules to https. you could try `zef --help`, edit the file listed next to "CONFIGURATION" so the first mirror of "ContentStorage -> p6c" so its http://ecosystem-api.p6c.org/projects.json
22:00 skink class Build, not class Builder
22:00 ugexe (or edit ~/.zef/store/p6c/packages.json where you s/^ git:// / https:// /)
22:00 MadcapJake rudi_s: but the whole point of using explicitly-manage for const char * is that it means that Perl 6 _will not_ deallocate the string, the programmer and the C API are responsible for that.
22:01 ugexe if that works then i'll have to make sure the source-url is always mangled...
22:01 rudi_s MadcapJake: The whole const char * makes no sense at all.
22:01 rudi_s That was my main complaint and the reason why I removed it after discussion here.
22:01 MadcapJake rudi_s: What do you mean?
22:01 rudi_s MadcapJake: The argument "const char *" vs. explicitly-manage.
22:02 rudi_s strcmp takes const char *, but perl6 can free the memory just fine after calling the function.
22:02 rudi_s There should be no reason to use explictly-manage and a better way is the currently explained scoped variable.
22:02 MadcapJake ahh so you're saying that const does not necessarily mean you need to explicitly-manage, it's more about how a given function uses the string
22:03 rudi_s Yes. That's the first part. The second is, that there's no reason to use explictly-manage.
22:03 rudi_s *and the scoped variable is a better solution.
22:04 MadcapJake Interesting, alrighty, thanks for the rundown!
22:04 rudi_s np
22:05 skink I guess I should only trigger the build method if we're not on Windows...
22:06 ugexe skink: whats the output when you just run `perl6 -Ilib Build.pm`
22:06 skink nothing
22:07 skink panda-build does work now
22:07 ugexe thats how you can debug it (just run it like a script, add debug statements)
22:07 ugexe er sorry its
22:08 ugexe perl6 -I. -MBuild -e 'Build.new.build($*CWD)'
22:10 skink I _think_ I can drop build-depends to LibraryMake, Crypt::Random with no depends
22:11 skink now that I've dropped Panda and Shell::Common
22:15 skink Xliff, pushed
22:20 BenGoldberg joined #perl6
22:23 aleogen joined #perl6
22:26 Xliff ugexe, Wild! Changing LibraryMake source-url to https fixed the problem for all of the dependencies.
22:26 ugexe Xliff: thanks for trying that. i'll add an option to zef to allow picking the git prefix used
22:27 Xliff skink: What native library is Crypt::Bcrypt looking for?
22:29 Xliff AHA!
22:29 Xliff ugexe: If zef is running under Windows you need to make sure you are looking in the right home dir.
22:29 ugexe it uses $*HOME, so it lets perl6 handle that
22:30 Xliff If I am on C:, it works because the packages.json file exists.
22:30 Xliff If I am on D:... it fails because the file DOESN'T exist in D:\Users\Cliff\.zef\store
22:31 skink %?RESOURCES<crypt_blowfish.dll>.Str
22:32 skink aka resources/crypt_blowfish.dll
22:33 Xliff >perl6 -e "say $*HOME"
22:33 Xliff "C:\Users\Cliff".IO
22:33 Xliff That is correct.
22:34 Xliff But still, somehow zef works if the shell is in a directory on C:
22:34 Xliff And fails if I am in D:
22:34 ugexe hmm, i have a feeling its not zef
22:34 ugexe but %?RESOURCES
22:35 Xliff skink:
22:35 Xliff ===> Testing [FAIL]: Crypt::Bcrypt:ver('1.3')
22:35 Xliff Aborting due to test failure: Crypt::Bcrypt:ver('1.3')
22:36 Xliff Cannot locate native library 'C:\Users\Cliff\.zef\store\p6-Crypt-Bcrypt.git\61c8
22:36 Xliff d043bad613c0189a9dc2c2cb8791be79ce84\resources\crypt_blowfish.dll': error 0xc1
22:37 Xliff Lib is instead installed at C:\Users\Cliff\.zef\tmp\p6-Crypt-Bcrypt.git\resources
22:38 Xliff Everything is awesome (and no, I'm not talking about the Lego movie)
22:38 Xliff https://www.voidtools.com/
22:38 skink If you copy the dll into that dir does it work?
22:38 Xliff Checking now.
22:40 perlawhirl joined #perl6
22:41 Xliff Nope. dll is already located in that dir, too.
22:42 Xliff git pulled and still failing.
22:43 skink 0xC1 looks like a memory error
22:43 skink So it might be the lib's being found but failing to load
22:43 Xliff Could be.
22:43 Xliff skink: Is that DLL compiled for 64-bit?
22:44 skink I should probably have added 32 onto that eh?
22:44 skink It was 586 cross-compiled
22:44 Xliff OK.
22:44 Xliff I'm on a 64 bit machine and rakudo is compiled 64 bit, so I was wondering if that mattered.
22:49 skink 32bit libs should work
22:53 skink Also there's -cc and -gcc for mingw and I'm not sure if that makes a huge difference
22:53 bjz joined #perl6
22:53 hjst joined #perl6
22:53 BenGoldberg joined #perl6
22:53 Xliff kk
22:54 Xliff So maybe it is a memory thing.
23:13 timotimo there must be something i'm missing
23:14 timotimo why can't i ctrl-c out of a loop in bash?
23:17 Xliff You sure the BRK key is set to ^C?
23:18 Juerd Sometimes you can ^C a loop in bash, sometimes not. I've never figured out why.
23:18 Juerd But one option is ^Z and then kill %1
23:20 ugexe Xliff: added optional forcing https for github urls when using `git`. thanks for tracking that problem down
23:21 geekosaur bash sometimes does this thing where it kills the current iteration and goes on to the next.
23:22 Xliff ugexe: Might also want to look into the C:, D: issue.
23:23 Xliff I'm pretty sure I'm also experiencing that. I've done several tests.
23:23 Xliff I have confirmed that $*HOME is correct.
23:24 ugexe what is the path shown next to "CONFIGURATION" when you run `zef` from D: and from C:?
23:24 ugexe er when you run `zef --help`
23:24 Xliff One sec.
23:25 Xliff D: -> CONFIGURATION D:\SVN\Github\rakudobrew\moar-nom\install\share\perl6\site\resources\1F29702A476391AE0318E060ADE9CA2BB2B0F993.json
23:26 Xliff C: -> CONFIGURATION D:\SVN\Github\rakudobrew\moar-nom\install\share\perl6\site\resources\1F29702A476391AE0318E060ADE9CA2BB2B0F993.json
23:29 ugexe hmm, but the error you encounter is trying to load it from C; somewhere correct?
23:31 ugexe (seems somewhere a .IO.absolute is used when it doesnt really know its volume)
23:34 ugexe (unrelated) also worth pointing out that usually one should use $path.IO.parent instead of $path.IO.dirname in most cases, as .parent retains the volume on windows
23:37 Xliff Anyone have suggestions on a more modern X11 editor?
23:37 Xliff gvim is giving me pains.
23:38 Xliff ugexe: The error I am encountering is as follows: If I run zef from C: the fetch stage works. If I run it from any other drive, the fetch stage fails.
23:39 awwaiid Xliff: you could try Atom
23:39 ugexe Xliff: oh ok. that should be enough for me to track it down
23:39 Xliff awwaiid: Is that in apt?
23:39 ugexe i use sublime text
23:40 awwaiid sadly no, but easy to get. download .db from https://atom.io/
23:40 Xliff I do too. It's not ported to Linux, is it?
23:40 awwaiid Sublime does have a linux build. Atom is practically a clone initially, though is growing into being much more
23:41 awwaiid er, a .deb not a .db
23:41 Xliff awwaiid, thanks. Downloading now.
23:41 Xliff Heh! I knew what you meant ^_-
23:41 awwaiid Xliff: hm. my apt-get does have atom after all
23:42 awwaiid oh wait, maybe that's because I installed the .deb. confusing
23:42 Xliff Heh
23:42 geekosaur yeh, atom doesn't have a repo as yet, just download the deb periodically :/
23:42 Xliff Nooo! No 32 bit version!?
23:43 timotimo o_O
23:43 timotimo why are you limited to 32bits, you poor soul?
23:43 Xliff It's a VM
23:44 timotimo all my vms have been 64bit so far :o
23:44 awwaiid I don't even run 32 bits in vms anymore :)
23:44 Xliff I could update to a 64 bit VM, I guess.
23:44 Xliff But the one I am running is long in the tooth. However it has served me very well.
23:44 Xliff I am hesitant to throw it under the bus.
23:45 timotimo that's even less problematic with a vm compared to a hardware machine :P
23:47 awwaiid I'm sure htere are lots of other editors
23:47 awwaiid like gnome-edit or something like that
23:48 timotimo gedit is the name
23:48 timotimo geany isn't bad, all things considered
23:48 timotimo and kate is also not bad
23:49 skink Xliff, Yeah, I built the lib wrong
23:49 skink Checking with a friend atm
23:50 Xliff skink,  OK
23:51 skink pushed a new dll
23:51 skink notably larger this time
23:52 Xliff *sigh*
23:52 Xliff Docker only for 64 bit, which means atom only for 64 bit.
23:52 Xliff Looks like the lifespan of this VM is growing short. :P
23:54 * Xliff finds Sublime Text for Linux and dances.
23:57 skink Emacs actually runs well on Windows
23:58 skink Xliff, So... the dll from before wasn't actually being built as a shared library I don't think :)
23:58 ZoffixWin Sublime sucks for P6
23:58 skink I manually built it this time instead of modifying the build script

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

Perl 6 | Reference Documentation | Rakudo