Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-01-03

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:08 skids joined #perl6
00:09 RabidGravy eek
00:09 RabidGravy nighty night good people
00:17 espadrine_ joined #perl6
00:19 vendethiel joined #perl6
00:23 llfourn joined #perl6
00:37 pjscott joined #perl6
00:43 pjscott joined #perl6
00:51 bitmap joined #perl6
00:53 ugexe joined #perl6
00:58 Rotwang could someone tell me what's going on? :
00:58 Rotwang m: my %c = (a => 1); say 'a' ~~ %c;
00:58 camelia rakudo-moar b8a75b: OUTPUT«True␤»
00:59 Rotwang m: my %c = (a => 1); my %f = (b => [%c]); 'a' ~~ %f<b>[0];
00:59 camelia rakudo-moar b8a75b: OUTPUT«Method 'a' not found for invocant of class 'Str'␤  in block <unit> at /tmp/J9m9pqA80n line 1␤␤»
01:02 yurivish_ joined #perl6
01:05 ugexe m: say $*CWD ~~ :e
01:05 camelia rakudo-moar b8a75b: OUTPUT«True␤»
01:05 kid51 joined #perl6
01:06 ugexe m: say $*CWD.e; say %(:e(1))
01:06 camelia rakudo-moar b8a75b: OUTPUT«True␤e => 1␤»
01:08 Rotwang : my %c = (a => 1); my %f = (b => [%c,]); 'a' ~~ %f<b>[0];
01:08 Rotwang m: my %c = (a => 1); my %f = (b => [%c,]); 'a' ~~ %f<b>[0];
01:08 camelia rakudo-moar b8a75b: ( no output )
01:08 Rotwang m: my %c = (a => 1); my %f = (b => [%c,]); say 'a' ~~ %f<b>[0];
01:08 camelia rakudo-moar b8a75b: OUTPUT«True␤»
01:09 Rotwang so if I put hash directly into array it gets "flattened" to the container? or it least it seems like it
01:10 lnrdo joined #perl6
01:10 Mouq m: my %c = (a => 1); my %f = (b => [%c,]); dd %f
01:10 camelia rakudo-moar b8a75b: OUTPUT«Hash %f = {:b($[{:a(1)},])}␤»
01:10 Mouq m: my %c = (a => 1); my %f = (b => [%c]); dd %f
01:10 camelia rakudo-moar b8a75b: OUTPUT«Hash %f = {:b($[:a(1)])}␤»
01:10 Mouq m: my %c = (a => 1); my %f = (b => [$%c]); dd %f
01:10 camelia rakudo-moar b8a75b: OUTPUT«Hash %f = {:b($[{:a(1)},])}␤»
01:14 skids Rotwang: single argument rule http://docs.perl6.org/language/functions#Slurpy_Conventions
01:15 Rotwang x__X
01:15 Rotwang perl6 is the best thing that happened to mankind since sliced bread
01:15 Rotwang (with a few notable exceptions of course)
01:16 Rotwang however I doubt it will go MAINstream, mostly because of it's "quirkiness"
01:18 skids Certainly we've seen languages exist in niches for long periods of time.  IMO its merits will make it a good teaching language and it will slowly gain market share as a result.
01:19 skids Back when I was in school, even though it was rarely used language, some of the CS professors preferred to teach advanced compilers/language in ada, because they could show examples of all the constructs they wanted to teach in that language.
01:20 skids (Not that ADA gained market share, but thats because it is no fun. :-)
01:23 BenGoldberg m: my %c = (a => 1); my %f = (b => [|%c]); dd %f
01:23 camelia rakudo-moar b8a75b: OUTPUT«Hash %f = {:b($[:a(1)])}␤»
01:23 BenGoldberg m: my %c = (a => 1); my %f = (b => |%c); dd %f
01:23 camelia rakudo-moar b8a75b: OUTPUT«Hash %f = {:b(slip$(:a(1),))}␤»
01:23 BenGoldberg m: my %c = (a => 1); my %f = (b => %c).flat; dd %f
01:23 camelia rakudo-moar b8a75b: OUTPUT«Hash %f = {:b(${:a(1)})}␤»
01:23 BenGoldberg m: my %c = (a => 1); my %f = (b => %c.flat); dd %f
01:23 troydm joined #perl6
01:23 camelia rakudo-moar b8a75b: OUTPUT«Hash %f = {:b((:a(1),).Seq)}␤»
01:24 llfourn joined #perl6
01:24 BenGoldberg m: my %c = a => 1; my %f = (b => %c.flat); dd %f
01:24 camelia rakudo-moar b8a75b: OUTPUT«Hash %f = {:b((:a(1),).Seq)}␤»
01:24 average left #perl6
01:24 BenGoldberg m: my %f = (:b(:a(1)); dd %f
01:24 camelia rakudo-moar b8a75b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/InJolmRaEs␤Cannot use variable %f in declaration to initialize itself␤at /tmp/InJolmRaEs:1␤------> 3my %f = (:b(:a(1)); dd %7⏏5f␤    expecting any of:␤        argument list␤        term␤»
01:25 BenGoldberg m: my %f = (:b(:a(1))); dd %f;
01:25 camelia rakudo-moar b8a75b: OUTPUT«Hash %f = {:b(:a(1))}␤»
01:25 BenGoldberg m: my %f = (:b(:a(1))); dd %f{b};
01:25 camelia rakudo-moar b8a75b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/AIJ10dJ8ic␤Undeclared routine:␤    b used at line 1␤␤»
01:25 BenGoldberg m: my %f = (:b(:a(1))); dd %f<b>;
01:25 camelia rakudo-moar b8a75b: OUTPUT«Pair %f = :a(1)␤»
01:28 pjscott joined #perl6
01:29 wamba joined #perl6
01:35 mopp joined #perl6
01:41 mopp joined #perl6
01:42 mopp Perl 6.
01:42 hahainternet indeed
01:43 hahainternet is $foo[*-1] really acceptable syntax?
01:43 hahainternet it seems rather odd
01:43 hahainternet $foo[$foo.end] works but also a little ugly
01:43 hahainternet wonder if it topicalises
01:44 hahainternet m: my $foo = (2,4,8); say $foo[.end]
01:44 camelia rakudo-moar b8a75b: OUTPUT«2␤»
01:44 hahainternet this is not what i expected!
01:44 Mouq m: my $foo = (2,4,8); say $foo[*.end]
01:44 camelia rakudo-moar b8a75b: OUTPUT«2␤»
01:44 hahainternet Mouq: yeah i found that works, same as *-1
01:44 hahainternet but that .end works is bizarre
01:44 Mouq m: my $foo = (2,4,8); say $foo
01:44 camelia rakudo-moar b8a75b: OUTPUT«(2 4 8)␤»
01:45 hahainternet it's because the empty string or similar has a .end method also
01:45 hahainternet oh i just noticed yours doesn't work lol
01:45 Mouq Oh, oh. Right. *.end is being executed with an argument of the number 3
01:46 hahainternet it's a bit odd really
01:46 hahainternet i like the ability to easily index from the end, but *-1 will have to do
01:47 Mouq m: my $foo = (2,4,8); say $foo[{$_ - 1}] # :P
01:47 camelia rakudo-moar b8a75b: OUTPUT«8␤»
01:47 hahainternet indeed!
01:49 skids RT 127024 and RT 127129 can be merged if someone who can do that action is around
01:50 Mouq skids: sure, I should be able to :)
01:52 skids Mouq++
02:01 Mouq Does anyone happen to know what DESCEND used to do in ~2010 Rakudo? I imagine it's something like "nextsame"
02:04 sprocket if i have a variable that i’m using in a react { whenver { … }; whenever { … } } situation, is it threadsafe by default?
02:08 pjscott joined #perl6
02:13 TimToady joined #perl6
02:18 llfourn joined #perl6
02:21 pjscott joined #perl6
02:27 zwu joined #perl6
02:27 zwu how to delete a variable in a scope?
02:29 leont What do you mean?
02:31 zwu like del in python to delete attribute of object:  del foo.bar
02:32 tadzik why would you ever want to do that
02:32 tadzik this is basically breaking the interface of your object
02:33 tadzik making your code unreliable and unpredictable in the general case
02:35 skids As far as variables in a scope, I do not believe there is a way to undeclare them.
02:35 MadcapJake joined #perl6
02:37 zwu in order to release memory by GC, but I think it is same to assign Nil to a variable instead of delete it.
02:37 skids The only reason I could see actually wanting to do so is to get syntax errors if someone uses it later on, or allow redeclaration later on.
02:38 Mouq zwu: Python can do that because variables are checked at run time. Such a thing doesn't make as much sense in Perl 6
02:39 Mouq Since variables are checked at compile time
02:40 skids I don't think the idea of going back through previous callframe lexpads to remove unused variables is especially efficient, but if it is, then it's something the compiler should be doing without the user needing to say so.
02:40 zwu thanks,
02:41 cdg joined #perl6
02:47 ugexex joined #perl6
02:47 molaf__ joined #perl6
02:49 pjscott joined #perl6
02:51 mort96 hey
02:51 skids o/
02:52 mort96 so, I've installed a module with panda. How do I include it with a script?
02:52 pjscott use Foo;
02:52 mort96 ah awesome, thanks
02:58 cdg joined #perl6
03:00 xyf joined #perl6
03:02 dalek rakudo-star-daily: ce6a800 | coke++ | log/ (8 files):
03:02 dalek rakudo-star-daily: today (automated commit)
03:02 dalek rakudo-star-daily: review: https://github.com/coke/rakudo-star-daily/commit/ce6a800b5c
03:06 xyf hello, how can I read content in a gb2312 format file?   below command doesn't work: perl6 -e'.encode("gb2312").say for "gb2312format.txt".IO.lines'
03:07 xyf Unknown string encoding: 'gb2312'
03:07 xyf in block <unit> at -e line 1
03:07 llfourn joined #perl6
03:08 noganex joined #perl6
03:13 ugexex utf8, utf16, utf32, ascii, iso-8859-1, and windows-1252 are the available encodings
03:14 * xyf faint.....
03:14 xyf means gbk, gb18030 etc is not available in perl6 yet?
03:15 skids Not yet.
03:18 leont Patches welcome! ;-)
03:19 xyf ;)
03:20 cygx joined #perl6
03:20 cygx note that utf32 isn't implemented as well
03:20 cygx m: "hallo".encode("utf32")
03:20 camelia rakudo-moar b8a75b: OUTPUT«Unknown string encoding: 'utf32'␤  in block <unit> at /tmp/UdD7lvtYHX line 1␤␤»
03:20 leont No one uses that for interexchange anyway
03:21 xxpor_lap joined #perl6
03:21 leont In p5, Encode.pm uses abstract descriptions to cover most of the code, though varying encodings still need substantial support code. Such an approach may be sensible here too
03:21 mort96 so, I'm noticing that a script which does nothing but include HTTP::Client and print "hello world" takes about 1.3 seconds - that's kind of a long time.
03:22 mort96 Is there any way to make that faster, maybe by precompiling things to bytecode or something?
03:22 cygx mort96: also on subsequent runs, or only the first one?
03:22 mort96 also on subsequent runs
03:23 mort96 `time` claims it's using 99% CPU during that time too
03:23 cygx leont: if you need something right now and don't feel like patching moarvm, there's of course always &chrs ;)
03:23 mort96 in node.js, a=require("http"); console.log("hello world"); takes 0.06 seconds by comparison
03:24 leont Start-up performance isn't well optimized yet
03:24 cygx mort96: what's your rakudo version?
03:24 leont (well, performance in general isn't our strong side at the moment, people are working on it)
03:24 mort96 "This is perl6 version 2015.11 built on MoarVM version 2015.11"
03:24 mort96 from perl6 --version
03:24 sprocket the “NativeCall: Consider adding the api version of the library you want to use” message on STDERR is new - is there any way to quash it?
03:24 sprocket aside from adding a version to the NativeCall bindings
03:24 Hotkeys should get 2015.12 aka 6.c
03:24 leont Upgrading might help, yes
03:25 mort96 alright, will do that
03:25 sprocket which i didn’t see in the documentation
03:25 mort96 it's not a dealbreaker in any case
03:26 AlexDaniel joined #perl6
03:26 ugexex those encoding have various descriptors that can be used
03:26 AlexDaniel m: my $foo = (2,4,8); say $foo[{.pred}]
03:26 camelia rakudo-moar b8a75b: OUTPUT«8␤»
03:26 AlexDaniel m: my $foo = (2,4,8); say $foo[*.pred]
03:26 camelia rakudo-moar b8a75b: OUTPUT«8␤»
03:26 AlexDaniel hahainternet: ↑
03:26 skids sprocket: That is new and a bit annoying.  To squash it I used e.g. is native('crypto', v0 but False)
03:27 skids That will disable all version checks, but is a it of a sleazy way of doing so.
03:27 AlexDaniel I can't see what's wrong with *-1 though :)
03:27 sprocket skids: is there any way of saying “version 1 or greater?”
03:27 sprocket or something to that effect?
03:27 skids sprocket: not that I could tell.
03:28 sprocket or is it meant to be a fixed version number ie) 1.4.3
03:28 skids I imagine a way to do it will apear eventually.
03:28 sprocket ok
03:28 AlexDaniel 1.0.0..* ?
03:29 * AlexDaniel feels like he has seen that somewhere
03:30 orbus joined #perl6
03:31 skids AlexDaniel: When I looked at the code it compared the major version number to the filename or something.
03:32 psy_ joined #perl6
03:33 Mouq v1+
03:33 leont cygx: actually, some way to add pure-perl encodings for these cases may actually be a good idea. Sometimes supporting something at all is more important than having a fast implementation.
03:34 * cygx agrees with skids
03:34 cygx the code expects a path, or a name + fixed version number
03:35 ugexex what makes locks non-composable (or bad form)? jnthn would mention that but i never found out why
03:36 yurivis__ joined #perl6
03:36 skids Two locks opened in opposite order can deadlock, and it's easy to do that inside a highly composed codebase.
03:37 skids But, the recent concurrent-only Promise changes has its own deadlock hazards, if you have any feedback loops.
03:37 sprocket on the subject of locks and whatnot, in a react { whenever { … } } structure, are any variables used in there considered to be threadsafe?
03:37 ugexex skids: what do you think this could be problematic? https://github.com/rakudo/rakudo/blob/nom/src/core/CompUnit/Repository/Locally.pm#L2
03:38 skids Well, it's not actually used to .protect so.... ?
03:41 mort96 so, say I want to make an asynchronous HTTP request, letting me do a bunch of things while the request is going, but have some callback or something get called when it's done. How would I do that in perl 6?
03:41 skids ugexex: Basically if there's no elegant way to use a Channel or Promise or Supply to acheive what you am at, I would not worry abot using Lock.
03:41 yurivis__ Why does my $x = 1, 2, 3; make $x an Int while my @x = 1, 2, 3 makes $x an array, and typing 1, 2, 3 at the REPL prints something that looks like a list?
03:42 mort96 I could do it with threads presumably, but there seem to be nicer features for asynch things in perl
03:42 sprocket mort96: couldn’t you wrap that in a supply { … } block?
03:42 orbus mort96: I'm mostly just getting started in perl6 but you can string promises together so they fire in sequence - that might do what you're looking for?
03:43 mort96 I'm not sure what a supply {...} block is
03:43 ugexex you cant use data from an IO::Socket outside its originating thread
03:43 skids yurivis: Array is the default container-type of @-sigiled variables.  A literal (1,2,3) is indeed a list.  If you want to put the list in a @a, bind with := instead of assigning.
03:43 sprocket mort96: https://perl6advent.wordpress.com/2015/12/14/day-14-a-nice-supplies-syntactic-relief-for-working-with-asynchronous-data/
03:43 mort96 I currently have HTTP::Client, which seems nice except that it's blocking
03:44 pjscott joined #perl6
03:44 ugexex thats a limitation of libuv and scheduler-per-thread model
03:45 yurivis__ skids: is := (or are lists) common in perl code? it seems like a feature you'd use in rare cases rather than regularly
03:45 orbus http://doc.perl6.org/type/Promise#method_then
03:45 ugexex you could save to a file, close the file, notify another thread when its done, and then use it
03:45 sprocket mort96: there’s also IO::Socket::Async, but that’s not an http client
03:45 yurivis__ skids: and I would expect my $x = 1, 2, 3 to do something other than what it does; currently it assigns 1 to $x and prints out (1 2 3) at the repl
03:46 skids yurivis: lists usually do not end up bound to @ variables in common idioms except when passed to @ routine parameters
03:46 ugexex you cant use openssl with io::socket::http yet either. i wrote a compatability layer but its too slow
03:46 ugexex i mean io::socket::async
03:46 mort96 orbus: if I have blocking code in a promise, will that at all allow me to run other things simultaneously as if it's in a different thread?
03:47 leont openssl is a hard to use mess :-(
03:47 orbus as far as I understand, yes
03:47 ugexex again, you cannot read data from an io::socket from 1 thread to another
03:47 skids The difference between the $ = and @ = comes down to the operand and MMD -- there are two conflicting groups that want different behaviors from "$a = 1,2,3" -- the way it works is more pleasant for people comig from C.
03:47 orbus promises get scheduled on different threads
03:48 mort96 interesting
03:48 cygx yurivis__: I think I mainly use := when interacting with nqp code
03:48 cygx if possible, I rather go with sigilless variables instead
03:48 yurivis__ there are sigilless variables? like, my x = 1, 2, 3?
03:48 mort96 I'm used to javascript, where blocking code in a promise would block everything
03:48 yurivis__ m: my x = 1, 2, 3;
03:48 camelia rakudo-moar b8a75b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/0C9OWgDYiK␤Malformed my (did you mean to declare a sigilless \x or $x?)␤at /tmp/0C9OWgDYiK:1␤------> 3my x7⏏5 = 1, 2, 3;␤»
03:48 cygx m: my \x = 42; say x
03:48 camelia rakudo-moar b8a75b: OUTPUT«42␤»
03:48 yurivis__ m my \x = 1, 2, 3; dd x;
03:49 skids yurivis__: yes but they are SSA unless you tweak them with a bind ahead of time
03:49 yurivis__ m: my \x = 1, 2, 3; dd x;
03:49 camelia rakudo-moar b8a75b: OUTPUT«(1, 2, 3)␤»
03:50 skids yurivis__: see the last example in http://doc.perl6.org/type/Scalar
03:50 yurivis__ cygx: interesting! thanks! I'm going to go read about sigilless variables
03:51 orbus m: my $p=start {sleep 2; put 1}; put 2; $p.result
03:51 camelia rakudo-moar b8a75b: OUTPUT«2␤1␤»
03:52 orbus simple example, but execution continues in the main thread while the promise thread is sleeping
03:53 orbus something that actually blocked would be a better example I guess
03:53 yurivis__ skids: thanks for the link; I understand a little better now. can you say more about what it is about "$a = 1, 2, 3" assigning $a to 1 that is pleasant for people coming from C?
03:53 ugexex it should be noted start { } doesnt always mean a new thread. it just schedules work
03:53 geekosaur not so much pleasant as expected behavior, I think
03:53 orbus true
03:54 ugexex so when you start trying to do http requests in a start { } and it works 20% of the time you will know why :)
03:54 cygx m: my ($a, @b) = 1,2,3; say $a; say @b
03:54 camelia rakudo-moar b8a75b: OUTPUT«1␤[2 3]␤»
03:54 yurivis__ It might be good practice to use explicit delimiters around lists; I was omitting them because it seemed like it would do the right thing most of the time
03:54 geekosaur (and people do get , wrong in C all the time)
03:54 orbus I was looking at that and I think the default thread pool in rakudo is 16 threads so if you start trying to ramp up more things than that it's not going to be able to schedule them all at once
03:54 orbus but then you probably don't have that many cores anyway
03:54 yurivis__ oh, right, that's how you do multiple assignment. I kept trying to my $a = 1, $b = 2
03:55 orbus probably
03:55 ugexex you can have just 2 things and still get scheduled on a single thread
03:55 orbus hrm
03:55 yurivis__ (i guess it's "destructuring", rather than "multiple assignment" this way)
03:55 orbus well I'm hardly an expert so I'll defer to people who've studied it closer
03:56 orbus you can also use raw threads of course, but that's discouraged
03:57 pjscott joined #perl6
03:57 skids m: my ($a, $b) = 1, 2; $a.say; $b.say; my ($c, $d); $c = 3, $d = 4; $c.say; $d.say; # The first form is special sugar for "my"  <-- yurivis__
03:57 camelia rakudo-moar b8a75b: OUTPUT«1␤2␤3␤4␤»
03:58 skids m: my $c = 3, my $d = 4; $c.say; $d.say; # also works
03:58 camelia rakudo-moar b8a75b: OUTPUT«3␤4␤»
03:58 yurivis__ right
03:58 mort96 so, I ran `perl6 bootstrap.pl` to install panda. Now, panda results in: Failed to open file /home/<myname>/.perl6/2015.12-74-gb8a75b9/precomp/495015BBA080C4425F24DE5DEF172CEEFE97A0B8.1451792201.46975/40/40DC78A765A19FD24C2EF4B275381AA8F12059CB.deps: no such file or directory
03:58 mort96 that's nice of it
03:59 orbus that's interesting
04:00 orbus presumably it didn't install all the way
04:00 orbus did the bootstrap fail in the middle?
04:01 ugexex it just fails like that for some reason. i get it randomly as well
04:01 mort96 no, all tests passed
04:01 gfldex mort96: what OS?
04:01 mort96 Linux
04:01 mort96 Linux vor 4.2.5-1-ARCH #1 SMP PREEMPT Tue Oct 27 08:13:28 CET 2015 x86_64 GNU/Linux
04:02 ugexex time to nuke your install
04:02 orbus I dunno - it seems like precomp stuff should regenerate if not found?
04:02 pjscott joined #perl6
04:03 * orbus says this knowing very little about the implementation
04:03 gfldex mort96: that's a very recent rakudo. I'm rebuilding right now and will get bck to you if panda works on my end.
04:03 ugexex i just submitted a PR to fix a different precomp error where it failed regenerating file structure
04:03 mort96 alright
04:04 orbus I've been using 2015.12 since it came out and I don't think I've seen that one
04:04 cygx the versioning scheme for percompiled code has changed, which requires nuking your install directory
04:04 orbus and I've bootstrapped panda
04:04 cygx *precompiled
04:04 orbus changed when?
04:04 cygx before christmas
04:04 cdg joined #perl6
04:05 orbus oh, k - all the stuff I've done with panda has been on 2015.12 and post-christmas
04:05 orbus before that I had whatever the latest star was
04:05 mort96 btw, it is kind of annoying that everything wants to change my PATH all the time, instead of just letting me put a few binaries ind /usr/bin and have libraries and such in /usr/share or something
04:05 orbus you could force it to install in /usr/bin - it's just going to confuse your package manager
04:06 orbus unless you feel like building your own packages
04:06 mort96 maybe, whenever package managers start providing perl 6
04:07 ugexex rakudo's `Distribution` object messes up `depends` field on install. it saves it like `[ [] ]` for empty, and seemingly randomly `[ [xxx] ]` with a depends (instead of `[ xxx ]`)
04:07 mort96 how can I force it to use /usr/bin?
04:07 orbus --prefix when you're building
04:07 orbus probably --prefix=/usr
04:07 AlexDaniel .seen jnthn
04:07 yoleaux I saw jnthn 25 Dec 2015 23:52Z in #perl6: <jnthn> Thanks! Really going, before I fall asleep on the keyboard :-)
04:08 orbus you'd have to do moar that way first, then nqp, then rakudo
04:08 orbus so like perl ./Configure --prefix=/usr
04:08 mort96 and panda?
04:08 orbus I don't know about panda
04:08 orbus hrm
04:09 cygx AlexDaniel: jnthn is expected back in about a wekk or so
04:09 orbus I tried to force panda to install in a different directory
04:09 orbus but it then it got confused about where its libraries were
04:09 ugexex installing will install to the perl6 directory (in addition to the local .perl6 directory for some reaosn)
04:10 AlexDaniel cygx: I'm glad that he finally took a break. His dedication was unreal
04:10 orbus I don't think so - I've been doing --prefix=/home/<myname>/perl6/christmas/install
04:10 orbus and it comes out with bin, share, lib etc. under there
04:10 orbus so I don't see any reason you couldn't tell it /usr and get the same
04:10 orbus but panda's kind of weird
04:10 gfldex mort96: i'm using (to keep things tidy) --prefix=/home/gfldex/local and that works
04:10 ugexex you can look at the code, CompUnit::Repo::Installation uses $.prefix
04:11 orbus I got panda to install in a custom location but then when I tried to run it it was confused by where it was
04:11 orbus I forget what I did now
04:12 orbus I think in the end I settled on symlinking it to the same place perl6 is installed
04:12 orbus it wanted to live off in some share directory
04:13 ugexex because you still need a compunit::repository that reads from your custom location
04:13 orbus but there's probably a way because in star releases panda is in the same directory with perl6
04:13 ugexex loads rather
04:13 orbus the symlink covered my bases, so I'm okay with how it is now
04:14 orbus but that's probably the *right* way
04:14 AlexDaniel interestingly, 2015.11 is now in debian unstable
04:15 ugexex you could use -I/custom/path (maybe PERL6LIB=/custom/path) to load them
04:15 TimToady 2015.11 is "perl6 unstable"
04:15 orbus and 2015.11 is the latest star - they probably used that
04:15 cygx orbus: just ask mort96 what can happen if you settle on symlinking ;)
04:16 AlexDaniel haha. Well, it does not mean that debian unstable has to provide unstable versions :)
04:16 TimToady and anyone who installs 2015.11 risks having to nuke their install dirs
04:16 mort96 lol
04:16 orbus mort96: what happens if I settle on symlinking?
04:16 mort96 well, if you use rakudobrew, and symlink it to /usr/bin ...
04:16 mort96 it used to delete all files in the directory it was in.
04:17 orbus oh, I don't know anything about rakudobrew
04:17 orbus I just compiled from the tarballs
04:18 llfourn m: Bool.Int.^name.say # regression?
04:18 camelia rakudo-moar b8a75b: OUTPUT«Bool␤»
04:18 llfourn m: True.Int.^name.say # regression?
04:18 camelia rakudo-moar b8a75b: OUTPUT«Bool␤»
04:19 cygx m: say Bool ~~ Int
04:19 camelia rakudo-moar b8a75b: OUTPUT«True␤»
04:19 llfourn is that a new thing?
04:19 cygx feature, not bug
04:19 llfourn hmm ok :)
04:19 cygx relatively new
04:19 llfourn Just sent some old code into infinite loop :D
04:20 orbus currently I have perl6 in /home/orbus/perl6/christmas/install/bin
04:20 orbus so I made a symlink for panda
04:20 orbus /home/orbus/perl6/christmas/install/bin/panda -> /home/orbus/perl6/christmas/install/share/perl6/site/bin/panda
04:20 orbus because that's where panda seemed to want to be
04:20 orbus but it's okay with me executing it from /home/orbus/perl6/christmas/install/bin
04:21 skids Things work well enough using rakudobrew with --configure-opts='--prefix=/home/foo/.local' to install both rakudo and panda.  Though I do have some local tweaks to rakudobrew.
04:22 llfourn m: True.Int.Str.say # so there is no way to have True => 1, False => 0 magically anymore?
04:22 camelia rakudo-moar b8a75b: OUTPUT«True␤»
04:23 ugexex maybe subset?
04:23 dalee joined #perl6
04:24 llfourn m: say 0 + True # works, reminds me of perl5
04:24 camelia rakudo-moar b8a75b: OUTPUT«1␤»
04:24 skids m: (+True).say
04:24 camelia rakudo-moar b8a75b: OUTPUT«1␤»
04:24 llfourn I guess that will have to do :)
04:24 cygx m: say Int.new(True) # Java version
04:24 camelia rakudo-moar b8a75b: OUTPUT«1␤»
04:25 cygx m: say True.Numeric
04:25 camelia rakudo-moar b8a75b: OUTPUT«1␤»
04:25 dalee has anyone else had a hard time installing File::Find?
04:25 llfourn cygx: all in all I like the feature :)
04:25 dalee panda claims it isn't installed, but when it tries to isntall it errors out because it is already installed
04:26 dalee also, i'm pretty sure it was installed as part of the panda bootstrap procedure
04:26 cygx I wonder if True.Numeric really should return 1
04:26 cygx after all, True ~~ Numeric already
04:26 cygx TimToady: ^^
04:26 llfourn cygx: that would be nice :)
04:27 cdg joined #perl6
04:27 llfourn but if it already is it then it wouldn't make that much sense to change itself :\
04:27 AlexDaniel cygx: we already have a couple of weird bugs associated with Enums getting into wrong places
04:28 AlexDaniel at least last time I checked :)
04:29 TimToady yeah, I agree that's a little weird
04:36 cygx on the other hand, just adding a prefix + is a convenient way to construct an Int from an enum value...
04:36 xpen joined #perl6
04:37 llfourn m: enum <zero one two>; say +one # it works!
04:37 camelia rakudo-moar b8a75b: OUTPUT«1␤»
04:38 llfourn m: enum <zero one two>; say one.Int # But this doesn't do the same as True.Int
04:38 camelia rakudo-moar b8a75b: OUTPUT«1␤»
04:39 llfourn m: #{ even though it is Numeric too } enum <zero one two>; say one ~~ Numeric
04:39 camelia rakudo-moar b8a75b: ( no output )
04:40 llfourn m: enum <zero one two>; say one ~~ Numeric # those comments don't work on camelia?
04:40 camelia rakudo-moar b8a75b: OUTPUT«True␤»
04:40 llfourn m: #|{ even though it is Numeric too } enum <zero one two>; say one ~~ Numeric
04:40 camelia rakudo-moar b8a75b: OUTPUT«True␤»
04:40 AlexDaniel llfourn: #`{ }
04:40 llfourn oops :P
04:40 cygx m: #`{ sure they do }; say "ok"
04:40 camelia rakudo-moar b8a75b: OUTPUT«ok␤»
04:41 cygx m: #`{ sure they do } say "ok"
04:41 camelia rakudo-moar b8a75b: OUTPUT«ok␤»
04:41 cygx apparently, I've done enough Perl6 to automatically type }; if there's no newline
04:42 bitmap joined #perl6
04:43 TEttinger joined #perl6
04:43 ugexe joined #perl6
04:50 Psyche^ joined #perl6
04:54 anaeem1_ joined #perl6
05:03 flussence dalee: panda has been flaky today for me too, no idea why or how to work around it, sorry
05:04 pjscott joined #perl6
05:05 dalee i've basically tracked it down to panda installing in this odd directory, /home/dale/panda/inst#/home/dale/.rakudobrew/moar-nom/install/share/perl6/site/panda/state
05:05 dalee so now i have two different state files for the libraries that are installed
05:05 dalee the other is /home/dale/.rakudobrew/moar-nom/install/share/perl6/site/panda/state
05:06 flussence inst#... shouldn't be a real directory. something's really gone wrong there.
05:07 dalee seems to be somehow related to CompUnit/RepositoryRegistry.pm
05:08 loren joined #perl6
05:09 vendethiel joined #perl6
05:09 flussence yeah, that's supposed to be an internal string used by that, it definitely should not be ending up in a path name. Not my area of expertise but it seems to find a new way to break every day...
05:10 dalee it looks like just copying the content of the bad state file into the real state file makes panda work properly
05:11 dalee so it's at least a workaround for now
05:11 llfourn dalee: o.o panda has created '#inst' somewhere -- that's a bit scary
05:12 llfourn does '/home/dale/panda/inst#' actually exist
05:12 dalee i'm not the only one this is happening to, according to github
05:12 dalee https://github.com/tadzik/File-Find/issues/17
05:13 flussence IMO those prefixes should've been changed to look more like "file:" and "inst:", so they're at least recognisable as being the start of a URL.
05:15 llfourn .oO( maybe but what if you wanted inst#sftp://... )
05:16 flussence make the # there a +, that's already convention in lots of other things
05:16 dalee i guess this is an issue with panda's bootstrap.pl
05:17 dalee there's one of these: CompUnit::Repository::Installation.new("/home/dale/.rakudobrew/moar-nom/install/share/perl6/site")
05:17 skids I think the colon was echewed because it looks like a PATH delimiter
05:17 dalee that's what $target is, but $prefix = $target.path-spec returns "inst#/home/dale/.rakudobrew/moar-nom/install/share/perl6/site"
05:18 dalee and right after that we do the mkdir
05:23 cdg joined #perl6
05:31 cdg joined #perl6
05:37 pjscott joined #perl6
05:40 nige1 joined #perl6
05:42 dalee i think i actually have a fix for that panda problem that makes some sense: https://github.com/tadzik/panda/pull/281
05:44 Cabanossi joined #perl6
05:46 llfourn dalee++
05:48 Tonik joined #perl6
05:52 perlawhirl joined #perl6
05:53 dalee joined #perl6
05:56 perlawhirl hi perlers
05:56 skids o/
05:58 perlawhirl so if i have an IO::Path object... i can check if it's a directory with .d, exectuable with .e, etc
05:58 perlawhirl but where are these documented in the docs.
05:58 perlawhirl cant find it
05:58 perlawhirl there's is reference to some of them in the IO::Path docs, but not a rundown of each of them
05:59 llfourn heh I always though .e was exists
05:59 dalek ecosystem: e25526a | yowcow++ | META.list:
05:59 dalek ecosystem: add String::CamelCase
05:59 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/e25526a385
05:59 dalek ecosystem: 849d601 | (Zoffix Znet)++ | META.list:
05:59 dalek ecosystem: Merge pull request #112 from yowcow/add-string-camelcase
05:59 dalek ecosystem:
05:59 dalek ecosystem: Add String::CamelCase
05:59 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/849d601077
06:00 geekosaur "The following file test methods are provided:" in IO::Path::Class? admittedly they don't *look* like methods
06:00 skids perlawhirl: IO just got a rework, which was pending for a long time, so noone wanted to write too many docs yet.
06:00 llfourn perlawhirl: yep .e means exists :)
06:00 llfourn like test -e
06:01 perlawhirl wait, you're right... .x for executable.
06:01 llfourn yep the case for documenting it grows!
06:02 geekosaur er IO::Path Class. http://design.perl6.org/S16.html#IO%3A%3APath_Class
06:02 perlawhirl skids: so the '-*' things from perl5 map accross, i imagine
06:02 skids Most of them I would think.
06:03 geekosaur -T and -B went away but those were always dubious
06:03 perlawhirl geekosaur: thanks. that could practically be copy/pasted into the IO::Path docs... or are some specific to *nix
06:04 skids http://design.perl6.org/S32/IO.html#File_test_methods might be closer to what is implemented than perl 5
06:04 geekosaur well, the whole notion of files being executable is specific to unix
06:04 virtualsue joined #perl6
06:04 perlawhirl ahh yes
06:04 geekosaur windows does it by extensions and matching registry entries, not by mode bits
06:05 skids (and then there is selinux)
06:05 geekosaur :p :b :c also have no windows analogs
06:06 geekosaur or :u :g :k for that matter
06:07 geekosaur and :S
06:10 ugexex m: my $dir = "asdfasdfasfd".IO; say $dir.e; $dir.mkdir; say $dir.e; # also they are cached, not sure if p5 does that
06:10 camelia rakudo-moar b8a75b: OUTPUT«False␤False␤»
06:11 geekosaur perl5 does not cache them as such but has a hack instead
06:11 geekosaur -e _ reuses the stat buffer from the previous stat()/lstat()/file test
06:12 pjscott joined #perl6
06:12 dalee for some reason, perl6 is not looking in /home/dale/.rakudobrew/moar-nom/install/share/perl6/site/lib for modules, it only looks in /home/dale/.rakudobrew/moar-nom/install/share/perl6/site
06:12 ugexex heh, in perl6 you have to use a hack to uncache
06:12 dalee but Panda is installed in /lib
06:12 dalee i can override that with the PERL6LIB environment variable, but that seems weird to me
06:13 ugexex i dont like how it doesnt act like a regular module either
06:14 AlexDaniel perlawhirl: hmm what about this? http://doc.perl6.org/type/IO::Path#File_Test_operators
06:15 perlawhirl AlexDaniel: ...
06:15 AlexDaniel “Instead of the colonpair syntax, you can use method calls too:”
06:15 * perlawhirl facepalms
06:15 perlawhirl i was only looking up the top in the contents of method names
06:15 pjscott joined #perl6
06:16 perlawhirl yah, i'm using method calls in a switch, ie: given $f { when .d { ... } }
06:17 AlexDaniel you can probably do when :d
06:17 geekosaur you do know that when smartmatches?
06:17 geekosaur so yes, the colonpair form works
06:17 perlawhirl yes colonpair works too
06:18 perlawhirl i think for readability... these ops should have long aliases too... ie $f.readable
06:18 perlawhirl just my thought
06:19 ugexex if $f.r#`{eadable}
06:19 gfldex perlawhirl: the eco system is over there, where you could put that module :)
06:19 perlawhirl loud and clear gfldex :)
06:19 AlexDaniel gfldex: though nobody is going to add a dependency for such a tiny feature, IMO
06:20 gfldex perlawhirl: besides, if you have quite a few of those colon pairs, it may become tiresome to read
06:21 skids Still, having a bunch of those little modules around might allow someone to merge them into a DSL/preferences module later.
06:23 kaare_ joined #perl6
06:23 geekosaur .oO { use English; }
06:25 skids Heheh.  Maybe more like use Flavor::Something
06:34 MadcapJake joined #perl6
06:36 aypea[2] joined #perl6
06:40 MadcapJake Just submitted a PR to perl6/doc that makes the `-n` flag a bit more robust.  Anyone able to confirm whether `type` would do the same thing as `cat` does i.e., prints to stdout when not given anywhere to write/append to.
06:40 MadcapJake in Windows
06:41 pjscott joined #perl6
06:44 ugexex MadcapJake: got something i can c&p?
06:44 pjscott joined #perl6
06:45 MadcapJake ugexex: echo hello world | type
06:46 ugexex The syntax of the command is incorrect. The process tried to write to a nonexistent pipe.
06:47 MadcapJake i'm afraid i don't know windows command line well enough, but that, in linux, echoes "hello world" into the pipe which passes to cat and cat just prints to stdout because there is nothing given for it to redirect to
06:47 MadcapJake maybe 'echo "hello world" | type'
06:48 bitmap joined #perl6
06:49 ugexex same thing. i think it might have to explicitly take piped input to do that
06:49 MadcapJake I think i might be better off changing from a pipe to pager to a `>&1` or something because that should work the same in windows and linux
06:51 ugexex are you doing it in perl6? like can you do my $run = shell("command xxx", :out); shell("type {$run.out.lines.join(qq|\n|)}")?
06:51 MadcapJake ugexex: https://github.com/perl6/doc/blob/master/bin/p6doc#L56-L58
06:52 MadcapJake i added an optional flag to p6doc that prints right to stdout instead of pluging the text into a pager
06:52 MadcapJake however, I don't think windows has a `cat` command
06:52 ugexex fwiw powershell has cat
06:52 ugexex not cmd though
06:53 MadcapJake i'm guesing cygwin does too. but that leaves all the traditional cmd folks without this all-important option ;)
06:54 AlexDaniel hm, can I ask a question? Why deal with all this piping stuff when you can do $run = run(‘command’, ‘arg’, :out); $run2 = run(‘command2’, :in($run.out)); ?
06:54 ugexex true, although reading docs from cmd.exe would probably suck
06:55 gfldex AlexDaniel: pipes are infinite lists
06:55 MadcapJake ugexex: oh god, that's a really good point, i haven't used windows in years but iirc, cmd.exe doesn't even let you scroll back right?
06:55 ugexex because piping should handle the memory between the processes without like <fill memory with all of cmd1> -> next process
06:56 geekosaur hm? windows can keep scrollback
06:56 geekosaur or did you mean more.exe?
06:56 ugexex it does let you scroll back wih the mouse at least... although im not sure how thats even done with the keyboard
06:56 MadcapJake oh, looks like back in the day at least, scrollback was something you had to enable via increasing the screen buffer size.
06:57 AlexDaniel but that's what run is supposed to do?
06:57 geekosaur that sounds like windows 3.1...
06:57 MadcapJake geekosaur: i have no idea, i've done very little with cmd.exe, most of my programming life has been on linux
06:57 geekosaur maybe 95/98, certainly not the nt line
06:58 MadcapJake last time i used cmd.exe was probably 98-era
06:58 AlexDaniel try this:
06:58 AlexDaniel my $x = run(‘sleep’, ‘5’, :out); say ‘hello’; $x.out.slurp-rest; say ‘done’
06:58 geekosaur set more=/e and while there's no scroll 1 page back, =line takes you to that line
06:58 ugexex if a program is written to use pipes and does say `wget file1 file2 file3 | something-else` it will do `file1 | something-else` before using memory for file2
06:59 CIAvash joined #perl6
06:59 ugexex run will wget all 3 of those files and have them in memory, and then the next run has to process from that
06:59 ugexex thats if they are written to use pipes though
07:01 gfldex further those programs can generate the data in question (logfiles are most prominent here). If you program can deal with infinite lists, it can not run out of memory.
07:01 ugexex run is still filling memory somewhere, just because you are reading from that lazily doesnt mean that data isnt sitting somewhere already
07:02 AlexDaniel my $x = run(‘sleep’, ‘5’, :out); say $x.out.WHAT
07:02 AlexDaniel says (Pipe)
07:03 AlexDaniel I'm not sure if it works correctly right now, but I think that it was supposed to work just like you describe
07:03 AlexDaniel otherwise what's the point :)
07:04 ugexex theoretically yeah, and that would be great. but at least the jvm version just buffers it
07:04 MadcapJake ugexex: try this `echo hello world | findstr "^"`
07:04 ugexex cmd.exe says "hello world" and powershell says "hello\nworld"
07:05 AlexDaniel ugexex: even your shell buffers it. Does it buffer it fully?
07:05 MadcapJake oi vey
07:06 MadcapJake ugexex: what about `echo "hello world" | findstr "^"`
07:06 ugexex AlexDaniel: i think so, but i dont know the java library it uses well enough to say i suppose. i imagine the moar version handles it better too
07:06 asie joined #perl6
07:06 MadcapJake ugexex: and one more `echo "hello world" | find/v ""`
07:06 ugexex cmd.exe is "hello world" (with the double quotes" and powershell the same without the quotes
07:07 MadcapJake holy guacamole
07:07 ugexex the last one is "hello world" with the quotes, and powershell doesnt understand find/v (is there supposed to be a space?)
07:08 MadcapJake no idea, just searching through stackexchange answers :P
07:08 ugexex space says parameter format incorrect :/
07:09 MadcapJake ok that'
07:09 MadcapJake 's stupendous x_x
07:11 MadcapJake I really need to see what the output of p6doc would look like with each, not sure if it's piped bare/quoted or whatnot
07:11 MadcapJake i think `findstr "^"` might be the best bet, i doubt there are any quotes, maybe I could use a different pattern that wouldn't split bare words into lines in powershell
07:12 MadcapJake is there a way to run Windows in a VM without having a registration key :P
07:13 ugexex FCKGW
07:14 MadcapJake lol, guess not ;)
07:14 ugexex maybe for windows just `shell xxx > doc.tmp` and then read from the file
07:15 ugexex spin up an aws instance?
07:16 AlexDaniel I have just tested that on linux and it works perfectly
07:16 AlexDaniel piping I mean
07:16 AlexDaniel that is, it is not going to wget all things until you actually read some of the input
07:16 MadcapJake i gotta get some rest, thanks for the help ugexex ! g'night all!
07:17 AlexDaniel I could even test that on jvm… but that is going to take some time to build
07:20 AlexDaniel Also, this is just waiting to blow up: shell "$*EXECUTABLE-NAME -I$i --doc=SectionFilter $path $fmt-string | $pager";
07:25 AlexDaniel anyway, anybody using rakudo on jvm can try this: https://gist.github.com/AlexDaniel/1015a8072fb43442c81c
07:25 AlexDaniel change “beep” to any other command of your liking
07:26 AlexDaniel that is, it beeps every 100 lines (when they were produced)
07:26 AlexDaniel when I run this on my system I get 4 beeps immediately. Then I get more beeps when I scroll down
07:28 AlexDaniel so, dear shell enthusiasts, it seems like it is working as expected. Sure enough one should test that on jvm and on windows, but I'd say that we'd better fix “run” instead of trying to work around it (only if it does not work somewhere, of course).
07:33 AlexDaniel and yeah, perhaps instead of thinking about whether it stores a tiny file in the memory or not, one should fix word splitting and code execution…
07:46 AlexDaniel ugexex: so, can you try that on jvm so that I can fill a bug report if it does not work correctly
07:47 AlexDaniel ugexex: though I don't think that this “longoutput” script is going to work on windows, if you are using windows (I don't know!)
07:48 darutoko joined #perl6
07:48 AlexDaniel apparently rakudobrew is refusing to build it on my pc, no idea what the problem is…
07:51 ugexex yeah it doesnt. i messed around trying to just pipe in text to echo out but get `Reading from stream failed: socket is not connected`
07:52 AlexDaniel ugexex: so, is that on linux or on windows?
07:53 ugexex windows
07:54 AlexDaniel ehh! Then perhaps it's time to find some kind of a dusty windows machine in my house… that's a challenge
07:54 AlexDaniel ugexex: ok, thanks
07:54 ugexex seems like it might be :in(xxx)
07:55 user74747 joined #perl6
07:57 ugexex yeah it acts strange with :in
07:58 molaf joined #perl6
07:58 sno joined #perl6
07:59 ugexex with `:in($out), :out`it gives the error above. without the `:out` the proc has an exitcode of -16 but doesnt throw an exception like it should
08:01 bitmap joined #perl6
08:01 AlexDaniel oh wow, I have no idea how to install perl 6 on windows
08:02 ugexex i use rakudobrew on windows
08:02 AlexDaniel oh, so it works on windows?
08:02 ugexex yeah
08:03 AlexDaniel cygwin required?
08:04 ugexex i use visual studio for nmake. no cygwin
08:04 dalek doc: 715950e | lizmat++ | doc/Language/setbagmix.pod:
08:04 dalek doc: Mention ∅ (U+2205 EMPTY SET)
08:04 dalek doc: review: https://github.com/perl6/doc/commit/715950eaf6
08:06 ugexex and cl compiler that is
08:07 ugexe joined #perl6
08:09 ugexex oh boy how long until it gets DoSd off again
08:11 AlexDaniel I don't think that I will ever manage to install it on windows…
08:12 AlexDaniel “SET PATH "%USERPROFILE%\rakudobrew\bin;%PATH%"” does not work! Hmm…
08:13 ugexex i always do `perl $full-path\bin rakudobrew build moar`
08:13 AlexDaniel oh right, I don't even have perl installed
08:13 AlexDaniel I give up.
08:14 ugexex perl you can just use the strawberry installer
08:14 AlexDaniel that's just too much for me, I really give up
08:20 AlexDaniel ugexex: there is a test for that: https://github.com/perl6/roast/blob/master/S32-io/pipe.t#L46
08:20 AlexDaniel at least a simple case should work, what exactly have you tried?
08:21 AlexDaniel it does not seem to be fudged for JVM
08:24 ugexex cool, ill see if it works on windows too. maybe the command has to accept piped input to not error
08:27 ugexex it dies at line 38
08:28 ugexex The spawned process exited unsuccessfully (exit code: 259) in block <unit> at S32-io/pipe.t line 38 # Looks like you planned 14 tests, but ran 10
08:29 ugexex also the broken pipe error afterwards
08:30 ChoHag Is it just me, or are the is tests in Test.pm6 not sure what "is" is?
08:30 AlexDaniel ugexex: that's very interesting! https://github.com/coke/perl6-roast-data/blob/master/log/rakudo.jvm_summary.out#L1483
08:31 ChoHag (With a 'slightly' out of date politically aware pun thrown in for good measure)
08:31 masak morning, #perl6
08:31 AlexDaniel ugexex: since you probably understand more than me, perhaps you can report it?
08:32 ChoHag Seems like you can check that something is a type object exactly, or do a string comparison.
08:32 ugexex i'll have to do it tomorrow, its way too late here now, but sure
08:33 ChoHag Shouldn't it be a bit 'smart'er?
08:34 AlexDaniel ugexex: thank you!
08:37 molaf joined #perl6
08:50 hankache joined #perl6
08:58 hankache hello *
09:08 wamba joined #perl6
09:10 21WAAOUGK joined #perl6
09:19 dalek rakudo/nom: ef92faa | (Dale Evans)++ | lib/NativeCall.pm6:
09:19 dalek rakudo/nom: typo
09:19 dalek rakudo/nom:
09:19 dalek rakudo/nom: just a typo
09:19 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/ef92faa6dc
09:19 dalek rakudo/nom: b5cb005 | lizmat++ | lib/NativeCall.pm6:
09:19 dalek rakudo/nom: Merge pull request #669 from daleevans/patch-1
09:19 dalek rakudo/nom:
09:19 dalek rakudo/nom: typo
09:19 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/b5cb005458
09:24 [Tux] csv-ip5xs        50000    18.352    18.224
09:24 [Tux] test             50000    24.391    24.263
09:24 [Tux] test-t           50000    13.819    13.691
09:24 [Tux] csv-parser       50000    52.760    52.631
09:25 domidumont joined #perl6
09:25 dalee does anyone know how this checksum-looking number in .rakudobrew/moar-nom/install/share/perl6/site/dist/81C4F7EC11D41848ECD6B188688BC57EFD15D2C8 is calculated?
09:26 dalee is it tied to the file contents, module name, ??
09:30 molaf joined #perl6
09:30 masak tadzik++ # "I AM RAKUDOBREW. ALSO POSSIBLY SPARTACUS. OUTLOOK CLOUDY, ASK AGAIN LATER."
09:35 Hotkeys how can I have leading zeros in a string?
09:36 RabidGravy joined #perl6
09:36 Hotkeys ie I want "8" to be "08" but "12" to stay "12"
09:37 Hotkeys s/ie/eg/
09:37 dalee my $a = sprintf "%02d", 8; say $a;
09:38 cognominal A joyful year to *  :  https://pbs.twimg.com/media/CXqZEqMWYAA9Ovg.jpg
09:38 RabidGravy m: say 8.fmt("%02d"); # if you prefer
09:38 camelia rakudo-moar b5cb00: OUTPUT«08␤»
09:39 firstdayonthejob joined #perl6
09:39 domidumont joined #perl6
09:40 zhmylove RabidGravy: +
09:44 dalek ecosystem: 7267c01 | (Maxim Khailo)++ | META.list:
09:44 dalek ecosystem: Adding PKafka
09:44 dalek ecosystem:
09:44 dalek ecosystem: Adding reference to my Perl 6 implementation of an Apache Kafka client.
09:44 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/7267c019b9
09:44 dalek ecosystem: 94ef367 | RabidGravy++ | META.list:
09:44 dalek ecosystem: Merge pull request #113 from mempko/patch-1
09:44 dalek ecosystem:
09:44 dalek ecosystem: Adding PKafka
09:44 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/94ef367657
09:46 dalek doc: 28f2111 | (Jake Russo)++ | bin/p6doc:
09:46 dalek doc: Allow -n flag on method/routine docs
09:46 dalek doc: Previously would just revert to `more`/`less` when faced with a method/routine,
09:46 dalek doc: now it properly passes the flag along to `MAIN` or `show-docs`.
09:46 dalek doc: review: https://github.com/perl6/doc/commit/28f2111c04
09:46 dalek doc: ad7fd7d | RabidGravy++ | bin/p6doc:
09:46 dalek doc: Merge pull request #311 from MadcapJake/master
09:46 dalek doc:
09:46 dalek doc: Allow -n flag on method/routine docs
09:46 dalek doc: review: https://github.com/perl6/doc/commit/ad7fd7d94b
09:47 RabidGravy merge-tastic!
09:49 pmurias joined #perl6
09:51 masak cognominal: joie! I got that one! :D
09:52 masak I knew all those years of French would pay off somehow! \o/
09:52 masak firstdayonthejob: hi
09:53 masak firstdayonthejob: that's an intriguing nick. is it a Perl 6 job, perchance? ;)
09:53 pmurias_ joined #perl6
09:53 masak pmurias, pmurias_: that makes two of you.
09:53 RabidGravy I have quite a few French speaking friends on facebook and I find it easier to understand what they are say if I turn the automatic translation off most of the time
09:56 spider-mario joined #perl6
09:59 masak in other happy news, I think I finally grok homology
09:59 masak haven't tried to grok cohomology yet, though :P
10:01 abraxxa joined #perl6
10:01 nine Is it possible that panda is older than most of the IO::Path goodness?
10:01 abraxxa hi!
10:02 rindolf joined #perl6
10:03 masak abraxxa: hi!
10:03 masak nine: not just possible
10:09 pierre-vigier joined #perl6
10:13 pmurias joined #perl6
10:14 FROGGS_ joined #perl6
10:14 bitmap joined #perl6
10:14 domidumont joined #perl6
10:18 ugexe joined #perl6
10:20 llfourn can someone remind me of the equiv of use FindBin qw/$Bin/; use lib "$Bin/lib";
10:21 bitmap joined #perl6
10:22 masak ooh, I'd like to know that too. I have that use case now and then.
10:23 RabidGravy $*PROGRAM.parent.child("lib").Str
10:23 RabidGravy ?
10:23 llfourn RabidGravy: I think it should be $?FILE?
10:24 RabidGravy $?FILE.IO.parent.child("lib").Str; then
10:25 RabidGravy but that is probably not what you want in a library
10:25 llfourn RabidGravy: works! thanks.
10:25 dalee "P6M Merging GLOBAL symbols failed: duplicate definition of symbol Find"
10:25 llfourn use lib $?FILE.IO.parent.child("lib").Str;
10:26 vividsnow joined #perl6
10:26 llfourn feature request: $?DIR
10:26 llfourn this might warrant a mention in 5-to-6
10:27 llfourn dalee: I've seen at least one instance of that kind of annoying error around
10:27 llfourn I think it was in an RT
10:27 abraxxa dalee: I have the same error with NativeCall
10:29 hankache dalee i did rebuild panda using "rakudobrew build-panda" and this error was gone. I hope it solves your issue.
10:36 nine It's possible that this is caused by different versions of File::Find being loaded.
10:36 dalee it appears that the problem is caused by installing File::Find a second time
10:37 virtualsue joined #perl6
10:37 dalee the version that is installed by panda has version "*", when panda installs File::Find again it installs version 0.1
10:37 dalee shouldn't this cause the old version to be uninstalled?
10:37 dalee or does perl6 allow multiple versions of a module to be installed simultaneously?
10:38 dalee it seems like this "short" directory contains a mapping of modules to different implementations: .rakudobrew/moar-nom/install/share/perl6/site/short/652B8A474FD7BF89A6C10654387F68B029BA4AFC
10:38 nine dalee: we at least try to allow multiple version to be installed. That's the source of much of the complexity in module management
10:39 dalee ok, so the issue is that File::Find doesn't want to co-exist with other versions of itself, even though the other version is actually source identical
10:40 nine dalee: I'm currently debugging exactly the same problem. The open question is why rakudo is picking different versions when using it multiple times.
10:40 dalee i wonder if it's related to the weird version "*" that panda installs
10:40 hankache dalee have you tried using --force ?
10:40 RabidGravy is there a more fine-grained way of catching warnings than a CONTROL block?  it appears to be interfering with my object construction
10:41 * llfourn didn't even know you could throw or catch warnings
10:42 dalee hankache: if i install with --force i still get the problems
10:42 nine RabidGravy: CONTROL { when CX::Warn { "whatever" } }
10:42 RabidGravy yeah, that's what I'm doing
10:42 nine The answer is: we're still not smart enough at outdating precomp files.
10:43 RabidGravy it seems to be totally altering the control flow
10:43 nine RabidGravy: ah, of course. Warnings are resumable control exceptions. You have to $_.resume to get back to where the warning was thrown
10:44 RabidGravy duh, of course, thanks
10:44 kaare_ Now I saw the mention of File::Find, I' like to present a failed install I had just before New Year.
10:44 kaare_ It was Ubuntu 14.04, no previous rakudo encounter.
10:45 Hotkeys Is there any chance we could get subscript notation for different based numbers?
10:45 kaare_ installing w/ rakudobrew, and it complained about not being able to go on because the first line of File::Find is use v6.
10:45 Hotkeys Like 100₃₆ for :36<100>
10:46 RabidGravy nine++ # that's the puppy
10:46 kaare_ Something like "perl 6 is required, but we only have 5.18.2"
10:46 Hotkeys I don't think it would be ambiguous and we seem to be big on unicode support around here
10:46 kaare_ So it seems it found perl 5 when looking for perl6.
10:46 nine kaare_: that's caused by some PERL5 env var being set. PERL5LIB or something
10:46 RabidGravy kaare_, what nine said
10:46 nadim joined #perl6
10:47 RabidGravy it definitely is PERL5LIB
10:47 kaare_ nine: OK, I didn't realize that rakudo used PERL5LIB
10:47 nine kaare_: would be nice if you could find out, how exactly that affects rakudobrew
10:47 nine kaare_: rakudo doesn't, but rakudobrew is a Perl 5 script
10:47 kaare_ Oh, that makes sense now.
10:47 nine kaare_: and rakudo's Configure.pl is also a Perl 5 script.
10:48 kaare_ As I said, it's @work, so I can try to undef PERL5* from the environment, tomorrow
10:49 ugexe joined #perl6
10:49 azawawi joined #perl6
10:49 azawawi hi
10:49 azawawi RabidGravy: ping
10:49 RabidGravy erp
10:49 azawawi RabidGravy: ping! :)
10:50 RabidGravy POWM!
10:50 azawawi :)
10:50 azawawi RabidGravy: starting rakudobrew on my old rpi board
10:50 azawawi RabidGravy: and benchmarking
10:50 RabidGravy time for a three course meal then
10:50 RabidGravy ;-)
10:51 azawawi RabidGravy: what's your board model and card memory speed?
10:52 nine azawawi: congrats on the Inline::Ruby progress :)
10:52 azawawi nine: that's not me btw awwaiid i think :)
10:53 azawawi nine: https://github.com/awwaiid/p6-Inline-Ruby
10:53 azawawi nine: but thanks :)
10:53 RabidGravy I have two, a v2 which is slow but not too bad, and a Rev B with single core 700Mhz and 435MiB
10:53 azawawi awwaiid azawawi
10:54 azawawi :)
10:54 RabidGravy I don't know what the SD card is though
10:54 azawawi SD class that is
10:54 kaare_ The v2 is 1 GHz, AFAIK
10:55 moritz \o
10:55 kaare_ And petter instruction set. Should be much faster
10:55 kaare_ s/p/b/
10:55 RabidGravy to be honest it's probably a crap old SD card, I recycle the ones from audio gear when I get faster ones
10:56 azawawi RabidGravy: https://www.raspberrypi.org/products/raspberry-pi-2-model-b/ ?
10:57 RabidGravy I have one of those but I have a v1 one as well
10:57 azawawi good then we can test rakudo star Rpi releases on them :)
10:57 RabidGravy the lshw is less than descriptive with regard to the actual board
10:58 FROGGS_ I've got a B+ or so but it has not enough mem to compile rakudo :o(
10:58 RabidGravy the v2 is significantly faster
10:58 azawawi ARMv7
10:58 RabidGravy FROGGS_, that's weird as I've never had a problem
10:59 FROGGS_ I've only 512MB RAM
10:59 RabidGravy the v1 B has a "BCM2708, ARMv6-compatible processor rev 7 (v6l)"
10:59 azawawi im running on 512MB btw so will rakudobrew work or fail?
10:59 nine ugexe: left a comment on your PR
11:00 FROGGS azawawi: you need 1GB at least AFAIK
11:00 RabidGravy the v2 has "BCM2709, ARMv7 Processor rev 5 (v7l)" with four cores
11:00 nine ugexe: can you split the commit? I'd gladly merge the second part. Thanks for debugging this!
11:00 azawawi FROGGS: or a bigger swap file if you wanna wait :)
11:00 FROGGS hmmmm, maybe I try again at some point...
11:01 azawawi FROGGS: im trying it right now
11:01 azawawi "Updating submodules " step now
11:01 FROGGS I'm (literally) working on a C program right now for the pi
11:01 RabidGravy I built, a 2015.12 with the 512Mb on the B, not using Raspbian though
11:01 RabidGravy and I killed all the X stuff
11:01 FROGGS I'm using raspbian
11:02 azawawi RabidGravy: im already not using x stuff
11:02 azawawi RabidGravy: ssh session
11:02 RabidGravy yeah, but is it still running?
11:02 RabidGravy the gdm and so forth
11:02 nine .tell ugexe I left a comment on your PR. Can you split the commit? I'd gladly merge the second part. Thanks for debugging this!
11:02 yoleaux nine: I'll pass your message to ugexe.
11:05 azawawi RabidGravy: i will check the services running ... i even have mysql-server running on it lol
11:06 lnrdo joined #perl6
11:06 masak can sprintf give thousands formatting? like rendering 1048576 as 1,048,576 ?
11:06 masak guess not.
11:06 azawawi RabidGravy: farabi btw (Perl 5 version) was working on a rpi without no hiccups :)
11:06 azawawi RabidGravy: s/on a/on an/
11:06 RabidGravy yeah, I had RabbitMQ, icecast and all sorts of stuff, I then bought a Gigabyte brix which wasn't much more expensive
11:06 aypea[2] masak: still? :(
11:07 azawawi RabidGravy: link it plz?
11:07 moritz lol, I blogged: https://perlgeek.de/blog-en/automating-deployments/2016-001-a-new-project.html (slightly off-topic, because it's not about Perl 6)
11:07 RabidGravy it's just a micro-atx PC in a cube shaped box
11:08 RabidGravy 'ang on
11:08 masak aypea[2]: to be honest, I'm not sure sprintf is the right tool for the job
11:08 FROGGS moritz: I was also thinking about blogging about my childrens-rooms-entertainment-app-for-raspi :o)
11:08 azawawi moritz: im getting on 403 (forbidden) on that link you posted
11:08 moritz azawawi: huh
11:08 FROGGS moritz: because it is also a rabbit hole like rakudo...
11:09 FROGGS I get a 404 O.o
11:09 moritz azawawi: can you tell (or privmsg) me your public IP?
11:10 moritz azawawi: and does it work with http (no https) for you?
11:10 bitmap joined #perl6
11:10 azawawi moritz: fails on https, work on http
11:10 moritz azawawi: ok, thanks. And fuck.
11:11 RabidGravy azawawi, like one of these http://www.gigabyte.com/products/product-page.aspx?pid=5569#ov - it's actually a "GB-BXBT-2807"
11:11 azawawi RabidGravy: thx
11:11 moritz azawawi: it looks like IPv4 and https don't work together on that site; work with IPv6 for me
11:12 dalee well, i can get rid of that duplicate symbol problem by just wiping all the precomp files, so that's nice
11:12 RabidGravy yeah thousands commas in numbers feels like a Locale thing to me, implement in the exosystem
11:12 RabidGravy ecosystem either
11:13 dalee but installing any "new" version of File::Find causes it again
11:17 FROGGS dalee: does that trigger precompilation by any chance?
11:20 azawawi RabidGravy: confirmed, gdm, x server is off on my rpi box
11:20 nine FROGGS: seems like the cause of the duplicate symbol "Find" is that there are two different precomp files for File::Find and we're trying to load them both as dependencies of different other modules.
11:20 FROGGS uhh
11:21 FROGGS nine: I mean, this is kinda correct and incorrect that we load both
11:22 molaf_ joined #perl6
11:22 FROGGS in the end we need to make the scenario work I think: A->B->C:v1, A->D->C:v2
11:23 FROGGS but here we have the very same C I guess, so the install with --force should replace the existing one and should trigger a recompilation of its reverse deps
11:24 FROGGS like panda did
11:24 nine FROGGS: yes, that will probably only need a little more work, since jnthn++ has already done a lot for proper long name support and the repositories know about versions, too.
11:24 nine FROGGS: it's not the same versions. panda claims '*' while standalone File::Find is at 0.1
11:25 frankjh joined #perl6
11:25 FROGGS ahh, its projects.json is buggy then
11:27 RabidGravy kill all the things
11:28 nine FROGGS: we precompile '*' during panda's bootstrap, where we load it from ext/File-Find/lib. We probably precompile the 0.1 version during precompilation of some Panda modules. What I don't get is why we even try to load the '*' version when we use a different repo chain.
11:28 FROGGS I don't know either
11:28 FROGGS maybe we should add more debugging output in the codes that decide about candidates
11:31 nine Or....we make all rakudo users core developers. When you recompile rakudo multiple times a day, you're pretty safe from this bug...
11:32 FROGGS :S
11:35 frankjh Hi, I am trying to make a native library: a method has a parameter unsigned long long, which I declared as longlong. I have two questions with this: Is longlong signed/unsigned? And how do I convert a perl6 'number' into longlong, just passing it gives : "This type cannot unbox to a native integer."
11:36 nine Oh!
11:36 nine I think, I found it.
11:37 azawawi FROGGS: rakudobrew build moar 2015.12  (on rpi 512MB) failed on CONF_SWAPSIZE=100, trying a bigger swap file now
11:37 nine CompUnit::Repository::FileSystem includes $*REPO.id in the precomp id. CompUnit::Repository::Installation OTOH only assigns an id at install time, so it is not dependent on the $*REPO.repo-chain at runtime at all.
11:38 RabidGravy frankjh, uint64 I think, and you may need to coerce to an int with Int($val) or somesuch
11:38 FROGGS azawawi: how did it fail?
11:39 azawawi FROGGS: ARM: Internal compiler error: in extract_insn
11:39 FROGGS azawawi: interesting
11:39 FROGGS azawawi: I dont remember my error message though
11:39 azawawi FROGGS: running it again.... results in a couple of minutes
11:40 RabidGravy azawawi, I have a gig of swap on mine
11:40 llfourn nine: I was looking at that code I never understood why $*REPO.id was used rather than self.id?
11:41 llfourn (would love to understand)
11:41 RabidGravy "KiB Swap:  1048572 total"
11:41 nine That's the commit: https://github.com/rakudo/rakudo/commit/0734842b
11:41 FROGGS m: use NativeCall; sub foo (longlong) { 42 }; say foo 42 # frankjh: I can pass it just fine here
11:41 camelia rakudo-moar b5cb00: OUTPUT«42␤»
11:41 nine llfourn: because a repository further up in the chain may contain a newer version of a dependency.
11:42 llfourn nine: ok. Will think about that..
11:42 frankjh1 joined #perl6
11:42 azawawi FROGGS: https://gist.github.com/azawawi/e7a1228385de73f27d4c
11:42 virtualsue joined #perl6
11:42 RabidGravy azawawi, ah that's a different matter
11:43 RabidGravy you will need to use a more recent gcc
11:43 azawawi RabidGravy: 4.6.3
11:43 RabidGravy gcc (GCC) 4.8.2 20131212 (Red Hat 4.8.2-8)
11:43 FROGGS azawawi: mine died when compiling the setting... in stage optimize or mast or so
11:43 RabidGravy you should be able to get a more recent version and then fiddle around the alternatives thing to make it the default
11:44 azawawi RabidGravy: that's stock raspbian settings fyi
11:44 RabidGravy yeah 4.8.2 definitely works using it on both Pis
11:45 frankjh1 FROGGS: yes this work here too, but my $crypto_box_NONCEBYTES = 24; my $mlen = $crypto_box_NONCEBYTES + $m.chars; Gives the unbox error
11:45 FROGGS RabidGravy: I also have gcc 4.6.3 and I was able to compile MoarVM (half a year ago)
11:45 RabidGravy azawawi, yeah but the moarvm compile tickles a bug or some infelicity in the older gcc
11:45 azawawi so what's the minimum gcc recommended?
11:45 RabidGravy FROGGS, yeah it stopped working a few months ago
11:46 FROGGS frankjh1: what is $m?
11:46 FROGGS is it a string?
11:46 FROGGS and where does it come from?
11:46 bitmap joined #perl6
11:46 RabidGravy I think someone pitched up with 4.8.1 which didn't work either, but 4.8.2 does (and is available in the apt repo)
11:47 * azawawi runs "sudo apt-get install gcc-4.8"
11:47 frankjh1 FROGGS $m is a parameter og my perl6 sub "sub crypto_box(Str $m, ..."
11:47 FROGGS frankjh1: can you golf it down?
11:47 RabidGravy if I get I minute I may make a "Perl 6 on the Rapberry pi"  type article (with some help)
11:47 tipdbmp joined #perl6
11:48 FROGGS RabidGravy++
11:48 user74747 joined #perl6
11:48 RabidGravy it seems like sprocket is leading the way with actually making stuff for it
11:49 frankjh1 This compiles:  crypto_box_int($data, $msg, 42, $nonce, $pk, $sk); This not:     crypto_box_int($data, $msg, $mlen, $nonce, $pk, $sk);
11:49 azawawi RabidGravy: yeah i noticed, that's why im making a regular rakudo star release for it
11:49 RabidGravy I've got two modules in flight but I got pre-empted by a bunch of feature requests for Test::META
11:53 RabidGravy azawawi++
11:53 ChoHag joined #perl6
11:56 RabidGravy regex gugus, is there a succinct way of saying "the string contains this substring and not this other one"?
11:57 _nadim joined #perl6
11:57 frankjh1 RabidGravy: Int($mlen) gives same error.
11:57 RabidGravy :-O
11:57 RabidGravy what's in $mlen then?
12:00 azawawi RabidGravy: compiling on gcc 4.8 now
12:00 RabidGravy cool
12:00 virtualsue i'm going to do a Perl 6 talk, probably in Feb, and I fear that more than the Go workshop I'm going to do in 2 weeks
12:00 FROGGS frankjh1: is crypto_box_int the native function?
12:00 virtualsue but in a good way
12:00 frankjh1 RabidGravy: 35.
12:01 llfourn m: say so "foobaz" ~~ /<!before .*"bar">foo/ # my attempt
12:01 camelia rakudo-moar b5cb00: OUTPUT«True␤»
12:01 frankjh1 Yes crypto_box_int is native: sub crypto_box_int(CArray[int8], CArray[int8], longlong, CArray[int8], CArray[int8]) is symbol('crypto_box') is native('./lib/tweetnacl') { * }
12:01 frankjh1 I have a perl6 wrapper function around that.
12:02 azawawi RabidGravy: it seems to have worked. time for lunch :)
12:02 RabidGravy yay!
12:03 FROGGS frankjh1: can you 'say $mlen.WHAT' before the call to crypto_box_int'?
12:03 FROGGS or... make it: sub crypto_box_int(CArray[int8], CArray[int8], longlong(), CArray[int8], CArray[int8])
12:03 FROGGS or... do what I said first :o)
12:04 pmurias joined #perl6
12:08 whj2819 joined #perl6
12:08 frankjh1 FROGGS: The test runner 'prove' is eating my stdout. Somehow I do not see what I say. :)
12:09 FROGGS frankjh1: try 'note' instead of 'say'
12:10 bitmap joined #perl6
12:13 masak m: say ("0" x 3 ~ "1").substr(2) # [RT #123602]
12:13 camelia rakudo-moar b5cb00: OUTPUT«00␤»
12:13 masak still wrong
12:14 FROGGS m: say ("0" x 3 ~ "1")
12:14 camelia rakudo-moar b5cb00: OUTPUT«0001␤»
12:14 masak maybe I should "learn the ropes", hehe
12:15 bitmap joined #perl6
12:21 Actualeyes joined #perl6
12:24 frankjh1 FROGGS: Somehow it looks that it is only a sideffect that the compiling works, if I replace $mlen with 42. Now I have the error two lines above. (It did not reach the line with note $mlen.WHAT) Sorry I need to better understand my code...
12:25 FROGGS aha
12:25 FROGGS well yeah, I suspected that something strange is going on
12:28 nowan joined #perl6
12:29 Sqirrel joined #perl6
12:31 pdcawley joined #perl6
12:38 AlexDaniel m: .say for “hello\c[LINE SEPARATOR]world”.lines
12:38 camelia rakudo-moar b5cb00: OUTPUT«hello␤world␤»
12:39 AlexDaniel m: .say for “hello\x0085world”.lines
12:39 camelia rakudo-moar b5cb00: OUTPUT«hello␤world␤»
12:47 lnrdo joined #perl6
12:52 araujo joined #perl6
12:55 araujo joined #perl6
12:55 araujo joined #perl6
13:01 vendethiel joined #perl6
13:01 RabidGravy jdv79, Zoffix : I think https://github.com/jonathanstowe/Test-META/releases/tag/v0.0.3 covers your wishes as far as I am prepared to go right now
13:06 azawawi RabidGravy: "stage start" reached.... oh yeah :)
13:07 bonsaikitten flussence: btw - second patch, doc strings don't apply cleanly
13:07 bonsaikitten flussence: apart from that it's all good
13:12 lnrdo joined #perl6
13:15 dalek doc: a468121 | lizmat++ | doc/Language/setbagmix.pod:
13:15 dalek doc: Fix header level
13:15 dalek doc: review: https://github.com/perl6/doc/commit/a468121099
13:15 leont joined #perl6
13:16 bitmap joined #perl6
13:17 regreg joined #perl6
13:20 ChoHag How can I ensure that assignment of an attribute's accessor's return value isn't lazy or optimised away?
13:20 lizmat if it's optimized away, it's a bug ?
13:21 _mg_ joined #perl6
13:21 ChoHag Even if the variable assigned to is subsequently unused by the time it goes out of scope?
13:22 llfourn that sounds like a bug to me can you golf it?
13:22 ChoHag ie. only even referenced in the assignment: { my $foo = $instance.bar; ...-which-never-mentions-$foo-again; }
13:22 ChoHag There's no code. I want to ensure I write the code sanely if there's a need to.
13:23 ChoHag If even the above example will never cause the assignment not to happen, I'm golden.
13:24 lizmat fwiw, as soon as something is lazy and can have side-effects, it can never be optimized away
13:24 lizmat if it is, it's probably somewhere losing the fact that it can have side-effects..
13:25 AlexDaniel .u 🌃
13:25 yoleaux U+1F303 NIGHT WITH STARS [So] (🌃)
13:26 harrison_ joined #perl6
13:26 gavinhi joined #perl6
13:27 AlexDaniel .u ⌣
13:27 yoleaux U+2323 SMILE [So] (⌣)
13:28 AlexDaniel Hm, I don't think that there is any symbol that is good enough for whatever star
13:33 kid51 joined #perl6
13:33 AlexDaniel ★ is a good star, but it's not “whatever”. ⊛ is an operator, so I don't think that it fits. ⍰ is good but it's a question mark…
13:34 ChoHag AlexDaniel: O
13:34 ChoHag It's a blank face.
13:34 AlexDaniel ChoHag: blank face?
13:35 ChoHag Like ☺, but blank.
13:35 ChoHag That or Vicky Pollard, but she's probably not in Unicode.
13:35 AlexDaniel I don't think that I'm following you :D
13:36 AlexDaniel actually, ⍰ is not too bad
13:36 AlexDaniel .u ⍰
13:36 yoleaux U+2370 APL FUNCTIONAL SYMBOL QUAD QUESTION [So] (⍰)
13:36 llfourn ⍰ a box with a question mark is pretty whatever to me
13:36 leont Sounds like AlexDaniel doesn't have some character in his fonts that ChoHag does have
13:37 llfourn although it's hard to to see it because it's so small
13:37 AlexDaniel .u O
13:37 yoleaux U+004F LATIN CAPITAL LETTER O [Lu] (O)
13:37 ChoHag If asked a question, and you don't know the answer, your face would likely be blank.
13:37 AlexDaniel llfourn: I'm pretty sure that everything is rendered correctly here :)
13:38 llfourn AlexDaniel: it looks like it to me :)
13:38 ChoHag Oh no not Vicky Pollard. I'm thinking of Catherine Tate.
13:38 ChoHag It's been a long time since I watched TV.
13:45 azawawi stage parse over rpi 1 (512MB) = 2330.433 seconds :)
13:50 frankjh1 Hi, for my native crypto lib I need to pass the data as CArray[int8]   in C (char*). How do I copy the indiviual bytes of a Str into a CArray? Or should I convert Str into someother type Buf, Blob sounds fitting, but I did not understand the role thing.
13:50 AlexDaniel any APL aficionados here? What does ‘⍰’ mean there?
13:51 azawawi is rakudo star still maintained btw given that the latest is 2015.11?
13:51 AlexDaniel azawawi: yes, it is just not there yet
13:51 azawawi slow upload connection? :)
13:54 frankjh1 my $msg  = CArray[int8].new; my $m = 'Hello' ;loop ($i=0;$i<$m.chars;$i++) {  $msg[$I] = $m.access_byte_at($i) }
13:54 frankjh1 What is the proper name for  access_byte_at() ?
13:56 AlexDaniel frankjh1: good questions!
13:57 RabidGravy it's actually more complicated than that
13:57 AlexDaniel frankjh1: ‘test’.NFD[$i] # what would this give? I'm not sure… let's see
13:57 RabidGravy but something like what AlexDaniel said
13:58 AlexDaniel frankjh1: yeah, well, strings are on grapheme level by default. If you want bytes you have to do something
13:58 AlexDaniel ahhh
13:58 AlexDaniel hmm…
13:58 RabidGravy I'd probably go with "my Buf $m = "Hello".encode .... "
13:58 RabidGravy which will definitely get you bytes
13:58 AlexDaniel yeah, that's probably one way to do it
13:59 frankjh1 So you encode a Str into a Buf? And with Bufs i can access Bytes with [] ?
13:59 vike joined #perl6
14:00 RabidGravy yeah
14:00 frankjh1 Ok thanks I will try!
14:00 gfldex you better .comb and then encode on the one char string
14:00 RabidGravy then do "$msg[$_] = $buf[$_] for ^$buf.elems"
14:00 RabidGravy saving the C stule loop
14:00 bbkr joined #perl6
14:01 RabidGravy gfldex, isn't the nett effect the same?
14:01 AlexDaniel you can also do .ords but these are far from being bytes
14:02 virtualsue joined #perl6
14:03 RabidGravy (it does of course depend on the expected encoding of the CArray)
14:03 gfldex if you need the whole string as a byte string, comb wont make much sense. In most applications you wont need that or you would start with a Buf right away.
14:04 RabidGravy frankjh1, you do realise that you can pass a Str straight to a native sub and it will do the right thing?
14:04 gfldex and by using comb you allow the compiler to help you with iterator magic and CoW strings. I doubt moarvm is doing that already, but there is no reason why i couldn't in the future.
14:04 bbkr hi, how can I specify library version in NC cglobal function? I get tons of internal warnings "Consider adding the api version of the library you want to use, sub foo is native(c, v1)"
14:05 RabidGravy bbkr, yes
14:06 dalek doc: dec7182 | lizmat++ | doc/Language/glossary.pod:
14:06 dalek doc: Some work on the glossary
14:06 dalek doc:
14:06 dalek doc: As part of moving stuff from S99 in here
14:06 dalek doc: review: https://github.com/perl6/doc/commit/dec7182e53
14:07 bbkr RabidGravy: I don't see such possibility. signature is "sub cglobal($libname, $symbol, $target-type) is export is rw", no lib version param
14:07 RabidGravy bbkr, yeah I was just looking
14:08 frankjh1 RabidGravy: No I didn't know. And I need to add 24 zeros to the start of the Str first.
14:08 frankjh1 Cool
14:08 RabidGravy ah
14:12 RabidGravy bbkr, if you pass a List ($libname, Version) as $libname, I think it should work
14:12 jdv79 RabidGravy: cool, thanks
14:12 RabidGravy (reading guess_library_name)
14:12 Skarsnik joined #perl6
14:14 Skarsnik Hello
14:14 RabidGravy jdv79, it occurred to me after I had pushed it that I could have gone with a :strict-version as well as the implied meta6 version to determine whether that test was done but that can wait for the next release now
14:15 bbkr RabidGravy: thanks, indeed this one works "cglobal(("c", v6), "errno", int)".
14:15 RabidGravy cool, I don't have to blame Skarsnik then ;-)
14:17 Skarsnik Ho RabidGravy, you probably want to change your is native trait that use a Callable. It's a bad thing because it get called the first time the sub is executed. You probably want to call that once x)
14:17 RabidGravy eh?
14:18 Skarsnik I should probably tag the routine as cached x)
14:19 RabidGravy oh I see, I already did do that :)  it works better with the resources thing
14:20 Skarsnik it can be bad if you perform path search in system and such if you have like 20+ native sub x)
14:21 pjscott joined #perl6
14:25 RabidGravy yeah, I'm doing something like "my constant HELPER = %?RESOURCES<libraries/lastloghelper>.Str;" everywhere now, but that could be extended to perform something more complicated
14:28 lucasb joined #perl6
14:29 colomon joined #perl6
14:30 azawawi RabidGravy: Done, moar-2015.12 built on RPi 1 512MB, ( real = 145m10.208s, user = 123m23.310s, sys = 3m22.210s)  # final results
14:31 RabidGravy haha
14:31 RabidGravy yeah, it would be cool if there could be a package for that really
14:32 azawawi RabidGravy: working on it :)
14:33 Skarsnik did you manage to plug 2 sata disk on a pi?
14:34 azawawi Skarsnik: it should be possible but not atm
14:37 colomon joined #perl6
14:41 masak this script https://gist.github.com/masak/81409152053431cac80b , which http://strangelyconsistent.org/blog/youre-in-a-space-of-twisty-little-mazes-all-alike says used to take 38 minutes, now takes 20. so someone++ for optimizing Rakudo by 50% :)
14:41 RabidGravy :)
14:42 Skarsnik Does adding a type to the @ speed up a bit?
14:43 gfldex Skarsnik: it will make it slower
14:43 moritz except for native types like int
14:44 nine If debugging is like reading a book, this precompilation issue is the Malazan Chronicles, full of short lived characters and when you think, you know what's going on, a single sentence changes everything again.
14:47 tadzik masak: you make it sound like the Borg :D
14:47 RabidGravy 496 modules! c'mon another four and we can have a party :)
14:48 Skarsnik I have 2 modules to write x)
14:48 colomon joined #perl6
14:48 telex joined #perl6
14:49 masak I'm now running with a completely unrolled @cycles for loop, and next I will replace the regex by bit ops
14:50 Skarsnik how .pm file are installed btw? Like I want to add an app to ecocystem but its pm are 'private' to the app. I don't really want they became usable by other
14:51 colomon joined #perl6
14:51 lucasb .oO( I don't know where your .pm files are... but I will find them... and I will use them! )
14:52 * masak .oO( how is .pm file formed? )
14:52 moritz Skarsnik: I don't think there's a mechanism for this. You can write lexical classes that can't be used from the outside, but then they must be inside the file where it's used
14:52 * masak .oO( how module get pragnent? )
14:53 gfldex Skarsnik: you may have to build your own build system that does #include by hand
14:53 moritz Skarsnik: the p5 solution is simply to document a class as private
14:53 gfldex can panda be asked to execute some script before it installs .pm ?
14:54 * masak .oO( they need to do way instain build your own build system that does #include by hand... who kill their module )
14:55 nine gfldex: Build.pm
14:56 gfldex Skarsnik: your build system goes there ^^^
14:56 lucasb masak: I guess you already saw this book: https://pragprog.com/book/jbmaze/mazes-for-programmers
14:57 Skarsnik x)
15:02 * stmuk_ wonders if memorizing the precomp sha1 hashing would speed things up
15:05 lucasb m: say "\xfa6b"
15:05 camelia rakudo-moar b5cb00: OUTPUT«恵␤»
15:05 masak lucasb: I did not. thank you.
15:05 lucasb m: say "\xfa6c"
15:05 camelia rakudo-moar b5cb00: OUTPUT«(signal SEGV)»
15:05 masak ok, unrolling brought the time down to 17m53s
15:05 masak lucasb: would you mind submitting that as a bug?
15:06 masak shouldn't segfault :)
15:06 gfldex lucasb: Sir put that character down!
15:06 lucasb masak: I think someone already submitted...
15:06 lucasb m: say "\xfa6d"
15:06 camelia rakudo-moar b5cb00: OUTPUT«舘␤»
15:06 lucasb I think 0xfa6 is just special... idk
15:07 lucasb there are more "special" segfaulty chars less than 0xffff
15:08 CIAvash joined #perl6
15:08 gfldex m: say "\xEFA9AC"
15:08 camelia rakudo-moar b5cb00: OUTPUT«(signal SEGV)»
15:09 masak lucasb: let's find all of them :)
15:11 nine stux|RC: if that would speed things up, nqp's sha implementation really needs a major overhaul. SHA1 should hash a couple of 100 MB/s on a somewhat recent machine
15:12 Skarsnik wtf is this type: long long unsigned int
15:12 nine stmuk_: ^^^
15:12 RabidGravy Skarsnik I saw one of those the other day
15:12 Skarsnik it's in sqlite3
15:12 stmuk_ nine: ok
15:13 Skarsnik size is 64 bits x)
15:13 RabidGravy that's not where I saw it, but it's a uint64
15:13 RabidGravy the weather here is hideous
15:14 flussence bonsaikitten: ahh, bummer. I should've tested those better. Won't be needed soon(er or later) either way
15:14 masak holy moly. we have a winner.
15:15 nine It's -4.4°C here. I wonder if it's time to activate my winter jacket for cycling.
15:15 masak switching completely to native ints, the whole search takes 1m46s
15:15 masak \o/
15:15 RabidGravy It's not particularly cold, it's just the rain hasn't stopped all day
15:15 bonsaikitten flussence: yeah, thanks for figuring this out, and I'll see what I can use from your nqp/moarvm ebuild mods once I find some more motivation
15:15 masak I'm also not ruling out that the bit shifting could be simplified through some clever trick I haven't thought of
15:15 masak Gray encoding, perhaps
15:16 Skarsnik RabidGravy, hm are these standard or plateform dependant type?
15:17 RabidGravy I think a testing on an x86-64 and an ARM and they were both the same
15:17 sprocket joined #perl6
15:17 Skarsnik I should probably do something special with typedef that point to this type of type x)
15:17 RabidGravy but that's not precluding some other architecture doing something else
15:18 flussence bonsaikitten: in the meantime, I'll keep on prodding the people here until all those hacks can go away. I'm pretty good at that :)
15:18 bonsaikitten flussence: teamwork! ;)
15:19 Skarsnik RabidGravy, the l l u i is sqlite3_uint64 for example
15:19 flussence things'll be much smoother once everyone's back from christmas vacations/hangovers...
15:20 RabidGravy I'm struggling to remember where I saw that type now
15:25 Skarsnik has num64       $.estimatedCost;
15:25 Skarsnik has sqlite_int64        $.estimatedRows;
15:25 Skarsnik It's probably better like this
15:26 orbus I just tried it on gcc on x86_32 and it's 64 bits as well
15:27 * masak whips out TAoCP 4A to help speed this up
15:29 orbus and this is in stdint.h
15:29 orbus typedef unsigned long long int  uint64_t;
15:30 Skarsnik x)
15:30 orbus well, actually that's defined if __WORDSIZE==64
15:31 orbus is NOT rather
15:31 orbus if it is it's 64 it's typedef unsigned long int       uint64_t;
15:32 orbus so yeah, probably better to use the header types to be on the safe side
15:34 stmuk_ it took far too long for me to spot the issue with https://github.com/tony-o/perl6-html-parser-xml/blob/master/META.info
15:34 nige1 joined #perl6
15:34 stmuk_ I wonder if panda should warn if the "name" doesn't match "provides" - could also be a security issue
15:36 RabidGravy stmuk_, that would break e.g.  Task::Star or something that only distributed a script
15:37 Skarsnik name : App::GPTrixie and I don't provide a file like this xD
15:37 stmuk_ it does mean I can distribute a module which appears to be "Acme::Whatever" and is actually installed as LDAP::Password and steals info
15:37 RabidGravy yes, I'm just thinking it through
15:38 stmuk_ I'm not sure warning would actually break anything
15:39 RabidGravy no, but the case you have there, if you don't crap out then it's too late
15:39 Skarsnik what about App module?
15:40 xpen joined #perl6
15:40 Skarsnik App::foo will probably not provide a App::foo.something
15:41 RabidGravy and actually even if you  check that the Acme::Foo name does appear in the provides then that doesn't stop them putting else in there as described
15:41 huf a warning doesnt help anyway, nobody reads warnings.
15:42 stmuk_ Task::Star has an empty provides anyway
15:42 RabidGravy interesting catch there stmuk_
15:43 RabidGravy well the empty provides case is easy, "if there is anything in the provides, one entry must match the name"
15:43 stmuk_ maybe if provides is defined and doesn't match the same top level name space as name it should warn
15:43 Skarsnik I could write a DBIish::Helper (or what look like a DBIish related module) and replace the real DBIish to stole db password probably? (or more bad: with http::ua)
15:43 RabidGravy but a) that doesn't stop me putting another entry in the provides that does something bad
15:44 RabidGravy and b) as Skarsnik points out, say "App::Foo" may have modules that it uses for its own purposes which have an unrelated name
15:45 raiph joined #perl6
15:46 stmuk_ I think the provides was probably ignored before precomp
15:47 RabidGravy stmuk_, that latter would mean that if there was some framework which needed a plugin in a certain namespace and I wanted to ship it with my module which was in a different namespace I would have to package it separately
15:47 nine ABC doesn't contain an ABC module but lots of ABC::
15:48 stmuk_ I think panda should just display what it actually installs
15:48 RabidGravy the provides was definitely working at some point before the recent precomp stuff but may have gone away while panda wasn't compiling
15:48 Skarsnik test::meta should provide an small app to not have to write code x)
15:49 RabidGravy nah, but I'll accept a PR against META6 for a generator script :)
15:49 RabidGravy it should display what it is installing yes
15:49 n0tjack joined #perl6
15:50 Skarsnik ==> Testing Test::META
15:50 Skarsnik ===SORRY!===
15:50 Skarsnik Could not find META6:ver<0.0.4..*> in:
15:50 Skarsnik damn
15:50 Skarsnik I should probably update panda x)
15:50 zakharyas joined #perl6
15:51 RabidGravy yeah, you need to do a panda update and then probably force install META6
15:51 RabidGravy "META6:ver<0.0.4>" doesn't work in requires at the moment
15:53 RabidGravy I think that panda may try to install with the version from it's project.json rather than the one in the META.info
15:54 RabidGravy but I've done playing with that stuff for the day
15:57 sprocket joined #perl6
15:57 patrickz joined #perl6
15:58 nine RabidGravy: yes it does and it's causing problems
16:00 RabidGravy maybe a simple expedient of hashing the project.json and retrieving a new one if the remote one doesn't match the local one
16:00 RabidGravy or something like that
16:01 stmuk_ the remote one is generated by a 15m cron and might be out of date anyway
16:01 RabidGravy or whatever the cpan client does with the modules list
16:03 RabidGravy so yeah, panda should use the meta info from the distribution and not it's own
16:04 RabidGravy there's a slight catch if anyone wanted to use tagged releases and was updating the META.list but hey
16:06 Zoffix joined #perl6
16:07 RabidGravy it's probably just do whatever it "panda install ." does after it has retrieved the distribution
16:08 stmuk_ I was always suspicious panda still said "Fetching" in that case
16:08 RabidGravy yeah
16:09 * Zoffix pets the roboy
16:09 yoleaux 2 Jan 2016 19:31Z <RabidGravy> Zoffix: I updated Test::Meta with your suggestions but you will need to upgrade META6 manually too
16:09 Zoffix RabidGravy++
16:09 sprocket morning, p6!
16:09 Zoffix RabidGravy, why manually?
16:09 RabidGravy can't specify required version in the META.info currently
16:10 Zoffix :/
16:10 stmuk_ arggg of course displaying what panda installs just displays SHA1 hashes :)
16:11 Zoffix RabidGravy, by can't, do you mean panda doesn't support that yet?
16:11 RabidGravy so the module itself does but it won't grab that version and specifying 'requires" : [ "META6:ver<0.04>"]'   no worky
16:11 sjn .u U+1F98B
16:11 yoleaux No characters found
16:11 RabidGravy so yes, panda doesn't support that yet
16:11 Zoffix k
16:12 Actualeyes joined #perl6
16:12 _mg_ joined #perl6
16:12 sjn http://babelstone.blogspot.de/2016/01/whats-new-in-unicode-90.html # It has a butterfly! :D
16:12 tadzik stmuk_: it's copying it to a temporary location where it works on it later
16:13 pdcawley joined #perl6
16:13 RabidGravy all good
16:13 stmuk_ sure its the source for the moarvm
16:14 khw joined #perl6
16:16 mscha joined #perl6
16:17 arnsholt Anyone else getting "An exception occurred while evaluating a constant" in install-core-dist.p6?
16:17 mscha m: my $now = DateTime.now; say $now.Instant - $now.posix;  #huh?
16:17 camelia rakudo-moar b5cb00: OUTPUT«Instant:36.912049␤»
16:17 arnsholt Running MoarVM/NQP/Rakudo HEAD
16:17 n0tjack *pops head in* Congrats to everyone on the official release!
16:17 Zoffix Thanks
16:18 Zoffix mscha, leap seconds maybe?
16:18 stmuk_ with reference to the wrong provides issue I think panda should display what it actually installs rather than what it thinks it will
16:19 mscha Zoffix, 26 leap seconds sinds introduction in 1972
16:19 stmuk_ eg. ==> Installing HTML::Parser::XML
16:19 stmuk_ nstalling HTTP::Parser::XML  in block  at /home/steve/sandbox/rakudo/install/share/perl6/site/sources/A8B5E32BE26CA290354B6CBDBED92C1486082961 line 62
16:19 * Zoffix pats self on back for correct guess
16:20 * Zoffix unpats self on the back for incorrectly reading 36 as 26
16:21 hankache joined #perl6
16:21 mscha TAI, Temps Atomique International, is the international atomic time scale based on a continuous counting of the SI second. TAI is currently ahead of UTC by 36 seconds. TAI is always ahead of GPS by 19 seconds.
16:21 Zoffix Ah
16:22 RabidGravy Atomic Time!
16:22 moritz but why the .91?
16:22 moritz looks too big to be a numeric error
16:22 moritz is one of them rounded to the nearest integer, maybe?
16:22 flussence .posix is truncated to int, instant isn't
16:23 moritz m: given DatTime.now { say .Instant - .posix }
16:23 camelia rakudo-moar b5cb00: OUTPUT«5===SORRY!5=== Error while compiling /tmp/jfncwvQkgc␤Undeclared name:␤    DatTime used at line 1. Did you mean 'DateTime'?␤␤»
16:23 moritz m: given DateTime.now { say .Instant - .posix }
16:23 camelia rakudo-moar b5cb00: OUTPUT«Instant:36.985177␤»
16:23 flussence Instant also *isn't* a Numeric, which is why the .gist looks like that
16:24 mscha m: given DateTime.now { say [ .Instant, .posix, .Instant - .posix ] }
16:24 camelia rakudo-moar b5cb00: OUTPUT«[Instant:1451838293.682377 1451838257 Instant:36.682377]␤»
16:24 hankache hello #perl6
16:24 n0tjack m: say DateTime.now.Instant.gist;
16:24 camelia rakudo-moar b5cb00: OUTPUT«Instant:1451838309.442177␤»
16:24 moritz ok, .posix is the integer
16:24 n0tjack looks numeric to me
16:25 flussence m: say DateTime.now.Instant.^mro
16:25 camelia rakudo-moar b5cb00: OUTPUT«((Instant) (Cool) (Any) (Mu))␤»
16:25 n0tjack Cool is numeric-ish
16:25 moritz m: say DateTime.^roles
16:25 camelia rakudo-moar b5cb00: OUTPUT«((Dateish))␤»
16:27 flussence m: say DateTime.now.Instant.^roles
16:27 camelia rakudo-moar b5cb00: OUTPUT«((Real) (Numeric))␤»
16:27 flussence oh, there it is
16:27 Zoffix left #perl6
16:33 stmuk_ WARNING: installing HTTP::Parser::XML for HTML::Parser::XML
16:33 jdv79 when did this meta6 version thing become a thing?
16:33 * flussence wishes git-push had an --allrmeotes switch
16:33 flussence s/rme/rem
16:34 moritz flussence: there's a possiblity to configure branches to be pushed to several remotes at once; might that help you?
16:35 moritz flussence: http://stackoverflow.com/a/14290145
16:35 flussence moritz: probably. 99% of the time it seems it already does what I want, I just have no idea it exists because they put it in a bizarre place :)
16:35 RabidGravy jdv79, some time in the last week.
16:36 lucasb "HTTP::Parser::XML" : "lib/HTML/Parser/XML.pm6"  # <-- HTML::Parser::XML's META.info 'provides' section
16:36 hankache nine++ #panda fixes
16:36 stmuk_ lucasb: I submitted a PR
16:36 arnsholt nine: Have you come across the "An exception occured while evaluating a constant" error during precomp?
16:37 lucasb stmuk_: ah, ok. I just saw the PR, stmuk_++
16:38 RabidGravy stmuk_, just wondering how to test that in Test::META
16:39 stmuk_ you could try and fuzzy match the RHS and LHS of the provides I guess
16:40 stmuk_ I'm not even sure there is a valid case when they aren't the same TBH
16:40 RabidGravy I guess one could try and require the file specified on the RHS and see if the symbol on the LHS exists
16:40 stmuk_ yes that sounds better
16:42 BenGoldberg joined #perl6
16:42 RabidGravy and if there was a good reason for it to be different that we haven't thought of then some switch to say "yeah I know about that thanks"
16:44 * RabidGravy adds it to the wishlist for Test::META
16:45 dalek ecosystem: 642c08b | (Sylvain Colinet)++ | META.list:
16:45 dalek ecosystem: Add App::GPTrixie, a NC code generator from C header
16:45 dalek ecosystem:
16:45 dalek ecosystem: https://github.com/Skarsnik/gptrixie
16:45 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/642c08bf2c
16:45 stmuk_ installing IETF::RFC_Grammar for URI
16:45 Skarsnik Nooo
16:45 Skarsnik it was not my fork ><
16:45 stmuk_ that looks a valid case
16:46 Skarsnik I should display the git repo in my shell prefix x)
16:49 RabidGravy oh well :)
16:50 stmuk_ installing X::JSON::RPC for JSON::RPC as well
16:50 stmuk_ which makes sense
17:03 nzkindest joined #perl6
17:06 Skarsnik hm
17:07 SwellJoe joined #perl6
17:07 Skarsnik What should I use to have unencoded string?
17:08 Actualeyes joined #perl6
17:11 AlexDaniel Skarsnik: by unencoded you mean?
17:13 Skarsnik I should maybe explain my issue, it's probably not that 'easy' I am rewrite a module that handle IRC color, and it work by adding sequence like \002\003 before a text
17:14 Skarsnik I am not sure if that will not be mashed as a unicode graphem
17:15 stmuk_ nine: https://github.com/rakudo/rakudo/pull/670
17:16 _Vi joined #perl6
17:16 AlexDaniel m: say “\x035”
17:16 camelia rakudo-moar b5cb00: OUTPUT«5␤»
17:16 AlexDaniel m: say “\x035”.chars
17:16 camelia rakudo-moar b5cb00: OUTPUT«1␤»
17:16 nowan joined #perl6
17:17 AlexDaniel m: say (“\x03” ~ “99,25”).chars
17:17 camelia rakudo-moar b5cb00: OUTPUT«6␤»
17:18 AlexDaniel Skarsnik: it seems like it wont?
17:19 AlexDaniel Skarsnik: also, it seems like everything that follows is just pure text, not bytes
17:20 Skarsnik m: say "\00302,05\0021"
17:20 camelia rakudo-moar b5cb00: OUTPUT«␀0302,05␀021␤»
17:21 Skarsnik m: say "\x0302,05\x021"
17:21 camelia rakudo-moar b5cb00: OUTPUT«̂,05!␤»
17:21 Skarsnik m: say "\x00302,05\x0021"
17:21 camelia rakudo-moar b5cb00: OUTPUT«̂,05!␤»
17:21 AlexDaniel m: say “\x03” ~ ‘02,05’ ~ “\x02” ‘1’
17:21 camelia rakudo-moar b5cb00: OUTPUT«5===SORRY!5=== Error while compiling /tmp/h0FW1o9SSZ␤Confused␤at /tmp/h0FW1o9SSZ:1␤------> 3say “\x03” ~ ‘02,05’ ~ “\x02”7⏏5 ‘1’␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        sta…»
17:22 AlexDaniel m: say “\x03” ~ ‘02,05’ ~ “\x02” ~ ‘1’
17:22 camelia rakudo-moar b5cb00: OUTPUT«,051␤»
17:22 Skarsnik ok it work
17:23 Skarsnik hm it should be bold
17:23 RabidGravy :)
17:23 RabidGravy it'sa kind of cerise and blue thing
17:23 RabidGravy maybe that is "bold" here
17:24 AlexDaniel m: say ‘x’
17:24 camelia rakudo-moar b5cb00: OUTPUT«x␤»
17:24 hankache joined #perl6
17:24 Skarsnik m: say “\x03” ~ ‘02,05’ ~ ‘1’
17:24 camelia rakudo-moar b5cb00: OUTPUT«,051␤»
17:24 Skarsnik m: say “\x02" ~ ‘1’
17:24 camelia rakudo-moar b5cb00: OUTPUT«5===SORRY!5=== Error while compiling /tmp/g6qlXEnHID␤Unable to parse expression in smart double quotes; couldn't find final '”' ␤at /tmp/g6qlXEnHID:1␤------> 3say “\x02" ~ ‘1’7⏏5<EOL>␤    expecting any of:␤        argument list…»
17:25 Skarsnik m: say "\x02" ~ '1';
17:25 camelia rakudo-moar b5cb00: OUTPUT«1␤»
17:25 Skarsnik m: say "\x02" ~ 'é';
17:25 camelia rakudo-moar b5cb00: OUTPUT«é␤»
17:26 RabidGravy are subsets "our" scoped?  or more specificially if I define a subset "Block" in a class definition it won't screw up the real Block?
17:28 RabidGravy I'm thinking yes and no from experimentation
17:28 Skarsnik x)
17:30 Skarsnik I think I will cp the text method of http://cpansearch.perl.org/src/SCOLINET/Acme-IRC-Art-0.2/lib/Acme/IRC/Art.pm it's a big wtf xD
17:30 deepika joined #perl6
17:32 lsm-desktop joined #perl6
17:32 stmuk_
17:38 Skarsnik m: for ^2 { say $_ };
17:38 camelia rakudo-moar b5cb00: OUTPUT«0␤1␤»
17:39 takdaram joined #perl6
17:39 RabidGravy gosh, the i2c library is made of crack
17:41 Skarsnik x)
17:41 Skarsnik use gptrixie!
17:43 RabidGravy I don't think it would help with this one, the "library" is actually a .h file with a lot of "inline" function definitions, so I have to make a wrapper in C to realise the inlines
17:43 autarch Exodist & leont: I have a working TAP12 formatter based on stream events in https://github.com/autarch/perl6-Test-Stream
17:44 Skarsnik RabidGravy, oh yeah, very likely
17:45 pierre-vigier joined #perl6
17:46 * flussence adds to crontab `find ~/code/perl6 -type d -name .precomp -exec rm -r {} +`... because it just cleaned up 27MB of space
17:46 nzkindest joined #perl6
17:48 pochi m: try { die "foo" }; say $!.can("perl"); say $!.^methods
17:48 camelia rakudo-moar b5cb00: OUTPUT«(perl)␤(message Numeric from-slurpy <anon> backtrace resume die is-compile-time gist Str reset-backtrace throw vault-backtrace rethrow resumable fail)␤»
17:48 pochi How come $! can do .perl, but .perl doesn't show up in methods?
17:49 pochi most other objects that can do .perl also has it in the ^methods list
17:49 moritz pochi: .^methods suppresses methods from Any and Mu by default
17:50 hankache what would i need to build rakudo on Windows?
17:50 moritz pochi: see http://doc.perl6.org/routine/methods
17:50 pochi aha
17:53 pochi where in the source code does the actual assignment to $! happen upon a try { die }?
17:59 Zoffix joined #perl6
17:59 Zoffix Should this cry and complain?
17:59 Zoffix m: my %h = :foo<bar> :ber(<boor>); say %h
17:59 camelia rakudo-moar b5cb00: OUTPUT«foo => bar␤»
17:59 Zoffix Just had a bug due to this and it's only by chance that I noticed the missing comma
18:00 * Zoffix is starting to think avoiding commas in arg calls is a bad habit to get into
18:00 nige1 joined #perl6
18:00 Zoffix m: my %h = :foo<bar> :ber<boor>, :meow<moo>; say %h
18:00 camelia rakudo-moar b5cb00: OUTPUT«foo => bar, meow => moo␤»
18:00 pierre-vigier joined #perl6
18:02 Ben_Goldberg joined #perl6
18:04 Zoffix Oh, this is fun:
18:04 Zoffix m: my $e = { foo => ['bar']}; my %h = :foo($e<foo>[0]); %h<foo>.subst-mutate: /^'ba'/; say [ %h, $e ]
18:04 hankache Zoffix i always put commas, semicolons, parentheses even if unnecessary. Code will look ugly but at least I don't spend half a day looking for that missing semicolon
18:04 Zoffix (missing second arg on .sub-mutate
18:04 camelia rakudo-moar b5cb00: OUTPUT«Memory allocation failed; could not allocate 16 bytes␤»
18:04 Zoffix )
18:04 Zoffix hankache, I can counter that argument with: more typing and more reading
18:07 llfourn joined #perl6
18:13 Zoffix Rakudobugged both of those: commaless-hash-keys: https://rt.perl.org/Ticket/Display.html?id=127134   and the infinite loop on .subst-mutate: https://rt.perl.org/Ticket/Display.html?id=127135
18:13 Zoffix The https://rt.perl.org/Ticket/Display.html?id=127135 is LHF, as I see what the problem is (described in ticket). Just a check for number of args in Cool needs to be added along with the error throwage
18:13 hankache Zoffix++
18:14 pi1 joined #perl6
18:14 skids joined #perl6
18:15 dalek evalbot: 6492214 | (Zoffix Znet)++ | irc.perl.org.conf:
18:15 dalek evalbot: Add #perl6 to the list of channels on irc.perl.org
18:15 dalek evalbot: review: https://github.com/perl6/evalbot/commit/6492214dbd
18:16 hankache there is now a #perl6 on irc.perl.org ??
18:16 pierre-vigier joined #perl6
18:17 Zoffix Seems to be
18:17 hankache oh!
18:18 Zoffix left #perl6
18:18 Skarsnik damn zoffix gone again xD
18:19 pi1 joined #perl6
18:21 pi4 joined #perl6
18:21 timotimo probably watching AGDQ now?
18:22 dwarring joined #perl6
18:22 Skarsnik Monkey Ball is not really my thing, but it's still fun to watch
18:23 virtualsue hankache: that's not the official #perl6 channel in any way, shape or form.
18:24 virtualsue it might become fun, however
18:24 hankache hiya virtualsue
18:25 hankache yeah i just read that this one is the official
18:25 hankache virtualsue i am in for the fun!
18:25 RabidGravy eugh, "i2c_smbus_block_process_call" takes an array of uint8 values and modifies it in place
18:25 _mg_ joined #perl6
18:26 wamba joined #perl6
18:28 RabidGravy are there any devices that would actually use that?
18:28 Skarsnik Don't add it and wait for someone to fill an issue about it? x)
18:29 dj_goku m: my $v = 12; { my $v = 13; { say 'parent ' ~ ::<$v> ~ ' grand parent ' ~ OUTER::OUTER::<$v>; } }
18:29 camelia rakudo-moar b5cb00: OUTPUT«parent 13 grand parent 12␤»
18:29 dj_goku :D
18:30 sjoshi joined #perl6
18:31 Rotwang is there something like 'trace' module in python?
18:31 Rotwang or set -x in bash?
18:33 Ben_Goldberg You could probably assign (or rather, bind with := ) a Proxy object to the variable you want to debug.
18:35 nowan joined #perl6
18:35 sjoshi Is perl6 out?
18:35 timotimo right. "assigning a proxy" will call the FETCH and give you what's inside the proxy instead of taking the proxy into the new variable
18:35 timotimo sjoshi: yup, grab it while it's hot!
18:35 sjoshi timotimo: cool, thanks!
18:36 timotimo if you want more details, stick around :)
18:36 flussence m: use trace; say 1; say 2; sub foo { 3 }; say 3; # Rotwang
18:36 camelia rakudo-moar b5cb00: OUTPUT«2 (/tmp/F7TIqPhlCl line 1)␤say 1␤1␤3 (/tmp/F7TIqPhlCl line 1)␤say 2␤2␤4 (/tmp/F7TIqPhlCl line 1)␤sub foo { 3 }␤7 (/tmp/F7TIqPhlCl line 1)␤say 3␤3␤»
18:36 timotimo though i'm too distracted to give a speech
18:37 Actualeyes joined #perl6
18:40 Rotwang flussence: cool! T.Hanks
18:40 Ben_Goldberg Another way to debug your entire script, is to install this: https://github.com/jnthn/rakudo-debugger
18:42 timotimo i *think* the debugger currently has a problem? someone might have to look closer at that and fix it
18:42 timotimo it might be super easy, though
18:48 SwellJoe joined #perl6
18:50 sjoshi Does perl6 has something to offer as we have like ipython?
18:52 Juerd Not that I know of
18:52 Skarsnik not yet?
18:53 polyfloyd joined #perl6
18:53 Juerd polyfloyd: *wave*
18:53 polyfloyd \o Juerd
18:54 nemsys joined #perl6
18:56 jameslenz joined #perl6
19:01 Rotwang where are installed the perl6 core *.pm files when using rakudobrew?
19:03 pierre-vigier joined #perl6
19:03 RabidGravy Rotwang, the aren't install per-se
19:03 timotimo sjoshi: working on it
19:04 Rotwang RabidGravy: I'm getting an exception and would like to add debug print
19:04 timotimo Rotwang: before compiling they are concatenated into one big file
19:04 timotimo you will have to edit the source files and "make install"
19:04 mst Rotwang: .rakudobrew/moar-nom/install/share/perl6/dist/
19:04 Zoffix joined #perl6
19:04 Zoffix Hey. How do we do word boundaries in P6 regex?
19:04 timotimo mst: not helping :)
19:04 Zoffix m: say so 'yo bot' ~~ /\b 'bot' \b/ # doesn't work
19:04 camelia rakudo-moar b5cb00: OUTPUT«False␤»
19:04 timotimo Zoffix: >> and <<
19:05 mst timotimo: well, that tells you which file is which :)
19:05 Zoffix m: say so 'yo bot' ~~ />> 'bot' <</
19:05 camelia rakudo-moar b5cb00: OUTPUT«False␤»
19:05 timotimo mst: no, i don't think so
19:05 timotimo Zoffix: other directionk :)
19:05 timotimo mst: not with the core setting source files at least
19:05 mst timotimo: er, yeah
19:06 Zoffix m: say so 'yo bot' ~~ /<<'bot'>>/
19:06 camelia rakudo-moar b5cb00: OUTPUT«True␤»
19:06 mst timotimo: if I crack open the file in there, and find the name
19:06 timotimo but thanks for helping anyway :)
19:06 Zoffix timotimo++ thanks
19:06 mst moar-nom/install/share/perl6/sources/ contains the source
19:06 Skarsnik Hey Zoffix, I think there is an issue with modules.p6.org, it always load a cached stuff before displaying result. it make using back on the main page lost the scrolling position
19:06 sjoshi timotimo: sounds cool :)
19:06 mst timotimo: I've found Test.pm at least :)
19:06 timotimo sjoshi: you can see the progress in github.com/timo/iperl6-kernel or something like that
19:06 timotimo arnsholt has been working on it recently, i had left it alone for a few years before that, though :(
19:07 RabidGravy yeah, Test NativeCall and lib I think
19:07 Zoffix Skarsnik, get a better browser :P
19:07 Zoffix Skarsnik, what are you using?
19:07 Skarsnik chrome
19:08 Skarsnik it do the same thing on my desktop and my chromebook
19:08 llfourn joined #perl6
19:08 Rotwang timotimo: make install did what I wanted, thanks
19:08 Zoffix Skarsnik, so you're clicking on something on the main page, then click the back button, and your scroll position is lost?
19:08 user74747 joined #perl6
19:09 Skarsnik Yes because the page seens to always load something before displaying the right content
19:09 Skarsnik like a search result will display dumb content before refreshing itself to the result (when reloaded)
19:12 dalek modules.perl6.org: e6bf9ca | (Zoffix Znet)++ | public/js/main.js:
19:12 dalek modules.perl6.org: Fix unwanted search box focus in Chrome
19:12 dalek modules.perl6.org:
19:12 dalek modules.perl6.org: The issue is it jumps back to search box when a BACK button is used after clicking on a search result
19:12 dalek modules.perl6.org: review: https://github.com/perl6/modules.perl6.org/commit/e6bf9ca312
19:12 Zoffix Skarsnik, ^ that probably fixes it
19:12 Zoffix left #perl6
19:16 dalek rakudo/nom: 080ac18 | (Steve Mynott)++ | src/core/CompUnit/PrecompilationStore/File.pm:
19:16 dalek rakudo/nom: don't mkdir if it exists already - which it does sometimes
19:16 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/080ac181aa
19:16 dalek rakudo/nom: 0639e1b | (Steve Mynott)++ | src/core/CompUnit/Repository/Installation.pm:
19:16 dalek rakudo/nom: use existing RAKUDO_LOG_PRECOMP to display more information about exactly what is installed - helps with catching cases where 'provides' means a module is installed somewhere non-obvious and sometimes wrong
19:16 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/0639e1bcdc
19:16 dalek rakudo/nom: 4bb47d5 | lizmat++ | src/core/CompUnit/ (2 files):
19:16 dalek rakudo/nom: Merge pull request #670 from stmuk/nom
19:16 dalek rakudo/nom:
19:16 dalek rakudo/nom: Extra logging and check before creating an existing dir
19:16 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/4bb47d514e
19:16 lucasb joined #perl6
19:26 fdsfdsfds joined #perl6
19:27 dsfdsfds joined #perl6
19:28 dsfdsfds In one of the files I have this:
19:28 dsfdsfds use MyLib::Namespace1::MyClass;
19:28 dsfdsfds In order to refer to MyClass I still have to specify its full name MyLib::Namespace1::MyClass for reason. How can get rid of it? I'd like to say only "MyClass".
19:29 dsfdsfds **for some reason, otherwise the error is thrown
19:29 Skarsnik class MyClass is export
19:29 dsfdsfds where?
19:29 Rotwang is trick
19:29 Skarsnik in your class definition
19:29 Rotwang m: use NativeCall; sub gettimeofday() is native("linux-vdso.so.1") { ... }; await (start { gettimeofday } xx 20)
19:29 camelia rakudo-moar b5cb00: OUTPUT«Memory allocation failed; could not allocate 4194304 bytes␤»
19:29 ugexe joined #perl6
19:29 Rotwang m: use NativeCall; sub gettimeofday() is native("linux-vdso.so.1") { ... }; await (start { gettimeofday } xx 20)
19:29 camelia rakudo-moar b5cb00: OUTPUT«(signal ABRT)*** Error in `/home/camelia/rakudo-m-inst-1/bin/moar': double free or corruption (fasttop): 0x00000000068a5110 ***␤======= Backtrace: =========␤/lib64/libc.so.6(+0x730bf)[0x7fe57cb9c0bf]␤/lib64/libc.so.6(+0x7892e)[0x7fe57cba192e]␤/lib6…»
19:30 dsfdsfds thanks
19:30 Skarsnik * not ...
19:30 Skarsnik I am not sure ... work?
19:30 Skarsnik seems like it work
19:30 lizmat m: say "Happy {[+] ^64}"
19:30 camelia rakudo-moar b5cb00: OUTPUT«Happy 2016␤»
19:30 hankache lizmagic!!
19:31 lizmat .oO( courtesy of Perl 6 FaceBook group )
19:32 BenGoldberg m: use NativeCall; sub gettimeofday() is native("linux-vdso.so.1") { ... }; say gettimeofday;
19:32 camelia rakudo-moar 4bb47d: OUTPUT«(Mu)␤»
19:33 Rotwang BenGoldberg: it only happens when run from a promise
19:33 Skarsnik m: use NativeCall; sub gettimeofday() is native("linux-vdso.so.1") { * }; say gettimeofday;
19:33 camelia rakudo-moar 4bb47d: OUTPUT«(Mu)␤»
19:33 Skarsnik why Mu
19:33 moritz because you didn't declare a return type
19:34 Skarsnik m: use NativeCall; sub gettimeofday() is native("linux-vdso.so.1") returns num64 { * }; say gettimeofday;
19:34 camelia rakudo-moar 4bb47d: OUTPUT«0␤»
19:34 BenGoldberg m: use NativeCall; sub int gettimeofday(int, int) is native("linux-vdso.so.1") { ... }; say gettimeofday(0, 0);
19:34 camelia rakudo-moar 4bb47d: OUTPUT«5===SORRY!5=== Error while compiling /tmp/xr2RbVaay2␤Did you mean to write "my int sub gettimeofday" or put "returns int" before the block?␤at /tmp/xr2RbVaay2:1␤------> 3use NativeCall; sub int gettimeofday7⏏5(int, int) is native("linux-vdso…»
19:34 BenGoldberg m: use NativeCall; my int sub gettimeofday(int, int) is native("linux-vdso.so.1") { ... }; say gettimeofday(0, 0);
19:34 camelia rakudo-moar 4bb47d: OUTPUT«Potential difficulties:␤    In 'gettimeofday' routine declaration - Not an accepted NativeCall type for parameter [1]  : int␤     --> For Numerical type, use the appropriate int32/int64/num64...␤    at /tmp/0VgTzLOXnB:1␤    ------> 3nt) is native(…»
19:34 BenGoldberg m: use NativeCall; my int sub gettimeofday(int32, int32) is native("linux-vdso.so.1") { ... }; say gettimeofday(0, 0);
19:34 camelia rakudo-moar 4bb47d: OUTPUT«Potential difficulties:␤    The returning type of 'gettimeofday' --> int is erroneous. You should not return a non NativeCall supported type (like Int inplace of int32), truncating errors can appear with different architectures␤    at /tmp/BVp2buGDy5:1…»
19:34 BenGoldberg m: use NativeCall; my int32 sub gettimeofday(int32, int32) is native("linux-vdso.so.1") { ... }; say gettimeofday(0, 0);
19:34 camelia rakudo-moar 4bb47d: OUTPUT«0␤»
19:35 BenGoldberg m: use NativeCall; my int32 sub gettimeofday(int32, int32) is native("linux-vdso.so.1") { ... }; await (start { gettimeofday(0, 0) } xx 20 );
19:35 camelia rakudo-moar 4bb47d: OUTPUT«(signal SEGV)»
19:35 BenGoldberg m: use NativeCall; my int32 sub gettimeofday(int32, int32) is native("linux-vdso.so.1") { ... }; await (start { gettimeofday(0, 0) } xx 20 );
19:35 camelia rakudo-moar 4bb47d: OUTPUT«(signal SEGV)»
19:35 RabidGravy m: m: use NativeCall; sub gettimeofday(int32, int32) returms int32 is native("linux-vdso.so.1") { ... }; say gettimeofday(0, 0)
19:35 camelia rakudo-moar 4bb47d: OUTPUT«5===SORRY!5=== Error while compiling /tmp/tvlbtS02I3␤Missing block␤at /tmp/tvlbtS02I3:1␤------> 3tiveCall; sub gettimeofday(int32, int32)7⏏5 returms int32 is native("linux-vdso.so.␤    expecting any of:␤        new name to be defined␤»
19:35 moritz m: m: use NativeCall; sub gettimeofday(int32, int32) returns int32 is native(Str) { * }; say gettimeofday(0, 0);
19:35 camelia rakudo-moar 4bb47d: OUTPUT«0␤»
19:35 BenGoldberg m: use NativeCall; my int32 sub gettimeofday(int32, int32) is native("linux-vdso.so.1") { ... }; await (start { gettimeofday(0, 0) } xx 1 );
19:35 camelia rakudo-moar 4bb47d: ( no output )
19:35 BenGoldberg m: use NativeCall; my int32 sub gettimeofday(int32, int32) is native("linux-vdso.so.1") { ... }; say await (start { gettimeofday(0, 0) } xx 1 );
19:35 camelia rakudo-moar 4bb47d: OUTPUT«(0)␤»
19:35 BenGoldberg m: use NativeCall; my int32 sub gettimeofday(int32, int32) is native("linux-vdso.so.1") { ... }; say await (start { gettimeofday(0, 0) } xx 2 );
19:35 camelia rakudo-moar 4bb47d: OUTPUT«(0 0)␤»
19:35 BenGoldberg m: use NativeCall; my int32 sub gettimeofday(int32, int32) is native("linux-vdso.so.1") { ... }; say await (start { gettimeofday(0, 0) } xx 5 );
19:35 camelia rakudo-moar 4bb47d: OUTPUT«(0 0 0 0 0)␤»
19:36 BenGoldberg m: use NativeCall; my int32 sub gettimeofday(int32, int32) is native("linux-vdso.so.1") { ... }; say await (start { gettimeofday(0, 0) } xx 10 );
19:36 camelia rakudo-moar 4bb47d: OUTPUT«(0 0 0 0 0 0 0 0 0 0)␤»
19:36 BenGoldberg m: use NativeCall; my int32 sub gettimeofday(int32, int32) is native("linux-vdso.so.1") { ... }; say await (start { gettimeofday(0, 0) } xx 20 );
19:36 camelia rakudo-moar 4bb47d: OUTPUT«Memory allocation failed; could not allocate 21496 bytes␤»
19:36 RabidGravy m: m: use NativeCall; sub gettimeofday(int32, int32) returns int32 is native("linux-vdso.so.1") { ... }; say gettimeofday(0, 0)
19:36 camelia rakudo-moar 4bb47d: OUTPUT«0␤»
19:36 Skarsnik maybe it's not a thread safe function?
19:36 Rotwang Skarsnik: had the same issue with getuid ;f
19:37 Rotwang besides getimeofaday is so basic, it has to be thread safe
19:37 moritz maybe NativeCall isn't thread safe?
19:38 uruwi joined #perl6
19:38 Skarsnik http://pubs.opengroup.org/onlinepubs/009695399/functions/xsh_chap02_09.html#tag_02_09_01
19:38 user74747 joined #perl6
19:38 Rotwang Skarsnik: gettimeofaday is more of a syscall and not library function
19:39 Skarsnik I don't know if the NC devs are still around x)
19:39 user74747 joined #perl6
19:39 nige1 joined #perl6
19:40 BenGoldberg m: use NativeCall; class timeval is repr('CStruct') { has int32 $.tv_sec; has int32 $.tv_usec }; my int32 sub gettimeofday(timeval, int32) is native("linux-vdso.so.1") { ... }; my timeval $t .= new; say gettimeofday($t, 0); say $t;
19:40 camelia rakudo-moar 4bb47d: OUTPUT«0␤timeval.new(tv_sec => 1451850032, tv_usec => 0)␤»
19:40 user74747 joined #perl6
19:41 BenGoldberg m: use NativeCall; class timeval is repr('CStruct') { has int32 $.tv_sec; has int32 $.tv_usec }; my int32 sub gettimeofday(timeval, int32) is native("linux-vdso.so.1") { ... }; my timeval $t .= new; say gettimeofday($t, 0); say $t; say now
19:41 camelia rakudo-moar 4bb47d: OUTPUT«0␤timeval.new(tv_sec => 1451850071, tv_usec => 0)␤Instant:1451850107.633534␤»
19:41 kjk joined #perl6
19:41 BenGoldberg m: use NativeCall; class timeval is repr('CStruct') { has int32 $.tv_sec; has int32 $.tv_usec }; my int32 sub gettimeofday(timeval, int32) is native(*) { ... }; my timeval $t .= new; say gettimeofday($t, 0); say $t; say now
19:41 camelia rakudo-moar 4bb47d: OUTPUT«5===SORRY!5=== Error while compiling /tmp/kJislfNkUo␤No appropriate parametric role variant available for 'NativeCall::Native'␤at /tmp/kJislfNkUo:1␤»
19:42 BenGoldberg m: use NativeCall; class timeval is repr('CStruct') { has int32 $.tv_sec; has int32 $.tv_usec }; my int32 sub gettimeofday(timeval, int32) is native { ... }; my timeval $t .= new; say gettimeofday($t, 0); say $t; say now
19:42 camelia rakudo-moar 4bb47d: OUTPUT«0␤timeval.new(tv_sec => 1451850123, tv_usec => 0)␤Instant:1451850159.826216␤»
19:42 * BenGoldberg wonders why tv_usec isn't getting filled in.
19:43 Rotwang moritz: I don't see any info that NativeCall subroutines can't be used in a promise/supply
19:44 Rotwang besides that would be a major drawback
19:45 RabidGravy yeah, they can, it really just depends on the thread safety of the library
19:45 Skarsnik NC is more in a state of "It works" that getting trohough testing I believe
19:45 mempko_ joined #perl6
19:46 mempko_ FYI, I published an alpha release of my Kafka client library https://github.com/mempko/PKafka
19:46 mempko_ Happy to contribute a little to the perl6 community
19:46 BenGoldberg m: use NativeCall; class timeval is repr('CStruct') { has int32 $.tv_sec; has int32 $.tv_usec }; my int32 sub gettimeofday(timeval, int32) is native { ... }; say await( start { my timeval $t .= new; gettimeofday($t, 0), $t } xx 1 );
19:46 camelia rakudo-moar 4bb47d: OUTPUT«((0 timeval.new(tv_sec => 1451850382, tv_usec => 0)))␤»
19:46 Rotwang RabidGravy: but shouldn't those subroutines have their own address space?
19:46 BenGoldberg m: use NativeCall; class timeval is repr('CStruct') { has int32 $.tv_sec; has int32 $.tv_usec }; my int32 sub gettimeofday(timeval, int32) is native { ... }; say await( start { my timeval $t .= new; gettimeofday($t, 0); $t.tv_sec } xx 10 );
19:46 camelia rakudo-moar 4bb47d: OUTPUT«(1451850408 1451850408 1451850408 1451850408 1451850408 1451850408 1451850408 1451850408 1451850408 1451850408)␤»
19:46 RabidGravy mempko_, welcome aboard
19:47 mempko_ RabidGravy: Thanks!
19:47 BenGoldberg m: use NativeCall; class timeval is repr('CStruct') { has int32 $.tv_sec; has int32 $.tv_usec }; my int32 sub gettimeofday(timeval, int32) is native { ... }; say await( start { my timeval $t .= new; gettimeofday($t, 0); $t.tv_sec } xx 20 );
19:47 camelia rakudo-moar 4bb47d: OUTPUT«Memory allocation failed; could not allocate 4194304 bytes␤»
19:47 Rotwang I know that from the moarvm perspective those are threads
19:47 bbkr how can I use libc version in OS X if file is simply named "libc.dylib" without any version symlink? I want to silence "Consider adding the api version of the library..." warning
19:48 Skarsnik that pretty weird
19:48 RabidGravy Rotwang, things like say ncurses have static data in the library which is never going to be safe
19:49 pierre-vigier joined #perl6
19:49 Skarsnik bbkr, there is really no libc.x.dylib?
19:49 bbkr /usr/lib/libc.dylib -> libSystem.dylib
19:49 bbkr no version alias
19:50 kjk << abc >>.WHAT.say; << abc 1 2 3 >>.WHAT.say; my $k = 'abc'; << $k >>.WHAT.say; << $k a b c >>.WHAT.say
19:50 RabidGravy for that do you even need to supply a library name?
19:51 BenGoldberg bbrk, what happens if you change "is native ('libc')" (or whatever) to "is native" ?
19:51 RabidGravy (i.e. it should be loaded)
19:51 bbkr Skarsnik: and there is alias - /usr/lib/libSystem.dylib -> libSystem.B.dylib, but "B" is not valid version identifier
19:51 RabidGravy ah but you mean cglobal
19:51 bbkr trying...
19:51 bbkr yes, I use it in cglobal
19:51 Rotwang I guess it shouldn't crash anyway, so I'll create a bug, since NativeCall is in core I should send bug report to rakudobug@perl.org ?
19:51 Skarsnik Str should work too
19:52 kjk hello~ for my code above, the third 'say' statement says (Slip) rather than (Str), is this expected behaviour?
19:52 Skarsnik m: use NativeCall:TEST; say guess_library_name(Str);
19:52 camelia rakudo-moar 4bb47d: OUTPUT«5===SORRY!5=== Error while compiling /tmp/ioZmyfsF1R␤Undeclared routine:␤    guess_library_name used at line 1␤␤»
19:53 Skarsnik m: use NativeCall :TEST; say guess_library_name(Str);
19:53 camelia rakudo-moar 4bb47d: OUTPUT«␤»
19:53 Skarsnik you can probably pass Str to cglobal too
19:54 bbkr like this: "cglobal(("c", "B"), "errno", int);" ? it croaks with Type check failed in binding $version; expected Version but got Str
19:54 Skarsnik vB
19:54 RabidGravy yeah
19:54 regreg joined #perl6
19:54 RabidGravy m: say vB
19:54 camelia rakudo-moar 4bb47d: OUTPUT«5===SORRY!5=== Error while compiling /tmp/brcRxaKBv2␤Undeclared routine:␤    vB used at line 1␤␤»
19:54 Skarsnik err
19:54 RabidGravy m: say Version.new("B")
19:54 camelia rakudo-moar 4bb47d: OUTPUT«vB␤»
19:54 Skarsnik Oh right it's... ambiquious
19:56 bbkr cglobal(("c", Version.new("B")), "errno", int) now croaks with Cannot locate native library 'libc.B.dylib'. because in OS X it is named libSystem.B.dylib
19:56 Skarsnik tryc cglobal(Str, "errno", int)
19:56 Skarsnik since the libc is already loaded x)
19:58 bbkr that worked, but returns different value 2 than cglobal("c", "errno", int) which returns 10
19:58 timotimo isn't "int" unsafe here?
19:59 timotimo for 32bit/64bit?
19:59 Skarsnik It's a tricky question to not warn or not under os X for version (I think someone pointed that opengl only have a unversionned .dynlib) since you want the version on unix
19:59 flussence it's defined as "int" in the errno.h file, so that's what you gotta use...
19:59 Skarsnik no, it should be int32
19:59 timotimo bah, opengl on osx
20:00 timotimo i've heard terrible things
20:00 Zoffix joined #perl6
20:00 kjk p6: << abc >>.WHAT.say; << abc 1 2 3 >>.WHAT.say; my $k = 'abc'; << $k >>.WHAT.say; << $k a b c >>.WHAT.say
20:00 camelia rakudo-moar 4bb47d: OUTPUT«(Str)␤(List)␤(Slip)␤(List)␤»
20:01 Zoffix Curious. Using Perl 6's DBIish I get this error "Cannot locate native library 'libsqlite3.so': libsqlite3.so: cannot open shared object file:". Even though Perl 5's SQLite DBD works fine without it. Do they just bundle all the SQLite files with the distro?
20:01 flussence oh, hm. I guess a C int is 32-bit on 64-bit OSes then... I don't know the first thing about ABIs :)
20:01 RabidGravy Zoffix, yes
20:01 Skarsnik timotimo, good catch for missing check on cglobals, it should be just a matter of moving the validnctype outside the sanity_check routine and call it
20:02 Zoffix We probably should do the same :D
20:02 Skarsnik duh why libsqlite3.so
20:02 Zoffix Why? is it wrong?
20:02 Skarsnik it should be libsqlite3.so.1
20:03 Skarsnik or .3
20:03 flussence it's /usr/lib64/libsqlite3.so.0.8.6 on my system...
20:03 Skarsnik Well why the version number is missing
20:04 stmuk_ http://doc.perl6.org/language/faq#Nativecall_can%27t_find_libfoo.so_and_I_only_have_libfoo.so.1.2!
20:04 Zoffix Skarsnik, it probably just the error message. Works fine if I install the lib
20:04 Skarsnik Zoffix, did you set PERL6SQLITE or something?
20:05 Zoffix nope
20:05 Skarsnik Are you using an old DBIish x)
20:05 Zoffix Perhaps
20:05 Zoffix How to find out what version I have?
20:06 Skarsnik constant LIB = %*ENV<DBIISH_SQLITE_LIB> || ('sqlite3', 0);
20:06 Skarsnik I should have bumped the version maybe
20:07 llfourn joined #perl6
20:07 Zoffix Ala Perl 5's  perl -MFoo -E 'say Foo->VERSION'
20:08 _nadim joined #perl6
20:08 lucasb kjk: I agree that the return values from <<...>> is not very intuitive. If you are looking for a workaround, you can type << "$k" >> to get a Str
20:09 Skarsnik I am not sure how version work x)
20:10 Skarsnik I mean for panda/modules
20:10 tipdbmp joined #perl6
20:10 Skarsnik especially since DBIish has version everywhere
20:10 kjk_ joined #perl6
20:12 * Zoffix notes the conversation above
20:13 Zoffix Is SQLite stuff with DBIish "thread safe"?
20:13 autarch hmm, how to check if all members of a junction are defined?
20:13 autarch m: all( Int, 42 ).defined; all( Int, 42 ) ~~ .defined;
20:13 camelia rakudo-moar 4bb47d: ( no output )
20:13 autarch m: say all( Int, 42 ).defined; say all( Int, 42 ) ~~ .defined;
20:13 camelia rakudo-moar 4bb47d: OUTPUT«True␤True␤»
20:13 Skarsnik stmuk, this faq entry should be fixed x)
20:14 flussence Zoffix: quoth the sqlite docs: “Threads are evil. Avoid them.␤␤SQLite is threadsafe. We make this concession since many users choose to ignore the advice given in the previous paragraph.” :)
20:14 Zoffix haha
20:15 Rotwang btw. does perl6 have GIL?
20:15 gfldex Rotwang: no
20:16 flussence there's also a «int sqlite3_threadsafe(void);» that can be used to check at runtime, but compiling it without safety isn't the default
20:16 vendethiel joined #perl6
20:19 Skarsnik I need to use := to write ($a, $b) = foo() ?
20:19 kjk lucasb: thanks! Didn't know you can do that.
20:19 flussence Zoffix: aaaaand... there's a flag you can pass to sqlite3_open_v2 that tells it whether to use a threadsafe mode that allows sharing one DB connection between threads or not.
20:19 RabidGravy Skarsnik, or  ($a, $b) = foo().list
20:20 Zoffix m: my ($x, $y ) = 42, 42; say so $x&$y .defined # autarch
20:20 camelia rakudo-moar 4bb47d: OUTPUT«True␤»
20:20 Zoffix m: my ($x, $y ) = 42; say so $x&$y .defined # autarch
20:20 camelia rakudo-moar 4bb47d: OUTPUT«False␤»
20:20 autarch Rotwang: my understanding is that threading is pretty core to how Perl 6 works (or is defined to work)
20:20 Zoffix Not sure why all() doesn't work
20:20 Zoffix And I may be wrong too.
20:20 Zoffix m: my ($x, $y ) = 42, 0; say so $x&$y .defined
20:20 camelia rakudo-moar 4bb47d: OUTPUT«True␤»
20:21 Skarsnik my anwser for sqlite thread : Patch are welcome
20:21 autarch Zoffix: I'm not sure that parses the way you think that parses ;)
20:21 Skarsnik and does @_ still exist? x)
20:21 ghost_ joined #perl6
20:21 Zoffix m: my ($x, $y ) = 0, 42; say so $x&$y .defined
20:21 camelia rakudo-moar 4bb47d: OUTPUT«False␤»
20:21 Zoffix autarch, ah :(
20:21 Skarsnik du I can just write *@tab now
20:22 autarch Zoffix: I'm just guessing, but I wonder if that's "$x & ($y.defined)"
20:22 Zoffix yes
20:23 cdg joined #perl6
20:23 Zoffix Well, grep works
20:23 Zoffix m: my ($x, $y ) = 42, 42; say so all($x, $y).grep: *.defined
20:23 camelia rakudo-moar 4bb47d: OUTPUT«True␤»
20:23 Zoffix IRC-- # waste of time
20:24 Zoffix s/waste of time/distraction/;
20:24 Zoffix left #perl6
20:24 Juerd Er...
20:24 * mst resists Zoffix-- # part of the problem
20:24 Juerd Please don't resist removing the k-line and apologising :)
20:24 Juerd If that part message is true, that is.
20:25 * mst collapses giggling
20:25 Rotwang autarch: NativeCall not working in promises is pretty hughe drawback, so hopefully NativeCall people look at the perl rt
20:25 mst Zoffix++ # score!
20:25 Juerd Only now I realise that k-lines would result in quits, not parts :)
20:27 Juerd In "multi method elems (::?CLASS:D:)", what is "::?"?
20:27 flussence I *think* it's a weird/only way of writing sigil-less "$?CLASS"
20:27 lucasb I think ::?CLASS is the current class you are in
20:28 autarch Rotwang: I'm sure people are reading RT
20:28 lucasb ah, I didn't know $?CLASS existed
20:29 Juerd Wow, it's fugly :)
20:29 Juerd But thanks or explaining. Am I correct in thinking '::' is a sigil and '?' is a twigil
20:29 Juerd ?
20:29 lucasb isn't that the "Don't repeat yourself" version of having to write (Foo:D:) in every method?
20:30 flussence :: is... not far off what it means in perl 5, ? is a twigil yes
20:30 RabidGravy Rotwang, autarch https://github.com/jonathanstowe/Audio-Libshout/blob/master/lib/Audio/Libshout.pm#L630 works fine - just need a thread safe library and/pr methods
20:30 RabidGravy or
20:31 Rotwang RabidGravy: ?
20:32 autarch Rotwang: well, you were trying getenv and gettimeofday which I'd expect to be thread safe
20:32 RabidGravy it's a nativecall thing using a promise, I've streamed hours of music through it
20:32 Rotwang autarch: yep
20:33 autarch err, I responded to the wrong person
20:33 autarch RabidGravy: rotwang seemed to find some issues just calling very simple glibc subs in promises
20:33 Rotwang RabidGravy: it doesn't pop up always, for example when I've added debug prints it dissapeared
20:33 geraud joined #perl6
20:34 Rotwang RabidGravy: https://rt.perl.org/Public/Bug/Display.html?id=127138
20:42 Juerd print is still pretty slow (e.g. [*] 1..10000 takes 0.3 seconds, but printing it takes another 1.5 seconds). Has anyone profiled this yet?
20:42 timotimo have not yet
20:42 ugexe joined #perl6
20:42 timotimo could be it's just slow to stringify a big int via libtommath
20:43 Juerd m: my $x = ~ [*] 1..10000; say now - INIT now;
20:43 camelia rakudo-moar 4bb47d: OUTPUT«1.46464939␤»
20:43 Juerd Yeah, could be :)
20:43 timotimo m: my $x = ~ [*] 1..10000; say $x.chars
20:43 camelia rakudo-moar 4bb47d: OUTPUT«35660␤»
20:43 timotimo m: print "1" xx 35660;
20:43 camelia rakudo-moar 4bb47d: OUTPUT«1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 …»
20:44 timotimo m: print "1" x 35660;
20:44 camelia rakudo-moar 4bb47d: OUTPUT«1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111…»
20:44 timotimo ... it's kind of hard to get the timing in there, too :P
20:44 RabidGravy http://pubs.opengroup.org/onlinepubs/009695399/functions/xsh_chap02_09.html#tag_02_09_01 - non "thead safe" libc funcs (getimeofday not one)
20:47 autarch Rotwang: looking at that list I note that getenv is _not_ thread safe
20:48 dalee what is this colon doing in the push method of hashes? my %a; %a.push: (b => 1);
20:49 RabidGravy I'm quite willing to accept that NativeCall does expose you to threading issues but I would be surprised otherwsise
20:50 lucasb dalee: if you use the colon, you don't need to call method with parentheses
20:51 dalee lucasb thx
20:51 lucasb m: say ({ 42 } while $++ < 3)
20:51 camelia rakudo-moar 4bb47d: OUTPUT«(-> ;; $_? is raw { #`(Block|58687808) ... } -> ;; $_? is raw { #`(Block|58687880) ... } -> ;; $_? is raw { #`(Block|58687952) ... })␤»
20:52 lucasb FROGGS++ removed the error, but I think the result is not right
20:52 lucasb m: say ({ 42 } if True)
20:52 camelia rakudo-moar 4bb47d: OUTPUT«42␤»
20:52 dalek doc: 1aacfb0 | lizmat++ | doc/Language/glossary.pod:
20:52 dalek doc: First part of S99 -> Glossary migration
20:52 dalek doc:
20:52 dalek doc: With thanks to all of the original authors of S99
20:52 dalek doc: review: https://github.com/perl6/doc/commit/1aacfb0716
20:53 pierre-vigier joined #perl6
20:53 TEttinger joined #perl6
20:54 dalee it seems like the colon is doing something else as well though, my %a = (b => 1); %a.push(c => 2); say %a; outputs b => 1
20:55 lucasb the 'c => 2' is a named parameter, which is silently discarded :(
20:55 masak m: repeat while my $x == 0 { $x = get().chars }
20:55 camelia rakudo-moar 4bb47d: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Qxy2Ko45LE␤Preceding context expects a term, but found infix = instead␤at /tmp/Qxy2Ko45LE:1␤------> 3repeat while my $x ==7⏏5 0 { $x = get().chars }␤»
20:55 lucasb you would have to right %a.push((c => 2)) or %a.push('c' => 2)
20:56 masak TimToady: was surprised that ^^ gave that error message today
20:56 masak I mean, I can see how it happens, I just think it shouldn't :)
20:56 lucasb *to write
20:56 pierre-vigier joined #perl6
20:58 autarch masak: I thought that'd written as ...
20:58 autarch m: while get().chars -> $x { }
20:58 camelia rakudo-moar 4bb47d: ( no output )
20:58 autarch or something like that
20:59 masak autarch: `repeat while` evaluates condition after the loop; `while` before
20:59 masak so they're different
20:59 autarch m: repeat while get().chars -> $x { }
20:59 camelia rakudo-moar 4bb47d: ( no output )
20:59 FROGGS masak: the fix to 'my $x == 0' might be very simple...
21:00 autarch it seems weird to put a "my" on the LHS of a comparison - it makes sense to me that that would be an error
21:00 lucasb m: say my $ != 42
21:00 camelia rakudo-moar 4bb47d: OUTPUT«Use of uninitialized value of type Any in numeric context  in block <unit> at /tmp/ygozVHeNzl line 1␤True␤»
21:00 lucasb m: say my $ == 42
21:00 camelia rakudo-moar 4bb47d: OUTPUT«5===SORRY!5=== Error while compiling /tmp/KtyB5nmtEx␤Preceding context expects a term, but found infix = instead␤at /tmp/KtyB5nmtEx:1␤------> 3say my $ ==7⏏5 42␤»
21:00 masak autarch: then I guess we just have to disagree on that ;)
21:00 autarch heh
21:00 masak autarch: it makes perfect sense to me, at least if it's an "item context" `my`
21:03 dalee is there anywhere that this colon usage is documented?  i don't seem to be able to find any mention of it anywhere
21:03 lucasb so... same thing happens for all operators that start with "=", like ==, ===, =:=, =>
21:04 RabidGravy in the folk memory of the perl 6 people
21:04 aenaxi joined #perl6
21:05 lizmat http://doc.perl6.org/language/glossary#Colon_Pair_and_Colon_List    # dalee
21:05 lizmat http://doc.perl6.org/language/glossary#Adverb   # also dalee
21:06 dalee lizmat thank you
21:06 awwaiid lizmat: I think dalee is looking for the : in @foo.map: ...
21:06 lizmat ah, that one
21:06 awwaiid oh wait, maybe dalee is looking for all the colons
21:06 lucasb yeah, colon is overloaded in P6 for lots of uses :)
21:07 lucasb :foo  <-- adverb notation for pairs
21:07 awwaiid the one in map:, I can't find a good spot for it. http://doc.perl6.org/language/syntax#Subroutine_calls should mention it at least but doesn't
21:07 lucasb obj.meth: 1,2,3  <-- precedence drop
21:07 lucasb foo(obj: 1,2,3)  <-- invocant marker
21:07 awwaiid what's an invocant marker?
21:08 dalee hmm ya, i'm not actually sure any of those docs are related to what's being done with the hash push method
21:08 lucasb meth obj: 1,2,3  is the same as  obj.meth(1,2,3)
21:08 awwaiid oh, is that like meth(obj: 1,2,3)
21:08 awwaiid ahh
21:08 llfourn joined #perl6
21:08 vendethiel but not the same as meth (obj): 1,2,3
21:08 awwaiid that's a new one!
21:08 awwaiid (for me)
21:09 lizmat dalee: that would be the invocant marker
21:09 dalee ah http://design.perl6.org/S03.html#Invocant_marker
21:10 lizmat yeah, that didn't make it to the glossary or other docs yet, it seems
21:10 lizmat working on that
21:11 nine ugexe: you here?
21:11 awwaiid I'm adding it to the list of invocation methods in syntax (without elaboration)
21:11 ugexe nine: yea
21:11 yoleaux 11:02Z <nine> ugexe: I left a comment on your PR. Can you split the commit? I'd gladly merge the second part. Thanks for debugging this!
21:13 RUR joined #perl6
21:14 lucasb m: my %h; %h.push: 'a'=>1,(b=>2),c=>3; say %h  # just an example
21:14 camelia rakudo-moar 4bb47d: OUTPUT«a => 1, b => 2␤»
21:14 nine ugexe: I wonder if we should mkdir in Repository::Installation at all. The perl, vendor and site repositories are created fully by make install. No mkdir should be necessary for them. For custom repos we could offer a setup method that creates all directories. This method could also be used by make install to centralize the handling.
21:15 Ulti someone appears to be interested in writing some Matrix fu for Perl 6 but is being scuppered by: Partially dimensioned views of arrays not yet implemented. Sorry.
21:15 nine ugexe: separating these parts may help with ownership/permission problems
21:15 Ulti on a scale of 1 to 10 how hard would it be fore someone who knows a bit of Perl 6, and a bit of C to actually get that done?
21:16 dalek doc: a55ebdd | (Brock Wilcox)++ | doc/Language/syntax.pod:
21:16 dalek doc: Add some examples of method invocation
21:16 dalek doc: review: https://github.com/perl6/doc/commit/a55ebdde01
21:16 Ulti m: my num64 @matrix[10;10]; say @matrix[1];
21:16 camelia rakudo-moar 4bb47d: OUTPUT«Partially dimensioned views of arrays not yet implemented. Sorry. ␤  in block <unit> at /tmp/IKoE9xn69p line 1␤␤»
21:16 Ulti m: my num64 @matrix[10;10]; say @matrix[1;*];
21:16 camelia rakudo-moar 4bb47d: OUTPUT«Partially dimensioned views of arrays not yet implemented. Sorry. ␤  in block <unit> at /tmp/TC5FCGk3aL line 1␤␤»
21:17 Ulti m: my num64 @matrix[10;10]; say @matrix[1;0..9]; #etc
21:17 camelia rakudo-moar 4bb47d: OUTPUT«Partially dimensioned views of arrays not yet implemented. Sorry. ␤  in block <unit> at /tmp/Jugv1cIyfV line 1␤␤»
21:17 ugexe nine: maybe a user is not supposed to do this, but deleting `/site` to uninstall all modules (however inappropriate) is the only reason for the mkdir. if a user should not be allowed to do that and expect their perl6 to still work then it is indeed not neccesary
21:17 Ulti http://blogs.perl.org/users/pierre_vigier/2015/12/matrix-and-neural-network-in-perl6.html
21:18 nine ugexe: a real uninstall is not that far away. I guess it would be some 2 or 3 hours of light coding. All the information needed for that is already there.
21:18 ugexe yeah, but to uninstall say 100 modules
21:19 nine ugexe: when I really have to remove modules, I rm -rf install/share/perl6 && make install. Takes just a couple of seconds longer than removing site
21:19 lucasb awwaiid: lol, I think 'precedence drop' is just a loose term to mean that the method call will work as a list operator :) (someone needs to correct me :)
21:20 ugexe so if there is an uninstall candidate to quickly delete all modules in a CompUnit without it having to process each part individually it would solve that
21:20 ugexe compunit::repository rather
21:20 nine ugexe: just to explain: I've become very cautious with changes to Installation because ShimmerFairy was right in one thing: the curli branch was a rush job. I really want to get it right this time as we now actually have the time.
21:21 nine A nuke method would be even easier than a uninstall :) Just remove all files in the repo and leave the directories. That's a couple of minutes of coding time.
21:22 nine It's the API design that's really taking time. Because whatever we add now, we'll have to support it indefinitely.
21:23 Skarsnik I think I will never get how to affect attribute in the constructor
21:23 nine In any case, I'm really appreciating your help wit hthis :)
21:23 jdv79 literally indefinitely?
21:23 lucasb while you are talking about curli, can I suggest again to make the dirs perl, site and vendor at the same level. I think this would make the directory structure layout much cleaner, instead of dirs site and vendor getting nested under the perl directory.
21:25 nine lucasb: I would have loved that pre-christmas. I should just have done it and with all the nuking, no one would have noticed. Now it's much harder because we do have backwards compatibility.
21:25 Skarsnik How I access attribute in new?
21:25 nine Skarsnik: you can't. You do that in BUILD.
21:25 moritz you don't, because the object hasn't been created yet
21:25 lucasb nine: aww :(  ok, thanks for listening :)
21:25 moritz http://doc.perl6.org/language/objects#Object_Construction
21:25 pierre-v_ joined #perl6
21:25 jdv79 wonder how much can be deprecated in future lang versions
21:26 nine jdv79: well, yes. What we add now will be part of 6.d and will have to be supported forever.
21:26 RabidGravy unless of course you have a multi new and call another one from yours
21:27 jdv79 where forever may be just til a few versions forward?
21:28 jdv79 otherwise spaghetti code:(
21:29 mst there's ways to maintain compat without things going quite that badly wrong
21:29 ugexe oh i know, i've spent too many hours discussing the api. its why ive been so critical of it when it was merged in.
21:29 Skarsnik moritz, I want my new to take two arguments but in new I can't init stuff, and if I just define a BUILD I get new only accept named parameter
21:29 mst eh. we were always going to hate the first attempt after getting it some real world use
21:29 mst all of this has happened before; all of this will happen again
21:29 Zoffix joined #perl6
21:29 moritz Skarsnik: only accepting named parameters is great for composabity
21:29 Zoffix I'm having trouble with this:
21:30 Zoffix m: my @z = <foo bar baz>; say "DELETE FROM factoids WHERE id IN({join ',', ('?',) x @z})"
21:30 camelia rakudo-moar 4bb47d: OUTPUT«DELETE FROM factoids WHERE id IN(???)␤»
21:30 Zoffix why isn't it joining those '?' with commas?
21:30 moritz Skarsnik: though if you really want it, you can write a new method that translate a positional into a named, and BUILD that does more advanced magic
21:30 lucasb xx, not x :)
21:30 moritz Zoffix: use xx
21:30 moritz Zoffix: x is string repetition, xx is list repetition
21:30 moritz Zoffix: and no need for the akward trailing comma :-)
21:31 moritz m: my @z = <foo bar baz>; say "DELETE FROM factoids WHERE id IN({join ',', '?' xx @z})"
21:31 camelia rakudo-moar 4bb47d: OUTPUT«DELETE FROM factoids WHERE id IN(?,?,?)␤»
21:31 nine jdv79: personally I would really like to aim for Linux kernel backwards compatibility rather than Python style. Because that's one thing, Perl 5 really got right and what makes a great business case. It also shows that we are caring about our users more than ourselves.
21:31 moritz m: my @z = <foo bar baz>; say "DELETE FROM factoids WHERE id IN({join ',', @z.map({'?'})})"
21:31 camelia rakudo-moar 4bb47d: OUTPUT«DELETE FROM factoids WHERE id IN(?,?,?)␤»
21:31 Zoffix Thanks. Out of the gazillion ways I've tried, I guess one escaped :)
21:31 nine ugexe: I would have loved to be part of those discussions :/
21:31 Skarsnik moritz, I need to add an ugly attribute just for that?
21:31 moritz Skarsnik: no
21:32 moritz Skarsnik: you can have non-attribute named params in BUILD
21:32 moritz m: class A { has $.len; submethod BUILD(:$x, :$y)  { $!len = $x + $y } }; say A.new(:x(5), :y(8)).lenz
21:32 camelia rakudo-moar 4bb47d: OUTPUT«Method 'lenz' not found for invocant of class 'A'␤  in block <unit> at /tmp/GzH5B2OAZK line 1␤␤»
21:32 moritz m: class A { has $.len; submethod BUILD(:$x, :$y)  { $!len = $x + $y } }; say A.new(:x(5), :y(8)).len
21:32 camelia rakudo-moar 4bb47d: OUTPUT«13␤»
21:32 dalek rakudo/nom: 2aee270 | (Stefan Seifert)++ | src/core/CompUnit/PrecompilationRepository.pm:
21:32 dalek rakudo/nom: Fix confusing debug information
21:32 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/2aee2705db
21:34 Skarsnik Oooh self.bless call build
21:35 RabidGravy yeah, I think it calls CREATE which calls BUILDALL which calls BUILD or something like that
21:36 moritz RabidGravy: bless calls CREATE (which creates a new, empty instance), and calls BUILDALL on it, which walks the chain of BUILD submethods from the root of the inheritance hierarchy to the bottom
21:37 RabidGravy :)
21:37 Skarsnik m: use Test; say Test::EXPORT::DEFAULT::.keys;
21:37 camelia rakudo-moar 4bb47d: OUTPUT«(&isnt &plan &pass &cmp-ok &flunk &does-ok &subtest &unlike &like &use-ok &todo &skip-rest &eval-dies-ok &is-deeply &throws-like &ok &is &diag &done-testing &is-approx &skip &dies-ok &lives-ok &eval-lives-ok &MONKEY-SEE-NO-EVAL &nok &is_approx &isa-ok &can…»
21:39 hoelzro o/ #perl6
21:39 Skarsnik hm should is_approx be removed? (DEPRECATED maybe?
21:39 hoelzro nine: regarding that BEGIN say 'hi' RT ticket I filed the other day, do you mind if I file a new one regarding the error message? it's a little LTA
21:40 Skarsnik Oh can-ok only take one method name? :(
21:40 hoelzro btw, is it just accessing $*OUT that causes the issue, or is it the output to standard output that corrupts compilation output?
21:40 Zoffix How can I have this named param optional?
21:40 Zoffix m: sub foo (:$x where Dateish|Instant) {}; foo
21:40 camelia rakudo-moar 4bb47d: OUTPUT«Constraint type check failed for parameter '$x'␤  in sub foo at /tmp/VA5zUqXY1V line 1␤  in block <unit> at /tmp/VA5zUqXY1V line 1␤␤»
21:41 Skarsnik Oh
21:41 Skarsnik it get False
21:41 Skarsnik m: sub foo (:?$x where Dateish|Instant) {}; foo
21:41 camelia rakudo-moar 4bb47d: OUTPUT«5===SORRY!5=== Error while compiling /tmp/tq6vLJiuwr␤Missing block␤at /tmp/tq6vLJiuwr:1␤------> 3sub foo (:7⏏5?$x where Dateish|Instant) {}; foo␤»
21:41 Skarsnik m: sub foo (:$x? where Dateish|Instant) {}; foo
21:41 camelia rakudo-moar 4bb47d: OUTPUT«Constraint type check failed for parameter '$x'␤  in sub foo at /tmp/Pla4ZQOtQy line 1␤  in block <unit> at /tmp/Pla4ZQOtQy line 1␤␤»
21:42 dalek rakudo/nom: 3734ea8 | (Stefan Seifert)++ | src/core/CompUnit/Repository/Installation.pm:
21:42 dalek rakudo/nom: Fix file ids changing on reinstallation of a module
21:42 dalek rakudo/nom:
21:42 dalek rakudo/nom: Precompiled modules are checked against their source files on loading to detect
21:42 dalek rakudo/nom: outdated precomp files. This is done by recording the source file's id. Thus
21:42 dalek rakudo/nom: this id must be stable and survive reinstallation of a module. Otherwise the
21:42 dalek rakudo/nom: precompilation file's modification time will be compared to an outdated source
21:42 dalek rakudo/nom: file.
21:42 dalek rakudo/nom:
21:42 dalek rakudo/nom: Note that this also means that the source file's path must be stable. A patch
21:42 dalek rakudo/nom: to panda will fix those paths.
21:42 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/3734ea8d37
21:42 Zoffix m: sub foo (:$x) {}; foo; # being optional is the default
21:42 camelia rakudo-moar 4bb47d: ( no output )
21:42 lizmat nine++
21:42 Skarsnik Zoffix, it just set to False I think
21:43 Skarsnik m: sub foo (:$x) {say $x.WHAT}; foo
21:43 camelia rakudo-moar 4bb47d: OUTPUT«(Any)␤»
21:43 Skarsnik or not
21:43 nine This was one tough nut to crack. Especially as the full fix is three changes to rakudo and panda.
21:44 Skarsnik Zoffix, look like a bug to me
21:45 Zoffix great
21:45 Zoffix m: sub foo (:$x where Any|Dateish|Instant) {}; foo;
21:45 camelia rakudo-moar 4bb47d: ( no output )
21:45 RabidGravy doesn't to me
21:45 Zoffix RabidGravy, why?
21:46 lizmat nine: so, if I now pull rakudo and panda, how could I make sure I install new modules with the latest panda without having to do a bootstrap, which would lose all my installed modules /
21:46 lizmat ?
21:46 nine lizmat: bootstrap doesn't loose modules
21:46 lizmat ahhhh
21:46 Skarsnik m: sub foo (:$x where Mu|Dateish|Instant) {}; foo;
21:46 camelia rakudo-moar 4bb47d: ( no output )
21:46 lizmat cool, nine++
21:46 nine boostrap.pl just installs panda
21:46 RabidGravy because it's always going to be an Any when it's not supplied
21:47 lizmat nine: ah, yes, I'm confusing with the old rebootstrap.pl  :-)  *phew*
21:47 Zoffix RabidGravy, but an Any can be supplied, which kinda puts a flaw into constraints
21:47 Zoffix m: sub foo (:$x where Any|Dateish|Instant) {}; my $x; foo :x($x)
21:47 camelia rakudo-moar 4bb47d: ( no output )
21:47 Skarsnik m: sub foo (:$x where Mu|Dateish|Instant) {say "foo"}; foo; foo(now); foo("Str");
21:47 camelia rakudo-moar 4bb47d: OUTPUT«foo␤Too many positionals passed; expected 0 arguments but got 1␤  in sub foo at /tmp/bgulmTxHnQ line 1␤  in block <unit> at /tmp/bgulmTxHnQ line 1␤␤»
21:47 Zoffix ^ that should cry that $x is invalid
21:47 hoelzro joined #perl6
21:47 Zoffix Well, I mean in real code
21:48 Skarsnik m: sub foo (:$x where Mu|Dateish|Instant) {say "foo"}; foo; foo(:x(now)); foo(:x("Str"));
21:48 camelia rakudo-moar 4bb47d: OUTPUT«foo␤foo␤foo␤»
21:48 Skarsnik that not good x)
21:48 nine Oh it seems like the second fix to rakudo is not even needed.
21:48 RabidGravy m: subset Foo of Mu where Dateish|Instant;  sub foo(Foo :$m) {}; foo;
21:48 camelia rakudo-moar 4bb47d: OUTPUT«Constraint type check failed for parameter '$m'␤  in sub foo at /tmp/VCUtN21uDE line 1␤  in block <unit> at /tmp/VCUtN21uDE line 1␤␤»
21:48 dalek rakudo/nom: 7d4cdbc | lizmat++ | src/core/ (2 files):
21:48 dalek rakudo/nom: Fix for RT #127135
21:48 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/7d4cdbcdd5
21:48 RabidGravy m: subset Foo of Mu where * ~~ Dateish|Instant;  sub foo(Foo :$m) {}; foo;
21:48 camelia rakudo-moar 4bb47d: OUTPUT«Constraint type check failed for parameter '$m'␤  in sub foo at /tmp/_BymDH4dOm line 1␤  in block <unit> at /tmp/_BymDH4dOm line 1␤␤»
21:49 Skarsnik m: sub foo (:$x where $x.defined and Dateish|Instant) {say "foo"}; foo; foo(:x(now)); foo(:x("Str"));
21:49 camelia rakudo-moar 4bb47d: OUTPUT«5===SORRY!5=== Error while compiling /tmp/jHz2TqlkW7␤Malformed parameter␤at /tmp/jHz2TqlkW7:1␤------> 3sub foo (:$x where $x.defined7⏏5 and Dateish|Instant) {say "foo"}; foo; ␤    expecting any of:␤        constraint␤        infix␤ …»
21:49 Zoffix needs curlies
21:49 Zoffix m: sub foo (:$x where {not($_) or ($_ and Dateish|Instant)}) {}; foo :x(now)
21:49 nine hoelzro: I would not mind you reopening the ticket either. But if you do, I'd really appreciate a suggestion for a fix, because I have no idea :)
21:49 camelia rakudo-moar 4bb47d: OUTPUT«Constraint type check failed for parameter '$x'␤  in sub foo at /tmp/5EneOgz2xh line 1␤  in block <unit> at /tmp/5EneOgz2xh line 1␤␤»
21:50 firstdayonthejob joined #perl6
21:50 * lizmat just finds out there are *no* spectests for Str.subst-mutate
21:50 Skarsnik Zoffix, for me it's a bug, there should not be weird workaround x)
21:50 Zoffix :o
21:50 Zoffix Skarsnik, agreed
21:50 * Zoffix rakudobugs it
21:51 nine hoelzro: it's really just that I write dependency ids to STDOUT and read them back in in the calling process
21:51 brrt joined #perl6
21:54 brrt hi #perl6
21:55 Zoffix \o
21:56 yurivish_ joined #perl6
21:57 Zoffix Done: https://rt.perl.org/Ticket/Display.html?id=127142
21:58 Skarsnik m: say " "x5;
21:58 camelia rakudo-moar 3734ea: OUTPUT«5===SORRY!5=== Error while compiling /tmp/6esDgbkTOM␤Two terms in a row␤at /tmp/6esDgbkTOM:1␤------> 3say " "7⏏5x5;␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        statement end␤        statemen…»
21:58 Skarsnik m: say " "x 5;
21:58 camelia rakudo-moar 3734ea: OUTPUT«     ␤»
21:58 Zoffix m: say (" "x5)
21:58 camelia rakudo-moar 3734ea: OUTPUT«5===SORRY!5=== Error while compiling /tmp/7_Dx18gB6P␤Two terms in a row␤at /tmp/7_Dx18gB6P:1␤------> 3say (" "7⏏5x5)␤    expecting any of:␤        infix␤        infix stopper␤        statement end␤        statement modifier␤    …»
21:59 RabidGravy m: subset Foo of Mu where { !$_.defined ||$_ ~~ Dateish|Instant };  sub foo(Foo :$m) {}; foo
21:59 camelia rakudo-moar 3734ea: ( no output )
21:59 Skarsnik How the hell perl5 accept that, it's so ambiquois x)
22:00 RabidGravy perl5 is "special"
22:00 Zoffix Skarsnik, what's the ambiguity?
22:00 Skarsnik x5 look like a sub name
22:00 Zoffix m: subset Foo of Mu where { !$_.defined ||$_ ~~ Dateish|Instant };  sub foo(Foo :$m) {}; foo :m(now)
22:00 camelia rakudo-moar 3734ea: ( no output )
22:00 Zoffix Skarsnik, but it's in an invalid place
22:02 dalek doc: 183d8fb | (Dale Evans)++ | doc/Type/Hash.pod:
22:02 dalek doc: clarifying push usage
22:02 dalek doc:
22:02 dalek doc: added examples of the other two forms of calling, and documented some non-obvious behaviour of what perl5 programmers might expect from fat commas
22:02 dalek doc: review: https://github.com/perl6/doc/commit/183d8fbed1
22:02 dalek doc: 25bdb05 | moritz++ | doc/Type/Hash.pod:
22:02 dalek doc: Merge pull request #313 from daleevans/patch-1
22:02 dalek doc:
22:02 dalek doc: clarifying push usage
22:02 dalek doc: review: https://github.com/perl6/doc/commit/25bdb054d6
22:03 dalek doc: b874994 | moritz++ | doc/Type/Hash.pod:
22:03 dalek doc: Explain why hash keys need to be quoted
22:03 dalek doc: review: https://github.com/perl6/doc/commit/b8749945d6
22:04 dalek doc: eafa0de | LLFourn++ | htmlify.p6:
22:04 dalek doc: preparing for removal of extra ""
22:04 dalek doc:
22:04 dalek doc: Putting some redundant when statements to catch the new .contents
22:04 dalek doc: format when that happens
22:04 dalek doc: review: https://github.com/perl6/doc/commit/eafa0de650
22:04 dalek doc: f6ac8ca | moritz++ | htmlify.p6:
22:04 dalek doc: Merge pull request #261 from LLFourn/master
22:04 dalek doc:
22:04 dalek doc: preparing for removal of extra ""
22:04 dalek doc: review: https://github.com/perl6/doc/commit/f6ac8caa34
22:05 Zoffix m: sub foo($x? where $_ < 42 ) {}; foo
22:05 camelia rakudo-moar 3734ea: OUTPUT«Use of uninitialized value of type Any in numeric context  in sub foo at /tmp/562mGzNaCQ line 1␤»
22:07 Skarsnik is there something replace \002 from p5 that allow to write a number just after in a string?
22:08 Zoffix What's \002?
22:08 flussence \x[2]?
22:08 Skarsnik The ascii number 2
22:08 _nadim joined #perl6
22:09 Skarsnik or the raw
22:09 Skarsnik not even sure how to call that xD
22:09 frankjh joined #perl6
22:09 Zoffix \x02
22:09 hoelzro nine: ahhhh ok
22:09 RabidGravy moritz++
22:09 Zoffix m: say "\x[2]" == "\x02"
22:09 camelia rakudo-moar 3734ea: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5\x[2]' (indicated by ⏏)␤  in block <unit> at /tmp/9TKJbeJ6qm line 1␤␤Actually thrown at:␤  in block <unit> at /tmp/9TKJbeJ6qm line 1␤␤»
22:09 llfourn joined #perl6
22:09 hoelzro I'll re-open the ticket, explain the situation, and think on a fix
22:09 Zoffix m: say "\x[2]" eq "\x02"
22:09 camelia rakudo-moar 3734ea: OUTPUT«True␤»
22:10 nine ++hoelzro
22:11 Skarsnik Zoffix, the issue with \x02 is for string like \0023 :)
22:11 nadim joined #perl6
22:12 lizmat good night, #perl6!
22:12 RabidGravy toodles
22:12 Zoffix night
22:13 dalek rakudo/nom: 8150686 | ugexe++ | src/core/CompUnit/Repository/Locally.pm:
22:13 dalek rakudo/nom: Use an uncached IO::Path for $.prefix
22:13 dalek rakudo/nom:
22:13 dalek rakudo/nom: method prefix fixes instances of $path.mkdir unless $path.e
22:13 dalek rakudo/nom: that pass around an IO::Path where !$path.e or !$path.w
22:13 dalek rakudo/nom: erroneously. This avoids adding stringification code throughout
22:13 dalek rakudo/nom: the rest of the codebase (or adding .IO all over)
22:13 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/8150686271
22:16 timotimo anything you people have been up to that ought to be mentioned on the weekly?
22:17 flussence hmmm... could mention there's packages for various OSes in the works (arch/gentoo/mac)
22:18 hoelzro timotimo: panda install $ModuleThatIndirectlyDependsOnFileFind now works without --force
22:18 hoelzro nine++ # for adapting my fix to something long term-friendly
22:18 flussence I think the arch one's in best shape right now, it has panda too
22:18 Zoffix timotimo, I've been working on a factoid bot for this channel that'll be named 'huggable'. Would be done today if I hadn't run into a bunch of issues -_- Hopefully tomorrow
22:19 Zoffix s/factoid bot/IRC::Client::Plugin::Factoid/; # but the purpose is the bot
22:19 nine timotimo: if you want to mention it, Inline::Perl5 is now 32 bit safe
22:19 nadim joined #perl6
22:19 autarch timotimo: File::LibMagic
22:19 autarch https://github.com/autarch/perl6-File-LibMagic
22:20 hoelzro I also opened a ticket on panda to promote discussion of how to handle backwards compat, which is pending discussion =)
22:20 nadim joined #perl6
22:20 hoelzro nine: ticket re-opened, re-named, and suggestions offered
22:20 hoelzro I can't speak to the quality of said suggestions, though =P
22:21 Zoffix Another caveat with comma-less named args:
22:21 Zoffix m: sub SUB(:$foo, :$bar, :$baz) {say "[$foo] [$bar] [$baz]" }; my %args = :foo<foo>, :bar<bar>, :baz<baz>; SUB :foo<foo> :bar<bar> :baz<baz> :foo<newfoo>; SUB |%args :foo<newfoo>; SUB |%args, :foo<newfoo>;
22:21 camelia rakudo-moar 7d4cdb: OUTPUT«[newfoo] [bar] [baz]␤[foo] [bar] [baz]␤[newfoo] [bar] [baz]␤»
22:21 Zoffix SUB |%args, :foo<newfoo>; overrides existing arg, while SUB |%args :foo<newfoo> doesn't
22:21 RabidGravy timotimo, you might mention that we're > < far away from 500 modules in the ecosystem :)
22:22 timotimo cool
22:22 nine hoelzro: one word: Windows
22:23 nine hoelzro: everything would be dead simple if we only supported Unix. Then I'd just open a pipe and pass the file descriptor to the child process.
22:23 hoelzro that's usually the word I get for my suggestions =/
22:24 RabidGravy that's not what I heard ;-)
22:24 Skarsnik timotimo, type check on NC native routine,  App::GPTrixie to generate NC code from C headers x)
22:24 hoelzro nine: and passing a filename via a command line option wouldn't work on Windows either?
22:24 Zoffix m: sub SUB(:$foo, :$bar, :$baz) {say "[$foo] [$bar] [$baz]" }; my %args = :foo<foo>, :bar<bar>, :baz<baz>; SUB :foo<foo> :bar<bar> :baz<baz> :foo<newfoo>; SUB |%args :foo<newfoo>; SUB |%args, :foo<newfoo>; # less verbouse example
22:24 camelia rakudo-moar 7d4cdb: OUTPUT«[newfoo] [bar] [baz]␤[foo] [bar] [baz]␤[newfoo] [bar] [baz]␤»
22:25 Zoffix er fail
22:25 Zoffix m: sub SUB(:$foo) {say "[$foo]" }; my %args = :foo<foo>; SUB :foo<foo> :foo<newfoo>; SUB |%args :foo<newfoo>; SUB |%args, :foo<newfoo>;
22:25 camelia rakudo-moar 7d4cdb: OUTPUT«[newfoo]␤[foo]␤[newfoo]␤»
22:25 timotimo Skarsnik: what does the name mean? o_O
22:25 nzkindest joined #perl6
22:26 Skarsnik nothing I did not have a clever idea for a name, so I pick up a MLP pony name xD
22:27 RabidGravy Skarsnik++ # top naming scheme
22:27 Zoffix heh
22:28 Skarsnik The Great and Powerful Trixie!
22:28 RabidGravy I'm going with this next time I can't think of a name for something
22:29 timotimo which one is trixie?
22:30 Skarsnik http://mlp.wikia.com/wiki/Trixie a 'vilain' character that appear in 2 episodes
22:31 RabidGravy Trixie Lulamoon
22:32 Zoffix Rakudobugged: https://rt.perl.org/Ticket/Display.html?id=127143
22:32 Zoffix This makes it 5th ticket for today... Time to give up coding and shoot some dudes on Warframe
22:32 Zoffix BTW, whoever has access, this can be closed: https://rt.perl.org/Ticket/Display.html?id=127118
22:33 Zoffix night all
22:33 RabidGravy Skarsnik, you should get this for a logotype http://vignette1.wikia.nocookie.net/mugen/images/f/f2/Vector_trixie_lulamoon_by_ready2fail-d66ctme.png/revision/latest?cb=20140526033312
22:33 nine hoelzro: that may work
22:33 Skarsnik I put her cutie mark
22:33 hoelzro nine: would you mind leaving your Windows feedback in the ticket?
22:34 nine hoelzro: tomorrow. I'm on my way to bed now.
22:34 nine Good night!
22:35 hoelzro 'night nine
22:35 timotimo gnite nine :)
22:35 dalek rakudo/nom: cffa688 | ugexe++ | src/core/CompUnit/Repository/ (2 files):
22:35 dalek rakudo/nom: Bypass path attribute caching in CompUnit
22:35 dalek rakudo/nom:
22:35 dalek rakudo/nom: * Fixes issues where installation of modules fails on the
22:35 dalek rakudo/nom: first run but works on subsequent tries.
22:36 dalek joined #perl6
22:38 yqt joined #perl6
22:39 Juerd m: my uint8 $c = 255; $c++; say $c
22:39 camelia rakudo-moar 815068: OUTPUT«256␤»
22:40 Juerd What's wrong with my expectation of '0'?
22:40 Juerd And what's a nice way to get that behavior?
22:40 Skarsnik of even -1 x)
22:40 Skarsnik m: my int8 $c = 255; $c++; say $c;
22:40 camelia rakudo-moar 815068: OUTPUT«0␤»
22:41 Juerd Skarsnik: Huh?!
22:41 Juerd m: my int8 $c = -5; say $c;
22:41 camelia rakudo-moar 815068: OUTPUT«-5␤»
22:41 Juerd m: my int8 $c = -5; $c++;  say $c;
22:41 camelia rakudo-moar 815068: OUTPUT«-4␤»
22:41 Juerd m: my int8 $c = 255; say $c;
22:41 camelia rakudo-moar 815068: OUTPUT«-1␤»
22:42 Juerd Ah.
22:42 Skarsnik I think uint type are 'fake'
22:42 Juerd That hurts my brain :(
22:44 masak Juerd: I agree with you, a uint8 shouldn't be able to take on the value 256.
22:44 masak unless I'm missing something major.
22:45 Skarsnik m: say int8.REPR; uint8.REPR;
22:45 camelia rakudo-moar 815068: OUTPUT«P6int␤»
22:45 Skarsnik m: say int8.REPR; say uint8.REPR;
22:45 camelia rakudo-moar 815068: OUTPUT«P6int␤P6int␤»
22:45 Skarsnik m: say int8.REPR; say uint8.nativesize;
22:46 camelia rakudo-moar 815068: OUTPUT«P6int␤Method 'nativesize' not found for invocant of class 'uint8'␤  in block <unit> at /tmp/RUwhoEMr2U line 1␤␤»
22:46 Skarsnik m: say int8.REPR; say int8.nativesize;
22:46 camelia rakudo-moar 815068: OUTPUT«P6int␤Method 'nativesize' not found for invocant of class 'int8'␤  in block <unit> at /tmp/WZbifUOusl line 1␤␤»
22:46 Skarsnik should probably add tests for type bondary in roast?
22:47 Skarsnik *boundary
22:47 Tonik joined #perl6
22:48 Juerd m: my uint16 $foo = 2**16; say $foo; ++$foo; say $foo
22:48 camelia rakudo-moar 815068: OUTPUT«0␤1␤»
22:48 Juerd m: my uint16 $foo = 2**16-1; say $foo; ++$foo; say $foo
22:48 camelia rakudo-moar 815068: OUTPUT«65535␤65536␤»
22:48 Juerd Now my brain hurts even more.
22:49 Juerd m: my uint16 $foo = 2**16-1; say $foo; $foo = $foo + 1; say $foo
22:49 camelia rakudo-moar 815068: OUTPUT«65535␤0␤»
22:50 niceperl joined #perl6
22:53 flussence now *mine* does /o\
22:53 masak auugh
22:59 masak 'night, #perl6
22:59 Skarsnik good night masak
23:00 Juerd Good night :)
23:00 gfldex m: my uint16 $foo = 2**16-1; say $foo; ++$foo; say $foo.WHAT
23:00 camelia rakudo-moar e95c62: OUTPUT«65535␤(Int)␤»
23:00 gfldex m: my uint16 $foo = 2**16-1; say $foo.WHAT; ++$foo; say $foo.WHAT
23:00 camelia rakudo-moar e95c62: OUTPUT«(Int)␤(Int)␤»
23:01 timotimo seems like it autoboxes the Int for you when you .WHAT?
23:01 timotimo m: my uint16 $foo = 1; say $foo.VAR.WHAT
23:01 camelia rakudo-moar e95c62: OUTPUT«(IntLexRef)␤»
23:02 timotimo ^- that means we have a native int inside a lexical slot that we're refering to
23:06 Juerd I can't find where nqp::add_i is implemented in moar
23:07 timotimo need to search for add_I
23:07 timotimo it's inside the bigint ops file
23:08 timotimo the addition and a few others are implemented using macros
23:08 nadim hi, is there a way to remove a role from an object?
23:08 Juerd timotimo: Oh, from Int.pm I reckoned that add_i and add_I would be different.
23:08 timotimo oh!
23:08 timotimo yeah, they are different
23:09 timotimo add_i is most likely implemented in interp.c then
23:09 Juerd Yep. Thanks :)
23:09 timotimo because it's really just GET_REG(cur_op, 0).i64 = GET_REG(cur_op, 2).i64 + GET_REG(cur_op, 4).i64
23:09 Juerd That's a weird implementation for <64 ints :)
23:10 timotimo with sized ints, though, the code gen is generating truncate and extend ops for you
23:10 timotimo that's in nqp's QASTCompilerMAST likely
23:10 timotimo you should be able to find about that in the recent commits
23:10 timotimo as proper support for sized int lexicals and registers is rather young
23:10 Juerd This is way beyond what I comprehend. I should learn some internals stuff some day.
23:10 llfourn joined #perl6
23:11 timotimo hehe
23:11 Rotwang autarch: it totally is, look again
23:11 timotimo are you looking for something specific? is there a bug somewhere?
23:11 Rotwang besides both gettimeofaday and getenv doesn't mutate anything
23:11 autarch Rotwang: http://pubs.opengroup.org/onlinepubs/009695399/functions/xsh_chap02_09.html#tag_02_09_01 says that getenv is not thread safe
23:12 Juerd timotimo: Well, that uint8 will hold 256 after a ++, see 30 minutes ago
23:12 timotimo oh, hmm.
23:12 Rotwang autarch: so? getenv is on the list?
23:12 autarch Rotwang: yes
23:12 Juerd $foo = $foo + 1 works as expected, $foo++ does magic.
23:12 timotimo potentially because we have inc_i and dec_i?
23:12 timotimo (do we?)
23:12 Rotwang aaand it does not need to be threadsafe
23:12 gfldex nadim: you could reconstruct a copy of some object via MOP and leave out the methods of a given role. You will break bindings in the process and we will call you crazy.
23:13 timotimo Juerd: anyway, is there a rakudobug yet?
23:14 Juerd timotimo: I don't know. Because I don't really understand the language design regarding native ints, so I find it hard to determine whether it's a bug
23:14 timotimo totally a bug, IMO.
23:14 Juerd Thanks. Will send mail.
23:14 Skarsnik nadim, that a good question :)
23:14 Skarsnik m: say int8.WHAT
23:14 camelia rakudo-moar e95c62: OUTPUT«(int8)␤»
23:14 Skarsnik m: say uint8.WHAT
23:14 camelia rakudo-moar e95c62: OUTPUT«(uint8)␤»
23:15 Juerd What's the procedure regarding tests for bugs? Do I just add them to the repo and report a bug, or do I copy/paste my tests in the bug report?
23:15 Skarsnik m: say int8 $a; say $a.WHAT
23:15 camelia rakudo-moar e95c62: OUTPUT«5===SORRY!5=== Error while compiling /tmp/kW0cuPD4ZH␤Two terms in a row␤at /tmp/kW0cuPD4ZH:1␤------> 3say int87⏏5 $a; say $a.WHAT␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        statement end␤  …»
23:15 Skarsnik m: my int8 $a; say $a.WHAT
23:15 camelia rakudo-moar e95c62: OUTPUT«(Int)␤»
23:15 Rotwang autarch: this list implies that it is ok to use getenv in threads, at least that's my understanding
23:15 bpetering joined #perl6
23:16 autarch Rotwang: oh, you're right, I misread the text
23:16 autarch no, wait, I didn't, it's saying that everything should be implemented as thread-safe _except_ the functions on that list
23:17 Skarsnik Juerd, don't forget to mention that it work for int8 x)
23:17 timotimo Juerd: if there's some code that's already copy-pastable into a test file, that'd be swell
23:17 Juerd timotimo: I can commit to roast directly but I don't know if people will be upset over the failing tests :)
23:17 Rotwang autarch: following functions1 need not be thread-safe.
23:18 Rotwang The getenv() function need not be reentrant. A function that is not required to be reentrant is not required to be thread-safe
23:19 Rotwang autarch: besides, even if a function isn't threadsafe it just means that you can be sure to its outcome
23:19 Rotwang it doesn't mean that it will crash
23:19 Juerd Hmmm
23:19 Rotwang and crash is what happens with NativeCall
23:19 timotimo Juerd: yes, they would be upset; usually you'd mark them todo and it'd be fine
23:19 Juerd There are surprisingly few tests for native ints :)
23:20 timotimo yeah
23:20 Skarsnik NC test suite is rather small too x)
23:20 Juerd Any suggestion for a test file where to put these?
23:20 timotimo that's a thing i also always have a hard time with :)
23:21 Juerd I'll rakudobug it now, and write the tests tomorrow
23:21 timotimo thank you kindly :)
23:23 Rotwang s/can/can't/
23:26 Juerd Bug submitted; https://rt.perl.org/Public/Bug/Display.html?id=127144
23:26 Juerd Good night!
23:26 timotimo Juerd: i may have just found the place where the fix ought to happen
23:27 Juerd That's great. I'll read the rest when I wake up :)
23:27 timotimo hm. no, maybe not.
23:27 RabidGravy Rotwang, I'm stll worried about this getenv.  The glibc manpage for getenv says "he string pointed to by the  return value of getenv() may be statically allocated, and can be  modified  by  a  subsequent  call to getenv()"
23:28 RabidGravy sounds like a boom waiting to happen in a threaded environment
23:34 timotimo my expectation was that the reason we don't truncate properly is because inc_i and dec_i have only one register, a write
23:35 timotimo in other places we have a bunch of special handling code just for those two ops, too
23:37 BenGoldberg joined #perl6
23:38 timotimo nope. i don't see the right way to go here
23:39 timotimo wait .. huh, we're not even using that opcode for ++
23:40 Skarsnik hm timotimo do you think is there a compile time way to check the type of attribute in a NC struct (that has is repr('CStruct')) ?
23:41 lucasb joined #perl6
23:42 timotimo hum ... i'm not sure you can do it without getting a bit of code into moar
23:42 timotimo if you had something like in jnthn's OO::Monitor, you could mixin something into all cstructs
23:42 Rotwang RabidGravy: autarch: we need to agree on something ;f can we agree that sleep() is thread safe?
23:42 timotimo but that'd require "cstruct foobar" instead of "class foobar is repr<CStruct>"
23:43 Rotwang sleep is defined in POSIX1.2008: http://pubs.opengroup.org/onlinepubs/9699919799/functions/sleep.html#tag_16_560
23:43 Rotwang and posix states that: All functions defined by this volume of POSIX.1-2008 shall be thread-safe [...]
23:43 Rotwang except for those from the list we were talking about earlier
23:44 Rotwang m: use NativeCall; sub csleep(uint32) is native is symbol('sleep') returns uint32 { * }; await start { csleep(5) } xx 15
23:44 camelia rakudo-moar e95c62: OUTPUT«Memory allocation failed; could not allocate 21232 bytes␤»
23:46 nadim joined #perl6
23:47 lucasb m: my $x = 42; $x.subst-mutate(/o/,'x'); say $x.WHAT
23:47 camelia rakudo-moar e95c62: OUTPUT«(Str)␤»
23:47 lucasb ^^ should the type change even if the match was not successful?
23:49 lucasb m: my $x = 42; $x ~~ s/o/x/; say $x.WHAT
23:49 camelia rakudo-moar e95c62: OUTPUT«(Int)␤»
23:50 gfldex multi method subst-mutate( Cool:D $self is rw: $matcher, $replacement, *%named )
23:50 lucasb type changing or not, I think both .subst-mutate and s/// should have the same outcome
23:50 gfldex no return type given, so it can do whatever it wants
23:50 RabidGravy I'm not sure sleep is a good example as it does something odd, threads or no threads
23:51 Rotwang RabidGravy: what? :D
23:51 RabidGravy I suspect it screws up the inbuilt event loop
23:52 Rotwang RabidGravy: if we cant use sleep/getenv and gadzillion other functions in NativeCall, we are screwed anyway [;
23:52 gfldex lucasb: Perl 6 is a dynamic language, if you don't tell it what type you want, you will have to deal with the fallout.
23:52 lucasb gfldex: I... I don't understand you :)
23:53 lucasb .subst-mutate *always* returns either a match object or Nil
23:54 gfldex lucasb: that is an implementation detail, not a properly defined interface and may change in the future. Because it's not a properly defined interface.
23:55 lucasb ok, we will have to disagree with this one :) I expect a pretty well defined behavior, whatever it is. If the behavior is always to coerce a non-string to string *even* when the match was not successful, then ok, I can live with it.
23:56 timotimo RabidGravy: unlikely that it breaks something; it should effectively be equivalent to a busy loop, no?
23:58 gfldex lucasb: subst-mutate is defined for Cool and overloaded by Str. If some other class overloads that method, a return value of Str can and most likely will be nonsense. Do not rely on return value type that is not there.

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

Perl 6 | Reference Documentation | Rakudo