Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-03-29

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:01 cdg joined #perl6
00:01 labster joined #perl6
00:05 BenGoldberg joined #perl6
00:19 avuserow thanks perlawhirl++, will take a look.
00:20 perlawhirl you're welcome. i may not know much about nativecall or c++, but i have a good memory :D
00:26 teatime m: say "(abc def)"; say ('abc', 'def');
00:26 camelia rakudo-moar 27dca5: OUTPUT«(abc def)␤(abc def)␤»
00:27 teatime I guess everyone else is confident enough in the object model etc. to not be bothered by that kind of ambiguity :/  for less ambigous inspection, should I be doing .perl?  .gist?  YAMLize?
00:31 polyfloyd joined #perl6
00:32 sortiz m: say "(abc def)".perl; say ('abc', 'def').perl
00:32 camelia rakudo-moar 27dca5: OUTPUT«"(abc def)"␤("abc", "def")␤»
00:33 perlawhirl short answer: yes, .perl, otherwise it gets stringified in the most basic way
00:34 Khisanth joined #perl6
00:34 perlawhirl but regardless, you would always be able to get ambiguos output with a print "" statement
00:35 perlawhirl m: say '("abc", "def")'; say ('abc', 'def').perl
00:35 camelia rakudo-moar 27dca5: OUTPUT«("abc", "def")␤("abc", "def")␤»
00:36 sortiz teatime, .perl output is assumed to be EVALuable to reconstruct the object, .gist is only for a "rapid inspection".
00:37 sortiz For debugging I almost use dd.
00:51 huf joined #perl6
01:02 Khisanth joined #perl6
01:03 teatime what exactly is dd anyway?
01:03 teatime data dump?  debug dump?
01:07 Juerd Data dump
01:08 Juerd But feel free to pick your own favorite nickname :)
01:14 jack_rabbit joined #perl6
01:20 molaf_ joined #perl6
01:29 Khisanth joined #perl6
01:43 kalkin-_ joined #perl6
01:53 Khisanth joined #perl6
02:03 colomon joined #perl6
02:05 Vitrifur joined #perl6
02:11 Khisanth joined #perl6
02:14 labster joined #perl6
02:14 mkz_ joined #perl6
02:22 TEttinger joined #perl6
02:40 Khisanth joined #perl6
02:46 JRaspass joined #perl6
02:48 noganex joined #perl6
02:53 tony-o there is also a Data::Dump module for colors
03:02 MadcapJake` joined #perl6
03:03 MadcapJake_ joined #perl6
03:05 MadcapJake de-dumbify
03:06 MadcapJake delicately dismantle
03:07 MadcapJake dangerous derivation
03:08 MadcapJake dubious demarcation
03:08 MadcapJake delightful deluge
03:08 * MadcapJake quits while he's ahead
03:09 * MadcapJake notices the crickets in the room...
03:11 Khisanth joined #perl6
03:11 labster joined #perl6
03:19 teatime how come using PERL6LIB=$HOME/lib makes perl6 spend a bunch of time building a big $HOME/lib/.precomp/ tree the first time it's ran?
03:19 teatime I would like to understand more about module loading... let's see if there's any design docs on it...
03:23 tony-o teatime: precomp happens when perl6 is ran if it hasn't happened yet
03:23 tony-o it compiels to .moarvm or .jvm versions of the modules for the compiler version
03:25 teatime I see.  but it's compiling more than just what exists in the lib/ dir.
03:25 teatime it does it even if the lib/ dir is empty.
03:25 teatime is that normal?
03:25 sortiz teatime, currently rakudo uses the first repo in its repo chain for precompilation, so when you use PERL6LIB, -Ifoo or "use lib 'foo'" you are changing the directory for .precomp.
03:25 teatime gtcha.
03:26 sortiz This is expected to change soon, and the details are in flux.
03:28 spintronic_ joined #perl6
03:36 MadcapJake teatime: https://gist.github.com/jnthn/47a42b2e86e7e552b2e2
03:38 Khisanth joined #perl6
03:44 MadcapJake any knowledgeable C devs on right now? I am trying to send an email with Curl via Net::Curl and I have no idea how to implement the CURLOPT_READFUNCTION callback
03:45 MadcapJake Here's an example https://curl.haxx.se/libcurl/c/smtp-tls.html
03:45 MadcapJake Here's the docs https://curl.haxx.se/libcurl/c/CURLOPT_READFUNCTION.html
03:46 MadcapJake Here's my current state https://gist.github.com/MadcapJake/05ecec7b8db16fa83b74
03:53 spintronic_ joined #perl6
03:55 teatime for one, I assume you'd need to work explicitly in bytes (Buf ?) rather than unicode strings.
03:58 teatime also, it looks like the callback signature/behavior is the same as fread(), if that helps.
03:58 Khisanth joined #perl6
03:59 teatime MadcapJake: it seems like you could just not provide this, and allow it to use its default?
03:59 MadcapJake yeah but I don't want to have a file I want to use a string, will that just work?
04:00 teatime no, I was afraid that was what you were getting at :)
04:00 MadcapJake the fallback callback :P is supposed to be given a filepath I believe
04:01 teatime a FILE stream.
04:01 teatime but your callback gets whatever you gave to https://curl.haxx.se/libcurl/c/CURLOPT_READDATA.html
04:02 teatime "If you don't specify a read callback but instead rely on the default internal read function, this data must be a valid readable FILE * (cast to 'void *').
04:02 MadcapJake so what's that mean? xD
04:03 teatime let me see what I can learn abotu Native____ in 3 minutes.
04:03 MadcapJake teatime: I wrote up a text post on reddit if you're a redditor https://www.reddit.com/r/perl6/comments/4cdunm/sending_an_email_with_netcurl/
04:08 teatime MadcapJake: There are two cases to handle:  1) You want to read the data from a file, and 2) You want to read the data from elsehwere.
04:08 MadcapJake right, I want door #2
04:08 teatime For case 1, I beleive you can pass http://doc.perl6.org/type/IO::Handle#method_native-descriptor <-- the return of this in as the FILE* argument, and not specify your own callback.
04:09 MadcapJake yeah I figured that, I'm half-tempted to just write the email to disk to save me the trouble of writing this callback :P
04:11 teatime fr the other case, you might could use this?  http://doc.perl6.org/routine/native-descriptor#class_IO::Handle
04:12 MadcapJake no that will only let me write via stdin/stdout or a file still
04:13 MadcapJake native-descriptors are numbers that represent files or pipes
04:15 teatime or, looking further than the  or this might help:  https://github.com/moznion/p6-Stream-Buffered
04:16 teatime that's true MadcapJake, but I imagine there is something to fake a stream.
04:16 teatime either that Stream-Buffered 3rd party module, or.. I thought I linked IO::Pipe here; you might can manage w/ that also.
04:17 teatime anyway, if you *can* manage that way, then once again, you can avoid providing your own callback function.
04:19 MadcapJake Hmm I think I need to rest and I'll take a look at those ideas tomorrow.  Thanks teatime!
04:20 * MadcapJake heads to bed
04:20 teatime maybe I could try to give it a shot.
04:20 teatime now that I have thought more, it does make more sense to just provide the function.
04:25 Khisanth joined #perl6
04:31 JRaspass joined #perl6
04:47 pierrot joined #perl6
04:49 Cabanossi joined #perl6
04:51 Khisanth joined #perl6
04:53 cpage_ joined #perl6
05:01 musiKk_ joined #perl6
05:30 nadim joined #perl6
05:34 nowan joined #perl6
05:34 aindilis joined #perl6
06:23 darutoko joined #perl6
06:25 domidumont joined #perl6
06:27 CIAvash joined #perl6
06:30 domidumont joined #perl6
06:35 sjoshi joined #perl6
06:37 abraxxa joined #perl6
06:42 wamba joined #perl6
06:48 _nadim joined #perl6
06:50 fireartist joined #perl6
06:56 bjz joined #perl6
07:00 teatime I wonder just how far off this still is:  http://paste.debian.net/421908/
07:03 maybekoo2 joined #perl6
07:04 bjz joined #perl6
07:12 zakharyas joined #perl6
07:23 labster joined #perl6
07:26 jkramer left #perl6
07:27 Khisanth joined #perl6
07:36 bhm joined #perl6
07:42 rindolf joined #perl6
07:43 teatime bah, I can't remember how to use the reminder bot.
07:44 moritz .tell teatime like this
07:44 yoleaux moritz: I'll pass your message to teatime.
07:44 teatime moritz++
07:44 yoleaux 07:44Z <moritz> teatime: like this
07:44 teatime .tell MadcapJake This may be further along:  http://paste.debian.net/421908/
07:44 yoleaux teatime: I'll pass your message to MadcapJake.
07:45 teatime .tell MadcapJake er, correction:  https://gist.github.com/pprince/208f3218852e9ee59876
07:45 yoleaux teatime: I'll pass your message to MadcapJake.
08:24 mohae joined #perl6
08:33 g4 joined #perl6
08:33 g4 joined #perl6
08:33 Khisanth joined #perl6
08:34 lizmat And finally, another Perl 6 Weekly hits the net: https://p6weekly.wordpress.com/2016/03/29/2016-13-a-language-for-heapsters/
08:35 M-Illandan joined #perl6
08:35 RabidGravy joined #perl6
08:36 moritz lizmat++
08:38 M-matthew joined #perl6
08:39 lizmat afk for a few hours&
08:44 RabidGravy Harr!
08:51 M-matthew joined #perl6
09:00 araujo joined #perl6
09:01 araujo joined #perl6
09:01 araujo joined #perl6
09:09 keix joined #perl6
09:13 Khisanth joined #perl6
09:19 perlawhirl joined #perl6
09:21 azawawi joined #perl6
09:21 azawawi hi
09:21 teatime good morning.
09:22 teatime I've been checking out your stuff, azawawi
09:22 azawawi https://gist.github.com/azawawi/b834f3ec7d0a7bccdcfa   # Silently dies when looping on CArray[Str] result
09:22 azawawi teatime: cool
09:23 teatime someone was trying earlier to figure out how to write a certain native callback
09:23 teatime and I decided to see how far I could get w/ it.
09:24 teatime didn't finish, but if you happen to find the time it would be interesting to hear what things here might be way off-base:  https://gist.github.com/pprince/208f3218852e9ee59876
09:24 teatime especially curious if the callback routine would be a closure with read access to its containing scope.
09:24 * azawawi takes a look
09:25 teatime the background is, read_callback should have the same signrature as fread(), and gets called by the curl lib repeatedly to read data into $dst-buffer
09:26 teatime if not actually using fread() and a fd/stream, though, you can set the last param (usually FILE*fp) to whatever you choose.
09:27 azawawi teatime: have to debug it. Could you open an issue on it?
09:28 teatime it's incomplete
09:28 azawawi teatime: to tell you the truth, i have not tried any of the SMTP stuff so far
09:29 teatime no I mean the code example is incomplete.
09:29 azawawi teatime: as you may already know libcurl supports a lot of protocols
09:29 teatime it compiles, but it doesn't have the rest of the stuff to actually know if it works.  I assume I did a lot of wrong stuff though.
09:30 azawawi teatime: let me look at the c examples... brb
09:30 teatime it's not that important.
09:30 azawawi https://github.com/azawawi/perl6-net-curl/tree/master/examples/TODO
09:31 * masak .oO( and the puns keep heaping up )
09:31 azawawi teatime: something like https://github.com/azawawi/perl6-net-curl/blob/master/examples/TODO/smtp-multi.c
09:31 fireartist joined #perl6
09:32 teatime nice, I bet MadcapJake will find that v. useful.
09:33 azawawi RabidGravy: ping
09:33 teatime I was more interested in the perl syntax issues, though.  like, is the access of $src-buf inside read_callback at line 61 legal, or does it have to be passed in via arguments?
09:33 Actualeyes joined #perl6
09:34 RabidGravy BOOM!
09:34 azawawi wow
09:34 azawawi :)
09:34 azawawi RabidGravy: that's like a fiber line ping
09:35 azawawi RabidGravy: checkout this https://gist.github.com/azawawi/b834f3ec7d0a7bccdcfa   # Silently dies when looping on CArray[Str] result
09:35 azawawi RabidGravy: did you encounter such a behaviour with CArray before?
09:36 polyfloyd joined #perl6
09:38 azawawi RabidGravy: CArray[Str] fails silently on conversion... no exception whatsoever
09:39 RabidGravy I would go with a) CArray[uint8], (CArray[Str] will be an char **str - an array of pointers to strings) b) initialised with $foo[MAX-lEN] = 0 and it auto-extends
09:39 RabidGravy then on get back convert to a Blob and .decode
09:40 jnthn azawawi: Are you on Windows? If so, under some configs, it makes a *segfault* silent
09:40 jnthn echo %ERRORLEVEL% at the command line after it fails can be revealing
09:41 azawawi jnthn: I see. thanks
09:41 azawawi CArray[uint16] works
09:41 RabidGravy poor windows, I used to like ye old "General Protection Fault"
09:41 jnthn Generally though, working with NativeCall, you can easily trigger SEGVs if you use it wrong.
09:41 jnthn It's the nature of the beast.
09:42 azawawi i noticed :)
09:42 azawawi NativeCall aka the beast :)
09:43 azawawi use Beast;
09:43 teatime use v6.66;
09:44 masak " In fact, we probably wouldn't end up converging on a version number of 2*PI as the RFC suggests, but rather on 6.6.6, which would be rather unfortunate."
09:44 masak your joke is like, 15 years ancient :P
09:44 masak http://www.perl6.org/archive/doc/design/apo/A01.html
09:44 teatime lol.
09:44 espadrine joined #perl6
09:48 znpy joined #perl6
09:56 perlawhirl can someone remind me where i can see a simple example of parallelizing a for-loop with await/start
09:56 perlawhirl i've seen it somewhere, but can't find where
09:56 jnthn await do for @x { start { ... } }
09:57 araujo joined #perl6
09:57 perlawhirl ahh ! i was missing the do
09:57 perlawhirl thanks, jnthn
09:57 RabidGravy there are examples in http://doc.perl6.org/language/concurrency#Promises
09:58 araujo joined #perl6
09:58 araujo joined #perl6
09:59 sue joined #perl6
10:08 gregf_ is there also a way to tell the jvm that a thread died midway?
10:08 gregf_ s/thread/promise/
10:17 CurtisOvidPoe I assume the “is that a thread? No, it’s a promise” jokes have already been made?
10:20 * perlawhirl claps
10:20 perlawhirl if it has, it's the first time i've heard it
10:21 gregf_ oh, so a promise is like a Future that depends on a ThreadpoolExecutor to execute a Thread? *java tbp*
10:21 CurtisOvidPoe Thank you, I’ll be here all week. (But obviously won’t be quitting my day job given the narrow audience for my humor)
10:21 arnsholt I haven't heard it before, but knowing jnthn, TimToady, masak et al, I wouldn't be surprised if it had been done =)
10:23 Khisanth joined #perl6
10:23 jnthn gregf_: Promises run on a ThreadPoolScheduler which is implemented in Perl 6, which manages a bunch of Perl 6 Thread objects, which are in turn backed by the VM's idea of thread (so, a JVM Thread object on the JVM)
10:26 sue joined #perl6
10:26 gregf_ jnthn: thanks. *lots of reading to be done*
10:37 gregf_ those docs are excellent!
10:38 gfldex thank you
10:44 gfldex m: -> $a, $b { say $a + $b }(3, 4)
10:44 camelia rakudo-moar 27dca5: OUTPUT«7␤»
10:44 gfldex m: { say $^a + $^b }(3, 4)
10:44 camelia rakudo-moar 27dca5: OUTPUT«7␤»
10:45 dvinciguerra__ joined #perl6
10:46 dalek doc: 5f83386 | (Wenzel P. P. Peppmeyer)++ | doc/Language/functions.pod:
10:46 dalek doc: we can call subs and blocks in place
10:46 dalek doc: review: https://github.com/perl6/doc/commit/5f83386eb1
10:49 gfldex m: class A { method b (:$c) {} }; A.new.b(c=>1, b=>1){}; sub s(:$c) {}; s(c=>1)
10:49 camelia rakudo-moar 27dca5: ( no output )
10:49 gfldex m: class A { method b (:$c) {} }; A.new.b(c=>1, b=>1){}; sub s(:$c) {}; s(c=>1, b=>1)
10:49 camelia rakudo-moar 27dca5: OUTPUT«Unexpected named parameter 'b' passed␤  in sub s at /tmp/4PuP4ONCYw line 1␤  in block <unit> at /tmp/4PuP4ONCYw line 1␤␤»
10:50 Relsak joined #perl6
10:51 dalek ecosystem: 1714b66 | RabidGravy++ | META.list:
10:51 dalek ecosystem: Add Lumberjack
10:51 dalek ecosystem:
10:51 dalek ecosystem: See https://github.com/jonathanstowe/Lumberjack
10:51 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/1714b6690a
10:51 jnthn .oO( But does it test OK? )
10:52 lizmat .oO( I sleep all night and I test OK )
10:52 RabidGravy But it does want to be a girly like it's dear mama
10:53 solarbunny joined #perl6
10:54 RabidGravy I would have got that out last night, but I exited vim without saving after I typed in 3/4 of the POD
10:54 colomon joined #perl6
10:55 gfldex http://doc.perl6.org/type/Metamodel::C3MRO got dead links to nextsame and friends. I'm unsure where to put them.
10:55 jnthn .oO( I hack some code, I write some docs, I :q! ARGH )
10:56 RabidGravy :)
10:57 moritz gfldex: nextsame is deocumented in language/functions
10:59 RabidGravy right off out into the "sunlight" for a bit
11:00 dalek doc: 46b2d2a | (Wenzel P. P. Peppmeyer)++ | doc/Language/objects.pod:
11:00 dalek doc: doc intended ignorance of additional named args for methods
11:00 dalek doc: review: https://github.com/perl6/doc/commit/46b2d2a263
11:04 dalek doc: 60aa9b8 | (Wenzel P. P. Peppmeyer)++ | doc/Language/functions.pod:
11:04 dalek doc: indexify nextsame and friends
11:04 dalek doc: review: https://github.com/perl6/doc/commit/60aa9b84d4
11:05 azawawi joined #perl6
11:06 avenj joined #perl6
11:06 azawawi https://github.com/azawawi/perl6-file-which/blob/master/examples/02-win32-native.pl6 # the joy of living in windows to implement which (aka find executable path).... :)
11:07 azawawi https://gist.github.com/azawawi/42b633dbf846ab86f980  # interesting output, cmd cannot be via win32 API but can be found in %PATH% :)
11:08 azawawi s/cannot be/cannot be found/
11:19 kid51 joined #perl6
11:19 gfldex m: dd Any.new.map(-> $a {})
11:19 camelia rakudo-moar 27dca5: OUTPUT«(Nil,).Seq␤»
11:20 dalek doc: d264777 | (Wenzel P. P. Peppmeyer)++ | doc/Type/Any.pod:
11:20 dalek doc: doc Any.map and therefor Hash.map
11:20 dalek doc: review: https://github.com/perl6/doc/commit/d26477785e
11:21 gfldex gregf_: please note that there are still quite a few holes in the docs. And thanks for motivating me to go through my list.
11:22 sue joined #perl6
11:25 gfldex m: my $x is default(now); dd $x.Int; sleep 5; dd $x.Int
11:25 camelia rakudo-moar 27dca5: OUTPUT«1459250764␤1459250764␤»
11:25 gfldex m: my $x is default({now}); dd $x.Int; sleep 5; dd $x.Int
11:25 camelia rakudo-moar 27dca5: OUTPUT«Method 'Int' not found for invocant of class 'Block'␤  in block <unit> at /tmp/hldGqHsSUO line 1␤␤»
11:25 gfldex m: my $x is default({now}); dd $x; sleep 5; dd $x
11:26 camelia rakudo-moar 27dca5: OUTPUT«Block $x = -> ;; $_? is raw { #`(Block|65510640) ... }␤Block $x = -> ;; $_? is raw { #`(Block|65510640) ... }␤»
11:26 travis-ci joined #perl6
11:26 travis-ci Doc build errored. Wenzel P. P. Peppmeyer 'doc Any.map and therefor Hash.map'
11:26 travis-ci https://travis-ci.org/perl6/doc/builds/119216311 https://github.com/perl6/doc/compare/60aa9b84d42b...d26477785e49
11:26 travis-ci left #perl6
11:26 gfldex is there any way to have a closure in `is default` ?
11:27 jnthn No
11:27 gfldex ==> Installing File::Find
11:27 gfldex Internal error: zeroed target thread ID in work pass
11:28 gfldex that made travis unhappy
11:28 jnthn Urgh. That'd be a GC bug. :/
11:28 gfldex let me play this ball right over to you :->
11:30 jnthn gfldex: If you've a moment, please file a link to that Travis fail in a MoarVM issue
11:31 lizmat m: my $a is default( { rand } )   # gfldex: you actually can, but you would still need to call it yourself
11:31 camelia rakudo-moar a424f0: ( no output )
11:32 lizmat m: my $a is default( { rand } ) ; $a()
11:32 camelia rakudo-moar a424f0: ( no output )
11:32 lizmat m: my $a is default( { rand } ) ; say $a()
11:32 camelia rakudo-moar a424f0: OUTPUT«0.725812561931561␤»
11:32 gfldex jnthn: done
11:33 gfldex lizmat: not very dwimy that
11:33 lizmat m: my $b; my $a is default( {$b} ); $b = 42; say $a()
11:33 camelia rakudo-moar a424f0: OUTPUT«42␤»
11:33 lizmat gfldex: indeed...
11:34 jnthn gfldex: Thanks
11:35 dalek doc: 4aa57a3 | (Wenzel P. P. Peppmeyer)++ | doc/Type/Variable.pod:
11:35 dalek doc: is default is evaluated at compile time
11:35 dalek doc: review: https://github.com/perl6/doc/commit/4aa57a359d
11:35 jnthn If `is default` magically called thunks you'd have no way to default to a closure
11:35 jnthn Which would be the icky WAT to go with your DWIM :)
11:35 gfldex magic is hard
11:35 lizmat yeah...
11:36 jnthn Knowing how `is default` works under the hood...it'd be really quite tricky to arrange for some code to be run
11:37 gfldex we need a trait called `is magic` :->
11:37 kaare_ joined #perl6
11:37 moritz but THE WHOLE LANGUAGE is already magic!
11:37 gfldex actually `Proxy` is usable as a magic substitute already
11:39 jnthn Yeah, Proxy is probably the best bet for the moment on that
11:39 TreyHarris joined #perl6
11:45 molaf_ joined #perl6
11:46 woodruffw joined #perl6
11:46 woodruffw joined #perl6
11:47 espadrine joined #perl6
11:55 dalek doc: 4fcb90a | (Wenzel P. P. Peppmeyer)++ | doc/Language/typesystem.pod:
11:55 dalek doc: doc subset
11:55 dalek doc: review: https://github.com/perl6/doc/commit/4fcb90a277
11:58 pecastro joined #perl6
12:04 molaf_ joined #perl6
12:17 travis-ci joined #perl6
12:17 travis-ci Doc build passed. Wenzel P. P. Peppmeyer 'doc subset'
12:17 travis-ci https://travis-ci.org/perl6/doc/builds/119222404 https://github.com/perl6/doc/compare/4aa57a359d25...4fcb90a2770c
12:17 travis-ci left #perl6
12:30 Begi joined #perl6
12:33 |Tux| joined #perl6
12:37 Begi According to my benchmarks, the Perl6 module Text::Markdown is ~ 3.8 times slower than the Perl 5 module Text::Markdown...
12:39 tadzik that's not that bad :D
12:40 Begi tadzik : you think so ? :/
12:41 tadzik that's less of a slowdown that I see in other things
12:42 pmurias joined #perl6
12:42 pmurias Begi: things used to be much slower in the past
12:43 Begi It would be really interesting to reduce this lack of performances, but not easy I guess !
12:44 Begi And I don't know if Perl 6 itself can help
12:57 El_Che Begi: we've got our best man on the job ;)
12:57 Skarsnik joined #perl6
12:57 tadzik and it has already improved *drastically* compared to a few months/years ago
12:57 masak several people, in fact
12:58 tadzik best men* then? :)
12:58 masak people, in fact
12:58 masak :)
12:58 El_Che Begi: https://6guts.wordpress.com/2016/03/06/digging-into-the-performancereliability-work/
12:58 tadzik right, every time I use "men" it's misinterpreted :)
12:59 masak tadzik: grr, why don't people don't understand when I use this *male* noun as a *neuter* noun!? :P
12:59 tadzik I talked to an anthropologist I hanged out with, and she said that people in papers often explicitely state "I'm going to use the word «men» as «people», not «males»"
12:59 El_Che neuter?
12:59 masak sorry, "why don't *men* understand..." :P
12:59 huf it *used* to be genderless! surely that counts for something :D
12:59 El_Che what should Freud say aboyt that :)
12:59 tadzik masak: I guess they're assuming the worst :)
12:59 tadzik it's trendy recently
12:59 huf but then yall lost "were" and now we're in this mess
12:59 masak tadzik: language is tricky business
13:00 tadzik yep
13:00 masak tadzik: it may have been possible to use it in a neutral way, but I don't think it is anymore. not without serious risk of misunderstanding.
13:00 masak that's the way things are, 'm afraid
13:00 El_Che https://en.wikipedia.org/wiki/Language_ideology
13:00 jnthn It's stupid, but yes.
13:00 huf nah, i dont think it was ever neutral
13:00 huf but when women had much lesser roles, naturally men were the default
13:00 jnthn There are plenty of examples of neuterl use.
13:01 El_Che jnthn: enjoying your blogposts, btw
13:01 arnsholt IIRC it's at least 1000 years since "man" was gender-neutral, so I think it's safe to say that ship has well and truly sailed =)
13:01 huf jnthn: yes, but they're in that particular context
13:01 El_Che gender-neutral is not the same thing as gender-invisible
13:01 tadzik arnsholt: can you truly say it's been 1000 years if people still use it that way?
13:01 huf the particular context of "it's alwyas men *anyway* who actually do things, women are daughters and then wives and then mothers"
13:01 arnsholt tadzik: Since it was the majority meaning, I think so yeah
13:01 jnthn huf: Yeah, I guess thus the push to not view it as neutral :)
13:02 arnsholt At least in Germanic. Other IE groups are probably different of course
13:02 huf jnthn: i think it being neutral was always a conceit
13:02 huf or has been for many centuries at least
13:03 moritz I'd like to point out that in German, plural always implies feminine postfixes
13:03 jnthn Quite possibly. I avoid it just out of it not being worth the debate/misunderstandings anyway. :)
13:03 tadzik arnsholt: I see
13:03 * moritz feels mistreated by this gender imbalance /s
13:03 huf moritz: that's another weird thing, the encroachment of noun classes on human genders
13:04 tadzik it's probably even more confusing to me since my native languages straight up does not have gender-neutral words for some things, so nobody cares if you default to male words
13:04 tadzik since there's no othew way
13:04 tadzik "someone" is masculine
13:04 huf mine doesnt have any concept of grammatical gender but still manages to be sexist at the level of words
13:04 huf :)
13:05 moritz and some*body* is human-centrics. Will the body-less AIs protest?
13:05 maybekoo2 joined #perl6
13:05 xiaomiao offense is taken not given ;)
13:05 huf moritz: given the latest attempt, it'll try to wipe us all out...
13:05 moritz huf: only the women and Jews :/
13:06 jnthn "Let's build an AI that learns from people"..."Oh crap, it learnt from people"
13:06 huf yes, "us". i'm included in that ;)
13:06 xiaomiao moritz: and gays, and gypsies, and communists
13:06 moritz xiaomiao: ... and a clown
13:06 xiaomiao let's not discriminate too much ;)
13:06 huf iow, the usual suspects
13:06 xiaomiao moritz: yes, clowns are horrible
13:06 jnthn Pretty depressing comment on the state of discourse on the internets :/
13:07 huf let's not pretend this is somehow an internet thing :)
13:07 masak moritz: I thought it was "some*pony*" these days :P
13:07 pmurias moritz: the real question is whether the body-less AIs will exterminate in retaliation ;)
13:07 moritz jnthn: agreed
13:07 moritz well, I hope the next AI maker is smart enough not to have it learn off of youtube comments
13:07 xiaomiao jnthn: IRL you have all the no-platformers, creating safe spaces and avoiding discussion
13:07 huf ah but what *should* it learn out of?
13:08 masak huf: #perl6 :P
13:08 xiaomiao compared to that the internet is liberal :\
13:08 huf masak: ah yes. julie is stupid and so is pete, only i'm smart because i have brains in my ass too :)
13:09 moritz masak: I wonder if an AI could learn to eval some Perl 6 by watching conversations with camelia :-)
13:09 sufrostico joined #perl6
13:10 nine moritz: in theory, I'd say it's possible
13:11 huf well that's *basically* how people learn, no?
13:11 jnthn huf: Yes, the optimistic view being that people act out believing worse things than they really do on the internet to get attention, and the pessimistic view being that they reveal their true thoughts...
13:11 huf jnthn: it's a combination of those two i think
13:11 jnthn Yeah, but I've no feel for how much of each it is
13:11 huf jnthn: when they say "i'd murder you", they mean "i wouldnt mind terribly if someone murdered you", so in that case they overstate their actual views :)
13:13 * masak .oO( in practice, people are lazy, and don't murder half as much as they self-report )
13:14 huf YES :)
13:14 huf also maybe their mother wouldnt approve, so they restrain themselves. etc
13:14 jnthn That's...comforting I guess :P
13:14 RabidGravy joined #perl6
13:14 huf it's what holds society together!
13:15 huf the dread of uncomfortable christmas dinners :)
13:15 znpy joined #perl6
13:17 ufobat joined #perl6
13:21 moritz "so honey, what did you do last month?" -- "I killed a few assholes from twitter" -- disapproving stares all around
13:21 * masak .oO( I mean, we'd all be at each other's throats right now, if it weren't for that standing Christmas dinner invitation. am I right? right? hello...? )
13:22 masak moritz: later, in the car home -- "I really wish you hadn't brought up those twitter killings. I could see the mortification on my mother's face."
13:23 * masak .oO( Someone Was Wrong On the Internet II )
13:24 perlawhirl joined #perl6
13:27 moritz masak: and now we just need to write the backstory (twitter and the killings :-)
13:28 masak to be fair, those were some really bad tweets
13:29 perlpilot sounds like a B movie plot
13:29 perlpilot ... no one thought that 140 characters could be so dangerous.
13:30 perlpilot "the killing characters"
13:31 perlpilot when rapier wit really does kill
13:31 perlpilot etc.
13:31 moritz masak: right, slandering the favorite band or something
13:32 edehont joined #perl6
13:32 masak perlpilot: "when 140 characters are not enough" :P
13:32 huf moritz: pff, nobody would murder for *that*
13:32 huf but perhaps a typo or grammatical error in that tweet? now we're talking!
13:32 moritz huf: what if both?
13:33 mr-foobar joined #perl6
13:33 * masak .oO( ur bnd sux )
13:33 huf the world would end.
13:33 nadim joined #perl6
13:34 perlawhirl joined #perl6
13:46 perlawhirl joined #perl6
13:49 tmch joined #perl6
13:52 skids joined #perl6
13:54 nadim joined #perl6
14:04 ptolemarch joined #perl6
14:10 ChoHag joined #perl6
14:13 pmurias_ joined #perl6
14:16 nadim hi, I asked about "compilatio scope", the problem is that Data::Dump::Tree is generic and thus can not see some function definitions, IE:  an infix<eqv>, that are defined in other scopes. is there a way to do that?
14:18 MadcapJake Finally figured out how to adjust my office chair's height :P
14:18 yoleaux 07:44Z <teatime> MadcapJake: This may be further along:  http://paste.debian.net/421908/
14:18 yoleaux 07:45Z <teatime> MadcapJake: er, correction:  https://gist.github.com/pprince/208f3218852e9ee59876
14:19 MadcapJake (It's an old-school screw-based adjustment)
14:19 Hotkeys Nice
14:19 jnthn nadim: The CLIENT pseudo-package can be useful for that
14:20 RabidGravy I just bought a new toolbox, *just* for screwdrivers - and having transplanted them all from the other toolbox it's nearly full already
14:20 MadcapJake anyone had a chance to look at my libcurl read_callback problem? https://www.reddit.com/r/perl6/comments/4cdunm/sending_an_email_with_netcurl/
14:21 nadim jnthn: google came back with zip about that
14:21 colomon joined #perl6
14:21 nadim a URL would be appreciated
14:21 MadcapJake RabidGravy: wow! I have one multi-tip screwdriver and a whole assortment of those mini computer screwdrivers
14:21 Hotkeys Ah yes
14:21 Hotkeys Security bits
14:22 Hotkeys The worst screws
14:22 MadcapJake hehe, indeed. DRM in the screwdriver world :P
14:23 RabidGravy electrical screwdrivers, woodworking screwdrivers, three squillion different cross heads etc etc
14:23 andreoss joined #perl6
14:24 RabidGravy there is probably still stuff that I use on that is kinda-sorta right
14:24 MadcapJake can you use the native trait without specifying a path to an .so?
14:25 jnthn nadim: https://design.perl6.org/S02.html#Pseudo-packages
14:25 MadcapJake e.g., «sub foo() is native() {...}»
14:25 jnthn MadcapJake: It means "In the current process" then, iirc
14:25 MadcapJake cool
14:25 cdg joined #perl6
14:26 nadim jnthn++
14:26 MadcapJake nadim: if you can't find something on doc.perl6.org, next step is the search bar on design.perl6.org :)
14:29 nadim I'll make that a habbit :)
14:29 MadcapJake .tell teatime this (your gist) looks like it could be it, but in all the C examples I've seen the $context that you have given to CURLOPT_READDATA is something written to from inside the CURLOPT_READFUNCTION (though I'm really not understanding how that works).
14:29 yoleaux MadcapJake: I'll pass your message to teatime.
14:30 MadcapJake in C, you can create a variable inside a function's scope and it will survive into the outer scope?
14:32 RabidGravy I don't think so
14:33 ilmari no, but if you declare it "static" the value will persist between invocations of the function
14:33 andreoss where panda's API is described?
14:33 ilmari linke perl's "state"
14:34 nadim Another question, I call routine that may not exist and catch X:Multi::NoMatch, that takes EONS. is there a mechanism to check if there is a signaure inscope that would match a call so I can avoid the exceptions?
14:35 MadcapJake boom! eureka moment, what I thought was leaving the scope of a function is actually want's coming into a function! (just confusingly named...)
14:35 MadcapJake s/want's/what's/
14:36 MadcapJake nadim: if there's a signature that would match, wouldn't it not through X::Multi::NoMatch?
14:37 nadim It is theowing that exception but I don't want to trigger it to start with
14:37 ugexe or if there is, wouldnt it still have to look for it the exact same way?
14:39 nadim I may have made a bad design choice by using multi rather than multiple subs, it looks cleaner but stops me from sorting them. I was counting on P6 to do the drty work
14:39 MadcapJake nadim: trigger what the NoMatch error? It will check all signatures of multis with the same name and only after not finding one, will it throw.
14:39 ugexe what exactly is the dirty work?
14:39 MadcapJake sorting? Why are you sorting subs?
14:40 ugexe i.e. `where` clauses on parameters
14:41 nadim the same sub is called with different arguments at different places, it may match in one place but not the other, so it will trigger an exception on those other contexts, that takes time
14:41 ugexe create a candidate to catch everything else maybe
14:41 nadim I'd like to check if ther e will be a match befor I call it rather than have the xception mechanism kick in. because that takes ages.
14:42 nadim ugexe: that may be a good idea but since the subs are created by end users, that means that they will have to do it each time, not a good ergonomy
14:42 MadcapJake strange that you say it takes ages, perhaps it's how you are constraining the arguments that's causing the lengthy execution
14:42 nadim no contrains on the arguments
14:43 MadcapJake can you give an example/gist?
14:43 ugexe yeah without constraints on the arguments my guess would be getting stuck in a loop somehow
14:43 MadcapJake iirc, multis were quite fast (perhaps faster than regular subs)
14:43 nadim fast when they exist maybe but when they don't ...
14:43 DrForr I'm using those for Prancer.
14:44 MadcapJake nadim: I'm not following what you mean by that
14:44 jnthn nadim: You could write a candidate that is catch-all (will match any arguments), which will be less specific than all the others that match, and put your non-match handling in there
14:45 MadcapJake can a proto access the signature of the sub? maybe that would be a route to take
14:45 ugexe it can access the signature of itself, which has everything
14:46 MadcapJake ugexe: itself meaning the signature of the eventual multi that will take over, too?
14:46 moritz and it can access &?ROUTINE.candidates
14:47 MadcapJake moritz: what form are those returned as?
14:47 moritz m: say &infix:<==>.candidates.perl
14:47 camelia rakudo-moar 330f81: OUTPUT«(sub infix:<==> ($?) { #`(Sub|47499104) ... }, sub infix:<==> (\a, \b) { #`(Sub|47501384) ... }, sub infix:<==> (Real \a, Real \b) { #`(Sub|47501232) ... }, sub infix:<==> (Int:D \a, Int:D \b) { #`(Sub|47499560) ... }, sub infix:<==> (int $a, int $b) { #`(…»
14:47 moritz m: say &infix:<==>.candidates[0].^name
14:47 camelia rakudo-moar 330f81: OUTPUT«Sub␤»
14:47 nadim jnthn: ugexe proposed that too but the subs have names, and they are added by end users, so I'd need to "fabricate" a catch all
14:47 MadcapJake neat! nadim that might be what you're looking for
14:48 * RabidGravy kisses moritz - of course that is my solution to dispatching to multis on other than just the signature!
14:48 * moritz blushes
14:49 nadim while I am comprehending the above, the example i run takes 1.5s , compilation, loading, ... and with a multi to match it takes 8 seconds, there's something to optimize here!
14:49 MadcapJake nadim: I think we need to see some code to know what's going on there
14:50 ugexe have you followed the dispatch to make sure its calling what you want?
14:50 ugexe not doing like sub1 -> sub2 -> sub3 -> sub2 -> sub3 -> sub2 -> sub4
14:50 nadim yes :) best is to clone https://github.com/nkh/P6-Data-Dump-Tree.git and run example/diff.pl with the block at lines 30+ uncommented
14:51 ugexe where is the actual multi causing problems
14:52 ugexe or is it in diff.pl itself?
14:52 MadcapJake ugexe: line 38
14:52 MadcapJake in diff.pl
14:53 andreoss # $ perl6
14:53 andreoss # To exit type 'exit' or '^D'
14:53 andreoss
14:53 andreoss why i'm getting this?
14:53 MadcapJake andreoss: so you know how to exit :)
14:53 Begi is it a problem ? :)
14:54 nadim moritz gave me the .candidate example a few weeks ago and I use it but not for that part of the code, mainly because of laziness as the multi can take 3 quite heavy signatures, grepping everything out is going to be a mess
14:54 andreoss MadcapJake: exit from what?
14:54 Begi Perl 6
14:54 andreoss btw typing 'exit' doesn't work
14:54 MadcapJake andreoss: the REPL, Read Eval Print Loop
14:55 Begi hmm, 'exit' doesn't work ?
14:55 MadcapJake andreoss: it's an interactive prompt that lets you enter perl 6 code
14:55 andreoss MadcapJake: it's not a REPL
14:55 MadcapJake andreoss: o_O huh?
14:55 ugexe MadcapJake: i dont see a multi for the method called on line 30
14:55 andreoss i've upgraded perl6, and now instead of REPL i get this
14:55 MadcapJake ugexe: multi sub rhs_filter(\r, Match $s, DDT_HEADER, ($depth, $glyph, @renderings), $)
14:56 MadcapJake andreoss: actually, the first line appears to not show the `>` char but it's still the REPL
14:56 ugexe line 38
14:56 nadim ugexe: passing a multi at line 33 in example/diff.pl triggers code at line 240, and the twomethds below too, in lib/Data/Dump/Tree.pm
14:56 MadcapJake oh no nvm, it shows up eventually
14:56 ugexe oh thats literally what you said
14:56 ugexe im going blind, i saw a 0 :x
14:57 Begi andreoss: what had you before your upgrade ?
14:57 [Coke] andreoss: what does perl6 --version say, and did you install Linenoise or Readline?
14:57 andreoss $ perl6 --version
14:57 andreoss This is Rakudo version 2016.03-49-g330f814 built on MoarVM version 2016.03-46-g50c7f6a
14:57 andreoss implementing Perl 6.c.
14:57 andreoss
14:58 ugexe this coding style is difficult to follow :(
14:58 MadcapJake andreoss: have you tried typing in some could `"hello world".say` or somesuch
14:58 andreoss [Coke]: no. should i? I've been using rlwrap this whole time
14:59 andreoss [Coke]: panda says Linenoise is installed already
14:59 nine andreoss: what do you mean by "panda's API"?
14:59 MadcapJake s/could/code/ :P
15:00 andreoss i've typed `die` and nothing happend
15:00 MadcapJake try "hello".say
15:00 MadcapJake do you see a `>` eventually?
15:01 MadcapJake (if not then something is definitely crashing, perhaps try uninstalling rlwrap)
15:02 nadim to simplify, if a multi is passed to the dumper, it will be called at three different places thrugh this code http://nopaste.linux-dev.org/?1028836  In the example I am talking about, it will only match in one place.
15:02 andreoss MadcapJake: suddenly it started to work
15:02 Khisanth joined #perl6
15:02 MadcapJake nadim: what is the ($depth, $glyph, @renderings) argument?
15:02 andreoss but still there's 2-3 second delay of '>' appearance
15:03 MadcapJake yeah there's a slight delay for me too
15:03 nadim MadcapJake: something that the multi sub may want to use
15:04 MadcapJake nadim: why are you passing it as such? there's a lot of heavy lifting in the multi that could be boiled down into a hash or an object
15:05 ugexe true, or use the multi to operate on smaller subsets of parameters and use nextwith(|c) to pass on whats not needed anymore
15:05 MadcapJake nadim: also DDT_HEADER as an enum is slightly non-perl6y you should use a named Bool argument (a flag essentially)
15:05 andreoss MadcapJake: whats changed? there were no delays before neither this unnecessary message
15:05 nadim IMO that's not where the problem resides, and the multi subs would have to do exactly the same job
15:06 nadim MadcapJake: Bool .. 2 types, DDT_stage .. 3 types
15:06 andreoss nine: like how does it treats Build.pm and how i ca override 'build' and 'test' calls
15:07 andreoss *can
15:07 MadcapJake nadim but since :$DDT_HEADER is more universally used it's probably been optimized a bit more than using an enum, heck I've seen strings used more than an enum for that purpose
15:08 ugexe perl6 --profile
15:08 MadcapJake nadim: I think you should at least try changing ($depth, $glyph, @renderings) to a class/object, that could help
15:09 nadim MadcapJake: I have no doubt that some optimization on the argument passing or type of argument may make a difference but that's micro optimization IMO
15:09 Amnez777 joined #perl6
15:10 ugexe perl6 --profile and there will be no opinions to get in the way
15:10 nadim First I could make the three filters /switchshed on DDT_stage) different, so I wouldn't have to call them at all if they didn't exist. right now the multi sub can be any of those
15:10 nadim ugexe: I totally agree
15:11 MadcapJake ugexe: what would you look for in the profile, in this case?
15:11 ugexe i'd be looking for how its dispatching
15:11 nadim but even if i did all the micro optimisation, the fact remains that it is the dispatching that takes time, or the lack of dispatching in this case
15:12 MadcapJake nadim: I would argue that there's something tripping up the dispatcher in your signatures before arguing that the dispatcher is the problem (not to say that this isn't something that should be fixed, but there's got to be a particular reason *your* multis are taking so long to dispatch)
15:14 jnthn Multi-dispatch is well optimized for successful dispatch (it keeps a cache and the VM's optimizer can even inline in that case)
15:14 Actualeyes left #perl6
15:14 nadim IMO, it's because there is nothing to dispatch to
15:14 jnthn However, there's no caching of known-to-fail dispatches, so you'll always go through the slow path then.
15:14 nadim and thus triggers the exception
15:14 lostinfog joined #perl6
15:15 jnthn Plus play the cost of the exception construction/throw, though it's probably the slow-path dispatch that is most costly.
15:15 Amnez777 joined #perl6
15:15 MadcapJake jnthn: what's known-to-fail mean?
15:15 ugexe does `sub foo($x, ($a, $b, $c))` have to unpack parameters/arguments?
15:15 jnthn ugexe: yes
15:15 ugexe thats my guess then
15:16 nadim my opinion too. I'll put together some code to optimize a bi but I think it would be great to havea "would this call match" before ever calling it
15:16 jnthn MadcapJake: We don't have a fast-path for remembering which multi-dispatches fail
15:16 nadim and without having to do all the candidates grepping
15:16 jnthn nadim: There is, `.cando`, but it always take the slow-path ;)
15:16 nadim lol!:)
15:17 ugexe method filter_header(\s_replacement, $s, ($current_depth, $glyph, @renderings), (\k, \b, \v, \f, \final, \want_address)) # seems like lots of unpacking for a multi
15:17 jnthn Yeah, unpacking is a promised slow-path too since the unpacks act like constraints.
15:18 jnthn Though that's a method, not a multi?
15:19 rigsby joined #perl6
15:20 ugexe ah true, although it does use that same signature a few lines later to call a possible multi? : `$filter(s_replacement, $s, DDT_HEADER, ($current_depth, $glyph, @renderings), (k, b, v, f, final, want_address)) ;`
15:24 Khisanth joined #perl6
15:27 dalek doc: a00387d | coke++ | doc/ (2 files):
15:27 dalek doc: fix grammar
15:27 dalek doc: review: https://github.com/perl6/doc/commit/a00387dd2f
15:31 Begi Can't I use a separate file on my tests ? It's ok in local, but Travis doesn't like it
15:31 Begi (this PR : https://github.com/Emeric54/p6-markdown/pull/1 =
15:31 Begi * )
15:37 MadcapJake Begi: you might have to change the $filename to `t/text.md`, since prove is running from the base directory
15:37 Begi Yeah, it's what I'm doing, I guess it :) but thanks !
15:40 khw joined #perl6
15:43 MadcapJake how would I do a memcpy in perl6 NativeCall?
15:43 edehont joined #perl6
15:44 Amnez777 joined #perl6
15:44 MadcapJake would i have to pull memcpy in from stdlib?
15:45 musiKk_ joined #perl6
15:46 cdg_ joined #perl6
15:46 hoelzro MadcapJake: yup
15:47 MadcapJake will is native(Str) work or is string.h in some other so file?
15:49 ilmari MadcapJake: NativeCall doesn't care about headers, only libraries
15:50 itaipu joined #perl6
15:50 MadcapJake right, so is string.h in a library or is it included in the standard library that can be accessed via «is native(Str)»?
15:50 ilmari memcpy is in the stdlib
15:50 MadcapJake ok thanks :)
15:51 ilmari the manual page usually says if you need a separate library
15:51 ilmari e.g. sin(3) says "Link with -lm."
15:51 dupa joined #perl6
15:51 buharin__ joined #perl6
15:51 * TimToady suspects killing all the clowns would have a large effect on our current US presidential race...
15:52 ilmari so for that you'd need is native('m')
15:52 MadcapJake ilmari: cool thanks for the tip!
15:52 Begi Haha TimToady, so true :'-|
15:53 masak "The first thing we do, let's kill all the clowns." -- Dick the Butcher, Henry VI
15:54 Amnez777 joined #perl6
15:55 ugexe lets see you try and kill this corporation, which counts as a legal clown in the US
15:56 sue joined #perl6
15:57 ilmari m: use NativeCall; multi sub msin(num64) returns num64 is native('m') is symbol('sin') { * }; msin(num64.new(pi/2))
15:57 camelia rakudo-moar 330f81: OUTPUT«Cannot call msin(num64); none of these signatures match:␤    (num64 --> num64)␤  in block <unit> at /tmp/1toEZd0xL7 line 1␤␤»
15:58 ilmari whut?
15:58 inokenty joined #perl6
15:58 Khisanth joined #perl6
16:01 ilmari m: use NativeCall; sub msin(num64) returns num64 is native('m') is symbol('sin') { * }; msin(num64.new(pi/2))
16:01 camelia rakudo-moar 330f81: ( no output )
16:01 ilmari oh, do native multis not work?
16:02 ilmari I was trying to do msin(int64) sybmol('sin') and msin(int32) symbol('sinf')
16:03 ilmari m: use NativeCall; sub msin(num64) returns num64 is native('m') is symbol('sin') { * }; say msin(num64.new(pi/2))
16:03 camelia rakudo-moar 330f81: OUTPUT«1␤»
16:03 ilmari m: use NativeCall; sub msin(num32) returns num64 is native('m') is symbol('sinf') { * }; say msin(pi/2)
16:03 camelia rakudo-moar 330f81: OUTPUT«3.6507183173809e-30␤»
16:03 ilmari m: use NativeCall; sub msin(num32) returns num32 is native('m') is symbol('sinf') { * }; say msin(pi/2)
16:03 camelia rakudo-moar 330f81: OUTPUT«1␤»
16:04 ilmari using the right return type helps
16:10 MadcapJake Ok now my example just hangs :(
16:10 MadcapJake I tried to closely match how the libcurl smtp-tls example does it: https://gist.github.com/MadcapJake/05ecec7b8db16fa83b74
16:16 MadcapJake anyone able to help? perl6-gdb-m just hangs too :(
16:19 MadcapJake so I did an interrupt on the gdb run and this is what is printed: 0x00007ffff749e8b7 in do_fcntl (arg=<optimized out>, cmd=7, fd=13) at ../sysdeps/unix/sysv/linux/fcntl.c:31 31../sysdeps/unix/sysv/linux/fcntl.c: No such file or directory.
16:19 MadcapJake is that just from interrupting? or is it something else?
16:20 avalenn joined #perl6
16:21 MadcapJake https://www.irccloud.com/pastebin/EFv5i0R8/perl6-gdb-m%20backtrace
16:23 gregf_ either ways they will ruin the country :|
16:23 gregf_ umm...  wrong chat :/
16:23 vendethiel- joined #perl6
16:24 masak gregf_: I just thought you were still talking about the clowns. :P
16:25 gregf_ well, they truly are .. but in a different country... clowns and power can ruin any country :\
16:27 MadcapJake ok well, if anyone decides to take a look, I've got the details on reddit, otherwise I've no idea what to do. Moving on to other things now.
16:29 Khisanth joined #perl6
16:29 masak MadcapJake: ...reddit?
16:30 MadcapJake https://www.reddit.com/r/perl6/comments/4cdunm/sending_an_email_with_netcurl/
16:30 MadcapJake perhaps would be better in an SO question, but i dunno
16:31 masak MadcapJake: your attempt looks pretty good. what goes wrong with it?
16:32 MadcapJake just hangs indefinitely
16:32 kmwallio MadcapJake: do you know if your read callback gets called?
16:33 MadcapJake kmwallio: no it doesn't appear to be making it that far (even «perl6 -c» hangs)
16:34 [Coke] you could go low tech and put in a bunch of says to see where it hangs.
16:34 MadcapJake I tried removing «is native()» from the read_callback decl, and it has no effect.
16:35 kmwallio will 'FROM' use the constant, or no since it's in quotes?
16:35 MadcapJake [Coke]: I think there's something going on with the parsing because perl6 -c hangs and a say right at the beginning never shows
16:36 MadcapJake kmwallio: that FROM is for the email rfc header
16:39 [Coke] git 2.8 out, includes || git fetch of submodules.
16:40 [Coke] ooh: git config --global user.useconfigonly true
16:40 [Coke] MadcapJake: then it should be easy to find, just comment-bisect the file
16:41 [Coke] (comment out half the file; if -c works, you know which half had the problem.)
16:41 kmwallio MadcapJake: running perl6 -c gives me "Syntax OK"
16:41 [Coke] kmwallio: do you have all those modules installed?
16:41 [Coke] (would that fail a -c?
16:41 kmwallio it failed the first time because I needed Email::Simple
16:41 kmwallio installing all of them made it happy
16:42 MadcapJake [Coke]: for some reason perl6 -c hangs even if i comment the whole darn file out! o_O
16:42 kmwallio trying to run it gives me:
16:42 kmwallio Calling memcpy(NativeCall::Types::CArray[uint8], Mu, int) will never work with declared signature (NativeCall::Types::Pointer $dest, NativeCall::Types::Pointer $src, NativeCall::Types::size_t $n --> NativeCall::Types::Pointer)
16:42 kmwallio at mail.p6:44
16:42 MadcapJake [Coke]: could I have botched my perl6 install? or is there a hanging process somewhere?
16:42 kmwallio MadcapJake: maybe killall perl6
16:42 kmwallio see if some resource is hung
16:43 kmwallio although that might not be the suggested way to do it...
16:44 MadcapJake something is definitely wonky
16:45 dupa joined #perl6
16:45 buharin__ joined #perl6
16:45 MadcapJake I had a stuck moarvm actually xD
16:46 kmwallio does anyone know how to pass null functions into NativeCall?
16:47 ilmari kmwallio: do you mean null pointers?
16:49 RabidGravy you pass the type object
16:49 RabidGravy that is the "appropriate" type object
16:50 kurahaupo joined #perl6
16:58 kmwallio any idea what the type object is for a function/subroutine?
17:01 ugexe m: say &say.^name
17:01 camelia rakudo-moar 330f81: OUTPUT«Sub␤»
17:01 musiKk_ joined #perl6
17:02 [particle] joined #perl6
17:02 Xliff_ joined #perl6
17:02 RabidGravy kmwallio, you can probably get away with passing Code if the signature is &foo
17:03 vendethiel joined #perl6
17:03 moritz m: say Code ~~ Callable # yes, you can
17:03 camelia rakudo-moar 330f81: OUTPUT«True␤»
17:04 sufrostico joined #perl6
17:05 pierrot_ joined #perl6
17:05 sue_ joined #perl6
17:05 Khisanth joined #perl6
17:05 CurtisOvidPoe_ joined #perl6
17:06 kmwallio RabidGravy, moritz: thanks, that worked
17:06 maddingu1 joined #perl6
17:06 Hotkeys_ joined #perl6
17:06 ChoHag_ joined #perl6
17:06 atta_ joined #perl6
17:07 zostay_ joined #perl6
17:07 sortiz_ joined #perl6
17:07 avenj_ joined #perl6
17:07 rodarmor joined #perl6
17:07 krunen joined #perl6
17:07 lnrdo joined #perl6
17:07 kst joined #perl6
17:07 integral_ joined #perl6
17:07 JimmyZ__ joined #perl6
17:07 rvchangue_ joined #perl6
17:07 integral_ joined #perl6
17:07 RabidGravy BOOM!
17:07 chee joined #perl6
17:07 timotimo joined #perl6
17:08 gensym joined #perl6
17:08 drforr1 joined #perl6
17:08 nchambers joined #perl6
17:08 retupmoca joined #perl6
17:09 ilogger2 joined #perl6
17:09 chee joined #perl6
17:09 simcop2387 joined #perl6
17:10 rigsby joined #perl6
17:10 boegel joined #perl6
17:10 Fleurety_ joined #perl6
17:11 DrForr Aroo? 'drforr1'?...
17:12 RabidGravy AN IMPOSTOR!
17:14 domidumont joined #perl6
17:14 xinming joined #perl6
17:16 tony-o is prove6 broken?
17:16 DrForr I guess so. lso wondering why my terminal screen is a little shorter than usual as well.
17:17 tony-o DrForr: on tmux?
17:17 BuildTheRobots joined #perl6
17:17 vendethiel- joined #perl6
17:18 DrForr Yep. I probably accidentally shrunk a terminal window at work and forgot that I was logged in.
17:18 dalek ecosystem: c6bf521 | RabidGravy++ | META.list:
17:18 dalek ecosystem: Add Lumberjack::Dispatcher::Syslog
17:18 dalek ecosystem:
17:18 dalek ecosystem: See https://github.com/jonathanstowe/Lumberjack-Dispatcher-Syslog
17:18 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/c6bf521673
17:19 mithaldu_ joined #perl6
17:19 SmokeMachine____ joined #perl6
17:19 mindos joined #perl6
17:20 RabidGravy MORE LOGGING!
17:21 mrsolo joined #perl6
17:22 RabidGravy Is there some crazy log aggregator thingy that all the kewl kids are using these days that I should be looking at?
17:22 DrForr Incidentally Test apparently doesn't compare utf8 buffers correctly.
17:22 parisba joined #perl6
17:22 DrForr Logstash/Elaasticsearch is wha I now of.
17:22 DrForr *what I know of.
17:22 RabidGravy oh yeah
17:22 _nadim joined #perl6
17:23 cfedde ad kibana on the top of that heap.
17:23 cfedde add
17:24 DrForr utf8.new(100, 105,...) vs. utf8.new(100,105,...) # the lack of space is the crucial bit.
17:24 * DrForr digs to see if it's IO::Blob's tests or Test's is-deeply.
17:25 RabidGravy yeah, I'm thinking a stringwise comparison is odd
17:26 RabidGravy it should do 'elems' to check the lengths, and then an element-wise comparison
17:27 itaipu joined #perl6
17:28 tony-o cool, flow is going faster than `prove -j9` for anything larger than 1 or 2 test files with 5 or so tests
17:30 DrForr Yeah, it's IO::Blob.
17:31 * DrForr puts together a PR.
17:32 spider-mario joined #perl6
17:32 Khisanth joined #perl6
17:32 wamba joined #perl6
17:35 abaugher joined #perl6
17:37 RabidGravy lawks a mercy! the packaged elasticsearch for fedora has 88 packages it depends on
17:37 kent\n joined #perl6
17:37 kent\n joined #perl6
17:38 ugexe gotta have a left-pad afterall
17:38 MadcapJake well i give up, I'd need to spend some serious time writing Net::Curl functionality and I'd much rather just finish this thing. I'm gonna just run ssmtp and be done with it :P
17:39 RabidGravy why not use Net::SMTP?
17:40 MadcapJake it doesn't install, tests fail
17:40 * RabidGravy points vigorously to the fork button on github
17:41 [Coke] sometimes you want to just work on your project, not fix everyone elses.
17:42 RabidGravy yeah, I forgot that part
17:42 MadcapJake last 5 commits to Net::SMTP are all some form of "hope this fixes tests"
17:43 MadcapJake and they're all from October of last year xD
17:44 RabidGravy I'd better take a look then :)
17:44 MadcapJake plus ultimately, I have no idea how it works :P some kind of socket based thingy :P
17:44 RabidGravy I mean one day I'm going to want to send e-mail
17:45 ugexe ugh guess_library_name is a mess
17:45 ugexe guess_if_ill_return_a_string_or_path_or_relative_or_absolute would be a better name
17:46 MadcapJake that day is today for me :P but I'm really not knowledge on sockets and SMTP, the errors when you install are bad client-send and bad client-send EHLO ¯\_(ツ)_/¯
17:47 DrForr PR sent.
17:47 DrForr (it's breaking Crust installation.)
17:52 RabidGravy MadcapJake, hahaha, got it.  Net::SMTP didn't survive the \r\n grapheme malarkey
17:52 kmwallio is anyone familiar with OpenCL...?
17:53 MadcapJake RabidGravy: ah! Is it an easy fix?
17:54 RabidGravy just looking
17:55 Khisanth joined #perl6
17:56 MadcapJake RabidGravy: «$.conn.print($stuff ~ "\r\n");» is the line that causes all the bad client-send errors
17:56 MadcapJake why is it $.conn and not $!conn?
17:57 diakopter . means a public accessor
17:57 dupa joined #perl6
17:57 buharin__ joined #perl6
17:57 MadcapJake RabidGravy: how did you do this? I just hit the darn fork button... ;)
17:57 RabidGravy the "bad client-send" is just an internal diagnostic when it doesn't match some expected text
17:57 MadcapJake diakopter: but i thought that was only used in has declarations
17:58 diakopter well the . must be used by code outside the class
17:58 ugexe $.foo might be `method foo` from a role
17:58 MadcapJake ugexe: itself is a role? could that be it?
17:59 autarch joined #perl6
17:59 timotimo kmwallio: are you going to bind OpenCL functions? :)
17:59 timotimo that could be interesting
17:59 kmwallio I'm trying...
17:59 kmwallio https://gist.github.com/kmwallio/8565b36d1fe9e2b18401
18:00 kmwallio I get an invalid parameter (-30) return
18:00 _nadim joined #perl6
18:00 RabidGravy MadcapJake, don't worry I'll have it fixed in ten minutes
18:01 * MadcapJake swoons
18:01 timotimo i have no idea of the OpenCL API, never even tried it so far :(
18:01 MadcapJake timotimo: api? isn't it a language?
18:01 kmwallio MadcapJake: there's the language for what runs on the GPU, then the API to interact with it
18:02 * MadcapJake reads wikipedia page
18:02 * kmwallio usually just copies and pastes someone else's working code and modifies it to do what he needs
18:02 MadcapJake so it's C with a different memory model
18:02 * kmwallio doesn't really know what he's doing
18:04 MadcapJake I will never understand the ways people like to mutate C (it's already tough to read...)
18:05 RabidGravy MadcapJake, all fixed now
18:05 MadcapJake RabidGravy: I don't see a PR on Net::SMTP
18:06 MadcapJake did I speak too soon :P
18:06 RabidGravy er, that's because I *just* fixed it. Patience dear.
18:06 MadcapJake hehe I wondered that xD
18:06 kmwallio MadcapJake: it makes it easier to learn and get users if you take something familiar and change it slightly
18:06 nemo So. Zoffix had a bunch of trouble w/ switching to xim - I kinda had some issues too.
18:06 nemo https://doc.perl6.org/language/unicode_entry#XCompose  ←  here I mean
18:06 nemo I just wanted to mention that im-switch fixed things nicely for me on two of my machines
18:06 nemo maybe should be mentioned on that page
18:07 MadcapJake kmwallio: I've never understand that perspective I guess. To me, taking something familiar and making it unfamiliar is just a red herring.
18:07 kmwallio MadcapJake: I find it frustrating because it's so close and similar, but I can do something in one but not the other
18:09 MadcapJake kmwallio: exactly! that's the thing, when you have something familiar our brains expects certain things, familiarity cuts both ways imo
18:11 RabidGravy MadcapJake, sent the PR, but it still doesn't work - there's an un-tested failure
18:14 MadcapJake RabidGravy: all tests pass on my end using your fork
18:15 araujo joined #perl6
18:15 MadcapJake will there ever be a way to use pre-compiled perl6? especially for travis.
18:16 FROGGS joined #perl6
18:17 RabidGravy MadcapJake, yeah, but it couldn't actually send e-mail - there was a bug for which there wasn't a test
18:17 RabidGravy now also fixed
18:18 RabidGravy And it now definitely sends e-mail :)
18:18 musiKk_ joined #perl6
18:19 vike joined #perl6
18:19 RabidGravy so all good
18:19 Khisanth joined #perl6
18:19 MadcapJake RabidGravy: method nl-in not found in SMTPSocket
18:21 MadcapJake did you mean nl-out?
18:21 RabidGravy ah
18:22 timotimo MadcapJake: just host a perl6 package somewhere :)
18:22 RabidGravy no, it's the way the tests mock the socket, 'ang on
18:22 timotimo and then wget stuff in the .travis.yml
18:23 MadcapJake timotimo: haha well I don't have any hosting available :P
18:23 MadcapJake I wonder if there's a way to store the built rakudo and then check version to decide whether it needs to rebuild
18:24 MadcapJake (might be possible now with all this relocatable work)
18:26 MadcapJake RabidGravy++ # time to send some email!
18:26 edehont joined #perl6
18:31 MadcapJake RabidGravy: «Method 'nl-in' not found for invocant of class 'IO::Socket::SSL'»
18:32 AlexDaniel joined #perl6
18:33 DrForr Oh, I bet I know what drforr1 is, I'll bet it's the box my weechat account is running on splitting.
18:33 RabidGravy oh,  that suck
18:37 _nadim joined #perl6
18:39 RabidGravy MadcapJake, that sucks because the interface between IO::Socket::SSL and IO::Socket::INET is different
18:39 Khisanth joined #perl6
18:40 RabidGravy now that should work
18:53 AlexDaniel m: -> $a, $b { say $a + $b }(3, 4)
18:53 camelia rakudo-moar 330f81: OUTPUT«7␤»
18:53 AlexDaniel m: { say $^a + $^b }(3, 4)
18:53 camelia rakudo-moar 330f81: OUTPUT«7␤»
18:53 AlexDaniel m: (say * + *)(3, 4)
18:53 camelia rakudo-moar 330f81: OUTPUT«{ ... }␤No such method 'CALL-ME' for invocant of type 'Bool'␤  in block <unit> at /tmp/op2a3TvHvo line 1␤␤»
18:53 AlexDaniel m: say (* + *)(3, 4)
18:53 camelia rakudo-moar 330f81: OUTPUT«7␤»
18:54 AlexDaniel m: sub { say $^a + $^b }(3, 4)
18:54 camelia rakudo-moar 330f81: OUTPUT«7␤»
18:54 AlexDaniel m: sub foo { say $^a + $^b }(3, 4)
18:54 camelia rakudo-moar 330f81: OUTPUT«7␤»
18:54 AlexDaniel m: sub foo($a, $b) { say $a + $b }(3, 4)
18:54 camelia rakudo-moar 330f81: OUTPUT«7␤»
18:54 AlexDaniel m: anon sub foo($a, $b) { say $a + $b }(3, 4)
18:54 camelia rakudo-moar 330f81: OUTPUT«7␤»
18:55 cdg joined #perl6
18:55 JRaspass joined #perl6
18:56 DrForr RabidGravy: What was that thread pool size variable again?
18:56 timotimo m: say $*DISPATCHER
18:56 camelia rakudo-moar 330f81: OUTPUT«Dynamic variable $*DISPATCHER not found␤  in block <unit> at /tmp/JYXRXEG3K0 line 1␤␤Actually thrown at:␤  in block <unit> at /tmp/JYXRXEG3K0 line 1␤␤»
18:56 timotimo m: say $*SCHEDULER
18:56 RabidGravy $*SCHEDULER is the scheduler
18:56 camelia rakudo-moar 330f81: OUTPUT«ThreadPoolScheduler.new(initial_threads => 0, max_threads => 16, uncaught_handler => Callable)␤»
18:57 RabidGravy you can just set a new one in the appropriate dynamic scope
18:58 DrForr Ah, and the default does happen to be 16. It appears to be IO::Socket::Async giving up at the moment, but I'm not really as up on async stuff as I should be.
19:01 DrForr "Cannot modify immutable...", I'll find the correct invocation.
19:01 timotimo you should install a whole new scheduler
19:02 DrForr I was writing '$*SCHEDULER = ThreadPoolScheduler.new(...)".
19:02 timotimo yeah, yo'll need a "my"
19:02 DrForr Ah, forot.
19:02 timotimo :)
19:02 DrForr *forgot
19:07 DrForr Neither resizing the thread pool up or down changes the behavior, siege(1) still runs to completion with 15 concurrent sessions, stops serving at 16.
19:08 kalkin-_ Is there some form of higher kinded type in perl 6?
19:08 kalkin-_ something which does i want a  function that does this  (*->*)->*
19:09 DrForr That looks somewhat Haskellish.
19:09 kalkin-_ indeed it does
19:09 Khisanth joined #perl6
19:10 RabidGravy DrForr, what is the actual server code that you are looking at?
19:10 DrForr HTTP::Server::Tiny.
19:11 moritz kalkin-_: you can declare signatures of callbacks you receive
19:12 buharin__ joined #perl6
19:12 dupa joined #perl6
19:14 kalkin-_ moritz: do you have an example for how to do this?
19:15 DrForr RabidGravy: I'm just running the stock eg/hello.pl6 script and creating a .. Oh, should the ThreadPoolWhatever be in a BEGIN block?
19:15 TimToady m: say &infix:<+>.signature ~~ :(Mu $?, Mu $? --> Mu)
19:15 camelia rakudo-moar 330f81: OUTPUT«True␤»
19:15 moritz m: sub scale(&c:(Numeric -> Numeric)) { return { 2 * c(0.5*$_) } }; say scale(&sin)(1)
19:15 camelia rakudo-moar 330f81: OUTPUT«5===SORRY!5=== Error while compiling /tmp/iebjyvzL5O␤Malformed parameter␤at /tmp/iebjyvzL5O:1␤------> 3sub scale(&c:(Numeric7⏏5 -> Numeric)) { return { 2 * c(0.5*$_) }␤    expecting any of:␤        constraint␤        formal parameter␤»
19:15 moritz m: sub scale(&c:(Numeric --> Numeric)) { return { 2 * c(0.5*$_) } }; say scale(&sin)(1)
19:15 camelia rakudo-moar 330f81: OUTPUT«Constraint type check failed for parameter '&c'␤  in sub scale at /tmp/IKZgR07yaF line 1␤  in block <unit> at /tmp/IKZgR07yaF line 1␤␤»
19:16 DrForr Doesn't alter the behavior.
19:16 moritz m: sub scale(&c:(Numeric --> Numeric)) { return { 2 * c(0.5*$_) } }; say square(Numeric $x --> Numeric) { $x * $x }; say scale(&square)(1)
19:16 camelia rakudo-moar 330f81: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Nn_ygNZ5Iy␤Unable to parse expression in argument list; couldn't find final ')' ␤at /tmp/Nn_ygNZ5Iy:1␤------> 3 { 2 * c(0.5*$_) } }; say square(Numeric7⏏5 $x --> Numeric) { $x * $x }; say scale(␤ …»
19:16 moritz m: sub scale(&c:(Numeric --> Numeric)) { return { 2 * c(0.5*$_) } }; sub square(Numeric $x --> Numeric) { $x * $x }; say scale(&square)(1)
19:16 camelia rakudo-moar 330f81: OUTPUT«0.5␤»
19:17 moritz kalkin-_: ^^
19:17 Khisanth joined #perl6
19:17 RabidGravy DrForr, looking at the code, I'm not sure it is closing all the connections
19:18 kalkin-_ moritz: but it's only numeric. I think the aproach TimToady shows is the right direction. I have to read up on Mu
19:19 moritz kalkin-_: well, it's an example. It works with other types too
19:19 DrForr RabidGravy: I was wondering the same thing on the walk home but wasn't sure where to start looking for that.
19:20 DrForr There's also a comment about MoarVM (what I'm using) not handling SIGPIPE, but I don't know enough about async to know if that's related.
19:21 * DrForr reads the ::Async docs for inspiration.
19:21 RabidGravy welll the sigpipe will get sent if the other end closes a socket
19:23 DrForr Ah, so maybe there should be a tap to listen for the close, and there isn't one currently?... Pulling this out of my proverbial ass, just so you're aware.
19:26 DrForr I can tell that at a total of 15 connections, IO::Socket::Async.listen() no longer gets called.
19:26 DrForr Well, 15 concurrent connections, to be sure.
19:26 MadcapJake Five words: I. Have. Sent. An. Email.
19:27 * DrForr alerts the media.
19:27 MadcapJake RabidGravy thanks so much for fixing Net::SMTP works like a charm, had to fiddle with some gmail settings and wrap my addresses in angle brackets, and then boom! An email was sent!
19:28 RabidGravy fabulous
19:29 MadcapJake now to move this functionality over to the main sixbug app and then I gotta refactor the RT interface, then this will be ready to launch! yippeee mickey!
19:32 MadcapJake DrForr: I tried changing $*SCHEDULER yesterday to one with more max_threads but it really didn't like that, I had to place it in Crust at the beginning of Crust::Runner.run and even then I got 6 req/sec instead of 30+ at :15max_threads
19:33 DrForr The rate will eventually improve, I'm not as concerned about that. I'm just worried about it failing *hard* at the 16-thread boundary rather than degrading.
19:33 timotimo what kind of failure is that? a crash?
19:34 timotimo if so, can you get that in a gdb session perhaps?
19:34 MadcapJake timotimo: me? I didn't get a crash at all, it just hangs
19:34 timotimo i'm not sure if strace would happen
19:34 DrForr Not a crash, unfortunately.
19:35 timotimo help* not hapen
19:35 timotimo happen*, damn it.
19:35 DrForr Like MadcapJake says, siege(1) hangs waiting for the open connections to close. Or something.
19:35 MadcapJake timotimo: even after you stop the concurrent connections (I was using wrk), no further connections are accepted
19:37 timotimo oof
19:37 Khisanth joined #perl6
19:37 DrForr I don't mind if connections go into a slow response queue or whatever after 16 concurrent connections, I just want the server to respond.
19:37 timotimo perhaps a kind of trace would be interesting. just output what lines in the code get hit for which connections/threads
19:37 timotimo so you could see where it stops processing something?
19:38 DrForr Let me fire up strace...
19:38 timotimo strace with 16 concurrent connections going on and all the sbrk/mmap spam from allocations and GC ... :|
19:39 timotimo it'd really want to be filtered strongly
19:39 timotimo i'm not sure if i have enough brane power to analyze a big strace log today
19:40 tony-o DrForr: MadcapJake: what is crust using for http listener?
19:40 timotimo oh hey tony-o :)
19:40 tony-o hey timotimo
19:41 MadcapJake IO::Socket::Async
19:41 tony-o MadcapJake: there is a couple of issues with that
19:41 tony-o that you can run into the hanging/segfault arena
19:41 tony-o hows it going timotimo ?
19:42 timotimo not feeling so great today, but i'll live :)
19:42 timotimo jnthn made a heap profiler that spits out dumps that are fun to analyze with the perl6-only tool he's built
19:42 MadcapJake tony-o: sounds like that's probably the issue
19:42 timotimo so that's what i'm playing with mostly
19:42 RabidGravy ooh I don't know, I just provoked a mammoth moarvm panic with the siege on the eg/hello.pl6
19:43 timotimo have you heard of the issue we have with repeated EVAL calls leaking lots of memory?
19:43 tony-o I:S:A hangs if you try to process data on the socket cross thread/channel, you can also run into a scenario where sockets aren't closed because of too many concurrent connections
19:43 RabidGravy [jonathan@coriolanus p6-HTTP-Server-Tiny]$ perl6 -Ilib eg/hello.pl6
19:43 RabidGravy http server is ready: http://127.0.0.1:15555/ (pid:17423)
19:43 RabidGravy *** Error in `/home/jonathan/.rakudobrew/moar-nom/install/bin/moar': double free or corruption (fasttop): 0x00000000047ea0e0 ***
19:43 timotimo oh, a crash! :)
19:43 mst RabidGravy: http://youbrokethebuild.com/
19:43 timotimo that's quite good. can you run that through valgrind or perhaps with --asan in moar's Configure.pl activated?
19:44 tony-o m: print "5\r6";
19:44 camelia rakudo-moar 330f81: OUTPUT«5
19:44 tony-o ugexe: looks like that issue exists on camelia too
19:44 timotimo http://t.h8.lv/all_paths_here.png  -  does that give problems panning around in the browser?
19:45 MadcapJake tony-o: but we want there to be more connections than 15 especially for a web server
19:46 timotimo well, ideally we'd finish the connections significantly faster so that 15 is enough :P
19:46 tony-o MadcapJake: i understand that but you can get into race conditions where your server doesn't close a connection prior to starting work on another and then you just have a bunch of competing threads that aren't closing sockets
19:46 kalkin-_ my $a ='dasd'; sub f($n) { $n + 2 } ; f($a)
19:46 kalkin-_ m: my $a ='dasd'; sub f($n) { $n + 2 } ; f($a)
19:46 camelia rakudo-moar 330f81: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5dasd' (indicated by ⏏)␤  in sub f at /tmp/n4KsYtm7yX line 1␤  in block <unit> at /tmp/n4KsYtm7yX line 1␤␤Actually thrown at:␤  in sub f at /tmp/n4Ks…»
19:46 tony-o i ran into that when i wrote HTTP::Server::Async
19:46 timotimo like, we respond faster than any new handshakes can come in :D
19:46 kalkin-_ perl6 -c will pass it
19:46 tony-o H:S:A is fairly stable
19:46 tony-o if you want to take a look at that
19:47 MadcapJake tony-o: doesw H:S:A support binary data?
19:47 tony-o it did at one point, i believe it still does
19:47 kalkin-_ why doesn't perl6 do the check not at compile time? It can intefere that "asd" + 3 can't work out
19:47 timotimo how is H:S:T at the moment?
19:47 kalkin-_ or can't it?
19:47 tony-o H:S:T i believe is broken, i'll take a look at it
19:47 RabidGravy well under valgrind if I siege the eg/hello.pl6 of http server tiny
19:47 moritz kalkin-_: not really
19:47 moritz m: say '42' + 3
19:47 camelia rakudo-moar 330f81: OUTPUT«45␤»
19:47 timotimo kalkin-_: it can figure out that a call to infix:<+> will work fine, because in theory it could try to turn adsf into a number
19:48 timotimo we don't go further than that yet
19:48 RabidGravy it carries on going forever
19:48 MadcapJake H:S:T is what crust uses and it works great
19:48 RabidGravy albeit very slowly
19:48 moritz kalkin-_: it can dispatch based on the types; it doesn't go deep enough to actually resolve the numification that happens deeper in the call stack
19:48 moritz otoh, infix:<+> is a marked as "is pure", so the constant could catch it
19:49 tony-o H:S:T seems stable
19:49 RabidGravy Transactions:         255 hits/Concurrency:       14.18
19:49 moritz the constant folder currently intentionally swallows errors
19:49 timotimo is turning string into num failing a Failure?
19:49 tony-o MadcapJake: the other problem is that sometimes when you max out $*SCHEDULER, it quits responding/processing anything currently 'live'
19:50 timotimo perhaps it constant-folds a Failure object there
19:50 kalkin-_ timotimo, moritz: i see. thanks for the explanaition
19:50 DrForr tony-o: That's exactly the issue I appear to be running into.
19:50 moritz see the try { } in src/Perl6/Optimizer.nqp line 1416
19:50 moritz and then
19:50 moritz if $survived && !nqp::istype($ret_value, $!symbols.Failure) {
19:51 tony-o DrForr: it's definitely an issue and took me a couple of days to really determine that was in fact the issue
19:51 timotimo interesting. it will constant-fold a "45" + 1, but not a "hello" + 1
19:51 kalkin-_ '3' + 3 == 6 stuff is weird
19:51 kalkin-_ thats so unexpected
19:51 moritz one could add an else branch to that, and complain with "will never work"
19:51 kalkin-_ m: say 3 + 'asd'
19:51 camelia rakudo-moar 330f81: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5asd' (indicated by ⏏)␤  in block <unit> at /tmp/YHwbsSwLxp line 1␤␤Actually thrown at:␤  in block <unit> at /tmp/YHwbsSwLxp line 1␤␤»
19:52 kalkin-_ m: '3' + 3
19:52 camelia rakudo-moar 330f81: OUTPUT«WARNINGS for /tmp/JXJP4z8Gmw:␤Useless use of "+" in expression "'3' + 3" in sink context (line 1)␤»
19:52 timotimo moritz: but what if you're using it as a shortcut for throwing that exception? then you *want* it to fail at run-time
19:52 kalkin-_ m: say '3' + 3
19:52 camelia rakudo-moar 330f81: OUTPUT«6␤»
19:52 timotimo and if you're writing it like that in your sourcecode ... :P
19:52 DrForr tony-o: So long as it's known, I don't mind. I'm talking on a webserver built on top of rust at NLPW and YAPC::NA, and would like to say truthfully that it can support >15 concurrent connections :)
19:52 DrForr s/rust/Crust/
19:52 moritz timotimo: right, or it might be in a branch that's never reached
19:52 kalkin-_ this feels so wrong
19:53 timotimo right
19:53 moritz timotimo: which is why I copied perl 5's decision here
19:53 timotimo kalkin-_: it's a decision made very early in perl history
19:53 moritz kalkin-_: it's coercion, and *very* useful when working with text input
19:53 timotimo and we're sticking with it. it's useful and consistent, IMO
19:53 tony-o DrForr: you *can* create a new scheduler that will handle significantly larger connection pool
19:54 tony-o on my mbp i was able to handle 511 reliably
19:54 MadcapJake tony-o: how would you do that?
19:54 DrForr tony-o: Yeah, RabidGravy was saying that I just hadn't put the new scheduler in the right place... or maybe that was something different.
19:54 itaipu joined #perl6
19:55 kalkin-_ m: say ① +3; say '①' +3;
19:55 camelia rakudo-moar 330f81: OUTPUT«4␤Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5①' (indicated by ⏏)␤  in block <unit> at /tmp/3wLYNlIxvZ line 1␤␤Actually thrown at:␤  in block <unit> at /tmp/3wLYNlIxvZ line 1␤␤»
19:55 kalkin-_ why does the first say work but the second line doesn't?
19:55 tony-o m: our $*SCHEDULER .=new(:max_threads(500));
19:55 camelia rakudo-moar 330f81: ( no output )
19:56 kalkin-_ m: say ① +3
19:56 camelia rakudo-moar 330f81: OUTPUT«4␤»
19:56 tony-o DrForr: MadcapJake: give that a shot ^^
19:56 DrForr Ah, 'our' and .=....
19:56 MadcapJake our, i was using my
19:56 tony-o $*SCHEDULER is ThreadPoolScheduler if you want to be more explicit
19:57 tony-o you can also set an environment variable RAKUDO_MAX_THREADS
19:57 timotimo kalkin-_: that only works in source code
19:57 MadcapJake tony-o: what?! an env var! haha perfect
19:59 DrForr That passes the first test, -c15, goosing it up now for testing purposes.
19:59 kalkin-_ why shouldn't '六' + 3 work exactly like '3' + 3? (not trolling but generally interested :D )
19:59 tony-o m: say '六'.Int + 3;
19:59 camelia rakudo-moar 330f81: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5六' (indicated by ⏏)␤  in block <unit> at /tmp/a_sJG2i7Fp line 1␤␤Actually thrown at:␤  in block <unit> at /tmp/a_sJG2i7Fp line 1␤␤»
19:59 moritz m: say unival '六'
19:59 camelia rakudo-moar 330f81: OUTPUT«6␤»
19:59 tony-o m: say '{六}'.Int + 3;
19:59 camelia rakudo-moar 330f81: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5\{六}' (indicated by ⏏)␤  in block <unit> at /tmp/MM5bS0QpL2 line 1␤␤Actually thrown at:␤  in block <unit> at /tmp/MM5bS0QpL2 line 1␤␤»
20:00 moritz kalkin-_: looks like a genuine bug to me
20:00 moritz wait
20:00 kalkin-_ Roman numeral 'Ⅷ' doesn't work either
20:00 moritz m: say uniname '六'
20:00 camelia rakudo-moar 330f81: OUTPUT«<CJK Ideograph>␤»
20:00 moritz kalkin-_: the roman numerals don't work, because you can't chain them together like digits
20:00 moritz I have no idea how that works with the CJK ideographs
20:01 kalkin-_ moritz: ahh good point
20:01 kalkin-_ well no
20:01 moritz kalkin-_: what's the numeric value of '六六?
20:01 kalkin-_ say  Ⅷ + 3
20:01 kalkin-_ m: say  Ⅷ + 3
20:01 camelia rakudo-moar 330f81: OUTPUT«11␤»
20:01 moritz yes, it works as a literal, but only for single digits
20:02 kalkin-_ well i thought everyting what is a digit should pass addition. If you have an invalid digit you don't have a digit but a string
20:03 moritz only stuff that behaves like a proper digit
20:03 tony-o DrForr: interested in your talk + results -
20:03 kalkin-_ m: say 四四 ;
20:03 camelia rakudo-moar 330f81: OUTPUT«5===SORRY!5=== Error while compiling /tmp/9LDIVaIvKw␤Undeclared routine:␤    四四 used at line 1␤␤»
20:03 kalkin-_ m: say 四 + 3;
20:03 camelia rakudo-moar 330f81: OUTPUT«5===SORRY!5=== Error while compiling /tmp/p_xGSkNymk␤Undeclared routine:␤    四 used at line 1␤␤»
20:04 DrForr kalkin-_ - Slang::Roman :)
20:04 RabidGravy well I just 4096 requests at -c 32
20:04 MadcapJake RabidGravy: :O
20:04 kalkin-_ DrForr: :D
20:04 DrForr My poor VM won't take the load :/
20:05 MadcapJake my app decided to stop working entirely...
20:05 timotimo m: say unival('四')
20:05 camelia rakudo-moar 330f81: OUTPUT«4␤»
20:05 timotimo m: say uniprop('四')
20:05 camelia rakudo-moar 330f81: OUTPUT«Lo␤»
20:05 tony-o what are your siege settings? -c10 ?
20:05 timotimo it's marked as a letter, that's probably why we don't accept it as a digit
20:06 Ven joined #perl6
20:06 DrForr -r 20 -c 20 # or close.
20:07 kalkin-_ m: say unival('四四')
20:07 camelia rakudo-moar 330f81: OUTPUT«4␤»
20:07 timotimo unival is only for individual characters
20:07 timotimo it'll silently ignore everything past the first
20:07 timotimo same for uniprop
20:07 kalkin-_ ahh ic
20:08 timotimo m: say uniname('四'); say uniname('四四')
20:08 camelia rakudo-moar 330f81: OUTPUT«<CJK Ideograph>␤<CJK Ideograph>␤»
20:08 timotimo ^- same for uniname
20:09 MadcapJake https://www.irccloud.com/pastebin/kOhaghAe/
20:09 kalkin-_ m: my Str $f = '3'; $f +3;
20:09 camelia rakudo-moar 330f81: OUTPUT«WARNINGS for /tmp/o5Grgluj_v:␤Useless use of "+" in expression "$f +3" in sink context (line 1)␤»
20:09 kalkin-_ m: my Str $f = '3'; say $f +3;
20:09 camelia rakudo-moar 330f81: OUTPUT«6␤»
20:10 MadcapJake DrForr, tony-o, RabidGravy: check ^^ out
20:10 kalkin-_ how can i circumvent such errors? Or it's just how perl works?
20:10 kalkin-_ I mean i declare it's a Str
20:10 MadcapJake That's with RAKUDO_MAX_THREADS=100
20:11 espadrine joined #perl6
20:12 DrForr Okay, I'll work with that tomorow night. My big concern was that siege was locking up even at -r 2 -c 5 at one point, I'm pretty sure that was a problem with rakudo core not being updated though.
20:12 Begi kalkin-_: Perl is smart !
20:12 kalkin-_ may be. but i'm dumb and do errors :)
20:13 AlexDaniel m: say ②⁸
20:13 camelia rakudo-moar 330f81: OUTPUT«256␤»
20:13 AlexDaniel :)
20:14 cdg joined #perl6
20:14 labster joined #perl6
20:14 MadcapJake tony-o: thanks for the info on the scheduler!
20:14 tony-o MadcapJake: no worries - 835 connections time out, though?
20:14 DrForr Definitely.
20:15 tony-o where is the code?
20:15 MadcapJake tony-o: yep
20:15 MadcapJake hold on i'll push my latest, it's at madcapjake/sixbug
20:16 tony-o okay, i'll take a look late tonight
20:16 MadcapJake holy buckets, moarvm was at 1.8GB after all those http load tests :P
20:17 DrForr tony-o: Moi? drforr/perl6-App-prancer - Heading to bed now that I've got some actual performance numbers.
20:17 DrForr (I've got to push the talk to GH as well, but that'll be later.)
20:17 MadcapJake DrForr++ # Prancer & Talk :)
20:19 DrForr Thanks. Theo needed a second talk for NLPW so I gave him Prancer as well, not even sure how long it's supposed to run even :)
20:20 DrForr (note to self - open port 5000 on Linode tomorrow.)
20:21 MadcapJake .t
20:21 yoleaux Tue, 29 Mar 2016 20:21:43 UTC
20:22 DrForr (I'm at UTC+0200 :) )
20:23 MadcapJake .at 2016-03-30T10:00 DrForr: open port 5000 on Linode :)
20:23 yoleaux MadcapJake: Sorry, that command (.at) crashed.
20:23 MadcapJake awww
20:24 MadcapJake .at 10:00 DrForr:: open port 5000 on Linode :)
20:24 yoleaux MadcapJake: Sorry, that command (.at) crashed.
20:24 MadcapJake wow ok that's apparently b0rked
20:24 MadcapJake .in 12h DrForr: open port 5000 on Linode :)
20:24 yoleaux MadcapJake: I'll remind you on 30 Mar 2016 08:24Z
20:24 MadcapJake boom!
20:25 DrForr o/' It's the Star Wars Countdown o/'
20:26 * MadcapJake still feels dirty using a ruby irc bot ;)
20:28 egkurzin joined #perl6
20:33 cognominal_ joined #perl6
20:33 TEttinger joined #perl6
20:37 DrForr Egads. Said talk is going to open LPW... /me decides to get some earlier sleep.
20:40 masak heh.
20:41 masak a quick search through perl6-all-modules gives me reason to believe that my use of infix:<^^> in Games::Nex is... the first and only one
20:42 masak I don't know if that is a cause for pride or for worry, though :P
20:44 masak I just suddenly, after 11 years with Perl 6, had a situation where I went, "hm -- I want to xor these two boolean values -- there's an operator for that!" :)
20:45 masak (well. technically, infix:<^^> isn't "xor" but the boolean version of one(). but with only two operands that comes down to the same thing.)
20:45 diakopter [^^]
20:46 masak m: for True, False X True, False -> ($left, $right) { say $left ^^ $right }
20:46 camelia rakudo-moar 330f81: OUTPUT«Nil␤True␤True␤False␤»
20:46 masak the "Nil" there means something akin to "Bool overflow" :)
20:47 masak perhaps I should've done it in ascending order
20:47 masak m: for False, True X False, True -> ($left, $right) { say $left ^^ $right }
20:47 camelia rakudo-moar 330f81: OUTPUT«False␤True␤True␤Nil␤»
20:47 masak m: for False, True X False, True X False, True -> ($left, $grip, $right) { say $left ^^ $grip ^^ $right }
20:47 camelia rakudo-moar 330f81: OUTPUT«False␤True␤True␤Nil␤True␤Nil␤Nil␤Nil␤»
20:48 diakopter m: say [^^]()
20:48 camelia rakudo-moar 330f81: OUTPUT«False␤»
20:49 itaipu joined #perl6
20:49 masak False, as in "so far, haven't found the truthy value that was s'posed to be in there"
20:49 masak m: say False ^^ 42
20:49 camelia rakudo-moar 330f81: OUTPUT«42␤»
20:49 masak just like infix:<||> and infix:<&&>, the result is un-boolified if possible
20:49 masak er, not boolified
20:49 diakopter m: say [^^](infix:<^^>)
20:49 camelia rakudo-moar 330f81: OUTPUT«False␤»
20:50 masak diakopter: `infix:<^^>` without the & is a call. it evaluates to False. the result follows. :)
20:50 Ven joined #perl6
20:51 pRiVi joined #perl6
20:54 avuserow hoelzro++ # just saw your new blog entry about C++ with NativeCall not even a day after I asked about it here :)
20:55 hoelzro glad someone found it helpful =)
20:58 hoelzro in retrospect, I should've probably covered the current support that NativeCall offers more thoroughly =/
20:58 perlpilot hoelzro: blog post #2!  :)
21:00 Begi1 joined #perl6
21:00 hoelzro heh
21:04 _nadim joined #perl6
21:05 leont joined #perl6
21:11 leont I have the not so clear error "Directive d not applicable for type Int", this may be a sprintf related, but %d and Ints should be fine, right?
21:11 leont This is confusing!
21:12 ab5tract m: my $f = '25 25 25'; $f ~~ s:nth(*-1)[\d+] = 42; say $f
21:12 camelia rakudo-moar 330f81: OUTPUT«WARNINGS for /tmp/ve9BYKFXtd:␤Useless use of "-" in expression "*-1" in sink context (line 1)␤25 42 25␤»
21:12 ab5tract that warning is a regression, right?
21:13 sftp joined #perl6
21:13 ilmari star-m: my $f = '25 25 25'; $f ~~ s:nth(*-1)[\d+] = 42; say $f
21:13 camelia star-m 2016.01: OUTPUT«WARNINGS for /tmp/NO4vsdSUuD:␤Useless use of "-" in expression "*-1" in sink context (line 1)␤25 42 25␤»
21:15 ab5tract ilmari: that it is that old to me points to it potentially being a missed member of the erroneous useless use in sink errors
21:16 ab5tract i thought i had run this code more recently than that though :S
21:16 bjz joined #perl6
21:17 ab5tract .tell TimToady I might have found another mistaken 'useless use in sink context' warning: 'm: my $f = '25 25 25'; $f ~~ s:nth(*-1)[\d+] = 42; say $f'
21:17 yoleaux ab5tract: I'll pass your message to TimToady.
21:23 leont It seems the error was that it was undefined, error was most unclear
21:25 ab5tract leont: yeah, that class of error is a bit LTA
21:25 leont LTA?
21:25 ab5tract less than awesome
21:25 perlpilot S99:LTA
21:25 perlpilot ah, no bot
21:25 masak S99?
21:25 masak :P
21:25 perlpilot leont: Less Than Awesome
21:26 leont Ah
21:26 ab5tract leont: basically what that message is saying is I tried this on the object you gave me and it failed
21:26 masak leont: to Perl 6 people, a Less Than Awesome error is considered a bug.
21:27 perlpilot leont: what's the code that generates that message?
21:28 mst masak: the only difference between perl5 and perl6 communities there is that we'd just call it 'crap'
21:28 leont It was a sprintf with an accidental Int:U
21:28 ab5tract and the object you "gave" it was undefined, and then placed in integer context, producing the (Int) type object
21:28 masak mst: heh.
21:28 perlpilot mst: but that's LTA  ;)
21:29 ab5tract m: sprintf("%d things", Nil)
21:29 camelia rakudo-moar 330f81: OUTPUT«Directive d not applicable for type Any␤  in any  at /home/camelia/rakudo-m-inst-1/share/perl6/runtime/CORE.setting.moarvm line 1␤  in any panic at /home/camelia/rakudo-m-inst-1/share/nqp/lib/NQPHLL.moarvm line 1␤␤»
21:29 masak perlpilot: warning -- meta level 1 reached.
21:29 ab5tract m: my $i = 5; $i = Nil; sprintf("%d things", $i)
21:29 camelia rakudo-moar 330f81: OUTPUT«Directive d not applicable for type Any␤  in any  at /home/camelia/rakudo-m-inst-1/share/perl6/runtime/CORE.setting.moarvm line 1␤  in any panic at /home/camelia/rakudo-m-inst-1/share/nqp/lib/NQPHLL.moarvm line 1␤␤»
21:29 leont Next step, debugging proc-async. Is the bug in my code or in p6? Odds are increasinly not in my favor, but we'll see
21:29 ab5tract m: my Int $i = 5; $i = Nil; sprintf("%d things", $i)
21:29 camelia rakudo-moar 330f81: OUTPUT«Directive d not applicable for type Int␤  in any  at /home/camelia/rakudo-m-inst-1/share/perl6/runtime/CORE.setting.moarvm line 1␤  in any panic at /home/camelia/rakudo-m-inst-1/share/nqp/lib/NQPHLL.moarvm line 1␤␤»
21:30 leont The lack of pointing to the right line was also LTA
21:30 araujo_ joined #perl6
21:31 leont Once I figured out the error was sprintf related, I could reduce it to 2-3 possibilities and it was found quickly enough
21:31 leont That wasn't possible until recently, when the error much improved (forgot what it was before, but it was extremely cryptic)
21:32 lizmat ab5tract: that's going to be a tough one to fix generally  :-(
21:32 lizmat as we cannot actually type constraints with slurpies
21:33 ab5tract you mean fixing that class of error message?
21:33 ab5tract or my useless use bug?
21:33 teatime MadcapJake: o/
21:33 yoleaux 14:29Z <MadcapJake> teatime: this (your gist) looks like it could be it, but in all the C examples I've seen the $context that you have given to CURLOPT_READDATA is something written to from inside the CURLOPT_READFUNCTION (though I'm really not understanding how that works).
21:34 lizmat class of sprintf error message
21:36 MadcapJake teatime:  I ended up scrapping using Net::Curl in favor of Net::SMTP
21:36 teatime lol yeah just saw
21:36 RabidGravy MadcapJake, retupmoca merged that fix so all good now :)
21:38 teatime MadcapJake: I still haven't figured out if it's legit for a callback like that to be a closure (i.e., how it read $src-buf directly from the outer scope)
21:38 MadcapJake Sweet! I'm out at dinner right now, but I'll try and finish up the issue submitter tonight. I got a good domain: perl6.hackquest.com ????
21:38 ab5tract lizmat: yeah, I assumed so. they are easy enough to catch once you get used to them
21:40 MadcapJake teatime: check out my latest in the gist, it would work but Net::Curl has no support for slist and for callbacks (outside of the one hard-coded WRITEFUNCTION case)
21:41 rigsby joined #perl6
21:42 MadcapJake Net::Curl needs to more universally support the various things that libcurl allows.
21:42 teatime *shrug*
21:42 araujo__ joined #perl6
21:42 khw joined #perl6
21:44 raiph joined #perl6
21:46 labster joined #perl6
21:46 znpy joined #perl6
21:54 perlawhirl joined #perl6
21:54 Cabanossi joined #perl6
21:55 tony-o MadcapJake: this repo has a ton of deps, haha
21:57 MadcapJake Lol I wanted to avoid using Net::SMTP but Net::Curl doesn't support SMTP posts yet. I still haven't pushed my latest work yet though.
21:58 tony-o DrForr: my mistake i thought when you said H:S:T earlier that you meant HTTP::Server::Threaded and *not* ::Tiny
21:58 tony-o MadcapJake: IO::Blob fails test ?
21:59 cpage_ joined #perl6
22:00 MadcapJake Not sure about that, wrt what?
22:00 ab5tract Finding which H:S:T, the great shark hunt...
22:00 tony-o you/sixbug
22:01 ab5tract hoelzro: thank you so much for the repl work! it's running very smoothly over here
22:01 hoelzro glad to hear it!
22:03 ab5tract i'm looking forward to digging into it further. I'd like to dust off Terminal::Print and
22:03 _nadim joined #perl6
22:04 ab5tract I think that a "multi-REPL" thingy might make an interesting example case
22:04 hoelzro ab5tract: multi-REPL?
22:04 tony-o ab5tract: how good is that module cross platform-wise?
22:05 ab5tract tony-o: fine between OS X and Linux... it relies on tput, so Windows is a no go at the moment :(
22:05 ab5tract hoelzro: not a super well defined idea in my head, tbh
22:06 hoelzro well, hopefully having the REPL in Perl 6 should help prototype new ideas =)
22:06 edjsu joined #perl6
22:06 ab5tract maybe something like a command to spawn off a react block into a new "window" in your repl
22:06 hoelzro ah ha
22:06 nadim joined #perl6
22:07 kid51 joined #perl6
22:07 ab5tract a bit like a tmux-for-your-repl kind of thing
22:07 ab5tract tony-o: it's also a bit broken at the moment :(
22:07 ab5tract what platforms do you have in mind?
22:08 tony-o ab5tract: is there a method to tell if tput is available?
22:08 hoelzro that could be *really* handy, especially combining awwaiid's MY::REPL idea with threads
22:08 tony-o ab5tract: i'm looking at putting lipstick on https://github.com/tony-o/perl6-flow#flow-vs-prove
22:08 tony-o oops, didn't mean to include the anchor -
22:08 Khisanth joined #perl6
22:09 dalek DBIish: be37b07 | (Kaare Rasmussen)++ | / (3 files):
22:09 dalek DBIish: Add support for PostgreSQL's LISTEN / NOTIFY
22:09 dalek DBIish: review: https://github.com/perl6/DBIish/commit/be37b07207
22:09 dalek DBIish: cac503b | (Kaare Rasmussen)++ | / (2 files):
22:09 dalek DBIish: Rename method to pg-notifies and add a test for payload.
22:09 dalek DBIish: review: https://github.com/perl6/DBIish/commit/cac503bec5
22:09 dalek DBIish: df3ac99 | (Kaare Rasmussen)++ | / (3 files):
22:09 dalek DBIish: Move notify functionality into PGconn
22:09 dalek DBIish: review: https://github.com/perl6/DBIish/commit/df3ac99d83
22:09 dalek DBIish: 8e81513 | (Kaare Rasmussen)++ | README.pod:
22:09 dalek DBIish: Document pg-notifies
22:09 dalek DBIish: review: https://github.com/perl6/DBIish/commit/8e8151313f
22:09 dalek DBIish: 50763db | (Salvador Ortiz)++ | / (4 files):
22:09 dalek DBIish: Merge  git://github.com/kaare/DBIish into kaare-master
22:09 dalek DBIish: review: https://github.com/perl6/DBIish/commit/50763db664
22:09 dalek DBIish: 877d44b | (Salvador Ortiz)++ | / (4 files):
22:09 dalek DBIish: Merge branch 'kaare-master'
22:09 dalek DBIish: review: https://github.com/perl6/DBIish/commit/877d44b03f
22:09 dalek DBIish: b4ebdac | (Salvador Ortiz)++ | lib/DBDish/Pg/ (2 files):
22:09 dalek DBIish: Pg: add support for LISTEN / NOTIFY
22:09 dalek DBIish:
22:09 dalek DBIish: kaare++ work with minor cleanup
22:09 dalek DBIish: review: https://github.com/perl6/DBIish/commit/b4ebdaca83
22:09 ab5tract tony-o: actually, it will also default to ansi
22:10 ab5tract but probably windows terminals don't know anything about it
22:10 Sgeo joined #perl6
22:10 leont It seems my proc-async is hanging at the end of its input
22:11 TEttinger joined #perl6
22:11 leont My :done handler on the stdout tap doesn't run at all :-/
22:16 ab5tract tony-o: Terminal::Print should do totally fine for that, at least for *nix. I think everyone ships tput
22:17 timotimo hoelzro: in your latest article you wrote "C runtimes" when you meant "C++ runtimes" in the Destructors section
22:17 hoelzro ...or did I? >:)
22:18 hoelzro when I wrote it, I was thinking about the double free(), but a double destructor is just as bad! I'll fix that right up, thanks for pointing that out, timotimo++
22:18 telex joined #perl6
22:18 timotimo oke :)
22:20 hoelzro fixed!
22:20 arnsholt ab5tract: For a multi-REPL, are you thinking something along the lines of IPython?
22:23 ab5tract arnsholt: I haven't used it, I've heard great things
22:23 ab5tract as I understand it they have made it a platform that you can embed in other languages
22:23 wamba joined #perl6
22:24 ab5tract I'm thinking of something less complex, I think
22:24 tony-o ab5tract: cool, going to give that a shot
22:25 cpage_ joined #perl6
22:25 rigsby joined #perl6
22:25 arnsholt It's not so much that you can embed IPython in other languages as you can embed other languages in IPython
22:25 arnsholt I've hacked up a semi-usable Perl 6 kernel for it
22:26 Khisanth joined #perl6
22:28 ab5tract ah, sweet!
22:30 dalek doc: 57f7325 | (Zoffix Znet)++ | doc/Language/objects.pod:
22:30 dalek doc: Example using EVAL needs use MONKEY-SEE-NO-EVAL
22:30 dalek doc: review: https://github.com/perl6/doc/commit/57f7325706
22:32 labster joined #perl6
22:32 MadcapJake tony-o: I don't have IO::Blob in sixbug, I'm not following what you mean :P
22:32 tony-o MadcapJake: it's one of the depends
22:33 MadcapJake Crust, Email::Simple, JSON::Fast, Net::Curl, Net::SMTP are my deps
22:34 timotimo must be a transitive dependoncy
22:35 arnsholt ab5tract: Oh, the repo is https://github.com/timo/iperl6kernel/ mind, since timotimo++ made the initial prototype
22:35 MadcapJake oh tony-o: DrForr fixed that IO::Blob test fail earlier today
22:36 tony-o i'm still getting it - timotimo is right, it is one of the depends further down the line MadcapJake
22:37 tony-o MadcapJake: DrForr: https://gist.github.com/tony-o/da4945f12fac442ead19b02d483a388d
22:37 MadcapJake tony-o: https://github.com/moznion/p6-IO-Blob/pull/7
22:38 tony-o MadcapJake: ahh, it just isn't merged yet
22:38 MadcapJake yep
22:41 MadcapJake I've found that the key to keeping everything working is never to update :P
22:44 tony-o haha
22:47 ab5tract tony-o: I just pushed a few fixes.. the async example does not fall on its face any more, but the zig zag example is still pretty sad. but at least the other examples essentially do what they say on the tin. hopefully it gives you an idea on how to work with them.
22:47 ab5tract s/them/Terminal::Print/
22:47 tony-o cool, thank you!
22:48 cpage_ joined #perl6
22:49 ab5tract and that's all for me tonight. see you later #perl6!
22:54 timotimo seeya ab5tract
23:02 dalek ecosystem: 65337f8 | (Nadim Khemir)++ | META.list:
23:02 dalek ecosystem: CHANGED: use release branche
23:02 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/65337f86bc
23:02 dalek ecosystem: 3535b62 | (Zoffix Znet)++ | META.list:
23:02 dalek ecosystem: Merge pull request #180 from nkh/master
23:02 dalek ecosystem:
23:02 dalek ecosystem: CHANGED: use release branche
23:02 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/3535b622aa
23:02 bpmedley joined #perl6
23:06 Cabanossi joined #perl6
23:14 Xliff_ Is anyone aware of a problem with NativeHelpers::Blob?
23:14 Xliff_ I just tried installing it with panda and it failed.
23:14 Xliff_ ===SORRY!=== Error while compiling /root/.panda-work/1459293162_4/lib/MoarVM/Guts/REPRs.
23:14 Xliff_ pm6 (MoarVM::Guts::REPRs)
23:14 Xliff_ An exception occurred while evaluating a constant
23:14 Xliff_ at /root/.panda-work/1459293162_4/lib/MoarVM/Guts/REPRs.pm6 (MoarVM::Guts::REPRs):11
23:14 Xliff_ Exception details:
23:14 Xliff_ Can't determine actual Offset
23:14 Xliff_ in block  at /root/.panda-work/1459293162_4/lib/MoarVM/Guts/REPRs.pm6 (MoarVM::Guts::REPRs) line 16
23:15 teatime weird I installed it yesterday.
23:15 timotimo Xliff_: you may have to run Configure.pl again?
23:16 Xliff_ timotimo: I will check.
23:17 Xliff_ BTW, this is with
23:17 Xliff_ root@infinity:~# perl -v
23:17 Xliff_ This is perl 5, version 22, subversion 1 (v5.22.1) built for i586-linux-gnu-thread-multi-64int
23:18 Xliff_ timotimo, which Configure.pl?
23:18 timotimo rakudo's
23:18 Xliff_ Hrm.
23:18 timotimo wait, what ... are those things? Guts? REPRs?
23:18 Xliff_ I just rebuild rakudo with rakudobrew about an hour ago.
23:18 timotimo oooh, that's NativeHelpers
23:18 Xliff_ Yes.
23:18 timotimo sorry, i was confused
23:18 Xliff_ Ah.
23:18 timotimo your perl5 version doesn't interest much, though :)
23:19 * MadcapJake is off to see Zootopia!
23:19 Xliff_ D'oh!
23:19 timotimo have fun, MadcapJake!
23:19 Xliff_ root@infinity:~# perl6 -v
23:19 Xliff_ This is Rakudo version 2016.03-49-g330f814 built on MoarVM version 2016.03-46-g50c7f6a
23:19 Xliff_ implementing Perl 6.c.
23:20 timotimo all i can say is i can install NH::B with panda without trouble :\
23:20 Xliff_ Hrm.
23:21 Xliff_ Have you refreshed rakudo from git, recently?
23:21 timotimo are you on a 32bit system?
23:23 Xliff_ Yeah. The VM I'm on is 32 bit.
23:23 Xliff_ I would expect the scripts to pick up on that.
23:24 timotimo if you look at the MoarVM::Guts::REPRs, you'll see it casts a Pointer objects into a uint64 array and look for the value in there
23:24 timotimo on a 32bit system, that won't work, i think
23:24 timotimo it would have been really good to point out you're running 32bit up front :)
23:24 Xliff_ Shouldn't a uint64 work properly on a 32-bit system even if it has to do a little thunking?
23:25 Xliff_ If rakudo is only meant for 64 bit systems, I wouldn't expect to be able to build it.
23:26 timotimo the thing is that pointers on a 32bit system aren't 64bits big
23:26 Xliff_ True.
23:26 timotimo so if you're looking through a struct to find that value, it'll only work if that 32bit value is aligned to have another 32bit hole to the left
23:27 skids joined #perl6
23:27 teatime I think there are 64-bit-wide types on 32-bit systems but no 64-bit ints, so no definition of uint64
23:27 Xliff_ So NativeHelper::Blob won't work on 32-bit systems, which means neither will DBIish
23:27 teatime probably wrong tho
23:27 timotimo oh, yikes. DBIish requires NH::B?
23:27 Xliff_ Yesd
23:27 Xliff_ s/d$//
23:28 Xliff_ ==> DBIish depends on NativeHelpers::Blob, Data::Dump
23:29 timotimo i can't find usages of OBJECT_BODY or Offset in anything but MoarVM/Guts/...
23:29 timotimo so it seems like that isn't even necessary?
23:29 timotimo sorry, wrong
23:29 timotimo BODY_OF uses OBJECT_BODY, and that is used in some places
23:30 sortiz_ NativeHelpers::Blob should work on any rakudo supported system, otherwise is a bug, that need be fixed.
23:30 timotimo sortiz_: yeah, its Offset finder probably needs to search for a 32bit wide int on a 32bit system
23:30 BenGoldberg joined #perl6
23:31 ZoffixLappy joined #perl6
23:31 ZoffixLappy m: https://gist.github.com/zoffixznet/83d6b497a37a43133ad2bc8b034a0412
23:31 camelia rakudo-moar 330f81: OUTPUT«5===SORRY!5=== Error while compiling /tmp/RprgT0941M␤Redeclaration of method x␤at /tmp/RprgT0941M:3␤------> 3d_method('x', my method x(A:) { say 42 }7⏏5);           ␤»
23:31 teatime also what I said above is totally wrong, C99 requires long long to be ≥ 64-bits and for uint64_t to exist on all platforms.
23:31 ZoffixLappy How come it's a redeclaration? There's no relation between Int and A types...?
23:32 timotimo ZoffixLappy: that's because you have "my method x" in there
23:32 timotimo both have the same name, so it's a redeclaration
23:33 ZoffixLappy Ah, I see.
23:33 ZoffixLappy Thanks.
23:33 sortiz_ timotimo, it Offset is calculated based on rakudo types, should work well.
23:36 cpage_ joined #perl6
23:36 ZoffixLappy Another question: what's the point of A.^compose in that code? Seems to work fine without it.
23:36 ZoffixLappy Well, this code:
23:36 ZoffixLappy m: https://gist.github.com/zoffixznet/6b5e4bdcfd45aa4879d8099ac2ac6c70
23:36 camelia rakudo-moar 330f81: OUTPUT«A class␤Int class␤»
23:39 timotimo sortiz_: well, i can't test NH::B on my systems, because all my systems are 64bit
23:39 timotimo and Xliff_ pasted the failure they got above
23:40 sortiz_ timotimo, as far as the MoarVM's reprs don't change, I don't see any problem. Let me see Xliff_ problem...
23:41 * ZoffixLappy is currently on a 32-bit box, if one's needed
23:44 timotimo sortiz_: but how can it find the offset when the pointer is 32bit wide and you're trying to compare the pointer against a 64bit slice of the object?
23:45 sortiz_ That exception is a guard I put for those untested cases.
23:45 timotimo and apparently it fires :)
23:45 timotimo so you're saying "it should work", and i say "well, it doesn't"
23:45 timotimo so ... are you going to try to fix it? i'm confused by this conversation we're having
23:48 sortiz_ Yes, I will review and attempt to fix that, may be that some assumptions about rakudo capabilities where wrong.
23:48 timotimo "capabilities"?
23:48 Xliff_ Thanks for looking into the problem, sortiz_. Now I must eat.
23:49 timotimo Xliff_: are you able to build dwarfdump? that could give us the exact layout of the struct that sortiz' code is trying to inspect
23:49 timotimo actually, you can just send me your libmoar.so and i can do it
23:49 sortiz_ Xliff_, for the reference, please open an issue en NH::Blob.
23:50 * diakopter looks up dwarfdump
23:51 * sortiz_ installing a 32 bits machine for testing...
23:53 nadim timotimo: latest DDT with faster filter waiting for you to test ;)  I added a feature that let's you say how much of a Match sstring you want to see. You asked for that a few weeks ago if I am right.
23:53 ZoffixLappy m: class STMT is export is repr('CPointer') { }; sub sqlite3_column_text(STMT, int32) is native('sqlite3') returns Str { };
23:53 camelia rakudo-moar 330f81: OUTPUT«5===SORRY!5=== Error while compiling /tmp/IFxeKh72Cr␤Can't use unknown trait 'is native' in a sub declaration.␤at /tmp/IFxeKh72Cr:1␤    expecting any of:␤        rw raw hidden-from-backtrace hidden-from-USAGE␤        pure default DEPRECATED i…»
23:53 ZoffixLappy Unknown trait? wat?
23:54 diakopter star-m: class STMT is export is repr('CPointer') { }; sub sqlite3_column_text(STMT, int32) is native('sqlite3') returns Str { };
23:54 camelia star-m 2016.01: OUTPUT«5===SORRY!5=== Error while compiling /tmp/4sjmHq5eKJ␤Can't use unknown trait 'is native' in a sub declaration.␤at /tmp/4sjmHq5eKJ:1␤    expecting any of:␤        rw raw hidden-from-backtrace hidden-from-USAGE␤        pure default DEPRECATED inlin…»
23:54 ZoffixLappy sub sqlite3_column_text(int32) is native('sqlite3') returns Str { };
23:55 ZoffixLappy m: sub sqlite3_column_text(int32) is native('sqlite3') returns Str { };
23:55 camelia rakudo-moar 330f81: OUTPUT«5===SORRY!5=== Error while compiling /tmp/2EGUfuRzeD␤Can't use unknown trait 'is native' in a sub declaration.␤at /tmp/2EGUfuRzeD:1␤    expecting any of:␤        rw raw hidden-from-backtrace hidden-from-USAGE␤        pure default DEPRECATED i…»
23:55 diakopter star-m: use NativeCall; class STMT is export is repr('CPointer') { }; sub sqlite3_column_text(STMT, int32) is native('sqlite3') returns Str { };
23:55 camelia star-m 2016.01: ( no output )
23:55 timotimo yeah, need to "use NativeCall"
23:55 sortiz_ timotimo, for example, I assume that MoarVM's MVVuint64 is the same size of rakudo's uint64 (but not necessarily 64 bits), and that if rakudo can create a Pointer without error, it is valid ;-)
23:56 ZoffixLappy Ohh damn. One too many pints for me, I guess lol
23:56 timotimo sortiz_: are you sure the pointer will be aligned to 64bit boundaries?
23:57 timotimo and are you also sure "void *" is the same size on 32bit and 64bit systems, and that it's 64bit big on both?
23:58 Khisanth joined #perl6

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

Perl 6 | Reference Documentation | Rakudo